Welcome, Guest. Please login or register.
Did you miss your activation email?
May 24, 2012, 07:08:00 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  turret tool macro
Pages: 1   Go Down
Print
Author Topic: turret tool macro  (Read 1124 times)
0 Members and 2 Guests are viewing this topic.
tripleblack
Active Member

Offline Offline

Posts: 96


View Profile
« on: June 24, 2009, 08: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.





Logged
zealous
Active Member

Offline Offline

Posts: 486



View Profile WWW
« Reply #1 on: June 25, 2009, 02:37:25 PM »

Could you try replacing
Code:
code "g4p1"
   with
Code:
sleep(1000)
and let me know if that fixes it.
Logged

Regards, Jason Blake

www.Fusioncnc.com
tripleblack
Active Member

Offline Offline

Posts: 96


View Profile
« Reply #2 on: June 25, 2009, 08:32:02 PM »

thanks, i will try it tomorrow.
Logged
tripleblack
Active Member

Offline Offline

Posts: 96


View Profile
« Reply #3 on: June 29, 2009, 08:07:02 PM »

thanks, now it works.
Logged
zealous
Active Member

Offline Offline

Posts: 486



View Profile WWW
« Reply #4 on: July 01, 2009, 04:19:34 AM »

Great to hear
Logged

Regards, Jason Blake

www.Fusioncnc.com
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!