FB_BAFApplicationProgram

FB_BAFApplicationProgram 1:

Function-block to start or stop the Application Program. In addition the block provides further, general information to complement the PLC program.

VAR_INPUT

bStartExecution          : BOOL;
bStopExecution           : BOOL;

bStartExecution: Starts the application.

bStopExecution: Stops the application.

VAR_OUTPUT

uiErrorId                : UINT;
iErrorParameter          : INT;
eExecutionState          : E_BAF_ExecutionState;
stApplicationVersion     : ST_BAF_ApplicationVersion;
bFirstCycle              : BOOL;
dtLocalTimeDate          : DT;
dtGreenwichMeanTimeDate  : DT;
lrSunAzimuth             : LREAL;
lrSunElevation           : LREAL;
todSunrise               : TOD;
todSunset                : TOD;

uiErrorId: Contains the error code of the last executed command (see Error codes).

iErrorParameter: Contains the specific parameter of the error code (see Error codes).

eExecutionState: Contains the actual execution state of the application.

stApplicationVersion: Contains the version-number of the application.

bFirstCycle: If the application program switches to the execution state Running, this output is set for one PLC cycle.

dtLocalTimeDate: The local time.

dtGreenwichMeanTimeDate: Greenwich-time (GMT).

lrSunAzimuth: Sun-direction (0° North / 90° East / 180° South / 270° West).

lrSunElevation: Sun-elevation (0° horizontal / 90° vertical).

todSunrise: the calculated sunrise time. For correct calculation the longitude and latitude must be specified (see Project --> Settings --> Location).

todSunset: the calculated sunrise time.