Documentation Home Page RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

Event Generator


The Event Generator functionality of the OPAL-RT Board interface, also known as Time-Stamped Digital Output (TSD Output), is used to transmit information describing rising-edge and falling-edge transitions (or events) to be applied to digital output channels of an OP5354 or OP5360-2 module installed in the simulator.

Each transition is described by the ending state of the digital line (0 for a falling edge, and 1 for a rising edge), and the time, relative to the beginning of the calculation step, when the transition is to occur.

The maximum number of events generated for a subgroup of 8 channels is set to 250 in the current implementation.

Note: There can be more than one transition per event (meaning transitions on different channels occurred at the same time).

The number of required transitions per calculation step for each channel is set with the use of the 'Number of events' parameter.


Once the bitstream configuration file has been parsed, the location of the digital output modules becomes visible to the user. The channels of the modules are divided into groups of 8 consecutive channels. By clicking on each group of 8, the user has access to the configurable options of the group.

Bitstreams generated with an RT-XSG version of 3.1.2 or later offer the possibility of using the selectable digital input-output feature (SDIO). The SDIO feature gives the user the option to switch between the type of functionality (either static, PWM or Event Generator) for a group of channels. The user will know if the bitstream offers the feature as soon as its configuration is loaded in the General section of the OPAL-RT Board configuration page.

Verifying that a bitstream is SDIO-capable is done in the channel group configuration section. If the feature is available then a drop-down list will be present. If it is not, the functionality will be displayed as a non-editable field (i.e. grayed out).

Channel group configuration


Checking this box will enable the output of Event Generator data for the channels in the group once the simulation has started, provided that the type of functionality is set to Event Generator (see item below for more detail).

Clicking on Enable also adds the connection points for each of the 8 channels' Events and Timestamps in the Configuration panel of RT-LAB. This means that if the user wishes to control these two characteristics of the digital signals, connections must be made between points in the model (in the form of OpOutput blocks) and the Event Generator connectable points.

In order to achieve that, the connection points for each of the events and timestamps have to be drag-and-dropped onto an appropriate OpOutput block in the Configuration panel of the RT-LAB project.

Connections with LabView panels are also possible.

Digital Type

In case the bitstream is SDIO-capable, this field will take the form of a drop-down list. This list provides the user with the choices for the type of functionality to be applied for the current group of 8 digital output channels.

To produce time-stamped transitions, the option Event Generator must be chosen.

Otherwise, if the bitstream is not SDIO-capable, this field is seen as non-editable. This means that the 8 channels in the current group can only operate with the functionality described in the grayed-out field. For producing time-stamped output signals, please verify that the field displays Event Generator.

Time Unit

If 'Ratio' is selected, a ratio of the time-step size must be provided for the time when the generated transition is to occur.

If 'Second' is selected, the time of the generated transition will be a delay from the beginning of the calculation step, given in seconds.

Signals configuration

Number of Events

This parameter represents the number of generated transitions for each channel. It controls the amount of transition data for each digital output channel transferred from the RT-LAB model to the digital output module at each calculation step. This parameter is used to set the widths of the Events and Timestamps output connection points vectors.

The maximum number of transitions allowed per channel is 250. The maximum number of generated events per subgroup of 8 channels is also 250.

The reason why this field allows up to 250 transitions when the maximum allowed per subgroup of 8 channels is also 250 is the following:

  • Transitions requested by different channels could be occurring as part of the same event (i.e. at the same time), effectively reducing the number of events generated.

As an example, let's say that each one of the 8 channels of the subgroup is requesting 250 transitions. If these transitions will happen at the same time (each channel's first transition occurring at the same time, then the second transition occurring at the same time, etc.) then the overall number of events generated would be 250.

n this case, every event would contain transition information for all 8 channels in the subgroup.



The Event Generator functionality has one global Status input that is provided through a connection point.

0No error.
-2More than 250 events were required to be generated to accommodate the number of transitions requested by the current subgroup.


The interface provides two output connection point vectors for each channel, Events and Timestamps.

The transitions must be described in chronological order, i.e. the first value of each Events and Timestamps vectors corresponds to the first transition to occur on the digital output channel during the next calculation step, the second value to the second transition etc.


Possible ValuesDescription
1Rising edge transition requested

Falling edge transition requested

-1No transition


Possible Values (Ratio)Description
0 <= x < 1Ratio of the time of occurrence of the transition (Ttr) over the duration of the calculation step (Ts). Ttr is the time offset of the transition relative to the beginning of the calculation step where the transition occurred: Ttr = [0:Ts]; and x = Ttr / Ts

No transition

Possible Values (Second)Description
0 <= x < TsDesired time delay between the beginning of calculation step and occurrence of transition
TsNo transition

Characteristics and Limitations

Processing time and amount of data transferred between the digital output module and the CPU increases with the number of events to generate.

For the connector pin assignments, the user should refer to the carrier documentation.

The current version of the event generator functionality of the OPAL-RT Board driver has the following limitations:

  • Limitations will be added as they are found

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | | +1 514-935-2323