8.4 Configuration of the TIA portal project
TOs of S7-1500(T)
Entry ID: 109743134, V1.0, 05/2017
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
Table 8-7 Codes in the "type” line of the JSON file for the string conversion