Technical data
Appendix
27.6 Sample Programs
Programming with STEP 7
670 Manual, 05/2010, A5E02789666-01
STL (Network 9) Explanation
CALL SFC 38
PRGFLT_QUERY :=DW#16#0
ACCFLT_QUERY :=DW#16#8
RET_VAL :=MW 104
PRGFLT_CLR :=MD 30
ACCFLT_CLR :=MD 34
A BR
A M 37.3
NOT
= M 0.2
SFC38 READ_ERR (query synchronous errors)
All bits=0 (no programming errors queried)
Bit 3 = 1 (write access error queried)
Return value
Output current programming error filter to MD30
Output current access error filter to MD34
No error occurred and write access error
detected
Invert RLO
M 0.2=1 if PQB 18 present
STL (Network 10) Explanation
L B#16#0
T PQB 19
Write access (with value 0) to PQB 19
STL (Network 11) Explanation
CALL SFC 38
PRGFLT_QUERY :=DW#16#0
ACCFLT_QUERY :=DW#16#8
RET_VAL :=MW 104
PRGFLT_CLR :=MD 30
ACCFLT_CLR :=MD 34
A BR
A M 37.3
NOT
= M 0.3
SFC38 READ_ERR (query synchronous errors)
All bits=0 (no programming errors queried)
Bit 3 = 1 (write access error queried)
Return value
Output current programming error filter to MD30
Output current access error filter to MD34
No error occurred and write access error
detected
Invert RLO
M 0.3=1 if PQB 19 present
STL (Network 12) Explanation
CALL SFC 37
PRGFLT_RESET_MASK :=DW#16#0
ACCFLT_RESET_MASK :=DW#16#8
RET_VAL :=MW 102
PRGFLT_MASKED :=MD 20
ACCFLT_MASKED :=MD 24
SFC37 DMSK_FLT (unmask synchronous errors)
All bits=0 (no further programming errors
unmasked)
Bit 3 = 1 (write access error unmasked)
Return value
Output current programming error filter to MD20
Output current access error filter to MD24