Re: [Emc-users] Linuxcnc on arm (scheduling)
On 10/16/2016 11:47 AM, Chris Albertson wrote: > On Sun, Oct 16, 2016 at 1:13 AM, Nicklas Karlsson < > nicklas.karlsso...@gmail.com> wrote: > >> . >>> The master board sends the latch command on the parallel >>> port bus to other boards on the bus, as well as the >>> computer. The computer would have the luxury of responding >>> before the next timer tick, nominally 1 ms. > Yes, this is how to do it but it requires two processors >1) a big machine like a PC (or ARM cortex-A) that runs most of LinuxCNC >2) A much smaller real-time processor that actually moves the signals > between #1 and the machine tools > > You said a "latch" would work. It would but only in the simple case of a > parallel output port.You need to also worry about other kinds of data, > maybe even serial data or PWM . Also the data might not be going over > parallel port. It might be Ethernet or USB. New computers lack parallel > printer ports. The Pico Systems PPMC was developed in 2001/2002, and follows closely what others have done for real time control. You latch the machine state (encoder position) at one tick of the timer, the computer computes new velocities, and the new velocities take effect when the timer generates the next tick. The PPMC, Universal Stepper Controller and Universal PWM Controller all use FPGAs, so they are quite a bit more real-time than a CPU. Our FPGA takes the place of the real-time processor. Yes, USB has its own real-time clock, and won't submit to anybody else's idea of real time. Ethernet can work, but it is a lot of trouble. You can put a parallel port in any computer that has a PCI or PCIe slot. We have found that not all plug in parport cards work, though. > In a modern factory they have the computers in racks and maybe 100 meters > of cable going to the machines. So I think yo might want to allow for a > large physical distance between #1 and #2. Pretty rare to have CNC controls 100m from the machine. > I think the above is pretty much how the FPGA in the Mesa cards works. The > PC sends data and parameters and the card generates waveforms and meters it > out in real time. > Yes, but we've been doing it before Mesa was in this business. Jon -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Linuxcnc on arm (scheduling)
On Sun, 16 Oct 2016 09:47:26 -0700 Chris Albertson wrote: > On Sun, Oct 16, 2016 at 1:13 AM, Nicklas Karlsson < > nicklas.karlsso...@gmail.com> wrote: > > > . > > > The master board sends the latch command on the parallel > > > port bus to other boards on the bus, as well as the > > > computer. The computer would have the luxury of responding > > > before the next timer tick, nominally 1 ms. > > > > Yes, this is how to do it but it requires two processors > 1) a big machine like a PC (or ARM cortex-A) that runs most of LinuxCNC > 2) A much smaller real-time processor that actually moves the signals > between #1 and the machine tools Execution of the Linuxcnc thread do not have to be accurate in the short time, arrival time of received packets could be averaged. For 100 receive times and full period jitter average would be within 1 percent of the computer clock triggering thread. I have been thinking about running the real time part of linuxcnc on a cheap small computer without user interface and run user interface on ordinary computer. NML should already have support for this but I did not yet get time to try it. I am still working on the drivers. One reason for this is the cheap small computers available nowadays, it would also remove real time demands from the user interface computer and add possibility for "remote" control. -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Linuxcnc on arm (scheduling)
On Sun, Oct 16, 2016 at 1:13 AM, Nicklas Karlsson < nicklas.karlsso...@gmail.com> wrote: > . > > The master board sends the latch command on the parallel > > port bus to other boards on the bus, as well as the > > computer. The computer would have the luxury of responding > > before the next timer tick, nominally 1 ms. > Yes, this is how to do it but it requires two processors 1) a big machine like a PC (or ARM cortex-A) that runs most of LinuxCNC 2) A much smaller real-time processor that actually moves the signals between #1 and the machine tools You said a "latch" would work. It would but only in the simple case of a parallel output port.You need to also worry about other kinds of data, maybe even serial data or PWM . Also the data might not be going over parallel port. It might be Ethernet or USB. New computers lack parallel printer ports. In a modern factory they have the computers in racks and maybe 100 meters of cable going to the machines. So I think yo might want to allow for a large physical distance between #1 and #2. I think the above is pretty much how the FPGA in the Mesa cards works. The PC sends data and parameters and the card generates waveforms and meters it out in real time. -- Chris Albertson Redondo Beach, California -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Linuxcnc on arm (scheduling)
> >> ... It looks like it might > >> be easier with the uspace / rt-preempt kernel than with > >> rtai. It would reduce latency/jitter to ns levels. If you build the system so that within servo period is OK things will get a lot easier and will fit with ordinary theory fo real time scheduling, dead time equal to period. > Yes, actually, it WOULD. All the Pico Systems motion > control boards can latch the position when the internal > timer ticks. ... This is the way to do it. > ... > The master board sends the latch command on the parallel > port bus to other boards on the bus, as well as the > computer. The computer would have the luxury of responding > before the next timer tick, nominally 1 ms. This is a good way to get it synchronized a hardware 1kHz signal and the full 1ms period left for software jitter software. > As long as the computer never took more than the timer > period to complete its work, it would never cause ANY > latency at all! The computer's updated velocity info would > not become effective until the next timer tick. Then you use EDF or rate-monotonic scheduling it will make a perfect fit with the theory. > Jon -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users