FB_IotCommand
The function block FB_IotCommand provides functions for evaluating received commands. It must not instantiated, since it is already declared at the output of the FB_IotCommunicator instance and is used to access the outputs and received commands.
Syntax
Definition:
FUNCTION BLOCK FB_IotCommand
VAR_INPUT
END_VAR
VAR_OUTPUT
bError : BOOL;
hrErrorCode : HRESULT;
bAvailable : BOOL // if true, a new command is available
sVarName : STRING // Name of variable in currently available command
END_VAR
Outputs
Name | Type | Description |
---|---|---|
bError | BOOL | TRUE if an error situation occurs. |
hrErrorCode | HRESULT | Returns an error code if the bError output is set. |
bAvailable | BOOL | TRUE, if a new command is available. |
sVarName | STRING | If bAvailable is TRUE, sVarName contains the name of the variable that was received. |
Methods
Name | Description |
---|---|
Method for accessing the value of the command, if bAvailable is TRUE | |
Method for discarding the currently available command |
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT v3.1.4022.0 | IPC or CX (x86, x64, ARM) | Tc3_IotCommunicator |