Hello Guest it is March 28, 2024, 01:17:11 PM

Author Topic: SmoothStepper firmware for LinuxCNC?  (Read 33698 times)

0 Members and 1 Guest are viewing this topic.

SmoothStepper firmware for LinuxCNC?
« on: October 31, 2012, 12:45:40 PM »
Please forgive that this post pertains to LinuxCNC, not Mach3 - this seems to be 'the' support forum for SmoothStepper, otherwise I'd post it on a non-Mach3-centric place if one was available. :)

Some folks have asked about running SS under LinuxCNC but the answer seems to be that the SS is set up as more of a buffer-type device than a real-time one.  This makes a lot of sense, but given that the SS is basically an FPGA with associated interface circuitry, could a custom firmware be written to support LinuxCNC's requirements?  LinuxCNC does currently support other FPGA products for interface.

It would be nice for those looking for USB- and Ethernet-based solutions for use with LinuxCNC, and if the necessary data was available it might get written by someone in the LinuxCNC community.

Documentation on LinuxCNC's requirements can be found here:

http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Emc2HardwareDesign

You'll notice that it says that nobody has yet written drivers that use the rtlinux Ethernet or USB stacks, but it also doesn't definitely say it won't work, either.

Thanks

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: SmoothStepper firmware for LinuxCNC?
« Reply #1 on: October 31, 2012, 05:52:51 PM »
All the LinuxCNC users i see posting always say the LinuxCNC will never use a USB motion device, because it's not "realtime". They tend to have the belief that if it's not realtime, it doesn't work.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline Jeff_Birt

*
  •  1,107 1,107
    • View Profile
    • Soigeneris
Re: SmoothStepper firmware for LinuxCNC?
« Reply #2 on: October 31, 2012, 07:43:53 PM »
The SmoothStepper is a motion control device all by itself. Mach plans the movements and the SS then carries them out and does all the 'real time' stuff on SS board itself (i.e. homing, limits, probing, threading, etc.) This is similar to how most motion control boards work (like Galil, etc.) but is in contrast to how the LinuxCNC guys think the 'loop has be closed by the controller', i.e. the PC. With an external motion control board the encoder feed back can be used for stuff like electronic gearing, etc but these types of features are done on the motion board NOT the PC. (It does not matter where it is done really but some of the Linux guys 'insist' that it 'has' to feed all the way back to the PC.)

The SmoothStepper could work with LinuxCNC if the motion board were allowed to do what it does best, real time control, and PC was allowed to do what it does best, crunching numbers. LinuxCNC just needs to allow for this type of distributed control.
Happy machining , Jeff Birt
 
Re: SmoothStepper firmware for LinuxCNC?
« Reply #3 on: October 31, 2012, 10:35:35 PM »
First off, thanks for the civil replies.  I half expected to get blasted out of the water for asking my question, and it's great to get 'real' answers instead.

Second, I get what you're saying about external motion control going against LinuxCNC dogma.  I am not actually myself a LinuxCNC user (yet), and its a bit disappointing to hear that they're so set in their ways.  I don't necessarily think that their way is 'wrong', but it would be nice if they'd support both realtime on the PC and on external motion control devices.

Back to my original question though; I'm still not hearing a 'no' :)  Probably sounding less likely, though

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: SmoothStepper firmware for LinuxCNC?
« Reply #4 on: November 03, 2012, 08:23:52 PM »
The SS was DESIGNED and coded to respond to MACH3 motion language. To use it with LinxCNC you would either have to write a plugin for LinuxCNC to inturput the EMC2 motion language and send it to the SS to run OR create new code for the SS that understands the EMC2 motion language. AND you would LOOSE some of the cool features that EMC2 offers as a reatime controller.

There are already COntrollers for LinuxCNC that work similar to the SS.

But as Gerry mentioned the LinuxCNC developement group is NOT a very open minded bunch overall and tend to do things THEIR way or NO WAY regardless of what is an industry standard for most things.

I USE both, along with about a 1/2 dozen more (;-) TP
Re: SmoothStepper firmware for LinuxCNC?
« Reply #5 on: November 18, 2012, 03:03:01 PM »
There is a few big reason why linuxcnc does it that way (realtime within the computer). 

- interface hardware can be 'dumb'.  (which usually means less expensive.)  - mesa has a $200 pci board set that has 5 hardware step generators, encoder counter, +/- 10 volt ouput, 48 i/o and it is very expandable. 
- any new realtime stuff added to linuxcnc is available to all interface cards.  Example - rigid tapping was added a few years back.  All interface cards (even the printer port if you wanted to) can rigid tap.  With mach - it has to be part of the motion card (like smooth stepper)
- Flexible...  look at the youtube videos.  Gear hobbing, robots, all kinds of cool things are being done with it.  The developers are already looking at what needs to be done in linuxcnc3.  (more realtime kernel support...) 

USB's latency doesn't allow for a realtime control loop.  Ethernet seems to be the next interface option for linuxcnc. 

sam
Re: SmoothStepper firmware for LinuxCNC?
« Reply #6 on: November 18, 2012, 06:57:54 PM »
To definitively answer the USB / linuxcnc question:

Yes it can be done:
http://en.araisrobo.com/linuxcnc

This is a forked/patched version of linuxcnc that uses regular USB to communicate to a FPGA card.

Will it be added to mainsteam linuxcnc - almost certainly no.

If USB can be made to work in a deterministic manner so that the control smarts stay in the PC it will be added for sure.

So there you go :)

Chris M

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: SmoothStepper firmware for LinuxCNC?
« Reply #7 on: November 18, 2012, 07:06:52 PM »
That is just Linux talking across usb to communicate with a Mesa motion control card.  In that case the LOOP is close in the servo drive.

(;-) TP
Re: SmoothStepper firmware for LinuxCNC?
« Reply #8 on: November 18, 2012, 07:44:49 PM »
I'm not sure what you are implying.

It's not my project but AFAIK:
The raw gcode is not being sent to the mesa card.
the pc still does the trajectory planing.
They added jerk limited planning, which seems pointless if you are planning on the card.
I'm not sure how it buffers things.
I assume that the positions are sent to the FPGA openloop and it is in charge of closing the loop from there.

Is this not roughly how smoothstepper works?

Chris M

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: SmoothStepper firmware for LinuxCNC?
« Reply #9 on: November 18, 2012, 07:59:43 PM »
With that example the loop is either being closed in the control card or the servo drive but not the computer. LinuxCNC people do not like doing that so it is unlikely to ever be adopted by them.
Hood