Direct output to Event Logger
In order to use the output directly to the “new” Event Logger, specify the keyword TC3_EVENT_LOGGER in P-STUP-00167. Errors are then logged directly by the CNC in the new format and no longer via the ChannelError() PLC block. Errors continue to be output to the PLC
error_protocol_mode PRINT | LOG | REPORT | TC3_EVENT_LOGGER
If the PLC is no longer required to evaluate CNC error messages, error output to the PLC can be suppressed by:
error_protocol_mode PRINT | LOG | REPORT | TC3_EVENT_LOGGER | SEND_NOT_TO_PLC
Alternatively, the mode can be set accordingly via the cnc_error_manager_mode_w CNC object
Output of messages from the NC program to the event logger
Function available as of CNC Build V3.1.3080.11
The user can utilise the NC command #MSG to send messages from the NC program to the TwinCAT3 event logger. Messages are output channel-specific.
This takes place with the warning ID 1035. Messages can be output both immediately after decoding or synchronised with processing of the interpolator (SYN).
Messages have the INFO priority for the event logger. Messages have no acknowledgement. If a message is programmed with a mode that has an acknowledgement (ACK or SYN_ACK), the warning ID 1036 is output. This message is sent without acknowledgement request.
The user can explicitly clear messages in the programming.
#MSG SYN EVENT_LOGGER[""]
Messages are also cleared on CNC reset or when the controller is shut down.
Programing Example
Messages to the event logger
%Eventlogger_test.nc
N020 P1 = 123
N030 #MSG EVENT_LOGGER["Asynchronous message %d", P1]
N040 #MSG SYN EVENT_LOGGER["Synchronous message"]
(Clear messages)
N050 #MSG SYN EVENT_LOGGER[""]
M30
The resource file TcCncErrors.xml must be modified in order to obtain the following output in the Beckhoff GUI with the NC command lines displayed.