Reading status of input pin in roto toolboard
-
Hello,
I have a roto tool board on CAN network communicating with mainboard 6HC. How can I read the status of input pin io2.in in IO 2 of roto tool board?
-
@RockB you can get that information from the object model https://docs.duet3d.com/en/User_manual/RepRapFirmware/Object_Model
-
@RockB to expand on the response from Jay: use M950 with the Jn parameter for your own choice of n (e.g. zero if you have not configured any other inputs) to configure that pin as an input port; then query sensors.gpIn[n] in the object model to find the current value.
-
@dc42 @jay_s_uk I have configured an input using M950 in my config.g
M950 J0 C"20.io2.in"; create input 0 for air cylinder in tool 0
I am not sure how to query sensors.gpIn[0] in the object model. Navigating to the object model plugin in DWC, I see sensors.gpIn is an array but can't see any values
How do I query the sensors.gpIn[0]?
-
@RockB I think your M950 command has failed. Which version of RRF are you using? What happens when you send that M950 command from the console?
-
@dc42 Looks like the roto tool board was running an older version (3.5.0 rc1) of the firmware. After updating the firmware to the latest 3.5.2 everything works as expected.
-
-