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.

OpCtrl Resistive Sensor Module




This controller block (OpCtrl) accesses an Opal-RT Resistive Module Board (OP6226). This module allows the user to control 12 resistance values. Each resistance is placed between an input channel and a specified voltage. The module is able to vary the resistance from 0.5 Ohms to260 kOhms, and the termination voltage for each resistive sensor is user-selectable.

The OpCtrl blocks and the OpFcn blocks are designed in order to separate board access and data treatment to and from the boards. The OpCtrlblock attempts to detect an OP6226 Resistive Module board connected to an OP5142 card via a PCI-E link. Once the hardware is detected, the OpCtrl block relays the data to and from the OP6226 board to the OpFcn functionality blocks.

OpFcn blocks are linked to an OpCtrl block through the controller name specified in both the OpFcn and OpCtrl blocks. Since the number and type of available functionalities on each board are different, each OpCtrl block driver registers a set of available functionalities that represent the different components of the board it represents.The OpCtrlResistiveSensorModule supports 12 OpFcnResistiveSensorfunctionalities, one for each input, and one OpFcnStatusRegister functionality.Please refer to the documentation of the OpFcnResistiveSensor and OpFcnStatusRegister blocks for more details on these functionalities.

In addition, the OpCtrlResistiveSensorModule block returns the error statuses (Over Current and Direction Change) of each input. The error condition of an input can be acknowledged with a 0-1 transition of the corresponding value in the inport vector of the block.

Note: The OP6226 board was designed for use in an Opal-RT TestDrivesimulator but it can be used as a standalone module also. Please refer to the Characteristics and limitations section below for important information regarding the synchronization of the model when the OP6226is standalone.


Controller NameThe controller name uniquely specified in an OpCtrl block's parameter enables the binding between a specific controller (that has functionalities)and its generic functionalities.
Use channel specifications outputWhen checked, an additional block output is created. This output produces the minimum and maximum impedance values of each channel along with the available resolution. See Channel specs in the outputs section below.
Sample Time (s)This parameter allows the user to specify the sample time for this block, and its associated TestDrive board, in seconds. The default value is 0, which specifies a continuous sample time (note that the sample time is borrowed from the separated subsystem).

Some rules must be respected:

  • A controller block and its related functionality blocks must share the same sample time.


Error Ack: This inport vector allows the user to acknowledge an error condition on the 12 lines of the module. A 0-1 transition acknowledged the error.


Sensor Error: This outport returns the error condition on the 12 lines of the module. The possible error values are:

Possibles Values Description 
0No error
1Over Current error 
2Change of current direction detected
3OverCurrent error and Change of current direction detected

Channel specs: This optional outport returns the specifications for all the resistive sensor channels. The output width is 36, with3 signals assigned to each of the 12 channels as follows:

Signal Description 
1Channel 0 minimum resistance in Ohms
2Channel 0 maximum resistance in Ohms
3Channel 0 resolution in Ohms
4Channel 1 minimum resistance in Ohms
5Channel 1 maximum resistance in Ohms
6Channel 1 resolution in Ohms
7 to 36...continued for the other channels...

Characteristics and Limitations


The synchronization source of the model will be automatically assigned during the load of the model. Any TestDrive card equipped with an OP5142 board can act as a master or a slave.

Connector Pin Assignments

Below are the lists of signals available on the External Elco-56connector sorted by name and pin numbers.

Signal list sorted by name:

Direct FeedthroughNo
Discrete sample timeYes
XHP supportYes
Work offlineNo

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