Which tool is enabled after startup?
-
@taconite said in Which tool is enabled after startup?:
BTW I thought the Duet does only have digital inputs (apart from the Z-probe)
Have you used up all the thermistor inputs?
EDIT: with the analog in idea tools can't change "docking places"
Why not?
-
@dc42 said in Which tool is enabled after startup?:
Have you used up all the thermistor inputs?
oh nope I have some spare you are right
@dc42 said in Which tool is enabled after startup?:
Why not?
Let's say Tool 0 (with resistor Value of 1kOhm) is in Docking Station 1 so when the sensor reads the analog value for 1kOhm Tool 0 is parked in Docking station 1. But what is if I interchange the tools and Tool 1 is no long in Docking Station 1 but 3 e.g. if i want to change the setup and interchange tools (just 5 docking station but 10 tools). With a fixed value this is not working.
With a fixed/non-volatile/remanent variable the printer doesn't care if it is Tool 0 or Tool 1 because it knows what the last tool was it picked up. -
What I meant was to use an analog 'tool loaded' input on the effector using pogo pins, instead of just a switch. That would allow you to tell which tool is loaded.
PS - however, it's also possible to use a single analog input to connect several tool dock switches. Connect all the switches in series, and connect a different value resistor in parallel with each switch.
-
Yeah I understood what you wanted to say its just only working when Tool 1 will always be at docking station 1 because in the SW the resistor value will be assigned to 1 docking station but I would like to make it independent from that.
makes sense, however, I'm afraid I can't fit tool dock switches. That's why I wanted a software solution in the first place.
-
I guess you could use M559 and M29 in the tpost and tfree files to write a short macro file to SD card when a tool is loaded or unloaded. Then run that macro file at the end of config.g.
-
like this?
;in Tpre of T0 M559 P"Toolselected.g" T0 M29 ;in Tfree of T0 (or alternative write "nothing into the file") M30 P"Toolselected.g" ;At end of config.g (maybe this will throw an error if there is no such file) M98 P"Toolselected.g"
-
so this method is not working. After M559 the M29 is not recognized
-
Could s.o. please assist me?
-
@taconite said in Which tool is enabled after startup?:
After M559 the M29 is not recognized
Do you get any error messages or what specifically happens?
what firmware version are you using?
-
@Phaedrux said in Which tool is enabled after startup?:
@taconite said in Which tool is enabled after startup?:
After M559 the M29 is not recognized
Do you get any error messages or what specifically happens?
what firmware version are you using?
@Phaedrux thank you for your reply
when i put the commands into the console the file is created (with 0B) but nothing is written to it. Every command I put in the console is just ignored and not executed. I don't get any error messages:
When I try to delete the file it says that is still open (even after the M29) so i need to shut down the printer:
If I run it in a macro nothing seems to happen. After multiple M29's i get this message:
FW:
Board: Duet 2 WiFi (2WiFi)
Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 3.1.0 (2020-05-15b1)
Duet WiFi Server Version: 1.23 -
@taconite, are you running a Duet in standalone mode, or with attached SBC?
PS - this works for me:
if state.currentTool==0 M560 P"/sys/SetTool.g" T0 <!-- **EoF** --> elif state.currentTool==1 M560 P"/sys/SetTool.g" T1 <!-- **EoF** --> else M560 P"/sys/SetTool.g" T-1 <!-- **EoF** -->
-
@taconite said in Which tool is enabled after startup?:
3.1.0
Upload this zip file to the system tab to update to 3.2
https://github.com/Duet3D/RepRapFirmware/releases/download/3.2/Duet2and3Firmware-3.2.zip
-
Sorry for the late reply. I updated to 3.2. and it seems I found an error - but need to investigate it further.
@dc42 You are correct. This is absolutly working - the file is created. The only thing that is not working - and I kind of feel stupid about it. When I try to run the Macro e.g. M98 - it just says "Changing tool" but nothing is happening. Normally when I just select the tool manually it is set active
-
Any idea why this is happening?
-
@taconite said in Which tool is enabled after startup?:
and it seems I found an error - but need to investigate it further.
What did your investigation turn up?
-
@Phaedrux Oh sry totally forgot about that. I thought I found a bug in 3.2 and rolled back to 3.1.0 but it happens in both.
When the printer is doing a long travel move that is part of the purging it seems like (need to measure it to prove it) the voltage of the power supply is dropping and therefore one GPIO pin of the Duex5 I am using is toggeling from 1 --> 0 --> 1 in a very short period of time and therefore a relay is switched on which is driving the lock mechanism of the tool change.
I reduced the speed of the travel move and now it happens very rarely. That is the only reason I could come up with.But has nothing to do with the original topic (but I thought it may have because I just recognized it when going to 3.2)
But the running of the macro is still not working. It just tells me in DWC "changing Tool" but nothing happens
-
@taconite said in Which tool is enabled after startup?:
When I try to run the Macro e.g. M98 - it just says "Changing tool" but nothing is happening. Normally when I just select the tool manually it is set active
Is the macro exactly like the one shown by dc42?
-
@dc42 said in Which tool is enabled after startup?:
A variable would only solve that if it was persistent between power cycles.
On my tool changer I avoid the need for additional wires and inputs on the main board by using a tool board for each tool, and connecting the dock sense switches to those.
If you have a spare analog input, you could use that for the effector docking sensor, and use different value resistors on each tool.
This is a fun way! How can you read the value of a resistor?
-
-
@Phaedrux
do you have an idea?
btw. the macro "toolchange_set_tool" is called in tfree aswell