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 Switch Module

Block

Mask

Description

This controller block (OpCtrl) accesses an Opal-RT Switch Module Board (OP6227) or SM for short. This module features 30 discrete switches, 5 flexible switches, and 1 rotary switch with 4 different configurations and different rail connections.

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 OP6227 Switch 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 theOP6227 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 SM supports 43 OpFcn Digital Switch functionalities and one OpFcnStatusRegister functionality. Please refer to the documentation of the OpFcn blocks for more details on these functionalities.



Note: The OP6227 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 OP6227is standalone.



The following table lists the functionalities available on the module. It also specifies the functionality numbers that must be passed to the functionality blocks to use each switch. Note that the StatusRegister functionality requires no functionality number.

Functionality typeCountFunctionality name (and number)
Digital Switch43Discrete:DS0 to DS29 (0 to 29)
Flexible:FSO0 to FSO4 (30 to 34)
Rotary:RSO0 to RSO7 (35 to 42)
Status register1-

Theory of operation

The switch output of the SM may be described as a software controlled switch. The State input of the OpFcn Digital Switch block is a Boolean and is used to control the state (ON/OFF) of each switch. The State input of the OpFcn Digital Switch block isa Boolean and is used to identify to the current state (ON/OFF) of each switch.

ValueDescription
0The switch is in open state. (OFF)
1The switch is in closed state. (ON)

The Fault acknowledges input of the OpCtrl serves to acknowledge overcurrent in the switch module board. When a fault has been flagged by the OpFcn Status Register, the user inputs this signal to reset the overcurrent status and resume functionality of the board. The acknowledge signal takes the following values:

ValueDescription
0Run: The board functions properly.
1Reset the board: The overcurrent state has been corrected and the board can resume its functions.

Theory of the switches

Discrete Switches

The SM provides 30 discrete switches that can be used to simulate automotive switching applications. A single rail can be assigned for all discrete switches. For modules previous to Rev.2.5, the rail is defaulted to IGN1. For Rev.2.5 modules, the user can utilize the Global Rail for all discrete switches.

Block diagram:

Flexible Switches

The SM provides 5 flexible switches. The distinct quality of these switches is that a variety of rails may be selected for each of the 5 flexible switches. The user is able to assign Global, Batt, ECU5V, or an External Voltage as a rail. The option is also available to disable a switch by selecting the Open rail. Note that for modules anterior to Rev.2.5, the Global rail is replaced with IGN1.

Block diagram:

Rotary Switches

The SM provides 1 rotary switch. The key feature of this switch is that it enables the user to cycle through 8 different digital switches that connect to 8 different systems through a single input. The user is able to assign Global, Batt, ECU5V, or an External Voltage as a rail. The option is also available to disable a digital switch (Open).

Block diagram:

Parameters

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.
Discrete Switches RailPermits the user to select as to whether Discrete Switches are connected to Global Rail(IGN1 for older revision than 2.5 module boards) or Open (disabled).
Flexible Switches Rails

This parameter permits the user to define which rail each of the five (5) flexible switches are connected to through a single row matrix. Flexible switch 0 is the leftmost value and the last one on the right represents flexible switch 4.

As for the rails, values between 0 and 4 represent each available one. The rails are: open (disabled), battery, global (IGN1 for older revision than 2.5 module boards), Electronic Controller Unit (ECU)5 volts output, and external power source supplied by ELCO pin inputs. Their value is respectively 0 to 4.

Rotary Switch Rail

This parameter permits the user to define which rail the rotary switch will connect to.

As for the rails, values between 0 and 4 represent each available one. The rails are: open (disabled), battery, global (IGN1 for older revision than 2.5 module boards), Electronic Controller Unit (ECU)5 volts output, and external power source supplied by ELCO pin inputs. Their value is respectively 0 to 4.

GlobalRail SelectFrom the drop-down list, the user defines a rail as Global Rail. Note that this only applies to Rev.2.5 modules. For anterior modules, IGN1 is defaulted as the Global Rail.
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.

Inputs

Error Ack Rail Over Current: This input is to acknowledge overcurrent faults. This means that if a fault has previously been flagged the controller receives this signal to confirm if it should stay deactivated or if it should resume operation.

Outputs

No Output.

Characteristics and Limitations

Synchronization

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 | opal-rt.com | +1 514-935-2323