Section Automated Reading Out Of Data Logs - Siemens SIMATIC S7-1500 Function Manual

Web server
Hide thumbs Also See for SIMATIC S7-1500:
Table of Contents

Advertisement

3.14.1
Automated reading out of DataLogs
In addition to the downloading of individual DataLogs via the user interface of the Web
server, you can download, read out and archive DataLogs. Automatic downloading of
DataLogs is realized either by the execution of scripts in, for example, Bash or on your
HTML user page via JavaScript.
A typical application for this functionality is the daily reading out and archiving of DataLogs
from one or more CPUs at a specific time.
Calling up of the DataLogs from the SIMATIC memory card
The CPU makes a URL in the following format available so that you can download DataLogs
automatically from the SIMATIC memory card of your CPU:
http[s]://[ip]/DataLogs?Action=List
Enter the correct IP address of the interface of your CPU at this URL and use the
appropriate transfer protocol (HTTP or HTTPS), for example
https://192.168.2.132/DataLogs?Action=LIST
or command line interpreter.
The URL returns a list of the DataLogs on the SIMATIC memory card. Each entry returns the
URL by which you download the corresponding DataLog.
For simple syntax analysis of the list by command line interpreters (such as Bash) or web-
based programming languages (such as JavaScript) the individual URLs are separated by a
line break
DataLog files
/DataLogs?Path=/DataLogs/Test.txt&Action=DOWNLOAD&E=1<CR><LF>
/DataLogs?Path=/DataLogs/Test2.txt&Action=DOWNLOAD&E=1<CR><LF>
<CR><LF>
When the URLs are called successfully, the CPU returns the status code
also returns this status code if no DataLogs exist on the SIMATIC memory card.
Note
Access authorization to the CPU for the reading out of data
In order to download DataLogs from the CPU, the user has to dispose of reading rights on
the CPU. If the user does not have the required rights, the CPU returns the status code
FORBIDDEN
Downloading of the DataLogs via Bash scripts
The following example shows how you can download DataLogs automatically from the CPU
by using a Bash script. Replace the URL of the example by the correct IP address of the
interface of your CPU at this URL and use the appropriate transfer protocol (HTTP or
HTTPS).
wget --content-disposition -i
"http://192.168.2.132/DataLogs?Action=LIST"
Web server
Function Manual, 11/2019, A5E03484625-AG
. The following example shows the syntax of two URLs that access the
<CR><LF>
and
Test.txt
Test2.txt
in the HTTP Response.
. Subsequently call up the URL in your browser
:
Web pages
3.14 DataLogs
. The CPU
200 OK
403
113

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic et 200proSimatic et 200sp

Table of Contents