FB_SetLogicSourceState

This function block offers the option of changing the state of a 'Logic Source'. This is done using the unique ObjectID.
Inputs
VAR_INPUT
bExecute : BOOL;
nObjectID : UDINT;
bState : BOOL;
aLogicSources : ARRAY[ ] OF ST_LogicSource;
END_VAR
Name | Type | Description |
---|---|---|
bExecute | BOOL | The function block is enabled by a positive edge at this input. |
nObjectID | UDINT | Logic Sources' are accessed via the unique ObjectID. |
bState | BOOL | Specification of the desired state. |
aLogicSources | ARRAY[ ] OF ST_LogicSource | Listing of all defined 'Log Sources' in the form of an array. |
Outputs
AR_OUTPUT
eRRCS_ErrorCode : E_RRCS_ErrorCodes;
bBusy : BOOL;
bError : BOOL;
nStatusCode : UINT;
END_VAR
Name | Type | Description |
---|---|---|
eRRCS_ErrorCode | Error code received from RRCS_Servers. | |
bBusy | BOOL | Is TRUE as long as the function block is busy with the query and no error occurs. |
bError | BOOL | Is TRUE if an error occurred during the query. |
nStatusCode | UINT | Servers deliver the status code as a response to every HTTP request. |
FB_SetLogicSourceState has an extended FB_init method in which an instance of FB_RRCScom must be referenced using a pointer:
VAR
fbSetLogicSourceState: FB_SetLogicSourceState_V2(pfbRRCscom := ADR(fbRRCScom));
END_VAR