×
Siemens Industry Online Support
Siemens AG
Entry type: Application example Entry ID: 51929235, Entry date: 01/31/2018
(6)
Rate

Sending SYSLOG messages with a SIMATIC S7 CPU

  • Entry
  • Associated product(s)
Syslog is a simple binary UDP/IP protocol.It allows applications to send alerts, warnings or error states to a syslog server.

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.

Applicative implementation
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.

"LSyslog" library
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. 

Image 01

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

Application example
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)
 Registrierung notwendig  Library for TIA Portal V14 SP1 (585,7 KB)
  Documentation Application example (1,0 MB)
 Registrierung notwendig  Application example for TIA Portal V14 SP1 (2,7 MB)

Archive
 Registrierung notwendig  Library for TIA Portal V12 SP1 (876,9 KB) 
 Registrierung notwendig  Library for STEP 7 V5 (206,9 KB) 

Further information
Reading out Alarms in S7-1500 CPU using the "Get_Alarm" instruction and sending them to an Alarm System 

Last change 
Complete revision of code and documentation. 
Creation of an application example. 

 


Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.
Support to the statistics
With this function the IDs found are listed according to number (format .txt).

Generate list
Copy URL
Display page in new design
mySupport Cockpit