Programming
7.2 Technology data block
S7-1500 Motion Control V13 Update 3
Function Manual, 07/2014, A5E03879256-AC
175
7.2.3
Evaluate StatusWord, ErrorWord and WarningWord
To be able to use individual status and error information from the "StatusWord", "ErrorWord"
and "WarningWord" data double words, the evaluation can be performed as described
below. For consistent evaluation, you should avoid using bit addressing to access these data
double words in the technology data block. Access to an individual bit in the technology data
block only lasts as long as the access to the entire data word.
When required, copy the required data double word into a tag of a data structure and query
the individual bits of the tag.
A description of the data double words and the allocation of the individual bits can be found
in the Appendix:
●
StatusWord (Page 351)
●
●
WarningWord (Page 356)
Requirements
The technology object has been created.
Procedure
To evaluate the individual bits in the data word "StatusWord", proceed as follows:
1.
Crate a global data structure. Name the data structure, e.g. as "Status".
2.
Create a double word (DWORD) in the data structure "Status". Name the data structure,
e.g. as "Temp".
3.
Create 32 Boolean tags in the "Status" data structure. You can obtain a clearer overview
by naming Booleanhe Boolean tags as defined for the bits in the technology DB
(e.g. name the fifth Boolean tag "HomingDone").
4.
Copy the tag <TO>.StatusWord as needed from the technology data block to the double
word "Temp" in your data structure.
5.
Copy the bits of dword "Temp" to the corresponding Boolean tags by means of bit
access.
6.
Use the Boolean tags to query the status bits.
Evaluate the "ErrorWord" and "WarningWord" data words as specified in steps 1 to 6.