Creating a triggered pulse output
Download as PDFThe Triggered pulse output automation rule watches a measurement and fires a short pulse on an output when the measurement crosses a threshold — for example dosing a small amount of chemical when a pH reading falls below a limit, or triggering a sampler when a water level rises above one.
When the pulse is triggered, the output element is set to 100% for the pulse period you define (0.1 to 10 seconds) and then automatically returns to 0%.
Before you start
Section titled “Before you start”- A sensor element with the measurement that should trigger the pulse, and an output element that should receive it.
- Firmware 3.15.0 or newer on the device that the output belongs to. Devices with older firmware don’t run Triggered pulse output rules.
- Edit permissions on the project.
Create the automation rule
Section titled “Create the automation rule”- Go to v3.consibio.cloud and open your project.
- In the main menu, open Rules and select Automation rules.
- Select Add new automation rule and give the rule a descriptive name, or open an existing rule.
- In Output type, choose Triggered pulse output.
- In Input element, select the measurement that should trigger the pulse.
- In Trigger threshold, enter the value the input has to cross to trigger the pulse.
- In Trigger edge, choose the direction of the crossing:
- Falling edge (default): the pulse fires when the input goes from above the threshold to at or below it.
- Rising edge: the pulse fires when the input goes from below the threshold to at or above it.
- In Output element, select the output that should receive the pulse.
- In Pulse period, enter how long, from 0.1 to 10 seconds, the output stays at 100% when triggered.
- Save the automation rule.
How triggering works
Section titled “How triggering works”The rule only fires on a crossing of the threshold, in the direction given by the trigger edge:
- Two consecutive measurements must lie on opposite sides of the threshold. A measurement that stays on the same side — however far from the threshold — never triggers.
- Every new measurement of the input element is checked in order, so a crossing is detected even if the value only existed briefly — for example the peak an accumulator reaches right before it resets.
- The pulse does not re-trigger while the input stays past the threshold. The input must first return to the other side, then cross again.
- The very first measurement after the rule is created (or after a device is power-cycled) cannot trigger, because there is no earlier measurement to compare against.
When the rule is triggered, the output is set to 100%, held for the pulse period, and set back to 0%. If the input crosses the threshold several times between two runs of the rule, it still fires only one pulse.
Every pulse is recorded in the datalog: the measurement that triggered it, and the output values right before, during and after the pulse are always logged — even when the pulse happens between scheduled logging intervals. The datalog stores one value per second, so a pulse shorter than one second may appear about a second wide. If the output hardware can’t be set (for example because an output module is disconnected), the pulse is not logged on the output.
Battery-powered devices
Section titled “Battery-powered devices”Triggered pulse output rules also work on battery-powered devices that sleep between measurements. The whole pulse is completed within a single wake-up: the device measures, checks the trigger, runs the pulse to completion and then goes back to sleep. The threshold comparison continues from the measurement taken in the previous wake-up.
Troubleshooting
Section titled “Troubleshooting”- The pulse never fires: check that the input element is delivering fresh measurements, and that the measurement actually crosses the threshold between two consecutive readings. Also check that the device the output belongs to runs firmware 3.15.0 or newer.
- The input crosses the threshold, but the output doesn’t change: check that the output hardware — for example the WD Output Module — is installed and connected. The datalog only shows the pulse on the output if the output could actually be set.
- The pulse fires more often than expected: if the measurement is noisy and hovers around the threshold, each back-and-forth crossing can fire a pulse. Move the threshold away from the noise band.
If self-help runs out, contact support@consibio.com.