Hello Guest it is March 28, 2024, 07:08:44 PM

Author Topic: Counting Pulses on an Input  (Read 2046 times)

0 Members and 1 Guest are viewing this topic.

Counting Pulses on an Input
« on: August 23, 2016, 11:51:36 PM »
The newly released Gecko G214 drive has an output signal (FULLSTEP OUT) that will send out a pulse each time the drive passes a full step. I want to write a macro that will count the FULLSTEP pulses and compare that to  the distance moved over a given period of time to determine if steps were lost.

Does MACH have the ability to count/accumulate pulses on a given input?
Re: Counting Pulses on an Input
« Reply #1 on: August 24, 2016, 02:58:32 AM »
Hi kentCNC,
I'm only just learning too so regard what I say with caution.

I don't know whether M3 can count but it certainly does have 4 encoder inputs. Could you
mount an encoder on the end of your stepper or maybe on the far end of the ballscrew?
If you can the you have DRO's built in to M3 that can read and manipulate them.

Do you have reason to believe that you are losing steps? Loss of steps can be measured reasonably
easily with vernier calipers or a micrometer. That method wouldn't warn you however.

I have read quite a few posts where different people have tried to use M3 to correct for loss
of steps and I believe most if not all have failed, warning yes, correction no.

Any reasonable correction strategy requires a closed loop design which is the norm for servos
but in its infancy with steppers. The vast majority of steppers are used open loop. My machine is
open loop and yet I have never lost steps unless I was trying to do something crazy or otherwise
demand more than steppers can deliver.

My recommendation is solve the loss or potential loss of steps problem then any warning/correction
strategy becomes redundant.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Counting Pulses on an Input
« Reply #2 on: August 24, 2016, 09:53:40 AM »
Thank you for the reply. On my current machine I have encoders on each axis of the gantry so I can determine if one side stalls and then e-stop so as to not rack he gantry. I am building a new machine and learned about the pulse that the new G214 drivers provide and am looking for a way I could accomplish the same thing without encoders. In addition, I could do this for any axis just to be warned if I am losing steps. I do not believe I am losing steps, but like the idea of a warning if I am and I also want to provide the fail safe so as to not rack the gantry. Just looking for a new approach that is simple. I have no intention to try to close the loop. One day the driver will hopefully have that capability.