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 Analog Out




This Analog Output functionality block, OpFcnAnalogOut, is used to transfer data to an OP5330 module installed on an OP5130 board.


Controller Name

Each functionality block such as the OpFcnAnalogOut block must refer to an OpCtrl block such as the OP5130 Ctrl 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.

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 OpFcnAnalogOut block, the OpFcnAnalogOut block is simply disabled and returns 0s.

Selection of ChannelsThe block will transfer to the OpCtrlblock the data values to be applied to the channels listed here. With the OP5130 board, the channels numbers are organized as follows: channels 0 to 15 of module A are identified as [0:15], while channels0 to 15 of module B are identified as [1000:1015].


At each calculation step of the model, this block transfers to the OpCtrl block the data provided by the model through the inport vectors. The input values must bein volts and in the range [-17.45, +17.45V]. The OpCtrl block then transfers these data to the Analog Out module.

Two sets of input values must be specified:

  • Pause: Values that will be written to the analog out channels when the model is in pause mode, that is at initialization or when the pause button is hit.
  • Run: Values that will be written to the analog out channels at each time step.

Contrary to other RT-LABAnalog Out blocks, there is no Reset inport because the OP5130 board resets itself to its default state when the model is reset so Reset values could not be retained by the board.

Note: To ensure that the pause values be properly written out, it is recommended to set these values in the model subsystem that contains the OpFcnAnalogOut block, and not to provide them from the console subsystem.


This block has no outputs.

Characteristics and Limitations

Connector Pin Assignments

The user should refer to the documentation of the IO board that holds the AnalogOut module, such as the OP5130 board, for connector pin assignments.

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