Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: beefy on April 09, 2016, 11:57:48 PM

Title: Using DIR pin of unused axis for synchronous switching
Post by: beefy on April 09, 2016, 11:57:48 PM
The laser commands M10 M11 are normally used for switching an output at a specific point in gcode. In laser control it seems they are often used at the beginning and end of a cut to turn the laser at the exact moment in time the axis starts moving.

Another method of doing this has been to use the DIR pin of a "phantom axis" (unused axis).

Now this is my question - is there any way to use a DIR pin output DURING an XY move without affecting that XY move. Please don't suggest M10/11 for this, I have certain reasons I need to use the DIR pin for this and explaining why is just complicating matters.

So for instance, and to keep things simple, I want to move X to 5, then switch on my phantom DIR output at that point, then have X continue to 10, i.e. the X move from 0 - 10 is uninterrupted and the DIR pin is activated at the X 5 position.

Anyone know if that is possible.
Title: Re: Using DIR pin of unused axis for synchronous switching
Post by: Tweakie.CNC on April 10, 2016, 02:11:55 AM
One possible solution perhaps ?

By using an external controller (such as a PLC) it would be possible to count your X axis step pulses. You would need to know, in advance, just how many X step pulses had to occur before your phantom axis DIR pin is activated but this method would allow the X axis to make it’s journey without any interruption.

Tweakie.
Title: Re: Using DIR pin of unused axis for synchronous switching
Post by: beefy on April 10, 2016, 07:04:23 AM
Thanks Tweakie,

appreciate the input, but I don't think I'll be able to make that one work. I'm basically looking to have Sheetcam insert a certain command at particular points on the cut path and those commands activate an output at those points.