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

The text of a manual · part 7 of 11

Bulletin 1203 Remote I/O Communications Module User Manual: Chapter 5

Pages 53 to 62 of 96, from Bulletin 1203 Remote I/O Communications Module User Manual

The original document is the PDF (3.4 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 1203-GD1

Page 53

Chapter

5

Using Block Transfer Messages Chapter Objectives

Chapter 5 provides information about Block Transfer messages. In this chapter, you will read about the following: • General information on block transfers. • The Remote I/O status word. • Data storage. • Example ladder logic programs using Block Transfer messages.

!

!

Understanding Block Transfer

ATTENTION: The sample programs and block transfer examples shown in this manual are intended solely for purposes of example. Since there are many variables and requirements associated with any particular installation, Rockwell Automation does not assume responsibility or liability (to include intellectual property liability) for actual use based upon the examples shown in this publication. ATTENTION: Hazard of equipment damage exists. If block transfer messages are programmed to frequently write parameter data, the EEPROM (Non-Volatile Storage) will quickly exceed its life cycle and cause the product to malfunction. Do not create a program that frequently uses block transfer messages to write parameter data to a product. Datalinks do not write to the EEPROM and should be used for frequently changed parameters.

Discrete transfer is the method used by a controller to transfer data to and from the module during every rack scan. The module transfers this data to and from the SCANport product. Block transfer is the method used by a controller to transfer data that does not require continuous updates. To perform this function, the module provides a status word to the controller during the normal discrete transfer scan. This status word occupies the first module group (word) in the I/O image table for the designated rack (communications module). The status word is then used by the ladder program to control the controller Block Transfer Write (BTW) and Block Transfer Read (BTR) functions. Important: The Remote I/O communications module does not scale or manipulate data that is transferred between the controller and SCANport product. The data in the controller must be converted to device units before being sent to the SCANport product.

Page 54

5–2

Using Block Transfer Messages

Understanding the Block Transfer Status Word

The block transfer status word is returned from the Remote I/O module. It is the first word associated with the rack in the controller input image table. This status word indicates the condition of the Remote I/O module itself and is not part of the standard block transfer instructions in the ladder program. Figure 5.1 details the individual bits. Figure 5.1

Remote I/O Status Word

Bit 17 Bit 16 Bit 15 Bit 14 Bit 13 Bit12 Bit 11 Bit 10 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0

Reserved for future use. Block Transfer Ready (BT_READY) Block Transfer Write in Progress (BTW_IN_PROG) Block Transfer Read Available (BTR_AVAIL) Block Transfer Wait (BT_WAIT) Block Transfer Error (BT_ERROR) Block Transfer Write Available (BTW_AVAIL) Reserved for future use. Reserved for future use.

Status Description Block Transfer The SCANport product and Remote I/O module are communicating and are Ready ready to process block transfers. Block Transfer A block transfer write is in progress between the controller and Remote I/O module. This bit is cleared when the data transfer to the module is complete. Write in Progress Block Transfer The Remote I/O module has data available for the controller to read. Read Available Block Transfer The Remote I/O module is communicating with the SCANport product. This Wait bit is cleared when the data transfer between the module and SCANport product is complete. Block Transfer An error has occurred during communications with the SCANport product, or Error the BTW data is invalid. Block Transfer The Remote I/O module is ready to receive a Block Transfer Write. Write Available

Figure 5.2 BTW Request

BT Write Available Status Bit 15

BT Wait Status Bit 13 BT Read Data Available Status Bit 12

BT Write In Progress Status Bit 11

Bit Timing

BTW data at Remote I/O Module

BTW Complete

BTR Request

Page 55

Using Block Transfer Messages

5–3

Understanding Data Storage

In order to use the block transfer instructions in the ladder program, it is necessary to reserve several words for data storage. Some of these words are required for internal use by the block transfer function, and some contain the block transfer message information. Refer to Appendix B for detailed information on the required data in data files for different block transfer messages.

Example PLC Block Transfers

Figure 5.3 and Figure 5.4 are examples of block transfer programming from PLC controllers to a Remote I/O communications module. The BTW_AVAIL and BTR_AVAIL bits from the module status word (I:010 in these examples) are used in these examples. The examples also show how user logic can be used to enable or disable the block transfer operations. Figure 5.3

Example for a PLC-5/15 or PLC-5/25

This rung performs a Block Transfer Write to the 1203-GD1 at Rack Address 1, Starting Group 0 (the Module number is always 0 with these adapters). The data instructs the adapter to send a SCANport message. When this message has completed, the response can be read with a BTR. User Logic B3:0

BTW Available I:010

BTR Available I:010

0

15

12

0000

BTW Block Transfer Write Module Type Generic Block Transfer Rack 001 Group 0 Module 0 Control Block N11:0 Data File N12:0 Length 64 Continuous No

EN DN ER

This rung performs a Block Transfer Read from the 1203-GD1 at Rack Address 1, Starting Group 0 (the Module number is always 0 with these adapters). The response contains the data read from the SCANport Product (as instructed by the previous BTW). BTR Available I:010 0001 12

0002

BTR Block Transfer Read Module Type Generic Block Transfer Rack 001 Group 0 Module 0 Control Block N11:5 Data File N12:70 Length 64 Continuous No

EN DN ER

END

Page 56

5–4

Using Block Transfer Messages

Figure 5.4

Example for a PLC-5/20, PLC-5/40, PLC-5/60, PLC-5/80

This rung performs a Block Transfer Write to the 1203-GD1 at Rack Address 1, Starting Group 0 (the Module number is always 0 with these adatpers). The data instructs the adapter to send a SCANport message. When this message has completed, the response can be read with a BTR. User Logic B3:0

BTW Available I:010

BTR Available I:010

0

15

12

0000

BTW Block Transfer Write Module Type Generic Block Transfer Rack 001 Group 0 Module 0 Control Block BT11:0 Data File N12:0 Length 64 Continuous No

EN DN ER

This rung performs a Block Transfer Read from the 1203-GD1 at Rack Address 1, Starting Group 0 (the Module number is always 0 with these adapters). The response contains the data read from the SCANport Product (as instructed by the previous BTW). BTR Available I:010 0001 12

BTR Block Transfer Read Module Type Generic Block Transfer Rack 001 Group 0 Module 0 Control Block BT11:1 Data File N12:70 Length 64 Continuous No

EN DN ER

END

0002

The following table defines the contents of the example PLC block transfer messages (Figure 5.3 and Figure 5.4). Content Rack

Description The rack address is determined by the switch settings on the Remote I/O module. (Refer to Chapter 2.) In Figure 5.3 and Figure 5.4, rack address 1 is used. Group The group number is the first group in the rack associated with the Remote I/O module. This is called the starting group. It is determined by the size of the rack. (Refer to Chapter 2.) In Figure 5.3, the rack has been set up as a full 8 group rack; therefore, the starting group 0 is used. Module The module number is associated with the block transfer in the associated slot. This will always be 0. Control The control block is a predefined set of words that contain bit information associated with the Block block transfer function. In the PLC-5/15 and PLC-5/25, the control block requires 5 contiguous words. In the PLC 5/40 and 5/60 the control block may be either an integer type, and would require 5 contiguous words, or a block transfer type and would require 1 element. In Figure 5.3, words N11:0 through N11:4 have been reserved for the bit array in the BTW block. Words N11:5 through N11:9 have been reserved for the BTR block. In Figure 5.4, element BT11:0 has been reserved for the bit array in the BTW block. Element BT11:1 has been reserved for the BTR block. Data File The data file is the address of the message sent by the BTW or received by the BTR block. It contains both header and data information. The number of words required for the data file is dependent on the type of message being sent. Refer to Appendix B for information regarding the header and data that must be included in the data file for each message. In Figure 5.3 and Figure 5.4, N12:0 is the first word in the data file for the BTW block and N12:70 is the first word for the BTR block. Length Length specifies the length of the block transfer message in words. It varies depending on the type of message being sent. The BTW and BTR instruction lengths may be different. Refer to the message examples in Appendix B for the minimum lengths required for each message. Continuous Continuous specifies whether the block transfer block is to be executed continuously or only when the rung is true. This should always be set to No.

Page 57

Using Block Transfer Messages

Example SLC Block Transfers

5–5

Figure 5.5 and the following data file illustrate an example block transfer program from an SLC controller to a Remote I/O communications module. This program uses the first block transfer area in the scanner located in the first slot. It also uses data files N10 and B3. The example data file contains the data needed to request a read full of parameter 78. The length of the block transfer data file is loaded into N10:1. The value 0 is loaded into N10:2 for the rack, group, slot address for the block transfer because this address is 0, 0, 0 (refer to page 5–7). Data for the BTW is loaded into N10:10. Once the data has been loaded, the user enabled bit B3:0/0 is set. When the block transfers have completed, the BTR data is copied into N10 starting at N10:100 and B3:0/0 is cleared by the program. Figure 5.5.

Example for an SLC-500

This rung clears the Virtual BT Command word on the first scan. This ensures that the Block Transfer logic starts up reliably. First Pass S:1 0000 15

MOV Move Source Dest

This rung copies the BT Status buffer from the 1747-SN into the SLC into a file that we will refer to as the Virtual BT Status Buffer. 0001

0 0< N10:0 -32640<

COP Copy File Source #M1:1.100 Dest #N10:100 Length 74

If the user logic is calling for a Block Transfer message to occur and the Gx1 is ready to receive a BTW, this rung sets up the BT buffer for a BTW and then enables it.

User Logic B3:0

BTR Available I:1.0

BTW Available I:1.0

Virtual BT.EN Bit N10:0

0

10 1747-SN

13 1747-SN

15

0002

Virtual BT.Type Bit 0 = BTW 1 = BTR N10:0 U 7 Virtual BT.EN Bit N10:0 L 15 Virtual BT.DN Bit N10:100 U 13

This rung turns off the Virtual BT_Enable bit when the BTW has completed. Virtual BT.Type Bit 0 = BTW 1 = BTR N10:0

Virtual BT.DN Bit N10:100

7

13

0003

Virtual BT.EN Bit N10:0 U 15

Page 58

5–6

Using Block Transfer Messages

Figure 5.5

SLC Block Transfer Continued

When the Gx1 indicates that it is ready for a BTR, this rung sets up the BT buffer for a BTR and enables it. BTR Available I:1.0

Virtual BT.EN Bit N10:0

10 1747-SN

15

Virtual BT.Type Bit 0 = BTW 1 = BTR N10:0 L 7

0004

Virtual BT.EN Bit N10:0 L 15 Virtual BT.DN Bit N10:100 U 13

This rung copies the BT Status data already received from the 1747-SN into an N file within the SLC and then clears the Virtual BT_Enable and User Logic bits. Virtual BT.Type Bit 0 = BTW 1 = BTR N10:0

Virtual BT.DN Bit N10:100

7

13

COP Copy File Source #N10:100 Dest #N11:0 Length 74

0005

Virtual BT.EN Bit N10:0 U 15 User Logic B3:0 U 0

This rung copies the BT information to the 1747-SN for execution. COP Copy File Source #N10:0 Dest #M0:1.100 Length 74

0006

END

0007

Example Data File Data is displayed as decimal values. N10:0 N10:10 ... N10:100 N10:110 N10:120 N10:130 ...

0 128 3

1 64 768

2 0 78*

0 24 24948 0

64 768 20256 8224

0 78 29813 8224

3

4

5

6

7

8

9

7 17440

354 8241

1 8224

1 8224

1 3850

0 0

24900 125

Page 59

Using Block Transfer Messages

5–7

Calculating the Rack, Group, Slot Address The Rack, Group, Slot address for a block transfer is calculated as shown in the table below. Rack, Group, Slot Address 0,0,0 1,0,0 1,2,0 2,4,0

Decimal Value 0 100 120 240

This value is needed as part of the data file that is copied to the M0-file block transfer buffer in the 1747-SN RIO Scanner module.

Example Logix5550 Block Transfers

Figure 5.6 is an example of block transfer programming from a Logix5550 controller to a Remote I/O communications module.

Page 60

5–8

Using Block Transfer Messages

Figure 5.6

Example for a Logix5550

Due to the asynchronous nature of the ControlLogix platform, input data may change during a program scan. This rung makes a local copy of the Block Transfer Status word to ensure proper synchronization between the ControlLogix program and the RIO Scanner. Make a Local Copy of the 1203-GD1's Block Transfer Status Word MOV Move Source PLUS_IO:I.Data[0] 2#0000_0000_0000_0000 Dest GD1_LocalCopy 2#0000_0000_0000_0000

0

This rung sends a BTW to the drive if the drive's RIO adapter is ready to accept a BTW and no response from a previous BTW is available to be read with a BTR. The data instructs the RIO adapter to send a SCANport message to the drive. When this message has completed, the response can be read with a BTR. The BTW Available and BTR Available bits will not be set until the SCANport message has been completed. BTW Available GD1_LocalCopy.13

BTR Available GD1_LocalCopy.10

1 MSG Type - Block Transfer Write Message Control PLUS_BTW_Control

...

EN DN ER

...

EN DN ER

This rung sends a BTR to the drive whenever the drive's RIO adapter indicates that it has a response message available from a previous BTW. The data read contains the response to the SCANport message sent by the previous BTW. BTR Available GD1_LocalCopy.10 2

MSG Type - Block Transfer Read Message Control PLUS_BTR_Control

(End)

Notes Regarding Block Transfer Programming

•

•

A Block transfer subroutine can be used to transfer more data than can be moved in a single block transfer. If this is done, the block transfers must be carefully sequenced so that one Block Transfer Write and one Block Transfer Read occur for each portion of the sequence. One method of doing this is to set a latch bit to enable the Block Transfer Write and unlatch this bit when the Block Transfer Write is completed. When the Block Transfer Read completes, the program can then set up the data for the next transfer. The status bits from the BTW and BTR Control files (.EN, .DN, .ER) may change at any time during a program scan. If they are used by the program they should be copied to a file and the program should use the copied versions.

Page 61

Chapter

6

Troubleshooting Chapter Objectives

Chapter 6 provides information about the LEDs on the Remote I/O modules. It also provides basic troubleshooting procedures. In this chapter, you will read about the following: • Locating the LEDs. • Using the LEDs to troubleshoot.

LEDs on the Remote I/O Communications Module

Figure 6.1 LED Status Indicators

1

DS3 DS4

5

DS2

4

DS1

2 3

DS5

5 4

3

2 1

1203-GD1 Module and 1203-GK1 Module

1336-GM1 Board

Number LED Color 1 Fault Red 2 SCANport STS Green➀ 3 Health Green➀ 4 Rem I/O ACT Green➀ 5 Rem I/O STS Green ➀ Early versions of Remote I/O modules may use amber LEDs instead of green.

Page 62

6–2

Troubleshooting

FAULT LED LED Status Red (Steady) Red (Blinking)

Cause • Unrecoverable Fault • Recoverable Fault • If Health LED is steady, a DIP switch is set incorrectly, there is a bad cable, or an RIO connection between the controller and adapter has not been made.

Off

• Normal Operation

Corrective Action • Replace the module. • Verify that the module is configured correctly. • Verify that the SCANport and Remote I/O cables are correctly wired and securely connected. • Configure or auto-configure the controller.➁ • None

SCANport STS LED LED Status➀ Green (Steady) Green (Blinking)

Cause • Normal Operation • If FAULT LED is also blinking, the connected device is not compatible. • No SCANport Connection.

Corrective Action • None • Verify that the connected product is compatible. Refer to Chapter 1.

LED Status➀ Green (Steady)

Cause • Normal Operation • If FAULT LED is steady, a DIP switch is set incorrectly, there is a bad cable, or an RIO connection between the controller and adapter has not been made.

Off

• Internal module fault

Corrective Action • None • Verify that the module is correctly configured. • Verify that SCANport and Remote I/O cables are correctly wired and securely connected. • Configure or auto-configure the controller.➁ • Cycle power.

Off

• Verify that the module is connected to the SCANport product. • Verify that the SCANport product is powered. • Cycle power to the module.

Health LED

Rem I/O ACT LED LED Status➀ Green (Steady) Off

Cause • Normal Operation • No data is being received from the controller.

Corrective Action • None • Verify that Remote I/O is online. • Verify that the controller is in run mode. • Verify that rack addressing is set correctly. • Verify that the module is connected to the controller.

Rem I/O STS LED LED Status Green (Steady) Green (Blinking) Off

Cause Corrective Action • Normal Operation • None • Controller is in reset, program, or test mode. • Return the controller to run mode. • Controller has more rack space allocated than is used. • Configure or auto-configure the controller.➁ • Module is not communicating with the controller. • Verify that the module is connected to the controller. • Module is not connected to the product. • Verify that the controller is configured to recognize the module. • Verify that the module is connected to the SCANport product. ➀ Early versions of Remote I/O modules use amber LEDs instead of green. ➁ The SCANport product should be powered to ensure a successful auto-configure.