NEWS
LinuxCNC 2.5.2 Release
LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum Hardware Driver Boards Understanding hardware stepgens

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Understanding hardware stepgens

Understanding hardware stepgens 24 May 2012 17:14 #20353

  • btvpimill
  • btvpimill's Avatar
  • NOW ONLINE
  • Gold Boarder
  • Posts: 191
  • Karma: 3
I am sure this will be an easy question for you guys.

I get the power of generating steps from hardware instead of letting LinuxCNC do it, Thats not the issue for me. I am confused about how this works on a hardware level.

How does LinuxCNC tell the hardware what to generate, or how does the hardware know?
How does HAL know if the position is reached? When we use the stepgen, "feedback" is given to stepgen (I think) to let it think the loop is closed. So how does the loop close with hardware generators?

I have been pondering over this ever since I read about it, and since I have yet to come across the answer, I guess its time to ask.
The administrator has disabled public write access.

Re:Understanding hardware stepgens 24 May 2012 17:37 #20354

  • PCW
  • PCW's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1660
  • Thank you received: 87
  • Karma: 116
The hardware stepgens work very much like LinuxCNCs software stepgen. They are basically rate generators (digitally controlled clocks or oscillators) with position feedback (a step counter) fed back to linuxCNC. The position feedback allows linuxCNC to correct for small errors due to differences in linuxCNCs and hardware timebase and delays from direction reversals. Basically the whole system is like a velocity mode servo where LinuxCNC reads the current position (step count+fractional step count) and sets the step rate every servo cycle
Last Edit: 24 May 2012 17:41 by PCW. Reason: clarify
The administrator has disabled public write access.

Re:Understanding hardware stepgens 24 May 2012 17:47 #20355

  • btvpimill
  • btvpimill's Avatar
  • NOW ONLINE
  • Gold Boarder
  • Posts: 191
  • Karma: 3
So basically CNC says -x move this fast, Y move that fast. Then the step gen reports back in the next exchange how far they went. And so forth and so on.

I was thinking CNC gave a distance to move, then maybe checked if the move was completed.

Now would the base thread be the same rate as if software gen were used? Or do we get to slow down the base thread as a result of not needing to command each step?
The administrator has disabled public write access.

Re:Understanding hardware stepgens 24 May 2012 17:54 #20356

  • PCW
  • PCW's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1660
  • Thank you received: 87
  • Karma: 116
Yes basically, with the added detail that how fast its asked to move is the current TP velocity + feedback info calculated from the current stepgen position vs LinuxCNCs TP position

No base thread is needed (well effectively the base thread is now in hardware and many MHz)
The administrator has disabled public write access.

Re:Understanding hardware stepgens 24 May 2012 17:57 #20357

  • btvpimill
  • btvpimill's Avatar
  • NOW ONLINE
  • Gold Boarder
  • Posts: 191
  • Karma: 3
Oh no base thread sounds really cool. The updates are done at a servo thread time then? I could see where that would REALLY free up the PC cycles!
The administrator has disabled public write access.

Re:Understanding hardware stepgens 24 May 2012 18:29 #20360

  • btvpimill
  • btvpimill's Avatar
  • NOW ONLINE
  • Gold Boarder
  • Posts: 191
  • Karma: 3
Just dawned on me, I guess this is how the gecko's are able to change step size on the fly? Because LinuxCNC is not counting steps, so the distance traveled is whatever the gecko reports.

I think I have learned my quota of trivial information for the day :)

Thank you Peter
The administrator has disabled public write access.

Re:Understanding hardware stepgens 25 May 2012 06:50 #20390

  • PCW
  • PCW's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1660
  • Thank you received: 87
  • Karma: 116
Geckos dont really change step size on the fly (its always takes 10 pulses to make a full step)
what Geckos do is "morph" between micro stepping and full stepping (with a divide by 10 prescale) by gradually changing the step motor current setpoints from sine/cosine to square waves over some speed range. This allows better torque at higher speeds where the current never reaches the setpoint peaks
The administrator has disabled public write access.
  • Page:
  • 1
Moderators: PCW, jmelson
Time to create page: 1.221 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.