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.

OpFcn Digital Switch

Block

Mask

Description

This block enables the use and configuration of digital switches present on the OP6227 SwitchModule board (Part # 519-0009).

Parameters

Controller NameEach functionality block such as the OpFcn DigitalSwitch block must refer to an OpCtrl block such as the OpCtrl SwitchModule block that will manage the data transfer with the IO board. The binding between OpFcn and OpCtrl blocks is performed via the use of the Controller name that each OpCtrl block uniquely defines. In this case, the controller name could be 'SM' in both blocks. This binding is checked during the initialization phase of the model. If no OpCtrl block is found that defines the same Controller Name as this OpFcn DigitalSwitch block, the OpFcn DigitalSwitch block is simply disabled and returns 0s.

The image below shows an example of a controller name, here 'SM', used with success.

Selection of FunctionalitiesThis field is used to determine which digital switch the OpFcn DigitalSwitch block is tied to. For the example above, the block refers to the discrete switch 0 and drives the DS0 output pin, it has a 0 typed in this field. There are specific numbers that refer to the discrete, flexible, and rotary switches. All are explained in the table below.
Switch TypePin-outsAssign number
DiscreteDS0 to DS290 to 29
FlexibleFSO0 to FSO40 to 34
RotaryRSO0 to RSO735 to 42

ConfigurationFrom the drop-down list, the user defines the configuration (Unconfigured, Active High, Active Low, Open Drain, Open Source) of the switch. Below is an explanation of the different configurations.
A. Unconfigured (1 in RT-Lab parameters panel)Switch is disabled.
B. Active High (2 in RT-Lab parameters panel)When off, the switch will sink the signal to the ground; when on, the switch will source to Rail.
C. Active Low (3 in RT-Lab parameters panel)When off, the switch will source signal to Rail; when on, the switch will sink to the ground.
D. Open Drain (4 in RT-Lab parameters panel)When off, the switch will be open state; when on, the switch will sink signal to ground.
E. Open Source (5 in RT-Lab parameters panel)When off, the switch will be open state; when on, the switch will source signal to Rail.

Inputs

State: This signal gives the information to the switch if it should be ON or OFF.

Outputs

State: This signal gives the information from the switch if it is set ON or OFF.

Characteristics and Limitations

Connector Pin Assignments

The user should refer to the documentation of the IO board or he should see the OpCtrl SwitchModule help page.



Note: Characteristics and limitations of the SM can be found on the OpCtrl SwitchModule help page.



Direct FeedthroughYes
Discrete sample timeYes
XHP supportNo
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