Usage Of DPE attributes by API manager
When API manager is configured as a DIP client
User bits
The first 2 user bits are used to hold the quality of the data being written
into the DPE. OPC quality mappings used as basis for this policy.
DIP Quality |
WinCC OA users bits |
DIP_QUALITY_UNINITIALIZED (-1) |
0 decimal (00 binary) = bad |
DIP_QUALITY_BAD (0) |
0 decimal (00 binary) = bad |
DIP_QUALITY_GOOD (1) |
3 decimal (11 binary) = good |
DIP_QUALITY_UNCERTAIN (2) |
1 decimal (01 binary) = uncertain |
Note the reasonForQuality string (which provides supplementary information
on the quality when it is not good) is not used by the API manager.
Use of invalid flag
The DPE invalid flag is used to indicate either either a problem in the API
manager or the DIP publication does not exist.
- The API manager can not find a converter to convert from the DIP to WinCC OA
type.
- The publication the DPE is associated with is not available.
- If a type conversion has failed (i.e. The data type of the publication has
changed).
If the invalid flag is set then the value and user bits are NOT to be
trusted.
Timestamp
The timestamp supplied with the received DIP data is used as the timestamp
for the DPE value.
Client Scenarios
Below are a list of scenarios that you may expect to encounter in a running
system and an indication of how the API manager will behave in that scenario.
- API manager subscribes to publication that does not exist. What to
expect:- Invalid bit will be set to true (time stamp will be 0), value &
user bits will be left unchanged.
- Publication is created (but not published data) AFTER the API manager
subscribes. What to expect:- Invalid bit will be set to false,
user bits will be set to bad (time stamp will be 0) & value will be left
unchanged.
- Publication publishes data AFTER API manager subscribes. What to
expect:- Invalid bit will be set to false, value & timestamp set from
DIP value/timestamp. User bits will be set from the DIP quality
according to the mapping described above.
- API manager subscribes to publication that exists but has not sent data.
What to expect:- Scenario 1) followed be 2)
- API manager subscribes to publication that exists and has sent data.
What to expect:- Scenario 1) followed be 2), then 3)
- API manager subscribes to publication that disappears. What to
expect:- Invalid bit will be set to true (time stamp set to current
time), value & user bits will be left unchanged.
- API manager subscribes to publication that changes its data type.
What to expect:- As scenario 6).
When API manager is configured as a DIP Publisher
Use of invalid flag
If the invalid flag is set for any DPE used to make up the DIP publication
then the quality of that publication is set to bad. The reason for quality
string indicates how many DPE's for that publication have their invalid
bit set.
Timestamp
Of all DPE's that make of the publication, the one with the most recent
timestamp is the one which provides the time stamp for the data sent via the
DIP publication.