6HC Trigger spot check
-
Hi all. Need a bit of help spot checking the following as we haven't done much with triggers before now.
We are using 6HC mainboard running 3.4.1 with attached SBC.
What we are trying to do is create a trigger on io3.in that is normally open and triggers on closed.
As a test, I have a simple trigger2.g file that just pops a message up. I can invoke this by calling M582 T2. The button is wired between 3.3v and io3.in as explained here: https://docs.duet3d.com/en/User_manual/Connecting_hardware/IO_E_stop
Here is the trigger definition in our config.g
M950 J1 C"io3.in" M581 P1 T2 S1 R0
As you can guess, this isn't working. trigger2.g is not invoked when the switch is closed.
Any assistance would be appreciated on what we are missing here. Thanks!
-
@oozebot said in 6HC Trigger spot check:
trigger2.g is not invoked when the switch is closed.
Try this instead:
M950 J2 C"^io3.in" M581 P2 T2 S0 R0
This assumes that you close the switch to ground.
-
@infiniteloop Thanks. So would the wiring change?
-
@oozebot said in 6HC Trigger spot check:
So would the wiring change?
Sorry, didn't spot that detail in your OP. The problem with pulling the signal to 3.3v, i.e. "up", is its potential instability if not activated. That's why I prefer to use the internal pull-up (the caret "^") and use active-low as trigger. But you can try to fix this in your setup first:
- remove the caret, it's counter-productive
- try to invert the signal by replacing the caret with an exclamation mark
- replace the S0 in
M581
with S1
… all combinations of 2. and 3. permitted
-
@oozebot I wouldn't be using normally open as they are susceptible to noise so could be triggered without the switch being pressed. Normally closed is the preferred wiring method all day long
-
So no luck with this yet.. really surprised we're having this much difficulty. To clarify, the connection is between 3.3v and io3.in. Inverting the signal didn't do it, nor did S0/S1. We even tried bypassing the switch to rule it out.
-
@jay_s_uk unfortunately the device we are wiring in is only sold as normally open..
-
-
@oozebot I have a DC UPS and use one of it's internal contact switches to trigger a couple of macros. I can't remember exactly if the contact are NO or NC but looking at my config, I'd say they must be NO. Anyway here is how I have it configured.
M950 J1 C"^0.io3.in" ;Main board io3. M581 P1 T2 R0 S0; Run macro trigger2 on high to low M581 P1 T3 R0 S1 ; Run macro trigger3 on low to high
If the internal pull ups are enabled then I'm fairly sure that I must have wired it between the io pin and gnd - otherwise it'll switch between 3.3v via the internal pull up and 3.3v via the 3.3 v pin which is no different (so it would never change state).
It shouldn't make any difference but note that I always prefix the io pin with the board number so in the case of the main board, I use "0" - hence "0.io3.in". My understanding is that if no board number is stipulated, then board 0 will be the default but I've been caught out before when default behaviour changes due to some firmware modification or glitch, which is why I never rely on default settings if I can possibly avoid doing so.
-
Got it! Switched the wiring between io3.in and ground with internal pullup.
Thanks all - that was driving me crazy. FYI - we are wiring in BlazeCut fire suppression systems with NO switch. We'll be using the switch to both do an emergency stop as well as trigger custom code on the RPI to alert the end user of the issue.
-
@oozebot said in 6HC Trigger spot check:
as well as trigger custom code on the RPI to alert the end user of the issue
You think the clouds of CO2 won't be a fair alert?
Please tell me you're not using dry powder.
Yes, it'll save the house, but having had to repair a CNC cutting system after a dry powder extinguisher is used, I'd just drop the printer in the bin
Amazing how invasive and corrosive that stuff is. -
@owend Here is their website: https://blazecut.com/t-series/
edit - Once they pass all our testing, we will also be a dealer and keep several sizes of these in stock.
And here is a pic of it mounted across the top of one of our printers.
-
@oozebot Also for info - when I built my printer "booth", I installed a "Clean Agent" (also known as FE36) fire extinguisher which will fill the chamber with an inert gas if the temperature should exceed 79 deg C. I didn't much fancy the idea of relying on any kind of electronic switching which might go off inadvertently and at best dump the expensive contents unnecessarily or at worst asphyxiate me
.