ADSCLEAREVENTS
The function block permits the sending and the acknowledge of messages to the TwinCAT Eventlogger.
VAR_INPUT
VAR_INPUT
NETID : STRING(23);
bClear : BOOL;
iMode : UDINT;
tTimeout : TIME;
END_VAR
NETID : Is a string containing the AMS network identifier of the target device to which the ADS command is directed.
iMode : Mode to delete the events. Defined in the enum E_TcEventClearModes.
TMOUT : States the time before the function is cancelled.
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bErr : BOOL;
iErrId : UDINT;
END_VAR
bBusy : Is TRUE as long as the action is executed. In this time no new command is possible.
bErr : This output is switched to TRUE if an error occurs during the execution of a command. The command-specific error code is contained in ‘iErrorId’. If the block has a timeout error, ‘bErr’ is TRUE and ‘iErrorId’ is 1861 (hexadecimal 0x745). Is reset to FALSE by the execution of a command at the inputs.
iErrId : Contains the command-specific error code of the most recently executed command. Is reset to 0 by the execution of a command at the inputs.
Requirements
Development environment | Target system type | PLC libraries to include |
---|---|---|
TwinCAT v2.7.0 | PC or CX (x86) | Standard.Lib, PLCEvent.Lib, PLCSystem.Lib, TcPlcAds.Lib |
TwinCAT v2.8.0 | PC or CX (x86) | TcSystem.Lib |
TwinCAT v2.10.0 Build >= 1301 | CX (ARM) | TcSystem.Lib |