Installation of the Auxiliary Function (AF) PROM (cat. no. 1772-AF1) in your
Mini-PLC-2/15 controller lets you expand its mathematical capabilities.
For simplification, throughout this manual we refer to the Auxiliary Function
PROM (cat. no. 1772-AF1) as the AF1.
The AF1 can only be used with the series A Mini-PLC-2/15 processor module,
firmware revision 11 or later (cat. no. 1772-LV). The AF4 can only be used
with the series B Mini-PLC-2/15 processor module, firmware revision 4 or later.
Programming the AF1 functions with either series Mini-PLC-2/15 processor
module requires the Industrial Terminal (cat. no. 1770-T3).
The AF1 has a 2K (16 bit) word section to which you can transfer your program
(for backup memory) and a 2K word section for higher mathematical functions.
you can only transfer your program into the AF1 with the series B PLC-2/15
controller (Table 1.A). Series A Mini-PLC-2/15 Processor EPROM (publication
1770-915) describes program transfer to PROM. With the series A PLC-2/15
controller, program transfer to the AF1 is not possible.
Table 1.A
Response to Controller
AF1
MiniPLC2/15 Controller
[1]
You can erase the 2K memory backup portion of the AF1 with ultraviolet light. However, the
2K section for higher mathematical functions would also be erased and all AF1 function
capabilities lost. Once erased, the AF1 functions are irretrievable.
NOTE: The AF1 is sensitive to ultraviolet light, therefor when exposed to uv
light, both the program and the auxiliary functions are erased. The AF1’s
transparent window is covered with the product label to avoid accidental
alternation of memory from uv light sources. Do not remove this label.
Series
ReadWriteErase
AYesNoNo
BYesYesNo
User Program 2K Words
]
[1
11
Chapter 1
Introduction
Functions
The AF1 performs the following arithmetic functions:
6-digit add and subtract
6-digit multiply and divide
Square rote
Average
Standard deviation
BCD to binary conversion
Binary to BCD conversion
Applications
These arithmetic functions have applications in various industries such as food
processing, machine tool work and material handling. Applications in these
industries could be weighing, blending, batch processing, scaling, positioning,
test stands, and heat treating. The square root function is frequently used for
flow measurement and mining applications. The average function can be used
for averaging thermocouple inputs or other process variables. Standard
deviation and averaging have applications in trend analysis and report
generation.
Manual's Purpose
Audience
This manual shows you how to install and program the AF1 in your
Mini-PLC-2/15 controller.
We assume that you are familiar with programming and operation of the
Mini-PLC- 2/15 and the Industrial Terminal (cat. no. 1770-T3). If this is not the
case, refer to the appropriate publications or see our Publications Index
(publication SD499).
WARNING: Use only Allen-Bradley authorized programming
devices to program Allen-Bradley programmable controllers.
using unauthorized programming devices may result in unexpected operation, possibly causing equipment damage and/or
injury to personnel.
12
Installation
Chapter
2
General
Installation/Removal Handling
Precautions
During AF1 installation, take special care not to bend or contaminate the pins.
Bent or dirty pins can prevent proper AF1 programming and use. The AF1’s
transparent window is covered with the product label to avoid accidental
alteration of memory from uv light sources. Do not remove this label. Store the
AF1 in its shipping container when not installed in a Mini–PLC–2/15 processor.
The AF1 can be damaged during routine handling if proper precautions are not
taken to reduce static electricity discharges.
Recommended precautions include:
Handle the AF1 by the case without touching its pins.
Use a static free work station.
Wear a conductive wrist strap which has a minimum 200k ohms resistance
and is connected to earth ground.
Ground tools prior to contacting the AF1.
Connect static–free work station to ground through a minimum 200k ohm
resistance.
Control the relative humidity of the installation area–ideal conditions are
40% to 60% relative humidity.
The following is a list of things that should not be done:
Do not handle styrofoam, plastic, or cellophane–covered articles such as
combs, cigarette packages, and candy immediately prior to handling an AF1.
Do not hand the AF1 to someone who is not antistatic protected.
Do not install the AF1 in areas which might contaminate or foul the pins of
the AF1 device.
Do not handle the AF1 by its pins.
Do not slide the AF1 across any surface.
Do not place the AF1 in a non–conductive plastic bag.
When these precautions are followed, the potential difference between the AF1
pins is reduced thereby reducing the problems associated with static discharges.
21
Chapter 2
Installation
Installation
The AF1 fits into a 28–pin ZIF (zero insertion force) socket, which is located
under a hinged door at the lower side of the Mini–PLC–2/15 processor
(Figure 2.1).
Figure 2.1
PROM
Socket
10715I
On the underside of the PROM door is a label that illustrates PROM
installation. The notch on the AF1 PROM, when installed, must correspond to
the notch shown on the label. Figure 2.2 shows a properly installed AF1.
22
Figure 2.2
AF1
Installed
PROM
Notch
Lock
OFF
PROM Installation
1772AF1
DO NOT
UP
ERASE
ON
Release
11590
Chapter 2
Installation
To access the PROM socket, remove the Mini–PLC–2/15 processor module
from the I/O chassis. If you desire to maintain processor memory contents,
connect an external battery pack (Figure 2.3) to the processor with the
Mini–Processor Transport Cable (cat. no. 1772–CD) prior to removing the
module from the chassis.
Figure 2.3
External Battery Backup
Battery Pack
(Cat. No. 1771BB)
MiniPLC2/15 Processor
(Cat. No. 1772LV)
MiniProcessor
Transport Cable
(Cat. No. 1772CD)
11182
To install the AF1, perform the following steps (Figure 2.2)
1. Turn the mode select switch to PROG.
2. Remove AC power from the I/O chassis power supply.
3. Remove the processor module from the I/O chassis.
4. Check all AF1 pins to ensure they are not bent or dirty.
5. Loosen the screw and lift the PROM door.
6. Push the ON tab in to unlock the socket.
7. Position the AF1 as shown in Figure 2.2 Be sure the notch on your AF1
PROM faces the OFF tab.
8. Line up the AF1 as shown in Figure 2.2 and seat in the socket. Be sure the
pins are aligned as they bend easily.
9. Lock the AF1 in place by pushing the OFF tab in.
10.Close the PROM door and tighten the screw.
23
Chapter 2
Installation
Removal
To remove the AF1, perform the following steps:
1. Turn the mode select switch to PROG.
2. To maintain processor memory contents connect an external battery pack
to the processor with the mini–processor transport cable (Figure 2.3).
3. Remove AC power from the I/O chassis power supply.
4. Remove the processor module from the I/O chassis.
5. Loosen the screw, lift up the PROM door, and push the ON tab in to
unlock the socket (Figure 2.2).
6. Carefully remove the AF1 and store it in its shipping container.
24
Programming
Chapter
3
General
You access the AF1 by pressing [SHIFT][EAF] (execute auxiliary function) or
[SHIFT] [SCT] on the keyboard of your Industrial Terminal (cat. no. 1770-T3).
The instruction is an output instruction and may be preceded on a rung by input
instructions. Once you enter the function, the block diagram of Figure 3.1
appears on the CRT. To program a specific mathematics function, you would
enter the appropriate function number (Table 3.A). If you enter a non-existent
function number, the following occurs:
When the processor attempts to execute a function number which does not exist
on the AF1, the response of the processor depends upon whether the keyswitch
is in the RUN or RUN/PROGRAM position.
The response are:
In the RUN position, the processor stops running and the CRT displays
PROCESSOR FAULT and CHANGE PROCESSOR TO PROGRAM MODE.
The processor and memory LEDs illuminate. After you change processor
operation to program mode the LEDs turn off the CRT displays MODE
SELECTION menu and PLC-2 RUN TIME ERROR,PRESS 11 TO
CONTINUE. When you press 11 the CRT displays and intensifies the rung
containing the illegal opcode and states ILLEGAL OPCODE INTENSIFIED
INSTRUCTION LINKED WITH CAUSE OF ERROR.
In the RUN/PROGRAM position, the processor stops running and the CRT
displays MODE SELECTION menu and PLC-2 RUN TIME ERROR, PRESS
11 TO CONTINUE. When you press 11 the CRT displays and intensifies the
rung containing the illegal opcode and states ILLEGAL OPCODE
INTENSIFIED INSTRUCTION LINKED WITH CAUSE OF ERROR.
31
Chapter 3
Programming
Table 3.A
Function Numbers
AF1
AF1 Function Sequence
Function
Number
01Add
02Subtract
03Multiply
04Divide
05Square root
06Average
07Standard deviation
13BCD to binary conversion
14Binary to BCD conversion
Mathematical Operation
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 AF2 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 (see Avoiding Excessive AF1 Execution Times)
grants access to the AF1 function.
3.Reads the operand’s data stored in the data address that you entered.
4.Reads the result address which you entered.
5.Obtains the location of the mathematical routine requested by the function
number.
6.Executes the routine in the AF1 area. (See section for excessive execution
time.)
7.Writes the results at the result address in the data table.
8.Returns program execution to the next instruction in the user’s program
after the AF1 function is completed. (See section for excessive execution
time.)
9.Readies itself for the next AF1 operation.
32
Chapter 3
Programming
AF1 Automatic Checks
To guard against improper program execution, automatic check routines are
incorporated in the AF1. The processor uses these routines to prevent the
following:
Executing AF1 functions having invalid function addresses
Spending so much time executing AF1 functions that the controller neglects
its main program and I/O scans
Invalid
Function Addresses
Valid AF1 function addresses include the I/O image table and the data table
(except word 027). Specifically, valid addresses are from 010 to 026, from 030
to 077, and from 110 to the end of the data table. Result addresses must not
reside in the input image table.
When a user programmed function has an invalid address, the response of the
processor depends upon whether the keyswitch is in the RUN or
RUN/PROGRAM position.
The responses are:
In the RUN position, the processor stops running and the CRT displays
PROCESSOR FAULT and CHANGE PROCESSOR TO PROGRAM MODE.
The processor and memory LEDs illuminate. After you change processor
operation to program mode the LEDs turn off and the CRT displays MODE
SELECTION menu and PLC-2 RUN TIME ERROR, PRESS 11 TO
CONTINUE. When you press 11 the CRT displays and intensifies the rung
containing the illegal address and states ILLEGAL ADDRESS INTENSIFIED
INSTRUCTION LINKED WITH CAUSE OF ERROR.
In the RUN/PROGRAM position, the processor stops running and the CRT
displays MODE SELECTION menu and PLC-2 RUN TIME ERROR, PRESS
11 TO CONTINUE. When you press 11 the CRT displays and intensifies the
rung containing the illegal address and states ILLEGAL ADDRESS
INTENSIFIED INSTRUCTION LINKED WITH CAUSE OF ERROR.
Avoiding
Table 3.B lists execution times for AF1 functions. To avoid excessive AF1
function execution times, an interlock system is designed into the AF1. This
system automatically checks and does the following:
Permits no AF1 function to run longer than 6ms without returning processor
During a program scan each true AF1 function rung which can be completed
Excessive AF1 Execution T
scan to the processor.
in a single scan will be completed as it is encountered. However, upon
encountering a true AF1 function rung which requires multiple program scan
imes
33
Chapter 3
Programming
to complete, all other true AF1 function rungs will be “locked out” until
sufficient program scans complete the active AF1 function rung.
Once started, it completes an AF1 function prior to starting the next AF1
function encountered in the user program which has a true rung condition.
Limits the number of enabled AF1 functions in a program to 50. You may
include more functions but you must ensure that no more than 50 are enabled
at one time. This requirement only applies where you have programmed a
function that requires more than one scan to complete.
Table 3.B
Execution
FunctionAvg. TimeWorst TimeNumber or Scans
Addition1.22ms1.27ms1
Subtraction1.22ms1.27ms1
Multiplication4.99ms5.28ms1
Division16.17ms21.76ms4
Square Root6.08ms7.11ms1
Average12.33ms
Standard Deviation94.16ms
BCD to Binary0.89ms1
Binary to BCD0.84ms1
[1]
These times are calculated for a single AF1 function. Overhead for AF1 lock maintenance and
multiple rungs through the ladder program to complete some function are included
]
[2
N=number of values whose average or standard deviation is sought.
[1]
T
ime
4 + N / 4
+0.29ms per value
22 + 5N / 4
+2.09ms per value
[2]
[2]
34
The time listed in Table 3.B includes:
Overhead for AF1 PROM interlock system
One run through the portion of the AF1 specified by the particular function
Chapter 3
Programming
To obtain the time required from activation of the input that makes the rung
containing the AF1 PROM function true until the correct answer for the
function is in the data table, you must add the following times to the values in
Table 3.B:
Input delay time (from specification for specific input)
One program scan time and one I/O scan time multiplied by the number of
scans specified in Table 3.B.
Methods for determining these times are presented in Mini-PLC-2/15, series B,
Programmable Controller Programming and Operations Manual (publication
1772-804).
Programming Specific
Mathematical Functions
In this section we explain the following for each of the AF1 functions:
What it is
How to enter it in your program
Its format in the data table
a.word arrangement
b.digit location
Sample entry and display rungs. Although there are several techniques to
enter this data, we use get instructions.
Error messages. If an AF1 function has special error message responses to
specific illegal programming procedures, we state these responses.
Status Bits
The most significant four bits of the most significant word of the result data
area are reserved for status bits. These bits have the following meanings:
Enable = bit 17
Sign = bit 16
Done = bit 15
Error bit = bit 14
The enable bit is set at the start of an AF1 function and reset upon completion.
The sign bit, if set, indicates a negative value.
35
Chapter 3
Programming
The done bit is rest at the start of an AF1 function and set upon completion.
The error bit is a general error flag that indicates overflow and invalid operand
or result errors. Individual functions determine the actual state of this bit.
Throughout this manual, unused status bits are shown blank for the following
reasons:
Whether the content of an unused status bit in an input word is 0 or 1 is
irrelevant as such bits are ignored in AF1 function execution.
The AF1 reset unused status bits in result words. For simplicity these bits are
left blank.
Accuracy
The accuracy of all function results on the Af1 is typically +
significant digit.
AF1 Addition Function
An AF1 addition function operates on two 6-digit BCD numbers and presents
the result in a third 6-digit BCD number
(+
XXX XXX.) + (+XXX XXX.) = +XXX XXX.
How to Enter an AF1 Addition Function
To program an AF1 addition function, perform the following steps:
1.Press [SHIFT][EAF] or [SHIFT][SCT] on the keyboard of your industrial
terminal. Figure 3.1 appears on the CRT.
Figure 3.1
Execute
Numbers shown are default values and must be replaced
by your values. The number of default address digits
originally displayed, 3 or 4, depends on the size of the
data table.
Auxiliary Function Format
Execute Aux
Function
Function Number:
Data Addr:
Result Addr:
1 in the least
01
010
010
36
Chapter 3
Programming
2. Enter 01, the function number for AF1 addition.
This entry identifies that the function entered is to perform an AF1 addition and
that the processor use the data table format shown in Figure 3.2 when executed.
Operands 1 and 2 represent the two 6-digit numbers you wish to add. The six
digits of operand 1 are represented in BCD by the groups of bits labeled digit 1
through 6. Digit 1 and digit 6 are the most significant and the least significant
digits respectively. This digit labeling system also applies to operand 2 and the
result.
Figure 3.2
General
AF1 Addition Function Word and Digit Format
Operand 1
Operand 2
Result
Bit No.
1716 1514 1312 1110 7 6 5 4 3 2 1 0
S
S
E
S
DER
E = Enable Bit (1 = Function in Progress)
S = Sign Bit (1 = Negative)
D = Done Bit ( 1= Function Complete)
ER = Error Bit (1 = Overflow)
MSD = Most Significant Digit
LSD = Least Significant Digit
Digit 1
(MSD)
Digit 4 Digit 5
Digit 1
(MSD)
Digit 4 Digit 5
Digit 1
(MSD)
Digit 4 Digit 5
Digit 2 Digit 3
Digit 2 Digit 3
Digit 2 Digit 3
Digit 6
(LSD)
Digit 6
(LSD)
Digit 6
(LSD)
Data Address
m
m + 1
m + 2
m + 3
Result Address
n
n + 1
11481
3. Enter a data address and a result address.
If we select a data address of 201 and a result address of 305, the AF1
establishes the data table format shown in Figure 3.3. Be careful not to select
data and result addresses so close together that the addresses of the operands
following the data address overlap your result address. The data address
eventually contains three digits of operand 1. The AF1 reserves the next three
higher addresses for digits 4 through 6 of operand 1 and digits 1 through 6 of
operand 2. The result address contains the most significant three digits of the
result and the next higher address contains the least significant three digits.
37
Loading...
+ 35 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.