Update current value from Sensors.gpIn
-
Hallo,
I installed a hall sensor on a syringe extruder and want to home this. The sensor is present in the Object model as sensors.gpIn. It is activated when the syringe plunger is at it's lowest point and inactive when the plunger moved up. However from a macro I can't get it work when the hall sensor is already activated, i.e. the syringe is homed from a previous run.
Is there a way to update the value of the sensor during the execution of the macro, something like read.sensor.gpIn[] (which I tried and didn't work)
My macro:T0 G1 E-5.0 F200 while sensors.gpIn[2].value=0 G1 E0.01 F100
I also tried to call the second part from within another macro. If the sensor is active while I call the macro, only G1 E-5.0.... is executed.
Can you help me please? I'm using DWC 3.5.0-rc.1 and firmware 3.5.0-rc.1+102. -
@ChristianBP1 are you running in standalone mode or with attached SBC?
-
@dc42 I'm using DWC and an esp32. The board is an Octopus pro. I there an advantage in using an SBC? The machine is still work-in-progress.
-
@ChristianBP1 said in Update current value from Sensors.gpIn:
@dc42 I'm using DWC and an esp32. The board is an Octopus pro. I there an advantage in using an SBC? The machine is still work-in-progress.
It's standalone.
-
@ChristianBP1 Meanwhile I found M409 but have no idea if the response can be used to introduce to new value of the sensor to the macro.
M409 K"sensors.gpIn[3]" F"f"
Maybe paste the result to a variable?
-
@ChristianBP1 You might want to try adding M400 after the extruder moves to ensure they have completed before testing the state of the sensor.
-
@gloomyandy Perfect, that did the trick. Thank you.
-
-