1203-GD2, -GK2 & 1336-GM2 DF1/PCCC Data File Addressing

BULLETIN 1203-GD2, -GK2 & 1336-GM2
DF1 / PCCC DATA FILE ADDRESSING
APPLICATION NOTE
OCTOBER 20. 1997
PURPOSE
The purpose of this document is to provide information on data file addressing using the DF1 protocol and
Programmable Controller Communications Commands (PCCC) with the 1203-GD2, -GK2 or 1336-GM2.
This document provides information only. Users must ensure that installations using DF1 and PCCC
meet applicable codes and are suitable for the existing conditions.
WHAT THIS NOTE CONTAINS
This document contains information on PCCC data file addressing.
INTENDED AUDIENCE
This application note should be used by personnel familiar with the hardware components and
programming procedures necessary to operate SCANport devices. It is also assumed that the user has
some familiarity with serial communications and the programming required to implement serial protocols.
WHERE IT IS USED
The information contained in this application note is intended to address issues in many different
applications. Some changes by the user may be necessary to apply the concepts of this document to a
specific application.
APPLICATION CONSIDERATIONS
SCANport devices may assign different meanings to bits in the Logic Command and Status words. The
usage of the Reference and Feedback words may also vary. Consult the manual for your SCANport
device for more information.
FOR MORE INFORMATION
DF1 & PCCC
Data Highway/Data Highway Plus/DH-485 Communication Protocol and Command Set
Reference Manual
Publication 1770-6.5.16
1203-Gx2
Bulletin 1203 Serial Communications Module
RS232/422/485 (Using DF1 Protocol)
DH485
User Manual
Publication 1203-5.5
Faxback Document # 3045
http://www.ab.com/drives
Page 1 of 5
DEFINITIONS
1203-Gx2
A 1203-GD2 (120/230vac), 1203-GK2 (24vdc) or 1336-GM2 (internal mount) Serial
Communications Module.
DF1
A serial communications protocol defined in ANSI X3.28 subparagraphs D1 and F1.
PCCC
Programmable Controller Communications Commands -- the commands transmitted over
DF1 that are used to control Allen-Bradley PLC’s, SLC’s and other devices. Sometimes
referred to as “PC-Cubed”.
PCCC MESSAGES
The PCCC commands shown in the table below are a sampling of those supported by the 1203-Gx2. The
remaining commands are generally not needed. For more information about PCCC messages, refer to
Publication 1770-6.5.16. For more information about the 1203-Gx2 refer to Publication 1203-5.5.
CMD
Code
FNC
Code
Command Name
PLC Addressing Style
01h
n/a
Unprotected Read
PLC-2
08h
n/a
Unprotected Write
PLC-2
0Fh
00
*
Word Range Write
PLC-2 System, Logical Binary, Logical ASCII
(Not Symbolic)
01
*
Word Range Read
PLC-2 System, Logical Binary, Logical ASCII
(Not Symbolic)
67h
Typed Write
PLC-2 System, Logical Binary, Logical ASCII
(Not Symbolic)
68h
Typed Read
PLC-2 System, Logical Binary, Logical ASCII
(Not Symbolic)
*
FRN2.02 and later firmware only
*
FRN2.02 and later firmware only
Faxback Document # 3045
http://www.ab.com/drives
Page 2 of 5
PLC-2 ADDRESSING
•
Unprotected Read (CMD = 01h)
•
Unprotected Write (CMD = 08h)
PLC-2 addresses in these two commands are at the beginning of the data section (immediately after the
two TNS bytes) and are two bytes long. As with all multi-byte data the least significant byte is transmitted
first.
PLC-2 addresses are entered into IPDS programming software as octal word addresses. The PLC-2
addresses shown in the 1203-Gx2 manual also use this format.
When a PLC-2 address is actually transmitted the value used is twice this value.
Tables 1 through 3 show several examples of this.
Parameter
Number
1dec
2dec
3dec
4dec
Conversion
Formula
512dec + 1dec =
512dec + 2dec =
512dec + 3dec =
512dec + 4dec =
Octal
Address
1001oct
1002oct
1003oct
1004oct
Conversion
Formula
2 ∗ 1001oct =
2 ∗ 1002oct =
2 ∗ 1003oct =
2 ∗ 1004oct =
Value as seen with a
serial analyzer
2002oct (0402hex)
2004oct (0404hex)
2006oct (0406hex)
2008oct (0408hex)
Table 1 -- Parameter Read or Write Value Addresses
Parameter
Number
1dec
2dec
3dec
4dec
Conversion
Formula
7680dec + 1dec =
7680dec + 2dec =
7680dec + 3dec =
7680dec + 4dec =
Octal
Address
17001oct
17002oct
17003oct
17004oct
Conversion
Formula
2 ∗ 17001oct =
2 ∗ 17002oct =
2 ∗ 17003oct =
2 ∗ 17004oct =
Value as seen with a
serial analyzer
36002oct (3C02hex)
36004oct (3C04hex)
36006oct (3C06hex)
36008oct (3C08hex)
Table 2 -- Parameter Read Full Addresses
Logic Command/Status
Reference/Feedback
Datalink A1
Datalink A2
Datalink B1
Datalink B2
Datalink C1
Datalink C2
Datalink D1
Datalink D2
Octal
Address
34700oct
34701oct
34702oct
34703oct
34704oct
34705oct
34706oct
34707oct
34710oct
34711oct
Conversion
Formula
2 ∗ 34700oct =
2 ∗ 34701oct =
2 ∗ 34702oct =
2 ∗ 34703oct =
2 ∗ 34704oct =
2 ∗ 34705oct =
2 ∗ 34706oct =
2 ∗ 34707oct =
2 ∗ 34710oct =
2 ∗ 34711oct =
Value as seen with a
serial analyzer
71600oct (7380hex)
71602oct (7382hex)
71604oct (7384hex)
71606oct (7386hex)
71610oct (7388hex)
71612oct (738Ahex)
71614oct (738Chex)
71616oct (738Ehex)
71620oct (7390hex)
71622oct (7392hex)
Table 3 -- Control and Datalink Addresses
Faxback Document # 3045
http://www.ab.com/drives
Page 3 of 5
SYSTEM ADDRESSES
•
Word Range Write (CMD = 0Fhex, FNC = 00hex)
•
Word Range Read (CMD = 0Fhex, FNC = 01hex)
•
Typed Write (CMD = 0Fhex, FNC = 67hex)
•
Typed Read (CMD = 0Fhex, FNC = 68hex)
System addresses are variable length addresses with the first byte of the address coming immediately
after the FNC byte (function code). The FNC byte is always the first byte in the data section. The second
data byte is the beginning of the address.
The first part of a system address always follows the structure shown in Table 4. The Address Mask Byte
is where each type of system address begins to differ. Table 5 shows how to decode the Address Mask
Byte.
00
FNC
Function
00
OFF
Offset
00
OFF
(Always zero)
01
TRANS
Transaction Size
00
TRANS
in words
MASK
Address Mask Byte
Table 4 -- Data Section from FNC to MASK
MASK Value
System Address Type
00
Symbolic ASCII
00
Logical ASCII (subset of Symbolic)
01
PLC-2 System
xx
Logical Binary
Table 5 -- Address Type Decoding
Faxback Document # 3045
http://www.ab.com/drives
Page 4 of 5
SYMBOLIC ASCII ADDRESSES
A Symbolic ASCII address has an Address Mask Byte of 00hex. The next byte can be any character
except ‘$’ (24hex).
Symbolic ASCII addressing is used mainly by PLC-3 devices and is not supported by the 1203-Gx2
(except for the Logical ASCII subset explained below).
LOGICAL ASCII ADDRESSES
A Logical ASCII address has an Address Mask Byte of 00hex. The next byte must be ‘$’ (24hex).
Logical ASCII addressing can be regarded as a subset of Symbolic ASCII addressing and is supported by
the 1203-Gx2. A Logical ASCII address would be transmitted as shown in Table 6.
24
$
This character indicates a Logical ASCII address.
4E
N
Integer File Type
31
1
File Number
30
0
File Number
3A
:
Colon separates file number and element number
31
1
Element number
00
NULL
Table 6 -- Logical ASCII Address
The address shown in Table 6 is accessing N10:1 (parameter 1’s value) in the Gx2. The Gx2 supports up
to 3 bytes of file number characters and up to 3 bytes of element number characters.
PLC-2 SYSTEM ADDRESSES
A PLC-2 System address has an Address Mask Byte of 01hex. The next two bytes are used the same as
the two byte PLC-2 addresses explained previously.
LOGICAL BINARY ADDRESS
Any Address Mask Byte value other than 00hex or 01hex indicates a Logical Binary address. This type of
addressing is the most complex and is not recommended for use with PC software. This addressing
mode is supported by the 1203-Gx2 because it is used by PLC-5’s.
For information on Logical Binary addresses refer to Publication 1770-6.5.16.
Faxback Document # 3045
http://www.ab.com/drives
Page 5 of 5