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. It is the same with encoder handing. The embedded processor will have a quadrature decode that is done with flip-flops and hardware counters so the software is not involved with the process except to read out the encoder value at the servo loop rate. General-purpose processors like the PC or the Pi4 have to do these functions in software. BTW the ARM CPU inside the Pi does better than one double-precision operation per clock cycle per core. Each core does a bit better than one operation per cycle and these are four cores. Also, these are SIMD instructions. But what beats all this is the programmable hardware on the embedded core. For example, there is a hardware analog comparator. So while the CPU on the ARM-M is technically 40X slower the ARM-M can generate pules in the megahertz range while the Pi4 can't come close. > So as long as you can keep the buffer filled it's the interrupt routine > that places it out to a parallel port. And filling the buffer is the job > of the trajectory planner which does the co-ordinated accel, velocity, > decel for all axis to be able to maintain a specific feed rate in 3 or 4 > dimensions. > > I'd say being able to 10kHz stepping and being happy with that might be > setting the bar very very low. > > BTW, I really do enjoy your videos. > > John Dammeyer > > > > -----Original Message----- > > From: Sam Sokolik [mailto:[email protected]] > > Sent: February-16-20 3:27 PM > > To: Enhanced Machine Controller (EMC) > > Subject: [Emc-users] RPI4 is pretty close to a decent machine control > > solution... > > > > software stepping... > > > > https://www.youtube.com/watch?v=LKjNOVHhHio > > > > Ethernet > > > > https://www.youtube.com/watch?v=2SEB7TuCUR0 > > > > I don't have an spi solution to try.... > > > > sam > > > > _______________________________________________ > > Emc-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/emc-users > > > > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users > -- Chris Albertson Redondo Beach, California _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
