- Posts: 5
- Thank you received: 0
Problem on G Code to Step Motor Pulse
9 years 7 months ago #89850
by andre
Problem on G Code to Step Motor Pulse was created by andre
Hello everybody! I'm new to CNC and Linux CNC.
I'm currently having an idea in building my own 2D CNC lathe/milling with my own Step Driver/Motors. This is not conventional that I use BeagleBone Black to connect the pins to my own driver. I want to build a simple machine with simplest functions as possible, which only involves moving X/Y axis. However, I want to interpret my Pulse from G-Code to match with CNC standard instead of my own thinking (usable but not conventional).
That's what i'm looking for in Linux CNC. May you suggest me some Math sources/ Linux CNC sources/ codes so that i can know what pulses to generate from my G-Code ?
example: G-Code "X" ( move from x1 y1 to x2 y2), then step motor need A pulse, B pulse...
Looking forward to your responses. Thank you very much ! :laugh: :laugh:
I'm currently having an idea in building my own 2D CNC lathe/milling with my own Step Driver/Motors. This is not conventional that I use BeagleBone Black to connect the pins to my own driver. I want to build a simple machine with simplest functions as possible, which only involves moving X/Y axis. However, I want to interpret my Pulse from G-Code to match with CNC standard instead of my own thinking (usable but not conventional).
That's what i'm looking for in Linux CNC. May you suggest me some Math sources/ Linux CNC sources/ codes so that i can know what pulses to generate from my G-Code ?

example: G-Code "X" ( move from x1 y1 to x2 y2), then step motor need A pulse, B pulse...
Looking forward to your responses. Thank you very much ! :laugh: :laugh:
Please Log in to join the conversation.
9 years 7 months ago #89941
by andypugh
Replied by andypugh on topic Problem on G Code to Step Motor Pulse
Most stepper drivers use a separate channel for step and direction. The drive moves one step on each rising edge of the step pin in a direction set by the direction pin.
However, some drives use a quadrature signal, which is slightly better, as you can step twice as fast because it steps on every edge) and some have a separate step pulse channel for each direction.
LinuxCNC can generate all of these patterns, and many more (it can generate 4 channels for direct control of a unipolar driver, for example)
linuxcnc.org/docs/2.7/html/hal/rtcomps.html#_stepgen
If you are using Machinekit on the Beaglebone then you might have a different set of step pattern options. You would need to check the Machinekit docs to find out.
However, some drives use a quadrature signal, which is slightly better, as you can step twice as fast because it steps on every edge) and some have a separate step pulse channel for each direction.
LinuxCNC can generate all of these patterns, and many more (it can generate 4 channels for direct control of a unipolar driver, for example)
linuxcnc.org/docs/2.7/html/hal/rtcomps.html#_stepgen
If you are using Machinekit on the Beaglebone then you might have a different set of step pattern options. You would need to check the Machinekit docs to find out.
Please Log in to join the conversation.
9 years 7 months ago #90102
by andre
Replied by andre on topic Problem on G Code to Step Motor Pulse
Thank you very much for your helpful response, Sir. I will take a look at it and i will feeback my progress here regularly. :laugh:
Please Log in to join the conversation.
Time to create page: 1.318 seconds
