Hello Guest it is April 25, 2024, 08:51:54 AM

Author Topic: Brain and G code?  (Read 4051 times)

0 Members and 1 Guest are viewing this topic.

Brain and G code?
« on: January 25, 2008, 10:10:57 PM »
I need to put the Z axis at "g53 g0 z0"  How is that done with a brain?  Do I need to make a button and attach a VB script saying:  code "g53g0z0" and have the brain activate the button?


Thanks

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Brain and G code?
« Reply #1 on: January 26, 2008, 11:09:16 PM »
Take what ever trigger input your using to trigger the G53 event in the Brain. Like an input or what ever.
do a no-op lobe. Send the termination to UserLED1500 (or what ever).
Then in the Macro Pump Put a If then statement. And make a custom Macro called M53
I.e.

'MacroPump

i=GetOEMDRO(2000) 'interlock counter


If GetUserLED(1500) and i=0 then 'interlock statement
Code "M53"
SetUserLED(1500,0) 'this will turn off the Brain LED even if the trigger is still on.
End If

******************************************************************
******************************************************************

'M53.m1s  this is the G53 macro
Code "G53 g0 z0"
While IsMoving
Wend
SetUserDRO(2000,0) 'Resets the interlock DRO in the macro pump

'Scott
fun times