Siemens S7-400 Service Manual Page 219

  • Download
  • Add to my manuals
  • Print
  • Page
    / 228
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 218
Working with Ladder Logic
Ladder Logic (LAD) for S7-300 and S7-400 Programming
A5E00706949-01
C-3
C.1.1 Adder with EN and with ENO Connected
If the adder has an EN and an ENO connected, the following STL instructions are
triggered:
1 A I 0.0 // EN connection
2 JNB _001 // Shift RLO into BR and jump if RLO = 0
3 L in1 // Box parameter
4 L in2 // Box parameter
5 +I // Actual addition
6 T out // Box parameter
7 AN OV // Error recognition
8 SAVE // Save error in BR
9 CLR // First check
10 _001: A BR // Shift BR into RLO
11 = Q 4.0
Following line 1 the RLO contains the result of the preceding logic operation. The
JNB instruction copies the RLO into the BR bit and sets the first check bit.
If the RLO = 0, the program jumps to line 10 and resumes with A BR. The
addition is not executed. In line 10 the BR is copied into the RLO again and 0 is
thus assigned to the output.
If the RLO = 1, the program does not jump, meaning the addition is executed.
In line 7 the program evaluates whether an error occurred during addition, this
is then stored in BR in line 8. Line 9 sets the first check bit. Now the BR bit is
copied back into the RLO in line 10 and thus the output shows whether the
addition was successful or not.
The BR bit is not changed by lines 10 and 11, so it also shows whether the
addition was successful.
Page view 218
1 2 ... 214 215 216 217 218 219 220 221 222 223 224 ... 227 228

Comments to this Manuals

No comments