Payload elements and their descriptions
{ |
"seq":"number", |
"vals": |
[ |
{ |
"id":"string", |
"val":"string", |
"ts":"string", |
"qc":integer |
}, |
{ |
"id":"string", |
"val":"integer", |
"ts":"string", |
"qc":integer |
}, |
... |
] |
} |
Element |
Description |
|---|---|
seq |
Unique sequence number of the payload |
vals |
Array of data points published in the payload |
id |
Unique identification of the data point that is specified in the metadata. It is used after the subtopic has been separated with the colon in the variable assignment according to the structure topic/subtopic:id |
ts |
Time stamp of the data point, in ISO 8601 Zulu format, i.e. "2021-06-22T08:20:01.123Z" |
val |
Variable value. Based on the data type of the data point, the value can be a basic scalar value, an array or an object. |
qc |
Quality code, vendor-specific integer value to quantify the quality of the data point value |
Quality codes "qc" published by SIMATIC S7 Connector
Value |
Meaning |
Description |
|---|---|---|
0 |
Invalid |
The data point value is invalid with regard to the displayed substatus. |
1 |
Indeterminate |
The quality of the data point value is worse than normal, but the value may still be useful. |
2 |
Good (not cascaded) |
The quality of the data point value is good. |
3 |
Good (cascade) |
The quality of the data point value is good and can be used for control. |
In the current version, the pipeline only receives arrays as inputs and not object structures.
The AI Inference Server does not use the "qc" with the current version.
Payload example
{ |
"seq":1, |
"vals": |
[ |
{ |
"id":"174", |
"ts":"2021-06-22T08:21:01.105Z", |
"val":"234.3659912109375", |
"qc":3 |
}, |
{ |
"id":"175", |
"ts":"2021-06-22T08:21:01.105Z", |
"val":"15", |
"qc":3 |
}, |
... |
] |
} |
Mapping example
Assuming that the S7 connector publishes the aforementioned payload in the Databus Topic
"ie/d/j/simatic/v1/s7c1/dp/r/plc1/Tag_1",
you can map a pipeline variable to the data point with the "id": "174" by using "ie/d/j/simatic/v1/s7c1/dp/r/plc1/Tag_1:174".
Therefore, if you assign the "ph1" variable to the above data point, the pipeline receives the value 234.3659912109375 in the input variable "ph1".
Write-back to PLC
The customer is responsible for checking the end-to-end functionality with PLC data write-back before transferring it to the production environment.