Solved External Trigger Error in RRF 3.5 and Later
-
Hi all,
I'm experiencing strange issues with the external trigger. The trigger is configured with the following command: M581 T3 P1 S0 R0 in the config.g. The pin is configured using M950 J1 C"!1.io1.in" on a Duet3 Exp. 3HC. According to the configuration, I created a macro in the system file folder named trigger3.g.
trigger3.g file in the system folder contains:
echo "trigger3"
Now, when I power up the machine without homing, the trigger works as expected. If the input of Pin1 changes, the trigger is activated, and I get the following output in the console.
Trigger before homing:
So far so good!
But now it gets strange. When I home the machine, the trigger activates multiple times and doesn't shut off, regardless of whether the input at Pin1 changes or not. It’s as if the trigger is stuck in an infinite loop where it keeps getting activated.
Check the console output after the homing files are executed (pay attention to the timestamps):
The trigger activates randomly every second or two (sometimes multiple times per message) without any changes to the input of Pin1. The corresponding GPIO pin in the object model remains stable.I've already checked my homing files for the issue but couldn't find anything unusual; it's a pretty standard homing file.
homingall.g
M98 P"/sys/homex.g" M98 P"/sys/homez.g"
homigx.g
; home Y-Axis M98 P"/sys/homey.g" ; home X-Axis G91 G1 H2 Z10 F800 G1 H1 X-500 F2500 G1 X10 F6000 G1 H1 X-500 F360 G1 H2 Z-10 F800 G90 M400
homey.g
G91 G1 H2 Z10 F800 G1 H1 Y-500 F2500 G1 Y10 F6000 G1 H1 Y-500 F360 G1 H2 Z-10 F800 G90 M400
homez.g
M574 Z2 S1 P"!io3.in" ;Homing Z G1 H1 Z600 F2000 G91 G1 Z-10 F2000 G90 G1 H1 Z600 F800 G91 G1 Z-10 F800 G90 ; BL-Touch G1 X250 Y200 F10000 G1 Z20 F2000 G30 G1 Z150 F2000 M400
Here’s the troubleshooting I've already done:
-
Tried different RRF versions (works as expected in 3.4.6, but the problem occurs in 3.5 and later).
-
Tested a different sensor input, such as the X-axis endstop, to ensure a stable signal (same incorrect behavior).
-
Couldn't find any relevant notes in the changelog on GitHub.
Specs:
-
Duet 3 MB6HC 3.5.2
-
Duet 3 Expansion EXP3HC 3.5.2
-
Duet Web Control (DWC) 3.5.2
Does anyone have any ideas about what might be causing this? From my perspective, it seems to be related to RRF.
Thanks in advance!
-
-
@Bipotronic most likely the wire connected to io1.in is picking up noise, most likely from nearby stepper motor wires. What is it connected to?
-
@dc42 Thank you for your suggestions.
Indeed, the issue was caused by motor currents inducing some noise in the sensor cable.
I followed the procedure I described above and then simply sent an M18 command to disable the motor, and it worked fine. However, when I sent an M17 command to enable the motors again, the issue reoccurred.
I’ve since changed the wiring, and now everything works perfectly.
Thank you so much for your help!
-
-