How to read state of servo/output/input pins
-
Many thanks for both of you, based on these I was able to find those pins and get to read the values for example with echo command on the Console. Also, I created a macro for manual datalogging of these values and used in it M929 to initiate data logging on SD card as csv file and specified the measured channels using M118.
This on-demand recording was useful, but I would also like to monitor these same values online on the web interface.
How could I add these values to be shown continuously on the screen, for example in Status bar, like Machine position/Extruder drives/Speeds/Sensors? This would help me to monitor finding out problems with trigger signals, which are only short-term and not occurring long-term.
With best wishes, Heidi
-
@HeidiH you could use the plugin BtnCmd https://plugins.duet3d.com/plugins/BtnCmd.html
-
I can highly recommended the BtnCmd plugin that jay_s_uk referenced.
I use it on all of my printers.
If you are using RRF firmware 3.4.x the version of BtnCmd is a bit out of date and no longer maintained as the author (a fine person and a blessing to all mankind) is focusing on RRF firmware 3.5.x which necessitated changes to BtnCmd.
Despite the quirks in the BtnCmd 0.10.15 it is a wonderfully useful tool and I would not want to be without.
Frederick
-
@fcwilt @jay_s_uk Many thank you, and my apologies for the delayed response on this topic.
Yes, I agree that this BtnCmd plugin is great, really like it! Thanks both for you for letting me know about this. I have it now working and it helps a lot. I updated my duet firmware to the newest version and chose appropriate newest BtnCmd version for that.
I would have another question, a bit related to this inputs and output for Duet 3 (RRF firmware 3.4.6). I would like to double check if I can use input pin and output pin of same io header to have input from an external device and to send output for this device. I have electrically isolated the Duet board and the external device with semi conductor relays. However, I use the same ground for both input and output.
-
-
@HeidiH See https://docs.duet3d.com/Duet3D_hardware/Duet_3_family/Duet_3_Mainboard_6HC_Hardware_Overview#inputoutput
Except as noted in the table below, an IO_x_IN pin can always be used to provide a digital input (e.g. for endstop inputs or filament monitors), and an IO_x_OUT pin can always be used to provide a digital output.
IO output pins can be used as inputs, but are only 3.3V tolerant. IO input pins can be used as outputs, but have 10K protection resistors in series with them, so you would need to bypass these to use them as outputs.
Ian
-
@droftarts @dc42 Thank you for your responses. I was again possible to continue with these. Now we are aiming to use Duet 6HC board to switch on and off our device requiring 24Vdc. Does the board have this property?
-
@HeidiH It really depends on how much current your 'device' draws. The heater outputs are wired (and fused) for 24V (or rather VIN, ie whatever voltage PSU you are using). The bed heater output has it's own supply input, and the screw terminal and fuse are rated at 15A. The three heater outputs OUT1, OUT2 and OUT3 are rated at 6A. The fan outputs can also be run on 24V, but the connectors mean that they are limited to 2A total. There are also other IO pins that switch to ground that can be used, if you supply your 'device' with 24V directly, but these are also generally limited to 2A because of the connector, and would not have the benefit of a fuse.
If it is a particularly high current device, you can also control an external Solid State Relay from the OUT or IO pins; see https://docs.duet3d.com/en/User_manual/Connecting_hardware/Heaters_bed#bed-heater-driven-using-a-solid-state-relay
Ian
-
@HeidiH the OUT ports are open-drain mosfets. If you are looking to interface to a PLC then they are like NPN outputs. The IO_OUT ports are 3.3V only.
The 6XD board has additional features designed to make interfacing to 24V PLCs easier.
-
@dc42 @droftarts Thank you again very much! Our device had a current draw of 100 mA only, and based on your advices we were now able to start using OUT 4-6 for our 24V devices. What a great feeling, thank you for excellent support!
-
@dc42 @droftarts I would still again have another question related to IO headers (1-8).
We have at the moment 3.3V output in our input pin, but we have not aimed to this.
We have supplied 5V input voltage for this input, so does this have made our input pin to act like as an output continuously?
Is it possible to return the stage of the input pin back as input?
-
@HeidiH said in How to read state of servo/output/input pins:
We have at the moment 3.3V output in our input pin, but we have not aimed to this.
All io_in pins have a pullup resistor to +3.3V. Is this what you are measuring?
-
@dc42 Yes, great. it is that. We solved the issue by using a semiconductor relay allowing to provide external trigger for our Duet 3 board input, in which we chose the active-to-inactive stage change. Thanks again!