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

The text of a manual · part 15 of 45

Enhanced and Ethernet PLC-5 Programmable Controllers User Manual: Chapter 7 - Communicating with a PLC-5 Adapter Channel, pages 109 to 118

Pages 109 to 118 of 388, from Enhanced and Ethernet PLC-5 Programmable Controllers User Manual

The original document is the PDF (5.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.

For the Allen-Bradley 1785-L20B and Allen-Bradley 1785-L40B

Page 109

Communicating with a PLC-5 Adapter Channel

7-11

Configure Block-Transfer Requests To configure block-transfers to adapter-mode controller channel, use the adapter mode configuration screen in your programming software.

1. Define the BTW control and BTR control files you need. These control files must already exist (appear on the memory map) or the edit will result in an error. Each control word must contain a unique block-transfer control address to properly transmit block-transfers. A. Enter the block-transfer file number. B. Enter the element number. C. Record on paper the BT files you define. This will help when configuring the BT files through the data monitor. 2. Since the adapter-mode channel controls the location from which data is transferred as well as the amount of data, load data into the block-transfer files by using data monitor screen in your programming software. A. Specify a BT control file you defined. B. Enter the transfer length in .RLEN C. Enter the file and element numbers from which the data is to be transferred in .FILE and .ELEM respectively.

Publication 1785-UM012D-EN-P - July 2005

Page 110

7-12

Communicating with a PLC-5 Adapter Channel

A block-transfer write of 10 words from file 24, element 10 with BT control file for group 0, module 0 of BT12:000 looks like:

EXAMPLE

Adapter Mode Configuration screen Group

Module

0

0

BTW control

BTR control

BT02:000

BT000:000

Data Monitor screen Address

EN

ST

DN

ER

CO

EW

NR

TO

RW

RLEN

DLEN

FILE

ELEM

R

G

M

BT12:000

0

0

0

0

0

0

0

0

0

10

0

24

10

0

0

0

Publication 1785-UM012D-EN-P - July 2005

Page 111

Communicating with a PLC-5 Adapter Channel

7-13

Program multiple block-transfers to an adapter-mode controller channel by matching block-transfer instructions in the supervisory controller to control files in the adapter. Supervisor Program In this example, the first block transfer in the supervisor uses the BTR control word listed in group 0 module 0, which is BT010:000.

Adapter Configuration

BTW RACK GROUP MODULE

BTW RACK GROUP MODULE

4* 1 0

BTW RACK GROUP MODULE

4* 1 1

BTR RACK GROUP MODULE

4* 1 1

4* 0 FULL

RACK STARTING GROUP SIZE

4* 0 0

BTW Control BT000:000 BT000:000 BT000:000 BT011:001

Module 0 1 0 1

Group 0 0 1 1

* Must Match

BTR Control BT010:000 BT000:000 BT011:000 BT011:040

Block transfer further defined in the adapter-mode processor channel via Data Monitor BT10:0 points to file 24 and element 10 and has a length of 64 words.

Address EN ST DN ER CO EW NR TO RW RLEN DLEN FILE ELEM R G M BT10:0

0

0

0

0

0

0

0

0

0

64

0

24

10

0 0 0

Assuming that file 24 has been created as an integer file, the data written down from the first block-transfer will be found in N24:10 to N24:73. The second block-transfer in the supervisor writes its data to the file to which BT11:0 points, and the third block-transfer writes its data to the file to which BT11:40 points.

You can have up to 15 writes and 15 reads. Each block transfer to a particular group/module location uses the I/O addresses for that rack/group for status bits. These locations are lost to discrete transfer. Therefore, if you configure all available 15 block-transfer read/write pairs, no bits will be available for discrete transfer. See page 7-15 for more information. IMPORTANT

Adapter-mode block-transfer reads and block-transfer writes in the same group/module location must have the same length.

Publication 1785-UM012D-EN-P - July 2005

Page 112

7-14

Communicating with a PLC-5 Adapter Channel

If you want to transfer controller-resident local I/O data of the adapter mode controller channel to a supervisory controller or if you want to transfer data from the supervisory controller to controller-resident local I/O of the adapter mode controller channel, you must use MOV or COP instructions within the adapter-mode controller channel to move the data in or out of the data file used in the adapter block-transfer control file.

Examples of Block-Transfer Ladder Logic Example Bidirectional Repeating Block Transfer in PLC-5 Supervisory Controller

Read data from adapter-mode processor

BTR and BTW enable bits BT17:15 BT17:10 Enter the following parameters in the block-transfer instructions in the supervisory processor.

EN

EN

Set the length to 0. Use the remote I/O rack number for which you configure the adapter-mode processor. Use the group and module numbers for which the adapter-mode processor is configured. Condition the use of BTR data with a "data valid" bit. All address comments for contacts shown in the following examples represent the set (1) state of the bit in the PLC-5 processor.

You may have to execute the BTR in the PLC-5 scanner channel twice if the BTR’s time delay is greater than 2-3 program scans. If you do not run the BTR twice, the BTR will read old data from the adapter processor.

Send data to adapter-mode processor

BTR and BTW enable bits BT17:15 BT17:10 EN

BTW BLOCK TRANSFER WRITE RACK 2 GROUP 0 MODULE 0 CONTROL BLOCK BT17:15 N7:200 DATA FILE 0 LENGTH N CONTINUOUS

EN

Buffer read data from adapter-mode processor to work area

BTR Done Bit BT17:10

Data Not Valid Bit I:020

DN

10

PLC-5 adapter-mode processor channel is configured as rack 2

Publication 1785-UM012D-EN-P - July 2005

BTR BLOCK TRANSFER READ RACK 2 GROUP 0 MODULE 0 CONTROL BLOCK BT17:10 N7:100 DATA FILE 0 LENGTH N CONTINUOUS

COP COPY FILE SOURCE DEST LENGTH

#N7:100 #N7:300 64

EN DN ER

EN DN ER

Page 113

Communicating with a PLC-5 Adapter Channel

7-15

Example Bidirectional Repeating Block Transfer in PLC-5/250 Supervisory Controller

Read data from adapter-mode processor

Enter the following parameters in the block-transfer instructions in the supervisory processor. Set the length to 0. Use the remote I/O rack number for which you configure the adapter-mode processor. Use the group and module numbers for which the adapter-mode processor is configured. Condition the use of BTR data with a "data valid" bit. All address comments for contacts shown in the following examples represent the set (1) state of the bit in the PLC-5 processor.

BR020:0

BWO20:0

EN

EN

BTR BLOCK TRANSFER READ 002 RACK 0 GROUP 0 MODULE BR020:0 CONTROL BLOCK 1BTD1:0 DATA FILE 0 BT LENGTH N CONTINUOUS BT TIMEOUT

EN DN ER

3

Send data to adapter-mode processor

BR020:0

BWO20:0

EN

EN

Buffer read data from adapter-mode processor to work area

BTR Done Bit BR020:0

Data Not Valid Bit I:020

DN

10

BTW BLOCK TRANSFER WRITE 002 RACK 0 GROUP 0 MODULE BW020:0 CONTROL BLOCK 1BTD2:0 DATA FILE 0 BT LENGTH N CONTINUOUS BT TIMEOUT 3 FAL FILE ARITH/LOGICAL CONTROL 1R0:0 LENGTH 64 POSITION 0 MODE ALL DEST #1N0:0 EXPRESSION 1BTD1:0

EN DN ER

EN DN ER

PLC-5 adapter-mode processor is configured for rack 2

Effects of Programming Block-Transfers to an Adapter-Mode Controller Channel on Discrete Data Transfer Because the discrete transfer configuration files are used for discrete data transfer as well as block-transfer status exchanges between a supervisory controller and adapter-mode controller channel, performing multiple block-transfer to and from the adapter-mode controller channel impacts discrete data transfer.

Publication 1785-UM012D-EN-P - July 2005

Page 114

7-16

Communicating with a PLC-5 Adapter Channel

Each group/module that is programmed as an adapter channel block transfer uses one byte in the adapter channel’s input destination file. For example: Adapter Channel’s Input Destination File Example Integer File

Scanner’s Output Image Table d for status.

Word

17 0 1 2 3 4

14 13

10 07

04 03

00

15

12 11

08 07

04 03

00

Output File Input File

5 6 7 module 1 module 0 locations of module 0 and 1 data

A block transfer request for group 3, module 0 uses these bytes in the file. This byte is now unavailable for discrete data transfer.

Use care when planning block-transfer and discrete transfers of data to an adapter-mode controller channel. ATTENTION

Publication 1785-UM012D-EN-P - July 2005

Use caution when performing data transfer. The discrete output data is over-written by the block transfer control on a group/module basis. If you write both types of transfer to the same group slot, unpredictable machine operation and possible damage to equipment or injury to personnel can occur.

Page 115

Communicating with a PLC-5 Adapter Channel

7-17

Do not program a block-transfer to group 0, module 1 since this area of the discrete transfer configuration file is used for communication status exchanges between the supervisory controller and the adapter-mode controller channel. For example: Adapter Channel’s Output Source File Example Integer File

Scanner’s Input Image Table Status bits sent to scanner Word

17

14 13

10 07

04 03

00

15

12 11

08 07

04 03

00

0 module 1

Adapter Channel’s Input Destination File Example Integer File

Scanner’s Output Image Table Word

17 0

14 13 x x

10 07

04 03

00

15

12 11

08 07

04 03

00 x module 1

Monitoring the Status of the Adapter Channel The supervisory controller receives status bits from the adapter-mode controller in word 0 of the input image table for the rack that the adapter-mode controller is emulating.

Adapter Channel’s Output Source File Example Integer File

Scanner’s Input Image Table (Octal) Status bits sent to scanner 17

Word

14 13

10 07

04 03

00

15

12 11

08 07

04 03

00

0 Status bits received from adapter channel

Adapter channel status

Publication 1785-UM012D-EN-P - July 2005

Page 116

7-18

Communicating with a PLC-5 Adapter Channel

When this Bit(s)

Is

It Indicates

10 octal (8 decimal)

0 adapter-mode controller is in run mode

1 adapter-mode controller is in program or test mode and 15 octal (13 decimal) 10 octal (8 decimal) and 15 octal (13 decimal)

Write ladder logic in the supervisory controller to monitor the rack-fault bits for the rack that the adapter-mode controller channel is emulating to determine the status of the remote I/O link.

Monitoring the Status of the Supervisory Controller The adapter-mode controller channel reserves bits 10-17 of the first word of the input destination file for status. These bits tell the adapter-mode controller channel the status of the supervisory controller and the integrity of the remote I/O communication link.

Adapter Channel’s Input Destination File Example Integer File

Scanner’s Output Image Table Word

17

14 13

10 07

04 03

00

15

12 11

08 07

04 03

00

0 Not used by adapter channel.

Status of supervisory processor

When this Bit(s)

Is

It Indicates that the Adapter-Mode Controller

10 octal (8 decimal)

1 detects a communication failure or receives a reset command from the supervisory controller will be set if either bit 11 octal (9 decimal) or bit 15 octal (13 decimal) is set

11 octal (9 decimal)

Publication 1785-UM012D-EN-P - July 2005

1 receives a reset command from the supervisory controller (controller in program or test mode)

13 octal (11 decimal) 1 detects that the supervisory controller has powered up; this bit is reset with the first communication from the supervisory controller

15 octal (13 decimal) 1 detects a communication failure (e.g., no communication activity on the remote I/O communication link within the last 100 ms)

Page 117

Communicating with a PLC-5 Adapter Channel

7-19

Monitoring Remote I/O Adapter Channels

To monitor channels that are configured to support adapter mode, use the adapter mode status screen. The data displayed is stored in the diagnostic file you defined in the adapter mode configuration screen of your programming software.

Status Field

Location

Description

Messages sent word 1

Displays the number of messages sent by the channel.

Messages sent with error word 3

Displays the number of messages containing errors sent by the channel.

Messages received word 0

Displays the number of error-free messages received by the channel.

Messages received with error word 2

Displays the number of messages containing errors received by the channel.

Messages unable to receive word 4

Displays number of messages that contained protocol errors or packets that were garbled by the adapter.

Link timeout word 5

Displays the number of times a timeout occurred on the remote I/O link.

No scans received word 6

Displays the number of times an adapter channel did not receive a packet addressed to itself.

Mode changed word 7

Displays the number of times the adapter channel switched to online.

Protocol fault word 8

Displays the number of invalid I/O messages the adapter channel received.

Missed turn-around time word 9

Displays the number of times the adapter channel took longer than 2 ms to process a message packet. The turn around-time for message packet processing is 2 ms.

Publication 1785-UM012D-EN-P - July 2005

Page 118

7-20

Communicating with a PLC-5 Adapter Channel

Notes

Publication 1785-UM012D-EN-P - July 2005