Siemens SIMATIC S7-1500 Manual page 49

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

Advertisement

8 Example Application
8.4 Configuration of the TIA portal project
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
1
2
4
8
16
Table 8-7 Codes in the "type" line of the JSON file for the string conversion
0
1
2
3
4
5
TOs of S7-1500(T)
Entry ID: 109743134,
V1.0,
len
BOOL
BYTE
INT, WORD
DINT, DWORD, REAL
LINT, LWORD, LREAL
type
05/2017
Data type
1 bit
8 bit
16 bit
32 bit
64 bit
Data type
BOOL
UINT
INT, DINT
REAL
LREAL
STRING
Length
49

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1500tTia portal v14

Table of Contents