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 In




This generic Digital In functionality block (OpFcn Digital In) attaches itself to a specific controller block (OpCtrl) by identifying the Controller Name. It then selects by specifying a functionality number, one of the registered Digital In functionality of the controller (if available) to output the signal back to the model.


Controller NameThe controller name uniquely specified in an OpCtrl block's parameter enables the binding between a specific controller (that has functionalities) and this generic functionality.
Functionality NoThis parameter specifies which functionality of the controller to select.
Activity StateThe digital in functionality may either be ActiveHigh or Active Low.
Sample Time (s)This parameter allows the user to specify the block sample time in seconds. The default value is 0, which specifies a continuous sample time (note that the sample time is borrowed from the separated subsystem) while -1 specifies an inherited sample time. A functionality block and its associated controller block must execute at the same sample time.


This block has no inputs.


The digital in functionality may either be Active High or Active Low. If the controller reads a 1 in a hardware register(e.g. 1 bit), and the digital-in functionality is active high, it will output a 1.0 to the Simulink model; if the functionality is active low, it will output a 0.0. For registers larger than 1 bit, an active low functionality will bitwise-inverse all bits.

Characteristics and Limitations

This block has no special characteristics.

Direct FeedthroughNo
Discrete sample timeYes
XHP supportNo
Work offlineNo

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