Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: Freddy Bastard on August 21, 2009, 11:19:19 AM

Title: Machine coordinate by a VB fonction
Post by: Freddy Bastard on August 21, 2009, 11:19:19 AM
Do we have a way to switch from Machine coordinate to Program Coordinate with a VB fonction?
Title: Re: Machine coordinate by a VB fonction
Post by: Chaoticone on August 21, 2009, 02:50:15 PM
Yup,

Code "G53"

Brett
Title: Re: Machine coordinate by a VB fonction
Post by: Freddy Bastard on August 24, 2009, 11:13:27 AM
Ok thank's

Here's another question... In a VB script, how can we know if the machine coords button is active? Some kind of protection.

ie: if machine coords is active, stop the routine and show a alarm.

Thank's
Title: Re: Machine coordinate by a VB fonction
Post by: vmax549 on August 24, 2009, 11:21:10 AM
(;-)  THere are 3-4 ways to switch to MACHINE coord depending on exactly what you need. There is also an LED that indicates when Mach is in machine coord mode.

They are listed in the cutomizing mach2 manual(;-)

(;-) TP
Title: Re: Machine coordinate by a VB fonction
Post by: Freddy Bastard on August 24, 2009, 11:26:25 AM
I don't really want to switch to machine coordinates. I want a warning if I try to run a VB script (ie: z probing) and machine coordinates is active.

Fred
Title: Re: Machine coordinate by a VB fonction
Post by: vmax549 on August 24, 2009, 04:38:11 PM
(;-)

" There is also an LED that indicates when Mach is in machine coord mode."

(;-) TP
Title: Re: Machine coordinate by a VB fonction
Post by: Freddy Bastard on August 25, 2009, 08:34:07 AM
Dim Test as Boolean

Code "G80G90G50"

Thank's, here's my solution for my problem. I added this portion of code to all my probing macros...

Test = GetOEMLed(16)
If Test then
    Message "***DONT PROBE IN MACHINE COORDS"
    Exit Sub
Else

End if
Title: Re: Machine coordinate by a VB fonction
Post by: Freddy Bastard on August 25, 2009, 08:43:03 AM
oups sorry...

Dim Test as Boolean

Code "G80G90G50"

Test = GetOEMLed(16)
If Test then
    Message "***DONT PROBE IN MACHINE COORDS"
    Exit Sub
Else

End if