Using Duet 2 and DueX5 just to control motor speeds?
-
I am not sure if what I am trying to do is possible. I have 5 (for now, I would like to use 6 or 8 ) stepper motors working together on a design I am making. This is not a printer, they are free to rotate independently, I just want to coordinate them together, for different effects.
I currently have some Python code running on a Raspberry pi that is calculating a speed for each motor based on inputs from an xbox controller, at the moment it is sending the required motor speeds to an Arduino with stepper drivers attached.
I am hoping to use my Duet 2 with a DueX5 instead of the Arduino. Would it be possible to set up each motor on the Duet 2 + x5 to just run, and continually adjust each of the motor speeds using Gcode? (sent from the Raspberry Pi)
It seems like this might be possible, but I cannot quite figure it out, as most information I am reading is assuming you will be building a printer and need end stops etc. Also I cannot tell from what I read If it is possible to use gcode just to input a speed, without it being linked to a location and an acceleration. All I need is to be able to set the speed of each motor, as all the other calculations are done on the Raspberry pi
Any hints on how to try this are much appreciated!
-
@jasperg
without digging too deep into it, I'd say you can define rotary axes to have continuous moves without limits or endstops.
See M584 R + S param
Fake speed changes would be possible by changing steps/mm for each axis on the fly. You might need a higher 'segments/second' setting in M669 for faster reaction.
But there might also be an 'official' way with G0 X Fnnnn? -
@o_lampe hey thanks for the tip! That sounds like a convincing option. I had pretty much given up on using the Duet, but I'll have one more try. I wonder if changing steps/mm while the motors are running will only come into effect after after an new movement?
-
@jasperg said in Using Duet 2 and DueX5 just to control motor speeds?:
I wonder if changing steps/mm while the motors are running will only come into effect after after an new movement?
That's right, but with the M669 segmentation setting even an infinite track will be chopped into small pieces.
I have good results on a duet2Wifi with 100segments/second and minimum track length of 0.1mm, just to give you a starting point. -
@o_lampe thank you so much for the tips! I am going try this weekend. With our your suggestions I think I would have given up.