6XD external driver error signal handling
-
@Maestro I'm not a guy.
To be honest, I'm not sure how much I can trust the multimeter readings I got. The meter we have is a bit sluggish to auto-range, and it was refusing to switch out of megaohm range until I switched it off and back on. The problem exists regardless, we should be able to configure the behavior of the error logic on the drives. I'm honestly unsure how NO and NC setups are supposed to work, is the firmware assuming the drives startup un-faulted and adjusts automatically?
-
@curieos Apologies, made an unconscious assumption there.
Well, your alarm wiring is now working aside from the startup blip, which seems to indicate they're NO. Which matches with your multimeter readings. It doesn't seem you would have gotten the alarms to trigger in-use if they were NC. Unless you know something I don't about the firmware-side setup.
As far as how NC vs NO are supposed to work, it seems that the firmware currently knows nothing about NC/NO alarm status; I couldn't find anything about this in documentation. All the firmware knows is that if the error pin deviates from the jumper-pulled logic it's faulted. In both jumper positions, the driver must set the line to the opposite logic to trigger a fault. An NC alarm cannot directly set the line to something else when faulted, because then it's open-circuit and cannot affect the line; an NC alarm sets the line to something else when not faulted. The NC can be made to work with the current firmware (or my understanding of it), but the signal needs to be inverted in hardware.
It's not really a complicated circuit, but for some reason I'm finding it oddly brain-twisty. The possibility remains that I'm utterly wrong...
-
@Maestro the firmware measures the state of the.alarm inputs at power up and assumes that the majority are not signalling an alarm. That's how it determines whether the inputs are active low or active high. However, this will fail if the external drivers have NC alarm outputs but the drivers take a while to initialise and set the alarm outputs to closed. So we may need to add a configuration option to specify the signal polarity.
Does it work if you power up the external drivers before you power up the Duet?
-
@dc42 I did also test with drivers already powered first, but I only had two drivers connected, so based on this majority-rules approach it wouldn't have decided on NC configuration anyway.
I'll test later and confirm whether I get the response you expect. Either way, I do think the ability to set this logic would be a significant improvement, both for the delay in driver boot-up, and for the added assurance that the firmware will not make an incorrect assumption if something goes screwy at startup.
-
@dc42 I did some quick tests and see what you indicate. With 4+ drive alarms closed at startup, all drives are treated as NC. In the middle case of 3-closed 3-open, it prefers NC, and applies NC to all drives.
Not to pile on, but an additional use case for logic selection is mis-matched drivers. I'm currently bench-testing with two NC-alarm drivers, but the final machine will have an additional four external drives. These drives haven't been selected yet, but they definitely won't match the first two, and could end up being NO-alarms. A global logic selection would at least allow selection of which drives you want the alarms to work straightforwardly on. A per-driver selection would be configuration nirvana!
-
-
-
@dc42 Sorry for reviving an old post but I am curious if this feature was added in the latest firmware release?
Thanks!
-
@p8blr this has not been implemented yet.
-
@T3P3Tony Because of this limitation, I don't think the HLFB (high level feedback) signal from Teknic servo motors can be used as an error signal to the duet. The way Teknic handles it, the HLFB pin will conduct (Active-High) when the servo is enabled and not in a shutdown state, but the servo will not be enabled on startup. Because of this, the current firmware will assume Active-Low on startup, and when the servo is enabled, it will trigger a driver-error event.
For Teknic servos (very popularly paired with Duet hardware) the error pin should only be observed when the printer is sending an enable signal and attempting to send move commands.
Are there any solutions in the meantime? I need a way to protect a large printer from potentially damaging itself.
-
@p8blr could you wrie some conditional gcode.logic to handle this in the event macro? So only trigger an event if the driver is enabled?
-
@T3P3Tony Yep, that's what I ended up doing. I spoke with Teknic support and expressed interested in the HLFB wire potentially signaling errors rather than enabled status and they filed my feature request. For now this is my solution: https://forum.duet3d.com/post/346434