106
« on: June 24, 2009, 09:22:06 AM »
hi all. i am having difficulty getting a toolchanger macro to work. here is how it has to function.jog the x and z axis to a safe position,activate output19 which switches on an air solenoid, jog a axis to a set position 45,deactivate output 19, activate output 20, deacivate output 20.
here is my macro.
DeActivateSignal(Output20) " make sure solenoid is realeased.
code"z1x3" " jog to safe place for toolchange
While IsMoving ()
Wend
ActivateSignal(Output19) " turn on solenoid to raise turret
code"g4p1" " wait 1 second
code"g0a45" " rotate turret
While Ismoving ()
Wend
DeActivateSignal(Output19) "release solenoid
code"g4p1"
ActivateSignal(Output20) " turn on solenoid to retract turret
code"g4p1"
DeactivateSignal(Output20) " release solenoid
code"g4p1" " wait 1 second
the code skips over the deactivate signal. if i run the outputs individually in mdi, they work . pushing reset deacivates.
the machine is a hardinge chnc3. the turret is driven by stepper motor.