Siemens S7-400 Service Manual Page 90

  • Download
  • Add to my manuals
  • Print
  • Page
    / 228
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 89
Integer Math Instructions
Ladder Logic (LAD) for S7-300 and S7-400 Programming
7-8
A5E00706949-01
7.8 SUB_DI Subtract Double Integer
Symbol
SUB_DI
EN
OUT
IN2
ENO
IN1
Parameter Data Type Memory Area Description
EN BOOL I, Q, M, L, D Enable input
ENO BOOL I, Q, M, L, D Enable output
IN1 DINT I, Q, M, L, D
or constant
First value for subtraction
IN2 DINT I, Q, M, L, D
or constant
Value to subtract
OUT DINT I, Q, M, L, D Result of subtraction
Description
SUB_DI
(Subtract Double Integer) is activated by a logic "1" at the Enable (EN)
Input. IN2 is subtracted from IN1 and the result can be scanned at OUT. If the
result is outside the permissible range for a double integer (32-bit), the OV bit and
OS bit will be "1" and ENO is logic "0", so that other functions after this math box
which are connected by the ENO (cascade arrangement) are not executed.
See also Evaluating the Bits of the Status Word with Integer Math Instructions.
Status word
BR CC 1 CC 0 OV OS OR STA RLO /FC
writes: x x x x x 0 x x 1
Example
SUB_DI
IN2
IN1
EN
MD0
Q 4.0I 0.0
MD4
ENO
MD10OUT
S
NOT
The SUB_DI box is activated if I0.0 = "1". The result of the subtraction MD0 - MD4
is output to MD10. If the result was outside the permissible range for a double
integer, the output Q4.0 is set.
Page view 89
1 2 ... 85 86 87 88 89 90 91 92 93 94 95 ... 227 228

Comments to this Manuals

No comments