Siemens SIMATIC S7-1500 Function Manual page 194

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

Advertisement

}
}
function getApiVersion() {
let label = document.getElementById("version-label")
fetch(TARGET_IP, {
})
}
function browseRoot() {
let textarea = document.getElementById("browserarea")
fetch(TARGET_IP, {
})
}
function apiLogout() {
Web server
Function Manual, 11/2019, A5E03484625-AG
.then(response => response.json())
.then((data) => {
bulkReadValues()
})
method: "POST",
headers: {
"Content-type": "application/json",
"X-Auth-Token": AUTH_TOKEN
},
body: JSON.stringify({
"id": messageId++,
"jsonrpc": "2.0",
"method": "Api.Version"
})
.then(response => response.json())
.then((data) => {
label.innerHTML = data.result
})
.catch(e => console.error(e))
method: "POST",
headers: {
"Content-type": "application/json",
"X-Auth-Token": AUTH_TOKEN
},
body: JSON.stringify({
"id": messageId++,
"jsonrpc": "2.0",
"method": "PlcProgram.Browse",
"params": {
"mode": "children"
}
})
.then(response => response.json())
.then((data) => {
textarea.value = JSON.stringify(data.result, null, 4)
})
.catch(e => console.error(e))
3.20 API (Application Programming Interface)
Web pages
193

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic et 200proSimatic et 200sp

Table of Contents