Reading general-purpose inputs in Duet Mini 5+ returns null?
-
Hi all,
Just started using Duet/RRF for the first time, and am working on homing routines for a dual head PnP machine.
I'm trying to read a general purpose input (not an endstop) in the Z axis homing G file, in addition to reading it via DWC.
In DWC I'm using "M409 K"sensors.gpIn[0].value" which just returns null, as below. If I try to return the whole list of inputs, I get null too. This leads me to believe I need to configure the inputs, but can't see any M code to do this.
{ "key": "sensors.gpIn[0].value", "flags": "", "result": null }
Trying to run the below in a script, returns "G28 Z
Error: in file macro line 7 column 4: meta command: array index out of bounds
Error: Homing failed"Again the out of bounds error implies I'm accessing a sensor in the list of gpIn sensors, that doesn't yet exist because I've not configured it.
G91 ; relative positioning if sensors.gpIn[0].value = 1 G1 H1 Z-105 F100 ; move Z down until the endstop is triggered else G1 H1 Z105 F100 ; move Z up in this case G92 Z0 ; we're zeroed now, so set this position as Z0
Appreciate any steer on this, I'm sure it's something simple - either need to configure the inputs, or a syntax error on my behalf...
-
-
@jwilo
You should prolly add the config to see what youre working with. -
-
@wayneosdias said in Reading general-purpose inputs in Duet Mini 5+ returns null?:
@jwilo
You should prolly add the config to see what youre working with.For reference, for anybody interested - @wayneodias and I resolved this over at https://groups.google.com/g/openpnp/c/qxq_8FXAPTI whilst I was waiting for my account to become fully active
-
-
@jwilo I'm glad you were about to solve it. Please post again in a new thread if you require help on any other configuration issues. I monitor the OpenPnP group but as my primary function isn't support, I don't look at it every day.
-
@dc42 Thanks! I've only been using Duet for a couple of weeks now, but I'm really impressed with what yourself and the team have put together.