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

The text of a manual · part 6 of 11

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

Pages 39 to 52 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 39

Chapter

4

Creating Ladder Logic Programs Chapter Objectives

Chapter 4 provides information about ladder logic programs for products connected to a Remote I/O communications module. In this chapter, you will read about the following: • I/O image table. • Control Features. • Datalinks. • Example ladder logic programs for PLC, SLC, and Logix5550 controllers.

! !

Understanding the I/O Image Table

ATTENTION: When you configure a system for the first time, you should disconnect the motor from the machine or the process during the initial testing. ATTENTION: The configurations and program 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.

The Remote I/O communications module allows a SCANport product to look and act like a Remote I/O chassis when connected to a programmable controller. Data contained in the input/output image table is transferred between the programmable controller by the Remote I/O scanner, the same as with any Remote I/O chassis. You control the location of data transferred by setting the rack address and starting group. You control the amount of data by setting the DIP switches on SW3. Important: The communications module does not scale the data that is transferred. Consequently, all scaling of the data must be done in the controller. Refer to the user manual for your SCANport product for details on device units. Important: The Remote I/O to SCANport conversion is asynchronous. Data sent to the adapter for transfer to the drive must be maintained until the drive has received data.

Page 40

4–2

Creating Ladder Logic Programs

DIP switches on SW3 determine how the data contained in the programmable controller I/O image table is used in the drive. Figure 4.1 shows an I/O image table. Figure 4.1

I/O Image Table Remote I/O

Controller Image

SCANport Remote I/O Communications Module

SCANport Product

Output Image O:010 O:011 O:012 O:013 O:014 O:015 O:016 O:017

8 words maximum

Block Transfer 11 Logic Command Reference 1 Datalink A1 1 1 Datalink A2 1 Datalink B1 1 Datalink B2 Datalink C1 1 Datalink C2 1 Datalink D1 1 1 Datalink D2

Message Handler Logic Command Reference Data In A1 Data In A2 Data In B1 Data In B2 Data In C1 Data In C2 Data In D1 Data In D2

Input Image I:010 I:011 I:012 I:013 I:014 I:015 I:016 I:017

8 words maximum

1

1

Block Transfer 1 Logic Status 1 Feedback Datalink A1 1 Datalink A2 1 Datalink B1 1 1 Datalink B2 1 Datalink C1 1 Datalink C2 1 Datalink D1 1 Datalink D2

Message Handler Logic Status Feedback Data Out A1 Data Out A2 Data Out B1 Data Out B2 Data Out C1 Data Out C2 Data Out D1 Data Out D2

Optionally enabled using DIP switches on the module. Refer to Chapter 2.

Control Features

SW 3.1 through SW 3.3 select the basic control features: Block Transfer, Logic Command/Status, and Reference/Feedback. When enabled, each of these features adds one word to the input I/O image table and one word to the output I/O image table.

Datalinks

SW 3.4 through SW 3.8 enable or disable the datalinks.

Description A datalink is a type of pointer used by some SCANport products to transfer data to and from the controller. Datalinks allow a parameter value to be changed without using a block transfer message. When enabled, each datalink consumes two 16-bit words in both the input and output image table of the controller. When SW3.8 is ON, the last datalink is truncated so that it uses only one word in the input and output image table.

Page 41

Creating Ladder Logic Programs

4–3

Products That Support Datalinks To use datalinks, your SCANport product must support them. Refer to your product user manual.

Using Datalinks The following are the rules for using datalinks: • Normally, each enabled datalink reserves two words in both the input and output image tables of the controller. This increases your I/O image size. The starting module group on the module must be set to support the size of the I/O image table. Truncation can be used to minimize the required rack size used by the Remote I/O module. Refer to Chapter 2. • Each set of datalink parameters in a SCANport product can be used by only one communications module. If more than one module is connected to a single SCANport product, they must not attempt to use the same datalink. • Parameter settings in the SCANport product determine the data passed through the datalink mechanism. Refer to the user manual for your SCANport product for more information. • When you use a datalink to change a value, the value is not written to the EEPROM. The value is stored in volatile memory and lost when the drive loses power. • The 1336 FORCE and 1336 IMPACT drives use datalinks in a special way. Refer to their user manuals for information.

Example Application 1 The simplest application of datalinks is to set a parameter number into a Data In parameter. The controller output image table word connected to this datalink will then control the value of the parameter set into the Data In parameter. For example, to change the value of parameter 27 in a 1336 PLUS drive, you need to: 1. In the 1336 PLUS drive, set parameter 111 (Data In A1) to 27. 2. On the communications module, slide SW 3.4 to ON. See Figure 2.6. 3. If your communications module is configured like Figure 4.1, word 3 (fourth word) in the output image will be the value that parameter 27 uses. This value is stored in volatile memory and lost when the drive loses power.

Page 42

4–4

Creating Ladder Logic Programs

Example Application 2 Another application for datalinks is to set a parameter into a Data Out parameter. The controller input image table word connected to this datalink will then receive the value of the parameter programmed into the Data Out parameter. For example, to monitor the value of parameter 27 in a 1336 PLUS drive, you need to: 1. In the 1336 PLUS drive, set parameter 119 (Data Out A1) to 27. 2. On the module, slide SW 3.4 to ON. See Figure 2.6. 3. If your communications module is configured like Figure 4.1, word 3 (fourth word) in the input image would receive the value of parameter 27.

Example Application 3 A third application for datalinks is to change multiple parameters with only two datalinks enabled. During each scan, this application changes a parameter and then verifies that it has been changed. For example, to change parameters 27, 28, and 29 in a 1336 PLUS drive, you need to: 1. In the 1336 PLUS drive, set the following parameters: Parameter: 111 (Data In A1) 119 (Data Out A1) 113 (Data In B1)

Setting 112 112 120

2. On the module, slide SW 3.4 and SW 3.5 to ON to enable datalinks A and B (See Figure 2.6). Slide the other DIP switches on SW3 to OFF. A parameter number must be moved or copied into word 0 (first word) and word 2 (third word) of the output image for each scan. The new parameter value must be moved or copied into word 1 (second word) of the output image. In our example, we move the following data into the input image table: Scan 1 2 3

Word 0 and 2 27 28 29

Word 1 123 456 789

Description Parameter 27 will be set to 123. Parameter 28 will be set to 456. Parameter 29 will be set to 789.

A successful scan yields the following results in word 0 and 1 in the input image table: Scan 1 2 3

Word 0 27 28 29

Word 1 123 456 789

Description Parameter 27 has been set to 123. Parameter 28 has been set to 456. Parameter 29 has been set to 789.

Logic can be developed for the controller that uses the values in word 0 (first word) and word 1 (second word) of the input image to verify that the change was completed successfully.

Page 43

Creating Ladder Logic Programs

4–5

Figure 4.2 illustrates the first scan in Example Application 3. Figure 4.2

Example Scan using Datalinks

Remote I/O

SCANport Remote I/O Communications Module

Controller Image

1336 PLUS Drive

Output Image 1

O:010 = 27 1 O:011 = 123 O:012 = 27 O:013 O:014 O:015 O:016 O:017

Block Transfer Logic Command Reference Datalink A1 Datalink A2 Datalink B1 Datalink B2 Datalink C1 Datalink C2 Datalink D1 Datalink D2

Message Handler Logic Command Reference P111 (Data In A1) = Sends "27" to P112 P112 (Data In A2) = Sends "123" to P27 P113 (Data In B1) = Sends "27" to P120 P114 (Data In B2) P115 (Data In C1) P116 (Data In C2) P117 (Data In D1) P118 (Data In D2)

Block Transfer Logic Status Feedback Datalink A1 Datalink A2 Datalink B1 Datalink B2 Datalink C1 Datalink C2 Datalink D1 Datalink D2

Message Handler Logic Status Feedback P119 (Data Out A1) = Gets "27" from P112 P120 (Data Out A2) = Gets "123" from P27 P121 (Data Out B1) P122 (Data Out B2) P123 (Data Out C1) P124 (Data Out C2) P125 (Data Out D1) P126 (Data Out D2)

Input Image I:010 = 27 I:011 = 123 I:012 I:013 I:014 I:015 I:016 I:017

1 In this example scan, the parameter being changed is P27-[Preset Freq 1]. Its new value will be 123.

Settings for the Ladder Logic Program Examples

The example ladder logic programs in this manual use the following settings.

Remote I/O Communications Module Settings The Remote I/O module used for examples in this manual is connected to a 1336 PLUS drive. It is configured for the following: • Rack Address = 2 • Rack Size = 1/2 Rack • Starting Group = 0 DIP switches on SW3 are set as follows: Switch Off = 0 On = 1

Settings 8 ---> 1 Description 00001110 Logic command/status, reference/ feedback, and datalink A are enabled. All other features are disabled.

Page 44

4–6

Creating Ladder Logic Programs

SCANport Product Settings Logic Command bits In our example, we are using a 1336 PLUS drive. The Logic Command bits for it are: 15

14

13

12

11

Logic Command Bits 10 9 8 7 6

5

4

3

2

1 X

X X X X X X X X

X

X

X

X

X

X

0 Function X Stop➀ Start Jog Clear Faults Direction Local MOP Increment Accel Rate Select Decel Rate Select Reference Selection

MOP Decrement

Description 1=Stop, 0=No Operation 1=Start, 0=No Operation 1=Jog, 0=No Operation 1=Clear, 0=No Operation 00=No Operation, 01=Forward, 10=Reverse 1=Local, 0=Multiplexed 1=Increment MOP, 0=No Operation 00=No Operation, 01=Rate 1, 10=Rate 2 00=No Operation, 01=Rate 1, 10=Rate 2 000=No Operation 001=External Reference 1 (Par 5) 010=External Reference 2 (Par 6) 011=Preset 3 100=Preset 4 101=Preset 5 110=Preset 6 111=Preset 7 1=Decrement MOP, 0=No Operation

➀ Asserting a 1 will stop the product.

The 1305 drives, 1336 PLUS II drives, and 1336 Spider drives use the same Logic Command and Logic Status data. For other drives, refer to their user manuals.

Page 45

Creating Ladder Logic Programs

4–7

Logic Status Bits The Logic Status bits for the 1336 PLUS drive that we use in our example are as follows: 15

14

13

12

11

Logic Status Bits 10 9 8 7 6

5

4

3

2

1 X

X X X X X X X X

X

X

X

X

X

X

0 Function X Enabled Running Command Direction Rotating Direction Acceleration Deceleration Warning Fault At Speed Local

Reference Source

Description 1=Enabled, 0=Not Enabled 1=Running, 0=Not Running 1=Forward, 0=Reverse 1=Forward, 0=Reverse 1=Accelerating, 0=Not 1=Decelerating, 0=Not 1=Warning Present, 0=Not 1=Faulted, 0=Not Faulted 1=At Speed, 0=Not At Speed 000=Terminal I/O has Local 001=Port 1 has Local 010=Port 2 has Local 011=Port 3 has Local 100=Port 4 has Local 101=Port 5 has Local 110=Port 6 has Local 111=Multiplexed Control 0000=External Reference 1 0001 – 0111=Presets 1 – 7 1000=External Reference 2 1001 – 1110=Port 1 – 6 Direction 1111=Jog

The 1305 drives, 1336 PLUS II drives, and 1336 Spider drives use the same Logic Command and Logic Status data. For other drives, refer to their user manuals.

Page 46

4–8

Creating Ladder Logic Programs

Example PLC Ladder Logic Program

Refer to page 4–5 for the settings of the module and the 1336 PLUS drive used for this example. Figure 4.3

0000

Example Ladder Logic Program for a PLC

Machine START Pushbutton I:000

Drive START Command O:020 1

0

0001

Machine STOP Pushbutton I:000 1 Drive STOP Command O:020 0

0004

0005

0006

0007

0 Drive Running Status Bit I:020 1 Drive Frequency Command MOV Move Source N7:0 16000< Dest O:021 16000<

0002

0003

Drive STOP Command O:020

Machine JOG Pushbutton I:000

Drive JOG Command O:020

2

2

Machine Clear Faults Pushbutton I:000

Drive Clear Faults Command O:020

3

3

Drive Running Status Bit I:020

Machine Running Indicator O:000

1

0

Drive Faulted Status Bit I:020

Machine Faulted Indicator O:000

7

1 Drive Data In A1 (Data to Drive) MOV Move Source Dest

0008

N7:1 500< O:022 500<

END

Page 47

Creating Ladder Logic Programs

4–9

About the PLC Ladder Logic Program Rung 0001

0002

0003

0004

0005

0006 0007 0008

Description When the machine Start push button is pressed, the PLC sends a START command to the drive. The drive will start if no STOP command is being sent by the PLC or any other control device. (Start button is a normally open contact in this example.) SCANport products will start only if the start bit transitions high while the stop bit is already low. The address (O:020) is determined by the rack and starting group settings on the module. In the example, we use rack 02 and starting group module word 0. When the machine Stop push button is pressed, the PLC sends a STOP command to the drive. (Stop button is normally closed contact in this example) A frequency command is transferred from the PLC data table to the drive. A range of 0 to 32767 is equivalent to zero to maximum frequency. (In this example, the drive frequency select parameters are set to receive a frequency reference from the Remote I/O module.) When the machine Jog button is pressed, the PLC will send a JOG command to the drive. The drive will start and run at the programmed jog frequency if no STOP command is being sent by the PLC or other control device. (Jog button is normally open contact in this example.) When the machine Clear Faults push button is pressed, the PLC sends a CLEAR FAULTS command to the drive. (Clear Faults button is a momentary normally open contact in this example.) When the drive is running, the PLC will receive a Drive Running status bit. When the drive is faulted, the PLC will receive a Drive Faulted status bit. A value is moved from the PLC data table into the drive parameter specified by the Data In A1 parameter in the drive.

Page 48

4–10

Creating Ladder Logic Programs

Example SLC Ladder Logic Program

Refer to page 4–5 for the settings of the module and the 1336 PLUS drive used for this example. Figure 4.4

Example Ladder Logic Program for an SLC

Machine START Pushbutton I:1

Drive START Command O:1

128 1747-SN Machine STOP Pushbutton I:1

257 1747-SN Drive STOP Command O:1

129 1747-SN Drive STOP Command O:1

256 1747-SN Drive Running Status Bit I:1

256 1747-SN

257 1747-SN

0000

0001

Drive Frequency Command MOV Move Source

0002

Dest

N7:0 16000< O:1.17 16000<

Machine JOG Pushbutton I:1

Drive JOG Command O:1

130 1747-SN Machine Clear Faults Pushbutton I:1

258 1747-SN Drive Clear Faults Command O:1

131 1747-SN Drive Running Status Bit I:1

259 1747-SN Machine Running Indicator O:1

257 1747-SN Drive Faulted Status Bit I:1

129 1747-SN Machine Faulted Indicator O:1

0003

0004

0005

0006 263 1747-SN

0007

Drive Data In A1

(Data to Drive) MOV Move Source Dest

0008

135 1747-SN

N7:1 500< O:1.18 500<

END

Page 49

Creating Ladder Logic Programs

4–11

About the SLC Ladder Logic Program Rung 0001

0002

0003

0004

0005

0006 0007 0008

Description When the machine Start push button is pressed, the SLC sends a START command to the drive. The drive will start if no STOP command is being sent by the SLC or any other control device. (Start button is a normally open contact in this example.) SCANport products will start only if the start bit transitions high while the stop bit is already low. The address (O:1) is determined by the slot and word. It is displayed as a continuous bit number. In the example, we use rack 02 and starting group module word 0. When the machine Stop push button is pressed, the SLC sends a STOP command to the drive. (Stop button is normally closed contact in this example) A frequency command is transferred from the SLC data table to the drive. A range of 0 to 32767 is equivalent to zero to maximum frequency. (In this example, the drive frequency select parameters are set to receive a frequency reference from the Remote I/O module.) When the machine Jog button is pressed, the SLC will send a JOG command to the drive. The drive will start and run at the programmed jog frequency if no STOP command is being sent by the SLC or other control device. (Jog button is normally open contact in this example.) When the machine Clear Faults push button is pressed, the PLC sends a CLEAR FAULTS command to the drive. (Clear Faults button is a momentary normally open contact in this example.) When the drive is running, the SLC will receive a Drive Running status bit. When the drive is faulted, the SLC will receive a Drive Faulted status bit. A value is moved from the SLC data table into the drive parameter specified by the Data In A1 parameter in the drive.

About the SLC Display When you are creating an SLC ladder logic program, you can display information by slot and bit or by slot, word, and bit. Figure 4.5 slot = 1 bit = 257

SLC Displays Drive START Command O:1

Drive START Command O:1.16

257 1747-SN

1 1747-SN slot = 1 word = 16 bit = 1

Page 50

4–12

Creating Ladder Logic Programs

Example Logix5550 Ladder Logic Program

Refer to page 4–5 for the settings of the module and the 1336 PLUS drive used for this example. Figure 4.6

0

1

4

5

6

7

(End)

Drive START Command Bit PLUS_IO:O.Data[1].1

Machine Start Pushbutton Local:2:I.Data.1

Drive STOP Command Bit PLUS_IO:O.Data[1].0

Machine Stop Pushbutton Local:2:I.Data.0 Drive Drive STOP RUNNING Command Status Bit Bit PLUS_IO:O.Data[1].0 PLUS_IO:I.Data[1].1

2

3

Example Ladder Logic Program for a Logix5550

Move Source

Drive Frequency Reference MOV

Reference 0 Dest PLUS_IO:O.Data[2] 2#0000_0000_0000_0000

Machine JOG Pushbutton Local:2:I.Data.2

Drive JOG Command Bit PLUS_IO:O.Data[1].2

Machine CLEAR FAULTS Pushbutton Local:2:I.Data.3

Drive CLEAR FAULTS Command Bit PLUS_IO:O.Data[1].3

Drive RUNNING Status Bit PLUS_IO:I.Data[1].1

Machine RUNNING Indicator Lamp Local:3:O.Data.0

Drive FAULTED Status Bit PLUS_IO:I.Data[1].7

Machine FAULTED Status Bit Local:3:O.Data.1 Drive Frequency Feedback MOV

Move Source PLUS_IO:I.Data[2] 2#0000_0000_0000_0000 Dest Feedback 0

Page 51

Creating Ladder Logic Programs

4–13

About the Logix5550 Ladder Logic Program Rung 0001

0002 0003

0004

0005

0006 0007 0008

Description When the machine Start push button is pressed, the Logix5550 sends a START command to the drive. The drive will start if no STOP command is being sent by the Logix5550 or any other control device. (Start button is a normally open contact in this example.) SCANport products will start only if the start bit transitions high while the stop bit is already low. In the example, we use rack 02 and starting group module word 0. The tags are configured to represent this address. When the machine Stop push button is pressed, the Logix5550 sends a STOP command to the drive. (Stop button is normally closed contact in this example) A frequency command is transferred from the Logix5550 data table to the drive. A range of 0 to 32767 is equivalent to zero to maximum frequency. (In this example, the drive frequency select parameters are set to receive a frequency reference from the Remote I/O module.) When the machine Jog button is pressed, the Logix5550 will send a JOG command to the drive. The drive will start and run at the programmed jog frequency if no STOP command is being sent by the Logix5550 or other control device. (Jog button is normally open contact in this example.) When the machine Clear Faults push button is pressed, the Logix5550 sends a CLEAR FAULTS command to the drive. (Clear Faults button is a momentary normally open contact in this example.) When the drive is running, the Logix5550 will receive a Drive Running status bit. When the drive is faulted, the Logix5550 will receive a Drive Faulted status bit. A value is moved from the Logix5550 data table into the drive parameter specified by the Data In A1 parameter in the drive.

Page 52

4–14

Creating Ladder Logic Programs

End of Chapter 4