NEWS
LinuxCNC 2.5.2 Release
There are no translations available.

LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release
There are no translations available.

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
There are no translations available.

New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum General General LinuxCNC Questions LinuxCNC for low level stepper motor control?

Welcome, Guest
Username: Password: Remember me

TOPIC: LinuxCNC for low level stepper motor control?

LinuxCNC for low level stepper motor control? 24 Apr 2012 05:19 #19484

  • Smecky
  • Smecky's Avatar
Hello LinuxCNCers. I must first apologise for my lack of knowledge about numerical control as I’m merely on the first step of my amazing automation adventure.

I wonder if there would be anyone gracious enough to answer the following:

1. Can linuxCNC be used for much lower-level numerical control? Say for example, running a program which loops every half an hour, which simply tells a bunch of stepper motors to step forward and backward at reasonably precise timings. If not, or if there is a better alternative for me, what might that be (preferably linux based)?

2. Is there a good resource for learning how to program G-Code? I know some coding basics for C based languages, but I’d like some further knowledge on the language.

My thanks in advance for anyone taking the time to answer my enquiries.
The administrator has disabled public write access.

Re:LinuxCNC for low level stepper motor control? 24 Apr 2012 06:07 #19485

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 4955
  • Thank you received: 87
  • Karma: 134
1 You can do that several ways with Linuxcnc but by far the easiest way is with G code and loops.

2 The manual would be the best place to learn about Linuxcnc flavor of G code. Anything else you find on the web would not be accurate and only create problems. Basic linear moves in G code are G0 and G1... so not much to learn there. Arcs are handled by G2 and G3... between these 4 G codes you do 95% of your coding.

linuxcnc.org/docview/html/gcode/overview.html
linuxcnc.org/docview/html/gcode/gcode.html

John
The administrator has disabled public write access.

Re:LinuxCNC for low level stepper motor control? 24 Apr 2012 06:26 #19487

  • ArcEye
  • ArcEye's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1335
  • Thank you received: 102
  • Karma: 129
Hi,
1. Can linuxCNC be used for much lower-level numerical control? Say for example, running a program which loops every half an hour, which simply tells a bunch of stepper motors to step forward and backward at reasonably precise timings.
Depends what you mean by low-level.
LinuxCNC is quite high level, in that all the pulse generation to run steppers etc is done below the radar and you just have to worry about where you want the tool to go.

But it would be quite possible to do something like that in a combination of gcode and some hal connections, you will have to expand upon exactly what you want to do, someone has probably done it before, saving you the re-invention of the wheel.
Is there a good resource for learning how to program G-Code?
The best learning is actually doing, but obviously there needs to be some input before you get to that.
Search the net, what you want is something that covers RS-474 standard which is what Linuxcnc is based upon.
What you don't want is anything that is aimed at old controllers, with strict line numbering blocks etc

This is one I found for a simple start ..... cncutil.org/gcode-introduction.html
Then you want to read the LinuxCNC documentation on gcode to understand the principles of offsets etc
linuxcnc.org/docs/2.5/html/gcode/overview.html

As a more advanced tutorial, Ed Nisleys articles entitled 'Along the G code way' in the Digital Machinist magazine
are always worth checking, especially as he works purely in LinuxCNC and goes into the more complex areas
of named variables, calling subs etc.

If you have done some programming in C you will have a head start regards conditional tests / loops etc. so should quite quickly pick it up.

One of the easiest ways to learn and test out g code is to use one of the simulator configs and you can do whatever you like, without danger of crashing bits of rotating tool steel into things.

regards
Last Edit: 24 Apr 2012 06:28 by ArcEye.
The administrator has disabled public write access.

Re:LinuxCNC for low level stepper motor control? 24 Apr 2012 07:04 #19489

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 4955
  • Thank you received: 87
  • Karma: 134
Actually Linuxcnc is based on the RS274 interpreter.

linuxcnc.org/docview/html/common/emc-history.html

Unless the writer is talking about the current Linuxcnc G code you can't rely on the specifics of the articles you find on the web. Even the RS274 is no longer relevant due to the numerous improvements EMC and Linuxcnc has made to the original RS274 G code.

Do you have any links to Ed Nisley's articles? Google fails me...

John
The administrator has disabled public write access.

Re:LinuxCNC for low level stepper motor control? 24 Apr 2012 09:03 #19493

  • Smecky
  • Smecky's Avatar
My, that was quick, I'm just digesting the links, and I'll edit this post (*topic, whoops) with some thouper-thimple psuedo-code to better explain what I plan to achieve once I'm done, thanks chaps.
Last Edit: 24 Apr 2012 10:14 by Smecky.
The administrator has disabled public write access.

Re:LinuxCNC for low level stepper motor control? 24 Apr 2012 09:38 #19494

  • ArcEye
  • ArcEye's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1335
  • Thank you received: 102
  • Karma: 129
Actually Linuxcnc is based on the RS274 interpreter.
Oops, thats what you get for writing off the top of your head.
Do you have any links to Ed Nisley's articles?
I don't think they are published anywhere on the web, I have some hard copies and a digital subscription to the Digital Machinist.
Unfortunately Eds articles are possibly the best thing about the magazine and I don't think I will be renewing.
There are 'blow by blow' descriptions and there are 8 pages of text where one decent photo would have sufficed and the magazine definitely fits into the latter verbosity model!

I'll try to send you something as a taster John

regards
The administrator has disabled public write access.
Time to create page: 1.153 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.