Siemens SIMATIC S7-1500 Function Manual page 115

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

Advertisement

Web pages
3.14 DataLogs
Downloading of the DataLogs via JavaScript
The following example shows how you can download DataLogs automatically by using
JavaScript. 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).
<html>
<head>
<title>DataLog JavaScript Test</title>
<script type="text/javascript" src="jquery-
1.12.4.min.js"></script>
</head>
<body>
<h1>DataLog JavaScript Test</h1>
<div><button id="load">Load DataLogs</button></div>
<div><ul id="list"></ul></div>
<script type="text/javascript">
</script>
</body>
</html>
114
$('#load').click(function(){
$.get('http://192.168.2.132/DataLogs', {'Action': 'LIST'},
function(data){
$('#list').empty();
$.each(data.split(/\r\n/), function(){
if (this.length == 0) continue;
$('#list').append('<li><a href="http://192.168.2.132' +
this + '">' + this + '</a></li>');
});
});
});
Function Manual, 11/2019, A5E03484625-AG
Web server

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic et 200proSimatic et 200sp

Table of Contents