Pulse Train Generator
Whenever a rising edge is received on the Input connector, the Pulse Train Generator node generates a sequence of pulses on the Output connector. The duration of the ON state is defined by the Factor for ON property, while the duration of the OFF state is defined by the Factor for OFF property.
The number of consecutive pulses to be generated is defined by the Pulse number property.
When the value of the Reset connector is equal to 1, the node immediately sends the value 0 to the Output connector.
Behaviour of Pulse Train Generator with Pulse number = 2
Connectors
| Connector | Type | Description |
|---|---|---|
| Input | Input | Starts a new pulse train when a rising edge is received. |
| Reset | Input | Immediately forces the Output to 0 when its value is 1. |
| Output | Output | Pulse train generated by the node. |
Main properties
| Property | Description |
|---|---|
| Factor for ON | Defines the duration of the ON state of each pulse. |
| Factor for OFF | Defines the duration of the OFF state between two consecutive pulses. |
| Pulse number | Defines how many consecutive pulses are generated for each rising edge received on the Input connector. |
Operation
The Pulse Train Generator reacts to a rising edge on the Input connector.
A rising edge corresponds to the transition:
0 → 1
Whenever this transition occurs, the node starts generating a pulse train on the Output connector.
Each generated pulse is composed of:
- an ON interval, during which Output = 1;
- an OFF interval, during which Output = 0.
The number of pulses in the sequence is determined by Pulse number.
Conceptually, the node behaviour is:
Rising edge on Input → Generate N pulses
where:
N = Pulse number
The pulse train is started only by a rising edge on the Input connector.
Keeping the input at 1 does not continuously generate new pulse trains.
ON time
The Factor for ON property defines how long each generated pulse remains active.
During this time:
Output = 1
A larger ON factor produces longer active pulses.
OFF time
The Factor for OFF property defines the interval between two consecutive pulses.
During this time:
Output = 0
A larger OFF factor increases the spacing between one pulse and the next.
Pulse number
The Pulse number property defines how many consecutive pulses are generated each time a rising edge is received on the Input.
For example:
| Pulse number | Behaviour |
|---|---|
| 1 | A single pulse is generated |
| 2 | Two consecutive pulses are generated |
| 3 | Three consecutive pulses are generated |
The pulse train stops automatically after the configured number of pulses has been generated.
Reset
The Reset input can be used to immediately stop the generated pulse train.
When:
Reset = 1
the node immediately sends:
Output = 0
This means that any active pulse or pulse train is interrupted and the output is forced to the inactive state.
The Reset input has an immediate effect on the output and forces it to 0.
Example
Assume the following configuration:
| Property | Value |
|---|---|
| Factor for ON | 1 second |
| Factor for OFF | 2 seconds |
| Pulse number | 2 |
When a rising edge is received on Input, the output behaves as follows:
- Output = 1 for 1 second
- Output = 0 for 2 seconds
- Output = 1 for 1 second
- Output = 0 at the end of the pulse train
So one rising edge generates exactly two pulses.
Example - Pulse number = 1
If:
| Property | Value |
|---|---|
| Factor for ON | 500 ms |
| Factor for OFF | 1 second |
| Pulse number | 1 |
each rising edge on Input generates only one pulse.
In this case the OFF time is simply the inactive state following the generated pulse.
Example - Reset during pulse train
Assume that a pulse train is currently being generated and the output is alternating between 1 and 0 according to the configured timing.
If:
Reset = 1
during the sequence, the node immediately forces:
Output = 0
and the current pulse train is interrupted.
Typical applications
The Pulse Train Generator is useful whenever a defined number of pulses must be generated from a single event.
Typical applications include:
- generating repeated commands from one input event;
- driving devices that require multiple pulses;
- generating blink sequences;
- repeating a digital command a fixed number of times;
- simulating multiple button presses;
- triggering other logic nodes with a defined pulse sequence.
Verification through simulation
The Pulse Train Generator can be tested using the Logic Module simulation tools.
A typical test procedure is the following:
- connect a digital signal to the Input connector;
- connect a digital signal to the Reset connector;
- configure Factor for ON;
- configure Factor for OFF;
- configure Pulse number;
- start the simulation;
- generate a rising edge on Input and verify that the configured pulse train is generated;
- keep Input = 1 and verify that no new train starts until a new rising edge occurs;
- return Input to 0 and generate another rising edge;
- activate Reset during a pulse train and verify that Output immediately becomes 0.
Configuration notes
- The node reacts to rising edges on the Input connector.
- The Input signal must return to 0 before a new rising edge can be detected.
- Factor for ON defines the duration of each active pulse.
- Factor for OFF defines the interval between pulses.
- Pulse number defines how many pulses are generated for each trigger event.
- The generated sequence stops automatically after the configured number of pulses.
- Reset immediately forces the output to 0 and interrupts the sequence.
- The node generates a digital pulse sequence.
