Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: tripleblack on August 25, 2008, 09:50:47 AM
-
hi all.
i am trying to create a macro for jogging the z during a macro. i want the z to be able to jog manually first, then from input 4 , resume the macro.
i have tried this,
code" g0z1" 'jogs the z to a safe height
while ismoving()
wend
'this is when i want to jog the z manually
code "g92z0" ' zero the z axis
SystemWaitFor(INPUT4) 'wait for a push button input
ActivateSignal(OUTPUT1) ' turn on relay 1
code"g4p1" 'pause for 1 second
the macro does not pause.
what am i doing wrong?
thanks
peter
-
anybody?
-
Have you checked to see that INPUT 4 is not always active, or is reversed in active low? Does OUTPUT1 go on?
I dont see anything to cause the code to pause where you have the 'this is where I want to jog' line. Do you expect to use the regular jog keys at that time?
-
thanks for your reply Ron.
Success! :)
i am using this for manually moving the z with oxy acetylene torch to its pierce position.this allows the z to be jogged up or down with the page up, page down keyboard keys.it also allows a joystick configured for thc up and down to adjust the height at a slower rate.
anyway, i had an input switch on the console set for starting the macro . setup to be oemtrigger 15, with oem code 1005(hold).code
1000(cycle start) caused the activateswitch(output1)to be ignored.my second macro.
creating a plasma torch touchoff macro was easy compared to this.
was running shopbot software before.had the same routine but much easier to create.but talk about buggy!!
SystemWaitFor(1005) ' lets the z axis be jogged down manually for preheat and start height
code"g92z0" 'zeros the z so that the top of plate is known
While ismoving()
Wend
code"g0z.2" 'jog up .2 inch quickly for the pierce
ActivateSignal(OUTPUT1) 'oxy pierce valve turned on.
While ismoving()
Wend
code"g0z0" ' jog back down for return to part file
While ismoving()
Wend