Extend shift register PIO code to > 4 axes #10
Replies: 7 comments 5 replies
-
The PIO program step_pulse can handle up to 6 axes but needs additional support code in driver.c for that. This program is used by your BOB and requires all step and direction signals to be connected directly to the MCU. However, I guess you are talking about the the other one that uses a single external shift register supports up to 4, this since both step and direction signals are handled by it. It is not possible to modify this program as the PicoCNC map depends on it as it is now, another is that there is only a few (1 or 2?) instruction slots free for extensions. It should be possible to add yet another that uses two shift registers instead which could then support up to 8 axes. Or perhaps use only one and connect the direction signals directly to the CPU? If using two shift registers it could be a simple as copy the current program and increase the loop count - and define a data structure to match with support in driver.c. |
Beta Was this translation helpful? Give feedback.
-
Had previously opened a “general” discussion N_AXIS=8 and have now fixated on the RP2040/RP2350. The PIO is the primary reason, the as-of-yet untapped resource of a second CPU is secondary. Faith in the RPI folks is the hat trick. HISTORY QUESTION: Why did .program step pulse{} have N_AXIS=6 as a limit. Was something encountered that was beyond resource capabilities, or was it just that no-one expected a need for N_AXIS=8 N_AXIS=8 Implementation Strategy: Presented in the order: best first, worst last…
|
Beta Was this translation helpful? Give feedback.
-
Noticed a couple things about set pins in driverPIO.pio
Net: Would it be Ok to comment out the |
Beta Was this translation helpful? Give feedback.
-
Success on N_AXIS=8!
Swapped in a pico RP2040 Mods from github.com/grblHAL/RP2040 are: Added \grblHAL\RP2040\boards\generic_map_8axis.h in my_machine.h added In driver.jason added two sections in driverPIO.pio .program step_pulse in driverPIO.pio commented out In driver.c modified pio_steps_t to have set:8 and reset:8 typedef union { In driver.c Extended several sections to include axies BCUV Current effort is a fork at github.com/TPMoyer/RP2040 Is there an assessment protocol to demo this is correctly extended to N_AXIS=8, |
Beta Was this translation helpful? Give feedback.
-
Changed mods of driver.c to be only those required by this PR. Added \grblHAL\RP2040\boards\generic_map_8axis.h in \RP2040\grbl\config.h in my_machine.h added In driver.jason added two sections in driverPIO.pio .program step_pulse in driverPIO.pio commented out In driver.c modified pio_steps_t to have set:8 and reset:8 typedef union { In driver.c pio_steps_t; changed In driver.c outputpin[] In driver.c stepper_set_step In driver.c stepper_step_out1 In driver.c stepper_set_dir under #else // DIRECTION_OUTMODE <= GPIO_MAP In driver.c limitsGetState In driver.c settings_changed
In driver.c driver_init The mods to RP2040 are in https://github.com/TPMoyer/RP2040 |
Beta Was this translation helpful? Give feedback.
-
This is an interesting discussion. The one place where I have seen demand for a large number of stepper channels is in the Pick-and-Place groups. The max step rate is one area of concern but perhaps not as big an issue for the PNPers. Note that if you want 8 axes and don't care about individual enables for the steppers, you can easily get to 8 with the RP2350B and no SRs involved. The PNP folks also like a large number of digital I/Os so maybe that is a good role for SRs (input and ouput). |
Beta Was this translation helpful? Give feedback.
-
Is this PR accepted and integrated now? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have dabbled with it, but I am just wondering if there is a fundamental reason we couldn't extend the PIO shift register code to drive additional axes. In my testing the implementation is certainly fast enough to drive high step rates even with double the serial bitload. Feedback that I have gotten is that people really do need 5 axes of motion - this is part of the reason I did the PicoBOB instead of releasing a breakout design based on the shift register (which I have build and basically have working on my bench) implementation, even though I really like this design a lot. Many hobbyists are using moving gantry machines with ganged axes (not just PrintNC, but that is my main area of interest) because these machines are the most space efficient, and they are also easiest to square because the final alignment is done in software. At the same time, people do seem unwilling to commit to a platform that doesn't allow for the future option of a 4th axis.
I am certainly willing to work on the implementation, I am just wondering if there are any walls that I might run into before I dig into it.
Beta Was this translation helpful? Give feedback.
All reactions