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.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Block

Mask

Description

The RCP Analog In block is used to return analog input acquisition data obtained from the analog input channels at specific instants of timestep. This block is used to acquire an analog signal in synchronization with the PWM signal. In that way, it performs periodic acquisition with four (4) microseconds of precision during the timestep.

Parameters

Controller NameBind this block to an OpCtrl block by entering the same 'Controller Name' as specified in the OpCtrl block The OpCtrl block controls initialization of the settings of one specific Opal-RT card (OP5142/ML605/OP7160) in the system.
DataOut port numberEnter the number of the DataOut port to be controlled by this block, in the range [1:32].
Slot infoThis non-editable parameter displays the physical location of the analog input channels related to the selected DataOut port, as obtained from the parsing of the configuration file.
Maximum number of AIn channels controlled by this blockThis non-editable parameter displays the number of channels in one sub-section listed in the configuration file.
Number of AIn channelsEnter the number of channels for which data values will be returned at each calculation step. This number must be less than or equal to the value of the 'Maximum number of AIn channels' parameter. The data transfer mechanism between RT-LAB and the OP5142 does not allow the selection of individual channels in the sub-section of channels. The data returned by the block will thus correspond to the N first channels of the sub-section, where N is the value of the 'Number of AIn channels' parameter.
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.


Inputs

This block has one 1 input.

SyncDataThis input retrieves the synchronization vector that will be used to generate the conversion signal. The first data is the period of conversion, the second is the instant of the first conversion. Some cases, we could have a third data for the second instant.

Outputs

This block has three 3 outputs.

VoltsThis output returns the acquisition data, in Volts, of the subset of channels selected. The voltage range supported by the channels of the OP5340 module is [-16; +16] volts.
UpdateThis output returns 1 when the output voltage is newly acquired; otherwise, it is 0.
StatusThis output returns the following values:


ValueDescription
0No error.
-1

Block could not be matched with an OpCtrl OP5142EX1 block (check the 'controller Name' value), or OP5142 card initialization problem.

-2Data reception timeout. This error can be caused by model synchronization errors,
-3

Data reception error: the block received fewer data from the OP5142 card than the value specified in the 'Data outport width' parameter. Missing data were replaced by 0.

-4

Data reception error: the block received more data from the OP5142 card than the value specified in the 'Data outport width' parameter. Extra data were discarded.

Characteristics and Limitations

Connector Pin Assignments

The user should refer to the documentation of the OP5220 carrier for connector pin assignments.

Direct FeedthroughNo
Discrete sample timeYes
XHP supportYes
Work offlineNo
  • No labels