Hello Guest it is April 25, 2024, 02:02:41 AM

Author Topic: Can i get the state of coordinate system ?  (Read 3253 times)

0 Members and 1 Guest are viewing this topic.

Can i get the state of coordinate system ?
« 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



In theory, there is no difference between theory and practice. In practice there is.

Offline Bodini

*
  •  216 216
    • View Profile
Re: Can i get the state of coordinate system ?
« 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.  ;) :) :P

-Nick
Re: Can i get the state of coordinate system ?
« Reply #3 on: January 05, 2008, 02:18:42 PM »
Hi Nick,

Thank you, this will answer my question.

Greets,

Helmut
In theory, there is no difference between theory and practice. In practice there is.