> On Sun, Feb 16, 2020 at 4:12 PM John Dammeyer <[email protected]> > wrote: > > > > > If I do the math. The RISC processors generally run one instruction per > > clock cycle and if that's really true there are 20,000 CPU cycles between > > each step at 50kHz. Coming from the embedded world where I work > that�s > > huge. And generally the trajectory planners create FIFO buffers that hold > > a step and a direction bit for 4 axis in one byte. Each byte, sent out at > > 50Hz, either has a step signal nor not. At the end of the 5uS step pulse > > time as you said, the step levels are set off again. > > > > No. An embedded processor can do much better because thee processors > come > with specialized hardware for generating precision timed pulses. All they > need to do is set a register to control the set rate and then change the > register whenever the rate changes. In LinuxCNC-speak the register > changes each cycle in the servo loop. This way a small embedded > processor would very much beat a large one like what is onside the Pi4. >
> General-purpose processors like the PC or the Pi4 have to do these > functions in software. > That may well be true but on my dual boot LinuxCNC PC I can't do 50kHz stepping while I can with that archaic WIN-XP and MACH3 both off the parallel port. But I think that's really beside the point. What surprises me is that people accept that 32 bit Pi4 really can't do more than about 10kHz stepping. Or even 20kHz and we still have tens of thousands if not more 3 axis G-Code interpretation machines doing 3D printing with 8 bit processors. To be fair, a 10 microstep/step motor (2000 steps per rev) generally can't run more than about 700 RPM before torque falls off so badly that you miss steps so to make an open loop system work that speed limit needs to be adhered to. Which if you are running MACH3 fits just under the 25Khz max step rate. With 20kHz it's 600 RPM. Now it depends on whether the motor is direct coupled or there's a reduction to the lead screw. So it's only with servos and high line count encoders that the higher step rates are required. And I can say with personal experience dealing with encoder pulses in software and doing floating point to recalculate speed that tracks a spindle is really difficult without hardware counters. A BeagleBone Black has two quadrature counter inputs. I don't know if the Pi processor has a quadrature counter. I think some of the Arduino based processors also have a quadrature based counter so things are possible that in the past required an external quadrature encoder chip. I still have a tube of 5 of those collecting dust. They were used with two encoders to track drill rig heave on ocean swells and tides. To prevent driil bit from being lifted up and down and smashed. As the drill ship platform rose up the cable holding the drill string would let out to keep the same load on the turning drill bit. As the water went down the drill string winch pulled the string up again for the same reason. The second encoder was connected to a drum which had a cable connected to the ocean floor. Essentially measuring the height of the drill ship above the ocean bed. John _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
