Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 13 of 31

DF1 Protocol and Command Set Reference Manual: 7 - Communication Commands, pages 98 to 107

Pages 98 to 107 of 251, from DF1 Protocol and Command Set Reference Manual

The original document is the PDF (2.1 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

Filed in the catalog under the Allen-Bradley 5250-LP and Allen-Bradley 5250-MLP1

Page 98

Communication Commands

7–11 file write (write file) Writes data, starting at a file symbol or block address. This starting address must point to a file of words. • PLC-3 • PLC-5/250

C

DST SRC

CMD 0F STS

TNS

FNC 03

Packet Offset

Total Trans

Logical Address (2 - 51 bytes.)

Data

(up to [239 bytes - the PLC-3 logical address length]; must be an even number)

This reply is the same as the reply packet for all unprotected, protected, and privileged bit writes. R

SRC DST

CMD 4F STS

TNS

EXT STS

The EXT STS field may be attached to the reply packet if an error occurs.

get edit resource Secures the edit resource (sole access) for the programming device. Once a programming device has obtained the edit resource, another node cannot write to or modify the device. • PLC-5 • PLC-5/250 (receive only) • PLC-5/VME • SLC 500 • SLC 5/03 • SLC 5/04

C

DST PSN SRC PSN CMD STS 0F

R

LNH LNH CMD DST PSN SRC PSN STS HI LO 4F

TNS

FNC 11 TNS

EXT STS

The EXT STS field may be attached to the reply packet only when there is an error. LNH - length of the optional portion of the reply packet in bytes.

"

First four words of get edit resource The first four words are currently unused and unexamined. To assure compatibility with any future use of these bytes, they should be initialized to 0. DST, PSN, and SRC are included for reference only.

For this processor

This access is cleared by

SLC 500, SLC 5/01, SLC 5/02 any node sending a return edit resource

SLC 5/03, SLC 5/04 the programming device or via a timed mechanism internal to the processor sending a return edit resource

Publication 1770-6.5.16 - October 1996

Page 99

7–12

Communication Commands initialize memory Resets the processor’s memory to the default directory (the directory the processor is shipped with). Using this command does not reset the communication configuration.

• MicroLogix 1000 • PLC-5 • PLC-5/250 (receive only) • SLC 500 • SLC 5/03 • SLC 5/04

C

DST SRC CMD STS 0F

TNS

FNC 57

R

SRC DST CMD STS 4F

TNS

EXT STS

The EXT STS field may be attached to the reply packet if an error occurs.

modify PLC-2 compatibility file

• PLC-5

Changes the compatibility mode file so that communication from a PLC-2 processor (or a node emulating a PLC-2 processor) at the given node address uses the file specified. This change in the default file for PLC-2 compatibility mode remains in effect until this command is issued again to change it or until memory is cleared. Cycling the power to the PLC-5 processor does not reset the default. The link ID and node address are one byte each. The file number is two bytes. C

DST SRC CMD STS 0F

TNS

FNC Link Node 5E ID Addr

R

SRC DST

CMD STS 4F

TNS

EXT STS

File number

The EXT STS field may be attached to the reply packet if there is an error.

Publication 1770-6.5.16 - October 1996

Page 100

Communication Commands

7–13 open file Opens a file in an SLC 500 processor. If the file is successfully opened, a Tag (low byte, high byte) is returned. Protection

• SLC 500 • SLC 5/03 • SLC 5/04

C

CMD DST SRC 0F STS

TNS

R

SRC DST

CMD 4F STS

TNS

Protection -

FNC 81

File number

File type

Tag

01h = read 02h = not supported 03h = read/write

Tag is used to access the open file using a protected type file read or protected type file write. Tag is also used to close the file. The Tag field may be replaced by an EXT STS field if there is an error.

physical read Uploads data from the PLC data table or program memory. • 1774-PLC • PLC-2 • PLC-3

1774-PLC and PLC-2 C

DST SRC CMD STS 04

TNS

R

SRC DST CMD STS 44

TNS

ADDR

SIZE

Data (max. 244 bytes)

Use the SIZE field to specify the number of bytes to be read. To specify a number of PLC words, SIZE should be an even value because PLC words are two bytes.

PLC-3 For PLC-3 processors, the destination interface module accepts this command only after the source node has successfully transmitted a shutdown request. C

DST SRC CMD STS 0F

TNS

FNC PLC-3 phys. address Size 09

R

SRC DST CMD STS 4F

TNS TNS

Data (max. 244 bytes or 122 words)

This command must request an even number of bytes. The EXT STS field may replace the DATA field if there is an error.

Publication 1770-6.5.16 - October 1996

Page 101

7–14

Communication Commands physical write Downloads data into the PLC data table or program memory. Use this command to download the contents of a computer file into PLC memory.

• PLC-2 • 1774-PLC • PLC-3

PLC-2 For PLC-2 processors, enter download mode must precede the first physical write. C

DST SRC CMD STS 03

TNS

R

SRC DST CMD STS 43

TNS

ADDR

Data (max. 244 bytes)

ADDR

Data (max. 244 bytes)

1774-PLC C

DST SRC CMD STS 03

TNS

R

SRC DST CMD STS 43

TNS

PLC-3 The starting address is a PLC-3 physical address. The destination interface module accepts this command after the source node has successfully transmitted a shutdown request. SRC CMD STS 0F

TNS

FNC 08

CMD STS 4F

TNS TNS

EXT STS

C

DST

R

SRC DST

PLC-3 phys. address

Data (max. 238 bytes or 119 words)

The EXT STS field may be attached to the reply packet only when there is an error.

Publication 1770-6.5.16 - October 1996

Page 102

Communication Commands

7–15 protected bit write • 1774-PLC • PLC-2 • PLC-3 • PLC-5 • PLC-5/250

DATA DATA is: •4-byte blocks, each of which contains a 16-bit address field •a set mask •a reset mask

Sets or resets individual bits within limited areas of the PLC data table memory. The access is limited by memory access rungs in the communication zone of the PLC processor’s ladder diagram program. C

DST SRC CMD STS 02

TNS

R

SRC DST CMD STS 42

TNS

ADDR •Use ADDR to specify the address of the byte to be modified in the PLC data table memory. •Put the low byte (least significant bits) of the PLC address value into the first byte of the ADDR field.

Important:

RESET ADDR Up toSET 60 masks of this form.

DATA (max. 244 bytes)

SET

RESET

•Use SET to specify which bits to set to 1 in the addressed PLC byte.

•Use RESET to specify which bits to reset to 0 in the addressed PLC byte.

•A 1 in the SET bit position means to set the corresponding bit in the addressed PLC byte to 1. •A 0 in the SET bit position means to leave the corresponding bit in the PLC byte unchanged.

•A 1 in a RESET bit position means to reset the corresponding bit in the addressed PLC byte to 0. •A 0 in the RESET bit position means to leave the corresponding bit in the PLC byte unchanged.

For some PLC processors, the interface module at the receiving PLC node executes this command by making a copy of the addressed PLC byte. It then sets or resets the appropriate bits and writes the byte back into PLC memory. At the same time, the PLC processor can change the states of the original bits in memory. Because of this, some data bits may unintentionally get overwritten.

Publication 1770-6.5.16 - October 1996

Page 103

7–16

Communication Commands protected typed file read Reads data from an open file in a MicroLogix 1000 or an SLC 500 processor. • MicroLogix 1000 • SLC 500 • SLC 5/03 • SLC 5/04

C

DST SRC CMD STS 0F

TNS

R

SRC DST CMD STS 4F

TNS

FNC A7 Size

Tag

Offset

File Type

DATA

Offset is the word offset into the file (low byte, then high byte). Size is the size of data to read: For this processor

Valid range for Size (in bytes)

MicroLogix 1000

0-248

SLC 500, SLC 5/01, SLC 5/02

0-96

SLC 5/03, SLC 5/04

0-225 with internet protocol 0-236 without internet protocol protected typed file write Writes data to an open file in a MicroLogix 1000 or an SLC processor. For MicroLogix 1000 processors, this command can be used to update the Terminal ID by writing two bytes. (To do this, size = 02h, the tag = 4176, the offset = 0000, the file type = 90, and the two bytes of data contain the terminal ID, low byte first.)

• MicroLogix 1000 • SLC 500 • SLC 5/03 • SLC 5/04 C

DST SRC CMD STS 0F

TNS

FNC AF Size

R

SRC DST CMD STS 4F

TNS

EXT STS

Tag

Offset

File Type

Data

Offset is the word offset into the file (low byte, then high byte). Size is the size of data to read:

Publication 1770-6.5.16 - October 1996

For this processor

Valid range for Size (in bytes)

MicroLogix 1000

0-241

SLC 500, SLC 5/01, SLC 5/02

0-89

SLC 5/03, SLC 5/04

0-218 with internet protocol 0-229 without internet protocol

Page 104

Communication Commands

7–17 protected typed logical read with three address fields Reads data from a logical address in a SLC 500 module.

• SLC 500 • SLC 5/03 • SLC 5/04

C

DST SRC

CMD STS 0F

TNS

R

SRC DST

CMD STS 4F

TNS

FNC Byte A2 Size

File File Ele. S/Ele. No. Type No. No.

DATA

EXT STS

Field

Description

Byte Size

The size of data to be read (in bytes), not including the address fields or other overhead bytes.

File Number

Addresses files 0-254 only. For higher addresses, setting this byte to FF expands this field to three bytes total. Use the second and third bytes for the expanded file address (low address byte first).

File Type

Use one of the these values for this field. Do not use any other values; doing so may result in unpredictable results. •80-83 hex: reserved •84 hex: status •85 hex: bit •86 hex: timer •87 hex: counter •88 hex: control •89 hex: integer •8A hex: floating point •8B hex: output logical by slot •8C hex: input logical by slot •8D hex: string •8E hex: ASCII •8F hex: BCD

Element Number

Addresses elements 0-254 only. For higher addresses, setting this byte to FF expands this field to three bytes. Use the second and third bytes for the expanded element address (low address byte first).

Sub-element Number

Addresses sub-elements 0-254 only. For higher addresses, setting this byte to FF expands this field to three bytes. Use the second and third bytes for the expanded sub-element address (low address byte first).

DATA

•For SLC 5/01 or 5/02 = 82 bytes (41 words). •For SLC 5/03 or 5/04 = 225 bytes with IP (does not apply to DF1 drivers) = 236 bytes without IP (applies to DF1 drivers)

Publication 1770-6.5.16 - October 1996

Page 105

7–18

Communication Commands protected typed logical write with three address fields Writes data to a logical address in a SLC processor.

• SLC 500 • SLC 5/03 • SLC 5/04

C

DST SRC

CMD STS 0F

TNS

FNC Byte AA Size

R

SRC DST

CMD STS 4F

TNS

EXT STS

File File Ele. S/Ele. No. Type No. No.

DATA

The EXT STS field is only included if there is an error.

Field

Description

Byte Size

The size of data to be read (in bytes), not including the address fields or other overhead bytes.

File Number

Addresses files 0-254 only. For higher addresses, setting this byte to FF expands this field to three bytes total. Use the second and third bytes for the expanded file address (low address byte first).

File Type

Element Number

Publication 1770-6.5.16 - October 1996

Use one of the these values for this field. Do not use any other values; doing so may result in unpredictable results. •80-83 hex: reserved •84 hex: status •85 hex: bit •86 hex: timer •87 hex: counter •88 hex: control •89 hex: integer •8A hex: floating point •8D hex: string •8E hex: ASCII Addresses elements 0-254 only. For higher addresses, setting this byte to FF expands this field to three bytes. Use the second and third bytes for the expanded element address (low address byte first).

Sub-element Number

Addresses sub-elements 0-254 only. For higher addresses, setting this byte to FF expands this field to three bytes. Use the second and third bytes for the expanded sub-element address (low address byte first).

DATA

•For SLC 5/01 or SLC 5/02 = 82 bytes (41 words) •For SLC 5/03 or 5/04 = 223 bytes with IP (does not apply to DF1 drivers) = 234 bytes without IP (applies to DF1 drivers)

Page 106

Communication Commands

7–19 protected write • 1774-PLC • PLC-2 • PLC-3 • PLC-5 • PLC-5/250

Writes words of data into limited areas of the PLC data table memory. Its access is limited by memory access rungs in the communication zone of the processor’s ladder diagram program. C

DST SRC CMD STS 00

TNS

R

SRC DST CMD STS 40

TNS

Data (max. 244 bytes)

ADDR read bytes physical (physical read) Performs an upload after receiving a reply that an upload (download) all request has been successfully performed. • PLC-5 • PLC-5/250 (receive only) • PLC-5/VME

C

DST SRC CMD STS 0F

TNS

FNC 17

PLC-5 phys. address

R

SRC DST

CMD STS 4F

TNS TNS

A

Data (up to 240 bytes)

Size

Size - the number of bytes to read, up to 240 (must be an even number). A - extended status byte if there is an error. Otherwise, it will be data at physical address, first word, low byte.

read diagnostic counters Reads up to 244 bytes of data from the PROM or RAM of an interface module. Use this command to read a module’s diagnostic timers and counters.

• 1774-PLC • MicroLogix 1000 • PLC-2 • PLC-3 • PLC-5 • PLC-5/250 (receive only) • SLC 500 • SLC 5/03 • SLC 5/04

You must use diagnostic status to obtain the starting address of the diagnostic counters, except for the PLC-5, PLC-5/250, and SLC 500 processors. PLC-5 and PLC-5/250 processors don’t require that this address be specified, though you must include a dummy value in the ADDR field, which the PLC-5 or PLC-5/250 processor ignores. For SLC 500 processors, zero is the only valid value for the ADDR field. (For listings of read diagnostic counters status information, see Chapter 10, “Diagnostic Status Information.”) C

DST SRC CMD STS 06

TNS

FNC 01

R

SRC DST CMD STS 46

TNS

Data (max. 244 bytes)

ADDR

SIZE

Publication 1770-6.5.16 - October 1996

Page 107

7–20

Communication Commands read link parameters Reads the DH485 parameter, Maximum Solicit Address. This parameter specifies the maximum node address that a DH485 node tries to solicit onto the link. • SLC 500 • SLC 5/03 • SLC 5/04 (Channel 0 configured for DH485)

C

DST SRC

CMD STS 06

TNS

FNC 09

R

SRC DST

CMD STS 46

TNS

Data

Address 0000

Size 01

Data - the maximum node address that can be solicited (1 byte).

read modify-write (write bit) Sets or resets specified bits in specified words of data table memory. The interface that receives this command performs this procedure for each PLC-5 system address, AND Mask, and OR Mask in the message packet:

• PLC-5 • PLC-5/VME

1. Copies the specified word in the data table. 2. Resets the bits specified in the AND mask. 3. Sets the bits specified in the OR mask. 4. Writes the word back to its location. C

DST SRC CMD STS 0F

TNS

FNC 26

PLC-5 sys. address

AND Mask

OR Mask

(Repeatable up to 243 bytes) R

SRC DST

CMD STS 4F

TNS

EXT STS

The EXT STS field may be attached to the reply packet only when there is an error. The PLC-5 system address specifies the word that is modified. Use more than one field to specify more than one word. Must point to a word, and can be either a logical binary address or a logical ASCII address. Each PLC-5 system address is followed by an AND Mask (specifies which bits in the word to reset [0]) and OR Mask. (specifies which bits in the word to set [1]). These three fields can be repeated up to a length of 243 bytes. AND and OR Masks: two bytes each with the low byte first. • AND Mask: 0 to reset a bit, 1 to leave it the same. • OR Mask: 1 to set a bit, 0 to leave it the same.

Important:

Publication 1770-6.5.16 - October 1996

The controller may change the states of the original bits in memory before this command can write the word back to memory. (Some data bits may unintentionally be overwritten.) To help prevent this, we suggest that you use this command to write into the storage area of a programmable controller’s data table, and have the controller read the word only, not control it.