Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 11:20:42 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  Can i get the state of coordinate system ?
Pages: 1   Go Down
Print
Author Topic: Can i get the state of coordinate system ?  (Read 963 times)
0 Members and 1 Guest are viewing this topic.
mechaniac
Active Member

Offline Offline

Posts: 13


View Profile
« on: December 25, 2007, 07:09:10 AM »

Hello,

I'm trying to get the current state of coordinate system (e.g. G94, G95......etc.) in a macro. Is this possible, and how works the code?  Sorry for this possible stupid question, but I'm an absolutely Newbie in programming.

Thanks for answers.


Greetings,
Helmut



Logged

In theory, there is no difference between theory and practice. In practice there is.
Bodini
Active Member

Offline Offline

Posts: 112



View Profile
« Reply #1 on: January 05, 2008, 12:20:19 PM »

So is your question "how do i get the current offset"?  Like G54, G55, G56, etc.?

If that IS the question, then I've deduced this much...

"GetVar (5220)" returns a single digit number.  This number is the same number as the offset on the "Offsets" screen in Mach.

So on that screen, G54=1, G55=2, G56=3, etc.

If you try the code below in the "VB script editor" (built into Mach, in the pull-down "Operator" menu), the number returned does indeed correspond with the "fixture" number :

FixNumb = GetVar (5220)
MsgBox (FixNumb)

Even if this wasn't your question, I learned something today.  Wink Smiley Tongue

-Nick
Logged
Bodini
Active Member

Offline Offline

Posts: 112



View Profile
« Reply #2 on: January 05, 2008, 12:21:15 PM »

Oh yeah, I found that info here: http://www.machsupport.com/MachCustomizeWiki/index.php?title=Mach_specific_Subroutines/Functions_grouped_by_purpose#Access_to_the_machine_G-code_parameter_block
Logged
mechaniac
Active Member

Offline Offline

Posts: 13


View Profile
« Reply #3 on: January 05, 2008, 02:18:42 PM »

Hi Nick,

Thank you, this will answer my question.

Greets,

Helmut
Logged

In theory, there is no difference between theory and practice. In practice there is.
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!