FB_IotFunctions_Request

The function block enables the synchronization of multiple messages (see Synchronizing message operations).
Syntax
FUNCTION_BLOCK FB_IotFunctions_Request
VAR_INPUT
iotFunctionsDriverOTCID : OTCID;
nRequestTimeout : UDINT;
END_VAR
VAR_OUTPUT
hResult : HRESULT;
pStRequestDetails : POINTER TO ST_IotFunctionsRequest;
bInitialized : BOOL;
fbTcResultEvent : FB_TcIotFunctionsResultEvent;
END_VAR
Inputs
Designation | Type | Description |
---|---|---|
iotFunctionsDriverOTCID | OTCID | OTCID of the target IotFunctions driver instance [defaults to the first created object of the FB_IotFunctions_Connector] |
nRequestTimeout | UDINT | Timeout value in milliseconds |
Outputs
Designation | Type | Description |
---|---|---|
hResult | HRESULT | Contains the hresult of the last message (is updated when bBusy or bError is accessed or Create/Execute/EnqueueRead/EnqueueWrite is called) |
pStRequestDetails | POINTER TO ST_IotFunctionsRequest | Pointer to structure containing details information about the underlying request |
bInitialized | BOOL | Indicates whether interface search and initialization was successful |
fbTcResultEvent | FB_TcIotFunctionsResultEvent | Instance of a helper function block that contains detailed information about the send or receive process. |
Methods
Designation | Description |
---|---|
Creates a new request | |
Adds an instance of FB_IotFunctions_Message for read operation | |
Adds an instance of FB_IotFunctions_Message for write operations | |
Executes the request | |
Acknowledges the error/success status and releases the associated message objects. Call this method after status acknowledgement if no new read/write process is started in this cycle to prevent multiple evaluation of the last status. |
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT v3.1.4022.14 | IPC or CX (c86, x64, ARM) | Tc3_IotFunctions |