Siemens SIMATIC S7-1500 Function Manual page 179

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

Advertisement

Web pages
3.20 API (Application Programming Interface)
Examples
In the following example, the user writes a global tag in the "simple" display.
{
"var": "\"MotorSpeed\"",
"value": 9001
}
In the following example, the user writes a tag to a data block in the "raw" representation.
{
"var": "\"MyDB\".MyVariable",
"value": [ 255, 77, 1, 99 ],
"mode": "raw"
}
In the following example, the user writes a string tag consisting of 10 characters to the
"simple" representation:
{
"var": "\"MyDB\".MyString",
"value": "Short Str",
"mode": "simple"
}
In the following example, the user writes a string tag consisting of 10 characters with the text
"Short Str" in the "raw" representation:
{
"var": "\"MyDB\".MyString",
"value": [ 10, 9, 83, 104, 111, 114, 116, 32, 83, 116, 114, 0 ],
"mode": "raw"
}
In the following example, the user writes a Wstring tag consisting of 6 characters in the
"simple" representation:
{
"var": "\"MyDB\".MyWString",
"value": "Hello",
"mode": "simple"
}
In the following example, the user writes a string tag consisting of 6 characters with the text
"Hello" in the display "raw":
{
"var": "\"MyDB\".MyWString",
"value": [ 0, 6, 0, 5, 0, 72, 0, 101, 0, 108, 0, 108, 0, 111, 0, 0
],
"mode": "raw"
}
178
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