Hello Guest it is April 23, 2024, 06:07:24 PM

Author Topic: turret tool macro  (Read 4790 times)

0 Members and 1 Guest are viewing this topic.

turret tool macro
« 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.





Offline zealous

*
  •  489 489
  • HI!
    • View Profile
    • Artsoft Solutions
Re: turret tool macro
« Reply #1 on: June 25, 2009, 03:37:25 PM »
Could you try replacing
Code: [Select]
code "g4p1"   with
Code: [Select]
sleep(1000) and let me know if that fixes it.
Re: turret tool macro
« Reply #2 on: June 25, 2009, 09:32:02 PM »
thanks, i will try it tomorrow.
Re: turret tool macro
« Reply #3 on: June 29, 2009, 09:07:02 PM »
thanks, now it works.

Offline zealous

*
  •  489 489
  • HI!
    • View Profile
    • Artsoft Solutions
Re: turret tool macro
« Reply #4 on: July 01, 2009, 05:19:34 AM »
Great to hear