adapnex::core::F_TRIG
Falling edge detector.
Description
The output Q becomes true for exactly one execution cycle when the input CLK transitions from true to false. In all other cases (steady state or rising edge), Q is false.
| Parameter | Type | Direction | Description |
|---|---|---|---|
|
|
Input |
The signal to monitor for a falling edge. |
|
|
Output |
Becomes |
Example: Automatic Feeder
class FeederTask : public Task {
public:
bool exit_sensor = false;
bool load_next = false;
private:
F_TRIG exit_detector;
void Update() override {
// Check if the part has just left the sensor (true -> false).
exit_detector(exit_sensor, load_next);
}
};
|
Triggers maintain state across cycles and must be instantiated as member variables of a task rather than locally within Update(). |