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.

PWM In

Description

The PWM In functionality of the OPAL-RT Board driver provides the simulation with the pulse width measurement acquisition data obtained from the digital input channels of the OP5353 modules installed in the simulator.

The driver provides the simulation with each input channel's frequency (measured in Hz) and duty cycle (measured as a fraction of the period) after doing the quick processing of the PWM signals received by the physical modules.

The minimum measurable frequency is 100 Hz.

The duty cycle and carrier frequency are measured using the relation between the rising and falling edges of the input signal. When the input is not switching (for example when the duty cycle is 0 or 1), the PWM In driver cannot establish whether it's the frequency that became slower or the duty cycle that is 0 or 1, until it reaches a supported timeout.
Therefore the equation for the duty cycle is: 

When there is no physical input, the values reported in the model or in LabView panels are around 95 Hz for the frequency and 0 for the duty cycle.

Usage

Once the bitstream configuration file has been parsed, the location of the digital input modules becomes visible to the user. The channels of the modules are grouped into bunches of 8. 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 Detector) for a group of channels.

The user knows if the bitstream offers the feature as soon as its configuration is loaded in the General section of the OPAL-RTBoard 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 is present. If it is not, the functionality is displayed as a non-editable field (i.e. grayed out).

Channel Group Configuration

Enable

Checking this box enables the acquisition of PWM data for the channels in the group once the simulation has started, provided that the type of functionality is set to Pulse width modulated (see item below for more detail).

Clicking Enable also adds the connection points for each of the 8 channels' frequency and duty cycle in the Configuration panel of RT-LAB. This means that if the user wishes to display and/or monitor these two characteristics of the digital signals, connections must be made between points in the model(in the form of OpInput blocks) and the PWM input connectable points.

In order to achieve that, the connection points for each of the frequencies and duty cycles have to be drag-and-dropped onto an appropriate OpInput 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 takes 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 input channels.

To receive PWM inputs, the option Pulse width modulated must be chosen.

Otherwise, if the bitstream is not SDIO-capable, this field will be 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 receiving PWM inputs, please verify that the field displays Pulse width modulated.

Signals Configuration

Channels in pulse width measurement groups do not have any parameters to configure.

Characteristics and Limitations

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

The current version of the pulse width measurement functionality of the OPAL-RT Board driver has the following limitations:

  • For correct functionality, the frequency of the PWM signals has to be between 100 Hz and 190 kHz.

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