Continuous rotational axis
-
@MaxGyver You don't have continuos rotation, but you can setup a 2^31 steps long virtual axis, so you can run a stepper for weeks before it reaches the fence.
If you want to change speed or stop it, you should use the DWC command line instead of macros. In Deamon.g you can add the code to react accordingly.
With M669 Snnnn you can set a segment length, which helps interrupting the move faster.Untestet, so use at own risk
//edit I guess the only way to change speed is to change steps/rev with M92. A simple G1 Annnnn Fmmm will probably be overwritten by the main code -
-
Thank you for your suggestions. Unfortunately, I need a way to quickly adjust coolant flow during machining. Typing commands in the command line is just not practical. Furthermore, I would like to automatically adjust the coolant flow rate depending on the loaded tool.
I have ordered another peristaltic pump that uses a 24V DC-Motor instead of a Stepper. My plan is to set it up as a fan in the firmware. This way I have can use the fanslider in DWC to manually adjust coolant flow as well as using gcode to set the flow dependent on the tool.
-
@MaxGyver said in Continuous rotational axis:
Typing commands in the command line is just not practical.
how bout a macro?
-
@Phaedrux Would a macro do it in ”real time”? He needs to use a flow sensor I guess, so probably the 24V DC motor is the best option, and the easiest, too, as the tacho input may be used for the flow sensor...
I think that implementing this for a stepper, would be a nice addon to RRF. -
Unfortunately, the DC peristaltic pump I ordered has far too high flow rate even at the slowest achievable speed. I recon this is why peristaltic pumps with stepper motors exist. The latter allows for super fine and repeatable dosing of fluids... exactly what I need for my minimal lubrication system.
I have tried setting up a simple while loop that would constantly progress the stepper axis while the coolant output is active. But the while loop blocks all other moves and commands until it is completed...
while state.gpOut[2].pwm>0 & iterations<=50 G91 ; relative G0 W{iterations} ; progress W-axis G90 ; absolute echo iterations
It would be super handy if there was a command to just rotate a set a stepper at a certain Speed or RPM. The G0 command for the W axis could be something like G0 Waaa where aaa is the axis max speed set in M203.
-
@MaxGyver If you've got a Duet 3 and running latest RRF 3.5.0-rc.3, you can use the second motion queue for this. See
https://docs.duet3d.com/en/User_manual/RepRapFirmware/Multiple_motion_systems
https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m596-select-movement-queue-numberIan
-
@MaxGyver
1.You may try to use a 3 way valve to regulate the flow ratio? One way , of course would be a return flow, and the other, the working one.
2.Still, the fact that actual flow is so high already, would not help too much to such a setup. In fact, one single flow regulator, and a free return path, may be a better idea. -
Thats a good idea, I could just use the option to choose between for example "Flood" and "Mist" coolant in Fusion CAM to trigger different coolant flow rates for different tools.
My Plan B was to add a needle valve to the coolant line that can be adjusted by a RC-Servo... but the constant clogging problems with the needle valve of my FogBuster send me on this path in the first place.
I have got a Duet 3 6XD and running RRF 3.5.0-rc.3, but did not manage to get the macro working on the second movement queue. The macro is supposed to run when the air solenoid is active ->
state.gpOut[2].pwm>0
but it only stops when the maximum number of iterations is reached.M596 P1 ; select movement queue number M595 Q1 P10 ; lengthen movement queue to 10 elements M564 H0 ; allow movement of axis that have not been homed while state.gpOut[2].pwm>0 & iterations<=30 G91 ; relative G0 W{iterations} ; progress W-axis G90 ; absolute G4 P100 echo iterations
-
@MaxGyver said in Continuous rotational axis:
My Plan B was to add a needle valve to the coolant line that can be adjusted by a RC-Servo... but the constant clogging problems with the needle valve of my FogBuster send me on this path in the first place.
I think a return path is mandatory, unless you adjust the motor speed, especially working with a needle valve. But as this depends on your pump configuration and such stuff...
I do not get how valve clogs, as usually one has some filtering system in place in front of the pump (and maybe another after), but the world is full of wonders...!Tinkery weekend then....
-
@MaxGyver I have updated the FR for this with a reference to this thread:
https://github.com/Duet3D/RepRapFirmware/issues/780 -
@MaxGyver I believe the most time consuming part in your macro is the
echo iterations
line?//edit Just cobbled together my version of your macro, which I made bulletproof with brackets (CNC-mode expressions are different)
Also placed G91/G90 outside of the loop. No need to repeat those lines 30 times, I guess?M596 P1 ; select movement queue number M595 Q1 P10 ; lengthen movement queue to 10 elements M564 H0 ; allow movement of axis that have not been homed G91 ; relative while {(iterations<=30)} if {(state.gpOut[2].pwm>0 )} break G0 W{iterations} ; progress W-axis G4 P100 G90 ; absolute
-