ComError_TO_TcEventEntry

ComError_TO_TcEventEntry 1:

The ComError_TO_TcEventEntry function converts errors that can occur at various function blocks(SerialLineControl, SendData, ReceiveData, ...) into an event definition.

The event definition (of type TcEventEntry) can be used to create an event with the Tc3_EventLogger PLC library and send it if required. The event text can also be queried for this event. This allows an error code to be converted into a plain text description, which often exists in several languages.

ComError_TO_TcEventEntry 2: Return value

Name

Type

Description

ComError_TO_TcEventEntry

BOOL

If the conversion is successful, the function returns TRUE.

ComError_TO_TcEventEntry 3: Inputs

VAR_INPUT
  eErrorId      : ComError_t;
  stEventEntry  : REFERENCE TO TcEventEntry;
END_VAR

Name

Type

Description

eErrorId

ComError_t

Error code to be converted.

stEventEntry

REFERENCE TO TcEventEntry

Event definition as a result of the conversion

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4024

PC or CX (x86, x64, ARM)

Tc2_SerialCom v3.3.7.0