Timers & Signal Generators
The Adapnex SDK provides a suite of deterministic timing blocks and signal generators. These classes are pure C++, modeled after the IEC 61131-3 industrial standard. Developers with industrial automation experience will find the logic familiar, while benefiting from C++ type safety and deterministic execution.
Overview of Available Blocks
The table below summarizes the timing and signal generation blocks available in the SDK. Detailed timing diagrams, parameter tables, and runnable examples for each block are documented on their respective reference pages linked in the table.
| Block | Type | Behavior Summary | Common Use Case |
|---|---|---|---|
On-delay timer |
Delays the rising edge of a signal by a preset duration |
Sensor debouncing, delayed startup |
|
Off-delay timer |
Delays the falling edge of a signal by a preset duration |
Cooling fans, run-on delays |
|
Pulse timer |
Generates a pulse of fixed duration regardless of input pulse length |
Actuators, ejectors, dispensing valves |
|
Pulse generator |
Emits a single-cycle pulse at periodic intervals |
Periodic data logging, heartbeats |
|
Signal generator |
Generates an oscillating signal with configurable ON and OFF durations |
Flashing indicator lights, reciprocating motion |
Best Practices
-
Task Member Instantiation: Always declare timing blocks as member variables of your
Taskclass. Function blocks maintain internal state across cycles and will reset every cycle if declared locally insideUpdate(). -
Duration Units: Use standard C++ duration literals from
<chrono>(such as100ms,5s, or1min) for preset time parameters (PT,PTON,PTOFF). -
Elapsed Time Monitoring: Inspect the public
ET(Elapsed Time) member on any timer block to monitor how much time has elapsed in the active cycle.