User Manual, AUX FUNCT PROM Manual
Programming
Chapter 3
32
Table 3.A
Function
Numbers for the AF4
Function
Number
Mathematical Operation
01 Add
02 Subtract
03 Multiply
04 Divide
13 BCD to Binary conversion
14 Binary to BCD conversion
30 Log to base 10
31 Natural log (log to base e)
32 Exponential
33 Power
34 Reciprocal
35 Sine
36 Cosine
37 Square Root
You enter an existent function number and then enter data and result addresses
(we will explain this in detail later). The processor then places a number in the
data address.
When the Mini-PLC-2/15 controller encounters an AF4 function during
program execution and the rung is true, the processor performs the following
steps:
1. Saves its present position in the user program.
2. The interlock system grants access to the AF4 function.
3. Reads the operand’s data stored in the data address that you entered.
4. Reads the result address which you entered.
5. Determines the location of the mathematical routine requested by the
function number.
6. Executes the routine in the AF4 area. (See Avoiding Excessive AF4
Execution Times.)
7. Writes the results at the result address in the data table.
8. Returns program execution to the next instruction in the user program after
the AF4 function is completed. (See Avoiding Excessive AF4 Execution
Times.)
9. Readies itself for the next AF4 operation.
AF4 Function Sequence