EasyManua.ls Logo

Siemens SIMATIC S7-1500T - Page 49

Siemens SIMATIC S7-1500T
60 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
8 Example Application
8.4 Configuration of the TIA portal project
TOs of S7-1500(T)
Entry ID: 109743134, V1.0, 05/2017
49
Siemens AG 2017 All rights reserved
To be able to realize the cyclic data exchange as optimized as possible and without
a high CPU load, all variables of the status data in the user program are transferred
in two string tags (237 byte and 51 byte) packed and therefore only two variables
are transferred to the HTML page. This is where the two strings are disassembled
into individual variables again.
For this functionality the "S7Framework” is used. The framework consists of S7
functions that take on the packing of the variables into a string on the SIMATIC
CPU. And of JavaScript functions in which the unpacking of the variables is
realized on the HTML page.
The definition in which way the variables are packed in the string, is stored in the
JSON file "dataRead.json”. The length and the type of the data to be transferred is
listed there in the appropriate order. The distribution of the data on the HTML page
to the individual variables on the page is then done via the "UpdatePlcData”
JavaScript function.
Figure 8-5 SIMATIC functions of the "S7-Framework” for packing the data
Figure 8-6 Configuration of the JSON file "dataRead.json”
For the codes used in the JSON file, the following assignment is valid:
Table 8-6 Meaning of the code in the "len” line of the JSON file
len
Data type
Length
1
BOOL
1 bit
2
BYTE
8 bit
4
INT, WORD
16 bit
8
DINT, DWORD, REAL
32 bit
16
LINT, LWORD, LREAL
64 bit
Table 8-7 Codes in the "type” line of the JSON file for the string conversion
type
Data type
0
BOOL
1
UINT
2
INT, DINT
3
REAL
4
LREAL
5
STRING

Table of Contents

Other manuals for Siemens SIMATIC S7-1500T

Related product manuals