Random Pulse Generator
The Random Pulse Generator node generates a sequence of digital pulses with random ON and OFF durations for all the time the value of the Gate connector is equal to 1.
The random ON time is included between the values defined by the Minimum factor for ON property and the Maximum factor for ON property.
The random OFF time is included between the values defined by the Minimum factor for OFF property and the Maximum factor for OFF property.
Behaviour of Random Pulse Generator
Connectors
| Connector | Type | Description |
|---|---|---|
| Gate | Input | Enables the generation of random pulses while its value is equal to 1. |
| Output | Output | Digital pulse sequence generated by the node with random ON and OFF durations. |
Main properties
| Property | Description |
|---|---|
| Minimum factor for ON | Defines the minimum duration of the ON state. |
| Maximum factor for ON | Defines the maximum duration of the ON state. |
| Minimum factor for OFF | Defines the minimum duration of the OFF state. |
| Maximum factor for OFF | Defines the maximum duration of the OFF state. |
Operation
The Random Pulse Generator works similarly to a continuous pulse generator, but the duration of each ON and OFF interval is not fixed.
While:
Gate = 1
the node continuously generates pulses on the Output connector.
For every pulse cycle:
- the ON time is randomly selected between Minimum factor for ON and Maximum factor for ON;
- the OFF time is randomly selected between Minimum factor for OFF and Maximum factor for OFF.
This means that the generated pulse sequence is not periodic with fixed timing, but varies within the configured limits.
The node keeps generating pulses only while Gate remains equal to 1.
When the Gate input becomes 0, pulse generation stops.
Gate
The Gate input controls whether the node is active.
When:
Gate = 1
the Random Pulse Generator starts or continues generating pulses.
When:
Gate = 0
the pulse generation is stopped.
The Gate input therefore acts as the enable condition of the node.
Random ON time
The duration of the active part of each pulse is selected randomly within the configured ON range.
The ON duration always satisfies the following condition:
Minimum factor for ON ≤ ON time ≤ Maximum factor for ON
For example, if:
| Property | Value |
|---|---|
| Minimum factor for ON | 1 second |
| Maximum factor for ON | 3 seconds |
each ON interval will have a random duration between 1 and 3 seconds.
Random OFF time
The duration of the inactive interval between two consecutive pulses is also selected randomly within the configured OFF range.
The OFF duration always satisfies the following condition:
Minimum factor for OFF ≤ OFF time ≤ Maximum factor for OFF
For example, if:
| Property | Value |
|---|---|
| Minimum factor for OFF | 2 seconds |
| Maximum factor for OFF | 5 seconds |
each OFF interval will have a random duration between 2 and 5 seconds.
Pulse sequence
Each pulse sequence is therefore composed of alternating ON and OFF states with variable duration.
Conceptually:
Random ON → Random OFF → Random ON → Random OFF → …
As long as the Gate remains active, the node keeps producing new intervals with newly generated random durations.
Example
Assume the following configuration:
| Property | Value |
|---|---|
| Minimum factor for ON | 1 second |
| Maximum factor for ON | 3 seconds |
| Minimum factor for OFF | 2 seconds |
| Maximum factor for OFF | 4 seconds |
If:
Gate = 1
the node may generate a sequence such as:
- Output = 1 for 1.8 seconds
- Output = 0 for 3.2 seconds
- Output = 1 for 2.6 seconds
- Output = 0 for 2.1 seconds
- Output = 1 for 1.2 seconds
- Output = 0 for 3.7 seconds
The exact durations are not fixed, but each one remains inside the configured range.
Example - Fixed minimum and maximum
If the minimum and maximum values are the same, the corresponding duration becomes fixed.
For example, if:
| Property | Value |
|---|---|
| Minimum factor for ON | 2 seconds |
| Maximum factor for ON | 2 seconds |
every ON interval is exactly:
2 seconds
The same applies to the OFF interval if the minimum and maximum OFF values are equal.
Typical applications
The Random Pulse Generator is useful whenever a non-regular pulse sequence is required.
Typical applications include:
- simulation of random occupancy;
- pseudo-random activation of lights or loads;
- generation of non-periodic digital test signals;
- simulation of variable activity conditions;
- randomised switching behaviour;
- logic scenarios where fixed repetitive timing is not desired.
Example - Presence simulation
The node can be used to simulate occupancy in a building.
For example, by connecting the output to lighting commands and enabling the node during a selected time range, the Random Pulse Generator can switch the output ON and OFF with variable durations.
This creates a more realistic behaviour than a fixed periodic pulse generator.
Verification through simulation
The Random Pulse Generator can be tested using the Logic Module simulation tools.
A typical test procedure is the following:
- connect a digital value to the Gate connector;
- configure Minimum factor for ON and Maximum factor for ON;
- configure Minimum factor for OFF and Maximum factor for OFF;
- start the simulation;
- set Gate = 0 and verify that no pulses are generated;
- set Gate = 1;
- observe the Output alternating between 1 and 0;
- verify that each ON interval is within the configured ON range;
- verify that each OFF interval is within the configured OFF range;
- return Gate to 0 and verify that the pulse generation stops.
Configuration notes
- Pulse generation is active only while Gate = 1.
- Each ON interval is randomly selected between Minimum factor for ON and Maximum factor for ON.
- Each OFF interval is randomly selected between Minimum factor for OFF and Maximum factor for OFF.
- Make sure that the minimum value is not greater than the corresponding maximum value.
- If minimum and maximum values are equal, the corresponding duration becomes fixed.
- Use this node when a variable pulse sequence is required instead of a periodic one.
- The node generates a digital ON/OFF output.
