logix5000 controllers commom procedures

Upload: juan-camilo-delgado-aguirre

Post on 02-Jun-2018

241 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 Logix5000 Controllers Commom Procedures

    1/574

    Logix5000ControllersCommonProcedures

    1756 ControlLogix,1769 CompactLogix,1789 SoftLogix,1794 FlexLogix, PowerFlex700S with DriveLogix

    Programming Manual

  • 8/10/2019 Logix5000 Controllers Commom Procedures

    2/574

    Important User Information Solid state equipment has operational characteristics differing from those ofelectromechanical equipment. Safety Guidelines for the Application,Installation and Maintenance of Solid State Controls(Publication SGI-1.1available from your local Rockwell Automation sales office or online athttp://www.ab.com/manuals/gi) describes some important differencesbetween solid state equipment and hard-wired electromechanical devices.

    Because of this difference, and also because of the wide variety of uses forsolid state equipment, all persons responsible for applying this equipmentmust satisfy themselves that each intended application of this equipment isacceptable.

    In no event will Rockwell Automation, Inc. be responsible or liable forindirect or consequential damages resulting from the use or application ofthis equipment.

    The examples and diagrams in this manual are included solely for illustrativepurposes. Because of the many variables and requirements associated withany particular installation, Rockwell Automation, Inc. cannot assumeresponsibility or liability for actual use based on the examples and diagrams.

    No patent liability is assumed by Rockwell Automation, Inc. with respect to

    use of information, circuits, equipment, or software described in this manual.Reproduction of the contents of this manual, in whole or in part, without

    written permission of Rockwell Automation, Inc. is prohibited.

    Throughout this manual we use notes to make you aware of safetyconsiderations.

    WARNI NGIdentifies information about practices or circumstancesthat can cause an explosion in a hazardous environment,

    which may lead to personal injury or death, propertydamage, or economic loss.

    IMPORTANT Identifies information that is critical for successfulapplication and understanding of the product.

    ATTENTIONIdentifies information about practices or circumstancesthat can lead to personal injury or death, propertydamage, or economic loss. Attentions help you:

    identify a hazard

    avoid a hazard

    recognize the consequence

    SHOCK HAZARD Labels may be located on or inside the drive to alert

    people that dangerous voltage may be present.

    BURN HAZARD Labels may be located on or inside the drive to alertpeople that surfaces may be dangerous temperatures.

  • 8/10/2019 Logix5000 Controllers Commom Procedures

    3/574

    1 Publication 1756-PM001G-EN-P - March 2004

    Summary of Changes

    Introduction This release of this document contains new and updated information.To find new and updated information, look for change bars, as shownnext to this paragraph.

    Updated Information The document contains the following changes:

    Section: Change: Page:

    Describe a User-Defined Data Type Use the pass through of descriptions to reduce the time it takes todocument a project.

    3-21

    Prioritize Periodic and Event Tasks Corrections to the example of how tasks interrupt one another 4-7

    Choose the Trigger for an Event Task Addition of consumed tag trigger for CompactLogix, FlexLogix, andDriveLogix controllers

    4-20

    Export/Import Ladder Logic Create a file that contains the ladder logic, tags, data types, parametervalues, and documentation for a specific function, operation, or process.

    8-14

    Develop a Fault Routine Integration of the Power-Up Handler information into this section.This was done to clarify when a major fault occurs duringpower-up and how to handle it, if required.

    Clarification regarding a fault due to a mode change

    15-1

    Clear a Major Fault During Prescan Some controllers now automatically clear a fault that is due an arraysubscript that is beyond the range of the array (out of range) duringprescan.

    15-8

    Create a User-Defined Major Fault If you create a user-defined major fault, use a value between 990 to 999for the fault code. These codes are reserved for user-defined faults.

    15-13

    Minor Fault Codes Correction to missing fault codes for the GSV/SSV instructions 16-4Choose a Controller That Has NonvolatileMemory

    Addition of the following controllers:

    CompactLogix5331

    CompactLogix5332E

    CompactLogix5335CR

    ControlLogix5560M03SE

    DriveLogix5730

    17-3

    Estimate Memory Information Offline Estimate the free and used memory of a controller while still offline 19-2

    View Run Time Memory Information View the free and used memory of a controller while the controller isrunning

    19-3

    http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    4/574

    Publication 1756-PM001G-EN-P - March 2004

    Summary of Changes 2

  • 8/10/2019 Logix5000 Controllers Commom Procedures

    5/574

    1 Publication 1756-PM001G-EN-P - March 2004

    Preface

    Purpose of this Manual This manual guides the development of projects for Logix5000controllers. It provides step-by-step procedures on how to performthe following tasks, which are common to all Logix5000 controllers:

    Organize Tasks, Programs, and Routines

    Organize Tags

    Design a Sequential Function Chart

    Program Routines using ladder logic, function block diagram,sequential function chart, or structured text programminglanguages

    Communicate with Other Controllers

    Communicate and Process ASCII Information

    Handle Faults

    The termLogix5000 controllerrefers to any controller that is based onthe Logix5000 operating system, such as:

    CompactLogixcontrollers

    ControlLogixcontrollers

    DriveLogixcontrollers

    FlexLogixcontrollers

    SoftLogix5800controllers

    This manual works together with user manuals for your specific typeof controller. The user manuals cover tasks such as:

    Place and configure I/O

    Communicate with devices over various networks

    Maintain the battery

    Who Should Use thisManual

    This manual is intended for those individuals who programapplications that use Logix5000 controllers, such as:

    software engineers control engineers

    application engineers

    instrumentation technicians

  • 8/10/2019 Logix5000 Controllers Commom Procedures

    6/574

    Publication 1756-PM001G-EN-P - March 2004

    Preface 2

    When to Use this Manual Use this manual when you perform these actions:

    develop the basic code for your application

    modify an existing application

    perform isolated tests of your application

    As you integrate your application with the I/0 devices, controllers, andnetworks in your system:

    Refer to the user manual for your specific type of controller.

    Use this manual as a reference, when needed.

    How to Use this Manual This manual is divided into the basic tasks that you perform whileprogramming a Logix5000 controller.

    Each chapter covers a task.

    The tasks are organized in the sequence that you will typicallyperform them.

    As you use this manual, you will see some terms that are formatteddifferently from the rest of the text:

    Text that is: Identifies: For example: Means:

    Italic the actual name of an item that yousee on your screen or in an example

    Right-click User-Defined Right-click on the item that is namedUser-Defined.

    bold an entry in the Glossary Type a name If you want additional information, referto namein the Glossary.

    If you are viewing the PDF file of themanual, click nameto jump to theglossary entry.

    courier information that you must supplybased on your application (avariable)

    Right-clickname_of_program

    You must identify the specific program inyour application. Typically, it is a name orvariable that you have defined.

    enclosed in brackets a keyboard key Press [Enter]. Press the Enter key.

  • 8/10/2019 Logix5000 Controllers Commom Procedures

    7/574

    i Publication 1756-PM001G-EN-P - March 2004

    Table of Contents

    Chapter 1

    Getting Started Using This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1Create a Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1

    Create a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2

    Configure a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3Explore a Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4Controller Organizer . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6

    Create Routines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7Define a Routine for Each Section of Your Machine or Process1-7Identify the Programming Languages That Are Installed. 1-7Choose a Programming Language for Each Section . . . . 1-8Divide Each Routine Into More Meaningful Increments . 1-9Create a Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10Open a Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11

    Verify a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12Save a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12Configure a Communication Driver . . . . . . . . . . . . . . . . . . 1-13Download a Project to the Controller. . . . . . . . . . . . . . . . . 1-14Select a Mode for the Controller . . . . . . . . . . . . . . . . . . . . 1-16Manually Clear a Major Fault . . . . . . . . . . . . . . . . . . . . . . . 1-17Configure the Execution of a Task. . . . . . . . . . . . . . . . . . . 1-18

    Configure a Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19Create Multiple Programs . . . . . . . . . . . . . . . . . . . . . . . . . 1-20

    Create a Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-20Configure a Program . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21

    Access Status Information . . . . . . . . . . . . . . . . . . . . . . . . . 1-22Monitor Status Flags. . . . . . . . . . . . . . . . . . . . . . . . . . . 1-22Get and Set System Data . . . . . . . . . . . . . . . . . . . . . . . 1-23

    Adjust the System Overhead Time Slice . . . . . . . . . . . . . . . 1-26Adjust the System Overhead Time Slice . . . . . . . . . . . . 1-28

    View Scan Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-29View Task Scan Time. . . . . . . . . . . . . . . . . . . . . . . . . . 1-29View Program Scan Time . . . . . . . . . . . . . . . . . . . . . . . 1-30

    Adjust the Watchdog Time . . . . . . . . . . . . . . . . . . . . . . . . 1-31Adjust the Watchdog Timer for a Task . . . . . . . . . . . . . 1-31

    Chapter 2Communicate with I/O Using This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1

    Configure an I/O Module . . . . . . . . . . . . . . . . . . . . . . . . . 2-1Requested Packet Interval . . . . . . . . . . . . . . . . . . . . . . 2-2Communication Format . . . . . . . . . . . . . . . . . . . . . . . . 2-3Electronic Keying. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6

    Address I/O Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7Buffer I/O. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8

    When to Buffer I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8

  • 8/10/2019 Logix5000 Controllers Commom Procedures

    8/574

    Publication 1756-PM001G-EN-P - March 2004

    Table of Contents ii

    Buffer I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8

    Chapter 3

    Organize Tags Using this Chapter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1

    Defining Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1Tag Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5

    Guidelines for Tags. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7Create a Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9

    Create a Tag Using a Tags Window . . . . . . . . . . . . . . . 3-9Create Tags Using Microsoft Excel . . . . . . . . . . . . . . . 3-10

    Create an Array. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13Create an Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16

    Create a User-Defined Data Type. . . . . . . . . . . . . . . . . . . . 3-17

    Guidelines for User-Defined Data Types . . . . . . . . . . . . 3-19Create a User-Defined Data Type . . . . . . . . . . . . . . . . . 3-19

    Describe a User-Defined Data Type . . . . . . . . . . . . . . . . . . 3-21Turn Pass-Through and Append Descriptions On or Off 3-22Paste a Pass-Through Description . . . . . . . . . . . . . . . . . 3-22

    Address Tag Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23Assign Alias Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24

    Display Alias Information . . . . . . . . . . . . . . . . . . . . . . . 3-25Assign an Alias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26

    Assign an Indirect Address . . . . . . . . . . . . . . . . . . . . . . . . 3-27Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-29

    Chapter 4

    Manage Multiple Tasks Using This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1Select the Controller Tasks . . . . . . . . . . . . . . . . . . . . . . . . 4-2

    Use Caution in the Number of Tasks That You Use. . . . 4-5Prioritize Periodic and Event Tasks . . . . . . . . . . . . . . . . . . 4-5

    Additional Considerations. . . . . . . . . . . . . . . . . . . . . . . 4-6Leave Enough Time for Unscheduled Communication . . . . 4-8

    Avoid Overlaps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9Manually Check for Overlaps . . . . . . . . . . . . . . . . . . . . 4-10

    Programmatically Check for Overlaps . . . . . . . . . . . . . . 4-11Configure Output Processing for a Task . . . . . . . . . . . . . . . 4-13Manually Configure Output Processing . . . . . . . . . . . . . 4-15Programmatically Configure Output Processing . . . . . . . 4-16

    Inhibit a Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17Manually Inhibit or Uninhibit a Task. . . . . . . . . . . . . . . 4-17Programmatically Inhibit or Uninhibit a Task. . . . . . . . . 4-19

    Choose the Trigger for an Event Task . . . . . . . . . . . . . . . . 4-20Using the Module Input Data State Change Trigger. . . . . . . 4-22

    http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    9/574

    Publication 1756-PM001G-EN-P - March 2004

    Table of Contents iii

    How an I/O Module Triggers an Event Task . . . . . . . . . 4-22Make Sure Your Module Can Trigger an Event Task . . . 4-25Checklist for an Input Event Task. . . . . . . . . . . . . . . . . 4-26Estimate Throughput . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28

    Estimate Throughput . . . . . . . . . . . . . . . . . . . . . . . . . . 4-30Additional Considerations. . . . . . . . . . . . . . . . . . . . . . . 4-31Using the Motion Group Trigger . . . . . . . . . . . . . . . . . . . . 4-32

    Checklist for a Motion Group Task . . . . . . . . . . . . . . . . 4-33Using the Axis Registration Trigger . . . . . . . . . . . . . . . . . . 4-34

    Checklist for an Axis Registration Task . . . . . . . . . . . . . 4-35Using the Axis Watch Trigger . . . . . . . . . . . . . . . . . . . . . . 4-38

    Checklist for an Axis Watch Task . . . . . . . . . . . . . . . . . 4-39Using the Consumed Tag Trigger. . . . . . . . . . . . . . . . . . . . 4-42

    Maintain the Integrity of Data. . . . . . . . . . . . . . . . . . . . 4-44Synchronize Multiple Controllers . . . . . . . . . . . . . . . . . 4-45

    Checklist for the Producer Controller . . . . . . . . . . . . . . 4-46Checklist for the Consumer Controller . . . . . . . . . . . . . 4-47Producer Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-48Consumer Controller . . . . . . . . . . . . . . . . . . . . . . . . . . 4-49

    Using the EVENT Instruction Trigger . . . . . . . . . . . . . . . . . 4-50Programmatically Determine if an EVENT InstructionTriggered a Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-51Checklist for an EVENT Instruction Task. . . . . . . . . . . . 4-51

    Create a Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-53Create an Event Task . . . . . . . . . . . . . . . . . . . . . . . . . . 4-53Create a Periodic Task . . . . . . . . . . . . . . . . . . . . . . . . . 4-54

    Define a Timeout Value for an Event Task . . . . . . . . . . . . . 4-55Assign a Timeout Value to an Event Task . . . . . . . . . . . 4-55Programmatically Configure a Timeout . . . . . . . . . . . . . 4-56Programmatically Determine if a Timeout Occurs . . . . . 4-57

    Chapter 5

    Design a Sequential FunctionChart

    When to Use This Procedure . . . . . . . . . . . . . . . . . . . . . . . 5-1How to Use This Procedure. . . . . . . . . . . . . . . . . . . . . . . . 5-1

    What is a Sequential Function Chart? . . . . . . . . . . . . . . . . . 5-2How to Design an SFC: Overview . . . . . . . . . . . . . . . . . . . 5-4Define the Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5Choose How to Execute the SFC . . . . . . . . . . . . . . . . . . . . 5-6Define the Steps of the Process . . . . . . . . . . . . . . . . . . . . . 5-6

    Follow These Guidelines . . . . . . . . . . . . . . . . . . . . . . . 5-7SFC_STEP Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8

    Organize the Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12Sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14Selection Branch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15Simultaneous Branch . . . . . . . . . . . . . . . . . . . . . . . . . . 5-16

    http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    10/574

    Publication 1756-PM001G-EN-P - March 2004

    Table of Contents iv

    Wire to a Previous Step . . . . . . . . . . . . . . . . . . . . . . . . 5-17Add Actions for Each Step . . . . . . . . . . . . . . . . . . . . . . . . . 5-18

    How Do You Want to Use the Action? . . . . . . . . . . . . . 5-18Use a Non-Boolean Action . . . . . . . . . . . . . . . . . . . . . . 5-18

    Use a Boolean Action. . . . . . . . . . . . . . . . . . . . . . . . . . 5-20SFC_ACTION Structure. . . . . . . . . . . . . . . . . . . . . . . . . 5-20Describe Each Action in Pseudocode . . . . . . . . . . . . . . . . . 5-21Choose a Qualifier for an Action . . . . . . . . . . . . . . . . . . . . 5-23Define the Transition Conditions . . . . . . . . . . . . . . . . . . . . 5-24

    Transition Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-26How Do You Want to Program the Transition? . . . . . . . 5-26Use a BOOL Expression. . . . . . . . . . . . . . . . . . . . . . . . 5-26Call a Subroutine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-27

    Transition After a Specified Time. . . . . . . . . . . . . . . . . . . . 5-28Turn Off a Device at the End of a Step . . . . . . . . . . . . . . . 5-32

    Choose a Last Scan Option. . . . . . . . . . . . . . . . . . . . . . 5-32Use the Dont Scan Option. . . . . . . . . . . . . . . . . . . . . . 5-34Use the Programmatic Reset Option . . . . . . . . . . . . . . . 5-35Use the Automatic Reset Option. . . . . . . . . . . . . . . . . . 5-38

    Keep Something On From Step-to-Step . . . . . . . . . . . . . . . 5-40How Do You Want to Control the Device? . . . . . . . . . . 5-40Use a Simultaneous Branch . . . . . . . . . . . . . . . . . . . . . 5-41Store and Reset an Action. . . . . . . . . . . . . . . . . . . . . . . 5-42Use One Large Step . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-44

    End the SFC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-45At the End of the SFC, What Do You Want to Do?. . . . . 5-45

    Use a Stop Element . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-45Restart (Reset) the SFC . . . . . . . . . . . . . . . . . . . . . . . . . 5-46SFC_STOP Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-47

    Nest an SFC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-49Pass Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-50

    Configure When to Return to the OS/JSR . . . . . . . . . . . . . . 5-50Pause or Reset an SFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-51Execution Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-51

    Chapter 6

    Program a Sequential Function

    Chart

    When to Use This Procedure . . . . . . . . . . . . . . . . . . . . . . . 6-1Before You Use This Procedure. . . . . . . . . . . . . . . . . . . . . 6-1How to Use This Procedure. . . . . . . . . . . . . . . . . . . . . . . . 6-2

    Add an SFC Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3Add and Manually Connect Elements . . . . . . . . . . . . . . 6-3Add and Automatically Connect Elements . . . . . . . . . . . 6-4Drag and Drop Elements . . . . . . . . . . . . . . . . . . . . . . . 6-4

    Create a Simultaneous Branch . . . . . . . . . . . . . . . . . . . . . . 6-5Start a Simultaneous Branch . . . . . . . . . . . . . . . . . . . . . 6-5End a Simultaneous Branch . . . . . . . . . . . . . . . . . . . . . 6-5

    http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    11/574

    Publication 1756-PM001G-EN-P - March 2004

    Table of Contents v

    Create a Selection Branch . . . . . . . . . . . . . . . . . . . . . . . . . 6-6Start a Selection Branch . . . . . . . . . . . . . . . . . . . . . . . . 6-6End a Selection Branch . . . . . . . . . . . . . . . . . . . . . . . . 6-7

    Set the Priorities of a Selection Branch. . . . . . . . . . . . . . . . 6-8

    Return to a Previous Step . . . . . . . . . . . . . . . . . . . . . . . . . 6-9Connect a Wire to the Step. . . . . . . . . . . . . . . . . . . . . . 6-9Hide a Wire. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10Show a Hidden Wire . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10

    Rename a Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11Configure a Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11

    Assign the Preset Time for a Step . . . . . . . . . . . . . . . . . 6-11Configure Alarms for a Step . . . . . . . . . . . . . . . . . . . . . 6-12Use an Expression to Calculate a Time . . . . . . . . . . . . . 6-12

    Rename a Transition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-14Program a Transition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-14

    Enter a BOOL Expression. . . . . . . . . . . . . . . . . . . . . . . 6-14Call a Subroutine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-15

    Add an Action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-16Rename an Action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-16Configure an Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-17

    Change the Qualifier of an Action. . . . . . . . . . . . . . . . . 6-17Calculate a Preset Time at Runtime. . . . . . . . . . . . . . . . 6-18Mark an Action as a Boolean Action . . . . . . . . . . . . . . . 6-19

    Program an Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-19Enter Structured Text . . . . . . . . . . . . . . . . . . . . . . . . . . 6-19Call a Subroutine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-21

    Assign the Execution Order of Actions. . . . . . . . . . . . . . . . 6-22Document the SFC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-23

    Add Structured Text Comments . . . . . . . . . . . . . . . . . . 6-23Add a Tag Description . . . . . . . . . . . . . . . . . . . . . . . . . 6-24Add a Text Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-25

    Show or Hide Text Boxes or Tag Descriptions . . . . . . . . . . 6-26Show or Hide Text Boxes or Descriptions. . . . . . . . . . . 6-26Hide an Individual Tag Description . . . . . . . . . . . . . . . 6-27

    Configure the Execution of the SFC . . . . . . . . . . . . . . . . . . 6-28Verify the Routine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-29

    Chapter 7Program Structured Text When to Use This Chapter. . . . . . . . . . . . . . . . . . . . . . . . . 7-1

    Structured Text Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1Assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2

    Specify a non-retentive assignment . . . . . . . . . . . . . . . . 7-3Assign an ASCII character to a string. . . . . . . . . . . . . . . 7-4

    Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4Use arithmetic operators and functions . . . . . . . . . . . . . 7-6Use relational operators . . . . . . . . . . . . . . . . . . . . . . . . 7-7

    http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    12/574

    Publication 1756-PM001G-EN-P - March 2004

    Table of Contents vi

    Use logical operators . . . . . . . . . . . . . . . . . . . . . . . . . . 7-9Use bitwise operators. . . . . . . . . . . . . . . . . . . . . . . . . . 7-10Determine the order of execution. . . . . . . . . . . . . . . . . 7-10

    Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-11

    Constructs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-12IF...THEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-13CASE...OF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-16FORDO. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-19

    WHILEDO. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-22REPEATUNTIL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-25Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-28

    Chapter 8

    Program Ladder Logic When to Use This Procedure . . . . . . . . . . . . . . . . . . . . . . . 8-1Before You Use This Procedure. . . . . . . . . . . . . . . . . . . . . 8-1

    How to Use This Procedure. . . . . . . . . . . . . . . . . . . . . . . . 8-1Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2

    Instruction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2Branch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2Rung Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4

    Write Ladder Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-5Choose the Required Instructions . . . . . . . . . . . . . . . . . 8-5

    Arrange the Input Instructions . . . . . . . . . . . . . . . . . . . 8-6Arrange the Output Instructions . . . . . . . . . . . . . . . . . . 8-7Choose a Tag Name for an Operand. . . . . . . . . . . . . . . 8-8

    Enter Ladder Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-10

    Append an Element to the Cursor Location . . . . . . . . . . 8-10Drag and Drop an Element . . . . . . . . . . . . . . . . . . . . . 8-11

    Assign Operands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-11Create and Assign a New Tag. . . . . . . . . . . . . . . . . . . . 8-11Choose a Name or an Existing Tag . . . . . . . . . . . . . . . . 8-13Drag a Tag From the Tags Window . . . . . . . . . . . . . . . 8-13

    Assign an Immediate (Constant) Value . . . . . . . . . . . . . 8-13Export/Import Ladder Logic. . . . . . . . . . . . . . . . . . . . . . . . 8-14

    When You Import Rungs . . . . . . . . . . . . . . . . . . . . . 8-14Export Rungs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-15Import Rungs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-16Check Alias Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-16

    Verify the Routine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-17

    Chapter 9Program a Function Block

    Diagram

    When to Use This Procedure . . . . . . . . . . . . . . . . . . . . . . . 9-1Before You Use This Procedure. . . . . . . . . . . . . . . . . . . . . 9-1How to Use This Procedure. . . . . . . . . . . . . . . . . . . . . . . . 9-1Identify the Sheets for the Routine . . . . . . . . . . . . . . . . . . . 9-2

    http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    13/574

    Publication 1756-PM001G-EN-P - March 2004

    Table of Contents vii

    Choose the Function Block Elements . . . . . . . . . . . . . . . . . 9-3Choose a Tag Name for an Element. . . . . . . . . . . . . . . . . . 9-4Define the Order of Execution. . . . . . . . . . . . . . . . . . . . . . 9-5

    Data Latching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5

    Order of Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7Resolve a Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8Resolve Data Flow Between Two Blocks . . . . . . . . . . . 9-11Create a One Scan Delay . . . . . . . . . . . . . . . . . . . . . . . 9-12Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-12

    Identify any Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . 9-13Define Program/Operator Control . . . . . . . . . . . . . . . . . . . 9-14

    Add a Sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-18Add a Function Block Element . . . . . . . . . . . . . . . . . . . . . 9-18Connect Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-20

    Show or Hide a Pin . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-20

    Wire Elements Together . . . . . . . . . . . . . . . . . . . . . . . . 9-21Mark a Wire with the Assume Data Available Indicator . 9-21

    Assign a Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-22Create and Assign a New Tag. . . . . . . . . . . . . . . . . . . . 9-22Rename the Tag of a Function Block . . . . . . . . . . . . . . 9-23

    Assign an Existing Tag . . . . . . . . . . . . . . . . . . . . . . . . . 9-23Assign an Immediate Value (Constant). . . . . . . . . . . . . . . . 9-24

    Use an IREF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-24Enter a Value in the Tag of a Block . . . . . . . . . . . . . . . 9-24

    Connect Blocks with an OCON and ICON . . . . . . . . . . . . . 9-25Add an OCON. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-25

    Add an ICON. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-25Verify the Routine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-26

    Chapter 10

    Communicate with Other Devices Using This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1

    Inhibit a Connection . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2Manage a Connection Failure . . . . . . . . . . . . . . . . . . . . 10-5

    Produce and Consume a Tag. . . . . . . . . . . . . . . . . . . . . . . 10-9Controllers and Networks that Support Produced/ConsumedTags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-10Connection Requirements of a Produced or Consumed Tag.10-10Organize Tags for Produced or Consumed Data . . . . . 10-12

    Adjust for Bandwidth Limitations . . . . . . . . . . . . . . . . 10-13Produce a Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-14Consume Data That Is Produced by Another Controller. . . .10-15

    Additional Steps for a PLC-5C Controller . . . . . . . . . . . 10-17Execute a Message (MSG) Instruction. . . . . . . . . . . . . . . . 10-19

    http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    14/574

    Publication 1756-PM001G-EN-P - March 2004

    Table of Contents viii

    Message Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-21Cache List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-22Unconnected Buffers . . . . . . . . . . . . . . . . . . . . . . . . . 10-23Guidelines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-24

    Get or Set the Number of Unconnected Buffers . . . . . . . . 10-25Get the Number of Unconnected Buffers . . . . . . . . . . 10-25Set the Number of Unconnected Buffers . . . . . . . . . . . 10-26

    Convert Between INTs and DINTs . . . . . . . . . . . . . . . . . . 10-28

    Chapter 11

    Produce a Large Array When to Use this Procedure . . . . . . . . . . . . . . . . . . . . . . . 11-1Produce a Large Array. . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-2

    Chapter 12

    Communicate with an ASCIIDevice When to Use this Procedure . . . . . . . . . . . . . . . . . . . . . . . 12-1How to Use This Procedure. . . . . . . . . . . . . . . . . . . . . . . . 12-1Connect the ASCII Device . . . . . . . . . . . . . . . . . . . . . . . . . 12-2Configure the Serial Port . . . . . . . . . . . . . . . . . . . . . . . . . . 12-3Configure the User Protocol . . . . . . . . . . . . . . . . . . . . . . . 12-5Create String Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . 12-8Read Characters from the Device. . . . . . . . . . . . . . . . . . . . 12-9Send Characters to the Device . . . . . . . . . . . . . . . . . . . . . 12-14Enter ASCII Characters . . . . . . . . . . . . . . . . . . . . . . . . . . 12-21

    Chapter 13

    Process ASCII Characters When to Use this Procedure . . . . . . . . . . . . . . . . . . . . . . . 13-1How to Use this Procedure . . . . . . . . . . . . . . . . . . . . . . . . 13-1Extract a Part of a Bar Code. . . . . . . . . . . . . . . . . . . . . . . . 13-2Look Up a Bar Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-4

    Create the PRODUCT_INFO Data Type. . . . . . . . . . . . . 13-5Search for the Characters . . . . . . . . . . . . . . . . . . . . . . . 13-6Identify the Lane Number. . . . . . . . . . . . . . . . . . . . . . . 13-8Reject Bad Characters. . . . . . . . . . . . . . . . . . . . . . . . . . 13-9Enter the Product IDs and Lane Numbers . . . . . . . . . . . 13-9

    Check the Bar Code Characters . . . . . . . . . . . . . . . . . . . . 13-10Convert a Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-12

    Decode an ASCII Message. . . . . . . . . . . . . . . . . . . . . . . . 13-14Build a String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-18

    Chapter 14

    Force Logic Elements When to Use This Procedure . . . . . . . . . . . . . . . . . . . . . . . 14-1How to Use This Procedure. . . . . . . . . . . . . . . . . . . . . . . . 14-1Precautions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-2

    Enable Forces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-2Disable or Remove a Force . . . . . . . . . . . . . . . . . . . . . 14-3

    http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    15/574

    Publication 1756-PM001G-EN-P - March 2004

    Table of Contents ix

    Check Force Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-4Online Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-4FORCE LED. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-5GSV Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-5

    What to Force. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-6When to Use an I/O Force . . . . . . . . . . . . . . . . . . . . . . . . 14-6Force an Input Value . . . . . . . . . . . . . . . . . . . . . . . . . . 14-7Force an Output Value. . . . . . . . . . . . . . . . . . . . . . . . . 14-7

    Add an I/O Force . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-8When to Use Step Through . . . . . . . . . . . . . . . . . . . . . . . . 14-9Step Through a Transition or a Force of a Path. . . . . . . . . . 14-9

    When to Use an SFC Force . . . . . . . . . . . . . . . . . . . . . . . . 14-9Force a Transition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-9Force a Simultaneous Path . . . . . . . . . . . . . . . . . . . . . 14-11

    Add an SFC Force . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-12

    Remove or Disable Forces. . . . . . . . . . . . . . . . . . . . . . . . 14-13Remove an Individual Force. . . . . . . . . . . . . . . . . . . . 14-13Disable All I/O Forces . . . . . . . . . . . . . . . . . . . . . . . . 14-14Remove All I/O Forces. . . . . . . . . . . . . . . . . . . . . . . . 14-14Disable All SFC Forces . . . . . . . . . . . . . . . . . . . . . . . . 14-14Remove All SFC Forces . . . . . . . . . . . . . . . . . . . . . . . 14-14

    Chapter 15

    Handle a Major Fault Using this Chapter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-1Develop a Fault Routine . . . . . . . . . . . . . . . . . . . . . . . . . . 15-1

    Choose Where to Place the Fault Routine . . . . . . . . . . . 15-2

    Create a Fault Routine for a Program . . . . . . . . . . . . . . 15-2Create a Routine for the Controller Fault Handler . . . . . 15-3Create a Routine for the Power-Up Handler . . . . . . . . . 15-4

    Programmatically Clear a Major Fault . . . . . . . . . . . . . . . . . 15-5Create a Data Type to Store Fault Information. . . . . . . . 15-5Get the Fault Type and Code . . . . . . . . . . . . . . . . . . . . 15-6Check for a Specific Fault. . . . . . . . . . . . . . . . . . . . . . . 15-7Clear the Fault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-7

    Clear a Major Fault During Prescan . . . . . . . . . . . . . . . . . . 15-8Identify When the Controller is in Prescan . . . . . . . . . . 15-8Get the Fault Type and Code . . . . . . . . . . . . . . . . . . . . 15-9Check for a Specific Fault. . . . . . . . . . . . . . . . . . . . . . 15-10Clear the Fault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-11

    Test a Fault Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-12Create a User-Defined Major Fault . . . . . . . . . . . . . . . . . . 15-13

    Create a Fault Routine for the Program . . . . . . . . . . . . 15-13Configure the Program to Use the Fault Routine . . . . . 15-14

    Jump to the Fault Routine . . . . . . . . . . . . . . . . . . . . . 15-14Major Fault Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-15

    http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    16/574

    Publication 1756-PM001G-EN-P - March 2004

    Table of Contents x

    Chapter 16

    Monitor Minor Faults When to Use This Procedure . . . . . . . . . . . . . . . . . . . . . . . 16-1Monitor Minor Faults. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-1Minor Fault Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-4

    Chapter 17

    Store and Load a Project Using

    Nonvolatile Memory

    When to Use This Procedure . . . . . . . . . . . . . . . . . . . . . . . 17-1How to Use This Procedure. . . . . . . . . . . . . . . . . . . . . . . . 17-2Before You Use Nonvolatile Memory. . . . . . . . . . . . . . . . . 17-2

    Choose a Controller That Has Nonvolatile Memory . . . . 17-3Prevent a Major Fault During a Load. . . . . . . . . . . . . . . 17-4Format a CompactFlash Card . . . . . . . . . . . . . . . . . . . . 17-4Determine How to Handle Firmware Updates . . . . . . . . 17-6Choose When to Load an Image. . . . . . . . . . . . . . . . . . 17-7Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-8

    Store a Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-9Configure the Store Operation . . . . . . . . . . . . . . . . . . . 17-9Store the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-11Save the Online Project . . . . . . . . . . . . . . . . . . . . . . . 17-11

    Load a Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-12Check for a Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-14Clear Nonvolatile Memory . . . . . . . . . . . . . . . . . . . . . . . . 17-15

    Check the Current Load Image Option . . . . . . . . . . . . 17-15Change the Load Image Option . . . . . . . . . . . . . . . . . 17-16Clear the Project from the Controller. . . . . . . . . . . . . . 17-16Store the Empty Image. . . . . . . . . . . . . . . . . . . . . . . . 17-16

    Use a CompactFlash Reader. . . . . . . . . . . . . . . . . . . . . . . 17-18Manually Change Which Project Loads from theCompactFlash Card . . . . . . . . . . . . . . . . . . . . . . . . . . 17-19Manually Change the Load Parameters for a Project. . . 17-20

    Chapter 18

    Secure a Project When to Use This Procedure . . . . . . . . . . . . . . . . . . . . . . . 18-1Use Routine Source Protection. . . . . . . . . . . . . . . . . . . . . . 18-1

    Choose the Level of Protection for Each Routine . . . . . . 18-4Choose the Number of Source Keys . . . . . . . . . . . . . . . 18-4

    Define the Source Key or Keys. . . . . . . . . . . . . . . . . . . 18-5Choose a File Location in Which to Store the Source Keys. .18-5

    Activate the RSLogix 5000 Source Protection Feature . . . 18-6Create a File for the Source Keys . . . . . . . . . . . . . . . . . 18-6Protect a Routine with a Source Key. . . . . . . . . . . . . . . 18-7Remove Access to a Protected Routine . . . . . . . . . . . . . 18-8Disable Routine Source Protection . . . . . . . . . . . . . . . . 18-9Gain Access to a Protected Routine. . . . . . . . . . . . . . . 18-11

    http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    17/574

    Publication 1756-PM001G-EN-P - March 2004

    Table of Contents xi

    Use RSI Security Server to Protect a Project . . . . . . . . . . . 18-13Install RSI Security Server Software . . . . . . . . . . . . . . . 18-13Set Up DCOM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-14Enable Security Server for RSLogix 5000 Software . . . . 18-14

    Import the RSLogix5000Security.bak File. . . . . . . . . . . 18-15Define the Global Actions for Your Users . . . . . . . . . . 18-16Define the Project Actions for Your Users . . . . . . . . . . 18-17

    Add Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-20Add User Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-20Assign Global Access to RSLogix 5000 Software. . . . . . 18-21Assign Project Actions for New RSLogix 5000 Projects . 18-22Secure an RSLogix 5000 Project . . . . . . . . . . . . . . . . . 18-23

    Assign Access to an RSLogix 5000 Project . . . . . . . . . . 18-24Refresh RSLogix 5000 Software, If Needed . . . . . . . . . 18-25

    Chapter 19Determine Controller Memory

    Information

    When to Use This Chapter. . . . . . . . . . . . . . . . . . . . . . . . . 19-1Determine What Memory Information You Want . . . . . . . . 19-1Estimate Memory Information Offline. . . . . . . . . . . . . . . . . 19-2

    View Run Time Memory Information . . . . . . . . . . . . . . . . . 19-3Write Logic to Get Memory Information. . . . . . . . . . . . . . . 19-4

    Get Memory Information from the Controller . . . . . . . . 19-4Choose the Memory Information That You Want. . . . . . 19-5Convert INTs to a DINT . . . . . . . . . . . . . . . . . . . . . . . . 19-6

    Appendix A

    Manage Multiple Messages Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1When to Use this Appendix. . . . . . . . . . . . . . . . . . . . . . . . A-1How to Use this Appendix . . . . . . . . . . . . . . . . . . . . . . . . A-1Message Manager Logic. . . . . . . . . . . . . . . . . . . . . . . . . . . A-2

    Initialize the Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2Restart the Sequence, If Required . . . . . . . . . . . . . . . . . A-2Send the First Group of MSGs . . . . . . . . . . . . . . . . . . . A-2Enable the Next Group of MSGs. . . . . . . . . . . . . . . . . . A-3Send the Next Group of MSGs . . . . . . . . . . . . . . . . . . . A-3Enable the Next Group of MSGs. . . . . . . . . . . . . . . . . . A-4

    Send the Next Group of MSGs . . . . . . . . . . . . . . . . . . . A-4

    Appendix B

    Send a Message to MultipleControllers

    Set Up the I/O Configuration . . . . . . . . . . . . . . . . . . . . B-3Define Your Source and Destination Elements . . . . . . . B-4Create the MESSAGE_CONFIGURATION Data Type . . . B-5Create the Configuration Array . . . . . . . . . . . . . . . . . . . B-6Get the Size of the Local Array . . . . . . . . . . . . . . . . . . . B-8Load the Message Properties for a Controller. . . . . . . . . B-9

    http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    18/574

    Publication 1756-PM001G-EN-P - March 2004

    Table of Contents xii

    Configure the Message. . . . . . . . . . . . . . . . . . . . . . . . B-10Step to the Next Controller. . . . . . . . . . . . . . . . . . . . . B-11Restart the Sequence . . . . . . . . . . . . . . . . . . . . . . . . . B-11

    Appendix CIEC61131-3 Compliance Using This Appendix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-1

    Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-1Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-2Data Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-2Programming Languages . . . . . . . . . . . . . . . . . . . . . . . . . . C-3Instruction Set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-4IEC61131-3 Program Portability . . . . . . . . . . . . . . . . . . . . . C-4IEC Compliance Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . C-5

    http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    19/574

    1 Publication 1756-PM001G-EN-P - March 2004

    Chapter1

    Getting Started

    Using This Chapter This chapter provides preliminary information to help you get startedwith a project for Logix5000 controller.

    Create a Project To configure and program a Logix5000 controller, you useRSLogix 5000 software to create and manage a project for thecontroller.

    For this information or procedure See this page:

    Create a Project 1-1

    Explore a Project 1-4

    Create Routines 1-7

    Verify a Project 1-12

    Save a Project 1-12

    Configure a Communication Driver 1-13

    Download a Project to the Controller 1-14

    Select a Mode for the Controller 1-16

    Manually Clear a Major Fault 1-17

    Configure the Execution of a Task 1-18

    Create Multiple Programs 1-20

    Access Status Information 1-22

    Adjust the System Overhead Time Slice 1-26

    View Scan Time 1-29

    Adjust the Watchdog Time 1-31

    Term: Definition:

    project The file on your workstation (or server) that stores the logic, configuration, data, and

    documentation for a controller. The project file has an .ACD extension.

    When you create a project file, the file name is the name of the controller.

    The controller name is independent of the project file name. If you save a currentproject file as another name, the controller name is unchanged.

    If the name of the controller is different than the name of the project file, the titlebar of the RSLogix 5000 software displays both names.

  • 8/10/2019 Logix5000 Controllers Commom Procedures

    20/574

    Publication 1756-PM001G-EN-P - March 2004

    1-2 Getting Started

    Create a Project

    1. Start the RSLogix 5000 software.

    2. From theFilemenu, selectNew.

    3. Select the type of controller.

    4. Choose the major revision of firmware for this controller.

    5. Type a namefor the controller.

    6. Type a description of the operations that the controller performs(optional).

    7. Select the type of chassis (number of slots) that contains thecontroller (not applicable to some controllers).

    8. Select or type the slot number where the controller is installed

    (not applicable to some controllers).

    9. To store the file in a different folder (other than the defaultCreate Inpath), clickBrowseand select a folder.

    10. Choose

    42194

    3.

    5.

    6.

    7.

    8.

    9.

    4.

    Names:

    only alphabetic characters (A-Z ora-z), numeric characters (0-9), andunderscores (_)

    must start with an alphabeticcharacter or an underscore

    no more than 40 characters

    no consecutive or trailingunderscore characters (_)

    notcase sensitive

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    21/574

    Publication 1756-PM001G-EN-P - March 2004

    Getting Started 1-3

    Configure a Project

    To change the configuration of the controller, such as name, chassissize, or slot number, use the Controller Properties dialog box.

    1. On the Online toolbar, click the controller properties button.

    2. Make the required changes.

    3. Choose

    42627

    1.

    http://-/?-http://-/?-
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    22/574

    Publication 1756-PM001G-EN-P - March 2004

    1-4 Getting Started

    Explore a Project A project includes the following basic components:

    power-up handler

    controller fault handler

    task

    task

    program

    program

    program

    controller tags(global data)

    task

    program

    project

    other routines

    main routine

    I/O data

    system-shared data

    fault routine

    program tags

    (local data)

    default (required) component

    optional component

    Legend

  • 8/10/2019 Logix5000 Controllers Commom Procedures

    23/574

    Publication 1756-PM001G-EN-P - March 2004

    Getting Started 1-5

    The components of a project work together as follows:

    Project component: Definition:

    Task A task provides scheduling and priority information for a set of one or more programs.

    When you create a new project, RSLogix 5000 software automatically creates an initial task that isconfigured to run all the time (continuous task). When the task completes a full scan, it restartsimmediately.

    Program Each task requires at least one program.

    A task can have as many as 32 separate programs, each with its own program tags, main routine,other routines, and an optional fault routine.

    Once a task is triggered (activated), all the programs assigned (scheduled) to the task execute in theorder in which they are displayed in the controller organizer.

    You schedule a program in only one task and cannot share a program among multiple tasks.

    Routine Routines provide the executable code for the project in a controller (similar to a program file in a PLC orSLC controller). Each routine uses a specific programming language, such as ladder logic.

    Main Routine When a program executes, its main routine executes first. Use the main routine to call (execute) otherroutines (subroutines). To call another routine within the program, use a Jump to Subroutine (JSR)instruction.

    Subroutine Any routine other than the main routine or fault routine. To execute a subroutine, use a Jump to Subroutine(JSR) instruction in another routine, such as the main routine.

  • 8/10/2019 Logix5000 Controllers Commom Procedures

    24/574

    Publication 1756-PM001G-EN-P - March 2004

    1-6 Getting Started

    Controller Organizer

    In RSLogix 5000 software, the controller organizer provides agraphical overview of a project. When you create a project,

    RSLogix5000 software automatically creates a default task, program,and routine.

    When you create a project, the name of theproject is the same as the name of thecontroller.

    If you rename the project or controller, bothnames are shown.

    default program

    default task

    default routine

    controller organizer

    name of the controller

    To close a folder and hide its contents (collapse), doone of the following:

    Double-click the folder.

    Select the folder and press the []key.

    Click the sign.

    To open a folder and display its contents (expand), doone of the following:

    Double-click the folder.

    Select the folder and press the []key.

    Click the + sign.

  • 8/10/2019 Logix5000 Controllers Commom Procedures

    25/574

    Publication 1756-PM001G-EN-P - March 2004

    Getting Started 1-7

    Create Routines Routines provide the executable code for the project in a controller.

    Define a Routine for Each Section of Your Machine or Process

    To make your project easier to develop, test, and troubleshoot, divideit into routines (subroutines):

    1. Identify each physical section of your machine or process.

    2. Assign a routine for each of those sections.

    Identify the Programming Languages That Are Installed

    To determine which programming languages are installed on yourversion of RSLogix 5000 software:

    1. Start RSLogix 5000 software.

    2. From theHelpmenu, chooseAbout RSLogix 5000.

    To add a programming language, see ControlLogix Selection Guide,publication 1756-SG001.

    Description of Your Machine or Process

    Xxxxx xxxxx xxx

    Xxxxx xxxxx xxxXxxxx xxxxx xxx

    Xxxxx xxxxx xxx

    Xxxxx xxxxx xxx

    Xxxxx xxxxx xxx

    Xxxxx xxxxx xxx

    Xxxxx xxxxx xxx

    Xxxxx xxxxx xxx

    first section = routine 1

    second section = routine 2

    third section = routine 3

  • 8/10/2019 Logix5000 Controllers Commom Procedures

    26/574

    Publication 1756-PM001G-EN-P - March 2004

    1-8 Getting Started

    Choose a Programming Language for Each Section

    For each section of your machine or process, choose an appropriateprogramming language.

    Logix5000 controllers let you use the following languages:

    ladder logic

    function block diagram

    sequential function chart

    structured text

    Use any combination of the languages in the same project.

    In general, if a section of your code represents: Then use this language:

    continuous or parallel execution of multiple operations (not sequenced) ladder logic

    boolean or bit-based operations

    complex logical operations

    message and communication processing

    machine interlocking

    operations that service or maintenance personnel may have to interpret in orderto troubleshoot the machine or process.

    continuous process and drive control function block diagram

    loop control

    calculations in circuit flowhigh-level management of multiple operations sequential function chart (SFC)

    repetitive sequences of operations

    batch process

    motion control using structured text

    state machine operations

    complex mathematical operations structured text

    specialized array or table loop processing

    ASCII string handling or protocol processing

  • 8/10/2019 Logix5000 Controllers Commom Procedures

    27/574

    Publication 1756-PM001G-EN-P - March 2004

    Getting Started 1-9

    Divide Each Routine Into More Meaningful Increments

    If a routine uses thislanguage:

    Then: Example:

    ladder logic

    structured text

    Break up large routines into severalsmaller routines

    To continuously execute severalcomplex boolean operations

    create a separate routine for eachoperation.

    function block diagram(FBD)

    To control 4 valves, where each valverequires feedback that it is in itscommanded position

    make a separate sheet for eachvalve.

    sequential function chart(SFC)

    To perform the following sequence:

    1. Fill a tank.

    2. Mix the ingredients in thetank.

    3. Empty the tank

    make each section (fill, mix, empty)a separate step.

    routine

    routine

    Within the FBD routine, makea sheet for each functional

    loop for a device (motor,valve, etc.). sheet

    routine

    step

    step

    step

    Break the SFC into steps.

  • 8/10/2019 Logix5000 Controllers Commom Procedures

    28/574

    Publication 1756-PM001G-EN-P - March 2004

    1-10 Getting Started

    Create a Routine

    Each program requires at least one routine. Use a routine to executeyour logic in a specific programming language.

    1. In the controller organizer, right-click the program that willexecute the routine and chooseNew Routine.

    2. In theNametext box, type a namefor the routine.

    3. From the Typelist, choose the programming language for theroutine

    4. Choose

    1.

    2.

    3.

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    29/574

    Publication 1756-PM001G-EN-P - March 2004

    Getting Started 1-11

    Open a Routine

    This is the protection status.

    If: Then:

    Source Not Available To open the routine, your computer requires thesource key for the routine.

    Source Not Available(Viewable)

    You can only open and view the routine.

    You cannotmake any changes or copyany of contents of the routine.

    Source Available You have full access to the routine.

    Source Available(Viewable)

    You have full access to the routine.

    To open a folder and show its contents, either:

    Double-click the folder.

    Click the + sign.

    To open a routine, double-click the routine. If a routine is grayed-out, youcannot open the routine.

    source protection The developer of the routine may have assigned asource key to the routine. The source key limits access to the routine.

    If the controller organizer lists source protection for a routine, then a sourcekey is assigned to the routine.

    For this routine

    IMPORTANT If the source of a routine is unavailable, do notexport the project.

    An export file (.L5K) contains only routines where the source code is available.

    If you export a project where the source code is notavailable for all routines, youwill notbe able to restore the entire project.

    TIP If a routine fails to open, your computer may not have the required programminglanguage installed.

    To determine which programming languages are installed on your computer, chooseHelp!About RSLogix 5000.

    To add a programming language, see ControlLogix Selection Guide, publication1756-SG001

  • 8/10/2019 Logix5000 Controllers Commom Procedures

    30/574

    Publication 1756-PM001G-EN-P - March 2004

    1-12 Getting Started

    Verify a Project As you program your project, periodically verify your work:

    1. In the top-most toolbar of the RSLogix 5000 window, click

    2. If any errors are listed at the bottom of the window:a. To go to the first error or warning, press [F4].

    b. Correct the error according to the description in the Resultswindow.

    c. Go to step 1.

    3. To close the Results window, press [Alt] + [1].

    Save a Project As you create logic and make configuration changes, save the project.

    If you make changes to the project while online, save the project so

    that the offline project file matches the online project file:

    To: Do this:

    save your changes From the Filemenu, select Save.

    make a copy of the open project but keepthe existing name of the controller

    1. From the Filemenu, select SaveAs.

    2. Type a name for the project file. Use underscores [ _ ] in place ofspaces.

    3. Click Save.

    make a copy of the project and assign adifferent name to the controller

    1. From the Filemenu, select SaveAs.

    2. Type a name for the project file. Use underscores [ _ ] in place of

    spaces.

    3. Click Save.

    4. In the controller organizer, right-clickControllername_of_controller folder and selectProperties.

    5. Type a new name for the controller.

    6. Click OK.

    If you want to: Do this:

    save online changes anddata values From the Filemenu, select Save.

    save online changes but notonline data values 1. From the Communicationsmenu, selectGo Offline.

    2. From the Filemenu, select Save.

    http://-/?-http://-/?-
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    31/574

    Publication 1756-PM001G-EN-P - March 2004

    Getting Started 1-13

    Configure a CommunicationDriver

    The RSLogix 5000 software requires a communication driver tocommunicate with a controller. You configure communication drivers

    using RSLinxsoftware:

    1. Start RSLinx software.

    2. From the Communicationsmenu, select Configure Drivers.

    3. From the Available Driver Types drop-down list, select a driver:

    4. ChooseAdd New.

    5. If you want to assign a descriptive name to the driver, changethe default name.

    6. Choose OK.

    7. Configure the driver:

    8. Choose OK. and then choose Close.

    For this network: And this type of computer: Select this driver:

    serial RS-232 DF1 Devices

    DH+ desktop computer 1784-KT/KTX(D)/PKTX(D)

    laptop computer 1784-PCMK

    ControlNet desktop computer 1784-KTC(X)

    laptop computer 1784-PCCEtherNet/IP Ethernet devices

    DeviceNet DeviceNet Drivers (1784-PCD/PCIDS, 1770-KFD, SDNPT drivers)

    For this driver: Do this:

    serial A. From the Comm Portdrop-down list, select the serial port that the driver will use.

    B. From the Device drop-down list, select Logix 5550-Serial Port.

    C. Click Auto-Configure.

    ControlNet A. In the Station Namebox, type a name that will identify the computer in the RSWho window.

    B. Select the interrupt value, memory address, and I/O base address.

    C. In the Net Addressbox, type the ControlNet node number that you want to assign to the computer.

    DH+ A. From the Valuedrop-down list, select the type of interface card that the driver will use.

    B. In the Propertylist, select the next item.

    C. In the Valuebox, type or select the appropriate value.D. Repeat steps B. and C.for the remaining properties.

    Ethernet For each Ethernet device on this network with which you want to communicate (e.g., each 1756-ENB module orPLC-5E controller), add a map entry:

    A. In the Host Namecolumn, type the IP address or host name of the Ethernet device.

    B. To communicate with another Ethernet device on this network, choose Add Newand go to Step A.

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    32/574

    Publication 1756-PM001G-EN-P - March 2004

    1-14 Getting Started

    Download a Project to theController

    Use this procedure to download a project to the controller so you canexecute its logic.

    When you download a project, you lose the project and datathat is currently in the controller, if any.

    If the revision of the controller does not match the revision ofthe project, you are prompted to update the firmware of thecontroller. RSLogix 5000 software lets you update the firmwareof the controller as part of the download sequence.

    1. Open the RSLogix 5000 project that you want to download.

    2. From the Communications menu, choose Who Active.

    3. Expand the network until you see the controller.

    4. Select the controller.

    5. ChooseDownload.

    ATTENTION

    !

    When you download a project or update firmware,all active servo axes are turned off. Before youdownload a project or update firmware, make surethat thiswill notcause any unexpected movement ofan axis.

    IMPORTANT To update the firmware of a controller, first install afirmware upgrade kit.

    An upgrade kit ships on a supplemental CDalong with RSLogix 5000 software.

    To download an upgrade kit, go to www.ab.com.ChooseProduct Support. ChooseFirmwareUpdates.

    To expand a network one level, doone of the following:

    Double-click the network.

    Select the network andpress the key.

    Click the + sign.

    Workstation

    Linx Gateways, Ethernet

    driver

    communication module

    backplane

    controller

    +

    +

  • 8/10/2019 Logix5000 Controllers Commom Procedures

    33/574

    Publication 1756-PM001G-EN-P - March 2004

    Getting Started 1-15

    6. Which response did the software give:

    7. ChooseDownload.

    The project downloads to the controller and RSLogix 5000software goes online.

    8. Skip the rest of this procedure.

    9. Choose Update Firmware.

    10. Select the required revision for the controller.

    11. Choose Update.

    A dialog box asks you to confirm the update.

    12. To update the controller, choose Yes.

    The following events occur:

    The firmware of the controller is updated.

    The project downloads to the controller.

    RSLogix 5000 software goes online.

    If the software indicates: Then:

    Download to the controller Go to step 7.

    Failed to download to the controller. The revision of theoffline project and controllers firmware are notcompatible.

    Go to step 9.

    43056

    10.

    11.

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    34/574

    Publication 1756-PM001G-EN-P - March 2004

    1-16 Getting Started

    Select a Mode for theController

    To change the operating mode of the controller, use the keyswitch onthe front of the controller:

    You can also use RSLogix 5000 software to change the mode of thecontroller:

    1. On the front of the controller, turn the keyswitch to REM.

    2. Go online with the controller.

    3. On the online toolbar, choose the desired mode.

    IMPORTANT All modes send and receive data in response to a

    message from another controller.All modes produce and consume tags.

    keyswitch

    NoDo you want to preventRSLogix 5000 software fromchanging the mode?

    Do you want to execute thelogic in the controller?

    Do you want the logic tocontrol the output devices?

    Turn the keyswitch to PROGand then to REM(Remote Program mode).

    Turn the keyswitch to PROG(Program mode).

    Turn the keyswitch to RUNand then to REM(Remote Run mode).

    No

    YesDo you want to preventRSLogix 5000 software from:

    changing the mode downloading a project performing online edits Turn the keyswitch to RUN

    (Run mode).

    No

    Yes

    Do you need to schedule aControlNet network?

    No

    Yes

    Outputs revert to their configured state for Program mode.A

    This includes Message (MSG) instructions.B

    No

    1. Turn the keyswitch to REM.2. Go online with

    RSLogix 5000 software and

    choose Test mode.

    Yes

    B

    A

    A

    A

    Yes

    3.

    http://-/?-http://-/?-
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    35/574

    Publication 1756-PM001G-EN-P - March 2004

    Getting Started 1-17

    Manually Clear a MajorFault

    If the controller enters the faulted mode,a major faultoccurred andthe controller stopped executing the logic.

    To correct a major fault:

    1. Click the button.

    2. Use the information in the Recent faults listto correct the causeof the fault. Refer to "Major Fault Codes" on page 15-15.

    3. Click the Clear Majorsbutton.

    43057

    The controller is faulted. A major faultoccurred and the controller is no longerexecuting its logic.

    1.

    TIP You can also clear a major fault by using thekeyswitch on the controller. Turn the keyswitch toProg, then toRun, and then back toProg.

    http://-/?-http://-/?-
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    36/574

    Publication 1756-PM001G-EN-P - March 2004

    1-18 Getting Started

    Configure the Execution ofa Task

    When you create a new project, RSLogix 5000 software automaticallycreates an initial task that is configured to run all the time (continuoustask). When the task completes a full scan, it restarts immediately.

    Figure 1.1 Execution of the Continuous Task

    If you are familiar with a DCS application or plan to program yoursystem using a function block diagram, you can configure the task toexecute at a specific period (periodic task). This lets you update yourfunction block diagram at a period that you specify.

    Whenever the time period for the task expires, the task executesone time.

    You configure the period from 1 ms to 2000 s. The default is10 ms.

    If you use a periodic task in addition to a continuous task, the

    periodic task interrupts the execution of the continuous task.When the periodic task is done, control returns to thecontinuous task. For more information on using multiple tasks,see chapter 4.

    Figure 1.2 Example of a Periodic Task That Executes Every 10 ms.

    start of the continuous task end of the continuous task

    main routine

    subroutineprogram

    task automatically restarts

    Legend:

    Task executes.

    periodictask

    5 10 15 20 25 30 35 40 45 50

    elapsed time (ms)

    http://1756-pm001g-en-p.pdf/http://1756-pm001g-en-p.pdf/
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    37/574

    Publication 1756-PM001G-EN-P - March 2004

    Getting Started 1-19

    Configure a Task

    To configure the execution of a task, use the properties dialog box forthe task.

    1. In the controller organizer, right-click the task that you want toconfigure and chooseProperties.

    2. Click the Configurationtab.

    3. From the Typelist, choose type of execution for the task. Onlyone continuous task is permitted.

    4. If you chose Periodic in step 3, then type the rate at which youwant the task to execute.

    5. Choose

    1.

    3.

    4.

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    38/574

    Publication 1756-PM001G-EN-P - March 2004

    1-20 Getting Started

    Create Multiple Programs A Logix5000 controller lets you divide your application into multipleprograms, each with its own data. There is noneed to manageconflicting tag names between programs. This makes it easier tore-use both code and tag names in multiple programs.

    Create a Program

    Each task requires at least one program. You can create multipleprograms for a task.

    1. In the controller organizer, right-click the task that will executethe program and chooseNew Program.

    controller tags (global data)

    Program_A

    other routines

    main routine Tag_4Tag_5Tag_6

    program tags(local data)

    Tag_1Tag_2Tag_3

    Program_B

    other routines

    main routine Tag_4Tag_5Tag_6

    program tags(local data)

    Data at the program scope is isolated from other programs:

    Routines cannot access data that is at the program scope of another program.

    You can re-use the tag name of a program-scoped tag in multiple programs.

    For example, both Program_A and Program_B can have a program tag namedTag_4.

    data

    All programs have access todata that is at the controller

    scope.

    1.

    http://-/?-http://-/?-
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    39/574

    Publication 1756-PM001G-EN-P - March 2004

    Getting Started 1-21

    2. In theNametext box, type a namefor the program.

    3. Choose

    Configure a Program

    Each program requires a main routine. The main routine executeswhenever the program executes.

    1. In the controller organizer, right-click the program that you wantto configure and chooseProperties.

    2. Click the Configurationtab.

    3. From theMainlist, choose the name of the routine that youwant to execute as the main routine.

    4. Choose

    2.

    1.

    3.

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/10/2019 Logix5000 Controllers Commom Procedures

    40/574

    Publication 1756-PM001G-EN-P - March 2004

    1-22 Getting Started

    Access Status Information Logix5000 controllers do not have a status file, as in the PLC-5controller. To access status information, you use a keyword or accessa specific object.

    Monitor Status Flags

    The controller supports status keywords you can use in your logic tomonitor specific events:

    The status keywords are notcase sensitive.

    Because the status flags can change so quickly, RSLogix 5000software does notdisplay the status of the flags. (I.e., Even

    when a status flag is set,