On Saturday, 5 March 2022 19:12:45 EST John Dammeyer wrote: > I had to clean off my workbench for another project so the Pi4 has been > boxed for a short while. But in mentioning LCNC to a friend who was > buying a used PC (Intel NUC7i5BNH) that he should download the latest > LinuxCNC Image and run the latency test to see how well it would work > for LCNC. > > I then mentioned I'd had my Pi4 running it but also told him about the > one time latency message I get every time I boot it. That I suspect > it's due to also have the WiFi running in addition to the Ethernet to > 7i92H. > > So that's the background. > > Now the question. > > If LCNC has been ported over to a Pi4 should there even be a latency > issue? It's a fixed hardware platform so that message on start-up has > always puzzled me but since it's just for playing around on the bench > and not doing real machining I've never really cared. > I've been running an old sheldon I rebuilt with ball screws etc. I have beem told that the hardware of the pi does not make use of the isolcpus command in the same manner that x86 hdwe does which may explain my latency testing results being in the 12 u-sec territory which my setup with a 7i90 using the spi interface seems to tolerate very well until I fire up FF while the test is running, and FF is a hog, quickly pushing the latency out to the 200 u-sec territory. However I have run a 50 loop repeat of the lathe_pawn.ngc program, carving air while I browsed the news sites and I can count on one hnd the number of times my lathe actually stuttered in half and hours fooling around.
I used the 7i90 and the spi interface to it, in order to preserve the pi's internet connectivity. The speed of the spi interface is amazing and I watched it on a 4 channel, 350mhz scope for hours trying to spot a com timing error that caused a repeat transmission going either way. It hasn't happened. There has been zero com errors. That protocol uses 3 gpio lines as a serial port, sending data in 32 bit packets to the 7i90, and getting its reply's back, sending and receiving clocks logged as it initializes the card at lcnc startup: hm2_rpspi: SPI0/CE0 clock rate: 41666000/25000000 Hz, VPU clock rate: 500000000 Hz hm2_rpspi: SPI0/CE0 write clock rate calculated: 41666666 Hz (clkdiv=12) hm2_rpspi: SPI0/CE0 read clock rate calculated: 25000000 Hz (clkdiv=20) Note pleaase thats sending at 41.666666 megahertz, and receiver the cards answers at 25.000000 megahertz I'll submit that we do NOT have in the wintel cpu family, a com speed capable of moving data at 10% of that speed/bandwidth product. And has, as near as I can tell, zero effect on network performance while its doing it. So my goal of not sacrificing my network to use a cat5 interfaced card like the 7i92 was quite handily achieved. If it wasn't for the lack of an spi capable interface on the wintel stuff, AND the combined cost of the 7i90HD + 3 7i42TA's, I would have converted every machine here to be run by the rpi4b. Not having tested the 7i90HD fed by a parport, in epp mode so you get all 8 bits per byte, I'll let Peter testify as to whether or not, the 7i90HD, using its 26 pin interface to a pc parport, is as fast AND dependable. I suspect its just as dependable as an epp port can be, but considerably slower. FWIW, I'm using SSD's on usb-3 adapter cables for workspace and swap on that rpi4b, lots easier on the u-sd, and on raspi's buster I can build a realtime kernel in about 35 minutes, and I can build LCNC master from github and install the english of it, in about 75 minutes. About 45 minutes to build a 5.16.2 preempt-rt kernel, but I can't build LCNC, bullseyes python-3.9.2 is to new and breaks LCNC. python-3.7 from a buster install works fine. The other thing that impresses me, is the rpi4b's phenominal uptimes. I have a teeny ups on it and a 20kw nat gas generator in the back yard that fires up in 6 or 7 seconds so it never sees a power failure. Uptimes have been more than 6 months several times. The monitor draws 11 watts, the idling pi about 8 or 9, so I only shut it down to change boot cards. I had LCNC running but doing nothing all the time it took me to type this, shutdown reports latency: task: 409277 cycles, min=0.000056, max=0.017526, avg=0.006107, 0 latency excursions (> 10x expected cycle time of 0.006000s) Draw your own conclusions as to whether its fit to run machinery. Works fine for me. My $0.02. > Ideas? > > Thanks > John Cheers, Gene Heskett. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users