Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: mindoverflow on October 23, 2018, 11:00:03 AM

Title: Synchronized movement with external trigger
Post by: mindoverflow on October 23, 2018, 11:00:03 AM
Hi,

what are your suggestions for a solution to run a single line of code each time an external signal is on.

lets imagine a mechanical hammer having electrical signals of when it is about to hit and when it is moving up, mach3 is controlling 2 axes moving the piece being hit. The axis movement should start when the hammer is in the up phase and stop when it is close to hit (the second condition could be ignored if we suppose the hammer cycle time is enough for the move to be completed)
I'm thinking about the probe function G31, would there be any problems? I'm open to any suggestion.

Thank you.