ADSCLEAREVENTS

ADSCLEAREVENTS 1:

The function block permits the sending and the acknowledge of messages to the TwinCAT EventLogger.

ADSCLEAREVENTS 2: Inputs

VAR_INPUT
    NETID    : T_AmsNetId;
    bClear   : BOOL;
    iMode    : UDINT;
    tTimeout : TIME := DEFAULT_ADS_TIMEOUT;
END_VAR

Name

Type

Description

NETID

T_AmsNetId

String containing the AMS network ID of the target device to which the ADS command is addressed (type: T_AmsNetId).

bClear

BOOL

With the rising edge the events are deleted.

iMode

UDINT

Mode for deleting the events. Defined in the enum E_TcEventClearModes.

tTimeout

TIME

Indicates the time before the function is canceled.

ADSCLEAREVENTS 3: Outputs

VAR_OUTPUT
    bBusy  : BOOL;
    bErr   : BOOL;
    iErrId : UDINT;
END_VAR

Name

Type

Description

bBusy

BOOL

When the function block is activated, this output is set to TRUE and remains set until feedback is received. As long as bBusy is TRUE, no new command can be executed.

bErr

BOOL

This output is switched to TRUE as soon as an error occurs during the execution of a command. The command-specific error code is contained in iErrId. If the function block has a timeout error, bErr is TRUE and iErrId is 1861 (hexadecimal 0x745). Is reset to FALSE by the execution of a command at the inputs.

iErrId

UDINT

ADS error code or command-specific error code of the last 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 (Category group)

TwinCAT v3.1.0

PC or CX (x86, x64, ARM)

Tc2_System (System)