With the Bulk Publish feature, all tags data is published under single group with topic name as:
ie/d/j/simatic/v1/s7c1/dp/r/<connection-name>/default
The JSON structure is as follows:
Where, seq
: unique sequence number of the payload.
vals
: array of data points published in the payload.
id
: unique identification of data point. You must fetch the tag ID from metadata payload based on the tag name.
qc
: quality code. It provides specific integer value to indicate the quality of the data point value.
qc
value is published in decimal which represents the sixth and seventh bit in the quality data.
NOTE
Recommended qc value
It is recommended to only consider the value of qc = 3.
Quality bits (6,7) | ||
---|---|---|
Value | Meaning | Description |
0 | BAD | The value is not useful for reasons indicated by the sub-status. |
1 | UNCERTAIN | The quality of the value is less than normal, but the value may still be useful. The reason is indicated by the sub-status. |
2 | GOOD (non-cascade) | The quality of the value is good. |
3 | GOOD (cascade) | The quality of the value is good and may be used in control. |
16-bit quality is defined as below:
Extended quality code
With Configurator Version as 1.2, along with qc, qx
is published which holds all the bits data: quality code, sub status, extended sub status, flags, and limit. qx
is published in decimal value, for example,192. You must convert it into binary to get the bit information.
Only if when any of the bits '0 to 5' and '8 to 15' is 1, the qx
field is published.
Limits (bits 0,1)
Value | Meaning | Description |
---|---|---|
0 | Ok | Data quality unrelated to limits. |
1 | Low limit violation | The value has exceeded its low limit. |
2 | High limit violation | The value has exceeded its high limit. |
4 | Constant | The value cannot move no matter what the process does. |
Sub-status BAD (sub-status bits 2..5)
Value | Meaning | Description |
---|---|---|
0 | Non-specific | There is no specific reason why the value is BAD. |
1 | Configuration error | The value is not useful because of some inconsistency regarding the configuration. |
2 | Not connected | The value is not reliable because the connection to the provider has been disconnected at consumer-side. For example, a communication driver actively disconnects from a PLC on user request or by design. |
4 | Sensor failure | The value is not useful because it cannot be converted. A value from the device (PLC) cannot be converted to the corresponding HMI tag. |
5 | No communication, with last usable value | The value is not useful because the communication to the data source failed, however a last known value is available. |
6 | No communication, no usable value | The value is not useful because the communication to the data source failed or has never been established since it was last out of service and a last known value is not available. |
7 | Out of service | The value is not reliable because the provider side has been disabled or shutdown. For example, a PLC is in stop mode or a tag is disabled for maintenance purposes. |
Sub-status UNCERTAIN (sub-status bits 2..5)
Value | Meaning | Description |
---|---|---|
0 | Non-specific | There is no specific reason why the value is UNCERTAIN. |
1 | Last usable value | The connection to the data source is still established, however, the data source stopped updating the value for some reason. |
2 | Substitute value | A predefined value is used in case of an invalid value due to communication issues with the data source or a range violation. The reason for providing substitute values is configurable. |
3 | Initial value | A predefined value intended for the startup of the HMI system (or a sub-ordinate device) is used while not being able to provide values from the data source. |
5 | Range violation | The value lies outside the range defined by minimum value and maximum value. The limits define which direction (min or max) has been exceeded. |
6 | Sub-normal | A value derived from multiple values has less than the required number of good sources. This includes data aggregation by means of data compression algorithms. |
Sub-status GOOD (cascade) (sub-status bits 2..5)
Value | Meaning | Description |
---|---|---|
0 | Non-specific | No error or special condition is associated with this value. |
6 | Local override | The value has been overridden by the user or some logic in to continue operation. Typically, the input has been disconnected and a manually entered value has been 'forced', or a value has been corrected. |
Quality (bits 6,7)
Value | Meaning | Description |
---|---|---|
0 | BAD | The value is not useful for reasons indicated by the sub-status. |
1 | UNCERTAIN | The quality of the value is less than normal, but the value may still be useful. The reason is indicated by the sub-status. |
2 | GOOD (non-cascade) | The quality of the value is good. |
3 | GOOD (cascade) | The quality of the value is good and may be used in control. |
Extended sub-status BAD (sub-status (bits 8..11))
Value | Meaning | Description |
---|---|---|
0 | Non-specific | No CHROM specific extended bad sub-status is associated with this value. |
1 | Aggregated value | The value has been calculated out of multiple values with less than the required number of good sources. This includes data aggregation by means of data compression algorithms. The corresponding sub-status is set to 'non-specific'. |
3 | Unusable value | A (logged) value has been identified to be incorrect, but a respective correction value is not available. The corresponding sub-status is set to 'non-specific'. |
7 | Disabled | The provider of the value (logging tag for logged value) has been disabled and the previous value was BAD. The corresponding sub-status is taken from the last (previous) sub-status. |
Extended sub-status UNCERTAIN (sub-status (bits 8..11))
Value | Meaning | Description |
---|---|---|
0 | Non-specific | No CHROM specific extended uncertain sub-status is associated with this value. |
1 | Aggregated value | The value has been calculated out of multiple values with less than the required number of good sources to be GOOD as well as less than required number of bad sources to be BAD. This includes data aggregation by means of data compression algorithms. The corresponding sub-status is set to 'non-specific'. |
7 | Disabled | The provider of the value (logging tag for logged value) has been disabled and the previous value was GOOD or UNCERTAIN. In case of GOOD, the corresponding sub-status is set to 'last usable value'. In case of UNCERTAIN, the corresponding sub-status is taken from the last (previous) sub-status. |
Extended sub-status GOOD (cascade) (sub-status (bits 8..11))
Value | Meaning | Description |
---|---|---|
0 | Non-specific | No CHROM specific extended good sub-status is associated with this value. |
1 | Aggregated value | The value has been calculated out of multiple (good) values. This includes data aggregation by means of data compression algorithms. The corresponding sub-status is set to 'non-specific'. |
2 | Manual input | A (logged) value has been created manually. The corresponding sub-status is set to 'non-specific'. |
3 | Corrected value | A (logged) value has been corrected. The corresponding sub-status is set to 'non-specific'. |
4 | Last usable value | The local data source has been initialized with the last usable value if present inside a local persistency. The corresponding sub-status is set to 'non-specific'. |
6 | Initial value | The local data source has been initialized with the configured initial value. The corresponding sub-status is set to 'non-specific'. |
Flags (bit 12..15)
Value | Meaning | Description |
---|---|---|
Bit 12 | Source quality | The data quality has been determined and assigned by external data source. |
Bit 13 | Source time | The data timestamp has been produced and assigned by external data source. |
Bit 14 | Time corrected | The data timestamp applied by external data source has been corrected by the system. Thus, Bit 13 Source time is not set. Time correction happens if the external timestamp is older than the timestamp of the last known value. |
ts
: timestamp of the data point. it is in ISO 8601 Zulu format.
val
: value of the Tag. Based on the data type of the data point, the value can be simple scalar value.