Sei sulla pagina 1di 88

RSLogix5 / PLC-5 Training

Basic Interactions and Design

Avanceon
Regional Office Lahore 19 KM Multan Road Lahore Prepared By: Muhammad Rafi
1

Overview
The overall objective of the curriculum is to increase awareness of the PLCs and develop an understanding of applications and increase the troubleshooting / problem solving skills when dealing with PLCs and the integrated systems. Each module includes a lab assignment to maximize understanding using the hands on approach.

Course Description
Ladder Logic programs often contain a combination of contracts, coils timers, and counters with additional instructions manipulating data in the program at the word level. The basic course further explores the File Manipulation, and Block Transfer instructions. Programs using these instructions include data gathering, calculations, date and time stamping, reports, data concentration, totalizes etc. The basic course continues the development of the skills necessary to trace the flow of word information into, through, and out of logic programs using the Word and File Manipulation instructions. This additional programming knowledge provides the ability to comprehend and troubleshoot detailed control circuits. In addition, the system status and diagnostic data is reviewed and used to help diagnose and solve in-plant control problems quickly.
3

Course Objectives
Refresh knowledge of the major functional components of the Allen-Bradley PLC-5 programmable control system. Refresh knowledge of all communication options present on the PLC-5 platforms and the uses and applications for these communication options. Reexamine how to take advantage of program files as subroutines and in the Enhanced controller as active program files. Refresh knowledge of the relay, compare, math, and data conversion instructions. Apply all studied instructions to create and test your own programs in extensive hands-on lab sessions designed to stimulate and develop a logical approach to problem solving.
4

Course Objectives
Create methods to test programs, develop traps, and follow the flow of information through a series of instructions including Relay, Word, and File level instructions. Develop advanced troubleshooting skills, learn to gather clues to help eliminate non-problem spots, and draw attention to possible problem areas.

Conventions
The table below describes the naming conventions of PLC-5

Front Panel of PLC-5 Processors

Front Panel of PLC-5 EtherNet

Front Panel of PLC-5 ControlNet

Comparison Chart PLC-5

10

Comparison Chart PLC-5

11

PLC-5 Chassis Types Available

12

PLC-5 Power Supplies

13

Key Switch operation Matrix

14

PLC-5 Dip Switch Setting Possessor Chassis

Always Off

2 If an EEPROM module is not installed, the processor's PROC LED indicator blinks, and the processor sets S:11/9, in the major fault status word. 3 A processor fault occurs if processor memory is not valid. 4 You cannot clear processor memory when this switch is ON.

1 Regardless of this switch setting, outputs are reset when either of the following occurs: 1.1: Processor detects a runtime error l .2: An I/O chassis backplane fault occurs l .3: You select program or test mode l .4: You set a status file bit to reset a local rack

15

PLC-5 Dip Switch Setting I/O Chassis

Always Off

Always Off

1- The 1771-AS adapter does not support 1-slot or 1/2-slot addressing. When you use this adapter, set switches 5 and 6 to the OFF position. 2- The 1771-ASB series A adapter does not support 1/2-slot addressing. is ON.
16

PLC-5 Chassis Configuration Plug Settings

17

PLC-5 Dip Switch Setting RIO Module

18

PLC-5 Dip Switch Setting RIO Module


Rack Selection From Dip Switch Settings

19

PLC-5 Communication Port Selection


Rack Selection From Dip Switch Settings

20

PLC-5 I/O Addressing


PLC-5 Use Octal Numbering system for its addressing Example 0~7 then 10~17, 20~27 etc.

21

PLC-5 I/O Addressing


PLC-5 Can be configure up to three type of Hardware (Physical ) I/O Addressing such as 1- Slot I/O Addressing 21 Slot I/O Addressing 32 Slot I/O Addressing

22

PLC-5 Slot I/O Addressing


When you select 1/2-slot addressing, the processor addresses one-half of an I/O module slot as one I/O group. Each physical slot in the chassis corresponds to two input and two output image-table words. The type (unidirectional or bidirectional) and density of the module that you install determines the number of bits that are used in each word.

23

PLC-5 Slot I/O Addressing


Image Table Words Allocated for I/O Group 0

You can mix 8-, 16- and 32-pt I/O modules in any order in the I/O chassis because 32 input bits and 32 output bits are available in the image table for each I/O slot. When you use 8- and 16-pt I/O modules with 1/2-slot addressing, however, you use fewer total I/O bits in our image table.

Image Table Words Allocated for I/O Group 1 24

PLC-5 1 Slot I/O Addressing


When you select 1-slot addressing, the processor addresses one I/O module slot as one I/O group. Each physical slot in the chassis corresponds to an input and output image-table word. The type (unidirectional or bidirectional) and density of module that you install determines the number of bits used in these words.

25

PLC-5 1 Slot I/O Addressing

26

PLC-5 2 Slot I/O Addressing


When you select 2-slot addressing, the processor addresses two I/O module slots as one I/O group. Each physical 2-slot I/O group corresponds to one word (16 bits) in the input image table and one word (16 bits) in the output image table. The type (unidirectional or bidirectional) and density of a module that you install determines the number of bits that are used in each word. Important: You cannot use 32-point I/O modules with 2slot addressing.

27

PLC-5 2 Slot I/O Addressing


Because each 16pt module uses a full word in the image table, the only type of module that you can install in a 2slot I/O group with a 16pt input module is an 8 or 16pt output module that performs a complementary function (inputs and outputs complement each other). Since all block transfer modules are bidirectional, they cannot be used to complement either input or output modules.
28

PLC-5 Slot Summary


Addressing 1/2slot Guidelines
One half of an I/O module slot = 1 group Each physical slot in the chassis corresponds to two words (32 bits) in input and output image table Use any mix of 8, 16, and 32point I/O or block transfer and intelligent modules. Using 8point and 16point I/O modules results in fewer total I/O. With the processor resident local rack set for 1/2slot addressing, you cannot force the input bits for the upper word of any slot that is empty or that has an 8point or 16point I/O module. For example, if you have an 8point or a 16point I/O module in the first slot of your local rack (words 0 and 1 of the I/O image table, 1/2slot addressing), you cannot force the input bits for word 1 (I:001) on or off.

1slot

One I/O module slot = 1 group Each physical slot in the chassis corresponds to one word (16 bits) in the input image table and one word (16 bits) in the output image table. When you use 32point I/O modules, you must install as a pair an input module and an output module in an even/odd pair of adjacent I/O group; if you use an input module in slot 0, you must use an output module in slot 1 (or it must be empty). This Configuration gives the maximum usage of I/O. Use any mix of 8 and 16point I/O modules, block transfer or intelligent modules in a single I/O chassis. Using 8point modules results in fewer total I/O.
Two I/O module slots = 1 group Each physical 2slot I/O group corresponds to one word (16 bits) in the input image table and one word (16 bits) in the output image table. When you use 16point I/O modules, you must install as a pair an input module and an output module in. An I/O group; if you use an input module in slot 0, you must use an output module in slot 1 (or it must be empty). This configuration gives you the maximum usage of I/O. You cannot use a block transfer module and a 16point module in the same I/O group because. Block transfer modules use 8 bits in both the input and output table. Therefore, 8 bits of the 16point module would conflict with the block transfer module. you cannot use 32point I/O modules. 29

2slot

PLC-5 Assigning Racks


The number of racks in a chassis depends on the chassis size and the addressing mode:

30

PLC-5 Memory Address

31

RSLogix 5

Rslogix 5 Quick Reference

32

Hardware requirements
an Intel Pentium II or greater microprocessor 128 MB of RAM for Windows 2000, or Windows XP installations 70 MB of available hard disk space 256-color SVGA graphics adapter with 800x600 resolution A CD-ROM drive Chapter 1 Installing and activating

33

Software requirements
The operating system must be one of the following: Microsoft Windows 2000 Windows XP (with or without Service Pack 2) Windows Server 2003 (with or without Service Pack 1) Windows Server 2003 R2 RSLogix 5 relies on RSLinx Classic communication software, version 2.51.00 or later. One copy of the RSLinx Classic Lite software is included with the RSLogix 5 software. Note: RSLogix 5 will not run on earlier versions of Windows, nor will it run on Windows Vista.

34

Overview of RSLogix 5
RSLogix 5 software is a 32-bit Windows ladder logic programming package for the Allen-Bradley PLC-5 family of programmable logic controllers. RSLogix 5 is compatible with programs created with any of Rockwell Softwares PLC-5 programming packages.

35

RSLogix 5 software features


A Free-form Ladder Editor that lets you concentrate on the application logic instead of proper syntax as you write your program A Powerful Project Verifier that you use to build a list of errors you can navigate to make corrections at your convenience Drag And Drop editing to quickly move data table elements from one data file to another, rungs from one subroutine or project to another, or instructions from rung to rung within a project Search And Replace to quickly change occurrences of a particular address or symbol A Point-and-click interface (project tree) that lets you access all the folders and files contained in your project A Custom Data Monitor to view separate data elements together and observe interactions

36

Rslogix 5 screen elements

37

Opening multiple program files


To open a program file, simply double-click the file in the project tree. To open additional files, double-click each file that you want to open in the project tree. A tab for each open program file appears at the bottom of the ladder view.

38

Configure a driver in RSLinx


Of course, you will want your program to run in a controller. That means you will need some way to connect your computer to your controller and you will have to tell the software how you are connected. Communications from RSLogix 5 take place through another software package, called RSLinx Classic. RSLogix 5 talks to RSLinx Classic, which in turn talks to your communications devices.
39

Configure a driver in RSLinx


The driver you use depends on the way your processor is physically connected to your computer. There is a wide variety of possible physical connections. its important you know which type of connection your system is using and how that physical connection is configured. For instance, if your processor is connected to your network through DH+ Network you should use compatible driver in RSLinx
40

Configure a driver in RSLinx


Open RSLinx Classic by clicking Start > Programs > Rockwell Software > RSLinx > RSLinx. RSLinx Classic starts in a minimized mode you will see an RSLinx icon in your Windows System Tray. (The System Tray is a part of the Windows Taskbar by default, the System Tray is in the lower right-hand corner of your screen.) Click the RSLinx icon to open the RSLinx window.

This is the RSLinx icon that appears in the System Tray


41

Configure a driver in RSLinx


In RSLinx Classic, click Communications > Configure Drivers. This opens the Configure Drivers window. In the Configure Drivers window, select the driver you need to use based on your physical connection to the processor. For example, if you are connecting with a 1784-KT card, select the 1784- KT/KTX(D) /PKTX(D) /PCMK for DH+/DH485 devices driver.

42

Configure a driver in RSLinx

Click Add New to add the driver to the Configured Drivers list
43

Configure a driver in RSLinx


To display an RSWho window, click Communications > RSWho

44

Rslogix 5 Go Online
From the Comms menu, click System Comms. This displays the Communications window. (If RSLinx Classic is not running, it will start.) The Communications window is very much like the RSWho window you encountered while configuring your communications driver. In the Communications window tree, open the driver you configured. The processor you want to program should be visible. Click the processor, then click OK.
45

Program Scan

Input Data

User Program

Output Data

Getting results

46

Rslogix 5 New Project


To create a new project: 1. Select File > New. 2. Provide information about your processor on the Select Processor Type dialog this information appears on the dialog. If not, specify the communications settings here. Click OK.

47

Rslogix 5 Existing Project


To open an existing project: 1. Select File > Open. 2. Click the file you want to open and click Open. If the file you want to open does not appear on the list: Use the Look in list to navigate to a different folder. Use the Files of type list to display files with an extension other than .RSP, .X5, .PC5, or .AF5.

48

Rslogix 5 Add the chassis and I/O


To add a chassis: 1. From the Controller folder in the project tree, double-click the IO Configuration icon. The I/O Configuration - Chassis Table dialog appears. 2. Right-click inside the I/O Configuration dialog and select Add Chassis. The Edit Chassis Properties dialog box appears, with the Chassis tab selected. 3. Select the chassis type by clicking one of the option buttons. A list is displayed showing the available chassis. 4. Select the desired chassis from the list. 5. If youve selected a Flex I/O chassis, enter the number of slots in the Number of slots field. Enter a value from 1 to 8. 6. Document the DIP switch settings by selecting the configuration settings in the pull-down list boxes in the DIP Switches section of the dialog box. 7. Click OK to accept your choices and close the dialog box.

49

Rslogix 5 Add the chassis and I/O

50

Configure the communication channels


Enhanced (New Platform), Protected (Secure), Ethernet, and ControlNet PLC-5 processors have communication channels that must be configured. (For Soft Controllers, configure the PLC-5 I/O, Remote I/O scan list, and SLC 500 I/O. Double-click the appropriate icons under IO Configuration in the project tree.) To configure communication channels: 1. Double-click the Channel Configuration icon in the Controller folder in the Project tree. 2. Edit the properties on the dialog and click OK.
51

Configure the communication channels

52

The chassis table


The chassis table is the starting point for adding, deleting, or configuring chassis, processors, adapters and I/O modules. To display this window double click the I/O Configuration icon in the project tree. Use the right mouse button menus to perform tasks in the Chassis Table. The chassis table contains information about the current configuration of your I/O chassis, including: The chassis type The processor (or adapter) for the chassis Whether the chassis is inhibited or reset The rack addressing mode for the chassis The rack, group, and slots encompassed by the chassis Whether the chassis is set to use complementary I/O
53

Adding and configuring a chassis


By default each processor in your project is associated with one I/O chassis. You can add additional chassis to a processor to expand the number of I/O modules that processor can address. Adding a chassis consists of selecting the type of chassis you are using for your project and documenting the chassis DIP switch settings.

54

Adding and configuring a chassis


1. From the Controller folder in the Project tree, double-click the I/O Configuration icon. The I/O Configuration - Chassis Table dialog appears. 2. Right-click in the Chassis Table and select Add Chassis. The Edit Chassis Properties dialog box appears, with the Chassis tab selected. 3. Select the chassis type by clicking one of the option buttons. A list is displayed showing the available chassis. 4. Select the desired chassis from the list. 5. If youve selected a Flex I/O chassis, enter the number of slots in the Number of slots field. Enter a value from 1 to 8. 6. Document the DIP switch settings by selecting the configuration settings in the pull-down list boxes in the DIP Switches section of the dialog box. 7. Click Apply to accept your choices and leave the dialog box open or click OK to accept your choices and close the dialog box.
55

Adding and configuring a chassis


Each I/O chassis has an I/O adapter. The adapter is either a PLC-5 processor, configured when you begin a project, or an I/O adapter. Select chassis DIP switch settings, add or change the type of adapter, or establish configuration settings for the adapter in any chassis by double-clicking on the processor or adapter in the Chassis Table (or right-clicking and selecting Properties).
56

Adding and configuring a chassis

57

Adding I/O Module

58

Adding I/O Module

59

Adding I/O Module

60

Rslogix 5 Enter a logic program


When you open a program file by double-clicking its icon in the project tree, the ladder file opens in the right half of the RSLogix 5 window. Usually program file #2, the main program file, is opened when you open a project. If you have not begun to enter any ladder logic, only the end rung will show. To enter ladder logic to a new program: 1. Click on the end rung and then select the new rung icon on the User tab of the instruction toolbar. 2. To place an instruction on a rung, click its icon on the instruction toolbar. You can place several instructions on a rung in sequence by clicking the icons one after another. RSLogix 5 places instructions from left to right.

61

Rslogix 5 Enter a logic program


2. Assign an address to each instruction. Double-click an instruction, type the address in the empty field that appears above the instruction, then press the Enter key. With RSLogix 5 you can also drag and drop addresses from a data table file onto instructions in your ladder logic. 4. Continue adding rungs, remembering to save your file periodically with File > Save.

RSLogix 5 supports a file-based editor. This means that you can: create and/or edit multiple rungs at a time, enter addresses before you actually create data table files for your I/O, enter symbols before you have assigned addresses for them in the database, enter instructions without having to provide addresses until just before file validation occurs
62

Rslogix 5 Enter a logic program


XIC Examine if Close

Rung Branch
Insert New Rung

XIO Examine if Open

OTE Energize Output

Rung Number Current Rung Selected

OTU Output Unlatch


Rung OTL Output Latch

Instruction Group Tab


63

Rslogix 5 Enter a logic program

64

Timer Instructions TON, TOF, RTO

65

On-Delay Timer

66

OFF-Delay Timer

67

Retentive Timer On-Delay

Retentive Timer must be reset by Reset Command

68

Counters

Status Bits: CU-Count Up CD-Count Down DN-Count Up done OV-Overflow UN-Underflow

69

UP-Counters (CTU)

The accumulated value of Counter is Retentive the counter will retain its value until reset.
70

UP-Counters (CTU)

The accumulated value of Counter is Retentive the counter will retain its value until reset.
71

Limite Instruction
Limit instruction use for parameters should be with in user defined range. In this instruction the run will only true if the test parameter should be in limits . If the Test value (N7:15) is >= the Low Limit (N7:10) and <= the High Limit (N7:20), this instruction is true.

72

Compare Instruction
If the expression is true, this input instruction is true. The CMP instruction can perform these operations: equal (=), less than (<), less than or equal (<=), greater than (>), greater than or equal (>=), not equal (<>), and complex expressions (up to 80 characters).

73

Compare Instruction

74

Compute Instructions
Compute instruction will perform multiple mathematical commands in single Command. Examples are as under. If the input conditions go true, evaluate the Expression N7:4 - (N7:6 * N7:10) and store the result in the Destination (N7:3). The CPT instruction can perform these operations: add (+), subtract (-), multiply (*), divide (|), convert from BCD (FRD), convert to BCD (TOD), square root (SQR), logical and (AND), logical or (OR), logical not (NOT), exclusive or (XOR), negate (-) clear (0), and move, X to the power of Y (**), radians (RAD), degrees (DEG), log (LOG), natural log (LN), sine (SIN), cosine (COS), tangent (TAN), inverse sine (ASN), inverse cosine (ACS) inverse tangent (ATN), and complex expressions (up to 80 characters)

75

Exercise of logic program


Examples 1 Push Button press Test Lamp On Release Off 2 Motor start Stop 3 Motor Star Delta 4 Traffic Signal 5 3 Lamp Sequence start with toggle button switched on, one after one Blinking 5 times then blink all together 5 times and then on at last until toggle button switched off 6 One Push On and One Push OFF

Exercise of logic program


1 The JSR, SBR, and RET instructions direct the processor to go to a separate subroutine file within the ladder program, scan that subroutine file once, and return to the point of departure. 2 The JSR instruction directs the processor to the specified subroutine file, and if required, defines the parameters passed to and received from the subroutine. The optional SBR instruction is the header instruction that stores incoming parameters. Use SBR only if you want to pass parameters. The RET instruction ends the subroutine, and if required, stores parameters to be returned to the JSR instruction in the main program.

Exercise of logic program

Key Status Words

79

Key Status Words

80

Key Status Words

81

Key Status Words

82

Key Status Words

83

Key Status Words

84

Key Status Words

85

Key Status Words

86

Questions?
87

Thanks for your Attention


88

Potrebbero piacerti anche