SysLog_Control

Function Description

This function is used to manage the SysLog Client library (RFC 5424).

It performs the following actions:

  • Defining the server address.

  • Defining the server TCP port. The default TCP port is 601.

  • Starting or stopping the service. The service is disabled by default.

NOTE: When the service is initialized, the associated tasks are kept, even when the service is stopped.

Library and Namespace

Library name: SysLog

Namespace: SEC_SYSLOG

Graphical Representation

IL and ST Representation

To see the general representation in IL or ST language, refer to the chapter Function and Function Block Representation.

I/O Variable Description

The following table describes the input variables:

Input

Type

Comment

i_xExecute

BOOL

On rising edge, starts the function block execution.

i_adHostIp

IP_ADDR

Sets the IP address of the controller. It can be modified when the service is stopped.

i_adSrvIp

IP_ADDR

Sets the server address. It can be modified when the service is stopped.

i_diTcpPort

DINT

Sets the TCP server port. If 0, the default port (601) is selected. It can be modified when the service is stopped.

i_xControl

BOOL

Control bit. TRUE indicates that the service is activated. FALSE indicates that the service is stopped.

The following table describes the output variables:

Output

Type

Comment

q_xDone

BOOL

Set to TRUE when the operation is completed. It is active when i_xExecute is set to TRUE.

q_xError

BOOL

Set to TRUE when an error occurred. It is active when i_xExecute is set to TRUE.

q_xStatus

BOOL

Set to TRUE when the service is running. It is active when i_xExecute is set to TRUE.