Function numbers, Error handling – Rockwell Automation 1772-LS_LSP,D17726.8.6 PROG/OPER MANUAL-MINI PLC-2/05 User Manual
Page 98
Math Instructions
Chapter 10
10Ć10
Figure 10.4
Optional Ladder Diagram for EAF Addition
060
000
G
061
000
G
062
000
G
063
000
G
Executive Aux
Function
Function Number:
Data Addr:
Result Addr:
01
040
060
Operand B
Operand A
Result
Start
050
000
G
051
000
G
052
000
G
053
000
G
040
000
G
041
000
G
042
000
G
043
000
G
In the optional ladder diagram (Figure 10.4), the first branch contains the result
(term C). The second branch contains the data address or operand A (term A).
The third branch contains operand B (term B).
Function Numbers
To program a specific operation, enter the appropriate function number
(Table 10.C). This entry identifies a specific EAF math operation.
Table 10.C
EAF Function Numbers
Function
Number
Mathematical
Operation
01
02
03
04
05
13
14
Add
Subtract
Multiply
Divide
Square Root
BCD to Binary
Binary to BCD
Error Handling
Two types of run-time errors can occur when you use EAF instructions. They
are illegal opcode and illegal address errors. An illegal opcode occurs if you
enter a function number other than 1, 2, 3, 4, 5, 13, or 14. An illegal address
error occurs if the operand pointed to by the data address or if the result pointed
by the result address is located in the processor’s work areas or in the
program areas.