Professional Documents
Culture Documents
1785 PLC-5
Programmable
Addressing
Controllers Reference
Manual
Important User Information Because of the variety of uses for the products described in this
publication, those responsible for the application and use of this control
equipment must satisfy themselves that all necessary steps have been taken
to assure that each application and use meets all performance and safety
requirements, including any applicable laws, regulations, codes and
standards.
identify a hazard
avoid the hazard
recognize the consequences
2
Summary of Changes
New Information This release of the publication contains new and revised information. To
help you find this information, we have included change bars as shown to
the left of this paragraph.
i
Addressing for 1785 PLC-5 Processors
Using this Addressing This addressing reference guide helps you specify the address in a 1785
Reference Guide PLC-5 data table. This reference contains:
For more information about the specific contents of the various sections of
memory, consult the:
1
1785 PLC-5
Addressing Reference
Memory Map The memory map in Figure 1 shows the logical arrangement of the data
table area of memory in a 1785 PLC-5 processor. This map does not
represent the physical structure of the memory, but it provides the
addressing scheme for the memory in the 1785 PLC-5 data table. The
logical ASCII formats for the memory addresses you can access are shown
in subsequent figures for each section.
Figure 1
Memory Map of 1785 PLC-5 Processors
$O:0
Output Image
$O:277
$I:0
Input Image
$I:277
$S:0
Status
$S:128
$B3:0
Bit (Binary)
$B3:999
$T4:0
Timer
$T4:999
$C5:0
Counter
$C5:999
$R6:0
Control
$R6:999
$N7:0
Integer
$N7:999
$F8:0
Floating-point
$F8:999
$_9:0
Assign File Type as Needed
$_999:999
17390–I
2
1785 PLC-5
Addressing Reference
Table A
Locating PLC-5 Addressing Information
Use logical ASCII addressing to read and write data to and from the PLC-5
data table. You provide a string of letters, digits, and punctuation that
specifies the file type, file, and structure or word of the address.
3
1785 PLC-5
Addressing Reference
General Format for Logical Figure 2 illustrates the general format for logical addressing in the data
ASCII Addressing table of the 1785 PLC-5 memory.
Figure 2
General Format for Logical Addressing
File Separator
Logical Address Identifier Bit Separator (if addressing a bit)
$ B 123 : 123 / 15
Note: BT, MG, PD, SC, and ST files are not available on PLC-5/10, -5/12, -5/15, and -5/25 processors.
In addition, since the output, input, and status files are automatically assigned files numbers 0, 1, and 2
respectively, do not enter a file number for these files. 17392–I
4
1785 PLC-5
Addressing Reference
Figure 3
Logical Addressing for I/O Image Tables
File Separator
Logical Address Identifier Word Bit Separator (if addressing a bit)
No.
$ I : 12 3 / 12
File Type I/O Rack Number I/O Group Number Bit Number
O = Output 0 – 3 octal for PLC-5/10, -5/11 -5/12, -5/15, 0 – 7 Octal 0 – 17 Octal
I = Input -5/20
0 – 7 octal for PLC-5/25, -5/30
0 – 17 octal for PLC-5/40, -5/40L
0 – 27 octal for PLC-5/60, -5/60L, -5/80
17399–I
Figure 4
Word of Input or Output Image File
17 16 15 14 13 12 11 10 7 6 5 4 3 2 1 0
PLC Data Type: signed word (negative values in 2’s complement form)
Range: –32,768 thru +32,767
17400–I
5
1785 PLC-5
Addressing Reference
Logical Addressing for the Figure 5 shows how to address the status file of the PLC-5 data table.
Status File Figure 6 shows a word of the status file. Figure 5 shows what is stored in
each word of the status file. For more information, refer to the PLC-5
Programming Software Configuration and Maintenance Manual,
publication 6200-6.4.6.
Figure 5
Logical Addressing for the Status File
File Separator
Logical Address Identifier Bit Separator (if addressing a bit)
$ S : 7 / 12
Status file
Identifier
Word Number Bit Number
0 – 128 Decimal 0 – 15 Decimal
Figure 6
Word of Status file
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PLC Data Type: signed word (negative values in 2’s complement form)
Range: –32,768 thru +32,767
17411–I
Table B
Status File Description
This word of Stores:
the status file:
S:0 Arithmetic flags
• bit 0 = carry
• bit 1 = overflow
• bit 2 = zero
• bit 3 = sign
6
1785 PLC-5
Addressing Reference
7
1785 PLC-5
Addressing Reference
8
1785 PLC-5
Addressing Reference
9
1785 PLC-5
Addressing Reference
10
1785 PLC-5
Addressing Reference
11
1785 PLC-5
Addressing Reference
The above sequence applies to each MCP; therefore, each MCP has 3 status
words.
File Separator
Logical Address Identifier Bit Separator (if addressing a bit)
$ B 123 : 123 / 15
Note: Except for data entry and display, all values in A, B, D, and N files
are processed as integer values stored in natural binary format.
12
1785 PLC-5
Addressing Reference
Figure 8
Word of ASCII (ANSI X3.4) File
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ASCII character ASCII character
PLC Data Type: signed word
17410–I
Figure 9
Word of a Binary File
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PLC Data Type: signed word (negative values in 2’s complement form)
Range: –32,768 thru +32,767 17411–I
Figure 10
Word of Decimal (BCD) File
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MSD LSD
MSD = Most significant digit
LSD = Least Significant Digit
PLC Data Type: signed word
Display: BCD (4 digits per word) 0 thru 9,000
17412–I
Figure 11
Word of Floating-Point File
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
S Exponent (8 bits) Mantissa (23 bits)
17394–I
Figure 12
Word of Integer File
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PLC Data Type: signed word (negative values in 2’s complement form)
Range: –32,768 thru +32,767 17415–I
13
1785 PLC-5
Addressing Reference
Addressing Structured Data Figure 13 shows address formats for structured data. Figures 15 thru 22
and tables B thru L show data structures and mnemonics for the various
file types.
Figure 13
General Format for Addressing a Structure or a Member of a Structure
File Separator
Logical Address Identifier Member Separator (if addressing a member)
Identifier File Type Structure Size File Number Structure Member (optional)
T Timer 6 bytes 3 – 999 decimal Refer to Table B – S
C Counter 6 bytes
R Control 6 bytes
SC SFC Status 6 bytes Structure Number
BT Blk-transfer 12 bytes
ST ASCII String 84 bytes 0 – 77 Octal for token data files
PD PID Control 164 bytes 0 – 584 Decimal for message files
MG Message Control 112 bytes 0 – 398 Decimal for PID files
0 – 779 Decimal for ASCII-string files
0 – 999 Decimal for all other file types
Note: BT, MG, PD, SC, and ST files are not available on PLC-5/10, -5/12, -5/15, and -5/25 processors. 17395–I
Table C
Timer Mnemonics
Figure 14
Timer Structure
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EN TT TD Reserved Used to maintain timer accuracy
PRE – Preset Value (–32,768 thru +32,767)
ACC – Accumulated Value (–32,768 thru +32,767)
17396–I
14
1785 PLC-5
Addressing Reference
Table D
Example Timer Addresses
Table E
Counter Mnemonics
Figure 15
Counter Structure
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CU CD DN OV UN Reserved
PRE – Preset Value (–32,768 thru +32,767)
ACC – Accumulated Value (–32,768 thru +32,767)
17375–I
15
1785 PLC-5
Addressing Reference
Table F
Example Counter Addresses
Table G
Control Mnemonics
Figure 16
Control Structure
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EN EU DN EM ER UL IN FD Reserved
LEN – Length (–32,768 thru +32,767)
POS – Position (–32,768 thru +32,767)
17376–I
16
1785 PLC-5
Addressing Reference
Table H
Example Control Addresses
Table I
SFC Status Mnemonics
17
1785 PLC-5
Addressing Reference
Figure 17
SFC Status Structure
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SA FS LS OV ER DN Reserved
PRE – Preset Value (–32,768 thru +32,767)
TIM – Active Time (–32,768 thru +32,767)
17376–I
Table J
Example SFC Status Addresses
Table K
Block-Transfer Control Mnemonics
18
1785 PLC-5
Addressing Reference
Figure 18
Block-transfer Control Structure
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EN ST DN ER CO EW NR TO RW Reserved
RLEN – Requested Word Count (–32,768 thru +32,767)
DLEN – Transmitted Word Count (–32,768 thru +32,767)
FILE – File-type Number (–32,768 thru +32,767)
ELEM – Word Number (–32,768 thru +32,767)
not
I/O Rack used I/O Group slot
Table L
Example Block-transfer Control Addresses
Table M
ASCII String Mnemonics
Figure 19
ASCII String Structure
15 1413 12 11 10 9 8 7 6 5 4 3 2 1 0
LEN – Length specifies an even number of bytes (2 – 82)
A maximum of 82 bytes of data accessible only by addressing the whole structure.
19
1785 PLC-5
Addressing Reference
Table N
Example ASCII Structure Addresses
Table O
PID Mnemonics in PD File
20
1785 PLC-5
Addressing Reference
Figure 20
PID Control Structure in PD file
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EN CT CL PVT DO SWM CA MO PE
INI SPOR OLL OLH EWD DVNA DVPA PVLA PVHA
SP Set Point 4 bytes IEEE float
KP Proportional Gain 4 bytes IEEE float
KI Initial Gain 4 bytes IEEE float
KD Derivative Gain 4 bytes IEEE float
BIAS Output Bias % 4 bytes IEEE float
MAXS Maximum Scaled Value 4 bytes IEEE float
MINS Minimum Scaled Value 4 bytes IEEE float
DB Dead Band 4 bytes IEEE float
SO Set Output % 4 bytes IEEE float
MAXO Maximum Output Limit 4 bytes IEEE float
MINO Minimum Output Limit 4 bytes IEEE float
UPD Update Time 4 bytes IEEE float
PV Process Variable 4 bytes IEEE float
ERR Error: Scaled 4 bytes IEEE float
OUT Output 4 bytes IEEE float
PVH PV Alarm High 4 bytes IEEE float
PVL PV Alarm Low 4 bytes IEEE float
DVP Deviation Alarm + 4 bytes IEEE float
DVN Deviation Alarm – 4 bytes IEEE float
PVDB PV Alarm Dead Band 4 bytes IEEE float
DVDB Deviation Alarm Dead Band 4 bytes IEEE float
MAXI Maximum Input 4 bytes IEEE float
MINI Minimum Input 4 bytes IEEE float
TIE Tieback % 4 bytes IEEE float
ADDR [0] thru Master-to-Slave Address 8 bytes signed words
ADDR [3]
DATA [0] thru Reserved / Internal Use 14 X 4 bytes IEEE float
DATA [13]
21
1785 PLC-5
Addressing Reference
Table P
Example PID Control Addresses
Table Q
PID Control Block in Integer File
22
1785 PLC-5
Addressing Reference
Table R
Message control Mnemonics in MG File
Figure 21
Message Control Structure in MG File
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NR TO EN ST DN ER CO EW
ERR Error Code
RLEN Requested Length
DLEN Done Length
DATA[0] thru DATA[51] Reserved / Internal Use (52 X 2 bytes)
Table S
Example Message Control Addresses
23
1785 PLC-5
Addressing Reference
Figure 22
Message Control Block in Integer File
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EN ST DN ER CO EW NR TO Error Code
Reserved / Internal Use (15 words)
24
Allen-Bradley, a Rockwell Automation Business, has been helping its customers improve
productivity and quality for 90 years. We design, manufacture, and support a broad range of
control and automation products worldwide. They include logic processors, power and motion
control devices, man-machine interfaces, sensors, and a variety of software. Rockwell is one
of the world’s leading technology companies.
Worldwide representation.
Algeria • Argentina • Australia • Austria • Bahrain • Belgium • Brazil • Bulgaria • Canada • Chile • China, PRC • Colombia • Costa Rica • Croatia • Cyprus • Czech Republic
Denmark • Ecuador • Egypt • El Salvador • Finland • France • Germany • Greece • Guatemala • Honduras • Hong Kong • Hungary • Iceland • India • Indonesia • Israel • Italy
Jamaica • Japan • Jordan • Korea • Kuwait • Lebanon • Malaysia • Mexico • New Zealand • Norway • Oman • Pakistan • Peru • Philippines • Poland • Portugal • Puerto Rico
Qatar • Romania • Russia–CIS • Saudi Arabia • Singapore • Slovakia • Slovenia • South Africa, Republic • Spain • Switzerland • Taiwan • Thailand • The Netherlands • Turkey
United Arab Emirates • United Kingdom • United States • Uruguay • Venezuela • Yugoslavia
Allen-Bradley Headquarters, 1201 South Second Street, Milwaukee, WI 53204 USA, Tel: (1) 414 382-2000 Fax: (1) 414 382-4444