Hello Guest it is December 08, 2021, 11:15:27 AM

Author Topic: Simultaneous of X and Y  (Read 2612 times)

0 Members and 1 Guest are viewing this topic.

Offline c30232

*
  •  122 122
    • View Profile
Simultaneous of X and Y
« on: November 04, 2014, 05:29:07 PM »
I would like to move un-slaved x and y at exactly the same time to an entered value.  The movement is a gantry having two individual stepper drive screw actuators.  I am using the below to move a single actuator and I have been able to modify it to move both actuators, however, when that occurs, the first actuator positions and the second actuator follows.  But, I haven't figured out of to get simultaneous movement of x and y.   

Distance = GetUserDRO(1001)

Code "g90 g0x" & distance

Offline ger21

*
  • *
  •  6,293 6,293
    • View Profile
    • The CNC Woodworker
Re: Simultaneous of X and Y
« Reply #1 on: November 04, 2014, 06:27:28 PM »
Code "G0 X" & distance & " Y" & distance
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline c30232

*
  •  122 122
    • View Profile
Re: Simultaneous of X and Y
« Reply #2 on: November 04, 2014, 07:46:52 PM »
Thanks!!!

It seems to be perfect.

I have a follow up question.  If I am lucky and both actuators (each from a different manufacturer) are "geared" exactly the same and thus could be slaved, can the x & a each have home switches to make certain the gantry always starts the day  parallel?

I know steppers don't ever miss a step, but none of mine got that memo.     

Offline ger21

*
  • *
  •  6,293 6,293
    • View Profile
    • The CNC Woodworker
Re: Simultaneous of X and Y
« Reply #3 on: November 04, 2014, 10:11:44 PM »
Yes, each of the slaved axis can home to their own switches.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline c30232

*
  •  122 122
    • View Profile
Re: Simultaneous of X and Y
« Reply #4 on: November 05, 2014, 06:11:26 PM »
I simulated the setup for x and a being driven independently.  It seems to work well and I assume that it will work in real time.  I have confirmed that each of the two actuators are "geared" differently.  Will Mach allow the slaving of two ratios?  It seems that the software allows it during screen setups, however, when I ran the configuration as x&a slaved the x data seemed to be dominate.  That is,  x moved correctly and a ran away.  Is there a fix to run slaved?         

Offline ger21

*
  • *
  •  6,293 6,293
    • View Profile
    • The CNC Woodworker
Re: Simultaneous of X and Y
« Reply #5 on: November 05, 2014, 09:40:17 PM »
Slaved axis must use the same steps/unit.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline c30232

*
  •  122 122
    • View Profile
Re: Simultaneous of X and Y
« Reply #6 on: November 05, 2014, 09:52:05 PM »
Thank you, I was hoping for the Silver Bullet.  With any luck the screws will be the same and a pulley change will fix it.  But, your script works, I just need to make certain the operator can't get them out of sync.  The only real hurtle so far is in the jog mode.  I can jog X-A, but I have not discovered how to jog X-A in incremental mode.