RunOnce
This method can be used to execute an AutoLog group once, for example based on an event in the controller.
Syntax
METHOD RunOnce : BOOL
VAR_INPUT
hAutoLogGrpID: UDINT;
bAll: BOOL;
END_VAR
Inputs
Name | Type | Description |
---|---|---|
hAutoLogGrpID | UDINT | ID of the AutoLog group to be executed once. |
bAll | BOOL | If TRUE, all AutoLog groups are executed once. |
Return value
Name | Type | Description |
---|---|---|
RunOnce | BOOL | Displays the status of the method. Returns TRUE as soon as the method execution is finished, even in the event of an error. |
Sample
VAR
fbPLCDBAutoLog : FB_PLCDBAutoLogEvt (sNetID:='', tTimeout := T#5S);
END_VAR
IF fbPLCDBAutoLog.RunOnce(hAutologGrpID := 1, bAll := FALSE) THEN
; // ...
END_IF