Sending SYSLOG messages with a SIMATIC S7 CPU
Simple and efficient
Syslog is a simple binary UDP/IP protocol. It allows applications to send alerts, warnings or error states to a syslog server. Syslog is used typically in computer system management and security monitoring and has now become established as a standard in the field of logging.
The "LSyslog" library provides a solution for implementing the syslog protocol in a SIMATIC S7 controller. In addition to the library, an application example is provided that shows you how to generate syslog messages in your system and send to the syslog server.
The library provides a function block (FB) that fulfills the following functions:
- Establishment of a UDP connection to the syslog server by means of open communication blocks.
- Embedding of the user alarm with timestamp in the syslog protocol.
- Sending the syslog alarm.
The "LSyslog" library can be used with all PROFINET-capable S7 CPUs and via Ethernet CPs/CMs with which Open User Communication (OUC) can be programmed.
These can be PLCs of the following series:
- S7-1200 PLCs from FW 4.0
- S7-1500 PLCs
- S7-300 PLCs from FW 3.2
- S7-400 PLCs from FW 6.0
- ET 200SP PLC
- ET 200SP Open Controllers
In this application example, security messages are read out with the instructions "Get_Alarm" and "GetChecksum" and sent to the syslog server using the "LSyslog" library. This allows you to track and document access to your controls.
The application example can be used with S7-1500 PLCs from firmware V2.0.
Documentation, library and sample project
Documentation Library (1,3 MB)
Library for TIA Portal V14 SP1 (585,7 KB)
Documentation Application example (1,0 MB)
Application example for TIA Portal V14 SP1 (2,7 MB)
Complete revision of code and documentation.
Creation of an application example.