Beckhoff First Scan Bit

IF _TaskInfo[GETCURTASKINDEXEX()].firstCycle THEN // Your initialization code here (e.g., setting default parameters) END_IF Use code with caution. Copied to clipboard

PROGRAM MAIN VAR fbFirstScan : TON; bFirstScan : BOOL; END_VAR beckhoff first scan bit

A common practice among developers is to manually declare a global variable that initializes as and is immediately set to after use. Structured Text Example: IF _TaskInfo[GETCURTASKINDEXEX()]

: Clearing OTL (Latches) or variables that must start in a known state. bFirstScan : BOOL