Duet 6XD RRF3 Create a Input and Check its Status
-
I have been trying to create an input on io6 using
M950 J1 C"io6 . in" in the config.g file
Then tried to check the status from the console with;
M950 J1
But always get - Pin io6 . in, active, true
I tried changing the state of the input by tying the pin to GND and 3.3V but the message never changes. Also tried to check the status of the input using
M409 K"inputs" but the output is not clear which input I should be looking at on the list.I also tried writing a simple macro
if sensors.gpIn[6].value != 0
M117 "Output should be on"
else
M117 "Output should be off"Not sure is the pin naming in the macro is correct so cannot trust the output of this macro.
In any case there is no change in message from the macro even though there was a change of input.Any help would be appreciated,
Thanks Mark
-
@machinemark you can use the object model browser plugin in DuetWebControl to observe the status of IO pins while you toggle them.
How do you have io6.in wired?
As a test you can connect it to ground with a simple switch.
-
I have tried switching the input to GND, then checking for a change of input from the duet side, then tried switching the input to 3.3 volt looking for a change of state and then out desperation tried switching the input to 5 volt still with no changes. Perhaps my naming or syntax in the macro is incorrect. ie the hardware side is no issue but not sure about the naming. When running M950 in config we declare the pin as J1 ie
M950 J1 C"io6 . in" in the config.g file (The spaces between io6 and the . and in are intentional cause I cannot send this message for the system sees it as a link and blocks it)
But then when we try to check the inputs status in the macro we cannot use J1 - it gives an error.
So triedif sensors.gpIn[6].value != 0
I have looked at the documentation and examples in the forums. I have tried variations but never see any sign of change on the software side. Also tried one of the opto isolated inputs;
M950 J1 C"!io5 . in . iso" -in config.g
But the same problems.
M950 J1 Gives the same message if the opto coupler is powered or not (24 volts at the input. The documentation states 10-50 volt so 24 volt should be safe and sufficient)
Also tried to see a change of state with the above lines in a macro adjusting the input number (or I think cause the naming is different)
Any help in using ie naming etc from a macro would be awesome because the frustration might cause me to see this control board as Frisbee that needs throwing!
Thanks Mark