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 »

Library

rtlab/Communication/Asynchronous

Block

The OpAsyncRecv block allows a user to receive data from the asynchronous process started by the associated controller.

Figure 1: OpAsyncRecv block

Mask

Figure 2: OpAsyncRecv mask.

Description

The OpAsyncRecv block is used to receive data from the application started by the associated controller. This block simply reads data from the shared memory. After that, the data are available in the model. If a new value is not available, the OpAsync_Recv gives the latest value placed into the shared memory. Refer to the section RT-LAB Asynchronous process of chapter RT-LAB Connectivity of the User Guide for more details.

Parameters

Controller IDSpecifies the controller ID that the OpAsync_Recv block will use.
Receive IDSpecifies the ID of this OpAsync_Recv block. This ID is used as an identifier by the asynchronous program.
Display parameters listMasks or Unmasks the parameters described below.
Float parameter 1 .. 5

Any value entered in this field is available in the asynchronous application by calling the OpalGetAsyncRecvParameters function. These five values are placed in the FloatParam array in the Opal_RecvAsyncParam structure.

EX:
Opal_RecvAsyncParam Param;
int RecvID=1;
OpalGetAsyncRecvParameters(&Param,sizeof(Opal_RecvAsyncParam), RecvID);
printf("The first floating point parameter is %f\n",Param.FloatParam[0]);

String parameter 1 .. 5

Any characters entered in this field are available in the asynchronous application by calling the OpalGetAsyncRecvParameters function. This five string are placed in the StringParam array in the Opal_RecvAsyncParam structure.

EX: Opal_RecvAsyncParam Param;
int RecvID=1;
OpalGetAsyncRecvParameters(&Param,sizeof(Opal_RecvAsyncParam), RecvID);
printf("The first string parameter is %s\n",Param.StringParam[0]);

Inputs

TimeoutA possible timeout value to be used by the asynchronous program via a call to function OpalGetAsyncRecvIconTimeout.

Outputs

ErrorOutputs error values which can be set by the user's asynchronous program via the OpalSetAsyncSendIconError function.
StatusThe user's asynchronous program uses this output to indicate the status of the reception (OpalSetAsyncRecvIconStatus).
DataThe data line contains the values placed into the shared memory by the asynchronous program. It is possible to use a demux block to separate multiple received values.

Characteristics and Limitations

Direct Feedthrough

N/A

Discrete sample time

No

XHP support

Yes (Partial XHP only)

Work offline

No

  • No labels