Manual tool head swapping, auto configure config need ideas
-
yes that is exactly what i was thing off, unless there is another/better way to do that .
then run some conditional statements to run the correct config for the tool head.
-
@moth4017
There are not many analogue devices in RRF. Thermistors and some Z-probes are the only ones AFAIK.
Just make sure you check for temp-ranges rather than fixed values in your macro. -
@moth4017 If you've got two pins on your connector, and you only have two tools, why not use them as digital inputs? It would make it very easy to run a trigger macro. So pin (a) high would be one tool, pin(b) high would be the other tool, and if you wanted, both pins high could be a third tool. You also have neither pin high which could be used as a forth tool, but probably better to reserve that combination for "no tool present".
-
@deckingman
i was trying to use only one input on the Duet board, but i could use 2 inputs and do some logic for each tool head giving me up to 3 tool heads .Using a PT1000 input i do have the option of 1k to 2k8 in resistance to go from 0C to 500C , should be able to use precision resistors to do 50C intervals .
-
@moth4017 If you decide to go the digital io route, it does give you a lot more flexibility for the future. For example, I use 5 io pins with my jog joystick and only 4 trigger macros which gives me movement in 8 directions at two different speeds. So 16 combinations from those 5 io pins.
-
@moth4017 YOu can do this the simple stupid way by using the slicer. You can add another priter profile or add another filament setting putting all the necessary gcodes in the custom section
Another way is you add another tool in rrf and make sure your custom settings are applied by calling a macro or similar
-
Looks like Stephan from CNC kitchen may have done this wit Duet
https://www.cnckitchen.com/blog/tool-swapping-with-the-whambam-mutant-v2-review -
@deckingman Could you please share your jog joystick macros?
-
@MacKoz said in Manual tool head swapping, auto configure config need ideas:
@deckingman Could you please share your jog joystick macros?
Here you go...
; ******Trigger 5 - Joystick left,right, forward or backwards ******** ; IO Pin to switch connections J5=left, J6=Right, J7=Forward, J8=Backward if state.status != "processing" ; make sure that a print is NOT running G91; Set relative M400; wait for any moves to finish G1 F3000 ; set feedrate to 100mm/sec M118 S"Trigger 5 - Joystick" while sensors.gpIn[5].value=0 | sensors.gpIn[6].value=0 | sensors.gpIn[7].value=0 | sensors.gpIn[8].value=0 if sensors.gpIn[5].value=0; joystick left if sensors.gpIn[7].value=0 ; joystick left and forwards M400 echo "Left and forward" if sensors.gpIn[4].value=0 ; check for long move button press G1 X-20 U-20 Y-20 V-20 else G1 X-0.5 U-0.5 Y-0.5 V-0.5 elif sensors.gpIn[8].value=0; joystick left and backwards M400 echo "Left and backwards" if sensors.gpIn[4].value=0 ; check for long move button press G1 X-20 U-20 Y20 V20 else G1 X-0.5 U-0.5 Y0.5 V0.5 else ; joystick left only M400 echo "Left" if sensors.gpIn[4].value=0 ; check for long move button press G1 X-20 U-20 else G1 X-0.5 U-0.5 elif sensors.gpIn[6].value=0; joystick right if sensors.gpIn[7].value=0 ; joystick right and forwards M400 echo "Right and forward" if sensors.gpIn[4].value=0 ; check for long move button press G1 X20 U20 Y-20 V-20 else G1 X0.5 U0.5 Y-0.5 V-0.5 elif sensors.gpIn[8].value=0; joystick right and backward M400 echo "Right and backwards" if sensors.gpIn[4].value=0 ; check for long move button press G1 X20 U20 Y20 V20 else G1 X0.5 U0.5 Y0.5 V0.5 else ; joystick right only M400 echo "Right" if sensors.gpIn[4].value=0 ; check for long move button press G1 X20 U20 else G1 X0.5 U0.5 elif sensors.gpIn[7].value=0 ; joystick forwards only M400 echo "Forward" if sensors.gpIn[4].value=0 ; check for long move button press G1 Y-20 V-20 else G1 Y-0.5 V-0.5 elif sensors.gpIn[8].value=0 ; joystick backward only M400 echo "Backwards" if sensors.gpIn[4].value=0 ; check for long move button press G1 Y20 V20 else G1 Y0.5 V0.5 else break else break
Not sure what's happened with the formatting here but that fist "while" statement is all one line.Edit - looks fine now...As well as the 4 direction switches, I also have press button which will change the jog length between 20mm and 0.5mm.
Just to break that macro down, the gpios are normally high so there is a while loop which runs (and repeats) if any of the 4 gpios (switches) are low. The first "if" checks if the "left" switch is made. The next "if" checks if the forward switch is also made. The next "if checks if the "fast jog" switch is also made. If all those "ifs" are true then the carriages will move -20 in X and -20mm in Y (note that I have a Core XYUV so I'm actually moving X,Y U and v). The first "else" (that is to say the "fast jog" button is not pressed) will move the carriages in the same directions but only by 0.5mm. The first "elif" checks if the backwards switch is made as well as the left switch. In which case the carriage moves either 20 or 0.5mm but in -X and +Y (left and backwards). Then there is an else which means that only the left switch is made so only move left. That sequence of checks is repeated for the right+forwards / right+backwards / right only combinations. Then two further "elifs" check the remaining forward only (-Y) and backwards only (+y) conditions.
So as long as I hold the joystick, the carriage will continue to jog and while it is jogging I can toggle between 20mm (fast) and 0.5mm (slow) jogs by pressing or releasing the push button. If I release the joystick the macro will end. If I move the joystick say from left to right, the macro will end than immediately start again.
The command in config.g to call that macro is.....
M581 P5:6:7:8 T5 R2 S0
So "making" any one of the 4 switches will trigger the macro.
HTH
Edit. A further, useful embellishment would be to check if the axes had been homed first. As it stands, I could potentially jog the carriages into the frame and do some damage. I did have the foresight to add a condition which prevents the macro from running if a print is in progress but since firmware version 3.2. that is handled by the R2 parameter in the M581 so that check could now be omitted.
-
@deckingman Thank you.