For nerds only: Raspberry Pi for EMC2 controller? - Page 2

Page 2 of 8 FirstFirst 12345 ... LastLast
Results 21 to 40 of 159

Thread: For nerds only: Raspberry Pi for EMC2 controller?

  1. #21
    Registered
    Join Date
    Apr 2010
    Location
    USA
    Posts
    363
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ihavenofish View Post
    the reason im asking is because we have a new 3 axis usb board from taiwan. they wrote mach 3 drivers for it and thus far, reliability seems a non issue (parallel port are NOT reliable in any way in my experience). so it may not be out of the question to ask them to write emc2 drivers that work with the raspberry (and other emc setups) if there isnt a fundamental road block. someone opinion that usb sucks for cnc isnt a roadblock to me.

    its a tiny board, not much bigger than the raspberry, and the 2 combined would make a seriously awesome all in one mini controller for well under $500.

    My thoughts exactly, as far as an affordable controller.

    The more I look into it, the more I think that the ethernet route is probably the better way to go, as it seems that there is a much better consensus that it is a more reliable interface. On top of that, it would seem that it would be much easier to implement on the basis that it uses standard IEEE protocol to talk with the smoothstepper board. I'm not saying the USB is a lost cause, but since things are heading towards the ethernet direction anyways that might be the better way to go.

    Just my .02cents. I don't have the programming finesse to do this on my own. I am simply offering ideas.



  2. #22
    Registered
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    101
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by crane550 View Post
    Realtime Ethernet might be the answer. I think there could be potential for the Tablet option, but that warrants it's own topic. This is about the possibility for R. Pi as a low cost controller.
    The RPi uses a peripheral chip to do the Ethernet. This talks back to the main CPU via USB. So it will suffer the same problems as a USB device.



  3. #23
    Member
    Join Date
    Jun 2007
    Location
    canada
    Posts
    3891
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by crane550 View Post
    My thoughts exactly, as far as an affordable controller.

    The more I look into it, the more I think that the ethernet route is probably the better way to go, as it seems that there is a much better consensus that it is a more reliable interface. On top of that, it would seem that it would be much easier to implement on the basis that it uses standard IEEE protocol to talk with the smoothstepper board. I'm not saying the USB is a lost cause, but since things are heading towards the ethernet direction anyways that might be the better way to go.

    Just my .02cents. I don't have the programming finesse to do this on my own. I am simply offering ideas.
    as mentions, the ethernet is via the usb, plus youd then need an ethernet break out board to talk to the drivers, which while they exist, are all high end industrial gear as far as i know.

    the little taiwanese board is sub $200, and of course there is the smoother stepper, though they dont seem interested in hooking it to linux. (which is why i want to know if theres a more fundamental roadblock).

    granite has been working on rs485 connectivity, which is another option. the raspberry's GPIO can be configured as serial with over 1mb/s banwidth if im not mistaken.



  4. #24
    Registered
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    101
    Downloads
    0
    Uploads
    0

    Default

    Keep in mind, as has already been mentioned, LinuxCNC requires a Real time Linux kernel. This is a modified kernel that allows real time events to interrupt the low level kernel operations. A real time kernel is built for each CPU. It is a non-trivial task to port the kernel to a new CPU. A while back (2 years?), a Beagle Board was given to one of the RTAPI developers to port to, and I don't think it has been completed yet.



  5. #25
    Member
    Join Date
    Jun 2007
    Location
    canada
    Posts
    3891
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ftkalcevic View Post
    Keep in mind, as has already been mentioned, LinuxCNC requires a Real time Linux kernel. This is a modified kernel that allows real time events to interrupt the low level kernel operations. A real time kernel is built for each CPU. It is a non-trivial task to port the kernel to a new CPU. A while back (2 years?), a Beagle Board was given to one of the RTAPI developers to port to, and I don't think it has been completed yet.
    interesting.

    maybe we need a raspberry cnc software kit. something simpler than emc perhaps.



  6. #26
    Registered
    Join Date
    Apr 2010
    Location
    USA
    Posts
    363
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ftkalcevic View Post
    The RPi uses a peripheral chip to do the Ethernet. This talks back to the main CPU via USB. So it will suffer the same problems as a USB device.
    Ah, ok good to know.



  7. #27
    Registered
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    101
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by crane550 View Post
    Ah, ok good to know.
    That doesn't mean it can't be done.

    Most of the discussion from real time purists is that events must happen precisely at the scheduled clock time (latency is typically 5us or so).

    For driving a servo, where you only send updates every 1ms, you can be pretty lax in your updates (not too slow though, or the machine will wander).

    As for real time ethernet, I've been playing around with microcontrollers to act as the client side (LinuxCNC still on a PC, talking RTNET to the client, which does simple GPIOs, encoder counting and PWM generation). When I get time, I'm going to try this with a Beagle Bone.



  8. #28
    Member
    Join Date
    May 2005
    Location
    canada
    Posts
    1662
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ftkalcevic View Post
    A while back (2 years?), a Beagle Board was given to one of the RTAPI developers to port to, and I don't think it has been completed yet.
    Pretty big obstacle. Without that, something like kmotion (dynomotion) for Linux is needed ?
    Someone mentioned that earlier.

    Additional hardware somewhat works against the small/cheap argument. If the user was already inclined to pass control to external board(s) the small/cheap argument has merit.

    Anyone who says "It only goes together one way" has no imagination.


  9. #29
    Member
    Join Date
    Jul 2007
    Location
    Canada
    Posts
    1602
    Downloads
    5
    Uploads
    0

    Default

    Quote Originally Posted by ihavenofish View Post
    and of course there is the smoother stepper, though they dont seem interested in hooking it to linux. (which is why i want to know if theres a more fundamental roadblock).
    As I understand it, Mach does a lot of stuff within the PP driver that you wouldn't necessarily expect to be done there e.g. backlash compensation. Thus Smoothstepper has to duplicate a lot of that functionality within its firmware. This is probably why SS is Mach specific.

    bob



  10. #30
    Community Moderator wendtmk's Avatar
    Join Date
    Dec 2005
    Location
    USA
    Posts
    591
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ihavenofish View Post
    the reason im asking is because we have a new 3 axis usb board from taiwan. they wrote mach 3 drivers for it and thus far, reliability seems a non issue (parallel port are NOT reliable in any way in my experience). so it may not be out of the question to ask them to write emc2 drivers that work with the raspberry (and other emc setups) if there isnt a fundamental road block. someone opinion that usb sucks for cnc isnt a roadblock to me.

    its a tiny board, not much bigger than the raspberry, and the 2 combined would make a seriously awesome all in one mini controller for well under $500.

    When I click on your drivers link, I get an ebay auction for a book. Parallel ports are a lot more reliable than USB ports because the control software can lock the port for only it's use. Timing issues are the biggest problem with USB. LinuxCNC can use the USB ports for things like joypad controls, but you have to use either the parallel port or motion control cards like the Mesa or Pico cards for motion control.

    Mark



  11. #31
    Member
    Join Date
    Jun 2007
    Location
    canada
    Posts
    3891
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by wendtmk View Post
    When I click on your drivers link, I get an ebay auction for a book. Parallel ports are a lot more reliable than USB ports because the control software can lock the port for only it's use. Timing issues are the biggest problem with USB. LinuxCNC can use the USB ports for things like joypad controls, but you have to use either the parallel port or motion control cards like the Mesa or Pico cards for motion control.

    Mark
    cnczone is putting in annoying word ads. are they that desparate from money? :P

    i didnt post the usb board. its somewhere in the xzero thread.

    anyway, you have not answered my question. usb is reliable for cnc, its proven that to me. parallel port is NOT. its proven that to me also, very clearly in both mach and emc2 (though its marginally better in emc2).

    so your opinion aside, what stops emc2 from using usb for control? can drivers not be written at all?





  12. #32
    Member
    Join Date
    May 2005
    Location
    canada
    Posts
    1662
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ihavenofish View Post
    anyway, you have not answered my question. usb is reliable for cnc, its proven that to me. parallel port is NOT.
    From what I grasp (and it isn't much ) USB port is rubbish for the type of data transmission needed for motion control. For these USB boards to work they need to BE the control and in that situation USB is fine. The information they cue up from the motion planner (Mach, Kmotion, whatever) only needs to be transmitted reliably enough, the 'black box' takes care of the time critical stuff.

    Maybe linuxcnc is built in a way that makes accommodating these USB boards difficult. The planner and the control could be inseparable ?
    Or maybe no developer with the skills has an interest in this path.
    In any case it's starting to look like linuxcnc (emc2) won't be a solution for the raspberry pi any time real soon.

    Just my two cents based on nothing but some reading.
    .

    Anyone who says "It only goes together one way" has no imagination.


  13. #33
    Member
    Join Date
    Jun 2007
    Location
    canada
    Posts
    3891
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by cyclestart View Post
    From what I grasp (and it isn't much ) USB port is rubbish for the type of data transmission needed for motion control. For these USB boards to work they need to BE the control and in that situation USB is fine. The information they cue up from the motion planner (Mach, Kmotion, whatever) only needs to be transmitted reliably enough, the 'black box' takes care of the time critical stuff.

    Maybe linuxcnc is built in a way that makes accommodating these USB boards difficult. The planner and the control could be inseparable ?
    Or maybe no developer with the skills has an interest in this path.
    In any case it's starting to look like linuxcnc (emc2) won't be a solution for the raspberry pi any time real soon.

    Just my two cents based on nothing but some reading.
    .
    well yes, the usb cant be use the same way as the parallel, thats obvious. mach3, as i understand it, creates bundles of steps, and sends them out over usb, with board then creating the realtime stream. latency in the usb becomes a non issue as long as theres enough buffer.



  14. #34
    Registered
    Join Date
    Mar 2012
    Location
    UK
    Posts
    22
    Downloads
    0
    Uploads
    0

    Default

    Hi folks. I come at this from the pov as both a programmer of embedded systems (including projects for the ARM), and also as a hobby machinist - I own a Sieg SC4 hobby lathe. I'm considering getting a milling machine, thinking about CNC, and thinking that the Raspberry Pi would make a perfect CNC computer. Put "Raspberry Pi" and "CNC" into search engine and here I am.

    I'd like to comment on some of the things I've been reading here. Now mostly I'm going to be disagreeing (otherwise I wouldn't have been motivated to join), so I hope that doesn't make me seem disagreeable!

    Memory: from the pov of an embedded programmer, 512MB is a humungous amount of memory. You guys are spoiled by your bloated commercial OS.

    I would point out that all the hard stuff can be done on a PC and stored on the SDcard as a data file - a kind of script to follow. All the RPi would have to do is read and write a few PIOs. I would have thought the application should be relatively trivial, doable in a few hundred bytes! Of course we'll need bootstrap and sdcard code on top of that - so call it a few thousand bytes. 512MB? And you think that won't be enough? Sheesh!

    Everyone seems to be assuming that some fancy OS is needed: Android or Linux. What for? If you want real time deterministic operation then the simpler the stuff is between your app and the hardware, the better. We need a couple of device drivers and the app. We don't need a full blown OS, we don't need USB and Ethernet, blah blah, and fact all that stuff could only get in the way. You just have the app itself and a minimal HAL.

    USB is what you use on PCs because you don't have PIOs, and the OS won't let you fiddle with the 2nd best choice - parallel port pins reliably - i.e. you use USB on PCs because you have no other choice. Otherwise it's a terrible choice with little or no control over timing. There is nothing unreliable about parallel ports, it's the bloated OS interfering that makes them unreliable. But still, real PIOs are better than a parallel port.

    To someone who commented on only needing to update position every 1ms. That might be true, but there's a fundamental difference between frequency and precision. How accurately do we need to hit that 1ms mark?



  15. #35
    Registered
    Join Date
    Mar 2012
    Location
    UK
    Posts
    22
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ihavenofish View Post
    mach3, as i understand it, creates bundles of steps, and sends them out over usb, with board then creating the realtime stream. latency in the usb becomes a non issue as long as theres enough buffer.
    Yes, that would make it reliable. Basically in that case the external board is the real CNC computer, USB only being used as a medium to copy the data - not to directly control the operation.

    The RPi board could directly replace the external board... but since data can be copied via sdcard, you can eliminate the USB complication.



  16. #36
    Member
    Join Date
    Jun 2007
    Location
    canada
    Posts
    3891
    Downloads
    0
    Uploads
    0

    Default

    i think you have fully misunderstood the idea here. we dont want to replace an external control board. we want to replace the PC.

    if you cant replace the pc, there absolutely no point to the endeavour because theres already a direct connection to the drives from the pc.

    in any case, the raspberry has to talk to the drives, which has to be done either by usb, or by gpio. given the available usb solutions, they seem the best route to me. it just needs an os that supports it.



  17. #37
    Registered
    Join Date
    Mar 2012
    Location
    UK
    Posts
    22
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ihavenofish View Post
    i think you have fully misunderstood the idea here
    It's clearly you that doesn't understand.

    I said that in the scenario you described, the real CNC computer is actually the external board. The PC just creates the plans and uses USB as a network connection to transfer the program to the CNC computer, which executes it. It would be extremely misleading to think of this as CNC over USB.

    If the Raspberry Pi was used then it would be the real CNC computer and hence would replace that "external board" which you clearly think of as an unimportant peripheral. You would still use a PC to create the program because PCs have a better user interface for that kind of thing. The program would then run on the RPi because the latter has more control over latencies. Data would be transferred via "sneakernet", i.e. on the sdcard.

    Quote Originally Posted by ihavenofish View Post
    . we dont want to replace an external control board. we want to replace the PC.
    Who's we? You can't replace the PC for everything. All the design work will be done on a PC, because a PC is great for that. The RPi would drive the motors, using PIOs, because a PC stinks at that stuff.

    You seem to be wedded to the idea of transferring the program over USB, I'm not altogether sure why.



  18. #38
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default

    so your opinion aside, what stops emc2 from using usb for control?
    From what I've read, it's a fundamental difference in how they think a CNC control should work. The EMC developers are locked into their "realtime" approach, and feel that using an external motion controller is not "realtime", so they won't have anything to do with it.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

    JointCAM - CNC Dovetails & Box Joints
    [URL]http://www.g-forcecnc.com/jointcam.html[/URL]

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  19. #39
    Registered
    Join Date
    Mar 2012
    Location
    UK
    Posts
    22
    Downloads
    0
    Uploads
    0

    Default

    Maybe I came across too aggressive in that last post. I don't want to get involved in some pointless flame war.

    My objective would be to get the PC out of the workshop, not eliminate it from my life entirely. I don't want to buy a full PC dedicated to that one thing, I also don't want to have to cart a PC back and fore, and PCs are no good in the job anyway, especially if they don't have parallel ports any more (which modern ones mostly don't). Laptops while portable would of course be especially no good.

    Now imagine that I have a little box in the workshop next to the mill. When I want to make something I pop an SDcard into that box and click the on switch. The program on the card is created in the comfort of my home using a PC.

    That's the role I have in mind for the RPi.



  20. #40
    Member Tkamsker's Avatar
    Join Date
    Oct 2010
    Location
    Austria
    Posts
    1189
    Downloads
    0
    Uploads
    0

    Default

    Hi
    I will do exactely that.
    I will use reprap 1.4 and Merlin or Sprinter as i use it now.
    I do Same stuff on my 3d printer and i have 2 cnc mills where i will change one to that Concept.
    The Mill has also an toolchanger on it so i hope i can ban pc s soon from my Workshop
    Thomas



Page 2 of 8 FirstFirst 12345 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

For nerds only: Raspberry Pi for EMC2 controller?

For nerds only: Raspberry Pi for EMC2 controller?