February 1996
6200 Series™PLC-5 Programming Software
Programming Guide
Release 5.2
PrefaceProgramming
ii
Copyright Notice E 1996 Rockwell Software, Inc. All rights reserved.Printed in the United States of America.Portions copyrighted by Allen-Bradley Company, Inc. and used with permission.The manual and any accompanying Rockwell Software products are copyrighted by Rockwell Software, Inc. Anyreproduction and/or distribution without prior written consent from Rockwell Software, Inc. is strictly prohibited. Pleaserefer to the license agreement for details.
Trademark Notices PLC, PLC-5, PLC-5/10, PLC-5/11, PLC-5/12, PLC-5/15, PLC-5/20, PLC-5/20E, PLC-5/20C, PLC-5/25, PLC-5/26,PLC-5/30, PLC-5/V30, PLC-5/40, PLC-5/40L, PLC-5/40E,PLC-5/40C, PLC-5/V40, PLC-5/V40L, PLC-5/46, PLC-5/60,PLC-5/60C, PLC-5/60L, PLC-5/80, PLC-5/80E, PLC-5/80C, PLC-5/V80, PLC-5/86, PLC-5/VME and ControlNet aretrademarks of Allen-Bradley Company, Inc.The Rockwell Software logo, PowerText, WINtelligent, and WINtelligent LOGIC 5 are trademarks ofRockwell Software, Inc.All other trademarks are the property of their respective holders and are hereby acknowledged.
Important UserInformation
This Rockwell Software product is warranted in accord with the product license. The product’s performance will beaffected by system configuration, the application being performed, operator control and other related factors.The product’s implementation may vary among users.This manual is as up-to-date as possible at the time of printing; however, the accompanying software may have changedsince that time. Rockwell Software reserves the right to change any information contained in this manual or the softwareat anytime without prior notice.The instructions in this manual do not claim to cover all the details of variations in the equipment, procedure, or processdescribed, nor to provide directions for meeting every possible contingency during installation, operation, or maintenance.Because of the variety of uses for the products described in this publication, those responsible for the application and useof this control equipment must satisfy themselves that all necessary steps have been taken to assure that eachapplication and use meets all performance and safety requirements, including any applicable laws, regulations, codesand standards.The illustrations, charts, sample programs and layout examples shown in this guide are intended solely for purposes ofexample. Since there are many variables and requirements associated with any particular installation, Allen-Bradley doesnot assume responsibility or liability (to include intellectual property liability) for actual use based upon the examplesshown in this publication.Allen-Bradley publication SGI-1.1, Safety Guidelines for the Application, Installation, and Maintenance of Solid StateControl (available from your local Allen-Bradley office), describes some important differences between solid-stateequipment and electromechanical devices that should be taken into consideration when applying products such as thosedescribed in this publication.Throughout this manual we use notes to make you aware of safety considerations:
Attention statements help you to:· identify a hazard·avoid the hazard· recognize the consequences
Note Identifies information that is critical for successful applicationand understanding of the product.
Attention: Identifies information about practices orcircumstances that can lead to personal injury or death,property damage or economic loss.
Summary of Changes
i
Summary of Changes
New Information Added to this Manual
The table below summarizes the changes that have been made to the Programmingmanual since the last printing:
For this New Information: SeeChapter:
Protected PLC-5 processors throughoutControlNet connectivity throughoutIE 1131-3 International Programming Standard 8Cross reference enhancements 13Converting 6200 Series (.AF5 Files) to/from AI Series or WINtelligent Logic 5(.X5 Files)
Appendix B
To help you find new information and updated information in this release of themanual, we have included change bars as shown to the right of this paragraph.
PrefaceSummary of Changes
ii
Preface
i
How to Use Your Documentation
Your PLC-5 programmable controller documentation is organized into manualsaccording to the tasks you perform. This organization lets you easily find theinformation you want without reading through information that is not related to yourcurrent task. The arrow points to the book you are currently using.
PrefacePreface
ii
Figure 1PLC-5 Programmable Controller Documentation Library
Programming
Software Configurationand Maintenance
Configuring processorProcessor/channel status
Defining data table files
Printing reportsClearing faults
Saving/restoring filesCreating/managing files
Creating/editing SFCsImporting/exporting
I/O ConfigurationUtility
Configuring intelligentI/O modules
ReferenceInstruction Set
Instruction execution,parameters, statusbits and examples
1785 PLC-5Programmable Controllers
Quick ReferenceQuick access to switches,status bits, indicators,
Worksheets to help thedesigner plan the systemand the installer toinstall the system
1785 PLC-5Hardware Installation
How to install and setswitches for chassis,PLC-5 processor, howto wire and groundyour system
Structured TextUser Manual
Program considerations
Mnemonic explanationsProgram examples
Using PowerTextt
Optional: for use with 9313-ST5
Instruction parametersand syntax
Creating/editing/documenting ladderlogic programs
instructions, software screens
Installing 6200programming software
Classic PLC-5 Processors: Classic and Enhanced PLC-5 Processors:
Enhanced PLC-5 Processors:
Enhanced and EthernetPLC-5 Programmable
Controllers User Manual
Enhanced PLC-5Programmable
Controllers
Ethernet PLC-5
Placing system hardwareAddressing I/O andprocessor memoryCommunicating withdevices on a DH+, serial,and Ethernet link
1785 PLC-5Programmable Controllers
Design Worksheets
Installation Instructions
ProgrammableControllers
Installation Instructions
Handling the Enhanced
Connecting a remote,extended local, andDH+ link
PLC-5 processorHandling the Enhanced
Connecting a remote,extended local, andDH+ link
PLC-5 processor
For more informationabout PLC-5programmable controllersor these publications,contact your local salesoffice, distributor, orsystem integrator.
HARDWARE SOFTWARE
1785 PLC-5Programmable Controllers
Design Manual
Explanation of processorfunctionality, systemdesign, and programmingconsiderations
Preface
iii
Where to Start
To use 6200 programming software:
· If you are a new user of a Classic PLC-5 processor, use the HardwareInstallation Manual to make sure your PLC-5 system is correctly installed; thensee the Design Manual and the Design Worksheets for programming guidelinesfor your PLC-5 system.
If you are a new user of an Enhanced PLC-5 processor, use the Enhanced PLC-5Programmable Controllers Installation Instructions or the Ethernet PLC-5Programmable Controllers Installation Instructions to make sure your PLC-5system is correctly installed; then see the Enhanced and Ethernet PLC-5Programmable Controllers User Manual for programming guidelines for yourPLC-5 system.
· For Classic PLC-5 and Enhanced PLC-5 processors, start with the SoftwareConfiguration and Maintenance manual to learn how to get your softwarerunning. Use the remaining manuals in Figure 1 that are designated for ClassicPLC-5 and Enhanced PLC-5 processors to plan, create, and test your programs.
· After your system is up and running, use the Quick Reference manual for helpwhile maintaining your system.
If you are already familiar with 6200 programming software, you may only need theInstruction Set Reference manual or the Structured Text User Manual.
PrefacePreface
iv
Conventions
This manual uses the following conventions to describe how to enter information:
· Unless otherwise stated:
References to: Include these Allen-Bradley Processors:
Classic PLC-5 processors PLC-5/10ä , -5/12ä , -5/15ä , -5/25ä , and -5/VMEäprocessors.
Enhanced PLC-5 processors PLC-5/11ä , -5/20ä , -5/30ä , -5/40ä , -5/40Lä , -5/60 ä ,-5/60Lä , and -5/80ä processors.Note: Unless otherwise specified, Enhanced PLC-5processors include Ethernet PLC-5, ControlNet PLC-5, ProtectedPLC-5 and VME PLC-5 processors.
Ethernet PLC-5 processors PLC-5/20Eä , -5/40Eä , and -5/80Eä processors.
ControlNet PLC-5 processors PLC-5/20Cä , -5/40Cä , -5/60Cä , and -5/80Cä processors.
Protected PLC-5 processors 1 PLC-5/26ä , -5/46ä , and -5/86ä processors.
VME PLC-5 processors PLC-5/V30ä , -5/V40ä , -5/V40Lä , and -5/V80ä processors.See the PLC-5/VME VMEbus Programmable Controllers UserManual for more information.
1 Protected PLC-5 processors alone do not ensure PLC-5 system security. System security is a combination of the ProtectedPLC-5 processor, the software, and your application expertise.
Preface
v
· Pictures of keys and/or screens represent actual keys that you press or screensthat you see. For example, in the procedure for accessing the SFC Main Menu,you see:
The input line lists the filethat is being monitoredand the quadrant that isbeing displayed.
Make sure the processor isin Program or RemoteProgram mode if you areediting online.
START+-+-++=+=+|006|+=+=+|
+-----+--+--+-----+| | | |-+- -+- -+- -+-007 008 009 005| | | |
+-+-+ | | ||002| | | |+-+-+ | | |-+- | | |003 | | || | | |
Press a function key.MONITOR 4:(0,0) >Rem Prog Forces: Disabled PLC-5/40 Ser A Rev A 5/40 Addr 20 Drill1Change Exit Program Expand Search General Zoom Force EditMode Dirctry Macro UtilityF1 F3 F4 F5 F6 F7 F8 F9 F10
F1
OnlineProg
6200Main Menu
orF3
OfflineProg
Cursor to SFC file to edit
F8
MonitorFile
SFC Main Menu
What the procedure shows is that you start on the 6200 Main Menu, and then pressthe [F1] key or the [F3] key to choose online or offline programming. You thencursor to the SFC file you want to edit and press [F8]- Monitor File. Theinformation in the gray boxes advises you of things to look for or to check.
· Words in square brackets represent actual keys that you press. For example:[Enter] or [F1] - Online Programming/Documentation
· Words that describe information that you have to provide are shown in italics.For example, if you have to type a file name, this is shown as: filename
· Messages and prompts that the terminal displays are shown as:Press a function key
PrefacePreface
vi
Using the Index
At the back of each software manual, there is a master index for the completesoftware documentation set. The page reference for the item you are looking forappears in the following format:
data fileaddressing: Config/Maint 9-1creating: Config/Maint 10-2
where the name of the manual that the entry can be found in is in italics, followedby the page reference.
For example, the entry for data file addressing (Config/Maint) is in the SoftwareConfiguration and Maintenance manual. You would go to the SoftwareConfiguration and Maintenance manual, and then find the page number.
Table of Contents
i
Table of Contents
Section 1 Working with Files
1 Understanding Files 1-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter Objectives 1-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Disk Files 1-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Disk File Extensions 1-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Directory Structure for PLC-5 Files 1-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Processor Files 1-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 Organizing and Creating Program Files 2-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter Objectives 2-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Using the Program Directory 2-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Overview of Program Files 2-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating Enhanced PLC-5 Processor Memory Files 2-3. . . . . . . . . . . . . . . . . . . . .Creating Classic PLC-5 Processor Memory Files 2-4. . . . . . . . . . . . . . . . . . . . . . .
Accessing Processor Memory Files 2-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Creating Program Files 2-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Naming Processor Memory and Program Files 2-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . .Choosing a Method to Program Logic 2-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3 Saving and Restoring Processor Memory Files 3-1. . . . . . . . . . . . . . . . . . . . . . . . . .Chapter Objectives 3-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Saving Processor Memory Files 3-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Save and Continue 3-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Save/Restore 3-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Saving Files 3-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Saving and Backing Up Processor Memory Files (PMF) 3-5. . . . . . . . . . . . . . . . . .
Restoring Processor Memory Files 3-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Restoring CAR Files 3-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Writing to an EEPROM 3-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Merging Processor Memory Files (Offline Only) 3-12. . . . . . . . . . . . . . . . . . . . . . . . . . .
Merge Rules 3-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PrefaceTable of Contents
ii
4 Comparing Processor Memory 4-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter Objectives 4-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Comparing Processor Memory 4-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Selecting Compare Options 4-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Program Files Options 4-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Data Table Options 4-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5 Using Disk File Utilities 5-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter Objectives 5-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Changing the Documentation Width 5-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Copy Processor Memory and Documentation Files From
Backup Directory to Primary Save Directory 5-5. . . . . . . . . . . . . . . . . . . . . . . . . . .Renaming Files 5-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Copying Files in the Same Directory 5-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Copying Files To/From Floppy 5-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Copying Files to a Floppy 5-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Copying Files from a Floppy 5-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Deleting Files 5-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Merging Documentation Files 5-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Merge Function 5-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Handling Data Collisions 5-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6 Importing and Exporting Documentation Files 6-1. . . . . . . . . . . . . . . . . . . . . . . . . .Chapter Objectives 6-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Introduction 6-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Understanding the Import and Export Utilities 6-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . .Importing ASCII Documentation Files 6-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Import Utility 6-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Handling Data Collisions 6-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Using Keywords 6-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Formatting Keywords 6-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Responding to Syntax Errors 6-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Examining the Results of an Import 6-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exporting Documentation Files 6-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Configuring the Export Utility 6-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Choosing the Sort Order 6-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Choosing the Keyword Option 6-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Selecting the Export Range 6-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating a Rockwell Software Inc. ASCII File 6-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . .Building a Rockwell Software Inc. ASCII File 6-17. . . . . . . . . . . . . . . . . . . . . . . . .Contents of a Rockwell Software Inc. ASCII File 6-18. . . . . . . . . . . . . . . . . . . . . . .
Documenting ASCII Files 6-21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents
iii
7 Importing and Exporting Processor Memory Files 7-1. . . . . . . . . . . . . . . . . . . . . . .Chapter Objectives 7-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Understanding the Import and Export Utilities 7-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . .Importing ASCII Processor Memory Files 7-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the Import Utility Screen 7-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Configuring the Import Utility 7-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Examining the Results of an Import 7-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exporting Processor Memory Files 7-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Configuring the Export Utility 7-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Examining the Results of an Export 7-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating a Rockwell Software Inc. ASCII Processor Memory File 7-9. . . . . . . . . . . . .Specifying the Program Header 7-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Specifying the Data Table 7-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Specifying the Project Name 7-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Specifying Program Files 7-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Specifying the Force Table 7-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Documenting an ASCII Processor Memory File 7-13. . . . . . . . . . . . . . . . . . . . . . . . . . . .ASCII Processor Memory File Example 7-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .ASCII SFC Processor Memory File Example 7-20. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PrefaceTable of Contents
iv
Section 2 Entering and Editing SFCs
8 Getting Started Using SFCs 8-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter Objectives 8-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
IEC 1131-3 International Programming Language Standard 8-1. . . . . . . . . . . . . . .Getting Started Using SFCs 8-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Understanding the Building Blocks 8-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 8-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Transition 8-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Simple SFC 8-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Selection Branch 8-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Simultaneous Branch 8-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Deciding When to use Each SFC Structure 8-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Monitoring an SFC Processor Memory File 8-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Selecting a Program File: 8-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Configuring the SFC Display 8-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .SFC Modes 8-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Editing SFCs 8-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Monitor Mode 8-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Quadrants 8-18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Keys You Use in the SFC Editor 8-20. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .SFC Programming Considerations 8-21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SFC Rules for Special Programming Considerations 8-21. . . . . . . . . . . . . . . . . . . . .Considerations for SFC Scan Sequences 8-22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Summary of SFC Constraints in PLC-5 Processors 8-22. . . . . . . . . . . . . . . . . . . . . .
9 Entering SFCs Using Classic PLC-5 Processors 9-1. . . . . . . . . . . . . . . . . . . . . . . . .Chapter Objectives 9-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Entering SFCs 9-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Entering Step/Transition Pairs 9-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Building SFCs 9-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Using Undefined Program Files 9-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents
v
10 Entering SFCs Using Enhanced PLC-5 Processors 10-1. . . . . . . . . . . . . . . . . . . . . .Chapter Objectives 10-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Entering SFCs 10-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Entering Step Actions and Transitions 10-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Entering Step Actions 10-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Insert or Append an Action 10-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Specify a Name for the Current Action 10-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Specify a Qualifier for the Current Action 10-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . .Enter the Action Timer 10-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Enter Structured Text for the Current Action 10-12. . . . . . . . . . . . . . . . . . . . . . . . . . .Enter a Comment for the Current Action 10-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Entering Transitions 10-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Specify a Name for the Current Condition 10-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . .Enter the Logic for the Current Condition 10-18. . . . . . . . . . . . . . . . . . . . . . . . . . . . .Enter a Comment for the Current Condition 10-19. . . . . . . . . . . . . . . . . . . . . . . . . . .Assigning Step and Transition Names 10-21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Entering Comments 10-22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Building SFCs 10-24. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Using Undefined Program Files 10-26. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11 Entering SFC Structures 11-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter Objectives 11-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Creating Selection and Simultaneous Branches 11-2. . . . . . . . . . . . . . . . . . . . . . . . . . . .Using GOTO Statements and Labels 11-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Placing Labels 11-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Placing GOTO Statements 11-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Rules for GOTO Statements and Labels 11-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating SFC Macros (Enhanced PLC-5 Processors Only) 11-12. . . . . . . . . . . . . . . . . . . .Assigning Comments to Macros 11-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Searching within SFC Macros 11-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using SFCs as Subcharts (Enhanced PLC-5 Processors Only) 11-15. . . . . . . . . . . . . . . . .Guidelines for Using SFCs as Subcharts 11-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Specifying SFCs as Subcharts 11-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Interlocking Subcharts to Parent Charts 11-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Viewing Subchart Logic 11-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the SFR Instruction (Enhanced PLC-5 Processors Only) 11-18. . . . . . . . . . . . . . . .Entering SFR Parameters 11-18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Monitoring an SFC in Reset Mode 11-19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PrefaceTable of Contents
vi
12 Editing SFCs 12-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter Objectives 12-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Editing SFCs 12-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Searching within SFCs 12-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Zooming 12-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Forcing Transitions from the SFC Editor (Enhanced PLC-5 Processors Only) 12-8. . . .Using SFC Step Timer and Configuration Information
(Enhanced PLC-5 Processors Only) 12-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Using SFC Configuration Information 12-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Using SFC Step Timer Information 12-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Section 3 Entering and Editing Ladder Logic
13 Writing Ladder Logic 13-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter Objectives 13-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Converting Machine Statements to Ladder Logic 13-2. . . . . . . . . . . . . . . . . . . . . . . . . . .
Rung Logic 13-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Example Digital I/O Instructions 13-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Constructing Ladder Rungs 13-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Writing Rung Logic 13-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Rung Example 13-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Writing Branch Logic 13-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Arranging Instructions 13-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Displaying Cross References 13-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Regenerating Cross Reference Database 13-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14 Getting Started Using the Ladder Editor 14-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter Objectives 14-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Getting Started with the Ladder Editor 14-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Navigational Keys 14-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Configuring the Ladder Editor Display 14-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Selecting Rungs 14-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Auto Document 14-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Moving to Rungs 14-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Interpreting Status Messages 14-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents
vii
15 Entering Ladder Logic 15-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter Objectives 15-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Entering Rungs 15-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Insert, Replace, Delete (IRD) Rung Marking 15-3. . . . . . . . . . . . . . . . . . . . . . . . . . .Entering Instructions 15-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Function Key Entry: 15-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Command Line Entry: 15-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the Instruction Entry Aid 15-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Entering Branches: 15-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Adding Branches 15-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Creating Multiple Branch Levels 15-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Extending a Branch 15-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Creating Nested Branches 15-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16 Editing Ladder Logic 16-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter Objectives 16-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Searching 16-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Assisted Search Function: 16-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Standard Search Function: 16-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Specifying Addresses 16-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Specifying Instructions and Addresses 16-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Specifying Addresses and Bits 16-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Search and Replace: 16-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Search for Edit Zones: 16-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Search for Undocumented Instructions: 16-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Configuring Search Operations 16-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Cutting, Copying, and Pasting 16-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Cutting, Copying, and Pasting with the Buffer 16-17. . . . . . . . . . . . . . . . . . . . . . . . . .Cutting, Copying, and Pasting with Disk Files 16-19. . . . . . . . . . . . . . . . . . . . . . . . . .Viewing a Paste File 16-20. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Handling Paste Errors 16-21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Testing Your Edits 16-22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PrefaceTable of Contents
viii
17 Documenting Ladder Programs 17-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter Objectives 17-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Getting Started Documenting Program Files 17-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Entering Comments 17-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Page Headers and Page Breaks 17-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Advanced Editing 17-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Searching for and Replacing Comment Text 17-8. . . . . . . . . . . . . . . . . . . . . . . . . . .Copying to Disk Files 17-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Pasting from Disk Files 17-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Viewing Rung Comments 17-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Documentation Rules and Conventions 17-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Editing Keys for Comments 17-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Entering Symbols 17-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Using the Database Editor 17-18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Setting the Default Database Width 17-21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Address Comment Window 17-21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Instruction Comment Window 17-22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Rung Comment Window 17-22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Choosing the Database Mode 17-23. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Searching the Database 17-24. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Database Search Rules 17-25. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Searching for and Replacing Comment Text 17-26. . . . . . . . . . . . . . . . . . . . . . . . . . .
A Converting .ACH Files to/from .AF5 Files A-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Appendix Objectives A-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .How the Conversion Utility Works A-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Converting Files from .ACH to .AF5 A-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Converting Files from .AF5 to .ACH A-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B Converting 6200 Series (.AF5 Files) to/from A.I. Series orWINtelligent LOGIC 5 (.X5 Files) B-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter Objectives B-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Converting 6200 Series (.AF5 Files) to A.I. Series or
WINtelligent LOGIC 5 (.X5 Files) B-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Converting A.I. Series or WINtelligent LOGIC 5 (.X5 Files)
to 6200 Series (.AF5 Files) B-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Performing a Partial Conversion B-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Working with Files
Section 1
Working with Files
If You Want to: See Chapter:
Manage the files on your hard disk 1Organize and create program files 2Save or restore processor memory files 3Compare processor memory files 4Rename, delete, merge, copy files in the samedirectory, or copy files to/from floppy disks
5
Import and export documentation files 6Import and export processor memory files 7
PrefaceWorking with Files
Understanding Files
1-1
1 Understanding Files
Chapter Objectives
You use several different types of files with the programming software. Some filesare stored on disk; some files are stored as part of the processor memory file. Thefollowing tables outline these files and explain their functions. Use this chapter tounderstand the difference between disk files and processor files so that you canmanage the files on your hard disk.
If You Want to Read About: See Page:
Disk file types 1-2Disk file extensions 1-3Directory structure for 6200 PLC-5 files 1-6Processor files 1-7
PrefaceUnderstanding Files
1-2
Disk Files
The disk files can be on the hard disk or on a floppy disk, depending on thedirectory paths you define. Table 1.A lists these file types.
Unless you define a directory path to a floppy disk, all files are stored on your harddisk. For more information on defining directory paths, see chapter 5 in theSoftware Configuration and Maintenance manual.
Table 1.ADisk File Types
File Type: Function:
Processor memory Offline format for a processor memory imageComments and symbols Contains the address/instruction/rungcomments,symbols, I/O
module configuration, SFC names and comments for the currentprocessor. These files (7 total) make up part of the database.
Cross reference Contains the cross reference information for the currentprocessor. These files (3 total) make up part of the database.
Database Generic name for the files that contain comments and symbols,cross reference information, SFC names and I/O configurationinformation for the current processor.
Documentation report Contains the specified report information that was generated forthe current processor.
Exported comments,symbols,I/O configuration, SFC names,or processor memory
Contains the comments,symbols, SFC names, I/O configurationinformation file or the processor memory file you exported to anASCII file.
User configuration Contains the configuration information you saved with the saveconfiguration function key.
Temporary Contains the information you modified during the currentsession only. When you exit the software, temporary filesare deleted.
Paste (cut rungs) Contains any rungs you cut or copied to disk files.
Understanding Files
1-3
Disk File Extensions
The programming software assigns file extensions to disk files based on the type ofinformation the files contain. Table 1.B lists the extensions the software uses.
Note The archive directory (default IPDS\ARCH\PLC5) is limited to 999 DOS files by the6200 programming software. The archive directory contains several DOS filesassociated with each offline processor memory file. If you are creating or extendinga processor memory file and the system issues the error message **Too ManyFiles**, you have exceeded the maximum number of files for the DOS directory. Ifthis occurs, you must move additional files to a floppy disk or to anotherarchive directory.
Note Any files that end with a dollar sign ($) contain the comments, symbols, crossreference or offline archive file information. Do not change or delete any of thesefiles or you will corrupt the database that contains these files (i.e., you will lose theinformation in these files). You can use the file utilities of the programming softwareto copy, rename, delete, and merge these files.
Note Any file extensions that begin with a dollar sign ($) are temporary files that thesoftware creates. Normally the software deletes these files when you leave thesoftware. However, if there is a run time error (such as turning the programmingterminal off before leaving the software), these files remain on the hard disk. Youcan delete these files.
PrefaceUnderstanding Files
1-4
Table 1.BDisk File Extensions
File Type: Uses thisExtension:
Default Directory Is:
Offline processor memory (also known as archive file)Do not change or delete.
Save/Restore log
.AF51.D1$.P1$.LOG
\IPDS\ARCH\PLC5
Configuration information, such as color selections, onlineconfigurations, ladder and SFC editor configurations
.P23 \IPDS\ATTACH
Rung comment, instruction comment, address comment andsymbol filesDo not change or delete.
.AC$
.B0$
.B1$.IX$.LX$.OP$.PC$
\IPDS\ARCH\PLC5
Cut, copy, paste files: ladder logicerror loginstruction comments,address comments and symbolsrung comments and SFC commentsstructured text
.CR5
.ER5
.C10
.C80
.STX
\IPDS\ARCH\PLC5
Cross reference files .XD$.XO$.B2$
\IPDS\ARCH\PLC5
Import/Export files:Comments and Symbols (Export)
LogComments and Symbols (Import)
LogProcessor memory (Export)
LogProcessor memory (Import)
LogExternal Format PMF (Export)
LogExternal Format PMF (Import)
Log
.TXT.LOG.AC52
.LOG.PC5.LOG
.AF5, D1$,P1$
.LOG.X5
.CON.AF5, D1$,
P1$.CON
\IPDS\TEXT\PLC5\IPDS\TEXT\PLC5\IPDS\TEXT\PLC5\IPDS\TEXT\PLC5\IPDS\TEXT\PLC5\IPDS\TEXT\PLC5\IPDS\ARCH\PLC5\IPDS\ARCH\PLC5\IPDS\ARCH\PLC5\IPDS\ARCH\PLC5\IPDS\ARCH\PLC5\IPDS\ARCH\PLC5
1 The .AF5 file extension is used for processor memory files created with version 4.1 or later of the software. Processor memory filescreated pre-4.1 must be converted to the .AF5 format. See Appendix A for conversion information.
2 Includes file extensions .AC$, .B0$, .B1$, .IX$, .LX$, .OP$, .PC$.(Continued)
Understanding Files
1-5
File Type: Default Directory Is:Uses thisExtension:
Report Files:Compare - Data TableCompare - ForcesCompare - Ladder ListingCompare - Program DirectoryContact histogramData tableForce statusLadder cross referenceMemory mapMemory usagePrivilege classProcessor configuration/Processor statusProgram DirectoryProgram listingSFC Action TraceSFC cross referenceSFC listingStructured TextSymbol tableUnused addressI/O statusUndocumented addresses 3
.DDR
.FDR
.LDR
.PDD.HIS.DTR.FSR.XRF.MMR.MUR.PVR.PSR.PDR.LIS.SAT.SXR.SLR.TXR.STR.UAR.IOR.TXU
\IPDS\LIS\PLC5
\IPDS\TEXT\PLC5Configuration and title file for documentation reports .TTL \IPDS\ARCH\PLC5Release 3.3 and earlier - Files no longer used Offline PMFI/O Configuration
.ACH.IOD
\IPDS\ARCH\PLC5
3 To print/view the Undocumented Addresses report, you must specify the \IPDS\TEXT\PLC5directory.
PrefaceUnderstanding Files
1-6
Directory Structure for PLC-5 Files
Figure 1.1 shows the directory structure for the 6200 PLC-5 files. See Table 1.B forfile types, extensions, and the directory they are stored in.
Figure 1.1Directory Structure for 6200 PLC-5 FilesIPDS ATTACH
PLC56200WORK
LANG
BACKUP
LANGUS
LANG
LIS
ARCH
TEXT
PLC5
PLC5
US
PLC5
US
Understanding Files
1-7
Processor Files
The processor files are part of the processor memory file (Table 1.C). You canprogram online or offline. When on line, all the “processor files” are stored in theprocessor. When you are working off line, the processor files are stored on thecomputer disk in the .AF5, .D1$ and .P1$ files. Collectively, these files areknown as the processor’s archive file.
Table 1.CProcessor Files
File Type: Function:Data table Contains the data table information for the current processor.Force table Contains the forced I/O information for the current processor.I/O configuration Contains the I/O configuration information you specified for the I/O
modules that you configured.Ladder Contains the ladder logic program (associated with one step,
transition, or subroutine for the current processor).SFC Contains the sequential function chart for the current processor.Structured Text Contains the structured text logic program (associated with one step,
transition, or subroutine for the current processor).System Contains information that identifies the associated processor. You
cannot delete or modify this file.
PrefaceUnderstanding Files
1-8
Organizing and Creating Program Files
2-1
2 Organizing and CreatingProgram Files
Chapter Objectives
Before you create ladder logic, organize your program files and data table files. Usethis chapter to learn how to organize program files.
If You Want to Read About: See Page:
The program directory 2-2Program files 2-3Creating program files 2-5Naming processor program and memory files 2-7
PrefaceOrganizing and Creating Program Files
2-2
Using the Program Directory
The program directory lists the files associated with the current processor memoryfile. The following shows an example program directory on the Online ProgramDirectory screen with files already created (Figure 2.1).
Figure 2.1Online Program Directory Screen
+= PROGRAM DIRECTORY FOR PROCESSOR: BATCH ======================[ ONLINE ]===+| File Name Type Size(words) ||------------------------------------------------------------------------------|| 0 system 4 || 1 drill press MCP function chart 102 || 2 set-up MCP ladder 35 || 3 ladder 20 || 4 ladder 63 || 5 drill ladder 20 || 6 ladder 45 || 7 polish ladder 41 || 8 ladder 35 || 9 check ladder 70 || 10 package ladder 100 || 11 ladder 89 || 12 ladder 25 || 13 fault ladder 35 |+==============================================================================+
Press a function key or enter file number or name.>Rem Prog Series B Revision H PLC-5/40 Addr 20Proc Save Return Change Who Memory MonitorFunctns Restore to Menu Station Active Map File
F1 F2 F3 F4 F5 F6 F8
name of the processor memory file
program files
Main control programs are designated with MCP after the program file name(Enhanced PLC-5 processors only.)
Tip When selecting the file number (/file name) that you want to monitor, you canalso press [PageDown], [PageUp], or type the file number and press [Enter].
Organizing and Creating Program Files
2-3
Overview of Program Files
You store all program logic in program files. Table 2.A describes the types ofprogram files.
Table 2.ATypes of Program Files
Stores This Type of Program:
File Number: Classic PLC-5 Processors Enhanced PLC-5 Processors
0 System information System information1 SFC1 logic programs SFC logic programs2 - 999 Ladder logic programs Ladder logic programs/SFC/StructuredText1 If using a PLC-5/15 processor, requires series B.
Creating Enhanced PLC-5 Processor Memory Files
With the Enhanced PLC-5 processors, you can have up to 16 main control programs(MCP). You can have any combination of ladder, structured text, and SFC files.
Files not designated as MCPs, or ones called by an SFC, are ignored unless thosefiles are called by an MCP (such as in a subroutine call, PII, STI, or fault routine).
SFC Sequential function charts are best for batch or sequential operations.They serve as application “traffic cops,”selecting the next program file toexecute. The selection depends on what “conditions”are met.
relay ladder logic(RLL)
Ladder diagram logic was first used when programmable controllersbegan replacing relays. It closely resembles hardwired relay logic,making it easy for maintenance personnel familiar with existing relaycontrol systemsto troubleshoot the controllers.
structured text(ST) (9313-ST5option)
ST is best suited for data handling, making decisions, sortingcomputations,and intensive mathematical applications. It allows you towrite the programs with BASIC-like instructions and symbolic addresses.
You specify which files are the main program files with the processor configurationscreens. For more information on how to specify these files as main programfiles, see chapter 11 in the Software Configuration and Maintenance manual.
For example:You could have 1 mainSFC file, 1 ST file, and14 main ladder files; or4 main SFC files, 2 STfiles, and 10 mainladder files.
PrefaceOrganizing and Creating Program Files
2-4
The greater the number of program files that you create, the longer it will take theprocessor to perform certain tasks, e.g., going to Run mode, editing on line, andsaving a program.
Note If this is the first time you access your processor on line, you might have to clearmemory and name the processor memory file before the software allows you tostart programming.
Creating Classic PLC-5 Processor Memory Files
Your first ladder file should be program file 2. If your first ladder file is anothernumber (such as program file 4), leave the preceding program files (files 2 and 3 inthis case) undefined. The processor starts executing ladder logic with the firstprogram file that is defined as a ladder file and ignores the other ladder files, unlessthose files are called by ladder logic in the first ladder file (such as in asubroutine call).
If you use a sequential function chart (program file 1), it does not matter whichprogram file you use for the first ladder file; the SFC calls the ladder files in theorder you specify within the SFC.
Organizing and Creating Program Files
2-5
Accessing Processor Memory Files
Multiple users can view offline processor memory files simultaneously. However,only one user can modify a processor memory file at a time. If a second user tries tomodify a processor memory file already in use by another user, the second user willreceive an error message.
Creating Program Files
When you want to begin programming, you must first create the program files thatwill contain the program logic. The following procedure explains how to create aprogram file, whether you are adding program files to an existing processor memoryfile or creating a new processor memory file.
If you do not enter consecutive file numbers when creating your program files, thefiles between the last created file and the newly created file are listed as undefined.For example, if your program directory contains files 0-3 and you specify 7 as yournext file to create, files 4, 5, and 6 are listed as undefined. These undefined files aremerely placeholders; in order to program logic, you must change them fromundefined files to ladder files. Do this by monitoring the undefined file.
Until you name program files, the name field for each file remains blank. Forinformation about valid program file names, see the next page.
Note Use consecutive files to conserve memory. Each undefined file uses 4 words inClassic PLC-5 processors and 6 words in Enhanced PLC-5 processors.
PrefaceOrganizing and Creating Program Files
2-6
See page 2-3for informationabout creatingprocessormemory files.
+= PROGRAM DIRECTORY FOR PROCESSOR: EXPSFC ======================[ OFFLINE ]===+| File Name Type Size(words) ||------------------------------------------------------------------------------|| 0 system 4 || 1 function chart 63 || 2 undefined 0 || 3 ladder 1 || 4 ladder 1 || 5 ladder 1 || 6 ladder 1 || 7 ladder 1 || 8 ladder 1 || 9 ladder 1 || 10 ladder 1 || 11 ladder 1 || 12 ladder 1 || |+==============================================================================+
Press a function key or enter file number or name.> ÛProgram PLC-5/40 Series B Revision B 5/40 File EXPSFCChange Modify Change Clear Delete Create Create Monitor Rename ChangeMode Priv Proc Memory File Lad Fl SFC Fl File Proc Fl.NameF1 F2 F3 F4 F5 F6 F7 F8 F9 F10
Press this key to editthe file after you’vecreated it.
Press the function key for the type to create, then entera file number. For more information, see chapter 10 ofthis manual or the Structured Text User Manual.
6200Main Menu
F1
Online/OfflineDirectory
F1
Online ProgF3
Offline Prog
Proc Func
Organizing and Creating Program Files
2-7
Naming Processor Memory and Program Files
All the files you create (comment and symbol files and documentation reports) for aspecific processor take on the name of the associated processor memory file.
The first time you use the processor, or after you clear memory, the processorname is DEFAULT. You must enter a new name for the processor or restore anexisting archive file. The processor name must be a valid file name with a maximumof 8 characters and no extension.
Note DEFAULT is not a valid processor name. Also, DOS reserved names are not valid,such as:
COM1 LPT1 AUXCOM2 LPT2 CONCOM3 LPT3 NULCOM4 PRN CLOCK
The software continues to prompt you to change the name until you enter a validname. Use meaningful names that help you identify the contents of a file.
You can also restore any of the files listed in the program directory. See chapter 3for more information.
To name a processor memory file or program file, follow the steps on the next page.
PrefaceOrganizing and Creating Program Files
2-8
A-Z0-9underscore
To help differentiate files, you might not want to name thisprogram file the same as any other program file in the sameprogram directory, A valid name contains up to eight of thefollowing characters:
6200Main Menu
F1
Online/OfflineDirectory
F1
Online ProgF3
Offline Prog
Proc Func
ProcessorFunctions
F9
Rename Proc
Enter processor memory file name
A-Z0-9underscore
A valid processor memory file cancontain up to eight of the followingcharacters:
6200Main Menu
F1
Online/OfflineDirectory
F1
Online ProgF3
Offline Prog
Proc Func
ProcessorFunctions
F10
Change File Name
Enter file name
Cursor to the file withthe name you wantto change
Naming a Processor Memory File Naming a Program File
You cannot start a processor memoryfile name with an underscore.
The software stores program file names in systemfile 0. Thisfile cannot be modified.To delete a program file name, follow the procedure for naminga file, but instead of typing in a name, press [Enter]
Organizing and Creating Program Files
2-9
Choosing a Method to Program Logic
After you create a file and are ready to write your program logic, use the followingtable to choose the best way to program your processor.
With this Method: You Can: For More Information, See:
Ladder logic program using a language that is representative of relay logic.Choose this language if you are:
·more familiar with ladder logic than with programminglanguages such as BASIC
Your plant personnel may be more familiar with ladder logic;consider their needs as well.
·performing diagnostics·programming discrete control
PLC-5 Instruction SetReference manual
Subroutines store recurring sections of program logic that can be accessedfrom multiple program files.A subroutine saves memory because you program repetitivelogic once. The JSR instruction directs the processor to go to aseparate subroutine file within the logic processor, scan thatsubroutine file once, and returns to the point of departure.
PLC-5 Instruction SetReference manual
Sequential FunctionCharts (SFCs)
use sequence-control language to control and display the stateof a sequential process. Instead of using one long ladderprogram for your application, divide the logic into steps andtransitions. A step corresponds to a control task; a transitioncorresponds to a condition that must occur before theprogrammable controller can perform the next control task. Thedisplay of these steps and transitions lets you see what statethe machine process is in at a given time via a flowchart form.SFCs offer constructs that enable execution of multiple paths oflogic, or a single selected path of logic, as well as the ability tojump forwards and backwards.Troubleshooting can be reduced to a small routine of logicinstead of an entire program file.SFCs are best for defining the order of events in asequential process.
PLC-5 Programming Manual
(Continued)
PrefaceOrganizing and Creating Program Files
2-10
With this Method: For More Information, See:You Can:
Structured text (EnhancedPLC-5 processors only,series C, revision Cand later)Optional, catalog number9313-ST5
program using a language similar to BASIC.Choose structured text if you are:
·more familiar with programming languages such as BASICthan with ladder logic
·using complex mathematical algorithms·using program constructs that repeat or “loop”·creating custom data-table monitoring screens
PLC-5 Structured TextUser Manual
Main Control Programs(MCPs) (Enhanced PLC-5processors only)
separate sequential logic from ladder logic and structured textas a way of modularizing your process and makingtroubleshooting easier.Use several main control programs (MCPs) to define one maincontrol program for each particular machine or function of yourprocess. MCPs accommodate independent ornon-sequential activities.A main control program can be an SFC file numbered 1-999or a ladder-logic file or structured-textprogram numbered2-999.One data table is used by all MCPs (i.e., you do not have aseparate data table for each MCP).
Enhanced and EthernetPLC-5 ProgrammableControllers User Manual
Saving and Restoring Processor Memory Files
3-1
3 Saving and Restoring ProcessorMemory Files
Chapter Objectives
Use this chapter to learn how to save a processor memory file from the processor tothe disk (during and after you make edits) and restore processor memory files fromyour disk to the processor.
If You Want to Learn to: See Page:
Save processor memory files 3-2Restore processor memory files 3-7Restore CAR files 3-10Store a program in EEPROM 3-11Merge processor memory files 3-12
PrefaceSaving and Restoring Processor Memory Files
3-2
Saving Processor Memory Files
The programming software provides two save utilities; one for saving your work asyou edit; one for saving your work when you finish editing. These save utilities are:
· Save and continue· Save/Restore (online only)
Note In addition to saving files, it is also good practice to periodically back up your workon a different media, such as a floppy disk. The frequency with which you need toback up your work depends on the amount of work you do. If you makeprogramming changes frequently, you might want to make backups every day;however, if you make changes infrequently, you might need to make backups onlyonce a week.
Save and Continue
The save and continue feature lets you save sequential function charts, ladderprograms, structured text programs, and database entries periodically as you work.Table 3.A lists when the save and continue feature is available and describes theresults of this feature.
Table 3.AUsing Save and Continue Online and Offline
Programming: Result:
Online Saves only the database files (comments and symbols). To save theprocessor memory file, you must use Save/Restore.See the nextsection for information on Save/Restore.
Offline Saves the processor memory file and database files.
The save and continue feature is available through the Save & Continue functionkey. Table 3.B lists the screens on which this key appears.
Table 3.BScreens that Have the Save and Continue Key
Function Key: Screen:
[F2] SFC Program Directory (on line and off line)[F2] Ladder Editor Program Directory (off line)[F10] Ladder Editor Documentation (on line and off line)
Saving and Restoring Processor Memory Files
3-3
Save/Restore
Save/Restore is a feature you can only use when you program on line. Table 3.Clists the tasks you can perform with the save/restore feature.
Table 3.CAvailable Tasks with the Save/Restore Feature
Function: Result:
Save Saves the processor memory file and comments/symbolsdatabase from the processor to the hard disk if edits were made.
Restore Restores a processor memory file from disk to the processor.Restores a CAR (custom application routine) file from disk to aprogram file in the processor.
Note When saving or restoring a ControlNetä PLC-5 processor memory file, thefollowing message is displayed in the utility window:
PROCESSING CONTROLNET NODE AND NETWORK INFORMATION
PrefaceSaving and Restoring Processor Memory Files
3-4
Saving Files
To save a processor memory file from the processor to a disk file, follow the stepson the left.
Press this key to view the Save Program window.
Press a function key.>Rem Prog PLC-5/15 Series B Revision H PLC-5/15 Addr 20
Save RestoreProgram Program
F2 F4
6200Main Menu
F1
OnlineDirectory
F2
Online Prog
Save Restore
Press this key to see a list of existing processor memory files.If you use an existing name, the current file overwrites theexisting file on disk.
+= PROGRAM DIRECTORY FOR PROCESSOR: MEMORY ======================[ ONLINE ]===+| File Name Type Size(words) ||------------------------------------------------------------------------------|| 0 system 4 || 1 function chart 102 || 2 ladder 35 || 3 ladder 1 || 4 ladder 1 || 5 ladder 1 || 6 ladder 1 || 7 ladder 1 || 8 ladder 1 || 9 ladder 1 ||+= SAVE PROCESSOR FILE ==========+ ladder 1 ||| | ladder 1 ||| File: LIMIT | ladder 1 ||| | ladder 1 |++= ESC exits ====================+============================================+
Press a function key or enter a file name.>Rem Prog PLC-5/15 Series B Revision H PLC-5/15 Addr 20Begin Display DefineOper Dirctry DirctryF1 F6 F7
Note: You can stopthe Save process with
F3
Abort Utility
Press this key to change the drive or directory pathsfor processor memory files and comments/symbolsfiles.
F2
Save Program
F1
Begin Oper
If you want to save the currentprocessor memory to adifferent name, enter the newname, then press [ENTER],then press
Saving and Restoring Processor Memory Files
3-5
Saving and Backing Up Processor Memory Files (PMF)
You can save your current processor memory and documentation files to one or twoseparate save directories. You can also configure the 6200 programming software toback up your PMF and documentation files.
Note The primary save directory is pre-defined by Rockwell Software(IPDS\ARCH\PLC5). You can specify another directory, but a primary savedirectory must always be defined.
You define the primary and secondary save directories and the primary andsecondary backup directories by entering the directory paths and separating themwith a semicolon (;).
This Directory: Stores This Information:
Primary Save Directory PMF and documentation filesThis is the original save directory and must always be defined.
Secondary Save Directory PMF and documentation filesThis is an additional, optional directory and is separated from theprimary save directory by a semicolon (;). You do not have to definethis directory.
Primary Backup Directory PMF and documentation filesThis is the first backup directory. You do not have to define thisoptional directory.
Secondary BackupDirectory
PMF and documentation filesThis is an additional backup directory and is separated from theprimary backup directory by a semicolon (;). You do not have todefine this optional directory.
For example, if you enter C:\IPDS\ARCH\PLC5;C:\IPDS\ARCH\BCKP as the savedirectory, you have specified C:\IPDS\ARCH\PLC5 as the primary save directoryand C:\IPDS\ARCH\BCKP as the secondary save directory.
The save and backup directories work together to provide version control of yourprogram. For example, configure all four directories (primary and secondary saveand primary and secondary backup) and create a new program. Save your newlycreated program. The software saves your program to the primary and secondarysave directories. Then make changes to your program and save your changes. ThePMF and documentation files in the primary and secondary save directories aresaved to the primary and secondary backup directories. The changes you just madeare saved to the primary and secondary save directories.
PrefaceSaving and Restoring Processor Memory Files
3-6
Note If your save directories do not contain documentation files and your backupdirectories do, your documentation files will be deleted if you proceed with thefile backup.
See chapter 5 if you want to copy a PMF or archive file from one of your backupdirectories or the secondary save directory to the primary save directory. Seechapter 5 of the Software Configuration and Maintenance manual to definedirectory paths.
Saving and Restoring Processor Memory Files
3-7
Restoring Processor Memory Files
The restore function clears processor memory and transfers a copy of the processormemory file from disk to the processor. You restore files when you want to use ormake edits to an existing processor memory file that is stored on disk. This functionis not available if you are programming off line.
Force tables are restored during this process. If you saved the processor memory filewith forces enabled, the system asks you if you want the forces to remain enabledafter the restore operation is complete.
Attention: If you enable forces, keep personnel away from the machine area.Forcing I/O or transitions can cause unexpected machine motion that couldinjure personnel.
The processor also recognizes unassembled edits when you restore a processormemory file. If unassembled edits exist, the software displays a message that thereare unassembled edits in the processor memory file.
PrefaceSaving and Restoring Processor Memory Files
3-8
+= PROGRAM DIRECTORY FOR PROCESSOR: += D:\IPDS\ARCH\PLC5\*.AF5 =================+=+| File Name | Name Size Date Time |||----------------------------------- |------------------------------------ ---||| 0 | DRILL1 1003 2-16-90 11:47a ||| 1 | MOTOR 540 5-04-90 6:04a ||| 2 | PRACTICE 679 2-16-90 11:37a ||| 3 | VME1 706 7-06-89 1:19p ||| 4 | ||| 5 | ||| 6 | ||| 7 | ||| 8 | ||| 9 | ||| 10 | ||| 11 | ||| 12 | ||| 13 | ||+===================================+========================================+=+
Press a function key, enter a filename, or move cursor to select file.>Rem Prog Ser B Rev H 5/15 Addr 20 LIMITBegin Define Select Save Fl ConvOper Dirctry Type Config UtilF1 F7 F8 F9 F10
Press until the directory at the top of the file windowis in the directory for .AF5 files (processor memoryfiles, also known as archive files)
6200Main Menu
F1
OnlineDirectory
F2
Online Prog
Save Restore
F4
Restore Prog
Note: If you have an existing .ACH filethat you want to restore, you must firstconvert the file to the .AF5 format touse version 4.1 (or later) of thesoftware using
Select file to restore,then press this key.
12
Note: You can stop the Restoreprocess with
F3
Abort Utility
If you do this, the systemclearsprocessor memory and you loseany information that was there.F10
Fl Conv Util
See appendix A.
If you do not know the entire name of the processor memory file that you want torestore, you can use the [up arrow], [down arrow], [PageUp], and[PageDown] keys to move through the list of processor memory files. You can alsotype a partial name or letter and press [Enter] to have the system search for theclosest match.
Note The PLC-5/15 processor sets a fault during the restore process. The fault preventsyou from placing the processor in Run mode accidentally while the restore occurs.Once the complete processor memory file is restored, the system clears the fault andthe fault LED stops flashing.
Saving and Restoring Processor Memory Files
3-9
Note When you restore a program to an Enhanced PLC-5 processor, you may get thewarning: ??WARNING?? UNABLE TO APPLY PORT CONFIGURATION TOCHANNEL xx (where xx is a channel number). This error message can be caused bythe following circumstances:
· The channel configuration information is not compatible with the processorto which you are downloading. For example, if you configured channel 0for DF1 Master mode and then tried to download that file to a PLC-5/40series A processor.
· You configured your channels off line. Minimal error checking is done off linewhen you accept channel edits. Therefore, it is possible that invalid data wasaccepted during your offline configure. When you download that invalidconfiguration, the processor displays the warning.
If you see this message, re-configure the affected channel (as identified in the errormessage) with the proper information.
PrefaceSaving and Restoring Processor Memory Files
3-10
Restoring CAR Files
You restore CAR (custom application routine) files the same way you restoreprocessor memory files. If you have a CAR file (which is separate from, but used by6200 programming software), you can program your ladder logic without loadingthe CAR file into the processor memory first. However, the CAR file must beloaded before running the program.
You can only restore a CAR fileinto a program file that does notexist or is undefined.
The CAR file becomes a part ofthe current processor memory.When you save processormemory, the CAR file is savedalong with your ladder logic.
6200Main Menu
F1
OnlineDirectory
F2
Online Prog
Save Restore
F4
Restore Prog
Select Type
F8
Select a file
F1
Begin Oper
Enter the programfile where you wantto store the .CAR file
until the directory at the top of the filewindow is the directory for .CAR files(default directory is for .AF5 files)
either using the arrow keys or enteringthe name of the file (a partial name willsearch for the closest match) andpress [Enter].
Saving and Restoring Processor Memory Files
3-11
Writing to an EEPROM
You can store a program in Electrically Erasable Programmable Read OnlyMemory (EEPROM) if an EEPROM is installed in your processor. You must beprogramming on line (processor set to Program or Remote Program) to write toan EEPROM.
Note When you write to an EEPROM, all forces are removed from the program.
If you confirm the procedure, the EEPROM write begins. During this procedure, thePROC LED on the processor flashes and the programming terminal beeps until thewrite procedure completes.
If no error occurs during the write to the EEPROM, the system displays thefollowing message: EEPROM SUCCESSFULLY BURNED.
Note After restoring a program that is protected by passwords and privileges from anEEPROM to an Enhanced PLC-5 processor, set the channel privileges for the typeof protection you want. When a protected program is restored to an EnhancedPLC-5 processor, all passwords and privileges are restored as originally configuredexcept channel privileges. Channel privileges are restored with fullread/write privileges.
Ladder EditorMain Menu
F7
General Utility
F8
Write EEPROM
F8
Yes
F10
No
or(to abort)
Online ProgramDirectoryor
(to confirm)
PrefaceSaving and Restoring Processor Memory Files
3-12
Merging Processor Memory Files (Offline Only)
You can merge processor memory files through the program directory when youprogram off line. This merge function lets you merge an existing processor memoryfile on disk (containing program files, data tables, etc.) with the processor memoryfile currently loaded in the computer’s memory. This function is not accessed fromthe file utilities screen. Follow the steps on the left.
Enter file to merge or cursor to file
+= PROGRAM DIRECTORY FOR PROCESSOR: DRILL1 ======================[ OFFLINE ]===+| File Name Type Size(words) ||------------------------------------------------------------------------------|| 0 system 4 || 1 undefined 0 || 2 ladder 29 || 3 ladder 7 || || || || || || || || || || |+==============================================================================+
Press a function key or enter a file name.>
Program PLC-5/15 Series B Revision H PLC-5/15 File DRILL1Save & MergeContnue ProgramF2 F4
F3
Offline Prog
F2
Save Merge
6200Main Menu
Make sure the correctprocessor memory fileis current.
1
3F1
Begin Oper
Press this key to view the Select File to Merge screen.
2
If You Want to: Press this Key:
Save your work and continue editing [F2] - Save & ContinueMerge the selected processor memory fileswith the current processor memory files
[F4] - Merge Program
Saving and Restoring Processor Memory Files
3-13
Merge Rules
When you merge processor memory files, the software checks the selected (“to bemerged from,” “old”) file and the current (“to be merged to,” “new”) file forcompatibility and size. The size of both files, when added, cannot exceed thememory size of the new processor. When combined, the selected (old) file takesprecedence over the current (new) file, as described in the following examples.
You can merge processor memory files only when you program off line.
1. The data table file types must be the same for matching data table file numbersin both processor memory files.
For example, if you use the address N15:0 in the current processor memory file,you designated data table 15 as integer (N); therefore, any addresses that usedata table 15 in the selected processor memory file must also be integer.
2. Once the software determines that there are no data table conflicts, the currentdata table is overwritten with the selected data table.
Each program file in the selected processor memory file is appended to the endof the same numbered program file in the current processor memory file.
For example, merge BATCH1 (to be merged from) to BATCH2 (to be mergedto) (Table 3.D).
Table 3.DExample Files to Merge
Selected Current
BATCH1 BATCH2
File Name Type File Name Type
0 - system 0 - system1 SFC function chart 1 - -2 lad1 ladder 2 - -3 lad2 ladder 3 start ladder4 lad3 ladder 4 mix ladder
5 drill ladder
PrefaceSaving and Restoring Processor Memory Files
3-14
File “lad2”is merged to the end of “start”and “lad3”is merged to the end of “mix.”The new processor memory file, containing the contents of BATCH1 and BATCH2,keeps the name BATCH2 (but uses the ladder and SFC file names of BATCH1) andlooks like this (Table 3.E):Table 3.EExample New Merge Result
BATCH2
File Name Type
0 - system1 SFC function chart2 lad1 ladder3 lad2 ladder4 lad3 ladder5 drill ladder
3. Sequential function charts (SFCs) are handled as follows (Table 3.F):
Table 3.FMerging Sequential Function Charts
Selected ProcessorMemory File
Current ProcessorMemory File
New ProcessorMemory File
none none noneSFC1 none SFC1none SFC2 SFC2SFC1 SFC2 illegalSFC1 ladder illegalladder SFC2 illegal
You cannot merge Classic PLC-5 processor memory files if they contain anSFC. You can merge processor memory files created with an Enhanced PLC-5processor, provided the SFC files are not at the same file number and thecorresponding file is undefined.
4. When you merge files that were developed to work on two different types ofprocessors, the new processor memory file contains the attributes of the highestlevel processor, according to Table 3.A on pages 3-15 and 3-16.
Saving and Restoring Processor Memory Files
3-15
Table 3.AMerging Files from Different Processors
Selected Processor Memory File5/10 5/11 5/12 5/15 5/20 5/20E 5/20C 5/VME 5/25 5/26 5/30 5/V30 5/40
CurrentProcessor
5/10 5/10 5/11 5/12 5/15 5/20 5/20E 5/20C 5/VME 5/25 5/26 5/30 5/V30 5/40CurrentProcessorMemoryFile
5/11 5/11 5/11 5/20 5/20 5/20 5/20E 5/20C 5/20 5/30 5/26 5/30 5/V30 5/40MemoryFile 5/12 5/12 5/20 5/12 5/15 5/20 5/20E 5/20C 5/VME 5/25 5/26 5/30 5/V30 5/40
5/15 5/15 5/20 5/15 5/15 5/20 5/20E 5/20C 5/VME 5/25 5/26 5/30 5/V30 5/405/20 5/20 5/20 5/20 5/20 5/20 5/20E 5/20C 5/20 5/30 5/26 5/30 5/V30 5/405/20E 5/20E 5/20E 5/20E 5/20E 5/20E 5/20E 5/20C 5/20E 5/30 5/20E 5/30 5/V30 5/40E5/20C 5/20C 5/20C 5/20C 5/20C 5/20C 5/20E 5/20C 5/20C 5/30 5/20C 5/30 5/V30 5/40C5/VME 5/VME 5/20 5/VME 5/VME 5/20 5/20E 5/20C 5/VME 5/25 5/20 5/30 5/V30 5/405/25 5/25 5/30 5/25 5/25 5/30 5/30 5/30 5/25 5/25 5/30 5/30 5/V30 5/405/26 5/26 5/26 5/26 5/26 5/26 5/20E 5/20C 5/26 5/30 5/26 5/30 5/V30 5/405/30 5/30 5/30 5/30 5/30 5/30 5/30 5/30 5/30 5/30 5/30 5/30 5/V30 5/405/V30 5/V30 5/V30 5/V30 5/V30 5/V30 5/V30 5/V30 5/V30 5/V30 5/V30 5/V30 5/V30 5/V405/40 5/40 5/40 5/40 5/40 5/40 5/40E 5/40L 5/40 5/40 5/40 5/40 5/V40 5/405/40E 5/40E 5/40E 5/40E 5/40E 5/40E 5/40E 5/40E 5/40E 5/40E 5/40E 5/40E 5/40E 5/40E5/40C 5/40C 5/40C 5/40C 5/40C 5/40C 5/40C 5/40C 5/40C 5/40C 5/40C 5/40C 5/40C 5/40C5/46 5/46 5/46 5/46 5/46 5/46 5/40E 5/40L 5/46 5/46 5/46 5/46 5/V40 5/465/V40 5/V40 5/V40 5/V40 5/V40 5/V40 5/V40 5/V40 5/V40 5/V40 5/V40 5/V40 5/V40 5/V405/V40L 5/V40L 5/V40L 5/V40L 5/V40L 5/V40L 5/V40L 5/V40L 5/V40L 5/V40L 5/V40L 5/V40L 5/V40L 5/V405/40L 5/40L 5/40L 5/40L 5/40L 5/40L 5/40L 5/40L 5/40L 5/40L 5/40L 5/40L 5/40L 5/405/60 5/60 5/60 5/60 5/60 5/60 5/60 5/60 5/60 5/60 5/60 5/60 5/60 5/605/60C 5/60C 5/60C 5/60C 5/60C 5/60C 5/60C 5/60C 5/60C 5/60C 5/60C 5/60C 5/60C 5/60C5/60L 5/60L 5/60L 5/60L 5/60L 5/60L 5/60L 5/60L 5/60L 5/60L 5/60L 5/60L 5/60L 5/60L5/80 5/80 5/80 5/80 5/80 5/80 5/80E 5/80 5/80 5/80 5/80 5/80 5/80 5/805/80E 5/80E 5/80E 5/80E 5/80E 5/80E 5/80E 5/80E 5/80E 5/80E 5/80E 5/80E 5/80E 5/80E5/80C 5/80C 5/80C 5/80C 5/80C 5/80C 5/80C 5/80C 5/80C 5/80C 5/80C 5/80C 5/80C 5/80C5/86 5/86 5/86 5/86 5/86 5/86 5/80E 5/86 5/86 5/86 5/86 5/86 5/86 5/86
(Continued)
PrefaceSaving and Restoring Processor Memory Files
3-16
Selected Processor Memory File5/40E 5/40C 5/46 5/V40 5/V40L 5/40L 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/86
CurrentProcessor
5/10 5/40E 5/40C 5/46 5/V40 5/V40L 5/40L 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/86CurrentProcessorMemoryFile
5/11 5/40E 5/40C 5/46 5/V40 5/V40L 5/40L 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/86MemoryFile 5/12 5/40E 5/40C 5/46 5/V40 5/V40L 5/40L 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/86
5/15 5/40E 5/40C 5/46 5/V40 5/V40L 5/40L 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/865/20 5/40E 5/40C 5/46 5/V40 5/V40L 5/40L 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/865/20E 5/40E 5/40C 5/40E 5/V40 5/V40L 5/40L 5/60 5/60C 5/60L 5/80E 5/80E 5/80C 5/80E5/20C 5/40E 5/40 5/40C 5/V40 5/V40L 5/40L 5/60 5/60 5/60L 5/80 5/80E 5/80 5/865/VME 5/40E 5/40C 5/46 5/V40 5/V40L 5/40L 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/865/25 5/40E 5/40C 5/46 5/V40 5/V40L 5/40L 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/865/26 5/40E 5/40C 5/46 5/V40 5/V40L 5/40L 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/865/30 5/40E 5/40C 5/46 5/V40 5/V40L 5/40L 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/865/V30 5/40E 5/40C 5/V40 5/V40 5/V40L 5/40L 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/865/40 5/40E 5/40C 5/46 5/V40 5/V40L 5/40L 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/865/40E 5/40E 5/40C 5/40E 5/40E 5/40E 5/40E 5/60 5/60C 5/60L 5/80E 5/80E 5/80C 5/80E5/40C 5/40E 5/40C 5/40C 5/40C 5/40L 5/40C 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/865/46 5/40E 5/40C 5/46 5/V40 5/V40L 5/40L 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/865/V40 5/40E 5/40C 5/V40 5/V40 5/V40L 5/V40L 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/865/V40L 5/40E 5/40C 5/V40 5/V40 5/V40L 5/V40L 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/865/40L 5/40E 5/40C 5/40 5/V40L 5/V40L 5/40L 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/865/60 5/60 5/60 5/60 5/60 5/60 5/60 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/865/60C 5/60C 5/60C 5/60C 5/60C 5/60C 5/60C 5/60C 5/60C 5/60C 5/80 5/80E 5/80C 5/865/60L 5/60L 5/60L 5/60L 5/60L 5/60L 5/60L 5/60 5/60C 5/60L 5/80 5/80E 5/80C 5/865/80 5/80E 5/80 5/80 5/80 5/80 5/80 5/80 5/80 5/80 5/80 5/80E 5/80C 5/865/80E 5/80E 5/80E 5/80E 5/80E 5/80E 5/80E 5/80E 5/80E 5/80E 5/80E 5/80E 5/80C 5/80E5/80C 5/80C 5/80C 5/80C 5/80C 5/80C 5/80C 5/80C 5/80C 5/80C 5/80C 5/80E 5/80C 5/80C5/86 5/80E 5/86 5/86 5/86 5/86 5/86 5/86 5/86 5/86 5/86 5/80E 5/80C 5/86
Comparing Processor Memory
4-1
4 Comparing Processor Memory
Chapter Objectives
You can compare processor to processor, processor to memory file, and memory fileto memory file to identify differences between programming logic, data tableentries, program directories, and force table entries. For example, you can comparea program in your processor to its backup on a floppy disk to make sure that nochanges have been made to the program in the processor.
Use this chapter to learn how to select compare options.
If You Want to: See Page:
Compare processor memory 4-2Select compare options 4-5
PrefaceComparing Processor Memory
4-2
Comparing Processor Memory
You can compare ladder logic, data table entries, program directories, and forcetable entries between two online processors or between an online processor and anoffline processor memory file or between two offline processor memory files.Follow the steps on the left.
+========================= PLC-5 PROGRAMMING SOFTWARE =========================+| || A 6200 Series Software Product || || Copyright 1986, 1995 Rockwell Software Inc. || All Rights Reserved || += COMPARE ==================================+ || | | || | F1 Compare | || | | || | F3 Select Mode Processor to File | || | | . || | F5 Change Primary Configuration 20 | || | F6 Change Secondary Configuration DRILL1 | || | | || | F8 Print or View Reports | || | | |+===============+= ESC exits ================================+=================+
Press a function key.
Compare Select Primary Scndary Print/Mode Config Config View
F1 F3 F5 F6 F8
Press this keyuntil the screendisplays the typeof compare youwant to perform
6200Main Menu
F9
Compare
If You Want to Compare: Select this Mode:
Online processor memory to another onlineprocessor’s memory
Processor to Processor
Online processor memory to an offlineprocessor memory file
Processor to File
Offline processor memory file to an onlineprocessor memory
File to Processor
Offline processor memory file to anotheroffline processor memory file
File to File
Comparing Processor Memory
4-3
To perform a compare, follow these steps:
1. Select the primary source.
If the Compare Mode is: The PrimarySource File is:
Press [F5] - PrimaryConfiguration and define:
processor to processor orprocessor to file
online existing onlinecommunication characteristics
file to processor or file to file offline an existing offline file
2. Select the secondary source. The secondary source is compared to theprimary source.
If the Compare Mode is: The SecondarySource File is:
Press [F6-SecondaryConfiguration] and Define:
processor to processor or fileto processor
online existing onlinecommunication characteristics
processor to file or file to file offline an existing offline file
+========================= PLC-5 PROGRAMMING SOFTWARE ==========================+| || A 6200 Series Software Product || || += Program Files =======================+ || | | || | Starting File 2:0 | || | Ending File 999 | || | | || This softwa| Power Rail yes | || | | += 20 == DRILL1 ====+| | | | Program Files || | | | Program Directory || | | | Data Tables || | | | Force Tables || | | | |+===============+==========================================+=+=================+
Press a function key.
Create Select Toggle Reset Report General Define Title SaveReports All Report Reports Options Options Dir ConfigF1 F2 F3 F4 F5 F6 F7 F8 F9
F1
Compare
To select a report, cursor to the one youwant and press this key.
Press this keyto select allthe reports.
Compare
SecondaryConfiguration
PrimaryConfiguration
F6
Secndry Config
F5
Primary Config
Select fileor station
Select fileor station
PrefaceComparing Processor Memory
4-4
If You Want to See: Generate this Report: With the DOSExtension:
Program file differences Rung Program, SFCs, andStructured Text Comparison
.LDR
Differences in the Program Directories Program Directory Comparison .PDDData table file differences Data Table Comparison .DDRForce table entry differences Force Table Comparison .FDR
Select the compare report options and general options you want. For moreinformation about the compare report options, see below.
If You Want to: Press this Key:
Generate the selected reports [F1] - Create ReportsSelect all of the reports listed in the Report window [F2] - Select AllToggle between selecting and not selecting the cursored report(selected reports are marked with a check or an asterisk)
[F3] - Toggle Report
Cancel all report selections [F4] - Reset ReportsSelect report options for the content of the cursored report [F5] - Report OptionsSelect general display options for the cursored report [F6] - General OptionsDefine directories where you want to store the selected reports [F7] - Define DirectorySpecify the title for the selected reports [F8] - TitleSave the configuration options to disk [F9] - Save ConfigurationReturn to the previous screen [Enter]
[Esc]
The general options are the same options you choose when you select reports. Forinformation about the general options, see chapter 20 in the Software Configurationand Maintenance manual.
After you select the compare reports and options you want, press [F1] - CreateReports. The software creates the compare reports you specified in the\IPDS\LIS\PLC5 directory.
If you want to print or view compare reports, return to the Compare screen andpress [F8] - Print/View. For information about printing and viewing reports,see chapter 20 in the Software Configuration and Maintenance manual.
Comparing Processor Memory
4-5
Selecting Compare Options
The report options specify what information you want to include in the reports youchoose. You can choose report options for the following types of compare reports:
· program files comparison· data table comparison
F9
Compare
6200Main Menu
Primary Config
Secondary Config
CompareOptions
(Use [left arrow] [right arrow]to switch between the Reportwindow and the ReportOptions window)
F1
Compare
Select ModeF3
F5
F6
or
F6
GeneralOptions
or F8
Title(Define reportlisting options)
(Define alisting title)
Select report(s)you want F5
ReportOptions
F1
Create Reports
PrefaceComparing Processor Memory
4-6
Program Files Options
To configure the range for the Program Files Comparison, press[F1] - File Range. The software displays a range configuration window fromwhich you specify which files will be compared. Table 4.A lists these range options.
Table 4.AReport Options for Program Files Comparison
If You Want to: Press this Key:
Select all program files for the comparison [F2] - Select AllSelect a single program file for the comparison [F3] - Single FileSpecify beginning and ending file numbers forthe program listing
[F4] - EnterRange
Exit [Esc]
The Program Files Comparison report marks the differences between two programfiles, showing where rungs have been added, modified or deleted. A “Start ofDifference” section marks the place in the program where the two files do notmatch, with the rungs listed for the primary (Source 1) and secondary (Source 2) soyou can see the differences.
For example, a primary source file has the following rungs:
I:020
00
O:020
00I:006
00
O:006
00I:012
02
O:012
02I:016
00
O:021
01I:017
00
O:017
00
Comparing Processor Memory
4-7
A secondary source file has these rungs:
I:006
00
O:006
00I:011
00
O:011
00I:012
02
O:012
02I:016
00
O:016
00I:017
00
O:017
00
Figure 4.1 shows the beginning of the rung program comparison report for these twoprogram files.
Figure 4.1Sample Program Files Comparison Report
I:020
00
O:020
00
Source 1 (Proc File TEST1) Rung 2.0
**************START OF DIFFERENCE SECTION 2.0****************************
I:006
00
O:006
00
Source 1 (Proc File TEST1 Rung 2.1
I:006
00
O:006
00
Source 2 (Proc File TEST2) Rung 2:0
**********************************************************************
**************END OF DIFFERENCE SECTION 2.0********************************
************** START OF DIFFERENCE SECTION 2.1 ****************************
I:012
02
O:012
02
Source 1 (Proc File TEST1) Rung 2.2
**********************************************************************
I:011
00
O:011
00
Source 2 (Proc File TEST1) Rung 2:2
PrefaceComparing Processor Memory
4-8
Two consecutive matching rungs mark the end of a “Difference Section.” Thedifference section is numbered with the file number and the number of differencesections found in the file. For example, Difference Section 3.2 is the seconddifference section of file number 3.
Note If Compare reports differences in your programs and you can see no visibledifferences, this is due to changes made in recent firmware revisions and is not dueto differences in your programs. These firmware versions do not affect the programlogic. To workaround this problem, restore the old archive file into an updatedprocessor. Save this to a file and then do the comparison.
Data Table Options
To configure the data table entries for the Data Table Comparison, press [F1] -File Range. The software displays a file-range configuration window from whichyou specify the actual data table entries for the comparison. Table 4.B lists thesefile-range options.
Table 4.BReport Options for Data Table Comparison
If You Want to: Press this Key:
Select the full file range for the comparison [F2] - Select AllSelect a single file for the comparison [F3] - Single FileSpecify beginning and ending file numbers for the listing [F4] - Enter RangeUse the configuration options you specify for this editing session only [Enter]
[Esc]
Comparing Processor Memory
4-9
Figure 4.2 shows part of a data table report.
Figure 4.2Sample Data Table Comparison Report
octal addresses, binary data
Address DataO:000 (1)......1100
(2)......000011100000
00110000
11110000
017
O:010 (1)......1100(2)......0000
11100000
00000000
00000000
O:013 (1)......0000(2)......0110
00001001
00000000
00001001
O:016 (1)......0000(2)......0101
00000100
00000010
00000001
O:021 (1)......0001(2)......0001
11100000
00000000
00001000
O:025 (1)......0000(2)......0000
00000001
00001101
00001011
AddressO:001 (1)......0000
(2)......000011110000
17
O:011 (1)......0000(2)......1100
11100000
O:014 (1)......1100(2)......0110
00001001
O:017 (1)......0000(2)......0101
00000100
O:022 (1)......1000(2)......0001
11100000
O:031 (1)......0000(2)......0000
00000001
Note For data table or force table comparison reports, if the two files being compared arenot the same length, the comparison stops at the last element of the shorter file.
PrefaceComparing Processor Memory
4-10
Using Disk File Utilities
5-1
5 Using Disk File Utilities
Chapter Objectives
This chapter shows how to perform the file maintenance tasks that the softwareprovides. These tasks include:
Task Definition Page Number
Changing the documentationdatabase width
Convert existing database comments andsymbols to a new width between 10 and 20
5-3
Copying from backup directory Restore processor memory file from primaryor secondary backup directory
5-5
Renaming files Change the name of an existing file 5-7Copying files in thesame directory
Make a copy of a file within the samedirectory to re-use ladder rungs inanother program
5-8
Copying files to/from floppy orto a different directory on thehard disk
Make a copy of a file to/from a floppy disk toback-up your files
5-9
Deleting files Delete a file 5-12Merging files Combine files within the 6200 programming
software directory5-13
PrefaceUsing Disk File Utilities
5-2
To perform file maintenance tasks, follow the steps on the left.
+========================= PLC-5 PROGRAMMING SOFTWARE =========================+| || A 6200 Series Software Product || || Copyright 1986, 1995, Rockwell Software Inc. || += FILE UTILITIES ===============+ || | F1 Change Documentation Width | || | F2 Copy From Backup Directory | || | F3 Rename | || | F4 Copy | || | F5 Delete | || | F6 Import | || | F7 Export | || | F8 Merge Documentation | || | F9 Copy To/From Floppy | |+======================+= ESC exits ====================+======================+
Press a function key
Change Copy Rename Copy Delete Import Export Merge To/FromWidth Backup FloppyF1 F2 F3 F4 F5 F6 F7 F8 F9
6200Main Menu
F7
File Utilities
Press the function keyfor the task you wantto perform.
Using Disk File Utilities
5-3
Changing the Documentation WidthYou can specify a new width for your existing databases using the databaseconversion utility. You can convert one or all of your existing databases at one time.Complete the steps on the left to change the width.
+========================= PLC-5 PROGRAMMING SOFTWARE =========================+| +== PROCESSOR =+| A 6200 Series Software Product | || | BUBBA || Copyright 1986, 1995, Rockwell Software Inc | DRILL || All Rights Reserved | HCO_310 || | || Release 5.2 | || | || This software is licensed to: Company Allen-Bradley Co. | || Location 1 Allen-Bradley | || += CHANGE COMMENT AND SYMBOL WIDTH =+ | || | | | || | SOURCE: | | || | | | || | TO WIDTH: 10 | | || | | | |+=========================+= ESC exits =======================+=+==============+
Press a Function Key or Enter File Name>
Convert Convert Select Enter DefineOne All Source Width DirF1 F2 F3 F4 F7
6200Main Menu
F7
File Utilities
F1
ChangeWidth
If You Want to: Press this Key:
Convert only one database (begin operation) [F1] - Convert OneConvert all of the databases [F2] - Convert AllSelect the database to convert [F3] - Select SourceDefine a new database width [F4] - Comment & Symbol WidthDefine a different primary save directory for converted databases [F7] - Define Directory
After accessing the change documentation width function, follow the steps on theleft to change the database width.
F3
F4
Enter Width
Select Source
Enter new width (10-20)and press [Enter]
F1 F2
ConvertOne
ConvertAllor
PrefaceUsing Disk File Utilities
5-4
Note Once you have converted a database, it is not compatible with earlier versions of6200 programming software.
Note Comments and symbols can be truncated when converting databases to asmaller width.
You can determine any database width by performing one of these procedures:
· Enter the ladder editor (online or offline). Enter a symbol that exceeds 20characters. The error message SYMBOL MUST NOT EXCEED 10 CHARACTERS.shows you the database width, for this example, is 10.
· Export the database to a new file. Examine the %WIDTH key word in the TXTfile. For example, %WIDTH 15, indicates the database width is set to 15.
When you convert a database and increase the width, your comment lines willcontain more text with the %WRAP formatting command. If you increase the width ofyour database and select %NOWRAP, the new database will look the same as the oldwith the extra spaces on the right. See chapter 6 for information onformatting commands.
For example, if youselect 20 as your newdefault database width,and select %WRAP, yourcomments will be 20characters wide. If youhave %NOWRAP selected,your comments will be 10characters wide and therewill be 10 extra spaces onthe right.
Using Disk File Utilities
5-5
Copy Processor Memory and Documentation Files FromBackup Directory to Primary Save Directory
You can restore processor memory and documentation files from the primary orsecondary backup directories to the primary save directory. Follow the steps onthe left.
6200Main Menu
F7
File Utilities
F2
Copy Backup
+========================= PLC-5 PROGRAMMING SOFTWARE ======================+| || +=== C:\IPDS\*.AF5 ====+| | Name Size Date || +-----------------------------------+| | BUBBA 38016 09-27-94|| | DRILL 32384 09-15-94|| | HCO_310 41088 09-28-94|| | STALLINS 203392 06-21-94|| | |+= COPY PROCESSOR AND DOCUMENTATION ==+ | || | | || NAME: | | || | | || FROM BACKUP DIRECTORY: | | || C:\IPDS | | || | | |+= ESC exits =========================+=+===================================+
Press a Function Key or Enter File Name>
Begin Select Select DefineOper Name Backup DirF1 F3 F4 F7
If You Want To: Select:
Begin the copy process [F1] - Begin OperationSelect a file from one of the backup directories [F3] - Select NameSelect one of the backup directories [F4] - Select BackupConfigure a primary or secondary save or backup directory [F7] - Define Directory
Note If you have not configured any backup directories, pressing [F2] displays theerror message NO BACKUP DIRECTORIES ARE CONFIGURED. See chapter 3for information on creating backup directories. See chapter 5 of the SoftwareConfiguration and Maintenance manual to define directory paths.
PrefaceUsing Disk File Utilities
5-6
After accessing the copy backup function, follow the steps on the left to select a fileto copy.
Your processor memory and documentation files are copied from the specifiedbackup directory to the primary save directory. If the file already exists in the 6200processor memory file directory, you must confirm your intention to overwrite thecurrent file.Enter file name or
cursor to file
F3
Select Name
F4
Select Backup
F1
Begin Operation
Advances through theconfigured secondarysave directory and theprimary and secondarybackup directories forprocessor memory files
Using Disk File Utilities
5-7
Renaming Files
The rename utility changes the name of an existing file within the 6200 directoryyou defined with the Define Directory option. The rename utility does not copy ormove files. Follow the steps on the left.
If You Want to: Press this Key:
Rename processor memory files [F1] - Processor Memory FileRename comments and symbols files [F3] - Comments and SymbolsRename exported comments and symbols files [F4] - Exported Comments & SymbolsRename documentation report files [F5] - Documentation ReportsRename all the above files that are associatedwith the current processor
[F6] - All of the Above
Rename the paste files you created with thecut/copy save functions
[F7] - Cut Files
Rename an exported processor memory file [F8] - Exported Processor Memory File
After you select the type of file that you want to rename, the system displays theSelect File to Rename screen. Follow the steps on the left.
The system renames the source file to the destination file. If a file exists with thesame name as the one you specified in the destination field, you are prompted tooverwrite or stop the operation.
F7
File Utilities
6200Main Menu
Press theappropriatefunction key
F3
Rename
Note: The source fileno longer exists.
Enter filename orportion offile nameorcursor to file
F3
Select Source
F4
Enter Dest
Enter newfile name
F1
BeginOperation
Enter fileinto whichto copysource file(no ext)
PrefaceUsing Disk File Utilities
5-8
Copying Files in the Same Directory
The copy utility copies a file within the current 6200 directory. This is the directoryyou specified with the Define Directory option. If you want to copy the file to adifferent directory, see the section “Copying Files To/From Floppy”.
To copy a file, follow the steps on the left.
If You Want to: Press this Key:
Copy processor memory file [F1] - Processor MemoryCopy comments and symbols files [F3] - Comments and SymbolsCopy exported comments and symbols files [F4] - Exported Comments & SymbolsCopy the documentation report files [F5] - Documentation ReportsCopy all the above files that are associatedwith the current processor
[F6] - All of the Above
Copy the paste files you created with thecut/copy save functions
[F7] - Processor Memory: Cut Rungs
Copy an exported processor memory file [F8] - Exported Processor Memory File
After you select the type of file that you want to copy, the system displays the SelectFile to Copy screen. Follow the steps on the left.
The system copies the file. The source file remains intact. If a file exists with thesame name as the one you specified in the destination field, you are prompted tooverwrite or stop the operation.
F7
File Utilities
6200Main Menu
F4
Copy
Press theappropriatefunction key
Enter fileto copy orportion offile nameorcursorto file
F3
Select Source
F4
Enter Dest
Enter fileinto whichto copysource file(no ext)
F1
BeginOperation
Note: The source fileremains intact.
Using Disk File Utilities
5-9
Copying Files To/From Floppy
You can make a copy of disk files to and from any directory or disk drive. The copyto/from floppy utility is useful for backing up files to a disk or returning files from adisk to the hard disk. This utility copies the specified file from the 6200 directory toany other directory you specify. Follow the steps on the left.
Note If you copy files to a floppy disk, make sure that the disk is formatted and notwrite-protected before you begin the copy operation.
Note If your disk is full or doesn’t have sufficient space when you use the Copy to Floppyfunction for copying exported comments and symbols or exported processor memoryfiles, there is no error message. Before using the Copy to Floppy function, make surethat you have enough space on your disk.
Note If your disk contains processor memory files created with pre-4.1 software (.ACHfiles), the software does not recognize them all under the Copy All (F4) function.You must copy the processor memory file first, (F1), and then the comments/symbolsfile, cross-reference, etc.
If You Want to: Press this Key:Copy processor memory files [F1] - Processor Memory FileCopy cross reference information [F2] - Cross Reference InformationCopy comments and symbols files [F3] - Comments and SymbolsCopy all the above files that are associated with thecurrent processor
[F4] - All
Copy exported comments and symbols files [F5] - Exported Comments & SymbolsCopy documentation report files [F6] - Documentation ReportsCopy the paste files you created with the cut/copysave functions
[F7] - Processor Memory: Cut Rungs
Copy an exported processor memory file [F8] - Exported Processor Memory FileSpecify a default drive and path name for the floppy [F10] - Enter Path
F7
File Utilities
6200Main Menu
F9
Copy to/from Floppy
F1
To floppyF2
From floppyor
PrefaceUsing Disk File Utilities
5-10
Note If your source drive does not contain comments and symbols, your destination does,and you select all files [F4], the documentation files on your target will be deleted.The software displays the warning: PROCESSOR FILES ALREADY EXIST; NODOCUMENTATION FILES EXIST ON SOURCE DRIVE! DOCUMENTATION FILESWILL BE DELETED ON TARGET DRIVE! Proceed?.
Copying Files to a Floppy
To copy a file to another disk or directory, follow the steps on the left.
The software checks the directory you specified to make sure it already exists; if you specify aDOS directory that does not exist, the software prompts you before it creates that directory foryou. Press [F8] - Yes to create the directory or [F10] - No.
The path is the drive and any directory of the disk. For example: type B: to copythe file to a floppy disk in drive B. The default path is A:
+========================= PLC-5 PROGRAMMING SOFTWARE =========================+| +== PROCESSOR =+| A 6200 Series Software Product | AUTOX1 || | DRILL1 || Copyright 1986, 1995, Rockwell Software Inc. | DRILL2 || All Rights Reserved | || | || Release x.x | || | || This software is licensed to: Company Allen-Bradley Co. | || Location 1 Allen-Bradley | || += COPY COMMENTS AND SYMBOLS =====+,| || | | | || | SOURCE: DRILL1 | | || | | | || | DRIVE: A: | | || | | | |+===========================+= ESC exits =====================+=+==============+
Press a Function Key or Enter File Name>
Begin Select Enter DefineOper Source Path DirF1 F3 F4 F7
Enter file to copy or cursor to file1
Press this key to select a source.2
3 Press this key to specify a destination path.
4F9
Save Config
6F1
Begin Oper
5 Return Escor
F7
File Utilities
F9
Copy to/from Floppy
F1
To Floppy
6200Main Menu
Press the appropriatefunction key (see table onpage 5-9)
Using Disk File Utilities
5-11
Copying Files from a Floppy
To copy a file from another disk or directory, follow the steps on the left.
Specify a path in the same way you specify a DOS pathname. If you do not specify a disk drive, the transferoperation defaults to the current drive. For example, type:B: to copy the file from a floppy disk in drive B to thecurrent directory for the processor memory file.
After you specify the path, the systemdisplays a list of theavailable files in that directory. If you are copying aprocessor memory file, press [F8] - Select Format to selectbetween .AF5, .ACH, and .X5 files.
+========================= PLC PROGRAMMING SOFTWARE =========================+| +== PROCESSOR =+| A 6200 Series Software Product | AUTOX1 || | DRILL1 || Copyright 1986, 1995, Rockwell Software Inc. | DRILL2 || All Rights Reserved | || | || Release x.x | || | || This software is licensed to: Company Allen-Bradley Co. | || Location 1 Allen-Bradley | || += COPY COMMENTS AND SYMBOLS =====+,| || | | | || | SOURCE: DRILL1 | | || | | | || | DRIVE: A: | | || | | | |+===========================+= ESC exits =====================+=+==============+
Press a Function Key or Enter File Name>
Begin Select Enter DefineOper Source Path DirF1 F3 F4 F7
Enter file to copy or cursor to file
1
2
3
Press this key to specify a path.
4F1
Begin Oper
Press this key to select a source.3
The destination is the directory you defined with the DefineDirectory option for the type of file you are copying.
F7
File Utilities
F9
Copy to/from Floppy
F2
From Floppy
6200Main Menu
Press the appropriatefunction key (see table onpage 5-9)
PrefaceUsing Disk File Utilities
5-12
Deleting Files
The delete utility deletes a file from the current 6200 directory you defined with theDefine Directory option. Follow the steps on the left.
Note When you delete a file, the file is gone. There is no undelete function for recoveringa file.
If You Want to: Press this Key:
Delete processor memory files [F1] - Processor Memory FileDelete cross reference information [F2] - Cross Reference InformationDelete comments and symbols files [F3] - Comments and SymbolsDelete exported comments and symbols files [F4] - Exported Comments & SymbolsDelete documentation report files [F5] - Documentation ReportsDelete all the above files that are associatedwith the current processor
[F6] - All of the Above
Delete the paste files you created with thecut/copy save functions
[F7] - Processor Memory: Cut Rungs
Delete an exported processor memory file [F8] - Exported Processor Memory File
If you are deleting a processor memory file, press [F8] - Select Formatto select between .AF5, .ACH, and .X5 files. If you select a .AF5 file, onlythe .AF5 file is deleted; the corresponding .ACH or .X5 files (if they exist)are not deleted.
After you select the type of file that you want to delete, the system displays theSelect File to Delete screen. Follow the steps on the left.
F7
File Utilities
F5
Delete
6200Main Menu
F3
Select Name
F1
Begin Oper
Enter file to delete
F8
YesF10
Noor
Using Disk File Utilities
5-13
Merging Documentation Files
The merge utility combines documentation files within the 6200 directory youdefined with the Define Directory option. You select both the source and destinationfiles for the merge operation. Both the source and destination files must be in thesame drive/directory. The source files are merged with the destination files and theresults stored in the destination files.
This merge operation only merges documentation files. For information aboutmerging processor memory files, see page NO TAG.
To merge documentation files, follow the steps on the left.
Enter file to merge or cursor to the file
+========================= PLC PROGRAMMING SOFTWARE =========================+| +== PROCESSOR =+| A 6200 Series Software Product | || | DRILL1 || Copyright 1986, 1995, Rockwell Software Inc. | MEM1 || All Rights Reserved | MOTOR || | || Release x.x | || | || This software is licensed to: Company Allen-Bradley Co. | || Location 1 Allen-Bradley | || += MERGE COMMENTS AND SYMBOLS ===+,| || | | | || | SOURCE: | | || | | | || | DESTIN: | | || | | | |+==========================+= ESC exits ======================+=+==============+
Press a Function Key or Enter File Name>
Begin Select Select Select Select DefineOper Source Destin Options Data DirF1 F3 F4 F5 F6 F7
F7
File Utilities
F8
Merge
6200Main Menu
3
1
4F1
Begin Oper
Press this key to select a source.2 Press this key to select a destination.
PrefaceUsing Disk File Utilities
5-14
If You Want to: Press this Key:
Start the merge operation [F1] - Begin OperationSelect the source for the merge operation [F3] - Select SourceSelect the destination for the merge operation [F4] - Select DestinationConfigure the merge operation [F5] - Select OptionsSelect what to merge [F6] - Select DataDefine the directories where you want to store processormemory, comments and symbols, exported comments andsymbols, documentation reports, and user configuration files
[F7] - Define Directories
Configuring the Merge Function
To configure the Merge function, follow the steps on the left.
+========================= PLC PROGRAMMING SOFTWARE =========================+| +== PROCESSOR =+| A 6200 Series Software Product | || | DRILL1 || Copyright 1986, 1995, Rockwell Software Inc. | MEM1 || All Rights Reserved | MOTOR || += Merge Options =================================+ || | | || | | || This soft| F1 On Collisions DISCARD | || | | || | F2 Starting File Type A | || | Ending File Type T | || | | || | F9 Save Configuration | || | | || | | |+=============+=================================================+==============+
Press a function key.
On File SaveCollisn Range Config
F1 F2 F9Press thefunction key for thecharacteristic youwant to change. Press this key to save the configuration. Configuration information
will stay the same each time you start the software.
F7
File Utilities
F8
Merge
6200Main Menu
F5
Select Options
If you want to change the configuration information for this editing session only,press [Enter] or [Esc] after you change the appropriate information. The changesremain until you exit the software.
Using Disk File Utilities
5-15
If You Want to: Press this Key:
Specify how the systemhandles data collisions. This optiontoggles between:
·Discard (default) - if there are duplicate or conflicting entriesbetween the source file and the destination file, the entries fromthe source file are discarded.
·Overwrite - if there are duplicate or conflicting entries betweenthe source file and the destination file, the entries from thesource file overwrite the destination file’s entries.
[F1] - On Collision
Select the range of files to merge. [F2] - File RangeSave the configuration options you specified to disk. [F9] - Save ConfigurationUse the configuration options you specify for this editingsession only.
[Enter][Esc]
Handling Data Collisions
Collisions mean that you have duplicate entries or conflicting entries between thefiles you merge. If data collisions occur, the system displays the following message:
Collisions and/or syntax errors were found.Abort or continue operation?
If you press [F8] - Abort, the merge operation stops and your database isnot changed.
If you press [F10] - Continue and you selected Discard for collisions, thedatabase is updated except for collisions; if you selected Overwrite, the database isupdated with all information from the source file.
Note To convert collision errors, the project name log file in the \IPDS\TEXT\PLC5directory can be edited, renamed to a .TXT file, and then imported.
Table 5.A shows some example data collisions.
Table 5.AExample Data Collisions in a Merge Operation
Source:addr sym
Destination:addr sym
Explanation:
I:0/11 LS1 I:0/11 LS1 duplicate entry (same address, same symbol)
I:1/11 LS2 I:1/11 LS3 conflict (same address, different symbol)
PrefaceUsing Disk File Utilities
5-16
Importing and Exporting Documentation Files
6-1
6 Importing and ExportingDocumentation Files
Chapter Objectives
You can use a text editor or word processing software to edit your documentationfiles in the exported ASCII format. This chapter shows you how to import andexport ASCII files.
If You Want to: See Page:
Import ASCII documentation 6-3Export documentation files 6-10Create an ASCII comment/symbolfile for use inthe import utility
6-17
Make notes about your import file as you create it 6-21
Introduction
Use the import utility to transfer symbols, rung comments, instruction comments,and address comments from an ASCII file into the software database.
Use the export utility to transfer symbols, rung comments, instruction comments,and address comments from the software database to an ASCII file.
The import or export file is stored in \IPDS\TEXT\PLC5 unless you specified adifferent directory using the Define Directory function.
PrefaceImporting and Exporting Documentation Files
6-2
Understanding the Import and Export Utilities
The import and export utilities enable you to:
· Reuse existing work. After you export a file, you can import the comments fromthat file to be used for another file.
· Use any word processor or text editor to enter or edit symbols and commentsfor your programs in an ASCII file format.
· Change the address that the comments and symbols are associated with. Youcan apply the same documentation to another processor/PMF which usesdifferent logical addresses.
The following diagram shows how the software transports yourprogram documentation:
DocumentationDatabase
Stored on yourcomputer’shard disk or a
ASCII FileA-B Format
Stored on yourcomputer’shard disk or a
Your Computer
Import
Export
6200
specified directoryspecified directory
Importing and Exporting Documentation Files
6-3
Importing ASCII Documentation Files
Importing ASCII files transfers them to the software database. This lets you reuseexisting program documentation with a different file. To import an ASCII file,follow the steps on the left.
You can only import files that have a .TXT extension.
Note: If the destination you specify already exists, thesystemasks you whether to add the import information tothe existing database [F8], overwrite the existing database[F10], or exit the import function [Esc].
+======================== PLC -5 PROGRAMMING SOFTWARE =========================+| +== PROCESSOR =+| A 6200 Series Software Product | || | DRILL || Copyright 1986, 1995, Rockwell Software Inc. | || All Rights Reserved | || | || Release 5.2 | || | || This software is licensed to: Company Allen-Bradley Co. | || Location 1 Allen-Bradley | || += IMPORT COMMENTS AND SYMBOLS ===+,| || | | | || | SOURCE: | | || | | | || | DESTIN: | | || | | | |+==========================+= ESC exits ======================+=+==============+
Press a Function Key or Enter File Name>
Begin Select Enter Select DefineOper Source Destin Options DirF1 F3 F4 F5 F7
Enter file to import or cursor to file
F7
File Utilities
F6
Import
F3
Comm & Sym
6200Main Menu
3
1
4
F1
Begin Oper
Press this key to select a source.2 Press this key to select a destination.
Enter the comments & symbols file name.5
If You Want to: Press this Key:Start the import operation [F1] - Begin OperationSelect the source file for the import operation [F3] - Select SourceSelect the database to receive the file that you are importing [F4] - Enter DestinationConfigure the import operation [F5] - Select OptionsDefine the directories where you want to store the AI/WINtelligentLogic 5 processor memory/commentsand symbols, backupprocessor memory/commentsand symbols, processormemory/commentsand symbols, documentation reports, exportedfiles, user configuration, and Ethernet WHO files
[F7] - Define Directories
PrefaceImporting and Exporting Documentation Files
6-4
+========================================+| ROCKWELL SOFTWARE INC. || 6200 SERIES SOFTWARE || PLC-5 IMPORT/EXPORT SOFTWARE |+========================================+
Input File: TESTEXP Utility: GENERAL IMPORTData Base: TESTIMP Config:Phase: IMPORT Status: Data base opened
+==============================================================================+|! ** BEGIN IMPORT ** ||! ----------------------------------------------------------- ||! Import log file ||! Importing from TESTEXP ||! Importing to database TESTIMP ||! ----------------------------------------------------------- ||! ** OPEN DATA BASE ** || || |+==============================================================================+
Press F3 to abortAbort
UtilityF3
Importing and Exporting Documentation Files
6-5
Configuring the Import Utility
You can configure how the import utility handles data collisions and keywords.Follow the steps on the left.
This saves the configuration characteristicsyou specified on this screen only. If you make changeson other configuration screens, you must save the configuration on those screens if you want theconfigurations saved to your user configuration file. After you press [F9], the configuration informationremains the same each time you start the software. If you want to change the configurationinformation for this editing session only, press [Enter] after you change the appropriate information.The changes remain until you exit the software.
+========================= PLC PROGRAMMING SOFTWARE =========================+| +== PROCESSOR =+| A 6200 Series Software Product | || | DRILL || Copyright 1986, 1995, Rockwell Software Inc. | || All Rights Reserved | || | || Release 5.2 | || | || This software is licensed to: Company Allen-Bradley Co. | || += IMPORT OPTIONS ================================+ || | | || | F1 On Collisions DISCARD | || | F2 Default Keyword SYMBOL | || | | || | F9 Save Configuration | || | | |+=============+= ESC exits/ALT-U aborts changes ================+==============+
Press a function key.
On Default SaveCollisn Keyword Config
F1 F2 F9
Before you start the import utility, save your current work.
Change the optionsyou want.
Press this key to save the configuration.
F7
File Utilities
F6
Import
F3
Comm & Sym
6200Main Menu
F5
Select Options
PrefaceImporting and Exporting Documentation Files
6-6
If You Want to: Press this Key:
Select how the systemhandles data collisions (togglesbetween Overwrite and Discard)Overwrite all conflicting entries from the imported file
write over the existing databaseDiscard all conflicting entries from the imported file
are ignored
[F1] - On Collision
Select Address Comments, Instruction Comments,RungComments or Symbols as the default keywordThe keyword you choose here tells the import utility whetherthe information immediately following the keyword is a rungcomment, an instruction comment, and address comment, ora symbol. (This only applies if you are not using keywords togroup similar statements.)
[F2] - Default Keyword
Save the configuration options to disk [F9] - Save ConfigurationUse the configuration options you specify for this editingsession only
[Enter][Esc]
Handling Data Collisions
Collisions mean that you have duplicate entries or conflicting entries in the importfile and the database. If data collisions occur, the system displays thefollowing message:
Collision and/or syntax errors were found.Abort or continue operation?
To: Press:
Abort import so the import operation stops andyour database is not changed
[F8] - Abort Import
Continue Import so the database is updated [F10] - Continue ImportSelect Discard to update databaseexcept for collisionsSelect Overwrite to update databasewith all information from the import file
Importing and Exporting Documentation Files
6-7
Table 6.A shows some examples of collisions.
Table 6.AExamples of Data Collisions
Database:addr sym
ASCII:addr sym
Explanation:
I:0/11 LS1 I:0/11 LS1 duplicate entry (same address, same symbol)
I:1/11 LS2 I:1/11 LS3 conflict (same address, different symbol)
Using Keywords
Keywords tell the software what type of documentation information immediatelyfollows the keyword. The keywords are:
· SYM - symbol· AC - address comment· IC - instruction comment· RC - rung comment· FCN - SFC name· FCI - SFC comment· IOS - I/O module symbol· IOA - I/O module address comment· IOC - I/O module configuration information
Formatting Keywords
You can format AC, IC, RC, FCI, and IOA keywords using the followingformatting commands:
· %LEFT - comment is left justified· %CENTER - comment is centered· %WRAP - words are not broken between lines· %NOWRAP - words are allowed to be broken between lines
PrefaceImporting and Exporting Documentation Files
6-8
If you do not use formatting commands, the system uses default commands. AC,IC, and IOA default to %LEFT and %NOWRAP. The keywords RC and FCI defaultto %LEFT and %WRAP.
Note These formatting commands cannot be used with the SYM key word.
The %WIDTH keyword, written to the TXT file when comments and symbolsare exported, is followed by the database width number that you specify (10through 20). The database defaults to 10. When you export a database, the widthis set to the database width.
When importing a database, you set the %WIDTH keyword to control the width ofthe comments and symbols.
The %WIDTH keyword must be the first line in the TXT file. Placing the %WIDTHkeyword anywhere else gives a warning message indicating the database widthdefaulted to 10.
Table 6.B assumes that the source and destination files exists prior to beginning themerge. When your destination file(s) exist before beginning a merge, the destinationfile(s) will contain the contents of the source and destination files after the importor export.
Table 6.BMerging Import/Export Files
If Your: Then:Destination width < source width Import/export is aborted.Destination width = source width Import/exportproceeds normally.Destination width > source width Import/export requested confirmation before proceeding.
Table 6.C assumes no destination file exists prior to the merge. When the operationis performed, you create a new destination file.
Table 6.COverwriting Import/Export Files
If Your: Then:Destination width < source width Comments that exceed the database width are truncated.Destination width = source width Import/exportproceeds normally.Destination width > source width Import/exportproceeds normally.
Importing and Exporting Documentation Files
6-9
Responding to Syntax Errors
Syntax errors mean that the import file does not follow the rules necessary for anASCII file that you want to import. If the system displays a syntax error during theimport, you might want to abort the import of the file into your database. Here aresome examples of syntax errors:
· comment is too long· keyword error· invalid address· invalid instruction· missing quotes around comments· comment occupies more than one line (address and instruction comments)
Examining the Results of an Import
When an import completes, the system generates a .LOG file. The .LOG filecontains the same information about errors that appears on the screen during theactual operation. For example, if a data collision occurred, the .LOG file containsboth pieces of data that collided.
The .LOG file has the same name as the database that you created. The systemstores this file in the \IPDS\TEXT\PLC5 directory (or the directory you configuredfor import files).
PrefaceImporting and Exporting Documentation Files
6-10
Exporting Documentation Files
The export utility functions the same way as the import utility, except in theopposite direction; you transfer program documentation from the software databaseto an ASCII file. Exported information is contained in a .TXT file.
Use the export utility to export your database, make edits with a word processor andthen import the database back into 6200 programming software. For example, if youchange your I/O rack numbers, use the export utility to export the I/O configurationdatabase, make the extensive edits with a word processor (instead of using the I/Oconfiguration utility), and then import.
The import or export file will be stored in \IPDS\TEXT\PLC5unless you specified a different directory using the DefineDirectory function on the import/export screens.
If the destination you specify already exists, the systemasksyou whether to add the import information to the existingdatabase [F8], overwrite the existing database [F10], or exitthe export function [Esc].
+========================= PLC-5 PROGRAMMING SOFTWARE =========================+| +== PROCESSOR =+| A 6200 Series Software Product | || | DRILL1 || Copyright 1986, 1995, Rockwell Software Inc. | MEM1 || All Rights Reserved | MOTOR || | || Release x.x | || | || This software is licensed to: Company Allen-Bradley Co. | || Location 1 Allen-Bradley | || += EXPORT COMMENTS AND SYMBOLS ===+,| || | | | || | SOURCE: | | || | | | || | DESTIN: | | || | | | |+==========================+= ESC exits ======================+=+==============+
Press a Function Key or Enter File Name>
Begin Select Enter Select Select DefineOper Source Destin Options Data DirF1 F3 F4 F5 F6 F7
Enter file to export or cursor to a file
F7
File Utilities
F7
Export
F3
Comm & Sym
6200Main Menu
3
1
4
F1
Begin Oper
Press this key to select a source.2 Press this key to enter a destination.
Enter the ASCII file name.
5
Importing and Exporting Documentation Files
6-11
If You Want to: Press this Key:
Start the export operation [F1] - Begin OperationSelect the source database for the export operation [F3] - Select SourceDefine the ASCII file to receive the documentation that youare exporting
[F4] - Enter Destination
Configure the export operation (sort order, keyword andfile range)
[F5] - Select Options
Select what you want to export (Symbols, Address Comments,Instruction Comments,Rung Comments, I/O Symbols, I/OAddress Comments, I/O Configuration, SFC Names, SFCItem Comments)
[F6] - Select Data
Define the directories where you want to store theAI/WINtelligentLogic 5 processor memory/commentsandsymbols, backup processor memory/commentsand symbols,processor memory/commentsand symbols, documentationreports, exported files, user configuration, and EthernetWHO files
[F7] - Define Directories
PrefaceImporting and Exporting Documentation Files
6-12
Configuring the Export Utility
You can configure the export utility to define the content of the ASCII file thatreceives the exported documentation.
+========================= PLC-5 PROGRAMMING SOFTWARE ===========================+| +== PROCESSOR =+| A 6200 Series Software Product | || | GAMUTLAB || Copyright 1986, 1995, Rockwell Software Inc. | LIMIT || All Rights Reserved | LIMIT1 || += Export Options ==================+ | RUNBATCH || Release 5.| |n| SFCTESTF || | F1 Sort Order ADDRESS | | || This software is lice| F2 Keyword Option ALL |,| || | + | | || | F3| Starting File A: |,| || Serial| | Ending File T: | | || | + | | || | | | || | F9 Save Configuration | | || | | | |+=========================+= ESC exits/ALT-U aborts changes ==+=+==============+
Press a function key.
Sort Keyword File SaveOrder Option Range ConfigF1 F2 F3 F9
F3
Press this key to save the configuration.Configuration information will remain thesame each time you start the software.
Press the functionkey for thecharacteristic youwant to change
F7
File Utilities
F7
Export
6200Main Menu
F5
Select Options
Comm & Sym
F3
Select Source
F4
SelectDestination
F1
Sort Orderor
F2F3
KeywordOption or
File Range
Importing and Exporting Documentation Files
6-13
If You Want to: Press this Key:Select whether you want to sort based on Addressor Keyword
[F1] - Sort Order
Select whether you want to use All, Default orNone keywords
[F2] - Keyword Option
Select the range of files to be exported [F3] - File RangeSave the configuration options to disk [F9] - Save ConfigurationUse the configuration options you specify for this editingsession only
[Enter][Esc]
Choosing the Sort Order
The sort order you choose on the Export Options screen defines how the ASCII fileis sorted. Follow the steps on the left.
This option toggles between Keyword and Address. If you choose Keyword for thesort option, the ASCII file is sorted by keyword in this order:
· symbols· address comments· instruction comments· rung comments· SFC names· SFC comments· I/O module symbols· I/O module address comments· I/O module configuration information
If you choose Address for the sort option, the ASCII file is sorted by address. Allthe symbols and comments associated with an address are grouped together.Addresses are in the same order as in the data table.
F3
F7
File Utilities
F7
Export
6200Main Menu
F5
Select Options
Comm & Sym
F1
Sort Order
F1
or KeywordOption
F1
or File Range
PrefaceImporting and Exporting Documentation Files
6-14
Choosing the Keyword Option
The Keyword option defines what keywords appear in the output ASCII file. Thisoption toggles between All, Default, and None. Follow the steps on the left.
If You Choose: This Happens:
All For each comment, rung, instruction, address, and symbols a keyword appearsat the beginning of every statement in the ASCII file.
Default The keywords appear at the beginning of groups of similar statements.Youmust specifySort by Keyword on the Export Options screen if you choosethis keyword option, otherwise the default keywords do not appear in theexported file.The default keyword is the keyword that is used if a keyword is not found at thebeginning of an input line (Import only).
None The ASCII file contains no keywords. This option provides only data, which youcan in turn use with other software packages. If you choose this option, youmight want to specifySort by Keyword so you know the content of theresulting ASCII file.
F3
F7
File Utilities
F7
Export
6200Main Menu
F5
Select Options
Comm & Sym
F2
Keyword Option
Importing and Exporting Documentation Files
6-15
Selecting the Export Range
You can specify the extent of an export option by defining which address types youwant to export. Follow the steps on the left.
+=========================PLC-5 PROGRAMMING SOFTWARE===========================+| +== PROCESSOR =+| A 6200 Series Software Product | || | GAMUTLAB || Copyright 1986, 1995, Rockwell Software Inc. | LIMIT || All Rights Reserved | LIMIT1 || += Export Options ==================+ | RUNBATCH || | | | SFCTESTF || | Sort Order ADDRESS | | || | Keyword Option ALL | | || += RANGE ===========================+ | || | Starting File Type A | | || | Ending File Type T | | || += ESC exits =======================+ | || | | | || | | | || | | | |+=========================+===================================+=+==============+
Press a function key.
Select Single EnterAll File RangeF2 F3 F4
F3
F7
File Utilities
F7
Export
6200Main Menu
F5
Select Options
Comm & Sym
F3
Select Range
If You Want to: Press this Key:
Export all of the address types in the database (A through T) [F2] - Select AllExport one file type in the database [F3] - Single FileSpecify the beginning and ending of an address type that youwant to export
[F4] - Select Range
PrefaceImporting and Exporting Documentation Files
6-16
The following file types are valid:
A ASCII N integer
B binary O output
BT1 block transfer PD1 PID
C counter R control
CT2 ControlNet I/O transfer S status
D hexadecimal/BCD SC1 SFC status
F floating point ST1 string
I input T timer
MG1 message1 Enhanced PLC-5 processors only2 ControlNet PLC-5 processors only
All files of a selected type are exported (i.e., B3, B10, B11). When a range isselected, the data is exported alphabetically according to data type.
Importing and Exporting Documentation Files
6-17
Creating a Rockwell Software Inc. ASCII File
To create an ASCII comment/symbol file for use in the import utility, followthese rules:
· The text editor you use to create the file must produce only printable ASCIIcharacters, with no control characters or hidden characters.
· The ASCII file must be in the directory defined by [F6] - Exported Filesfrom the Define Directory option (default is - IPDS\TEXT\PLC5).
· The file name of the ASCII file can contain up to eight of thefollowing characters:
A - Z (both upper and lower case)0 - 9underscore (_)
· The file extension of the ASCII file must be .TXT.
Building a Rockwell Software Inc. ASCII File
When you build the ASCII file, you can group statements together by keyword oryou can have a keyword for each statement.
The following example shows an ASCII file with default keywords:
SYMO:37/03 UPLOADHYDO:17/11 EMPTY_LITEIOS 03-4-1 I_O_MOD (this is an I/O module symbol,
specified rack-group-slot)ACO:35/12 “Temporary\Storage\Point”I:3/02 “Conveyor\Running”IOA 04-7-1 “1771-IFE\A module”
Notice that all symbols (SYM) are grouped together after you enter the keywordSYM. Then all address comments (AC) follow the keyword AC. The same keywordcan appear multiple times in your file.
Note The keyword must be entered on a line by itself in order to be recognized as adefault keyword. For a description of the keywords, see page 6-7 in this chapter.
PrefaceImporting and Exporting Documentation Files
6-18
The following example shows an ASCII file with a keyword for each statement inthe ASCII file:
SYM I:0/00 C5UNDERFLAC I:0/00 “Totalizer Pulse Counter”IC XIO I:0/00 “North Cutter Running”IC XIC I:0/01 “Palletizer Not Full”
Contents of a Rockwell Software Inc. ASCII File
A Rockwell Software Inc. ASCII file contains address comments, instructioncomments, rung comments, symbols, or SFC names or comments.
Placing Address Comments
An address comment is a text string associated with an address. Comments can bebetween 50 and 100 characters, depending on the default database width. To enteran address comment, keep the following in mind:
· Comments must begin and end with quotation marks (”).· Do not use carriage returns. If you want a carriage return to appear in a
comment, use a backslash (\) in the comment to represent a carriage return. (Thebackslash is considered a character in the 50-100 limit.)
· Only the first 50-100 characters you enter are used in the comment. Thesoftware displays 5 lines, 10 to 20 characters per line.
· If you want a quotation mark to appear in a comment, use two adjacentquotation marks. (One of the quotation marks is considered a character in the50-100 character limit.)
· If you want a back slash to appear in a comment, precede the back slash witha tilde (~).
The following example shows you how to enter address comments:
AC O:17/03 “UPPER LOADER HYDRAULIC SOLENOID”AC I:14/11 “OUT OF TOLERANCE ALARM ACKNOWLEDG\”AC I:21/03 “AIR STOP CLOSED LIMIT SWITCH\”
Importing and Exporting Documentation Files
6-19
Placing Instruction CommentsAn instruction comment is a text string associated with an address/instruction pair.Comments can be between 50 and 100 characters, depending on the default databasewidth. You enter the keyword for the instruction comment and then the mnemonicfor the instruction.
When you enter instruction comments, keep the following in mind:
· Begin and end comments with quotation marks (”).· Do not use carriage returns. If you want a carriage return to appear in the
comment, use a back slash (\) in the comment to represent a carriage return.(The back slash is considered a character in the 50-100 limit.)
· Only the first 50-100 characters you enter are used in the comment. Thesoftware displays 5 lines, 10 to 20 characters per line.
· If you want a quotation mark to appear in your comment, use two adjacentquotation marks. (One of the quotation marks is considered a character in the50-100 character limit.)
· If you want a back slash to appear in your comment, precede the back slash witha tilde (~).
The following example shows you how to enter instruction comments:
IC XIC N7:10/0 “Surge Tank High Level Alarm”IC XIO I:0/00 “Selector Switch Panel W North Cutter”IC OTE 0:0/00 “North Cutter Running”
Placing Rung Comments
A rung comment is a text string (up to 64K lines, 80 characters per line) that isassociated with an output instruction/address pair. Rung comments help identifyrungs and describe their function. When you enter rung comments, keep thefollowing in mind:
· Begin and end rung comments with a quotation mark and a carriage return.· If you want a quotation mark to appear in the comment, use two adjacent
quotation marks. The initial and ending quotation marks are not included in thecomment. (One of the quotation marks is considered a character in the80-character limit.)
· If you want a carriage return to appear in the comment, use a back slash (\).(Note that this back slash is considered a character in the 80-character limit.)
· If you want a back slash in your comment, precede the back slash with atilde (~).
PrefaceImporting and Exporting Documentation Files
6-20
The following example shows how to enter a rung comment:
RC CTD C5:0 ” (carriage return)This is an example of a rung comment with quotation\ marks andcarriage returns at the beginning and end.” (carriage return)
RC TON T4:0 ” (carriage return)And here is an example of ”” quotation marks ”” and\ a backslash (use the ~ to print a back slash)\ within a comment:~\IPDS~\ATTACH~\PLC5 .” (carriage return)
Placing SymbolsA symbol is a 10-20 character name associated with an address. A symbol mustcontain at least one alpha character and can be any combination of the following:
· A - Z (both upper and lower case)· 0 - 9· underscore _ (not in the first position)· pound sign # (not in the first position)· period . (not in the first position)
Note In the Ladder Editor, you can enter a symbol using lower case, but the softwareautomatically converts it to all upper case. For example, the software interprets“Upload” and “UPLOAD” as the same symbol. Make sure that you do not solelyuse upper or lower case to distinguish one symbol from another. However, in theSFC Editor, you can enter lowercase or uppercase and they are considered unique(i.e., Upload and UPLOAD are two different symbols).
Note If you create a symbol in the ladder editor, you cannot re-use that symbol in the SFCeditor or I/O configuration editor; each editor must have its own unique setof symbols.
The following example shows some symbols:
SYM O:17/03 UploadSYM O:11/11 Empty_LiteSYM I:16/05 Pallet
Importing and Exporting Documentation Files
6-21
Documenting ASCII Files
You can make notes about your import file as you create it. These notes documentthe file and are in addition to address, instruction, or rung comments.
To document your file, place the file notes after an exclamation mark on a singleline. All text, after the exclamation mark, up to the next end-of-line, is ignored.(Since these comments are ignored for import, they are not exported.)
Your notes should be the only text on a line or directly after you enter acomplete line.
Here is an example of how a note might look in your import file:
!Import file comments must begin with an exclamation!mark as you see here. You can document your A-B!ASCII file as you would a program.
The comments you use to document your ASCII files only describe those files.These comments are not stored in the database.
PrefaceImporting and Exporting Documentation Files
6-22
Importing and Exporting Processor Memory Files
7-1
7 Importing and Exporting ProcessorMemory Files
Chapter Objectives
This chapter shows you how to import and export processor memory in the form ofASCII files so you can use your text editor to modify the files. These ASCII filescontain the ladder logic, SFC files, structured text, channel configuration, data tablefiles, and force tables for your programs.
Use the import utility to transfer the processor memory files from an ASCII file tothe processor format. Use the export utility to transfer processor memory files fromthe processor format to an ASCII file. Exported ASCII files have a .PC5 extension.
The output of an import is stored in the ARCH directory. The output of an exportis stored in the TEXT directory (unless you specified a different directory usingthe Define Directory function on the import/export screens). See chapter 1 fordirectory structure.
If You Want to: See Page:
Import ASCII processor memory files 7-2Export processor memory files 7-6Create an Rockwell Software Inc. ASCII processor memory file 7-9Document an ASCII processor memory file 7-13View an ASCII processor memory file example 7-14View an ASCII SFC processor memory file example 7-20
PrefaceImporting and Exporting Processor Memory Files
7-2
Understanding the Import and Export Utilities
The import and export utilities enable you to:
· Reuse existing work. After you export a file, you can import the ladder logicfrom that file to be used for another file.
· Use any word processor or text editor to enter or edit the program rungs or datafor your programs in an ASCII file format.
Importing ASCII Processor Memory Files
To import ASCII files, follow the steps below.
If the destination you specify already exists, the systemasks you whether tooverwrite the existing destination file. To enter a new destination file, press[F10] or [Esc]. The existing destination file will not be overwritten. Tooverwrite the existing destination file, press [F8].
Enter file to import (must have ext .PC5) or cursor to file
+========================= PLC-5 PROGRAMMING SOFTWARE =========================+| +== PROCESSOR =+| A 6200 Series Software Product | || | BATCH || Copyright 1986, 1995, Rockwell Software Inc. | || All Rights Reserved | || | || Release x.x | || | || This software is licensed to: Company Allen-Bradley Co. | || Location 1 Allen-Bradley | || += IMPORT PROCESSOR MEMORY FILE ===+i| || Serial| | | || | SOURCE: | | || | | | || | DESTIN: | | || | | | |+=========================+= ESC exits =======================+=+==============+
Press a Function Key or Enter File Name>
Begin Select Enter Select DefineOper Source Destin Options DirF1 F3 F4 F5 F7
F1
F7
File Utilities
F6
Import
6200Main Menu
Proc Mem File
3
4
F1
Begin Oper
Press this key to select a source.2 Press this key to enter a destination.
Enter the processor memory file name.
6
1
Select options or go to step 6 toaccept the defaults.
5 F5
Importing and Exporting Processor Memory Files
7-3
When the import process begins, this screen indicates the typeof record being processed (header, data file, function chart,ladder program, or force table). For ladder programs, thisscreen also indicates which rung is currently being processed.
+========================================+| ROCKWELL SOFTWARE INC. || 6200 SERIES SOFTWARE || PLC-5 ARCHIVE FILE IMPORT SOFTWARE |+========================================+
Input: GAMUT.PC5 Report: IMPORT GENERATIONOutput: TESTPMF.AF5 Config: WITH ERROR CORRECTIONPhase: CLOSING FILES Status:
+==============================================================================+|** Mon Aug 12, 1991 09:06:14 ** ||** TOTAL warnings: 0 TOTAL errors: 0 ** ||** 65536 WORDS OF TOTAL MEMORY ** ||** 490 WORDS IN 15 DATA FILES ** ||** 470 WORDS IN 17 PROGRAM FILES ** ||** 64576 WORDS OF AVAILABLE MEMORY ** || || || |+==============================================================================+
Press F3 to abortAbort
UtilityF3
Press this key to abort the import.
Using the Import Utility Screen
If You Want to: Press this Key:
Begin importing the file [F1] - Begin OperationSelect a source file [F3] - Select SourceEnter a destination file [F4] - Enter DestinationConfigure the import utility [F5] - Select OptionsDefine a different directory forsource and destination files.
[F7] - Define Directory
Return to the File Utilities menu [Esc]
PrefaceImporting and Exporting Processor Memory Files
7-4
Configuring the Import Utility
You can configure the import utility to handle errors (skip rungs with errors, ignoreall errors) and data table file size adjustments. Follow the steps on the left.
This saves the configuration characteristicsyou specified on this screen only. Ifyou make changes on other configuration screens, you must save theconfiguration on those screens if you want the configurations saved to your userconfiguration file. After you press [F9], the configuration information remains thesame each time you start the software. If you want to change the configurationinformation for this editing session only, press [Enter] after you change theappropriate information. The changes remain until you exit the software.
+========================= PLC-5 PROGRAMMING SOFTWARE =========================+| +== PROCESSOR =+| A 6200 Series Software Product | || | BATCH || Copyright 1986, 1995, Rockwell Software Inc. | || All Rights Reserved | || | || Release 5.x | || | || This softwar+= Import Processor Memory File Options ===+Co,| || | |e | || | F1 Skip ERR Instructions NO |=+,| || | F2 Create Default Data Tables YES | | | || | F3 Change Audit ERRORS to WARNINGS YES | | | || | | | | || | F9 Save Configuration | | | || | | | | |+================+= ESC exits/ALT-U aborts changes =========+=+=+==============+
Press a function key.>
Skip Create Change SaveERR Ins Tables Errors ConfigF1 F2 F3 F9
Change the optionsyou want.
Press this key to save the configuration.
Import
6200Main Menu
F7
File Utilities
F6
F1
Proc Mem File
F5
Select Options
Importing and Exporting Processor Memory Files
7-5
If You Want to: Press this Key:
Toggle whether or not the import utility should skiperror instructions.Default is NO.
[F1] - Skip Error Instructions
Toggle whether or not the import utility should createdefault data tables. Default is YES.
[F2] - Create Tables
Toggle whether or not the import utility should examineerrors, change them to warning messages, andcontinue processing the import. Default is YES.
[F3] - Change Errors
Save the configurations (on this screen only). [F9] - Save ConfigurationReturn to the previous menu. [Esc]Abort all configuration changes. [Alt-U]Change configuration for this import session only. [Enter] or [Escape]
Examining the Results of an Import
When an import completes, the system generates a .LOG file and stores it in the\IPDS\ARCH\PLC5 directory. This file contains the error messages displayed on thescreen during the actual operation. You can view the contents of this log file with anASCII text editor.
PrefaceImporting and Exporting Processor Memory Files
7-6
Exporting Processor Memory Files
The export utility functions the same way as the import utility, except in theopposite direction: you transfer processor memory files from the processor format(or archive directory) to an ASCII file.
Note You cannot import or export a CAR (Custom Application Routine) file. If you try toimport or export a file containing a CAR instruction, the software logs an error onthe display and in the .LOG file. For more information on CAR files, see theInstruction Set Reference manual.
Note If you are using passwords and privileges, the privilege configuration information isencrypted in the exported file to help make unauthorized access difficult. For moreinformation on privileges, see chapter 15 in the Software Configuration andMaintenance manual.
If the destination you specify already exists, the systemasksyou whether to overwrite the existing destination file. Toenter a new destination file, press [F10] or [Esc]. Theexisting destination file will not be overwritten. To overwritethe existing destination file, press [F8].
Enter file to export (must have ext .AF5) or cursor to file
+========================= PLC-5 PROGRAMMING SOFTWARE =========================+| || A 6200 Series S+=== D:\IPDS\ARCH\PLC5\*.AF5 ==========+| | Name Size Date || Copyright 1986, 1995,+--------------------------------------+| All Rights| BATCH 1548 09-06-90 || | LIMIT 254 09-19-90 || Release x.x | TEST1 2072 09-22-90 || | || This software is licensed to: Comp| || Loca| || += EXPORT PROCESSOR MEMORY FILE ===+ | || | |A| || | SOURCE: | | || | | | || | DESTIN: | | || | | | |+=+= ESC exits =======================+=+======================================+
Press a Function Key or Enter File Name>
Begin Select Enter Select DefineOper Source Destin Options DirF1 F3 F4 F5 F7
F1
F7
File Utilities
F7
Export
6200Main Menu
Proc Mem File
3
4
F1
Begin Oper
Press this key to select a source.2 Press this key to enter a destination.
Enter the processor memory file name.
6
1
Select options or proceed to step 6 andaccept defaults.
5 F5
Importing and Exporting Processor Memory Files
7-7
Note You can abort an export by pressing [F3] - Abort Utility. If you abort anexport, an incomplete .PC5 file remains in your directory.
If You Want to: Press this Key:
Begin exporting the file [F1] - Begin OperationSelect a source file [F3] - Select SourceEnter a destination file [F4] - Enter DestinationConfigure the export utility [F5] - Select OptionsDefine a different directory forsource and destination files
[F7] - Define Directory
Return to the File Utilities menu [Esc]
Configuring the Export Utility
You can configure the export utility to annotate the exported file.
+========================= PLC-5 PROGRAMMING SOFTWARE =========================+| || A 6200 Series S+=== D:\IPDS\ARCH\PLC5\*.AF5 ==========+| | Name Size Date || Copyright 1986, 1995, +--------------------------------------+| All Rights| BATCH 1548 09-25-90 || | BATCHIMP 1548 09-28-90 || Release x.x | TEST1 1548 09-25-90 || | || This software is licensed to: Comp| || Loca| || += EXPORT PROCESS+= Export Archive Options ============+ || | | | || | SOURCE: | F1 Annotate ASCII Output File NO | || | | | || | DESTIN: | F9 Save Configuration | || | | | |+=+= ESC exits =====+= ESC exits/ALT-U aborts changes ====+====================+
Press a function key.>
Comment SaveConfig
F1 F9
Press this key tosave your configuration
Export
6200Main Menu
F7
File Utilities
F7
F1
Proc Mem File
F5
Select Options
PrefaceImporting and Exporting Processor Memory Files
7-8
If You Want to: Press this Key:
Toggle whether or not the export utility shouldannotate the exported file with comments. Defaultis NO.
[F1] - Comments
Save the configurations (on this screen only). [F9] - Save ConfigurationReturn to the previous menu. [Esc]Abort all configuration changes. [Alt-U]If you want to change the configuration for this importsession only.
[Escape] or [Enter]
Examining the Results of an Export
When an export completes, the system generates a .LOG file and stores it in the\IPDS\TEXT\PLC5 directory. This file contains the error messages displayed on thescreen during the actual operation. You can view the contents of this log file with anASCII text editor.
Importing and Exporting Processor Memory Files
7-9
Creating an Rockwell Software Inc. ASCII ProcessorMemory File
The Rockwell Software Inc. ASCII files you use in the import and export utilitiesmust follow these rules:
· The text editor you use to create the file must produce only printable ASCIIcharacters, with no control characters or hidden characters.
· Graphics characters are not allowed.· The ASCII file must be in the directory defined by [F6] - Exported Files
from the Define Directory option on the Import Utility screen.· The file name of the ASCII file can contain up to eight of the
following characters:
A - Z (both upper and lower case)0 - 9underscore (_)
· The file extension of the ASCII file must be .PC5.
The six major sections of the ASCII file are: the program header, the data table, theproject name, the program files, channel configuration, and the force table.
Note In order to generate these sections automatically in an empty file, clear memory,then save the processor’s memory. If you then export this file, these section headersare in an otherwise empty file for you to program.
Specifying the Program Header
The first section defines the program header. The program header is a single linethat contains the processor type, the processor series, and the processor revision.When you perform an export, this line always contains the flag word COMPLETE.The COMPLETE flag clears the processor memory prior to loading the importedprocessor memory file. Every ASCII file must have a program header section, evenif all the remaining sections are empty.
For example, the following program header identifies a PLC-5/15 series Brevision A and specifies it as a complete processor memory file:
START PLC5_15 SERIES_B REV_A COMPLETE
PrefaceImporting and Exporting Processor Memory Files
7-10
Specifying the Data Table
The second section defines the data table. The data table is the list of data table filesthat the processor uses. Files are defined by the word DATA (upper or lower case), aletter(s) indicating the file type, followed by the file number, and then the lastaddress defined in the file. Use a separate section for each data table file.
For example, the following data table entry specifies binary file 3 that contains 8words. The values on the line following the data table entry specify the data values:
DATA B3:7
0 1 2 3 4 5 6 7
Specifying the Project Name
The third section defines the project name. The project name is always stored inprogram file 0.
The following entry specifies DRILL1 as the project name of a processormemory file:
PROJECT “DRILL1”
The project name must be enclosed in quotes and can contain up to 8 characters(A - Z, 0 - 9, underscore _ and blank spaces).
Importing and Exporting Processor Memory Files
7-11
Specifying Program Files
The fourth section defines the program files. Each program file can containsequential function charts, ladder, or structured text programs. Each program filecan have zero or more rungs. Each element and branch in a rung is represented by amnemonic along with required data or address information.
For example, the following entry defines ladder program file 3. The word LADDER(upper or lower case) starts the section with the program file number following.Each line that starts with an SOR instruction indicates the start of a rung of ladderlogic; the EOR instruction indicates the end of a rung:
LADDER 3
SOR XIO I:030/003 XIC I:030/004 TON T4:10 1.0 32000 0 EOR
SOR XIC I:030/003 MOV T4:10.ACC T4:10.PRE EOR
Note The first file available for a ladder program for a Classic PLC-5 processor is file 2(file 0 stores system information and file 1 is reserved for an SFC).
Note For an Enhanced PLC-5 processor series C, revision C or higher, files 2-999 can beladder, SFC, or ST.
For a complete list of all programming instructions and operands and the datatypes that are valid for each operand, see appendix C in the Instruction SetReference manual.
PrefaceImporting and Exporting Processor Memory Files
7-12
Specifying the Force Table
The fifth section defines the force table. The force table defines inputs and outputswhich are forced into an ON or OFF state. (If this section is not included, no forcesare applied.)
For example, the following table shows the force status for output address O:057.The force table is twice the size of the input/output image table.
FORCE FO:057% ON OFF %0X0000 0X0000 % FO:000 %0X0000 0X0000 % FO:001 %0X0000 0X0000 % FO:002 %0X0001 0X0000 % FO:003 %0X0000 0X0000 % FO:004 %0X0000 0X0001 % FO:005 %0X0000 0X0000 % FO:006 %0X0000 0X0000 % FO:007 %0X0000 0X0000 % FO:010 %0X0000 0X0000 % FO:011 %
. . . . . . . . . . . . .0X0000 0X0000 % FO:053 %0X0000 0X0000 % FO:054 %0X0000 0X0000 % FO:055 %0X0000 0X0000 % FO:056 %0X0000 0X0000 % FO:057 %
Importing and Exporting Processor Memory Files
7-13
Documenting an ASCII Processor Memory File
You can make notes (comments) in your ASCII file. These notes document thecontents of the file. The comments are for your reference only and are not importedinto the processor or database. Therefore, importing and then exporting a file willresult in the loss of all user-created comments.
These are not the address or rung comments you put into your ladder program. Toimport/export program comments, use the documentation import and export utility(see chapter 6).
To document your file, place your comment inside percent signs. For example, thefollowing program file entry uses comments to help explain the ladder logic:
LADDER 2
% length of data: 8 %% file type: L %% number elements: 6 %
% Rung 0 %SOR BST BST XIC % source bit % I:003/004 NXB
XIC % source bit % I:003/005 BNDXIC % source bit % I:003/007 XIC % source bit %
I:003/006 NXBXIC % source bit % I:003/006 BND
BST OTE % destination bit% O:005/006 NXBTON % timer % T4:3 % time base % 1.0 % preset % 32000 %
accum % 200 BNDEOR
% Rung 1 %SOR XIC % source bit % I:003/004 OTE % destination bit %O:005/006 EOR
PrefaceImporting and Exporting Processor Memory Files
7-14
ASCII Processor Memory File Example
The following example shows a complete ASCII version of a processormemory file, with annotation.
START PLC5_25 SERIES_A REV_H COMPLETE
DATA O:057% O:000 % 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000% O:010 % 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000% O:020 % 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000% O:030 % 0X0100 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000% O:040 % 0X0000 0X0002 0X0000 0X0402 0X0000 0X0402 0X0000 0X0402% O:050 % 0X0000 0X0402 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000
DATA I:057% I:000 % 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000% I:010 % 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000% I:020 % 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000% I:030 % 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000% I:040 % 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000% I:050 % 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000
DATA S:31
% STATUS FILE COMMENTDH+ station: 40 Mode: SCANNER Local hardware addressing:1-SLOTRam backup: DISABLED Memory: UNPROTECTED EEPROM: TRANSFER DISABLEDArithmetic flags S:0 Z:1 V:0 C:0User control bits 00000000 00000000 RESTART FIRST STEPProcessor status 00000000 10001000 MODE SWITCH IN REMOTEMinor fault 00000000 00100011 BATTERY BAD OR MISSINGMajor fault 00000000 00000000Fault code 0Where faulted prog file: 0 rung: 0Fault routine prog file: 0 watchdog: 500Select. timed inter. prog file: 0 setpoint: 0Program scan [msec] last: 0 max: 10Date/time 1990-09-24 10:02:36 Indexed addressing offset 0Adapter Image file: 0 I/O Status File: 9 VME status file:
0Active node list0 10 20 30 40 50 60 7000000000 00000000 00000000 00000000 10000000 00000000 00001001 10000000
Importing and Exporting Processor Memory Files
7-15
%% S:0 %
4 136 -14176 0 0 1 400 254 0 10% S:10 %
35 0 0 0 0 0 9 0 1990 9% S:20 %
24 10 2 36 0 0 0 0 500 0% S:30 %
0 0
DATA B3:19% B3:0 %-32766 42 0 0 0 0 0 0 4096 20480% B3:10 %-990 0 2 0 80 0 0 0 0 0
DATA T4:9% .CTL .PRE .ACC %0X0000 30 0 % T4:0 %0X0023 100 0 % T4:1 %0X0277 10 10 % T4:2 %0X0031 300 0 % T4:3 %0X0031 100 0 % T4:4 %0X0031 1000 0 % T4:5 %0X00EF 1200 0 % T4:6 %0X000B 200 0 % T4:7 %0X000F 200 0 % T4:8 %0X0200 0 0 % T4:9 %
DATA C5:4% .CTL .PRE .ACC %0X0000 32767 189 % C5:0 %0X0000 32767 189 % C5:1 %0X0000 32767 189 % C5:2 %0X0000 32767 189 % C5:3 %0X0000 32767 189 % C5:4 %
DATA R6:6% .CTL .LEN .POS %0X8100 10 2 % R6:0 %0X0000 11 1 % R6:1 %0XA000 10 10 % R6:2 %0XA100 12 13 % R6:3 %0X2000 2 1 % R6:4 %0X8800 0 0 % R6:5 %0X0000 0 0 % R6:6 %
PrefaceImporting and Exporting Processor Memory Files
7-16
DATA N7:19% N7:0 %
4 10 0 0 15 15 1295 10 3840 0% N7:10 %
270 14 0 0 0 0 0 0 0 0
DATA F8:9% F8:0 %
0.000000 1.100000 2.200000 3.300000 4.400000% F8:5 %
5.500000 6.600000 7.700000 8.800000 9.900000
PROJECT ”TEST_PC5”1 ”SFC_TEST”2 ”LADDER2 ”
SFC 1SOPSTP 2TRC 3EOP
LADDER 2% Rung: 0 %SOR XIC I:002/001 XIC I:031/014 XIC B3/0 BST
XIC I:031/017 NXBXIC O:002/001 XIC I:031/014 BND
OTE O:010/000 EOR% Rung: 1 %SOR XIC B3/9 XIO T4:1.DN TON T4:1 0.01 100 10 EOR% Rung: 2 %SOR XIC B3/16 CTU C5:3 100 10 EOR% Rung: 3 %SOR XIO N7:0/15 BTW 0 2 0 N7:0 O:017 10 NO EOR% Rung: 4 %SOR BST
XIC B3/24 NXBXIC B3/28 BND
LIM 20 N7:19 26 SUB N7:16 20 N7:18 EOR% Rung: 5 %SOR BST
XIC O:011/017 NXBXIC T4:7.DN XIO I:031/017 BND
XIO B3/18 TON T4:9 1.0 0 0 EOR% Rung: 6 %SOR XIO T4:3.DN EQU N7:9 3200 EQU N7:9 N7:8 OTE B3/28 EOR% Rung: 7 %
Importing and Exporting Processor Memory Files
7-17
SOR XIC R6:0.EN BSTFAL R6:2 10 10 ALL N7:9 #N7:10 + N7:9 NXBDIV N7:9 10 N7:9 BND
EOR% Rung: 8 %SOR BST
RES R6:5 NXBRES R6:6 NXBFBC #B3:0 #N7:0 #N7:15 R6:5 0 0 R6:4 2 1 BND
EOR% Rung: 9 %SOR XIC B3/17 XIO R6:0.DN FFL N7:1 #N7:6 R6:3 12 13 EOR% Rung: 10 %SOR XIC R6:1.DN FFU #N7:5 N7:6 R6:1 11 1 EOR
FORCE FO:057% ON OFF %0X0000 0X0000 % FO:000 %0X0000 0X0000 % FO:001 %
. . . . . . .%0X0000 0X0000 % FO:056 %0X0000 0X0000 % FO:057 %FORCE FI:057% ON OFF %0X0000 0X0000 % FI:000 %0X0000 0X0000 % FI:001 %
. . . . . .0X0000 0X0000 % FI:056 %0X0000 0X0000 % FI:057 %
The ladder logic for the preceding ASCII processor memory file is shown on thefollowing two pages:
PrefaceImporting and Exporting Processor Memory Files
7-18
CTU
T4:1
I:002
01
N7:0
15
I:031
14
TONTIMER ON DELAYTimerTime BasePreset
0.01100 DN
EN
Accum 10
BTWBLOCK TRANSFER WRITE
B3
0
I:031
17I:002
01
I:031
14
O:010
00
B3
9
T4:1
DN
C5:3COUNT UPCounterPreset 100 DN
EN
Accum 10
B3
16
0RackGroupModule
20
Control Block N7:0Data FileLengthContinuous
O:01710N
DN
EN
ER
B3
24B3
28
20
LIMLIMITTESTLow LimitTest
High Limit
N7:19
260
N7:16
SUBSUBTRACTSource A
Source BDestination
20N7:18
0
0I:011
17T4:3
DN
I:031
17
B3
18 T4:9
TONTIMER ON DELAYTimerTime BasePreset
1.00 DN
EN
Accum 0
T4:3
DN N7:9
EQUEQUALSource A
Source B 32000
N7:9
EQUEQUALSource A
Source B N7:80
B3
28
Importing and Exporting Processor Memory Files
7-19
R6:0
EN
FALFILE ARITHMETIC/LOGICAL
R6:2ControlLengthPosition
1010
Mode ALLDestination
ExpressionN7:9
0
#N7:10 + N7:9
DN
EN
ER
N7:9
DIVDIVIDESource A
Source BDestination
10N7:9
0
0
FBCFILE BIT COMPARE
#B3:0SourceReferenceResult
#N7:0#N7:15
Comp Control R6:5Length
Result Control00
RESR6:5
RESR6:6
Position
LengthPosition
R6:412
B3
17
FFLFIFO LOAD
N7:1SourceFIFOControl
#N7:6R6:3
Length 12Position 13
DN
EN
EM
R6:0
DN
R6:1
DN
FFUFIFO UNLOAD
#N7:5FIFODestinationControl
N7:6R6:1
Length 11Position 1
DN
EN
EM
PrefaceImporting and Exporting Processor Memory Files
7-20
ASCII SFC Processor Memory File Example
The following example shows a complete ASCII version of a simple SFC processormemory file.
START PLC5_60L SERIES_A REV_B COMPLETE
DATA O:1770X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000
DATA I:1770X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X00000X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000 0X0000
Importing and Exporting Processor Memory Files
7-21
DATA S:127% STATUS FILE COMMENTDH+ station: 43 Mode: ADAPTER Local hardware addressing:2-SLOTRam backup: ENABLED Memory: UNPROTECTED EEPROM: TRANSFER ON BAD RAMArithmetic flags S:0 Z:0 V:0 C:0 CHECKSUM: -3582User control bits 00000000 00000000 RESTART FIRST STEPProcessor status 00100000 10001000 MODE SWITCH IN REMOTEMinor fault 00000000 00000010 DH+ TABLE CHANGEMinor fault2 00000000 00000000Major fault 00000000 00000000Fault code 0Where faulted prog file: 0 rung: 0Fault routine prog file: 0 watchdog: 500Select. timed inter. prog file: 0 setpoint: 0Select. scan [msec] last: 0 max: 0Program input inter. prog file: 0 input word: 00PII scan [msec] last: 0 max: 0PII input mask: 0000000000000000 preset: 0 accum: 0PII in polarity: 0000000000000000 return mask: 0000000000000000Program scan [msec] last: 11 max: 30Date/time 0000-02-27 18:19:51 Indexed addressing offset 0Adapter Image file: 0 I/O Status File: 0 VME status file:
0Active node list0 10 20 30 40 50 60 7000000000 00000000 10000000 00000000 00010000 00000000 00000000 00000010
0 - 7 I/O STATUS btx full 00000000 rack fault 00001100I/O CONTROL reset: 00000000 inhibit: 0000000
010 - 17 I/O STATUS btx full 00000000 rack fault 00000000
I/O CONTROL reset: 00000000 inhibit: 0000000020 - 27 I/O STATUS btx full 00000000 rack fault 00000000
I/O CONTROL reset: 00000000 inhibit: 00000000
PrefaceImporting and Exporting Processor Memory Files
7-22
MCP inhibit: 0000000000000000MCP prog file: 2 last: 4 max: 15MCP prog file: 3 last: 4 max: 11MCP prog file: 4 last: 3 max: 11MCP prog file: 0 last: 0 max: 0MCP prog file: 0 last: 0 max: 0MCP prog file: 0 last: 0 max: 0MCP prog file: 0 last: 0 max: 0MCP prog file: 0 last: 0 max: 0MCP prog file: 0 last: 0 max: 0MCP prog file: 0 last: 0 max: 0MCP prog file: 0 last: 0 max: 0MCP prog file: 0 last: 0 max: 0MCP prog file: 0 last: 0 max: 0MCP prog file: 0 last: 0 max: 0MCP prog file: 0 last: 0 max: 0MCP prog file: 0 last: 0 max: 0
%0 8328 -26077 0 1 8 16384 12 11 302 0 0 0 0 0 0 0 0 227 18 19 51 0 0 0 0 500 00 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 -3582 0 01 0 1 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 02 4 15 3 4 11 4 3 11 00 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0
DATA B3:04
DATA T4:00Xa26b 3 3
DATA C5:00X0000 0 0
DATA R6:00X0000 0 0
DATA N7:00
DATA F8:00
Importing and Exporting Processor Memory Files
7-23
DATA SC14:00X0200 4 0
PROJECT ”GAMUTLAB”2 ”sfc_mcp ”3 ”mode_mcp”4 ”output_mcp”6 ”conv_cmd”7 ”clamp_cmd ”8 ”fwd_cmd ”9 ”drill_cmd ”10 ”dwell_tmr ”11 ”rev_cmd ”13 ”slde_st_ls”14 ”full_ls ”15 ”dwell_done”16 ”home_ls ”
SFC2 2SCANPLC5 POSTSCAN SC14 T4SOPSTP
N 1R 2R 3
TID 1TRC 13TID 2STP
S 2N 4S 3
TID 3TRC 14TID 4STP SC14:0 1.0
L 5 T4:0 1.0TID 5TRC 15TID 6STP
N 6TID 7TRC 16TID 8EOP
PrefaceImporting and Exporting Processor Memory Files
7-24
ACT 1 6ACT 2 7ACT 3 9ACT 4 8ACT 5 10ACT 6 11LADDER 3SOR BST
XIC I:000/000 NXBXIC B3/0 BND
XIO I:000/001 XIO B3/10 BSTOTE B3/0 NXBOTE O:001/000 BND
EORSOR BST
XIC I:000/001 NXBXIC B3/1 BND
XIO I:000/000 XIO B3/10 BSTOTE B3/1 NXBOTE O:001/001 BND
EORSOR XIC I:000/002 BST
OTE B3/10 NXBOTE O:001/002 BND
EORLADDER 4SOR BST
XIC B3/0 XIC B3/2 NXBXIC B3/1 XIC I:001/000 BND
XIO B3/10 OTE O:000/000 EORSOR BST
XIC B3/0 XIC B3/3 NXBXIC B3/1 XIC I:001/001 BND
OTE O:000/001 EORSOR BST
XIC B3/0 XIC B3/4 NXBXIC B3/1 XIC I:001/002 BND
XIO B3/10 OTE O:000/002 EORSOR BST
XIC B3/0 XIC B3/5 NXBXIC B3/1 XIC I:001/003 BND
XIO B3/10 OTE O:000/003 EOR
SOR BSTXIC B3/0 XIC B3/6 NXBXIC B3/1 XIC I:001/004 BND
XIO B3/10 OTE O:000/004 EOR
Importing and Exporting Processor Memory Files
7-25
LADDER 6SOR OTE B3/2 EOR
LADDER 7SOR OTE B3/3 EOR
LADDER 8SOR OTE B3/4 EOR
LADDER 9SOR OTE B3/6 EOR
LADDER 10SOR OTE O:000/007 EOR
LADDER 11SOR OTE B3/5 EOR
LADDER 13SOR XIC I:000/005 EOT EOR
LADDER 14SOR XIC I:000/006 EOT EOR
LADDER 15SOR XIC T4:0.DN EOT EOR
LADDER 16SOR XIC I:000/007 EOT EOR
FORCE FO:1770X0000 0X00000X0000 0X00000X0000 0X0000. . . . . .0X0000 0X00000X0000 0X00000X0000 0X0000
FORCE FI:1770X0000 0X00000X0000 0X00000X0000 0X0000. . . . . .0X0000 0X00000X0000 0X00000X0000 0X0000
PrefaceImporting and Exporting Processor Memory Files
7-26
PLC2 $3:0:47-1 -1 -80 -1 -1 -1 -1 -1-80 -1 -1 -1 -1 -1 -80 -1-1 -1 -1 -1 -80 -1 -1 -1-1 -1 -80 -1 -1 -1 -1 -1-80 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1
PLC2 $3:1:47-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1
PLC2 $3:2:47-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1
PLC2 $3:3:47-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1
PLC2 $3:4:47-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1
PLC2 $3:5:47-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1 -1 -1
CONFIG $4:0
Importing and Exporting Processor Memory Files
7-27
CONFIG $4:1:411-1 -1 8224 8224 8224 8224 -1 -1 8224 8224
8224 8224 -1 -1 8224 8224 8224 8224 -1 -18224 8224 8224 8224 257 257 1 0 0 0
0 0 0 0 0 0 0 0 0 0. . . . . . . .
0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 00 0
CONFIG $4:2:170 6995 21826 1024 0 0 13 100 771 768
1536 0 0 781 -243 2560 1536 1792
CONFIG $4:3:170 6995 21826 1024 0 0 0 100 771 768
1536 0 0 781 -243 2560 1536 1792
CONFIG $4:4:71130 0 8 35 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0
. . . . . . . .0 0 0 0 0 0 0 0 0 00 0
CONFIG $4:5:71129 0 8 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0
. . . . . . . .0 0 0 0 0 0 0 0 0 00 0
CONFIG $4:6:71131 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0
. . . . . . . .0 0 0 0 0 0 0 0 0 00 0
CONFIG $4:7:71129 0 8 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0
. . . . . . . .0 0 0 0 0 0 0 0 0 00 0
PrefaceImporting and Exporting Processor Memory Files
7-28
The SFC for the preceding ASCII processor memory file is shown below:start
end
013
00001
00003
01400005
01500007
016
Entering and Editing SFCs
Section 2
Entering and Editing SFCs
If You Want to: See Chapter:
Learn about the building blocks of a SequentialFunction Chart (SFC) and how to draw an SFC
8
Enter an SFC with a Classic processor 9Enter an SFC with an Enhanced processor 10Enter SFC structures 11Edit an SFC 12
PrefaceEntering and Editing SFCs
Getting Started Using SFCs
8-1
8 Getting Started Using SFCs
Chapter Objectives
Use this chapter to learn about the building blocks of a sequential function chart(SFC) and how to draw an SFC.
If You Want to: See Page:
Learn the basic concepts of SFCs 8-2Learn the basic building blocks 8-3Decide when to use each SFC building block 8-10Monitor SFC processor memory file 8-13Configure the SFC display 8-15Select an SFC mode 8-17Learn about quadrants 8-18Review the SFC editor keys 8-20Review SFC programming considerations 8-21
IEC 1131-3 International Programming Language Standard
IEC 1131-3 is the international standard for PLC programming languages,specifying syntax, semantics, and display representation for the followingprogramming languages:
· Sequential Function Chart (SFC)· Structured Text (ST)· Instruction List (IL)· Ladder Diagram (LD)· Functional Block Diagram (FBD)
PrefaceGetting Started Using SFCs
8-2
IEC 1131-3 also provides common elements (i.e., data types, variables,programming organization, etc.), which allow the flexibility of integrating multipleprogramming languages in the same application and the reduction of training timeand engineering effort. Rockwell Software, Inc. bases it’s current SFC and STprogramming languages on this international standard.
To obtain more information, write or call:
American National Standards Institute (ANSI)11 West 42nd StreetNew York, NY 10036(212) 642-4900(212) 302-1486 (FAX)
Getting Started Using SFCsA sequential function chart lets you implement segmented programming. Instead ofcreating one long program, you can divide the program into several steps.
Each step corresponds to a control task; each step is related to a program file thatcontains the programming logic necessary to complete the associated control task.
If you have a Classic PLC-5 processor and you do not use an SFC, the processorexecutes the first ladder program file found in the program directory as the maincontrol program. When the processor finishes that program file, it executes the samefile again. You can have the first program file call other program files so that all thefiles are executed. You can also use an SFC and let the SFC tell the processor whichprogram files to execute and when to execute them.
If you are using an Enhanced PLC-5 processor, the processor executes the maincontrol program file(s) as you have them specified on the processor configurationscreens. When the processor finishes the main control program file(s) as you havethem specified on the processor configuration screen, it executes this list in the sameorder again. You can have the main control program file(s) call other program filesso that all the files are executed. You can also use an SFC or multiple SFCs to tellthe processor which program files to execute and when to execute them. For moreinformation on processor configuration, see the Software Configuration andMaintenance manual.
When you use an SFC, the processor scans only the active steps in the SFC. Allother steps are not scanned, thus reducing the program scan time. As the processormonitors the SFC, the processor executes the program files associated with theactive steps.
Getting Started Using SFCs
8-3
Understanding the Building Blocks
An SFC uses the following types of building blocks:
Step
A step typically represents an independent machine state. One step of programminglogic runs repeatedly, top to bottom, until a logic condition (transition) lets theprocessor progress to the next step of the chart. You draw a step as a numbered andlabelled box in the SFC (Figure 8.1), where the number (7 in this example)represents the program file number that contains the logic for that step.
Figure 8.1Example Step
7 Step
Corresponding ladder logic for stepMixer 1
Enhanced PLC-5 processors can have up to eight actions per step. An action is asubset of a step; instead of assigning a single file to a step, you can assign individualfiles to actions of a step to better represent the individual pieces of your operation.Actions may be ladder, SFC, or structured text (ST) program files.
PrefaceGetting Started Using SFCs
8-4
Transition
A transition represents the logic condition that lets the processor progress from onestep to the next. The transition goes true when its logic condition is met. You draw atransition as a numbered and labelled cross below its step (Figure 8.2), where thenumber (17 in this example) represents the program file number that contains thelogic for that transition.
Figure 8.2Example Transition
17EOT
Transition
Corresponding ladder logic for transition
Transitions may be written in ladder logic or in structured text with the ST optionwith an Enhanced PLC-5 processor series C, revision C or higher.
Simple SFC
A simple SFC contains steps that execute one at a time in sequence (Figure 8.3).
Figure 8.3Example of a Simple SFC
9
10
7
8
Mixer 1
Dump 1 The logic for the mixer step is executedrepeatedly until its transition is true.Then the processor executes the dumplogic repeatedly until its transition is true.
Getting Started Using SFCs
8-5
Selection Branch
A selection branch contains alternative paths from which the processor selects one.This is equivalent to an “OR” structure. Draw a selection branch as parallel pathsconnected with single horizontal lines (Figure 8.4). Notice that transitions arelocated within the structure’s boundaries and are at the top of each parallel path.
Figure 8.4Example Selection Branch
9
10
7Mixer 1
8Dump 1
11
15
12Mixer 7
14
17
13Rinse 1
16
3
PrefaceGetting Started Using SFCs
8-6
When a processor executes a selection branch, the processor finds the first path witha true transition in the order of the program scan and executes the steps andtransitions in that path. If more than one path in a selection branch goes true at thesame time, the processor chooses the left-most path. Figure 8.5 shows a typicalscan sequence.
Figure 8.5Typical SFC Scan Sequence of a Selection Branch
In this example, the transitions are:
False True
For more information on scan timing, see appendix B of the Instruction SetReference manual.
Simultaneous Branch
A simultaneous branch executes steps simultaneously that are in parallel paths. Thisis equivalent to an “AND” structure. The processor completes one step in thesimultaneous diversion and then goes to the next step. Draw a simultaneous branchas parallel paths connected with double horizontal lines (Figure 8.6). Notice that acommon transition for the paths is outside of the branch. The processor finishesexecuting a simultaneous branch when it has scanned each step in each path at leastonce and the common transition is true.
Getting Started Using SFCs
8-7
Figure 8.6Example Simultaneous Branch
9
10Mixer 1
8Dump 1 12Mixer 7 13Rinse 1
26
When a processor executes the simultaneous branch, the processor scans the branchfrom left-to-right, top-to-bottom. It appears that the processor executes each path inthe branch simultaneously. Figure 8.7 and Figure 8.8 show a typical scan sequence.
Figure 8.7Typical SFC Scan of a Simultaneous Branch
* * * *
* Actions are scanned as the step is scanned.** Subcharts tied to these points execute. After execution, any MCPs that follow
execute before returning to this chart.
**
PrefaceGetting Started Using SFCs
8-8
Figure 8.8Typical SFC Scan of a Simultaneous Branch when a Transition Goes True
truetransition
falsetransition
falsetransition
falsetransition
truetransition
falsetransition
falsetransition
falsetransition
step added to list ofsteps to be scanned
first scan
last scan/post scan
First: Then:
falsetransition
falsetransition
falsetransition
Finally:
falsetransition
* *
* Subcharts tied to these points execute. After execution, any MCPs that follow execute before returning to this chart.
*
For more information on SFC scan timing, see appendix B of the Instruction SetReference manual.
Getting Started Using SFCs
8-9
When using simultaneous branches, you may want to include a “dummy” step atthe end of each path to synchronize the simultaneous actions. This dummy stepmerely holds each path (until all paths have been executed) before moving on tothe transition.
If you are using a Classic PLC-5 processor, assign this dummy step to a program filethat has no ladder logic. To save scanning overhead, assign all dummy steps to thesame program file number. Since Enhanced PLC-5 processors can have steps withno actions, you do not need to assign a program file to this dummy step when usingone of these processors.
Using the example above, the structure would look like the following:
9
10Mixer 1
8Dump 1 12Mixer 7 13Rinse 1
026
15 15 15Dummy 1 Dummy 1 Dummy 1
You can combine SFC building blocks (step, transition, selection branch,and simultaneous branch) to build structures that represent yourprogramming application.
PrefaceGetting Started Using SFCs
8-10
Deciding When to use Each SFC Structure
After you identify the major areas of machine operation, convert the logical pathsand steps that you labeled in your design specification to SFC building blocks.Table 8.A explains when to use which SFC building blocks.
At this point, do not worry about the actual programming logic for each step andtransition. After you complete the SFC, you can develop the logic.
Table 8.ADeciding When to Use the SFC Structures
If You Have: Then Draw: Using these Rules:
An independent machine state A step with its transition A step must always be followed by a transition.
A clearly defined chain of eventsthat occur sequentially
For example, in one heat-treatingarea, the temperature must rampup at a particular rate, maintainthe temperature for a certainduration, then cool at aparticular rate.
A simple path of stepsand transitions
For design purposes, number steps and transitionsconsecutively from 2.
Start the path with a step; end the path witha transition.
Two or more alternative pathswhere only one is selected
For example, depending on abuild code, one station musteither drill or polish.
A selection branch The transitions beginning each path are scanned fromleft to right. The first true transition determines thepath taken. For a Classic PLC-5 processor, you candefine up to 7 paths in the structure.For an EnhancedPLC-5 processor, you can define up to 16 paths.
(Continued)
Getting Started Using SFCs
8-11
If You Have: Using these Rules:Then Draw:
Two or more parallel paths thatmust be scanned at least once
For example, communicationsand block transfers must occurwhile control logic is executing.
A simultaneous branch All paths are active in the structure.For a Classic PLC-5 processor, you can define up to 7parallel paths. For an Enhanced PLC-5 processor,you can define up to 16 parallel paths.
A situation where you want tojump within your program,selectively skipping portions oflogic and resume execution atanother point (identified bya label)
For example, you might want touse a GOTO when an errorcondition occurs.
A GOTO and label
GOTO 3
For a complete list of rules, see the section “UsingGOTO Statementsand Labels”in chapter 11.
PrefaceGetting Started Using SFCs
8-12
Figure 8.9 shows an SFC that uses the standard SFC building blocks.
Figure 8.9Example SFC Using the Standard SFC Building Blocks
2 InitialStep
3
10
13
8
12
6
11
9
7
4
514
15
Getting Started Using SFCs
8-13
Monitoring an SFC Processor Memory File
When you are ready to enter your SFC logic, follow the steps on the left.
The input line lists the filethat is being monitoredand the quadrant that isbeing displayed.
Make sure the processoris in Program or RemoteProgram mode if you areediting on line.
START+-+-++=+=+|006|+=+=+|
+-----+--+--+-----+| | | |-+- -+- -+- -+-007 008 009 005| | | |
+-+-+ | | ||002| | | |+-+-+ | | |-+- | | |003 | | || | | |
Press a function key.MONITOR 4:(0,0) >Rem Prog Forces: Disabled PLC-5/40 Ser A Rev A 5/40 Addr 20 Drill1Change Exit Program Expand Search General Zoom Force EditMode Dirctry Macro UtilityF1 F3 F4 F5 F6 F7 F8 F9 F10
F1
OnlineProg
6200Main Menu
orF3
OfflineProg
Cursor to SFC file to edit
F8
MonitorFile
SFC Main Menu
Attention: It is not possible to edit SFCs in Run or Remote Run mode.
PrefaceGetting Started Using SFCs
8-14
Selecting a Program File:
The processor starts numbering program files at program file 0 (which containssystem information).
If you are using a Classic PLC-5 processor, program file 1 always contains the SFClogic, as long as SFC logic exists. If you do not use an SFC, program file 1 remainsundefined. If the processor you use does not support SFCs, program file 1is reserved.
If you are using an Enhanced PLC-5 processor, an SFC file can be any program filebetween 1 and 999. If you do not use an SFC, program file 1 remains undefined.
For more information on creating SFC files, see the “Working with Files”section ofthis manual.
If You Want to: Press this Key:
Change the processor mode [F1] - Change ModeExit the SFC editor and return to the Online or OfflineProgramming/Documentationscreen
[F3] - Exit
Display the program directory along with the SFC [F4] - Program DirectoryDisplay the contents of an SFC macro [F5] - Expand Macro
[Alt-M]Search for file numbers, labels, quadrants, activesteps, or branches
[F6] - Search[Alt-S]
Enter a comment, configure the display, or specifythe status information
[F7] - General Utility
Edit the ladder logic for the current step or transition [F8] - ZoomEnable or Disable transition forces [F9] - Force 1
[Alt-F]Edit the SFC [F10] - Edit1 This function is available on Enhanced PLC-5 processors only.
Getting Started Using SFCs
8-15
Configuring the SFC Display
You can configure the SFC display for one of three modes. You can also change thenumber of lines and columns that appear on one printed page.
To configure the SFC displays, follow the steps on the left.
+= Display Configuration ======================================================+| F1 Display: Expanded F6 Windows: Action Display (ALT-A)|| F2 Quad Rows: 66 F7 Reference Numbers: OFF || F3 Quad Cols: 80 F8 Action/Condition Window || F4 Scroll: Smooth F9 Save Config || F5 Auto Scroll: OFF F10 Item Config: ON |+= ESC exits/ALT-U aborts changes =============================================++=====+=====+
-+- 20||
+-----+-----+| |+-----+-----+
-+- 13||
+-----+-----+
Press a function key to configure display mode.MONITOR 2:(0,0) > ÛRem Prog SFCFrc:Disabled PLC-5/40 Ser C Rev B 5/40 Addr 43 DRILL1Display Quad Quad Scroll Auto Window Refrnce Act/Cnd SaveMode Rows Cols Mode Scroll Display Number Window ConfigF1 F2 F3 F4 F5 F6 F7 F8 F9
SFCMain Menu
F7
GeneralUtility
F2
ConfigureDisplay
Press the appropriatefunction key.
Table 8.BSFC Configure Display Options
If You Want to: Press this Key:
Toggle through Overview, Normal, or Expanded mode. Overview shows a compressedversion of the program; Normal shows a basic SFC; Expanded shows all details. Thedefault is Expanded.
[F1] - Display Mode
Specify the number of rows (40-132) that you want to print per page (quadrant). Thedefault is 66.
[F2] - Quadrant Rows
Specify the number of columns (80-255) you want to print per page (quadrant). Thedefault is 80.
[F3] - Quadrant Columns
Toggle between Smooth or Jump scroll modes. Smooth displays the contents of theSFC as the cursor moves to the specified location; Jump moves the cursor to thespecified location without displaying the information in between. The default is Jump.
[F4] - Scroll Mode
(Continued)
PrefaceGetting Started Using SFCs
8-16
If You Want to: Press this Key:
Toggle between: ON: cursor moves between active steps in chart whenin Run or Test mode
OFF: cursor moves when you press an arrow keyThe default is OFF.
[F5] - Auto Scroll
Toggle through: None: do not display actions or comments (default)Comment Display: display comments associated with steps,transitions and macrosAction Display: display action window for currently highlightedpiece of the chart
If you press [Alt-T] from within the SFC Editor, comments are displayed; if you press[Alt-A] the action window is displayed; if you press [Alt-N],no windows are displayed.
[F6] - Window 1
Display the software-assigned reference numbers associated with step and transitionnames and comments.The default is OFF.
These reference numbers appear in () in the step box (where the ladder file numberused to appear). For transitions, reference numbers appear in parentheses below theladder file number.
[F7] - Reference Number 1
Specify the size of the text and comment fields of your Action Display andCondition Display.
If you alter 1 field, the other is automatically computed so that the total character width(60) of the two fields is maintained.In the Action/Condition Window:
·Specify the action/condition field size for the action/condition window·Specify the comment field size for the action/condition window
[F8] - Action/ConditionWindow 1
·[F1] - Act/Cond Fld·[F2] - Comment Field
Save the configuration options to disk [F9] - Save ConfigurationConfigure the display of item (step, transition, and macro) names.Toggle between: ON: item name display is configurable
OFF: item name display is not configurableThe default is ON.
[F10] - Item Configuration
Use the configuration options you specify for this editing session only. [Enter] or [Esc]Leave the configuration screen without using any of the changes you specified. [Alt-U]1 Enhanced PLC-5 processors only.
Getting Started Using SFCs
8-17
SFC Modes
You can edit or monitor SFCs.
Editing SFCs
Use the SFC editor to create and modify SFCs. While editing, the cursor highlightsthe current step and transition. When you edit an SFC, the editor does not let youenter syntactically incorrect steps and transitions. Therefore, if the SFC editor doesnot accept a step or transition that you enter, re-enter that step or transition in avalid location.
When you are connected to a processor on line, you can only edit SFCs when theprocessor is in Remote Program or Program mode. This prevents the processor fromexecuting the SFC while you make changes.
Monitor Mode
You use the SFC editor to view the SFC when the processor is in Remote Run, Run,or Remote Test modes. When the processor runs the SFC (and if the Auto Scrollfunction is configured ON), the cursor highlights the current step the processor isrunning (i.e., the active step).
PrefaceGetting Started Using SFCs
8-18
Quadrants
Because an SFC can be larger than the area on the screen of your programmingterminal, an SFC is divided into page-sized quadrants. Quadrants are designated byrow and column. The input line displays the quadrant that you are currently editingor monitoring.
When you print the SFC, the system prints quadrant column 0 first, then quadrantcolumn 1, and continues until all the quadrant columns print. If the SFC has a largebranch that spans several quadrant columns for only a few rows, the printoutcontains several blank pages of paper that account for the quadrant columns androws under the wide branch that do not contain SFC logic. Figure 8.10 shows someSFC quadrants and the numbers of their printed pages.
Figure 8.10SFC Quadrants
page 1(0,0)
page 3(0,1)
page 2(1,0)
page 4(1,1)
How much of the SFC that actually fits on your screen depends on the size of yourSFC. The quadrant that any given step, transition, or label appears in depends on thedisplay mode that you choose. For example, in overview mode, the SFC is tightlycompressed and is more likely to be fully displayed on the screen with the quadrantdisplayed as (0,0). In expanded mode, however, only a portion of the chart mightappear but you can cursor to any part of the chart in any quadrant. The status linedisplays the quadrant that you are currently editing or monitoring.
Getting Started Using SFCs
8-19
The SFC printout is marked with quadrants so you can place the pages in order. Theprintout also overlaps the SFC logic that is close to left/right page borders so you donot lose any information between pages. Steps and transitions are adjusted so that nopage breaks occur within a step.
When you use the Reports function to print an SFC listing, you can specify thedisplay mode in which to print the report. Note that the resulting printout’s quadrantdesignations may not match the quadrant displayed on the screen if the displaymode is different during printing than when the chart was built. (The cover page ofthe report indicates the mode used when the report was generated.)
For example, an expanded-mode printout may display a step in quadrant (1,2), butthat same step may appear in quadrant (0,0) of a compressed-mode (overview)screen display.
PrefaceGetting Started Using SFCs
8-20
Keys You Use in the SFC Editor
You can use the following navigational keys when you are in the SFC Editor(Table 8.C). These keys provide short cuts that display frequently-used screensand information.
Table 8.CNavigational Keys for Use with the SFC Editor
If You Want to: Press thisKey:
Display Action Window [Alt-A]1
Change Processor Mode screen [Alt-C]Show SFC Display Configuration screen [Alt-E]Display Transition Forcing screen [Alt-F] 1
Display Online Help text [Alt- H]Expand or shrink an SFC macro [Alt-M]Display no windows in the SFC Editor [Alt-N]1
Search screen [Alt-S]Display SFC Comments [Alt-T]1
View a Comment [Alt- V]Auto scroll for Run/Test mode [Alt-W]1 These keys are only available with Enhanced PLC-5 processors.
Getting Started Using SFCs
8-21
SFC Programming Considerations
SFC Rules for Special Programming Considerations
If You Have: Use these Rules:
To jump within the SFC Use a GOTO statementand label.See the section “Using GOTOs and Labels,”chapter 11.
A step that needs to be run in multiple places withinthe SFC
Repeat the step where needed or use a global subroutine that getscalled from multiple steps.
A step that can be ignored based on logic conditions Create two selection branches, one with and one without the step;place the step in a subroutine; or combine the step with another stepthat is segregated by an MCR zone.
An SFC branch structure within another branchstructure (nesting)
Nest the branch structures.The software supports as many levels ofnested branches as you can store based on processor memory.
A mini-SFC (compressed steps) within the main SFC Create an SFC macro. A macro begins with a step; the transition forthe ending step follows the macro. See chapter 11.
To reset the logic in an SFC program
(Enhanced PLC-5 processors only)
Use the SFR instruction to reset the chart.
See chapter 13 in the Instruction Set Reference manual.To disable a Main Control Program
(Enhanced PLC-5 processors only)
Set the disable bit on the Processor Configuration screen. Seechapter 11 in the Software Configuration and Maintenance manual orthe Main Control Programs chapter in the PLC-5 Design Manual.
PrefaceGetting Started Using SFCs
8-22
Considerations for SFC Scan Sequences
Control Characteristic: Considerations:The initial step is always activated: at start-up, when restartingfrom the beginning of the chart, and on subsequent passesthrough the chart.
Following an interruption (such as power loss or a change inprocessor mode), you have the option of restarting at thebeginning of the chart or continuing from the beginning of thelast active step.
The last step in each path of a simultaneous branch must beexecuted before the processor scans the common transition.
The processor cannot exit the simultaneous branch until thelast step in each path has been executed.
When a transition is true, the processor scans the precedingstep(s) one last time so that the processor can resetnon-retentive outputs.
Note: The processor never postscans a transition file. Avoidusing timer instructions in transition files. If a transition mustrespond to a timer, we recommend that you place the timer inthe previous step file and test its done bit with logic in thetransition file.
Your application may have to consider the extra time for thepost scan.
If you are using an Enhanced PLC-5 processor, you canconfigure your SFC program to do a manual reset instead ofan automatic reset. For more information, see chapter 11.
Summary of SFC Constraints in PLC-5 Processors
Total Number:
SFC Structure: Classic PLC-5Processors
Enhanced PLC-5Processors
Steps and simultaneous diverges 256 limited by processormemory or 64K (32K1),whichever is less
Steps active at once 12 to 24 1 no limit
Actions per step 1 0 to 8
Paths in a selection orsimultaneous divergence
7 16
1 If your chart must have more than 12 parallel steps in any one area, you must consider the dynamic limits.(See appendix B in the Instruction Set Reference manual.)
For more information on SFC scanning information, see appendix B in theInstruction Set Reference manual.
Entering SFCs Using Classic PLC-5 Processors
9-1
9 Entering SFCs Using ClassicPLC-5 Processors
Chapter Objectives
This chapter shows you how to create sequential function chart (SFC) structures forClassic PLC-5 processors. This chapter explains the following topics:
· entering steps/transitions and assigning ladder logic· building SFCs
For information on using SFC structures (selection and simultaneous branches,labels and GOTOs), see chapter 12.
For more information on editing existing SFC programs, see chapter 11.
If You Want to: See page:
Enter an SFC 9-2Enter Step/Transition pairs 9-4Build an SFC 9-6Use undefined program files 9-7
PrefaceEntering SFCs Using Classic PLC-5 Processors
9-2
Entering SFCs
You can enter the SFC by following the steps on the left.
START+-+-++=+=+|006|+=+=+|
+-----+--+--+-----+| | | |-+- -+- -+- -+-007 008 009 005| | | |
+-+-+ | | ||002| | | |+-+-+ | | |-+- | | |003 | | || | | |
Press a function key.EDIT 1:(0,0) >Rem Prog PLC-5/25 Ser C Rev A Addr 20 Drill1Sel Brn Sim Brn Append Insert Modify Delete Undel Label Config/ Macro
* * Stp/Trn Stp/Trn Stp/Trn Stp/Trn Stp/Trn /GoTo Build *F1 F2 F3 F4 F5 F6 F7 F8 F9 F10
SFCMain Menu
F10
Press the appropriatefunction key.
Edit
Any SFC logic in anew SFC and editsto existing SFCsdisplay as dashedlines. After youbuild an SFC, thesystemdisplays onlysolid lines.
If You Want to: Press this Key:
Add or modify a selection branch [F1] - Selection BranchAdd or modify a simultaneous branch [F2] - Simultaneous BranchAdd a step/transitionafter the cursor [F3] - Append Step/TransitionAdd a step/transitionbefore the cursor [F4] - Insert Step/TransitionChange program file assigned to the current step or transition [F5] - Modify Step/TransitionDelete the current step/transitionpair [F6] - Delete Step/TransitionUndelete the last deleted step/transitionpair in thisediting session
[F7] - Undelete Step/Transition
Enter a label or GOTO [F8] - Label/GOTOBuild the SFC and save the changes you made (If you areprogramming offline, you must also Save & Continue orconfirm the save when you exit the software)
[F9] - Config/Build
Create or decompress an SFC macro (See chapter 11) [F10] - Macro
Entering SFCs Using Classic PLC-5 Processors
9-3
If you return to the SFC main menu after making changes to the current SFC butbefore you build your edits ([F9] - Config/Build), your edits are not lost. Youcan return to the SFC Edit selections and press [F9]. However, if you completelyexit the SFC editor ([F3] - Exit on the SFC main menu) without building youredits, all your changes are lost. You must use [F9] - Config/Build to saveall edits.
Note If you are programming off line, you must save your edits to the disk file after abuild. Do a Save & Continue on the Program Directory screen (within the SFCeditor) or confirm the save when you leave the SFC editor and exit the ladder editor.
PrefaceEntering SFCs Using Classic PLC-5 Processors
9-4
Entering Step/Transition Pairs
Steps and transitions are entered in pairs. The SFC editor only lets you enter correctstep and transition pairs. See the examples below for samples of correctstep/transition pairs.
Note All transition files must end with a conditioned EOT (End of Transition) instruction.If you do not end with an EOT instruction, the processor automatically evaluates thetransition file as true.
The examples in this chapter show the steps you would perform if your programfiles have already been created. For more information about creating program files,see “Using Undefined Program Files” on page 9-7.
Figure 9.1 shows you how to enter a simple step and transition. To enter these SFCstructures, start on the SFC Edit selections screen. For more complex SFCstructures, see chapter 11.
Figure 9.1Entering a Simple Step/Transition on a Classic PLC-5 Processor
To Get This: Follow this Procedure:
Simple Step/Transition Pair
[F3] - Append Step/Transitionor
[F4] - Insert Step/TransitionMove cursor to step program file you want[F1] - Select StepMove cursor to transition program file you want[F2] - Select Transition[Enter] to return to the SFC Edit selections[F9] - Config/Build[F10] - Build Chart
Entering SFCs Using Classic PLC-5 Processors
9-5
Table 9.A describes the tasks you can perform on the Assigning Ladder Logicscreen (appending or inserting a step/transition).
Table 9.AAvailable Tasks on the Assigning Ladder Logic Screen
If You Want to: Press this Key:
Select the highlighted file number for the current step [F1] - Select StepSelect the highlighted file number for the current transition [F2] - Select TransitionIf you have multiple steps and transitions in the current structure(branch), move the cursor to the next step or transition
[F3] - Next Step/Transition
Delete the cursored program file [F5] - Delete FileCreate a program file [F6] - Create FileChange the name of the highlighted program file [F10] - Change File Name
PrefaceEntering SFCs Using Classic PLC-5 Processors
9-6
Building SFCs
As you enter SFC logic, build the SFC to save the information you enter. To buildan SFC, follow the steps on the left.
+= SFC Build ==================================================================+| F1 Analyze Only F4 * Create Non-existent Files || F2 Create SFC Listing || F3 Create SFC Cross Reference || Phase : Status : || Last Error : NO ERRORS. |+==============================================================================++==+==+-+-010|
+--+--+| |+--+--+-+-050|
+--+--+
Press a function key to perform a build sequence.EDIT 1:(0,0) >Rem Prog Forces:Disabled PLC-5/25 Ser C Rev A File RUNBATCHAnalyze Create Create Create BuildOnly Listing XRef Files ChartF1 F2 F3 F4 F10
SFCMain Menu
F10
Edit
SFCEdit Selections
F9
Config/Build
Press the appropriatefunction key.
Note Release 3.3 incorporated significant changes to the SFC editor. If you build an SFCusing release 3.3 or later of the programming software, you cannot use earlierreleases (releases prior to release 3.3) to edit the SFC.
If You Want to: Press this Key:
Check for proper SFC construction and syntax without storingthe SFC in the processor or in the temporary offline file
[F1] - Analyze Only
Create a printable listing of the SFC [F2] - Create ListingCreate a printable SFC cross reference report [F3] - Create Cross ReferenceCreate an empty program file for every undefined filereferenced in the SFC
[F4] - Create Files
Save the edits you made to the SFC [F10] - Build Chart
You can select options[F1] through [F4] beforeyou press [F10] to buildthe chart.An asterisk next to theoption indicates that itis selected.The software uses theoptions you specify with[F2], [F3], and [F4] tobuild the chart.If you press[F1] - Analyze Only, noedits are saved.
Entering SFCs Using Classic PLC-5 Processors
9-7
Using Undefined Program Files
You can create an SFC without programming the actual logic. This can help youvisualize the overall structure of the SFC before you begin writing programs. Thesystem requires that these files show in the directory in order to reference themwhen you create your SFC.
When entering your SFC, press [F6] - Create File from the Step/TransitionEdit screen; enter the highest numbered file that you think you will need for yourSFC (for example, if you need 20 ladder files, type 20). The software lists all of thefiles up to the number you specified as undefined (i.e., files 3 through 19).
You can specify these files in your SFC as steps and transitions. In order to programlogic, you must change them from undefined files to ladder files.
To automatically change the undefined files used in your SFC as steps or transitionsto ladder files, follow the steps on the left.
Another method to change undefined files to ladder files is to simply monitor them([F8] from the program directory screen).
An asterisk (*) appears next to the Create Non-Existent Files option showing that itis enabled. (Press [F4] again and the asterisk disappears, disabling the option.)
During the build, the system changes all undefined files referenced in the chart toladder files. If you do not use a particular undefined file as a step or transition, thefile remains undefined.
SFCMain Menu
F10
F9
Config/Build
F4
CreateFiles
Edit
F10
Build
(only if youhave changedthis fromthe default)
PrefaceEntering SFCs Using Classic PLC-5 Processors
9-8
Entering SFCs Using Enhanced PLC-5 Processors
10-1
10 Entering SFCs Using EnhancedPLC-5 Processors
Chapter Objectives
This chapter shows you how to create sequential function chart (SFC) structures forEnhanced PLC-5 processors.
If You Want to: See page:
Enter an SFC 10-2Enter a step action or transition 10-4Enter a step action 10-5Enter a transition 10-14Enter comments 10-22Build an SFC 10-24Use undefined program files 10-26
PrefaceEntering SFCs Using Enhanced PLC-5 Processors
10-2
Entering SFCs
To enter an SFC, follow the steps on the left.
START+-+-++=+=+|6|+=+=+|
+-----+--+--+-----+| | | |-+- -+- -+- -+-
7 8 9 5| | | |
+-+-+ | | || 2| | | |+-+-+ | | |-+- | | |
3 | | || | | |
Press a function key.EDIT 1:(0,0) >Rem Prog PLC-5/40 Ser C Rev B 5/40 File Drill1Sel Brn Sim Brn Append Insert Modify Delete Undel Label Config/ Macro
* * Stp/Trn Stp/Trn Stp/Trn Stp/Trn Stp/Trn /GoTo Build *F1 F2 F3 F4 F5 F6 F7 F8 F9 F10
SFCMain Menu
F10
Press the appropriatefunction key.
Edit
Note If you are programming offline, you must save your edits to the disk file after abuild. Do a Save & Continue on the Program Directory screen (within the SFCeditor) or confirm the save when you leave the SFC editor and exit the ladder editor.
Entering SFCs Using Enhanced PLC-5 Processors
10-3
If You Want to: Press this Key:
Add or modify a selection branch [F1] - Selection BranchAdd or modify a simultaneous branch [F2] - Simultaneous BranchAdd a step/transitionafter the cursor [F3] - Append Step/TransitionAdd a step/transitionbefore the cursor [F4] - Insert Step/TransitionChange program file assigned to the current step (action)or transition
[F5] - Modify Step/Transition
Delete the current step/transitionpair [F6] - Delete Step/TransitionUndelete the last deleted step/transitionpair in thisediting session
[F7] - Undelete Step/Transition
Enter a label or GOTO [F8] - Label/GOTOConfigure and build the SFC and save the changes you made(If you are programming offline, you must also Save &Continue or confirm the save when you exit the software)
[F9] - Configure/Build
Create or decompress an SFC macro(See chapter 11)
[F10] - Macro
Any SFC logic in a new SFC, and edits to existing SFCs, display as dashed lines.After you build an SFC, the system displays only solid lines.
If you return to the SFC main menu after making changes to the current SFC butbefore you build your edits ([F9] - SFC Config/Build), your edits are not lost.You can return to the SFC Edit selections and press [F9]. However, if youcompletely exit the SFC editor ([F3] - Exit on the SFC main menu) withoutbuilding your edits, all your changes are lost. You must use [F9] -Config/Build to save all edits.
PrefaceEntering SFCs Using Enhanced PLC-5 Processors
10-4
Entering Step Actions and Transitions
You assign logic to step actions. You can assign up to 8 actions to each step.
Each action can be a single ladder program, SFC, or structured text (ST) file. Eachtransition can be a single ladder program or ST. Structured text is a series ofEnglish-like instructions and mnemonics that represent logic. Structured text is onlyavailable if you are using Enhanced PLC-5 series C revision C or later processorsand if you have purchased the software (9313-ST5). For moreinformation/guidelines on using structured text, see the PLC-5 Structured TextUser Manual.
The following examples show the steps you would perform if your program fileshave already been created. For more information about creating program files, see“Using Undefined Program Files” on page NO TAG.
Note Although the processor and software allow you to assign the same action to morethan one step, we recommend that you do not. If you do assign the same action toseveral steps, unpredictable results could occur if an action is executing and asecond step calls that same action before the first step finishes executing. Theinstructions are not reset each time the action is called.
All transition files must include a conditioned EOT (end of transition) instruction. Ifyou do not include an EOT instruction, the processor automatically evaluates thetransition file as true.
Note To save your SFC edits, follow the steps in Figure 10.1 on page 10-20.
Entering SFCs Using Enhanced PLC-5 Processors
10-5
Entering Step ActionsTo enter step actions, follow the steps on the left.
Step Trans Step Step TransActions Timer Name NameF1 F2 F4 F8 F9
SFCEdit Selections
F10
Edit
SFCMain Menu
F3
AppendStp/Trn
orF4
InsertStp/Trn
Press this key toedit step actions.
START+-----+-----++=====+=====+# MIXER #+=====+=====+
-+-||
+-----+-----+
Press a function key.EDIT 2:(0,0) >Rem Prog SFCFrc:Disabled PLC-5/40 Ser C Rev B 5/40 Addr 43 DRILL1
Cursor anywhere in the ActionDisplay window (except theQualifier field) and then pressa function key to append orinsert an action. (If youhaven’t defined any actionsyet, only [F3] - AppendAction is visible).
+= Action Display for Step: MIXER==============================================+| ActionName QL Action Comment |+------------------------------------------------------------------------------+| ValveChk N 2 (ladder) Check the valve || || || |+==============================================================================+
If you haven’t defined any actions yet, this window displays** NO ACTIONS DEFINED **
+= Action Display for Step: 00012 =============================================+| ActionName QL Action Comment |+------------------------------------------------------------------------------+| ValveChk N 2 (ladder) Check the valve || || || |+==============================================================================+
START+-----+-----++=====+=====+# #+=====+=====+
-+-||
+-----+-----+
Press a function key, a cursor key, or enter the action name.EDIT 2:(0,0) >Rem Prog SFCFrc:Disabled PLC-5/40 Ser C Rev B 5/40 Addr 43 DRILL1Action Append Insert RemoveName Action Action ActionF1 F3 F4 F6
PrefaceEntering SFCs Using Enhanced PLC-5 Processors
10-6
Insert or Append an Action
If You Want to: Press this Key: From the Program File Directory, youcan:
Add an action after the current action(Append an action)
[F3] - Append Action
If you choose this option, the Program FileDirectory screen appears.
·Select an action [F1] - Select Action·Create a ladder program file
[F6] - Create Lad Fl·Create an SFC program file
Add an action before thecurrent action(Insert an action)
[F4] - Insert Action
If you choose this option, the Program FileDirectory screen appears.
·Create an SFC program file[F7] - Create SFC Fl
·Change a file name[F10] - Change Fl.Name
Remove the current action [F6] - Remove Action Remove the current action
+= PROGRAM FILE DIRECTORY FOR PROCESSOR: DEMONP5B ============================+|File Name Type Usage Size (words) ||------------------------------------------------------------------------------|| 19 SimpleCntr ladder action 6 || 20 dwelldone2 ladder condition 4 || 21 ladder unused 1 || 22 CheckState ladder unused 1 |+==============================================================================+
START+-----+-----++=====+=====+# #+=====+=====+
-+-||
+-----+-----+
Select the action to add to this step.EDIT 2:(0,0) >Rem Prog SFCFrc:Disabled PLC-5/40 Ser C Rev B 5/40 Addr 43 DRILL1Select Delete Create Create ChangeAction File Lad Fl SFC Fl Fl.NameF1 F5 F6 F7 F10
Select the action to add to this step using[F1], or press a function key to choose thetype of program file to create. Use thetable below.
SFCEdit Selections
F10
Edit
SFCMain Menu
F3
AppendStp/Trn or
F4
InsertStp/Trn
F1
Step Actions
F3
AppendAction
or F4
InsertAction
If You Want to: Press this Key:
Select an action [F1] - Select ActionDelete a program file [F5] - Delete FileCreate a ladder program file [F6] - Create Lad FlCreate an SFC program file [F7] - Create SFC FlChange the file name [F10] - Change Fl Name
Entering SFCs Using Enhanced PLC-5 Processors
10-7
Specify a Name for the Current Action
Specify an action name using the function keys or by entering the name on thecommand line. Follow the steps on the left.
+= Action Display for Step: 00012 =============================================+| ActionName QL Action Comment |+------------------------------------------------------------------------------+| ValveChk N 2 (ladder) Check the valve || || || |+==============================================================================+
START+-----+-----++=====+=====+# #+=====+=====+
-+-||
+-----+-----+
Press a function key, a cursor key, or enter the action name.EDIT 2:(0,0) >Rem Prog SFCFrc:Disabled PLC-5/40 Ser C Rev B 5/40 Addr 43 DRILL1Action Append Insert RemoveName Action Action ActionF1 F3 F4 F6
Cursor to Action Name fieldand then press this key to enteran action name or enter thename on the command line.
An action name can be up to 10 characters long,consisting of the following characters:A-Z, 0-9, and underscore (_). Names arecase sensitive.
SFCEdit Selections
F10
Edit
SFCMain Menu
F3
AppendStp/Trn
orF4
InsertStp/Trn
F1
Step Actions
F3
AppendAction
orF4
InsertAction
select action (using [F1] key)to add to step or create aprogram file
PrefaceEntering SFCs Using Enhanced PLC-5 Processors
10-8
Specify a Qualifier for the Current Action
Specify an action qualifier using the function keys or by entering the qualifier on thecommand line. Follow the steps on the left.
+= Action Display for Step: 00012 =============================================+| ActionName QL Action Comment |+------------------------------------------------------------------------------+| ValveChk N 2 (ladder) Check the valve || || || |+==============================================================================+
START+-----+-----++=====+=====+# #+=====+=====+
-+-||
+-----+-----+
Press a function key, a cursor key, or enter the action qualifier.EDIT 2:(0,0) >Rem Prog SFCFrc:Disabled PLC-5/40 Ser C Rev B 5/40 Addr 43 DRILL1Non Sto Set/Sto Reset TimeLim TimeDel RisPlus FalPuls StoLim StoDel DelSto(N) (S) (R) (L) (D) (P1) (P0) (SL) (SD) (DS)F1 F2 F3 F4 F5 F6 F7 F8 F9 F10
Cursor to Qualifier field and then press the function keyto enter the appropriate qualifier or enter the qualifier onthe command line. (See the table on the next page.)
SFCEdit Selections
F10
Edit
SFCMain Menu
F3
AppendStp/Trn
orF4
InsertStp/Trn
F1
Step Actions
F3
AppendAction
orF4
InsertAction
select action (using [F1] key)to add to step or create aprogram file
Entering SFCs Using Enhanced PLC-5 Processors
10-9
If You Want the Action to: Use thisQualifier:
Press this Key:
Terminate when the step becomes inactive (N is the default qualifier.) N [F1] - Non-storedContinue after the step is deactivated, until the action is reset S [F2] - Set/StoredTerminate the execution of an action previously started with the S, SD, SL orDS qualifier
R [F3] - Reset
Start when the step becomes active and continue until the step goes inactive or a settime elapses
L* [F4] - Time Limited
Start a delay timer when the step becomes active - after the time delay the actionstarts (if step still active) and continues until deactivated
D * [F5] - Time Delay
Start when the step becomes active and execute the action only once P1 [F6] - Rising Edge PulseStart when the step deactivates and execute the action only once P0 [F7] - Falling Edge PulseStart when the step becomes active and continue for a set time or until the action isreset (regardless of step activation/deactivation)
SL 1 [F8] - Stored andTime Limited
Start a delay timer when the step becomes active - after the time delay, the actionstarts and continues until reset (regardless of step activation/deactivation)
SD 1 [F9] - Stored andTime Delayed
Start a delay timer when the step becomes active - after the time delay the actionstarts (if step still active) and continues until reset
DS 1 [F10] - Delayedand Stored
1 This qualifier requires a timer control structure with a time base of 0.01 or 1 (seconds).
Enter the Action TimerIf you enter a timer-based qualifier for an action, an action timer field appears belowthe action in the Action Display window. This field displays the message Noaction timer defined if you have not defined the timer yet. Specify an actiontimer using the function keys or by entering the action timer on the command line.Follow the steps on the next page:
PrefaceEntering SFCs Using Enhanced PLC-5 Processors
10-10
+= Action Display for Step: 00012 =============================================+| ActionName QL Action Comment |+------------------------------------------------------------------------------+| ValveChk L 2 (ladder) Check the valve || No action timer defined || || |+==============================================================================+
START+-----+-----++=====+=====+# #+=====+=====+
-+-||
+-----+-----+
Press a function key, a cursor key, or enter action timer number and preset.EDIT 2:(0,0) >Rem Prog SFCFrc:Disabled PLC-5/40 Ser C Rev B 5/40 Addr 43 DRILL1Timer Timer Append Insert Remove
Number Preset Action Action ActionF1 F2 F3 F4 F6
+= Action Display for Step: 00012 =============================================+| ActionName QL Action Comment |+------------------------------------------------------------------------------+| ValveChk L 2 (ladder) Check the valve || No action timer defined || || |+==============================================================================+
START+-----+-----++=====+=====+# #+=====+=====+
-+-||
+-----+-----+
Press a function key, a cursor key, or enter the action qualifier.EDIT 2:(0,0) >Rem Prog SFCFrc:Disabled PLC-5/40 Ser C Rev B 5/40 Addr 43 DRILL1Non Sto Set/Sto Reset TimeLim TimeDel RisPlus FalPuls StoLim StoDel DelSto(N) (S) (R) (L) (D) (P1) (P0) (SL) (SD) (DS)F1 F2 F3 F4 F5 F6 F7 F8 F9 F10
SFCEdit Selections
F10
Edit
SFCMain Menu
F3
AppendStp/Trn
orF4
InsertStp/Trn
F1
Step Actions
F3
AppendAction or
F4
InsertAction
select action to add tostep (using [F1] key) orcreate a program file
cursor to qualifier fieldand enter a timer-based qualifier (actiontimer field appears)
Cursor to Action Timer fieldand then press the functionkeys to enter the timerinformation or enter theinformation on the commandline. See the table on thenext page.
If you enter theaction timer from thecommand line, usethe format TF:E = P [F2] doesn’t appear
until the timer is defined.
Entering SFCs Using Enhanced PLC-5 Processors
10-11
This Field: Contains this Information:
Timer Number (E) A timer element number (0-999).Timer Preset (P) A timer preset value, (.01 seconds - 32767 seconds)
displayed in seconds. You decide the precision of the timerby what you enter. If you want greater precision, enter apreset using a decimal point. For example, if you enter 10,the software saves a preset of 10 and a timebase of 1second. If you enter 10. or 10.0 the software saves apreset of 1000 and a timebase of 10 ms. 327.67 is themaximum value allowed for a 10 ms based preset.
Timer File Number (F) A timer file number (3-999).
PrefaceEntering SFCs Using Enhanced PLC-5 Processors
10-12
Enter Structured Text for the Current Action
An action can be ladder logic, an SFC, or structured text. To enter ladder logic or anSFC, use the appropriate editor for each file specified as an action. If the action isstructured text, you can enter 1 line (the first line) of structured text code from thecommand line. You have access to the entire structured text file through the[F2] - Edit Text key. To enter the text for an action, follow the steps onthe left.
SFCEdit Selections
F10
Edit
SFCMain Menu
F3
AppendStp/Trn
orF4
InsertStp/Trn
F1
Step Actions
F3
AppendAction
orF4
InsertAction
select action to add tostep (using [F1] key) orcreate a program file
Cursor to the Action field and press this key to edita structured text action.
+= Action Display for Step: 00012 =============================================+| ActionName QL Action Comment |+------------------------------------------------------------------------------+| ValveChk N N7:0 = N7:0+1 Check the valve || || || |+==============================================================================+
START+-----+-----++=====+=====+# #+=====+=====+
-+-||
+-----+-----+
Press a function key, a cursor key, or enter the action name.EDIT 2:(0,0) >Rem Prog SFCFrc:Disabled PLC-5/40 Ser C Rev C 5/40 Addr 43 DRILL1Select Edit Append Insert RemoveFile Text Action Action ActionF1 F2 F3 F4 F6
Entering SFCs Using Enhanced PLC-5 Processors
10-13
Enter a Comment for the Current Action
Specify an action comment using the function keys or by entering the comment onthe command line. Only the first line of the comment can be entered on thecommand line. Follow the steps on the left.
+= Action Display for Step: 00012 =============================================+| ActionName QL Action Comment |+-------------------------------------------------------------------------------+| ValveChk L 5 (structured text) Check the valve || No action timer defined || || |+==============================================================================+
START+-----+-----++=====+=====+# #+=====+=====+
-+-||
+-----+-----+
Press a function key, a cursor key, or enter the action comment.EDIT 2:(0,0) >Rem Prog SFCFrc:Disabled PLC-5/40 Ser C Rev C 5/40 Addr 43 DRILL1Edit Append Insert Remove
Comment Action Action ActionF1 F3 F4 F6
Using the editing function keys displayed across the bottom ofthe screen, you can enter/modify the comment for this action.The comment can be up to 80 characters wide by 65535 (thetotal number of lines used for all SFC and rung comments in thedatabase) characters/lines long. See chapter 17 for informationabout the text editor.
Cursor to Action Comment field andthen press this key to enter a comment.
SFCEdit Selections
F10
Edit
SFCMain Menu
F3
AppendStep/Trn
orF4
InsertStep/Trn
F1
Step Actions
F3
AppendAction
orF4
InsertAction
select action to add tostep (using [F1] key) orcreate a program file
PrefaceEntering SFCs Using Enhanced PLC-5 Processors
10-14
Entering Transitions
To enter transitions, follow the steps on the left.
Step Trans Step Delete Step TransActions * Timer File Name NameF1 F2 F4 F5 F8 F9
SFCEdit Selections
F10
Edit
SFCMain Menu
F3
AppendStep/Trn
orF4
InsertStep/Trn
-+-010|
+--+--+| |+--+--+-+-050|
+--+--+
Press a function key.EDIT 1:(0,0) >Rem Prog SFCrc:Disabled PLC-5/40 Ser C Rev B 5/40 File DRILL1
Press this key to enter a transition.There is only one condition per transition.
+= Action Display for Step: 00012 =============================================+| ActionName QL Action Comment |+------------------------------------------------------------------------------+| ValveChk N 17 (ladder) Check the valve || || || |+==============================================================================+
If you haven’t defined any conditions yet, this window says** NO CONDITIONS DEFINED **
Entering SFCs Using Enhanced PLC-5 Processors
10-15
Press a function key, a cursor key, or enter the condition name.EDIT 4:(0,0) >Rem Prog SFCrc:Disabled PLC-5/40 Ser C Rev B 5/40 File DRILL1Cond Replace RemoveName Cond CondF1 F3 F6
Cursor anywhere in theCondition Displaywindow and then press afunction key to enter acondition. (If you haven’tdefined a condition yet,only
+= Transition: 00002 ==========================================================+| Cond Name Condition Comment |+------------------------------------------------------------------------------+| Cond_1 3 (ladder) || || || |+==============================================================================+
START+-----+-----++=====+=====+# #+=====+=====+
-+- 3||
+-----+-----+
F3
Add Cond is visible.)
If You Want to: Press this Key:
Enter a name for the condition [F1] - Cond NameReplace current condition with a newcondition from the program file directory.
[F3] - Replace/Add Condition(If a condition is assigned to the transition, [F3] islabelled Replace Cond; If no condition is assignedto the transition, [F3] is labelled Add Cond)
Place the cursor on the condition you want to copyand press [F1] - Select Condition.
Remove the current condition [F6] - Remove Condition
PrefaceEntering SFCs Using Enhanced PLC-5 Processors
10-16
+= PROGRAM FILE DIRECTORY FOR PROCESSOR: DRILL1== ============================+|File Name Type Usage Size (words) ||------------------------------------------------------------------------------|| 2 ValveChk structured text action 58 || 3 Dummy ladder action 1 || 4 SimpleCntr ladder action 6 || 5 VlvChkDone structured text condition 4 |+==============================================================================+
START+-----+-----++=====+=====+# #+=====+=====+
-+-||
+-----+-----+
Select the condition to add to this transition.EDIT 2:(0,0) >Rem Prog SFCFrc:Disabled PLC-5/40 Ser C Rev C 5/40 Addr 43 DRILL1Select Delete Create Create ChangeCond File Lad Fl Stxt Fl Fl.NameF1 F5 F6 F8 F10
Select the condition to add tothis transition using
SFCEdit Selections
F10
Edit
SFCMain Menu
F3
AppendStep/Trn
orF4
InsertStep/Trn
F2
Trans
F3
AddCond
orF3
ReplaceCond F1
SelectCond
or press a function key tochoose the type of program fileto create. Use the table below.
If You Want to: Press this Key:
Select a condition [F1] - Select CondDelete a program file [F5] - Delete FileCreate a ladder program file [F6] - Create Lad FlCreate a structured text program file [F8] - Create STxt FlChange the file name [F10] - Change Fl Name
Entering SFCs Using Enhanced PLC-5 Processors
10-17
Specify a Name for the Current Condition
Specify a condition name using the function keys or by entering the name on thecommand line. Follow the steps on the left.
A condition name can be up to 10 characterslong, consisting of the following characters:
Press a function key, a cursor key, or enter the condition name.EDIT 4:(0,0) >Rem Prog SFCrc:Disabled PLC-5/40 Ser C Rev B 5/40 File DRILL1Cond Replace RemoveName Cond CondF1 F3 F6
+= Transition: 00002 ==========================================================+| Cond Name Condition Comment |+------------------------------------------------------------------------------+| Cond_1 3 (ladder) Check the valve || || || |+==============================================================================+
START+-----+-----++=====+=====+# #+=====+=====+
-+- 3||
+-----+-----+
SFCEdit Selections
F10
Edit
SFCMain Menu
F3
AppendStep/Trn
orF4
InsertStep/Trn
F2
Trans
F3
AddCond
orF3
ReplaceCond
Cursor to Cond Name field and then press this key to entera condition name or enter the name on the command line.
A-Z0-9, and underscore (_).Names are case sensitive.
select condition to add totransition (using [F1] key) orcreate a program file
PrefaceEntering SFCs Using Enhanced PLC-5 Processors
10-18
Enter the Logic for the Current Condition
Conditions can be ladder logic or structured text. To enter ladder logic, use theLadder Editor. To enter structured text, see the PLC-5 Structured Text User manual.To enter the logic for a condition, follow the steps on the left.
+= Transition: 00013 ==========================================================+| Cond Name Condition Comment |+------------------------------------------------------------------------------+| VlvChkDone T4:0.DN EOT (); || || || |+==============================================================================+
START+-----+-----++=====+=====+# #+=====+=====+
-+- 20||
+-----+-----+
Press a function key, a cursor key, or enter the condition text.EDIT 2:(0,0) >Rem Prog SFCFrc:Disabled PLC-5/40 Ser C Rev C 5/40 Addr 43 DRILL1
Edit Replace RemoveText Cond CondF2 F3 F6
Cursor to Condition text field and then pressthis key to edit the text for the condition.
SFCEdit Selections
F10
Edit
SFCMain Menu
F3
AppendStep/Trn
orF4
InsertStep/Trn
F2
Trans
F3
AddCond
orF3
ReplaceCond
select condition toadd to transition orcreate a program file
Entering SFCs Using Enhanced PLC-5 Processors
10-19
Enter a Comment for the Current Condition
Specify a condition comment using the function keys or by entering the comment onthe command line. Follow the steps on the left.
Using the editing function keys displayed across the bottom of the screen, youcan enter/modify the comment for this condition. The comment can consist ofany printable characters and can be up to 64K lines long and 80 characters wide.
+= Transition: 00002 ==========================================================+| Cond Name Condition Comment |+------------------------------------------------------------------------------+| Cond_1 3 (ladder) Check the valve || || || |+==============================================================================+
START+-----+-----++=====+=====+# #+=====+=====+
-+- 3||
+-----+-----+
Press a function key, a cursor key, or enter the action comment.EDIT 4:(0,0) >Rem Prog SFCrc:Disabled PLC-5/40 Ser C Rev B 5/40 File RUNBATCH
Edit Replace RemoveComment Cond CondF1 F3 F6
SFCEdit Selections
F10
Edit
SFCMain Menu
F3
AppendStep/Trn
orF4
InsertStep/Trn
F2
Trans
F3
AddCond
orF3
ReplaceCond
select condition to add totransition (using [F1] key) orcreate a program file
Cursor to Condition Comment field andthen press this key to enter a comment.
PrefaceEntering SFCs Using Enhanced PLC-5 Processors
10-20
Figure 10.1 shows you an example of how to enter a step with one action anda transition.
Figure 10.1Entering a Step and Transition (with Step Actions)
To Get This: Follow this Procedure:
Simple Step/Transition Pairwith 1 action defined
[F3] - Append Step/Transitionor
[F4] - Insert Step/Transition[F1] - Step Actions[F3] - Append Action[F1] - Select Action[F1] - Action NameEnter a name for the action[Esc] to return to the Step Actions screenMove cursor to Qualifier field[F1] - N (to terminate action when step inactive)[Esc] to return to the Step/Transition Edit screen[F2] - Transition[F3] - Add Cond[F1] - Select Cond[F1] - Condition NameEnter a name for the condition[Esc] to return to the Condition screen[Enter] to return to the SFC Edit selections[F9] - Config/Build[F10] - Build Chart
Entering SFCs Using Enhanced PLC-5 Processors
10-21
Assigning Step and Transition Names
You can assign unique names to steps and transitions. If the cursor is on a step, thestep name key appears; if the cursor is on a transition, the transition name keyappears; if the cursor is on a step/transition pair, both keys appear.
To assign a name to a step or a transition, follow the steps on the left.
Step Trans Step Step TransActions * Timer Name Name
F1 F2 F4 F8 F9
Valid step and transition names are 1-20 characters:A-Z0-9underscore (_)period (.)pound sign (#)
SFCEdit Selections
F10
Edit
SFCMain Menu
F3
AppendStep/Trn
orF4
InsertStep/Trn
Cursor to a step or transition, then press a function keyto name the step or transition.
The name appears on the chart in expanded display mode,in the database summary, and on the SFC Listing report
Rem Prog SFCrc:Disabled PLC-5/40 Ser C Rev B 5/40 File RUNBATCH
-+-010|
+--+--+| |+--+--+-+-050|
+--+--+Press a function key.Edit 1:(0,0) >
+= Action Display for Step: 00012 =============================================+| ActionName QL Action Comment |+------------------------------------------------------------------------------+| ValveChk N 2 (ladder) Check the valve || || || |+==============================================================================+
orF5
ModifyStep/Trn
PrefaceEntering SFCs Using Enhanced PLC-5 Processors
10-22
Entering Comments
You can assign comments to steps, transitions and macros (for more information onmacros, see the next chapter). Step/transition comments can consist of any printablecharacters and can be 80 characters wide and total up to 64K lines long; the SFCcomments are independent of the ladder file comments.
You can also search for SFC comments and edit SFC comments after youcreate them.
Note The SFC comments you enter are stored in the programming terminal, not theprocessor. If you create comments on one terminal, only that terminal can display oredit the comments unless the comments and symbols database is copied toanother terminal.
For comments you enter to appear on the screen, you must set the SFC windowdisplay mode configuration to show comments. See “Configuring the SFC Display”in chapter 8.
To enter an SFC comment, follow the steps on the left.
You do not have to re-build thechart in order to save commentchanges, but you must savethe changes to the database(Save & Continue).
== Comment Display For SFC: Main_SFC ===========================================This step has the following actions:clamp_ondrill_advdrill_on
== Search For: =================================================================-+-010|
+--+--+| |+--+--+-+-050|
+--+--+
Press a function key.MONITOR 4:(0,0) >
Search Search Modify EditText No Cmt Name CommentF6 F7 F8 F10
Press this key to enter the comment or use [Alt-T].
When you have finished editing your comment, press F8
Accept/Exit
Rem Prog SFCrc:Disabled PLC-5/40 Ser C Rev B 5/40 File RUNBATCH
F7
General Utility
SFCMain Menu
F1
SFC Comment
Entering SFCs Using Enhanced PLC-5 Processors
10-23
The system displays the comment window at the top of the screen. If a commentexists for the currently highlighted step/transition or macro, it is shown in thiswindow; if no comment exists, the window is blank.
Using the cursor keys you can move to any step/transition or macro and see thecomment associated with it.
If You Want to: Press this Key:
Search for a string of text Type the text on the input line andpress [F6] - Search Text
Search for the next step, transition or macro thatdoes not have a comment
[F7] - Search No Comment
Add or edit a name for a step, transition or macro [F8] - Modify NameEdit an existing comment or create a new comment [F10] - Edit Comment
PrefaceEntering SFCs Using Enhanced PLC-5 Processors
10-24
Building SFCs
As you enter SFC logic, build the SFC to save the information you enter. To buildan SFC, follow the steps on the left.
Dashed lines mean that the chart isnot “built”yet.
START+-+-++=+=+|006|+=+=+|
+-----+--+--+-----+| | | |-+- -+- -+- -+-007 008 009 005| | | |
+-+-+ | | ||002| | | |+-+-+ | | |-+- | | |003 | | || | | |
Press a function key.EDIT 1:(0,0) >Rem Prog SFCrc:Disabled PLC-5/40 Ser C Rev B 5/40 File RUNBATCHSel Brn Sim Brn Append Insert Modify Delete Undel Label Config/ Macro
* * Stp/Trn Stp/Trn Stp/Trn Stp/Trn Stp/Trn /GoTo Build *F1 F2 F3 F4 F5 F6 F7 F8 F9 F10
SFCMain Menu
F10
Press this key to configure and build the SFC.
Edit
F9
Config/Bld
Any SFC logic in a new SFC and edits to existing SFCs display as dashed lines. After you build an SFC, thesystemdisplays only solid lines.
If you return to the SFC main menu after making changes to the current SFC but before you build your edits([F9] - SFC Config/Build), your edits are not lost. You can return to the SFC Edit selections and press [F9].However, if you completely exit the SFC editor ([F3] - Exit on the SFC main menu) without building your edits,all your changes are lost. You must use [F9] - Config/Build to save all changes.
Entering SFCs Using Enhanced PLC-5 Processors
10-25
Press a function key to perform a build sequence.EDIT 4:(0,0) >
Analyze Create Create Create Config BuildOnly Listing XRef Files SFC ChartF1 F2 F3 F4 F6 F10
You can select options [F1]through [F4] before you press[F10] to build the chart. Anasterisk next to the optionindicates that it is selected.
The software uses the optionsyou specify with [F2], [F3], and[F4] to build the chart. If youselect [F1] - Analyze Only, noedits are saved.
+= SFC Build ===== =============================================================+
+= SFC File Assignments: Status: SC14 Timer: T4 ===================+
F1 Analyze Only F4 * Create Non-existent Files
F2 Create SFC Listing
F3 Create SFC Cross-Reference F6 SFC ConfigurationStatus:
Last Error: NO ERRORS.
-+-090|
+--+--+
|Mixer|+--+--+-+-005|
+--+--+
Press the appropriatefunction key.
Rem Prog SFCrc:Disabled PLC-5/40 Ser C Rev B 5/40 File RUNBATCH
Note Release 3.3 incorporated significant changes to the SFC editor. If you build an SFCusing release 3.3 or later of the programming software, you cannot use earlierreleases (releases prior to release 3.3) to edit the SFC.
If You Want to: Press this Key:
Check for proper SFC construction and syntax without storingthe SFC in the processor or in the temporary offline file.
[F1] - Analyze Only
Create a printable listing of the SFC. [F2] - Create ListingCreate a printable SFC cross reference report. [F3] - Create Cross ReferenceCreate an empty program file for every undefined filereference in the SFC.
[F4] - Create Files
Specify configuration information (post scan/last scan, statusfile, etc.). For more information, see the section “Using SFCStep Timer and Configuration Information”in chapter 12.
[F6] - SFC Configuration
Save the edits you made to the SFC. [F10] - Build Chart
Note This configuration is saved for the current editing session only. When you leave theSFC Editor, all configuration/build options return to their defaults.
PrefaceEntering SFCs Using Enhanced PLC-5 Processors
10-26
Using Undefined Program Files
You can create an SFC without programming the actual logic. This can help youvisualize the overall structure of the SFC before you begin writing programs. Thesystem requires that these files show in the directory in order to reference themwhen you create your SFC.
When entering your SFC, press [F6] - Create Program File from theProgram Directory screen; enter the highest numbered file that you think you willneed for your SFC (for example, if you need 20 ladder files, type 20). The softwarelists all of the files up to the number you specified as undefined (i.e., files 3through 19).
You can specify these files in your SFC as steps and transitions. In order to programlogic, you must change them from undefined files to ladder files.
To automatically change the undefined files used in your SFC as steps or transitionsto ladder files, follow the steps on the left.
Another method to change undefined files to ladder files is to simply monitor them([F8] from the program directory screen).
An asterisk (*) appears next to the Create Non-Existent Files option showing that itis enabled. (Press [F4] again and the asterisk disappears, disabling the option.)
During the build, the system changes all undefined files referenced in the chart toladder files. If you do not use a particular undefined file as a step or transition, thefile remains undefined.
SFCMain Menu
F10
F9
Config/Build
F4
CreateFiles
Edit
F10
Build
(only if youhavechangedthis fromthe default)
Entering SFC Structures
11-1
11 Entering SFC Structures
Chapter Objectives
This chapter shows you how to create sequential function chart (SFC) structures.
If You Want to: See page:
Create selection and simultaneous branches 11-2Use GOTO and Labels 11-9Create an SFC macro 11-12Use an SFC as a subchart 11-15Use the SFR instruction 11-18
PrefaceEntering SFC Structures
11-2
Creating Selection and Simultaneous Branches
To create branches, follow the steps to the left and on the following page:
START+-+-++=+=+|006|+=+=+|
+-----+--+--+-----+| | | |-+- -+- -+- -+-007 008 009 005| | | |
+-+-+ | | ||002| | | |+-+-+ | | |-+- | | |003 | | || | | |
Press a function key.EDIT 1:(0,0) >Rem Prog SFCFrc:Disabled PLC-5/40 Ser C Rev A 5/40 File MIXERSel Brn Sim Brn Append Insert Modify Delete Undel Label Config/ Macro
* * Stp/Trn Stp/Trn Stp/Trn Stp/Trn Stp/Trn /GoTo Build *F1 F2 F3 F4 F5 F6 F7 F8 F9 F10
SFCMain Menu
F10
Press the appropriatefunction key for thetype of branch youwant to create.
Edit
Entering SFC Structures
11-3
+-+-+ | | |-+- | | |003 | | || | | || | | |+-----+--+--+-----+
|+-+-+| |+-+-+-+-011||
+=====+=====+| | |
+-+-+ +-+-+ +-+-+|010| |012| |013|
Press a key to perform selection branch editing.EDIT 4:(0,0) >Rem Prog SFCFrc: Disabled PLC-5/40 Ser A Rev A 5/40 File Drill1Extend Extend Append Insert Modify Delete UndelLeft Right Stp/TrnF1 F2 F3 F4 F5 F6 F7
type the number, as displayed on the screen andpress [Enter]
use [up arrow] or [down arrow] to move thecursor to the termination point you want andpress [Enter]
press [Home] to select the first termination pointand press [Enter]
press [End] to select the last termination pointand press [Enter]
Press [F3] or [F4] toappend or insert thebranch, then selecta termination pointfor the branchstructure by doingone of the following:
1
2
3 Press this key to assign the program logic.
4Press F3
Next/Step/Transto move to the nextstep/transitionstructurein the branch.
5 Assign program files to the undefined structures.
6 Press Return
until you return to SFC EditSelections
or
or
or
Press [F1] or [F2] to specify the directionin which to extend the branch.
If You Want to: Press this Key:
Extend an existing branch to the left [F1] - Extend LeftExtend an existing branch to the right [F2] - Extend RightAdd a new branch after the cursor [F3] - AppendAdd a new branch before the cursor [F4] - InsertChange the program file that is assigned to the currentstep/transitionor action
[F5] - Modify Step/Transition
Delete the current branch [F6] - DeleteReplace the last deleted branch in this editing session [F7] - Undelete
PrefaceEntering SFC Structures
11-4
If a branch contains 3 or more paths, you can delete an individual path. If you try todelete one path on a two-path branch, the software deletes the entirebranch structure.
You can also nest selection and simultaneous branches. The software supports asmany levels of nested branches as you can store based on processor memory.
See the following figures for examples on how to enter selection and simultaneousbranches based on the processor you are using:
If You are Using This Processor: For this Structure: See: On Page:
Enhanced PLC-5 selection branch Figure 11.1 11-5
simultaneous branch Figure 11.2 11-6
Classic PLC-5 selection branch Figure 11.3 11-7
simultaneous branch Figure 11.4 11-8
Entering SFC Structures
11-5
Figure 11.1Entering a Selection Branch Step/Transitionon an Enhanced PLC-5 Processor
To Get this: Follow this Procedure:
One Step/
T01 T02 T07
T08 T09 T14
STEP01 STEP02 STEP07
TransitionPair
One Step/TransitionPair
[F1] - Selection Branch[F3] - Append or [F4] - InsertType branch termination point (type largest number toappend branch at end of current structure)[Enter]Move cursor to leg on branch[F1] - Extend Left or [F2] - Extend Rightfor all legs of branchMove cursor to step preceding branch[F5] - Modify Step/Transition[F1] - Step Actions[F3] - Append ActionMove cursor to the file you want[F1] - Select Actioncursor to Action Name field[F1] - Action Namecursor to Action Qualifier field[F1] - N (to terminate action when step inactive)[Esc][F3] - Next Step/Trn[F2] - Trans[F3] - Add CondMove cursor to file you want[F1] - Select Cond[Esc][F3] - Next Step/Trndefine remaining transitions[Enter] to return to Selected Branch selection[Enter] to return to SFC Edit selections
PrefaceEntering SFC Structures
11-6
Figure 11.2Entering a Simultaneous Branch Step/Transitionon an Enhanced PLC-5 Processor
To Get this: Follow this Procedure:
One Step/
T01
T02
STEP01 STEP02
TransitionPair
One Step/TransitionPair
STEP07
[F2] - Simultaneous Branch[F3] - AppendType branch termination point[Enter][F1] - Extend Left or [F2] - Extend Right for all legs ofbranch. Move cursor to step on left-mostbranch[F5] - Modify Step/Transition[F1] - Step Actions[F3] - Append ActionMove cursor to the file you want[F1] - Select Actioncursor to Action Name field[F1] - Action Namecursor to Action Qualifier field[F1] - N (to terminate when step inactive)[Esc][F3] - Next Step/Transition[F2] - Trans[F3] - Add Cond[F1] - Select Cond[Esc][Enter] to return to the Simultaneous Branch Selections[Enter] to return to the SFC Edit Selections[F9] - Config/Bld[F10] - Build Chart
Entering SFC Structures
11-7
Figure 11.3Entering a Selection Branch Step/Transitionon a Classic PLC-5 Processor
To Get this: Follow this Procedure:
One Step/
T01 T02 T07
T08 T09 T14
STEP01 STEP02 STEP07
TransitionPair
One Step/TransitionPair
[F1] - Selection Branch[F3] - Append or [F4] - InsertType branch termination point (type largest
number to append branch at end ofcurrent structure)
[Enter]Move cursor to leg on branch[F1] - Extend Left or [F2] - Extend Right
for all legs of branchMove cursor to step preceding branch[F5] - Modify Step/TransitionMove cursor to step program file you want[F1] - Select Step[F3] - Next Step/TransitionMove cursor to transition program file you want[F2] - Select Transition[F3] - Next Step/TransitionDefine remaining transitions[Enter] to return to Selected Branch selections[Enter] to return to SFC Edit selectionsMove cursor to below transition on any branch[F4] - Insert Step/TransitionDefine step and transition program filesAdd step/transitions to remaining paths in branch[Enter] to return to SFC Edit selections[F9] - SFC Config/Build[F10] - Build Chart
PrefaceEntering SFC Structures
11-8
Figure 11.4Entering a Simultaneous Branch Step/Transitionon a Classic PLC-5 Processor
To Get this: Follow this Procedure:
One Step/
T01
T02
STEP01 STEP02 STEP07
TransitionPair
One Step/TransitionPair
[F2] - Simultaneous Branch[F3] - AppendType branch termination point[Enter][F1] - Extend Left or [F2] - Extend Right
for all legs of branchMove cursor to step on left-mostbranch[F5] - Modify Step/TransitionMove cursor to step program file you want[F1] - Select Step[F3] - Next Step/TransitionDefine remaining step files[F3] - Next Step/Transition so cursor is on
the transitionMove cursor to transition program file you want[F2] - Select Transition[Enter] to return to Simultaneous Branch selections[Enter] to return to SFC Edit selections[F9] - SFC Config/Build[F10] - Build Chart
Entering SFC Structures
11-9
Using GOTO Statements and Labels
GOTO statements let you jump within your program, selectively skipping portionsof logic, and resume execution at a given point. The specified point is identified by alabel. For example, you might GOTO a label when an error condition occurs.
To enter a GOTO statement and its label, follow the steps on the left.
+-+-+ | | |-+- | | |003 | | || | | || | | |+-----+--+--+-----+
|+-+-+| |+-+-+-+-011||
+=====+=====+| | |
+-+-+ +-+-+ +-+-+|010| |012| |013|
Press a key to perform label editing.EDIT 4:(0,0) >Rem Prog Forces: Disabled PLC-5/40 Ser A Rev A File Drill1
Append Insert Modify Delete Undel
F3 F4 F5 F6 F7
SFCMain Menu
F10
Edit
SFC EditSelections
F8
Label/Goto
Press the functionkey for the task youwant to perform.
For every GOTO you enter, you must enter a corresponding label (more than oneGOTO can reference the same label). Therefore, if you previously entered a GOTO,you cannot leave the menu unless a label exists for that GOTO.
If You Want to: Press this Key:
Add a label or GOTO below the current step/transition [F3] - AppendAdd a label or GOTO above the current step/transition [F4] - InsertChange the current label or GOTO [F5] - ModifyDelete the current label or GOTO [F6]- DeleteReplace the last deleted label or GOTO in this editing session [F7] - Undelete
PrefaceEntering SFC Structures
11-10
Placing Labels
You can place a label before a step or before a simultaneous branch. For example:
Before a Step: Before a Simultaneous Branch:
008: 009:
Placing GOTO Statements
You can place a GOTO at the end of a program or at the end of a path in a selectionbranch. For example:
At the End of a Program: At the End of a Path in a Selection Branch:
047
EOP
GOTO003:
GOTO108077 128
/ /
003:
Entering SFC Structures
11-11
Rules for GOTO Statements and Labels
The following rules apply to using GOTO statements and labels:
· You can use up to 250 labels in an SFC. Valid numbers for labels are 1 to 250.· Within a simultaneous branch that has an embedded selection branch, you can
GOTO any label in the same simultaneous path. You cannot GOTO a label in aparallel (simultaneous) branch.
· You cannot place a label between a step and a transition.· Each label number must be unique in the SFC; you cannot use the same label
number more than once. You can reference the same label multiple times.· Every GOTO must refer to a label. Any number of GOTO statements can
reference the same label.Note The best procedure for entering labels and GOTO statements is to enter your entire
SFC structure first. Then go back and insert labels and GOTO statementswhere needed.
If you try to build a chart with a GOTO statement that does not have a label, thesoftware ends the build procedure and displays an error message.
To Get this: Follow this Procedure:
One Step/
T02
STEP01
STEP02
TransitionPair
One Step/TransitionPair
GO TO003:
003:
T03
T04
Move cursor to below transition on right-most branch[F8] - Label/GOTO[F4] - InsertType label number for GOTO statement [Enter]Move cursor to above step preceding selection branch[F3] - AppendType label number [Enter][Esc] to return to SFC Edit selections[F9] - SFC Config/Bld[F10] - Build Chart
PrefaceEntering SFC Structures
11-12
Creating SFC Macros(Enhanced PLC-5 Processors Only)
You can use compressed SFCs within your overall SFC to help organize majorsections of your application. These compressed SFCs are called macros.
You can start a macro on any step, except the bottom-most step of a legin a simultaneous branch. For example, you can start a macro on a step ofa step/transition pair, before a selection branch, or at the start of asimultaneous branch.
You can end a macro on anything that precedes a transition. For example,end a macro on a step, a step before a selection branch, or at the end of asimultaneous branch.
The system automatically numbers each macro consecutively from 1 to 99. If youcreate or delete a macro, the system automatically renumbers all macros in themain SFC.
Note You cannot nest macros. Also, a macro cannot extend beyond a branch boundary(i.e., if you start a macro inside a branch, the macro must end within the branch).
To create a macro, follow the steps on the left.
+-+-+ +-+-+ +-+-+| | |+=====+=====+
|-+-011|
+-+-+| |+-+-+-+-011||
003:|
+-+-+| |
Press a function key.EDIT 4:(0,0) >Rem Prog SFCFrc: Disabled PLC-5/40 Ser A Rev A 5/40 FILE LIMITStartng Compress Expand Modify DcmprssElement Macro Macro Name MacroF1 F2 F5 F8 F10
SFCMain Menu
F10
Edit
SFC EditSelections
F10
Macro
Cursor to where to begin themacro, then press this key toenter the starting element.
Cursor to the last element you wantin the macro and press this key.
1
2 Press this key to edit the macro.
Entering SFC Structures
11-13
The only difference with the macro edit selections from the SFC edit selections isthe key [F10] - Shrink Macro rather than [F10] - Macro. You can also press[Alt-M] to expand or shrink a macro.
Note You cannot delete steps inside of a macro if the corresponding transition is outsideof the macro. In order to delete the step, you must decompress the macro, make thechanges and then compress the macro again.
If You Want to: Press this Key:Start an SFC macro at the current step and edit the macro. [F1] - Starting ElementExpand a macro so you can view or edit its contents. [F5] - Expand MacroAssign a name to this macro (up to 10 characters).Available characters are:
A - Z (upper and lower)0 - 9(_) underscore
[F8] - Modify Name 1
Return the contents of the currently highlighted macro to theoverall SFC.
[F10] - Decompress Macro
1 Only available with Enhanced PLC-5 processors.
Assigning Comments to Macros
You can also assign comments to a macro (using Enhanced PLC-5 processors only).To assign a comment to a macro, follow the steps on the left.
Enter up to 80 characters wide by 65,535 (the number of lines used in the database)characters/lines long of comments to be associated with the macro. For moreinformation on entering comments, see “Entering Comments” in chapter 10.F7
General Utility
SFCMain Menu
F1
SFC Comment
F10
Edit Comment
PrefaceEntering SFC Structures
11-14
Searching within SFC Macros
You can search within a macro the same way that you search SFCs. From the SFCMacro screen, press [Alt-S] to display the search screen.
When you are searching inside of a macro, the software only looks at the steps andtransitions of the macro; it will not find occurrences of the search string outside ofthe macro.
For more information, see “Searching within SFCs” in chapter 12.
Entering SFC Structures
11-15
Using SFCs as Subcharts(Enhanced PLC-5 Processors Only)
If you have a PLC-5/11, -5/20, -5/26, -5/30, -5/46 series A and later, or PLC-5/40,-5/40L, -5/60 or -5/60L series B and later, or PLC-5/80 series C, or -5/20E, -5/20C,-5/40E, -5/40C, -5/60C, -5/80E, -5/80C, -5/86, -5/V30, or -5/V40 series C and laterprocessor, you can assign an SFC program file as an action in another SFC programfile (called a subchart). This allows you to reuse logic. (Subcharts are similar tosubroutines in ladder logic.)
See the following sections for information on using subcharts:
If You Want Information About: See Page Number:
Guidelines for using subcharts 11-15Specifying subcharts 11-16Interlocking subcharts to parent charts 11-16Viewing subchart logic 11-17
Guidelines for Using SFCs as Subcharts
Keep the following guidelines in mind when using subcharts:
· An SFC cannot be used as both a subchart and an MCP.· A subchart cannot be executed simultaneously from more than one place.· The action qualifier specified affects subchart scanning.· There is no limit to the number of subcharts, but only 128 subcharts can be
active at the same time.· Subchart loops cause the processor to fault (for example, if SFC file A uses SFC
file B as an action, and SFC file B uses SFC file A as an action). The softwaredoes not detect these subchart loops.
PrefaceEntering SFC Structures
11-16
Specifying SFCs as Subcharts
To specify an SFC program file as an action in another SFC, create the SFCprogram file according to the methods described in the previous chapter; then selectthat SFC program file as an action in a step. The word action appears in theProgram Directory to let you know that this SFC is being used as an action.
For more information on specifying actions, see chapter 10.
Interlocking Subcharts to Parent Charts
Figure 11.5Interlocking a Subchart to its Parent Chart
Transition T1
Segment of aParent Chart
Bottom segment ofa subchart
T2
T3
EOP
EOTSA SC25:0
SC25:0
Corresponding ladder logicfor Transition T1
Step Awith subchart action
Step B
Step C
Figure 11.5 shows an example ofinterlocking a subchart to itsparent chart, where Step A of theparent chart starts the subchart.In the subchart, end with Step C,which is a “dummy”step with nostep actions, but with the SFCstep timer SC25:0 assigned to it.(See chapter 12, especiallynoting the SFC step timer file bit.SA.) Transition T3 should havealways false logic (i.e., AFIinstruction followed by EOT).
When the subchart logic getsdown to Step C, its step activebit (SC25:0.SA) will becometrue, which will then settransition T1 true, allowing theparent chart to move on afterstopping the subchart.
Note Subcharts operate similar to subroutines in ladder programs. Therefore, once asubchart is deactivated based on the logic and action qualifier of the controllingaction, all activity in the subchart stops, including any currently active storedactions. Stored actions used in a subchart should always be reset prior to thedeactivation of the subchart.
Entering SFC Structures
11-17
When selecting SFC Macros versus subcharts in a given application, remember thatSFC Macros are used more to improve documentation, modularity, and chartmaintainability. Subcharts allow the reuse of chart segments. Using subchartsincorrectly will affect chart performance.
Viewing Subchart Logic
To view the logic in an SFC file specified as a subchart, place the cursor on thesubchart in the Program Directory window and press [F8] - Monitor. The logicappears on the screen.
You can also zoom on nested subcharts. Press [F8] - Zoom or [F3] - Exit tomove between the nested levels.
PrefaceEntering SFC Structures
11-18
Using the SFR Instruction(Enhanced PLC-5 Processors Only)
The Sequential Function Chart Reset (SFR) instruction resets the logic in asequential function chart (Enhanced PLC-5 processors only). When an SFRinstruction goes true, the processor performs a postscan/lastscan on all active stepsand actions in the selected file, and resets the logic in the SFC on the next programscan. The chart remains in this reset state until the SFR instruction goes false. TheSFR instruction also resets all retentive actions that are currently active. When theSFR instruction goes false, the processor starts scanning again at the specified step.
Use the SFR instruction in a ladder program to handle situations for resetting yourmachines. For example, if a machine goes out of alignment, use the SFR instructionto reset the chart, align the machine (for example, with an SFC homing program)and then disable the SFR instruction to start the SFC again.
Note The SFR instruction also resets SFC program files used as subcharts.
Entering SFR Parameters
To program this instruction, you must provide the processor with thefollowing information:
· Program File Number - a valid SFC program file number· Restart Step at - enter one of the following:
· a valid step reference number, 0 to 32767 (entering a 0 defaults to restartingat the initial step)
· an integer address (that stores a step’s reference number)· an address symbol (of an integer address that stores a step’s
reference number)· step name
Note If you are using a PLC-5/40, -5/40L, -5/60, or -5/60L series A processor, the SFC isautomatically reset to the initial step.
A step number is a software-assigned reference number associated with each step.You must configure your SFC to display these numbers. For information onconfiguring your display, see chapter 8.
A step name is any name that you assign to the step. For more information on stepnames, see chapter 8.
SFC ResetProg file number
SFR
Restart step at
Entering SFC Structures
11-19
Note Make sure that the step is actually a step and not a transition or macro. This causesthe processor to fault; the software does not perform a check. Also make sure thatthe step is not within a simultaneous branch or the processor will fault.
Monitoring an SFC in Reset Mode
When an SFR instruction is true, an asterisk (*) appears next to the restart step andthe step is highlighted to indicate that the logic is in the SFR reset state. When theSFR instruction goes false, the asterisk disappears and the current active step withthe SFC is highlighted; the SFC returns to normal operation.
PrefaceEntering SFC Structures
11-20
Editing SFCs
12-1
12 Editing SFCs
Chapter Objectives
Once you create an SFC, you can edit and monitor the SFC.
If You Want to: See Page:
Edit an SFC 12-2Search for structureswithin an SFC 12-3Zoom an SFC step or transition to monitor or editits ladder logic
12-7
Force a transition from the SFC editor 12-8Use SFC step timer and configuration information 12-10
PrefaceEditing SFCs
12-2
Editing SFCsTo edit an SFC, follow the steps on the next page:
Note If you created an SFC on a Classic PLC-5 processor and restored the file to anEnhanced PLC-5 processor, the SFC file was converted so that it can work on anEnhanced PLC-5 processor. The converted SFC file cannot be downloaded back toa Classic PLC-5 processor. However, the original file remains, so if you want to usethe same logic for an Enhanced PLC-5 processor, as well as a Classic PLC-5processor, you must make the edits in both files (or edit the old version and repeatthe conversion).
Note If the converted SFC is saved without changing the processor name, the old fileis overwritten.
+-+-+ | | |-+- | | |003 | | |+-----+--+--+-----+
|+-+-+| |+-+-+-+-011||
+=====+=====+| | |
+-+-+ +-+-+ +-+-+| | | | | |
Press a function key.EDIT 2:(0,0) >Rem Prog Forces: Disabled Ser A Rev A 5/40 Addr 20 LIMITSel Brn Sim Brn Append Insert Modify Delete Undel Label Config/ Macro
* * Stp/Trn Stp/Trn Stp/Trn Stp/Trn Stp/Trn /GoTo Build *F1 F2 F3 F4 F5 F6 F7 F8 F9 F10
SFCMain Menu
F10
Edit
Cursor to the SFC structure(step, transition, or branchelement) you want tomodify, then press theappropriate function key.
If You Want to: Press this Key:
Add or modify a selection branch [F1] - Selection BranchAdd or modify a simultaneous branch [F2] - Simultaneous BranchAdd a step/transitionafter the cursor [F3] - Append Step/TransitionAdd a step/transitionbefore the cursor [F4] - Insert Step/TransitionChange the program file assigned to the current step or transition [F5] - Modify Step/TransitionDelete the current step/transitionpair [F6] - Delete Step/TransitionUndelete the last deleted step/transitionpair in this editing session [F7] - Undelete Step/TransitionEnter a label or GOTO [F8] - Label/GOTOBuild the SFC and save the changes you made (If you are programming off line,you must also Save & Continue or confirm the save when you exit the software)
[F9] - Config/Build
Create or decompress an SFC macro [F10] - Macro
Editing SFCs
12-3
Searching within SFCs
To search for information in an SFC, follow the steps on the left.
+= Search =====================================================================+| F1 Search Type: Program File # || F2 Search For: F8 Search Direction: DOWN || F3 Replace With: F9 Search Wrap: ON |+==============================================================================+003 | | || | | || | | |+-----+--+--+-----+
|+-+-+| |+-+-+-+-011||
+=====+=====+
Press a function key to perform searching functions.EDIT 2:(0,0) >Rem Prog Forces: Disabled Ser A Rev A 5/40 Addr 20 LIMITSearch Search Replace Search Change Change Directn WrapType For With All Up/Down On/OffF1 F2 F3 F4 F5 F6 F8 F9
SFCMain Menu
F6
Search
Press the functionkey for the task youwant to perform.
PrefaceEditing SFCs
12-4
If You Want to: Press this Key:Select whether you want to search for a:
- active step (when in Run, Remote Run, or Remote Test)- element name (Enhanced PLC-5 processors only)- program file number- step file number- transition file number- label number- macro- selection branch- simultaneous branch- quadrant (row and column number)- text
The default is active step if in Run, Remote Run, or Remote Test mode,element name if in Program mode.
[F1] - Search Type
Specify the item for which you want to search. [F2] - Search ForSpecify the item with which you want to replace the search target(file numbers only)
[F3] - Replace With(edit mode only)
Start the search operation. [F4] - SearchStart the replace operation (for the current item, if you cursor on it, if you donot cursor on it, the software looks for the next occurrence of the searchtarget and replaces it) (file numbers only)
[F5] - Change(edit mode only)
Start the replace operation for all occurrences of the search target(file numbers only)
[F6] - Change All(edit mode only)
Select between Up and Down as directions for the search operation. Upspecifies to search up in the file from the cursor location; Down specifies tosearch down in the file from the cursor location. The default is Down.
[F8] - DirectionUp/Down
Select between On and Off for file wrap. On specifies that when the processorreaches the end of the SFC, the processor goes to the other end of the SFCand continues the search. Off specifies that when the processor reaches theend of the SFC, the processor stops the search. The default is On.
[F9] - Wrap On/Off
Note Replace With, Change, and Change All options are available only when:· the processor is in Remote Program or Program mode· you are searching for a file number (program, step or transition)· you are in the SFC Edit mode
You must select [F10] - Edit from the SFC main menu and then press [Alt-S]to display the search screen with these functions. If you have macros in your SFCprogram and the item you are searching for appears in the macro, the softwarehighlights the macro. When you press [F4] - Search to find the next occurrence,the software jumps over any other occurrences within the macro and finds the nextoccurrence of the item after the macro.
Editing SFCs
12-5
The systemplaces theitem you specify in theReplace With field onthe screen. See thefollowing table.
Enter the search string.(You type a quadrantnumber as x,y or x y or(x,y). For example, 1,1or 1 1 or (1,1)).
SFCMain Menu
F6
Search
SFC Search
F1
Search Type
F2
Search For
F4
Search
(until the search typefield displays theitem you want)
Searching Within SFCs
Note: To search for active steps,the processor must be in Run,Remote Run, or Remote Test mode.
Searching and Replacing SFC Information
You can only search for and replace program, step, and transitionfile numbers. To replace items, the SFC must be in the Edit modeand the processor must be in Remote Program or Program mode.
SFCMain Menu
F10
Edit
Alt S
SFC Search
Enter the search string.
F1
Search Type
F2
Search For
F4
Search
(until the search typefield displays theitem you want)
F3
Replace With
Enter file number toreplace search item with
PrefaceEditing SFCs
12-6
If You Want to: Press this Key:
Perform the replace operation for the current item, if youcursor on it, for the next occurrence of the search item, ifyou do not cursor on it.
[F5] - Change
Perform the replace operation for all occurrences of thesearch target.
[F6] - Change All
Search for the next occurrence of the search target [F4] - Search
Editing SFCs
12-7
Zooming
Zooming lets you select one step or transition of the SFC and monitor or edit itsladder logic. Zoom takes you to the ladder editor. If you have a PLC-5/11, -5/20,-5/26, -5/30, -5/46 series A, or PLC-5/40, -5/40L, -5/60 or -5/60L series B, orPLC-5/80, -5/20E, -5/20C, -5/40E, -5/40C, -5/60C, -5/80E, -5/80C, -5/86, -5/V30,or -5/V40 series C processor, and are using subcharts or structured text, you can alsozoom on the subchart.
To zoom in on a step or transition, follow the steps on the left.
The system transfers you to the Ladder Editor, Structured Text Editor, or SFC Editorand displays the logic for the step or transition that you specified. Now you can editor monitor the program using any of the displayed function keys.
If you have a PLC-5/11, -5/20, -5/26, -5/30, -5/46 series A, or PLC-5/40, -5/40L,-5/60 or -5/60L series B, or PLC-5/80, -5/20E, -5/20C, -5/40E, -5/40C, -5/60C,-5/80E, -5/80C, -5/86, -5/V30, or -5/V40 series C processor, and try to zoom on astep that has multiple actions defined, the software displays the Action Window. Usethe cursor to select the action you want to edit and press [F8] - Zoom. Pressing[F3] - Exit from the Ladder Editor or Structured Text Editor returns you to theAction Window. If there is only one action defined for a step, pressing [F8] -Zoom takes you directly to the Ladder Editor, SFC Editor (if the action is asubchart), or Structured Text Editor (if the action is structured text).
SFCMain Menu
F8
Zoom
Cursor onstep/transitionto monitor.
F3
ExitF4
Prog Diror
PrefaceEditing SFCs
12-8
Forcing Transitions from the SFC Editor(Enhanced PLC-5 Processors Only)
When you monitor an SFC for an Enhanced PLC-5 processor, you canforce transitions on and off. This lets you override the flow of your SFC fortroubleshooting purposes.
Attention: When any transition is forced on or off in an SFC program, keeppersonnel away from the machine area. Forcing a transition can causeunexpected machine motion that could injure personnel.
To force a transition, follow the steps on the left.
START+---+---+
|-+-011|
+-+-+| |+-+-+-+-011||
003:|
+-+-+| |
Press a function key.MONITOR (0,0) >Rem Prog SFCFrc:ENABLED Ser A Rev A 5/40 Addr 20 LIMITForce Force Remove Remove Enable DisableOn Off Force AllF1 F2 F3 F4 F7 F8
SFCMain Menu
F9
Force
Cursor ontransitionto force.
Press the function keyfor the task you wantto perform.
or Alt F
If You Want to: Press this Key:
Force the current transition on (true) [F1] - Force OnForce the current transition off (false) [F2] - Force OffRemove the force from the current transition [F3] - Remove ForceRemove all transition forces [F4] - Remove AllEnable all transition forces (in all SFCs in the processor) [F6] - EnableDisable all transition forces (in all SFCs in the processor) [F7] - Disable
Editing SFCs
12-9
Note The Enable, Disable, and Remove functions only affect SFC transition forces; if youhave I/O forces (in the Ladder Editor), they are not affected.
The status line of the screen displays the SFC force status (Enabled or Disabled). Ifyou have I/O forces in the Ladder Editor they are not shown. In Normal orExpanded display mode, the software also displays the state of each particular force(on or off) to the left of each transition that is forced. For more information on SFCforcing, see chapter 18 in the Software Configuration and Maintenance manual.
PrefaceEditing SFCs
12-10
Using SFC Step Timer and Configuration Information(Enhanced PLC-5 Processors Only)
If you are using an Enhanced PLC-5 processor, you can use SFC step timerinformation to configure your program scan and specify an SFC step timer file tomonitor SFC information.
Using SFC Configuration Information
The Scan Configuration options are typically only a concern if your SFC hasextensive simultaneous branches and you are trying to improve scan time byscanning I/O only once through the branch.
To configure the SFC information, follow the steps on the left.
Press Return or Esc to accept the changes and return to
General Utility You must build the chart to save the changes.
Alt UPress to abort the changes.
+= SFC Configuration ==========================================================+| F1 Step Timer File: SC14 F5 Post Scan Config: * Auto Reset || Manual Reset || F3 Action Timer File: T4 F6 Scan Config: * Standard || Advanced |+= ESC exits/ALT-U aborts changes =============================================++=====+=====+
-+- 20||
+-----+-----+| |+-----+-----+
-+- 13||
+-----+-----+| |
Press a function key.EDIT 2:(0,0) > ÛRem Prog SFCFrc:Disabled PLC-5/40 Ser C Rev B 5/40 Addr 43 DRILL1Step Action PostScn ScanTimer Timer Config ConfigF1 F3 F5 F6
SFCMain Menu
F7
General Utility
F3
Config SFC
Press the function keyfor the task you wantto perform.
Editing SFCs
12-11
If You Want to: Press this Key:
Specify the step timer file.This file contains timer control structures for each step timer.
[F1] - Step Timer
Specify the action timer file.This file contains the timer control structures that are used by actions. For moreinformation on this timer file, see page NO TAG.
[F3] - Action Timer
Specify the post scan configuration mode.Toggles between Auto Reset and Manual Reset:Auto Reset - resets all non-retentive timers and outputs when the stepis deactivated.If the same output is used in two consecutive steps, the postscan is re-initialized bythe second step prior to doing an I/O scan.Manual Reset - does one last scan of the file with the ’lastscan’flag set in the steptimer file (S:1/14). By conditioning outputs based on this bit, you can control whichoutputs get reset.
[F5] - Post ScanConfiguration
Specify the SFC scan method.Toggles between Standard and Advanced:Standard - scans the SFC similar to Classic PLC-5 processors (e.g., betweensimultaneous steps, I/O is scanned - as is the transition to exit the simultaneousbranch structure - when all converge steps are active. See appendix B in theInstruction Set Reference manual for more information.)Advanced - scans the SFC similar to a PLC-5/250 (e.g., in a simultaneous branch,all active steps/actionsare scanned with one scan of I/O and the converge transitionis only checked after the right-most active step of the converge is scanned.)
[F6] - Scan Configuration
Use the configuration options you specify for this editing session only [Enter] or [Esc]Leave the configuration screen without using any of the changes you specified [Alt-U]
Using SFC Step Timer Information
You can reference the SFC step timer file (SC data file type) in ladder logic tomonitor which steps in the chart are active. For example, you may want to keeptrack of how long a step is active so that you can monitor how fast your process isrunning. Or, you could also start another program based on a certain combination ofactive steps.
Specify which steps you want to monitor from the Step and Transition Edit screenby assigning step timers to the step (either when you create the step or later). Youthen can use ladder logic to monitor these steps based on the information in the SFCstep timer file; note that you cannot monitor step timer data for the step unless youassign a step timer to that step. You can monitor up to 1,000 steps per SFC file.
PrefaceEditing SFCs
12-12
To specify the steps you want to monitor, follow the steps on the left.
If you have not configured the step timer filealready, the systemfirst prompts you for a filenumber to use for the step timer. You can useany file number for an SFC step timer as long asit has not already been used.When you build the chart, the systemcreates thedata table entry for that step timer. For example,if the SFC step timer file number you specified is12 and you entered 20 for the step timernumber, the systemcreates the data table entrySC12: 20.Just as when you create integer or any otherdata table entry, if you enter 20, entries SC12:0through SC12:20 are created.
Step Trans Step Step TransActions Timer Name NameF1 F2 F4 F8 F9
START+-----+-----++=====+=====+# #+=====+=====+
-+-||
+-----+-----+
Press a key or enter step/transition file number or name.EDIT 2:(0,0) >Rem Prog SFCFrc:Disabled PLC-5/40 Ser C Rev B 5/40 Addr 43 DEMONP5B
SFCMain Menu
F10
Edit
SFC Edit
F4
InsertStep/Trns
F3
AppendStep/Trns
F5
ModifyStep/Trns
Press this key and then [F1] -Timer Number to enter thetimer number (0-999).
Enter the timer preset.
1
2The active step timer of this step will be storedin the SFC step timer file under the step timernumber you specified.When you are in Run mode and the cursor is ona step that has a step timer, the following fieldsappear across the bottom of the Action Window.
+= Action Display for Step: 00012 =============================================+| ActionName QL Action Comment |+------------------------------------------------------------------------------+| ValveChk L 2 (ladder) Check the valve || || || |+==============================================================================+
This Field: Contains this Information:
Timer Number (E)Timer Preset (P)
Timer File Number (F)
A timer element number (0-999).A timer preset value, (.01 seconds - 32,767seconds) displayed in seconds. You decidethe precision of the timer by what you enter. Ifyou want greater precision, enter a presetusing a decimal point. For example, if youenter 10, the software saves a preset of 10 anda timebase of 1 second. If you enter 10. or10.0, the software saves a preset of 1000 anda timebase of 10 ms. 327.67 is the maximumvalue allowed for a 10 ms based preset.
A timer file number (3-999).
If you enter the action timer from the command line, use theformat TF:E = P
Editing SFCs
12-13
+= Action Display for Step: 00005 =============================================+| ActionName QL Action Comment |+------------------------------------------------------------------------------+| dwell_tmr L 10 (ladder) || T4:0 = 3s || || |+= SC14:0 = 10s TIM = 0 SA=0, FS=0, LS=0, OV=0, ER=0, DN=0 =====+
-+- 14||
+-----+-----+| |+-----+-----+
-+- 15||
+-----+-----+
Press a function key.MONITOR 2:(0,0) >Rem RUN SFCFrc:Disabled PLC-5/40 Ser C Rev C 5/40 Addr 51 DEMONP5CChange Exit Program Expand Search General Zoom Force EditMode Dirctry Macro UtilityF1 F3 F4 F5 F6 F7 F8 F9 F10
Note Make sure your SFC configuration has the Action Window display enabled. Seechapter 8 for more information on configuring your SFC display.
SFC Step Timer File Bits
The processor stores SFC step timer bits, the preset and the elapsed step active time(accumulated value) in a 48-bit storage structure (three 16-bit words) in the SC areaof data memory. Each step that has a step timer assigned to it has this information(using the following structure) stored at the timer number you specified:
preset value (16 bits)
elapsed step active time (16 bits)
LSFSSA
08 07 06 05 04 03 02 01 0009101112131415
internal use onlySCx:0
OV ER DN
PRE -
TIM -
PrefaceEditing SFCs
12-14
This Mnemonic: Shows: Use this Information to:
SA whether or not the step isactive (0 or 1)
pass machine state information to another step or MCP.
For example, a rung with an XIC on SCx:x.SAfollowed by a ONScould control an OTU for an MCP enable bit to enable another MCP.
FS that the step is currentlybeing first scanned (0 or 1)
control logic on the first scan of this step’s non-stored actions.
If you are using a delayed action qualifier, use the processor statusfile (S1:15) first scan bit to control this logic.
LS that the step is currentlybeing last scanned (0 or 1)
control logic resetting on the last scan of this step’snon-stored actions.
Note: If you have time limited actions, use the processor status file(S1:15) last scan bit to control this logic.
OV the timer overflowed thepreset; the step did not finishduring the time you allotted(0 or 1)
control logic to handle the error condition for elapsed steptimer overflows.
ER the step has actions that arein error (0 or 1)
This bit is set when one of the ladder files of the step’s actions has arun-time error.
DN the timer is done; the elapsedstep timer is equal to orgreater than the timer preset(0 or 1)
trigger a transition after a set period of time.
PRE the timer preset you specified set the time at which the done bit will be set. (optional)TIM the timer timing
(accumulated value)monitor the duration for which a step is active (using a 1 sec or 0.01sec time base). The accumulator will remain valid after the stepbecomes inactive until the step is re-activated. The accumulatorcontinues to run after reaching the preset value.
To reference the timing word, for example, use the following format:
SC12:24.TIM
where SC denotes an SFC status file, 12 is the file number, 24 is the elementnumber and .TIM is the timing word.
Entering and Editing Ladder Logic
Section 3
Entering and Editing Ladder Logic
If You Want to: See Chapter:
Create ladder logic 13Learn the basics of the ladder editor 14Enter ladder logic 15Edit ladder logic 16Document your ladder program 17
PrefaceEntering and Editing Ladder Logic
Writing Ladder Logic
13-1
13 Writing Ladder Logic
Chapter ObjectivesAfter you have a design specification for your application, you are ready to createthe ladder logic.
If You Want to: See Page:
Convert machine statements to ladder logic 13-2
Assign bit addresses to digital I/O instructions 13-3
Construct ladder rungs 13-4
Arrange instructions for faster program scan times 13-8
Display cross references 13-9
PrefaceWriting Ladder Logic
13-2
Converting Machine Statements to Ladder LogicYou write ladder logic to:
· examine the on/off status of machine devices by reading bit data in the inputand output image file
· make decisions based on input and output conditions· control the on/off status bit data in the output image file which in turn controls
the on/off status of output devices
To write ladder logic, you need to understand these definitions:
Rung - is a logic statement that controls one or more bits based on the state of otherbits examined. Ladder logic is composed of a listing of rungs.
Input (conditioning) instructions - examine the status of input and output bits.These commands are generally used on the left side of a rung.
Output instructions - control the state of a bit or bits based on conditioninginstructions. These commands are used on the right side of a rung.
Rung LogicFigure 13.1 shows samples of rung format.
Figure 13.1Example Rung Format
Rung 1
Rung 2
Rung 3
Rung 4
Rung 5
input (conditioning) output instructionsinstructions
Writing Ladder Logic
13-3
Note Each input instruction and output instruction you enter generates a rung element.However, as each input instruction is executed, the addressed bit is examined to seeif it matches a certain condition (on or off). If the input is true (rung 1 above), therung element is set true. The rung must contain a continuous path of true elementsfrom the start of the rung to the output instruction for the output instruction to beenabled. If a rung element is unconditioned (as in rung 4 above), the outputinstruction is always enabled.
The programming terminal intensifies bit instructions that are logically true whenthe processor is in Run mode or Test mode.
Example Digital I/O Instructions
The example rung format (Figure 13.1) uses the following discrete I/O instructions:
Name: Examine-OnFormat:Description: An input instruction that examines a bit for an ONcondition as follows:If the Bit is: Then the Instruction Is:ON (1) trueOFF(0) false
Format:Description: An output instruction that controls the status of one bit(which in turn could control the on/off status of the output device).If the Instruction Is: Then the Bit is:enabled (rung is true) set to 1disabled (rung is false) reset to 0
Name: Output Energize
For information about other available instructions, see the Instruction SetReference manual.
PrefaceWriting Ladder Logic
13-4
Constructing Ladder Rungs
When you construct ladder rungs, there are guidelines you should follow for writingrung and branch logic.
Writing Rung Logic
When you write rung logic, follow these guidelines:
1. Sort the actions “to be taken” from the conditions “to be examined” for eachstatement of machine operation.
2. Select the appropriate input instruction for each input condition and theappropriate output instruction for each output action.
Attention: Some input devices and input modules use inverse (negative) logicwhere a logically true condition turns the bit off, and a logically false conditionturns the bit on. If the instructions to program these devices are usedincorrectly, it can cause unexpected operation with damage to equipmentand/or injury to personnel.
3. Arrange input instructions on the left-hand side of the rung as shown inTable 13.A.
Table 13.AArranging Input Instructions
If You Have Multiple Input Conditions and: Then Arrange the Instructions:
All conditions must be true to take action in series
Any of several conditions must be true to take action in parallel
A combination of the above in series and parallel
Writing Ladder Logic
13-5
4. Arrange output instructions on the right-hand side of the rung as shown inTable 13.B.
Table 13.BArranging Output Instructions
If You Program: Then Arrange the Instruction(s):
A single output instruction at the far right
Multiple output instructions in parallel
A conditioned output instruction in a separate output branch
5. Label each instruction with the name of the device it examines or controls.
Rung Example
A statement of machine operation reads:
When LS1 and LS2 are closed, or when SW6 is closed, turn on FAN1 andBULB1.
Translate the statement to a rung as follows:
· The “when” statement represents an input condition.· The “and” statement represents serial conditions.· The “or” statement represents parallel input conditions.· The “turn on” statement represents an output energization (two outputs
in parallel).· When input conditions provide a logically “true” path across the rung, the rung
is true and the outputs are energized.
PrefaceWriting Ladder Logic
13-6
Figure 13.2 shows what a rung would look like for the previous statement ofmachine operation (outputs in parallel).
Figure 13.2Rung with Output Instructions in Parallel
SW6
FAN1LS1 LS2
BULB1
Writing Branch Logic
Whenever you program instructions in parallel, you must create branches. Followthese rules for input and output branching.
1. You can have up to five nested input-branch levels per rung (four levels plus theoriginal rung). You can have as many non-nested parallel branches as you need.However, the larger your non-nested, parallel branch becomes, the more RAM(random access memory) your program uses.
2. Nest branches according to your programming requirements.
Non-nested, parallel branches(right way)*
Nested, parallel branches(nested unnecessarily)
Nested, parallel branches
* Use the extend up/extend down function keys to create non-nested parallel branches.
Writing Ladder Logic
13-7
3. Branches must not overlap. (A branch cannot start inside another and endoutside it.)
For example, this programming method is not allowed:
4. An output branch must end with an output instruction.
For example, input instruction (A) is not allowed in that position:
A
PrefaceWriting Ladder Logic
13-8
Arranging Instructions
You can improve the rate of program scan by how you arrange instructions within arung based on these two considerations:
· Place instructions most likely to be false, first in a rung. Place instructions mostlikely to be true, last in a rung.
For example:
Most likelyto be FALSE
Most likelyto be TRUE
· Place the input path that is most likely to be true as the top path in a branch.Place the less likely to be true input branches further down in the branch.
For example:
Path most likely to be true
less likley
least likely
Writing Ladder Logic
13-9
Displaying Cross References
You can display the cross reference database from any screen that displays rungs.The cross reference shows you all the occurrences of an address in the currentprocessor memory file. Follow the steps on the left.
Alt X
Go to any screenthat displays rungs B3/355 Oil tap prefill closed
-] [- 13:12-( )- 13:1
==X-ref View========================================================ESC exits===* FAULT SIGNALS ** ******************
| F 150 OIL Oil tap || TAP PRE- prefill || FILL closed || I:023 B3 |+----]/[---------------------------------------------------------------( )-----+| 03 355 |
Use cursor keys to select a rung, or press a function key.(File 13: Rung 1)Rem Prog Forces:Disabled Edits:None 5/15 File ASEAB205Go to Toggle Specify Next XR Prev XRRung Window Address Address AddressF1 F3 F5 F9 F10
Note Cross reference databases generated with release 4.3 or earlier software areincompatible with release 4.4 and later and are deleted. You must regenerate thecross reference database using release 4.4 or later software.
The information on this screen applies to the current address and reflects thecontents of the cross reference database (Table 13.C). An asterisk (*) next to a rungnumber indicates use of an indirect address.
PrefaceWriting Ladder Logic
13-10
Regenerating Cross Reference Database
If you make changes to the processor memory file, the cross reference databaseinformation is incomplete. The 6200 programming software prompts you toregenerate the cross reference database.
Regenerate Cross ReferenceDatabase When:
From: Display Regenerate Prompt By:1
Program logic is newer than crossreference database
Any rung ·Entering [ALT] [X]·Pressing F8 - Display X-Ref
You accept a ladder edit ·Any rung in an offline file orwhen terminal is online andprocessor is in remoteprogram mode
·Any rung when terminal isonline and processor is inremote run mode
Pressing F10 - Accept Rung·Pressing F10 - Accept Edits·Pressing F9 - Test Edits·Pressing F10 - Assemble Edits
Moving rungs in a file The ladder editor ·Cutting, copying orpasting rungs
·Deleting or undeleting rungs
SFC or ST files are edited The file Monitoring a ladder file
Program file is deleted Program directory Entering the ladder editor to monitorladder file
1 You must configure your system to display cross references.
You can regenerate the cross reference database if the current cross referencedatabase and disk version numbers don’t match, if the program logic is newer thanthe existing database, or the database has not been regenerated during the currentwork session of 6200.
Note If another user makes changes to the program logic while you are in the laddereditor, you are not prompted to regenerate the cross reference database until youmake changes to the program logic.
Tip If you make multiple edits, suppress the on-screen cross reference function.Otherwise, you’ll be prompted to regenerate the cross references every time youaccept a rung.
Writing Ladder Logic
13-11
Table 13.CCross Reference View Screen
If You Want to: Follow these Steps:1
View a split-screen with cross reference information. Monitor a ladder file. Cursor to the instruction and press [Alt] [X].Select a rung to display. Cursor to the rung number within the cross reference
information and press [F1] - Go to Rung
The Display Rung screen becomes active. See below.Toggle between the X-Ref View and the Rung View. Press [F3] - Toggle Window
The Display Rung screen becomes active. See below.Select a different address to view. Press [F5] - Specify Address and enter the addressView cross reference information for the next address. Press [F9] - Next XR AddressView cross reference information for theprevious address.
Press [F10] - Prev XR Address
Move the cursor up one row in the display. [y ]Move the cursor down one row in the display. [b ]Move the cursor right one field in the display. [']Move the cursor left one field in the display. [a]Move the cursor to the first entry in the display. [Home]Move the cursor to the last entry in the display. [End]Move the cursor to the last line on the current page. [Ctrl-PageDown]Move the cursor to the first line on the current page. [Ctrl-PageUp]Move the cursor to the beginning of the current line. [Ctrl-a]Move the cursor to the end of the current line. [Ctrl-']Change processor mode. [Alt-C]Exit the X-Ref window. [Escape]1 These steps apply only when the top portion of the cross reference screen is active.
When you press [F1] - Go to Rung or [F3] - Toggle Window from theDisplay Cross Reference screen, the Display Rung Screen (Figure 13.3) becomesactive. This screen displays as many rungs as will fit on the screen, adjusting theladder program as you cursor from one instruction to another.
PrefaceWriting Ladder Logic
13-12
Figure 13.3Rung View Screen
T9:0-RES- 2:1 2:3 2:6-TON- 2:0 2:2 2:5T9:0.DN-] [- 2:1 2:3 2:6--Rung View---------------------------------------------------------ESC exits---| +TON---------------+ |+----------------------------------------------------+TIMER ON DELAY +-(EN)-+| |Timer T9:0| || |Time base 0.01+-(DN) || |Preset 1000| || |Accum 0| || +------------------+ || T9:0 T9:0 |+--] [-------------------------------------------------------------------(RES)-+| DN |
Use cursor keys to view the program, or press a function key.(File 2: Rung 1) ?Rem Prog Forces:None Edits:None 5/15 File WIDE_SFCX-ref Toggle
Current WindowF1 F3
If You Want to: Follow these Steps:1
Select an address to cross reference. Cursor to the address and press[F1] - X-Ref Current.
The X-Ref view screen becomesactive and display the cross referenceinformation for the address.
Toggle between the Rung View screen and the X-RefView screen.
Press [F3] - Toggle Window.
Move the cursor to the nearest instruction above thecursored instruction.
[y ]
Move the cursor to the nearest instruction below thecursored instruction.
[b ]
Move the cursor to the instruction to the left of thecursored instruction.
[a]
Move the cursor to the instruction to the right of thecursored instruction.
[']
View the first nonvisible rung from the previous page. [PageUp]View the first nonvisible rung from the next page. [PageDown]Move the cursor to the first instruction onprevious rung.
[Ctrl-PageUp]
(Continued)
Writing Ladder Logic
13-13
If You Want to: Follow these Steps:1
Move the cursor to the first instruction on the next rung. [Ctrl-PageDown]Move the cursor to the left power rail of thecurrent rung.
[Ctrl-a]
Move the cursor to the right power rail of thecurrent rung.
[Ctrl-']
Move the cursor to the first instruction of the first rungin the ladder.
[Home]
Moves the cursor to the last rung in the ladder. [End]Move to a specific rung within the same file rungnumber [Enter]Move to a specific file and rung. filenumber; rungnumber [Enter]Change processor mode. [Alt-C]Change display configuration. [Alt-E]Exit the Cross Reference Display screen. [Escape]1 These steps apply only when the bottom portion of the cross reference screen is active.
PrefaceWriting Ladder Logic
13-14
Getting Started Using the Ladder Editor
14-1
14 Getting Started Using theLadder Editor
Chapter Objectives
The programming software includes a ladder editor for entering and editing theladder logic that runs your programs.
If You Want to: See Page:Learn about the ladder editor 14-2Configure the ladder editor display 14-5Select rungs for editing or monitoring 14-7Move to rungs in a program 14-8Interpret status messages 14-9
PrefaceGetting Started Using the Ladder Editor
14-2
Getting Started with the Ladder Editor
The ladder editor provides the interface you need to enter and edit your ladderprograms. With the ladder editor, you can also:
· configure analog I/O modules· document your ladder programs· search for instructions or comments
Each of these tasks is described in this manual. The Software Configuration andMaintenance manual describes these additional tasks:
· create a contact histogram· force I/O· monitor the data table
Attention: Use extreme caution when editing online, especially in Run mode. Ifyou must edit online, do the following:
·Assess how machinery will respond to the changes.·Check and re-check proposed changes for accuracy.·Be absolutely certain changes must be made online.·Notify all personnel before making online changes.·While testing edits, verify that they perform as intended.
Getting Started Using the Ladder Editor
14-3
To edit program files, follow the steps on the left.
| I:001 O:005 |+--]/[--------------------------------------------------------------------( )--+| 14 10 || +TON---------------+ |+----------------------------------------------------+TIMER ON DELAY +-(EN)-+| |Timer T4:0| || |Time base 0.01+-(DN) || |Preset 12| || |Accum 0| || +------------------+ || +MSG--------------------+ |+-----------------------------------------------+SEND/REC MESSAGE +-(EN)-+| |Control Block N7:10+-(DN) || | +-(ER) || +-----------------------+ || |+--------------------------------[END OF FILE]---------------------------------+| |
Press a function key.(file 1: rung 3)Rem Prog Forces:None Edits:None 5/40 Addr 4 LIMITChange Config Return Program Documnt Search General Data Force EditMode Display to Menu Dirctry Utility MonitorF1 F2 F3 F4 F5 F6 F7 F8 F9 F10
Ladder Editor Main Menu6200Main Menu
F1
Online/OfflineDirectory
F8
Online ProgF3
Offline Prog
Monitor File
Enter file name or number
If You Want to: Press this Key:Change the processor mode (online only)Note: If you need to change modes while in the Ladder Editor, use the keyboard. If youuse the processor keyswitch,you should return to the Program Directory before youchange the keyswitch,and then re-enter the Ladder Editor.
[F1] - Change Mode or[Alt-C]
Configure the way program files display on the screen [F2] - Configure Display or[Alt-E]
Return to the main menu [F3] - Return to MenuReturn to the program directory [F4] - Program DirectoryAdd rung, instruction, and address comments and symbols to the current program file [F5] - Document or [Alt-T]Use the search utility [F6] - Search or [Alt-S]Display the General Utility screen from which you can look at the memory map, checkprocessor status,start a histogram (online only), write to an EEPROM (online only), orcheck I/O configuration status
[F7] - General Utility
Monitor the data table for the current instruction address or any data address [F8] - Data Monitor or [Alt-D]Force I/O [F9] - ForceEdit the current program file [F10] - EditPrivilege Class screen(Only available on Enhanced PLC-5 processors when Passwords and Privilegesare installed.)
[Alt-P]
PrefaceGetting Started Using the Ladder Editor
14-4
Navigational Keys
You can use the following navigational keys when you are in the ladder editor.These keys provide shortcuts that display frequently-used screens and information:
If You Want to Display: Press this Key:Instruction Buffer for the current instructionon the input line(must already be editing in the ladder editor)
[Alt-B]
Change Processor Mode screen [Alt-C]Data Monitor screen [Alt-D]Configure Display screen [Alt-E]Help [Alt-H]Memory Map screen [Alt-M]Change Privilege Class (Enhanced PLC-5processors only)
[Alt-P]
Search screen [Alt-S]Documentation screen [Alt-T]Cross Reference (X-REF) screen [Alt-X]
Getting Started Using the Ladder Editor
14-5
Configuring the Ladder Editor Display
To configure the ladder editor display, follow the steps on the left.
| +BTW--------------------+ |+-----------------------------------------------+BLOCK TRANSFER WRITE +-(EN)-+| |Rack 00| || |Group 0+-(DN) || |Module 0| || |Control block N20:0+-(ER) || |Data file N25:0| || |Length 14| || |Continuous N| || +-----------------------+ || +BTR--------------------+ |+-----------------------------------------------+BLOCK TRANSFER READ +-(EN)-+| |Rack 00| || |Group 0+-(DN) || |Module 0| || |Control block N10:0+-(ER) || |Data file N15:0| || |Length 4| |
Press a function key for desired display mode.(File 2: Rung 0)Rem Prog Forces:None Edits:None 5/40 File LIMITSingle Mult Select Dupl Display Auto Config Display Assistd SaveRung Rung Rung Chk On Value Doc On Documnt X-Ref Search ConfigF1 F2 F3 F4 F5 F6 F7 F8 F9 F10
Ladder EditorMain Menu
F2
Config Display
Press theappropriatefunction key.
PrefaceGetting Started Using the Ladder Editor
14-6
Table 14.AConfigure Display Options
If You Want to: Press this Key:
Display only one rung on the screen at a time [F1] - Single RungDisplay as many rungs on the screen as will fit [F2] - Multiple RungsSelect a specific group of rungs to display on the screen [F3] - Select RungCheck for duplicate output instructions in all program files for the current processor [F4] - Duplicate Check On *Stop checking for duplicate output instructions [F4] - Duplicate Check Off *Display the indirect values of indirect addresses
For example, if you entered N7:[N7:1] for an indirect address, the format of the displayedvalue is N7:[2]{6} where 2 is the value of [N7:1] and thus the value of N7:[2] is 6.
[F5] - Display Value *
Stop displaying the indirect values of indirect addresses [F5] - Suppress Value *Automatically display the Document screen when you edit a rung or instruction that doesnot have comments
[F6] - Auto Document On *
Stop automatically displaying the Document screen when you edit a rung or instruction thatdoes not have comments
[F6] - Auto Document Off *
Display/suppress your program documentation:[F1] - Display/suppress Rung Comments*[F2] - Display/suppress Instruction/AddressComments*[F3] - Display/suppress Symbols*[F4] - Display/suppress Headers*[F7] - Display/suppress Documentation*
[F7] - Configure Documentation
For each address in an input instruction, display where that address was last used in anoutput instruction
[F8] - Display X-Ref *
Stop displaying the “inputs as outputs”cross reference information [F8] - Suppress X-Ref *Use the assisted search function with mnemonic aid [F9] - Assisted Search *Use the standard search function [F9] - Standard Search *Save the configuration characteristicsyou specified on this screen and those specified onthe Configure Display screen
If you make changes on other configuration screens, you must save the configuration onthose screens if you want the configurations saved to your user configuration file. For moreinformation about search configuration, see chapter 16
[F10] - Save Configuration
Use the configuration options you specify for this editing session only [Esc]* Function key shows action that occurs when you press it - in other words, the opposite of the current state is displayed on the function key.
Getting Started Using the Ladder Editor
14-7
Selecting RungsSelecting a group of rungs is useful when you make the same changes to severalrungs that are scattered throughout the processor memory file, or when you want tomonitor several rungs in the same program file that are not consecutive. To select agroup of rungs, follow these steps.
If You Want to: Do this:select a rung type the numbers of the rungs you want separating
each number with a comma and press [Enter]recall the list you specified last time [F1] - Previous Listturn off the select-rungs mode select Single Rung or Multiple Rung display from
the Configure Ladder Editor screen
Using Auto DocumentThe auto document feature checks for symbols, address comments, and rungcomments. When you enter an instruction, and the processor accepts thatinstruction, the system prompts you for a symbol if no symbol exists for the address.A symbol may consist of 10 to 20 characters consisting of A-Z, 0-9, underscore (_),period (.), and pound sign (#). See Table 14.A for more information.
If You Want to: Press:Assign a symbol to the address Type the symbol, then [Enter]Not assign a symbol to the address [Esc]
After the system checks for a symbol, it checks for an address comment associatedwith the main operand of the instruction you just entered. If no address commentexists, the system displays the documentation window for enteringaddress comments.
If You Want: Do This:an address comment Type the address comment and press [F8]no address comment press [Esc]
When you press F10 - Accept Rung the system checks for a rung comment. Ifno rung comment exists, the system displays the documentation window forentering rung comments.
If You Want: Do This:a rung comment Type the rung comment and press [F8]no rung comment Type [Esc]
Ladder EditorMain Menu
F2
Config Display
F3
Select Rung
PrefaceGetting Started Using the Ladder Editor
14-8
Moving to Rungs
When you work with a program file, you can move to rungs in a program file by anyof the following methods:
If You Want to: Press this Key:
Move the cursor to the top left or bottom right in the currentprogram file
[Home] [End]
Move the cursor to the previous or next rung in the currentprogram file
[uparrow] [downarrow]
Move the cursor up or down in a branch structure on a rung [uparrow] [downarrow]Move the cursor to the right or left on the rung in the currentprogram file
[rightarrow] [leftarrow]
Move to the left or right power rail on the current rung [Ctrl-left arrow] [Ctrl-right arrow]Move to the previous or next page of rungs [PageUp] [PageDown]Move the cursor to the first instruction position of the previousor next rung
[Ctrl-PageUp] [Ctrl-PageDown]
Move to any existing rung in the current program file Specify a rung number and press [Enter]Move to any existing rung in another program file Specify a file and rung number and press [Enter]Specify a file and a rung number Start within any program file associated with
the processorSpecify the file number and the rung number to which youwant to move
Type the file number and then the rung number onthe status line, separating these numbers with acolon or a semi-colon, and press [Enter]. If you typeonly one number, the systemassumes you want tomove to that rung in the same program file.
Check which file and rung are current See the status line
The system will not let you jump to a different rung if you are modifying the currentrung in any way. You first have to accept or cancel any changes you make to thecurrent rung. Then you can specify a new rung. Also note that you cannot jump toan SFC, ST or system file (0).
Getting Started Using the Ladder Editor
14-9
Interpreting Status Messages
The ladder editor displays status messages so you have a better idea of what thesystem is doing. The following table lists the possible status messages.
This Message on the Status Line: Tells You:
Addr: Data table addresses are displayed in either decimal or octal formatData: Data is displayed in ASCII, binary, decimal, floating point, BCD, octal, or
invalid formatDbase Mode: Database editor is using the current address modeEdits: The program contains unassembled rungs that are being executed (enabled)
or that are not being executed (disabled), or the program contains nounassembled rungs (NONE)
File Current Program fileForces: Forces are disabled, enabled, or noneFAULTED The processor has a faultHist: The processor has started or stopped generating the histogramInstr: You are appending, inserting, or modifying an instructionMode: Histogram is continuous or paged5/xxx Addr aa nnnnnnnn Station address of the PLC-5 processor when programming online, and the
current processor name5/xxx File nnnnnnnn Current processor memory file when programming offlineProgram Processor is in program modeRecording: Histogram is recording information to disk (On) or not recording information to
disk (Off)Rem Prog Processor is in remote Program mode or you are programming offlineRem Run Processor is in remote Run modeRem Test Processor is in remote Test modeRun Processor is in Run modeRung: You are appending, inserting, or modifying a rungSearch for: Database editor searches for the current element
PrefaceGetting Started Using the Ladder Editor
14-10
Entering Ladder Logic
15-1
15 Entering Ladder Logic
Chapter Objectives
After you prepare your design specification and, if applicable, enter your sequentialfunction chart (SFC), you are ready to enter the ladder logic that runsyour application.
If You Want to: See Page:
Enter rungs 15-2Enter instructions 15-4Use the instruction entry aid 15-8
PrefaceEntering Ladder Logic
15-2
Entering Rungs
To enter or edit rungs in a program file, follow the steps on the left.
| I:001 O:005 |+--]/[--------------------------------------------------------------------( )--+| 14 10 || +TON---------------+ |+----------------------------------------------------+TIMER ON DELAY +-(EN)-+| |Timer T4:0| || |Time base 0.01+-(DN) || |Preset 12| || |Accum 0| || +------------------+ || +MSG--------------------+ |+-----------------------------------------------+SEND/REC MESSAGE +-(EN)-+| |Control Block N7:10+-(DN) || | +-(ER) || +-----------------------+ || |+--------------------------------[END OF FILE]---------------------------------+| |
Press a function key for desired editing function.(file 2: rung 3)Rem Prog Forces:None Edits:None 5/15 Addr 20 LIMITChange I/O Append Insert Modify Delete Undel Advancd Test CancelMode Edit Rung Rung Rung Rung Rung Editing Edits EditsF1 F2 F3 F4 F5 F6 F7 F8 F9 F10
Identifies currentfile and rung.
Press the appropriatefunction key.
For more information aboutconfiguring I/O, see the I/OConfiguration Utility manual.
Ladder EditorMain Menu F10
Edit
If You Want to: Press this Key:
Select a rung or enter rung numberor file:rung number
Change the processor mode [F1] - Change ModeUse the I/O configuration utility [F2] - I/O EditAdd multiple rungs below the current rung in a program file [F3] - Append RungAdd a rung above the current rung in a program file [F4] - Insert RungEdit the current rung [F5] - Modify RungDelete the current rung [F6] - Delete RungRe-insert the last deleted rung [F7] - Undelete RungUse cut, copy, and paste operations (See chapter 16) [F8] - Advanced EditingTest the edit zones [F9] - Test EditsErase all the edits you made to the program file since the lasttime you saved changes
[F10] - Cancel Edits
Entering Ladder Logic
15-3
Insert, Replace, Delete (IRD) Rung Marking
When you edit a file, the system marks the rung or group of rungs you modify.Table 15.A describes the markings that appear on the power rails of a program file.
Note PLC-5/15 series A processors do not support IRD editing. Edits are automaticallyassembled when you accept the rung.
Table 15.AIRD Marking
Power Rail Meaning
solid double line Rung is part of the program file.I Rung is an addition to be inserted into the program file.D Rung is marked for deletion from the program file.
(Shown only in Remote Run or Remote Test modes)R Rung is going to be replaced by the rung directly
above it if edits are accepted.
You may also see an “E” (error rung) on the power rail; this indicates that the runghas an instruction that cannot be interpreted by the processor. (This instructionappears as ERR on the rung.)
When you accept a rung (press [F10] - Accept Rung), the I rails change to soliddouble lines. In Run mode, the rungs do not change to double lines until youassemble edits.
PrefaceEntering Ladder Logic
15-4
Entering Instructions
When you edit a rung, you can enter instructions or edit existing instructions. Toenter or edit instructions, follow the steps below.
For a rung to beaccepted and saved,it must contain at leastone output instruction.
Press a function key for desired editing function, or type a mnemonic.
(file 2: rung 4)
Rem Prog Forces:None Edits:None Rung:Append 5/15 Addr 20 LIMIT
Branch Append Insert Modify Delete Undel Accept
* Instr Instr Instr Instr Instr Rung
F1 F3 F4 F5 F6 F7 F10
After you create a rung and enter any instructions and branches,press this key to store the rung in the program file.
Ladder EditorMain Menu F10
Edit
F3
Append Rung
F4
Insert Rung
F5
Modify Rung
or
or
If You Want to: Press this Key:
Enter or edit a branch [F1] - BranchAdd multiple instructions to the right of the cursor [F3] - Append InstructionAdd an instruction to the left of the cursor [F4] - Insert InstructionEdit the current instruction [F5] - Modify InstructionDelete the current instruction [F6] - Delete InstructionRe-insert the last deleted instruction [F7] - Undelete InstructionSave the instructions on the current rung [F10] - Accept Rung
When you append or insert an instruction, you can add an instruction by the functionkey or the command line entry method.
Entering Ladder Logic
15-5
With the CMP, CPT, FAL, and FSC instructions, a maximum of 80 characters of theexpression are displayable. If the expression you enter is near this 80 charactermaximum, when you accept the rung containing the instruction, the processor mayexpand it beyond 80 characters. When you try to edit the expression, only the first80 characters are displayed and the rung is displayed as an error rung. The processordoes contain the complete expression, however, and the instruction runs properly.
To work around this display problem, export the processor memory file and makeyour edits in the PC5 text file. Then import this text file.
Function Key Entry:
| I:001 O:005 |+--]/[--------------------------------------------------------------------( )--+| 14 10 || +TON---------------+ |+----------------------------------------------------+TIMER ON DELAY +-(EN)-+| |Timer T4:0| || |Time base 0.01+-(DN) || |Preset 12| || |Accum 0| || +------------------+ |I +TON---------------+ II----------------------------------------------------+TIMER ON DELAY +-(EN)-II |Timer | II |Time base +-(DN) II |Preset | II |Accum | II +------------------+ I
Enter the operand.Enter Timer address>Rem Prog Forces:None Edits:None Instr:Insert 5/15 Addr 20 LIMIT
Press [F6] - TON
adds an instruction
The system:
prompts you forthe timer addressor symbol
1
2
EXAMPLE:
Ladder EditorMain Menu F10
Edit
F3
Append Rung
F4
Insert Rung
F5
Modify Rung
F1
BranchF3
Append Branch
F4
Insert Branch
or
or
or
Note: When Auto Document isenabled, the comment window isdisplayed. For more information onAuto Document, see page NO TAG.
PrefaceEntering Ladder Logic
15-6
Command Line Entry:
| I:001 O:005 |+--]/[--------------------------------------------------------------------( )--+| 14 10 || +TON---------------+ |+----------------------------------------------------+TIMER ON DELAY +-(EN)-+| |Timer T4:0| || |Time base 0.01+-(DN) || |Preset 12| || |Accum 0| || +------------------+ |I +TON---------------+ II----------------------------------------------------+TIMER ON DELAY +-(EN)-II |Timer | II |Time base +-(DN) II |Preset | II |Accum | II +------------------+ I
Enter the operand.Enter Timer address>Rem Prog Forces:None Edits:None Instr:Insert 5/15 Addr 20 LIMIT
Enter:TON,T4:0,1.0,100,0
Enter the instructionand operands,separating each bya space or comma
Example:
Ladder EditorMain Menu F10
Edit
F3
Append Rung
F4
Insert Rung
F5
Modify Rung
or
or
Entering Ladder Logic
15-7
The following table summarizes the options for function key and commandline entry.
If You Want to: Press this Key: For Example:
Specify an instruction by commandline entry
type the 3-letter instruction mnemonic andpress [Enter]
TON [Enter]
Specify an instruction bymenu selection
select one of the mnemonics that appears at thebottom of the Instruction edit screen
For more information about thisoption, see page 15-8.
Specify an instruction and its address after specifying the instruction, type the addressor symbol for the instruction and press [Enter]
See figure on previous page.
Modify an instruction [Alt-B]
Use the arrow keys to move the cursor on thecommand line. Do your editing and press [Enter]
Cancel the edits made on a rung(without saving)
[Escape]
Enter several instructions or an entirerung at once
type each instruction and its parameters asusual, separating each instruction entry with acomma or a space
XIC,I:0/12,MOV,N7:0,N7:12[Enter]
Define a symbol when you enteran instruction
type the instruction and address followed by a @character and the symbol
XIC I:0/12 @INPUT1 [Enter]
Be prompted for instruction parameters type the instruction mnemonic only andpress [Enter]
Page through the availableinstruction mnemonics
[PageUp][PageDown][F10]
Use one of the instructions the appropriate function key
PrefaceEntering Ladder Logic
15-8
Using the Instruction Entry Aid
Figure 15.1 shows the function keys for different classes of instructions. Thesefunction keys appear when you add or modify an instruction. Use Table 15.B to findthe instruction you want to enter.
Figure 15.1Function Keys for Classes of Instructions
Your processor may not support all of theinstructions listed on the screen. The messageFunction not supported in this seriesand revision appears on your screen if youtry to access a non-supported instruction.
You can also use [PageUp] and[PageDown] to page throughthe screens that displayavailable instruction mnemonics.
Press theappropriatefunction key.
I II------------------------------------------------------------------------------II I| ||-------------------------------[END OF FILE]---------------------------------|| |
Press a function key , type a mnemonic, or [PgUp]/[PgDn].(file 2: rung 3)Rem Prog Forces:None Edits:None Instr:Append 5/15 Addr 20 LIMITXIC XIO OTE OTL OTU TON CTU CPT CMP Others
--[ ]-- --[/]-- --( )-- --(L)-- --(U)--F1 F2 F3 F4 F5 F6 F7 F8 F9 F10
If you press F10
the systemdisplays thefunction keys for differentclasses of instructions. SeeTable 15.B to find theinstruction you want to enter.
Entering Ladder Logic
15-9
Press a function key , type a mnemonic, or [PgUp]/[PgDn].(file 2: rung 3)Rem Prog Forces:None Edits:None Instr:Append 5/15 Addr 20 LIMITBit Timer / I/O Compare CPT / Move / File Shift Seqncer More
Counter Message Math LogicalF1 F2 F3 F4 F5 F6 F7 F8 F9 F10
I II------------------------------------------------------------------------------II I| ||-------------------------------[END OF FILE]---------------------------------|| |
Table 15.BUsing the Instruction Entry Aid (Instruction Classes)
If You Press thisFunction Key:
You CanEnter theseInstructions:
If You Press thisFunction Key:
You CanEnter theseInstructions:
If You Press thisFunction Key:
You CanEnter theseInstructions:
[F1] - Bit [F1] - XIC[F2] - XIO[F3] - OTE[F4] - OTL[F5] - OTU[F6] - ONS[F7] - OSR[F8] - OSF[F10] - Others
[F6] - Move/Logical [F1] - MOV[F2] - MVM[F3] - AND[F4] - OR[F5] - XOR[F6] - NOT[F7] - CLR[F8] - BTD[F10] - Others
[F1] - Program Control [F1] - JMP[F2] - LBL[F3] - JSR[F4] - RET[F5] - SBR[F6] - TND[F7] - MCR[F8] - EOT[F9] - AFI[F10] - Others
[F2] - Timer/Counter [F1] - TON[F2] - TOF[F3] - RTO[F4] - CTU[F5] - CTD[F6] - RES[F10] - Others
[F7] - File [F1] - FAL[F2] - FSC[F3] - COP[F4] - FLL[F5] - AVE[F6] - SRT[F7] - STD[F10] - Others
[F2] - Special [F1] - FBC[F2] - DDT[F3] - DTR[F4] - SFR[F5] - PID[F7] - UIE[F8] - UID[F10] - Others
(Continued)
PrefaceEntering Ladder Logic
15-10
If You Press thisFunction Key:
You CanEnter theseInstructions:
If You Press thisFunction Key:
You CanEnter theseInstructions:
If You Press thisFunction Key:
You CanEnter theseInstructions:
[F3] - I/O Message [F1] - BTR[F2] - BTW[F3] - IIN[F4] - IOT[F5] - MSG[F6] - IDI[F7] - IDO[F8] - CIO[F10] - Others
[F8] - Shift [F1] - BSL[F2] - BSR[F3] - FFL[F4] - FFU[F5] - LFL[F6] - LFU[F10] - Others
[F3] - ASCII Control [F1] - ABL[F2] - ACB[F3] - ARD[F4] - ARL[F5] - AWT[F6] - AWA[F7] - AHL[F10] - Others
[F4] - Compare [F1] - CMP[F2] - LIM[F3] - MEQ[F4] - EQU[F5] - NEQ[F6] - LES[F7] - GRT[F8] - LEQ[F9] - GEQ[F10] - Others
[F9] - Sequencer [F5] - DFA[F6] - SDS[F7] - SQI[F8] - SQO[F9] - SQL[F10] - Others
[F4] - ASCII String [F1] - ACN[F2] - ACI[F3] - AIC[F4] - AEX[F5] - ASC[F6] - ASR[F10] - Others
[F5] - CPT/Math [F1] - CPT[F2] - ADD[F3] - SUB[F4] - MUL[F5] - DIV[F6] - SQR[F7] - NEG[F8] - TOD[F9] - FRD[F10] - Others
[F10] - More [F1] - ProgramControl[F2] - Special[F3] - ASCII
Control[F4] - ASCII
String[F10] - Others
Note For more information on these instructions:
· press [Alt-H] and type the three letter mnemonic for the instruction (i.e.,CIO) on the command line; press [Enter] or
· see the Instruction Set Reference manual or Appendix A in the SoftwareConfiguration and Maintenance manual
Entering Ladder Logic
15-11
Entering Branches:
Each output branch you create must contain an output instruction.
| I:001 O:005 |+--]/[--------------------------------------------------------------------( )--+| 14 10 || +TON---------------+ |+----------------------------------------------------+TIMER ON DELAY +-(EN)-+| |Timer T4:0| || |Time base 0.01+-(DN) || |Preset 12| || |Accum 0| || +------------------+ || +MSG--------------------+ |+-----------------------------------------------+SEND/REC MESSAGE +-(EN)-+| |Control Block N7:10+-(DN) || | +-(ER) || +-----------------------+ || || || |
Press a function key for desired branch editing function.(file 2: rung 3)Rem Prog Forces:None Edits:None Rung:Append 5/15 Addr 20 LIMITExtend Extend Append Insert Delete UndelUp Down Branch Branch Branch BranchF1 F2 F3 F4 F6 F7
Ladder EditorMain Menu F10
Edit
F3
Append Rung
F4
Insert Rung
F5
Modify Rung
F1
Branchor
or
If You Want to: Press this Key:Insert an empty branch above an existing branch. The empty branchshares the same start and end points as the existing branch.
[F1] - Extend Up
Insert an empty branch below an existing branch. The empty branchshares the same start and end points as the existing branch.
[F2] - Extend Down
Start a branch to the right of the cursor. [F3] - Append BranchStart a branch to the left of the cursor. [F4] - Insert BranchDelete the current branch. [F6] - Delete BranchRe-insert the last deleted branch. [F7] - Undelete Branch
PrefaceEntering Ladder Logic
15-12
Adding Branches
You can add branches by appending or inserting. Append starts a new, empty branchto the right of the cursor. Insert starts a branch to the left of the cursor. Thefollowing example shows how to append a branch. The procedure is the same forinserting a branch.
I I:000 I:000 I:000 O:005 IIA-]/[-B-]/[-C-] [------------------------------------------------------D-( )-EII 12 11 10 00 I| I:000 O:000 |+--] [--------------------------------------------------------------------( )--+| 10 13 || I:001 O:005 |+--]/[--------------------------------------------------------------------( )--+| 14 10 || +TON---------------+ |+----------------------------------------------------+TIMER ON DELAY +-(EN)-+| |Timer T4:0| || |Time base 0.01+-(DN) || |Preset 12| || |Accum 0| || +------------------+ || +MSG--------------------+ |+-----------------------------------------------+SEND/REC MESSAGE +-(EN)-+
Press a function key or enter a letter to choose branch ending target.(file 2: rung 0)Rem Prog Forces:None Edits:None Rung:Modify 5/15 Addr 20 LIMITTarget Target Target Target Target
A B C D EF1 F2 F3 F4 F5
then select whereto end branch:
Press the functionkey for the target
Return
Type the letterof the targetand press
2
1 If the cursor is here, with targets A, B, and C as shown:
Press this function key if you wantthe branch to start at A and end at B.
For Example:
Ladder EditorMain Menu F10
Edit
F3
Append Rung
F4
Insert Rung
F5
Modify Rung
F1
BranchF3
Append Branch
F4
Insert Branch
or
or
or
or
Entering Ladder Logic
15-13
I I:000 I:000 I:000 O:005 II-+-]/[-+-]/[---] [-------------------------------------------------------( )--II | 12| 11 10 00 II | | II +-----+ II I| I:000 O:000 |+--] [--------------------------------------------------------------------( )--+| 10 13 || I:001 O:005 |+--]/[--------------------------------------------------------------------( )--+| 14 10 || +TON---------------+ |+----------------------------------------------------+TIMER ON DELAY +-(EN)-+| |Timer T4:0| || |Time base 0.01+-(DN) || |Preset 12| || |Accum 0| |
Press a function key for desired editing function, or type a mnemonic.(file 2: rung 0)Rem Prog Forces:None Edits:None Rung:Modify 5/15 Addr 20 LIMITBranch Append Insert Modify Delete Undel Accept
* Instr Instr Instr Instr Instr RungF1 F3 F4 F5 F6 F7 F10
Creating Multiple Branch Levels
You can create a rung that contains as many parallel branches as you need, that is,branches that start and end at the same places on the rung (the only limitation isprocessor memory). You can also create a rung that has a maximum of four nestedbranches (plus the original rung) that do not share a common branch end.
If You Want to Use: Use this Method:
Parallel branches Extend a branch (up/down)Nested branches Create nested branches
(append/insert)
PrefaceEntering Ladder Logic
15-14
Extending a Branch
Extending a branch creates parallel branches. A new, empty branch is extendedeither above ([F1] - Extend Up) or below ([F2] - Extend Down) an existingbranch. The new branch shares the start and end points of the existing branch.Figure 15.2 and Figure 15.3 are examples of Extend Up/Down, created by placingthe cursor on the first instruction of the first rung.
Figure 15.2Example of a Branch Extended Up
I I:000 O:000 II-+-----------------+-]/[-------------------------------------------------( )--II | | 12 13 II |I:000 I:000 I:000| II +-] [---] [---] [-+ II | 10 11 16| II |I:002 | II +-]/[-------------+ II 10 I| I:001 O:005 |+--]/[--------------------------------------------------------------------( )--+| 14 10 || +TON---------------+ |+----------------------------------------------------+TIMER ON DELAY +-(EN)-+| |Timer T4:0| || |Time base 0.01+-(DN) || |Preset 12| || |Accum 0| |
Press a function key for desired editing function, or type a mnemonic.(file 2: rung 1)Rem Prog Forces:None Edits:None Rung:Modify 5/15 Addr 20 LIMITBranch Append Insert Modify Delete Undel Accept
* Instr Instr Instr Instr Instr RungF1 F3 F4 F5 F6 F7 F10
F1
Extend UpLadder EditorMain Menu F10
Edit
F3
Append Rung
F4
Insert Rung
F5
Modify Rung
F1
BranchF3
Append Branch
F4
Insert Branch
or
or
or
Entering Ladder Logic
15-15
Figure 15.3Example of a Branch Extended Down
I I:000 I:000 I:000 I:000 O:000 II-+-] [---] [---] [-+-]/[-------------------------------------------------( )--II | 10 11 16| 12 13 II | | II +-----------------+ II | | II |I:002 | II +-]/[-------------+ II 10 I| I:001 O:005 |+--]/[--------------------------------------------------------------------( )--+| 14 10 || +TON---------------+ |+----------------------------------------------------+TIMER ON DELAY +-(EN)-+| |Timer T4:0| || |Time base 0.01+-(DN) || |Preset 12| || |Accum 0| |
Press a function key for desired editing function, or type a mnemonic.(file 2: rung 1)Rem Prog Forces:None Edits:None Rung:Modify 5/15 Addr 20 LIMITBranch Append Insert Modify Delete Undel Accept
* Instr Instr Instr Instr Instr RungF1 F3 F4 F5 F6 F7 F10
F2
Extend DownLadder EditorMain Menu F10
Edit
F3
Append Rung
F4
Insert Rung
F5
Modify Rung
F1
BranchF3
Append Branch
F4
Insert Branch
or
or
or
PrefaceEntering Ladder Logic
15-16
Creating Nested BranchesYou can create branches that are nested (branches within branches). The nestedbranches you create can contain a:
· combination of condition and output instructions· maximum of five branch levels (four nested levels plus the original rung)
To create a nested branch, follow the procedure used for adding branches.Figure 15.4 shows an example of nested branching.
Figure 15.4Example of Nested Branches
| I:000 I:000 I:000 I:000 O:000 |+-+++-] [---] [---] [-+-]/[-++--------------------------------------------( )--+| ||| 10 11 16| 12|| 13 || |||I:002 | || || ||+-]/[-------------+ || || || 10 || || ||I:003 I:000 || || |+-]/[---] [--------------+| || | 11 10 | || |I:003 | || +-]/[----------------------+ || 12 || I:001 O:005 |+--]/[--------------------------------------------------------------------( )--+| 14 10 || +TON---------------+ |+----------------------------------------------------+TIMER ON DELAY +-(EN)-+| |Timer T4:0| |
Press a function key for desired editing function.(file 2: rung 1)Rem Prog Forces:None Edits:None 5/15 Addr 20 LIMITChange I/O Append Insert Modify Delete Undel Advancd Test CancelMode Edit Rung Rung Rung Rung Rung Editing Edits EditsF1 F2 F3 F4 F5 F6 F7 F8 F9 F10
Ladder EditorMain Menu F10
Edit
F3
Append Rung
F4
Insert Rung
F5
Modify Rung
F1
Branchor
or
Note You can have only four levels of nested branches (plus the original rung) for a totalof five branch levels.
Editing Ladder Logic
16-1
16 Editing Ladder Logic
Chapter Objectives
After you have entered the rungs for your program, you may need to modify them.Use this chapter to learn how to edit your ladder logic.
If You Want to: See Page:
Search for different types of information 16-3Cut, copy or paste 16-16Test your edits 16-22
Note Editing programs online delays the execution of PIIs and STIs.
If you make changes to your program on line while in Remote Run, thehousekeeping portion of your program scan will increase.
PrefaceEditing Ladder Logic
16-2
See Table 16.A for editing operations and times.
Table 16.AEditing Operations and Times
For this editing operation: And this type of program: The times are:
Accept Rung (after inserting, modifying,or deleting a rung edit)
ladder logicother than the edited file 0.35 ms per 1000 words
no labels 3 ms + 0.35 ms per 1000 words
with labels 3.5 ms + 0.35 ms per 1000 words
Test Edits of the program (impacts oneprogram scan)
0.2 ms to change the status of edits from TESTto UNTEST or UNTEST to TEST
Assemble Edits ladder logicno edits pending 0.35 ms per 1000 words
edits pending, no labels 2.0 ms + 1.5 ms per 1000 words
edits pending, with labels 2.0 ms + 1.9 ms per 1000 words
Note If you make changes to your program while in Remote Run mode, the housekeepingportion of your program scan will increase. The online editing time for “AcceptRung” (after inserting, modifying, or deleting rung edit) is 0.3 ms per 1000 words.The editing time for “Test Edits” of the program (impacts one program scan) is0.2 ms to change the status of edits from TEST to UNTEST or UNTEST to TEST. Theediting time for “Assemble Edits” is 0.3 ms per 1000 words.
Editing Ladder Logic
16-3
Searching
You can search for different types of information in a program file. You can searchfor specific items or you can search and replace specific items.
Table 16.BSearch Types
This Search Mode: Lets You Look for: PageNumber:
Assisted Search instructions and addresses by choosing an instruction mnemonicfrom function keys on the screen.
16-4
Standard Search and replace instructions and addresses, search for edit zones,and search for undocumented rungs and instructions.Thestandard search function is the default setting.
16-6
Simple Search instructions and addresses, with the intent of reviewing the targetinstruction and/or address.
Search and Replace instructions and addresses and replace them with newinstructions and addresses. You can replace an instructionwith another instruction; you can replace an address withanother address.
16-10
Search for Edit Zones a group of rungs that you want to insert, delete, or replace. Thesoftware marks the rungs in an edit zone with IRD markings. An Iindicates an insert zone; an R indicates a replace zone; a Dindicates a delete zone. For more information about edit zones,see “IRD Marking”in the previous chapter.
16-12
Search forUndocumented Instructions
rungs or instructions that do not have comment 16-13
Tip You can improve search performance by suppressing the display of page headersbefore beginning the search. When the search is complete, display the page headersagain. For more information on page headers, see chapter 17.
PrefaceEditing Ladder Logic
16-4
Assisted Search Function:
+= Search =====================================================================+| Search Type : ASSISTED SEARCH Search Scope : GLOBAL || Search Direction : DOWN Search Wrap : ON || Search For : |+==============================================================================+| I:000 I:000 O:003 |+--] [---]/[--------------------------------------------------------------( )--+| 02 03 01 || I:000 O:003 |+-++-]/[-+----+-----------------------------------------------------------( )--+| || 12| | 05 || ||I:001| | || |+-]/[-+ | || | 12 | || |I:000 I:000| || +-] [---]/[-+ || 10 11 || +TON---------------+ |
Press a function key , type a mnemonic, or [PgUp]/[PgDn].(file 2: rung 0)Program Forces:None Edits:None 5/40 File DRILL1XIC XIO OTE OTL OTU TON CTU CPT CMP Others
--] [-- --]/[-- --( )-- --(L)-- --(U)--F1 F2 F3 F4 F5 F6 F7 F8 F9 F10
Enter address or instruction to search for.
Press F4
Searchto find the next occurrence of the search item
Ladder EditorMain Menu
F6
Searchor Alt S
Press the appropriatefunction key.(Or Return if you want
to search foran address.)
F6
Current Operand
F4
Search
After you select the mnemonic for which to search,the Assisted Search screen appears with the followingfunction keys:
Ladder EditorMain Menu
F2
Config Display
F9
Assisted Search
To SelectAssisted Search:
To Use Assisted Search:
1
2
Editing Ladder Logic
16-5
If You Want to: Press this Key:
Save configuration characteristicson this screen and on theLadder Editor Configuration screen or save the configurationoptions to disk
[F10] - Save Configuration
For more information about configuring the ladder editordisplay, see chapter 14.
If you make changes on other configuration screens, youmust save the configuration on those screens if you wantthe configurations saved to your user configuration file.
Find the next occurrence of a search item [F4] - SearchStart a search with a different mnemonic [Escape]Configure the search operation [F9] - Search ConfigurationSelect and display the address of the current operand [F6] - Current OperandGo to a specific rung number in a current file number [Enter]Go to a specific rung number in a different program file file number;rung number [Enter]Return to the search screen that displays theinstruction mnemonics
[Escape]
An Assisted Search allows you perform a search without accidentally changing tothe Search and Replace function.
PrefaceEditing Ladder Logic
16-6
Standard Search Function:
To use the standard search function, make sure that your ladder editordisplay is configured for standard search. (See the ladder editorconfiguration information in chapter 14.)
+= Search =====================================================================+| F1 Search Type : SEARCH INST/ADDR Search Scope : GLOBAL || Search Direction : DOWN Search Wrap : ON || Search For : |+==============================================================================+| I:000 I:000 I:000 I:000 O:000 |+-+++-] [---] [---] [-+-]/[-++--------------------------------------------( )--+| ||| 10 11 16| 12|| 13 || |||I:002 | || || ||+-]/[-------------+ || || || 10 || || ||I:003 I:000 || || |+-]/[---] [--------------+| || | 11 10 | || |I:003 | || +-]/[----------------------+ || 12 || I:001 O:005 |
Press a function key for desired searching function.(file 2: rung 1)Rem Prog Forces:None Edits:None 5/15 Addr 20 LIMITSearch Search Current Current Prev Instr Search SaveType Instruc Operand String List Config ConfigF1 F4 F5 F6 F7 F8 F9 F10
current search type
selects the search type
Ladder EditorMain Menu
F6
Searchor Alt S
If You Want to: Select this Type:
Search for instructions and/or addresses Search Instr/AddrSearch for and replace instructions and/or addresses Search & Replace Instr/AddrSearch for edit zones Search For EditsSearch for rungs or instructions without comments Undocumented Rung/Instr
If you press [F4] again after the software finds the first occurrence of the searchstring, the software searches for the next occurrence of the same search string.
Editing Ladder Logic
16-7
If You Want to: Press this Key:
Change the search type [F1] - Search TypeBegin the search, or continue the search after the first occurrenceis found
[F4] - Search
Select and display the mnemonic for the current instruction [F5] - Current InstructionSelect and display the address or symbol of the current instruction [F6] - Current OperandSelect and display both the mnemonic and the address or symbol ofthe current instruction
[F5] then [F6]
Select and display the item you searched for last time [F7] - Previous StringDisplay the list of available mnemonics to help you choose whichinstruction to search for
[F8] - Instruction List
Configure the search operation [F9] - Search ConfigurationSave the configuration options from this screen and the ConfigureLadder Editor screen for future use or to disk
[F10] - Save Configuration
Go to specific rung number number [Enter]Go to a specific rung number in a different program file file number: rung number
[Enter]Exit the search utility [Esc]Abort a search function Ctrl-C
Specifying Addresses
When you specify an address, you do not have to type the entire address.For example:
Enter: To Search for:
I: the next input address in the programI:0 the next instruction that is addressed
by input word 0. Enter a mnemonic andthe address to search for thatspecifically addressed instruction.
* (in place of an actual word or bit value) the next similar instruction. This letsyou find the next occurrence of aninstruction that uses any value in placeof the asterisk.
You cannot search for an indirect address. For example, if you entered I:0/[N7:10],the search function doesnot find that indirect address.
PrefaceEditing Ladder Logic
16-8
Specifying Instructions and Addresses
When you search for instructions or addresses, keep the following rules in mind:
Enter: To Search for:
the entire word a symbolan asterisk in place of an actual operand an instruction that uses any address for
the operandan instruction and bit address specific bit, such as XIC,I:0/0.You have to enter
the instruction with the word or bit address.
When you search for an instruction that is an instruction by itself as well as anoperand of another instruction, the processor finds that instruction if it is on its ownor part of another instruction. For example, the processor would find an EQU usedas a single instruction and a CMP instruction containing an “=” sign.
Specifying Addresses and Bits
When you are on a search screen, you can search for specific addresses or bits bytyping the address or bit you want.
· Address example: If you want to see the next occurrence of an instruction thatuses a specific address, enter O:01.
· Bit Example: If you want to move to the next occurrence of a specific bit,regardless of the associated instruction, enter O:01/0.
In either of the above examples, the system moves the cursor to the next occurrenceof an address or bit that matches the information you typed.
Editing Ladder Logic
16-9
This bit search function works when you program online or offline. If you programonline, the bit search function only works with the following processors:
Processor: Series: Revision: Processor: Series: Revision:
PLC-5/10 A A and later PLC-5/11, -5/20, -5/30 all series allrevisionsPLC-5/12 C and later PLC-5/40, -5/40L revisions
PLC-5/15 B H and later PLC-5/60, -5/60LPLC-5/80
PLC-5/25 A D and later PLC-5/20E, -5/20C, -5/26,-5/40E, -5/40C, -5/46,-5/60C, -5/80E, -5/80C,-5/86, -5/V30, -5/V40,-5/V40, -5/V80
In PLC-5/10 series A, rev A and later, PLC-5/12 rev C and later, PLC-5/15 series B,rev H and later, and PLC-5/25 series A, rev D and later processors, you have to typea complete instruction mnemonic and its address to find a bit address.
PrefaceEditing Ladder Logic
16-10
Search and Replace:
+= Search =====================================================================+| F1 Search Type : SEARCH & REPL INST/ADDR Search Scope : RLL || Search Direction : DOWN Search Wrap : ON || Search For : XIC || F3 Replace With : |+==============================================================================+| I:000 I:000 I:000 I:000 O:000 |+-+++-] [---] [---] [-+-]/[-++--------------------------------------------( )--+| ||| 10 11 16| 12|| 13 || |||I:002 | || || ||+-]/[-------------+ || || || 10 || || ||I:003 I:000 || || |+-]/[---] [--------------+| || | 11 10 | || |I:003 | || +-]/[----------------------+ || 12 |
Press a function key for desired replace function or <ESCAPE> to quit.(file 2: rung 1)Rem Prog Forces:None Edits:None 5/15 Addr 20 DRILL1Search Replace Search Replace Replace Replace Replace Search SaveType With Search to Rung All Config ConfigF1 F3 F4 F5 F6 F7 F8 F9 F10
+= Search =====================================================================+| F1 Search Type : SEARCH & REPL INST/ADDR Search Scope : RLL || Search Direction : DOWN Search Wrap : ON || Search For : || Replace With : |+==============================================================================+| I:000 I:000 I:000 I:000 O:000 |+-+++-] [---] [---] [-+-]/[-++--------------------------------------------( )--+| ||| 10 11 16| 12|| 13 || |||I:002 | || || ||+-]/[-------------+ || || || 10 || || ||I:003 I:000 || || |+-]/[---] [--------------+| || | 11 10 | || |I:003 | || +-]/[----------------------+ || 12 |
Press a function key for desired searching function or enter a search string.
(file 2: rung 1)Rem Prog Forces:None Edits:None 5/15 Addr 20 DRILL1Search Search Current Current Prev Instr Search SaveType Instruc Operand String List Config ConfigF1 F4 F5 F6 F7 F8 F9 F10
Press this key to entera replacement string
F6
Search
Ladder EditorMain Menu
F1
Search Type
Press this keyto look for thesearch target
(until Search & Replappears)
Press a function key to specify what to replace.
Editing Ladder Logic
16-11
Note When you search for an address specified to the bit level, for example I:0/3, andwant to replace it with I:3/3, make sure that you specify the replace string as I:3/3or I:3/*.
Note You can search for CAR instructions, but you cannot search and replace CARinstructions. For more information on CAR instructions, see the Instruction SetReference manual.
Do not search for an indirect address as part of a bit address. The search functiondoes not find these occurrences.
If You Want to: Press this Key:
Change the search type. [F1] - Search TypeSpecify the string with which to replace the search target. [F3] - Replace WithFind the first occurrence of the search target. [F4] - SearchReplace the search target, that the system just found, with thereplace string.
[F5] - Replace
Replace the search target, that the system just found, with thereplace string and find the next occurrence of the search target.
[F6] - Replace Search
Replace all occurrences of the search target, starting with this rungand ending with the rung number you specify. The systempromptsyou for a rung number.
[F7] - Replace to Rung
Replace all occurrences of the search target with the replace string. [F8] - Replace AllConfigure the search operation. [F9] - Search ConfigurationSave the configuration options to disk. [F10] - Save ConfigurationGo to a specific rung number. rung number [Enter]Go to a specific rung number in a different program file. file number; rung number
[Enter]Return to the Search & Replace Instr/Addr screen. [Esc]
To avoid accidentally changing from Search to Search and Replace, use AssistedSearch. See page 16-4 for more information about Assisted Search.
PrefaceEditing Ladder Logic
16-12
Search for Edit Zones:
An edit zone is a group of rungs that you want to insert, delete, or replace. Thesoftware marks the rungs in an edit zone with IRD markings. An I indicates aninsert zone; an R indicates a replace zone; a D indicates a delete zone. Follow thesteps on the left.
+= Search =====================================================================+| F1 Search Type : SEARCH FOR EDITS Search Scope : RLL || Search Direction : DOWN Search Wrap : ON |+==============================================================================+| I:000 I:000 I:000 I:000 O:000 |+-+++-] [---] [---] [-+-]/[-++--------------------------------------------( )--+| ||| 10 11 16| 12|| 13 || |||I:002 | || || ||+-]/[-------------+ || || || 10 || || ||I:003 I:000 || || |+-]/[---] [--------------+| || | 11 10 | || |I:003 | || +-]/[----------------------+ || 12 || I:001 O:005 |+--]/[--------------------------------------------------------------------( )--+
Press a function key for desired searching function.(file 2: rung 1)Rem Prog Forces:None Edits:None 5/40 Addr 20 LIMITSearch Search Search Search Search Search SaveType Ins Zon Rep Zon Del Zon All Zon Config ConfigF1 F5 F6 F7 F8 F9 F10
Press the appropriatefunction key.
F6
Search
Ladder EditorMain Menu
F1
Search Type
(until Search forEdits appears)
The Search for Edit Zones is not available with a PLC-5/15 processor.
If You Want to: Press this Key:
Change the search type [F1] - Search TypeSearch for an insert zone [F5] - Search Insert ZoneSearch for a replace zone [F6] - Search Replace ZoneSearch for a delete zone [F7] - Search Delete ZoneSearch for the next edit zone [F8] - Search All ZoneConfigure the search operation [F9] - Search ConfigurationSave the configuration options for future use to disk [F10] - Save ConfigurationGo to specific rung number number [Enter]Go to a specific rung number in a different program file file number;rung number [Enter]Exit the search utility or abort a search operation [Esc]
Editing Ladder Logic
16-13
Search for Undocumented Instructions:
+= Search =====================================================================+| F1 Search Type : UNDOCUMENTED RUNG/INST Search Scope : RLL || Search Direction : DOWN Search Wrap : ON |+==============================================================================+| I:000 I:000 I:000 I:000 O:000 |+-+++-] [---] [---] [-+-]/[-++--------------------------------------------( )--+| ||| 10 11 16| 12|| 13 || |||I:002 | || || ||+-]/[-------------+ || || || 10 || || ||I:003 I:000 || || |+-]/[---] [--------------+| || | 11 10 | || |I:003 | || +-]/[----------------------+ || 12 || I:001 O:005 |+--]/[--------------------------------------------------------------------( )--+
Press a function key for desired searching function.(file 2: rung 1)Rem Prog Forces:None Edits:None 5/40 Addr 20 LIMITSearch Uncmntd Uncmntd Search SaveType Rung Instr Config ConfigF1 F5 F6 F9 F10
F6
Search
Ladder EditorMain Menu
F1
(untilUndocumentedRung/Inst appears)
Press the appropriate function key.
Search Type
If You Want to: Press this Key:
Change the search type [F1] - Search TypeSearch for the next rung that does not have a comment [F5] - Uncommented RungSearch for the next instruction that does not have a comment [F6] - Uncommented InstructionConfigure the search operation [F9] - Search ConfigurationSave the configuration options to disk [F10] - Save ConfigurationGo to specific rung number number [Enter]Go to a specific rung number in a different program file file; rung [Enter]Exit the search utility or abort a search operation [Esc]
PrefaceEditing Ladder Logic
16-14
Configuring Search Operations
+= Search =====================================================================+| Search Type : SEARCH INST/ADDR F7 Search Scope : RLL || F8 Search Direction : DOWN F9 Search Wrap : ON || Search For : XIC |+==============================================================================+| I:000 I:000 I:000 I:000 O:000 |+-+++-] [---] [---] [-+-]/[-++--------------------------------------------( )--+| ||| 10 11 16| 12|| 13 || |||I:002 | || || ||+-]/[-------------+ || || || 10 || || ||I:003 I:000 || || |+-]/[---] [--------------+| || | 11 10 | || |I:003 | || +-]/[----------------------+ || 12 || I:001 O:005 |
Press a function key to configure search range.(file 2: rung 1)Rem Prog Forces:None Edits:None 5/15 Addr 20 LIMIT
Toggle Direct Wrap SaveScope Up/Down On/Off ConfigF7 F8 F9 F10
Press the appropriatefunction key.
F6
Ladder EditorMain Menu
F9
Search Config
Search
Press this key tosave the changes.
If You Want to: Press this Key:
Select between File, Global, RLL, SFC, and STxT. File specifies searchfunctions for only the current file; Global specifies search functions for allladder, SFC, and STxT files. RLL specifies search functions for all theladder files. SFC specifies search functions for all the SFC files, STxTspecifies search functions for all the structured text files in the currentprocessor or processor memory file. The default is RLL.
[F7] - Toggle Scope
Select between Up and Down as directions for the search operation. Upspecifies to search up in the file from the current rung; Down specifies tosearch down in the file from the current rung. The default is Down.
[F8] - Direct Up/Down
Select between On and Off for file wrap. On specifies that when theprocessor reaches the end of the scope (such as file), the processorgoes to the other end of the scope and continues the search. Offspecifies that when the processor reaches the end of the scope, theprocessor stops the search. The default is On.
[F9] - Wrap On/Off
Save the configuration options on this screen for future use or to disk. [F10] - Save ConfigurationUse the configuration options you specify for this editing session only. [Enter] then [Esc]
You can search ladder, SFC, and structured text files using different search scopes.Selecting a search scope differs with the file you search and the search type selected(see Table 16.B for search types).
Editing Ladder Logic
16-15
This Search Scope: Searches: Used in:
Global all ladder files, SFC files, andStructured Text files
Assisted and Standard SimpleSearches only
RLL (relayladder logic)
all ladder files All searches
SFC all SFC files Assisted and Standard SimpleSearches only
ST all Structured Text files Assisted and Standard SimpleSearches only
FILE only the ladder file where the instructioncursor is located when the searchis initiated
All searches
PrefaceEditing Ladder Logic
16-16
Cutting, Copying, and Pasting
The advanced editing function of the ladder editor provides capabilities to cut, copy,and paste rungs within a file and between files. You can use the cut, copy, and pasteutility when you program on line or off line, but if you are on line, the processormust be in Remote Program or Program mode.
| I:000 I:000 I:000 I:000 O:000 |+-+++-] [---] [---] [-+-]/[-++--------------------------------------------( )--+| ||| 10 11 16| 12|| 13 || |||I:002 | || || ||+-]/[-------------+ || || || 10 || || ||I:003 I:000 || || |+-]/[---] [--------------+| || | 11 10 | || |I:003 | || +-]/[----------------------+ || 12 || I:001 O:005 |+--]/[--------------------------------------------------------------------( )--+| 14 10 || +TON---------------+ |+----------------------------------------------------+TIMER ON DELAY +-(EN)-+| |Timer T4:0| |
Press a function key for desired editing function.(file 2: rung 1)Rem Prog Forces:None Edits:None 5/15 Addr 20 LIMITSelect Cut Copy Paste Copy Paste
To Disk Fr DiskF1 F2 F3 F4 F7 F8
Press the appropriatefunction key
F10
Ladder EditorMain Menu
F8
Advanced Edit
Edit
If You Want to: Press this Key:
Identify the first rung in the block of rungs to be cut or copied. Usethe up or down arrow keys to select multiple rungs.
[F1] - Select
Remove the selected group of rungs from the program file and storethose rungs in the temporary buffer. The software deletes anything inthis buffer when you exit the software.
[F2] - Cut
Copy the selected group of rungs into the temporary buffer. Thesoftware deletes anything in this buffer when you exit the software.
[F3] - Copy
Paste the rungs stored in the temporary buffer above thecurrent rung.
[F4] - Paste
Copy the rungs in the temporary buffer to a disk file. [F7] - Copy to DiskPaste the rungs that are stored in a disk file to the current programfile. This places the stored rungs above the current rung.
[F8] - Paste from Disk
Editing Ladder Logic
16-17
Note Rungs cut or copied from a program file created with release 5.0 or later softwarecannot be pasted into a program file created with release 4.5 or earlier software (5.0program files are not backward-compatible with 4.5 programs). You can, however,paste rungs from a 4.5 program file into a 5.0 program file (paste rungs areupward-compatible).
Note If you are in the advanced editing functions with selected rungs and then change toRun mode, those selected rungs may not display correctly on the screen. The rungsstill exist and they are not altered, but they may not display correctly on the screen.
Cutting, Copying, and Pasting with the Buffer
The software places the specified rungs in the temporary buffer when it cuts orcopies. While the rungs are in the temporary buffer, you can paste the rungs in aprogram file associated with the current processor. The rungs stay in the buffer untilyou perform another cut or copy, or until you leave the ladder editor.
To Paste: Do this:
in a different program filewhile monitoring a file
1. Press [F4] - Program Directory from the Ladder Editor Main Menu2. Select another program file3. Press [F8] - Monitor File4. Go to Advanced Editing3. Press [F8] - Monitor File4. Go to Advanced Editing5. Cursor to the rung where you want to insert the rung.6. Press [F4] - Paste
in a different programfile while in theprogram directory
and press [F8] - Monitor File
Cursor to where you want to insert a rung.
Press [F4] - Paste.the rungs stored in thetemporary buffer
and press [F4] - Paste
Move cursor tobeginning of blockof rungs you wantto cut or copy
Move cursor toend of block ofrungs you want tocut or copy
To Cut or Copy:
F10
Ladder EditorMain Menu
F8
Advanced Edit
Edit
F1
Select
F2
CutF3
Copyor
PrefaceEditing Ladder Logic
16-18
Before a paste occurs, the width of comments and symbols in the temporary pastebuffer is compared to the current database width and one of the followingactions result:
If the Paste Width: Then the Paste Operation:
Equals database width Proceeds normallyIs less than database width Proceeds normallyIs greater than database width Halts until you choose to either paste rungs without instruction
comments and symbols or abort the paste operation
Editing Ladder Logic
16-19
Cutting, Copying, and Pasting with Disk Files
To cut, copy, and paste rungs with disk files, follow the steps on the left.
| += D:\IPDS\ARCH\PLC5\*.CR5 ==============+ |+-----------------------------------| Name Size Date Time |-+| |----------------------------------------| || | COPIED1 70 5-03-89 11:59a | || | COPY1 231 5-29-90 9:17a | || | TEST 196 6-17-90 2:07a | || | | || T4:20 | | |+--] [------------------------------| |-+| DN | | ||+= Paste Information ============+ | | ||| | | | ||| Doc. Mode: MERGE WITH DATABASE | | | ||| Sym. Mode: DISCARD PST SYMBOL | | | |+| |-| |-+|+================================+ +========================================+ || | 1| | -1| || |Source B 5| |Mask FFFF| |
Enter the paste file name.(file 2: rung 0) Rem Prog Forces:NoneEdits:None 5/15 Addr 20 LIMITBegin Documnt Symbol BeginPaste Mode Mode ViewF1 F5 F6 F10
Enter fileto paste in
Move thecursor to therung abovewhich youwant to pastethe rungs.
To Paste:
F8
Paste from Disk
Use these keys to toggle through thedocumentation and symbol mode optionsfor the paste (see table on page 16-20)
Press thiskey to beginthe paste.
F10
Ladder EditorMain Menu
F8
Advanced Edit
Edit
Cut or copya set of rungs
F7
Copy to Disk
Enter the name of the filewhere you want to hold therungs currently stored inthe temporary buffer
F1
Begin Copy
F8
YesF10
No
To Cut or Copy:
PrefaceEditing Ladder Logic
16-20
If You Want to: Press this Key:
If two addresses with different symbols conflict, document mode resolves theconflict. See below.Ignore documentation in the paste file that conflictswith the existing database and merges symbols fromthe existing database with those in the paste file
[F5] - Document ModeMerge with Database
Use the documentation and symbols in the paste file tooverwrite those in the existing database.
[F5] - Document ModeOverwrite Database
If two addresses with the same symbol conflict, symbol mode resolves the conflict.See below.Ignore symbols in paste file that conflict with symbolsin the program file
[F6] - Symbol ModeDiscard Paste Symbol
Reassign a symbol in program file to the addressassociated with the symbol in the paste file
[F6] - Symbol ModeReassign Symbol
Create a new symbol in paste file if symbol alreadyused in program file
[F6] - Symbol ModeCreate New Symbol
Paste files have the extension .CR5. The paste from disk operation does not placethe rungs from the paste file into the temporary buffer; it puts them directly in theprogram file.
Viewing a Paste File
You can view the rungs in a paste file before you complete the paste. You can cursorthrough the paste file using the arrow keys, [PageUp] and [PageDown], [HOME],and [END] keys.
Enter paste file nameor cursor to file F10
Begin ViewEsc
Press to return to thePaste from Disk screen.
Note You cannot edit rungs while using the View function. Also, the View function doesnot display any documentation associated with rungs in the paste file.
Editing Ladder Logic
16-21
Handling Paste Errors
When you perform a paste operation, the system checks the data table assignmentsfor the paste rungs with those for the program file. If the rungs in the paste file usedata table addresses that do not conflict with those of the program file, the pasteoperation completes successfully.
The paste operation does not overwrite data table values in the program file withthose of the paste rungs. However, when you paste DFA, PID, BTR, BTW,CIO, MSG, and SDS instructions, the control blocks associated with thoseinstructions overwrite the control blocks in the program file to which you pastethose instructions.
If any address in the paste file cannot be created in the program file, the systemrecords those errors in the paste log file (IPDS\ARCH\PLC5 or user-defineddirectory). Instructions not supported by the processor are also logged to this file.This log file is an ASCII file that uses the same name as the paste file you specifiedand the extension .ER5. To look at the contents of this file, you need to exit theprogramming software and use DOS commands or another text editor.
The paste log file is not deleted until you paste from the same paste file again.
PrefaceEditing Ladder Logic
16-22
Testing Your Edits
When you edit a program online in Remote Run or Remote Test mode, you can testyour changes without making them a permanent part of the current program file.This is a useful debugging tool on a processor that supports edit zones (allprocessors except PLC-5/15 series A), because the changes remain marked until youassemble the edits into a permanent working program.
Make sure the processor is in Remote Runor Remote Test mode.
| I:000 I:000 I:000 I:000 O:000 |+-+++-] [---] [---] [-+-]/[-++--------------------------------------------( )--+| ||| 10 11 16| 12|| 13 || |||I:002 | || || ||+-]/[-------------+ || || || 10 || || ||I:003 I:000 || || |+-]/[---] [--------------+| || | 11 10 | || |I:003 | || +-]/[----------------------+ || 12 || I:001 O:005 |+--]/[--------------------------------------------------------------------( )--+| 14 10 || +TON---------------+ |+----------------------------------------------------+TIMER ON DELAY +-(EN)-+| |Timer T4:0| |
Press a function key for desired editing function.(file 2: rung 1)Rem RUN Forces:None Edits:Testing 5/25 Addr 20 LIMITChange Untest AssmbleMode Edits EditsF1 F9 F10
F10
Ladder EditorMain Menu
Edit
do editing
F9
Test Edits
F8
YesF10
No
or
Mode: Action:
Edits: Testing The rungs marked I are executed andrungs marked D or R are ignored.
Edits: Disabled The rungs marked I are ignored andrungs marked D or R are executed.
Note Before you can assemble edits, you must test the edits.
When you enter the Test Edits screen, the mode is Edits Testing. This means that theprocessor runs all insert (I) zones in the program file. Also, the processor does notrun the delete (D) and replace (R) edit zones. For more information on IRD zones,see the section “IRD Rung Marking” in chapter 15.
Editing Ladder Logic
16-23
To return to Edits Disabled mode, press [F9] - Untest Edits. This means thatthe processor ignores all insert (I) zones and runs all delete (D) and replace(R) zones.
If You Want to: Press this Key:
Change processor mode [F1] - Change ModeHave the processor run I zones and ignore D and R zones [F9] - Test EditsHave the processor stop running I zones and return to runningD and R zones
[F9] - Untest Edits
Make the edit changes become permanent ladder logic in thecurrent program file
[F10] - Assemble Edits
PrefaceEditing Ladder Logic
16-24
Documenting Ladder Programs
17-1
17 Documenting Ladder Programs
Chapter Objectives
As you enter the rungs in your ladder program, document what each instruction orrung does for someone else who may be maintaining the program.
If You Want to: See Page:Enter instruction, address, or rung comments 17-3Enter symbols 17-16Use the database editor 17-18
PrefaceDocumenting Ladder Programs
17-2
Getting Started Documenting Program Files
The documentation you create is stored in a database on the computer harddisk. The database editor lets you create cross references and search for documentedand undocumented rungs, instructions, and addresses, as well as addresseswithout symbols.
| I:000 I:000 I:000 I:000 O:000 |++++-] [---] [---] [-+-]/[-++--------------------------------------------( )--+| ||| 10 11 16| 12|| 13 || |||I:002 | || || ||+-]/[-------------+ || || || 10 || || ||I:003 I:000 || || |+-]/[---] [--------------+| || | 11 10 | || |I:003 | || +-]/[----------------------+ || 12 || I:001 O:005 |+--]/[--------------------------------------------------------------------( )--+| 14 10 || |+ || |
Press a function key for desired document function.
Rem Prog Forces:None Edits:NoneRung Instruc Address Edit Modify Remove Save &
Comment Comment Comment DBASE Symbol Symbol ContnueF1 F2 F3 F5 F6 F7 F10
Ladder EditorMain Menu
F5
Documentationor Alt T
If You Want to: Press this Key:Describe a rung. [F1] - Rung CommentDescribe an instruction and address pair. [F2] - Instruction CommentDescribe an address. [F3] - Address CommentUse the database editor to manipulate all of the comments orsymbols for a processor memory file.
[F5] - Edit Database
Assign a symbol to an address or change an existing symbol. [F6] - Modify SymbolRemove the symbol from the current address. [F7] - Remove SymbolSave your work in the database. If you are editing online, thissaves just the database files to disk. If you are editing offline,this saves the processor memory and database files to disk.
[F10] - Save & Continue
Documenting Ladder Programs
17-3
Entering Comments
To enter comments, follow the steps on the left.
If You Want to: Press this Key:
Specify where to add a comment.
[PageUp][PageDown]Display the editing menu. Press a function key.Delete the current comment. [F1] - Delete CommentRe-insert the last deleted comment where the cursor is. Thisoverwrites any existing comment.
[F2] - Undel Comment
Delete the line the cursor is on from the current comment. [F3] - Delete LineRe-insert the last deleted line from a comment. [F4] - Undel LineDelete the word the cursor is on from the current comment. [F5] - Delete WordRe-insert the last deleted word from a comment. [F6] - Undel WordGo to the Advanced Editing screen. [F7] - Advanced EditingSave the current comment, leave the text editor, and return to theprevious screen.
[F8] - Accept/Exit
Save the current comment and move the cursor to the next rung,instruction, or address that you can comment.
[F9] - Next Comment
Save the current comment and move the cursor to the previous rung,instruction, or address that you can comment.
[F10] - Prev Comment
Exit current comment without saving. [Esc]
The software uses temporary storage areas called delete buffers (one buffer for rungcomments and one buffer for both instruction and address comments). There arefour delete buffers, one for each text type. These text types are 80 character widecomments, 10-20 character wide comments, and 80 character wide structured text.The four delete buffers are text (entire text), line, word, and temporary cut/paste.
Ladder EditorMain Menu
F5
Documentationor Alt T
Cursor to whereto add comments
Press the appropriatefunction key
PrefaceDocumenting Ladder Programs
17-4
The comment buffers temporarily store the last deleted instruction, address, or rungcomment. The term “last deleted” means that each (rung, address, and instructioncomment) buffer only stores one comment at a time. The comment delete buffers aredifferent than the buffer that stores rungs from cut and copy operations.
For example, if the instruction comment buffer contains a previously deleted XICinstruction comment and you delete an XIO instruction comment, the XIO commentoverwrites the XIC comment in the buffer. The XIO comment now becomes the“last deleted” comment and is the only comment retained in the instructioncomment buffer. These comment buffers are only cleared when you return to the6200 main menu, so you may delete a comment and undelete it on another rung.
Note When the Auto Document feature is enabled, the comment window is displayed. Formore information on Auto Document, see page NO TAG.
Note Databases for comments and symbols created with release 4.4 software are notcompatible with release 4.3 software. Comments and symbols databases created,edited, or saved with release 5.0 are not compatible with any earlier releases.
Note You can read databases produced by release 4.5 or earlier software usingrelease 5.0 and later. However, if you modify a database created by earlier versionsof 6200 programming software, it is marked as 5.0 and is not compatible withdatabases produced by releases prior to 5.0.
Note In release 4.5 and later, 6200 programming software checks the revision level of thecomments and symbols database. If the database is not supported by 6200programming software, the software displays an error message and comments andsymbols are suppressed.
Documenting Ladder Programs
17-5
Page Headers and Page Breaks
Page headers and page breaks let you document your ladder program. You enterpage headers and page breaks in the same window as rung comments. Use pageheaders to include a table of contents (title page) or to indicate different functionalareas of your ladder program. Use page breaks to paginate or insert blank pages intoyour ladder listing report.
Page headers and breaks are processed in printed reports when formattingcommands are active. Page headers are displayed on the terminal in the ladder logic(when display page headers is enabled) and in printed ladder listing reports.
When you enter page headers or page breaks, keep the following general rulesin mind:
· The dot (.) of the command must be the first non-whitespace character of therung comment line.
· The dot commands are visible only in the rung comment and thedatabase editors.
· Enter page headers and breaks on separate lines. Placing page header and breakcommands on lines with rung comments negates the dot command.
· Commands .he, .header, .bp, .pg, and .page are not case sensitive, i.e., .he =.He = .HE = .hE; .header = .Header = .HEADER; .bp = .BP = .bP; .pg =.PG = .pG; and .page = .Page = .PAGE, etc.
· Rung comments are entered as you would normally.
Page headers also follow these rules:
· Delimiters (any non-alphanumeric, non-whitespace character) are used toposition the text left, right, or centered. Delimiters specify text justification:/Left Section/Center Section/Right Section. You cannot use aperiod (.) or dash (-) as a delimiter.
· Maximum number of characters for a page header is 76. This is in addition tothe page header command (.he).
· You can have multiple header commands in a rung comment, but only the lastheader in the rung comment is displayed on the terminal in the ladder logic. Allheader commands are processed for the ladder listing report.
Tip You can use multiple formatting commands in a single rung comment to create atable of contents or title page for your printed report. For example:
.pg1This is the title page for my project
.he //This is a centered page header
PrefaceDocumenting Ladder Programs
17-6
· Use the format: .he (or .header) <space> page header text to enter apage header.
.he //Reset line section
| +MUL--------------------+ |+-----------------------------+---------------------+MULTIPLY ++-+| | |Source A S:30|| || | | 0|| || | |Source B 0.2000000|| || | | || || | |Destination T4:0.PRE|| || | | 0|| || | +-----------------------+| |
This rung comment:
Displays this header: Reset line section| +MUL--------------------+ |+-----------------------------+---------------------+MULTIPLY ++-+| | |Source A S:30|| || | | 0|| || | |Source B 0.2000000|| || | | || || | |Destination T4:0.PRE|| || | | 0|| || | +-----------------------+| |
Page breaks follow these specific rules:· Use .bp (or .pg or .page) <space> [pagenumber] to enter a page break in a
rung comment.· The .bp command issues a form feed and begins a new page.· If [pagenumber] is present in the command line, page number is set to
[pagenumber]. If no page number is specified, the current page number willnot be reset and the pages continue consecutively.
· The [pagenumber] must be between 1 and 32,767 (inclusive).
.pg 3
.he //Reset line section
| +MUL--------------------+ |+-----------------------------+---------------------+MULTIPLY ++-+| | |Source A S:30|| || | | 0|| || | |Source B 0.2000000|| || | | || || | |Destination T4:0.PRE|| || | | 0|| || | +-----------------------+| |
This command line:
Displays this page break whenyou view and print the report:
| -TON- 2:1 ||T4:0.DN || -]/[- 2:0 ||Rung 2:1 || || || || || Mon Sep 19, 1994 Page 3 ||Program Listing Report PLC-5/40 File HCO_310 Rung 2:1 |+= ESC exits ==================================================================+
Documenting Ladder Programs
17-7
Advanced Editing
To perform advanced editing tasks such as cutting, copying, pasting, aligning textand searching, follow the steps on the left.
Ladder EditorMain Menu
F5
Documentationor Alt T
Cursor to whereto add comments
Press the appropriatefunction key
F7
Advanced Editing
This is a rung comment. It is the first rung comment. This is a test.
| I:001 O:002 |+--] [--------------------------------------------------------------------(L)--+| 02 03 || +PID--------------------+ |+----------------------------------------------------+PID +-+| |Control block N7:20| || |Process variable N7:10| || |Tieback N7:15| || |Control variable N7:25| || +-----------------------+ || |+--------------------------------[END OF FILE]---------------------------------+
Press a function key or enter text editor key.(File 2: Rung 0)Rem Prog Mode:Insert Wrap-On Left Col:71 Line:1 5/40 File BATCH40BSelect Cut Copy Paste Wrd Wrap Search Copy Paste Center Save
Off To Disk Fr Disk ConfigF1 F2 F3 F4 F5 F6 F7 F8 F9 F10
If You Want to: Follow these Steps:Select a region of text. Press [F1] - Select
You must select the beginning and endof the region you want to select.
Cut a region of text. Select the region and press [F2] - Cut.Copy a region of text. Select the region and press [F3] - CopyPaste a region of text. Select the region you want to paste.
Cut or copy the region and press[F4] - Paste.
Prevent words from splitting into two parts at the end ofa line.
Press [F5] - Word Wrap Off/On.
Search for a string of text. Press [F6] - SearchCopy the contents of the paste buffer to disk. Press [F7] - Copy to Disk.Copy any paste files from a disk. Press [F8] - Paste From Disk.Center your text on a line. Press [F9] - Center/Left Justify.Save your configuration of the text editor. Press [F10] - Save Config.
PrefaceDocumenting Ladder Programs
17-8
Searching for and Replacing Comment Text
To search for a particular string of comment text and replace it with a new string oftext, follow the steps on the left.
This is a rung comment. It is the first rung comment. This is a test.
-- Search For: ------------------------- Replace With: -------------------------+--] [--------------------------------------------------------------------(L)--+| 02 03 || +PID--------------------+ |+----------------------------------------------------+PID +-+| |Control block N7:20| || |Process variable N7:10| || |Tieback N7:15| || |Control variable N7:25| || +-----------------------+ || |+--------------------------------[END OF FILE]---------------------------------+
Press a function key for desired searching function.(File 2: Rung 0) ÛRem Prog Dir:Down Wrap:On Col:71 Line:1 5/40 File BATCH40BEnter Enter Goto Search Replace Replace Replace Directn Wrap Save
Src Str Rep Str Line Search All Up Off ConfigF1 F2 F3 F4 F5 F6 F7 F8 F9 F10
Press a function key to specify what to replace.Use the table on page 17-9.
Press this key to enterthe search string.
This is a rung comment. It is the first rung comment. This is a test.
-- Search For: ------------------------- Replace With: -------------------------+--] [--------------------------------------------------------------------(L)--+| 02 03 || +PID--------------------+ |+----------------------------------------------------+PID +-+| |Control block N7:20| || |Process variable N7:10| || |Tieback N7:15| || |Control variable N7:25| || +-----------------------+ || |+--------------------------------[END OF FILE]---------------------------------+
Press a function key for desired searching function.(File 2: Rung 0)Rem Prog Dir:Down Wrap:On Col:71 Line:1 5/40 File BATCH40BEnter Enter Goto Search Replace Directn Wrap Save
Src Str Rep Str Line All Up Off ConfigF1 F2 F3 F4 F7 F8 F9 F10
1
2Press this keyto enter the replacement string.
3 Press this key to start the search.
4
Ladder EditorMain Menu
F5
Documentation
or Alt T
Cursor to whereto add comments
Press the appropriatefunction key
F7
Advanced Editing
F6
Search
Documenting Ladder Programs
17-9
If You Want to Replace: Press this Key:
The search string with the replacement string and move the cursor tothe end of the replacement string.
[F5] - Replace
The search string with the replacement string and move the cursor tothe next occurrence of the search string.
[F6] - Replace Search
Every occurrence of the search string with the replacement string andmove the cursor to after the last occurrence of the search string.
[F7] - Replace All
Copying to Disk Files
To copy the contents of the paste buffer to a disk file, follow the steps on the left.
Ladder EditorMain Menu
F5
Documentation
or Alt T
Cursor to whereto add comments
Press the appropriatefunction key
F7
Advanced Editing
F7
Copy to Disk
If you enter a filename that already exists, the Copyto Disk Paste File Directory appears (shown below).If the filename does not already exist, the pastebuffer is copied to that file.
This is a rung comment. This is the first rung comment. This is a test.
| I:001 O:002 |+--] [--------------------------------------------------------------------(L)--+| 02 03 || +PID--------------------+ |+----------------------------------------------------+PID +-+|+=File Name======================+ |Control block N7:20| ||| | |Process variable N7:10| ||| File Selected: | |Tieback N7:15| ||| | |Control variable N7:25| ||+= Press ESC to exit ============+ +-----------------------+ || |+--------------------------------[END OF FILE]---------------------------------+
Press a function key or enter the paste file name.(File 2: Rung 0)Rem Prog Mode:Insert Wrap-On Left Col:1 Line:1 5/40 File BATCH40BBegin PasteCopy DirctryF1 F10
Press this key to begin the copy.
Press this key to view the Copy to Disk Paste File Directory.
PrefaceDocumenting Ladder Programs
17-10
Press [F8] - Yes to confirmthe copy or [F10] - No toabort the copy.
This is a rung comment. This is the+= C:\IPDS\ARCH\PLC5\*.C80 ==============+| Name Size Date Time ||----------------------------------------|| KELLY 10 2-09-93 11:50am || || |
| I:001 | | |+--] [------------------------------| |-+| 02 | | || | | |+-----------------------------------| |-+|+=File Name======================+ | | ||| | | | ||| File Selected: KELLY | | | ||| | | | ||+= Press ESC to exit ============+ +========================================+ || |+--------------------------------[END OF FILE]---------------------------------+
Press a function key or enter the paste file name.(File 2: Rung 0)Rem Prog Mode:Insert Wrap-On Left Col:62 Line:1 5/40 File BATCH40BBeginCopy
F1
Press this key to begin the copy.
Documenting Ladder Programs
17-11
Pasting from Disk Files
To paste the contents of a disk file, follow the steps on the left.
This is a rung comment. This is the+= C:\IPDS\ARCH\PLC5\*.C80 ==============+| Name Size Date Time ||----------------------------------------|| KELLY 10 2-09-93 11:50a || || |
| I:001 | | |+--] [------------------------------| |-+| 02 | | || | | |+-----------------------------------| |-+| | | || | | || | | || | | || +========================================+ || |+--------------------------------[END OF FILE]---------------------------------+
Press a function key or enter the paste file name.(File 2: Rung 0) 0Rem Prog Mode:Insert Wrap-On Left Col:62 Line:1 5/40 File BATCH40BBegin BeginPaste ViewF1 F10
Press this key tobegin the paste. Press this key to view the contents of the paste buffer.
== Comment Display For SFC: sfc_mcp ==========================================Check the valve to see if it is open.If it is, then we’ll need to close it before continuing. Otherwise, we cancontinue on to the next step.
-- Search For: -----------------------------------------------------------------
START+-----+-----++=====+=====+| |+=====+=====+
|-------------+-------------+------+------+-------------+-------------+
| | | | |- 13 -+- 13 -+- 13 -+- 13 -+- 13 ON -+- 13
Press a function key for desired searching function.MONITOR 2:(0,0) > 0Rem Prog Dir:Down Wrap:On Col:1 Line:1 5/40 Addr 51 DEMONP5CEnter Goto Search Directn Wrap Save
Src Str Line Up Off ConfigF1 F3 F4 F8 F9 F10
Ladder EditorMain Menu
F5
Documentation
or Alt T
Cursor to whereto add comments
Press the appropriatefunction key
F7
Advanced Editing
F8
Paste from Disk
PrefaceDocumenting Ladder Programs
17-12
The text editor creates three different paste file types, one for structured text, one foraddress and instruction comments, and another for rung and function chartcomments. The extensions for these file types are .STX, .C10, and.C80, respectively.
The difference between these paste file types is the way they handle carriage returns.See the following table.
For this PasteFile Type:
and a Line of Text Ending with aCarriage Return Preceded by aBackslash (\):
and a Line of Text Ending with aCarriage Return Not Preceded by aBackslash (\):
.C10 or .C80 a carriage return is inserted a carriage return is not inserted(autofill or wrap forces a new line)
.STX a carriage return is not inserted(autofill or wrap forces a new line)
a carriage return is inserted
Viewing Rung Comments
Rung comments are viewed by pressing the [Alt] and [V] keys (as shown on theleft). The first six lines of a comment are displayed. Use the [uparrow] and[downarrow] keys to move through the rung comments.
-- Search For: -----------------------------------------------------------------+--] [--------------------------------------------------------------------(L)--+| 02 03 || +PID--------------------+ |+----------------------------------------------------+PID +-+| |Control block N7:20| || |Process variable N7:10| || |Tieback N7:15| || |Control variable N7:25| || +-----------------------+ || |+--------------------------------[END OF FILE]---------------------------------+
Press a function key for desired searching function.(File 2: Rung 0) 0Rem Prog Dir:Down Wrap:On Col:1 Line:1 5/40 File BATCH40BEnter Goto Search Directn Wrap Save
Src Str Line Up Off ConfigF1 F3 F4 F8 F9 F10
Alt V
Enter 6200 softwarefrom a screen thatshows rungs
This is a rung comment. This is the first rung comment.This is a test.
Documenting Ladder Programs
17-13
Documentation Rules and ConventionsRung, instruction, and address comments apply the following guidelines:
Comment Type: Size: Assigned to:
Rung 65535 - (the total number ofrung comment and SFCcomment lines available perprocessor/processormemoryfile used in the database) lineslong by 80 characters/line
The main output instruction and address pairon the cursored rung, or main operand of themain output instruction if the instruction andaddress pair has multiple operands.
Instruction 5 lines, 10-20 characters/line The main operand on the cursored instruction.Address 5 lines, 10-20 characters/line Any valid ladder logic address. If an instruction
comment exists for an instruction/addresspair,the instruction comment appears in the ladderlogic display at every occurrence of theinstruction/addresspair.
The main operand of an instruction that has multiple addresses depends on theinstruction. For example, the main operand of a block transfer instruction is thecontrol address, but the main operand of an instruction with two sources is the firstsource. The best way to determine the main operand of an instruction is to place thecursor on the instruction and press [F8] - Data Monitor from the Ladder Editormain menu. The software displays the data monitor screen for the main operand ofthe current instruction.
When you enter comments, keep the following rules in mind:
· You can only enter a rung comment after the rung contains anoutput instruction. A rung comment uses the first (top) output instruction toidentify itself.
· [F9] - Next Comment does not advance past the END OF FILE rung anddoes not wrap to the top of the program. Similarly, [F10] - PreviousComment does not back up past the first rung, nor does it wrap to the bottom ofthe program.If you use the Auto Document feature of the ladder editor, you cannot move offthe cursored rung until the rung is accepted from the rung editing mode.
· You can also enter comments with the database editor. Press [F5] - EditDatabase from the ladder editor or press [Alt-T] from the Data Monitorscreen or the Processor Status screen. The software displays the Database Editorscreen. For more information about using the database editor, see “Using theDatabase Editor” on page 17-18.
Note The [Alt-T] key sequence is active in the Processor Status screen for ClassicPLC-5 processors only.
PrefaceDocumenting Ladder Programs
17-14
· You can assign instruction or address comments (excluding symbols) toinstructions with label operands (i.e., LBL, JMP, SBR, ISR); you cannot assigninstruction or address comments (including symbols) to instructions withoutoperands (i.e., MCR) or optional numeric operands (i.e., IIN and IOT withnumeric values).
· If both an instruction comment and an address comment exist for an instruction,the software displays the instruction comment while viewing ladder logic.
· Rung comments are associated with the top-most or first output instruction andaddress on the rung; they are not tied to the rung number. Therefore, if you usethe same output instruction and address on more than one rung, each of thoserungs has the same rung comment.
For example, the following situations will have different rung comments:
· the same address for different output instructions· the same instruction with different addresses
Editing Keys for Comments
If You Want to: Press this Key:
Move the cursor to the beginning of the current line. If the cursor isalready at the beginning of the line, move the cursor to the beginning ofthe previous line.
[Ctrl-B][Ctrl-a][Home]
Move the cursor to the end of the current line. If the cursor is at the end,move the cursor to the end of the next line.
[Ctrl-E][Ctrl-'][End] (first time)
Move the cursor to the next word. [Ctrl-N]Move the cursor to the previous word. [Ctrl-P]Move the cursor one tab. [Tab]
[Ctrl-I]Move the cursor one character in the corresponding direction. [a]
['][b ][y ]
Move the cursor one character to the left. [left arrow][Ctrl-D]
Move the cursor one character to the right. ['][Ctrl-F]
Delete the current line. [Ctrl-X]Delete from the cursor to the beginning of the current line. [Ctrl-U]
(Continued)
Documenting Ladder Programs
17-15
If You Want to: Press this Key:
Delete the character to the left of the cursor. [Backspace][Ctrl-H]
Delete the character the cursor is on. [Del]Delete the previous word. [Ctrl-J]Start or stop marking an area to be cut or copied into the cut/copy buffer. [Ctrl-V]Copy the selected range. [Ctrl-R]Cut the selected range. [Ctrl-W]Insert the contents of the cut/copy buffer at the cursor position. [Ctrl-L]Toggle between insert and overstrike mode when you type comments. [Ins]
[Ctrl-A]Start a new line. [Enter]
[Ctrl-M][Return]
Cursor to the beginning of the text. [Home][Home][Home][Ctrl-Home]
Move up 1 page. [PageUp]Move down 1 page. [PageDown]Move to first visible row in the first column. [Home][Home]Move to last visible row in last column. [End][End]Cursor to the end of an edit zone. [End][End][End]
[Ctrl-End]Move to first character on the line. [Home]Move to last character on the line. [End]Discard text. Press [F8] - Yes to save your modifications or [F10] - No todiscard your modifications. If you have modified this text, the Escapeafter Modifications screen appears.
[Esc]
View online help. [Alt-H]Change processor mode. [Alt-C]Go to the first visible line on the screen. [Ctrl-PageUp]
[Ctrl-y ]Go to the last visible line on the screen. [Ctrl-PageDown]
[Ctrl-b ]Dump screen to a file. [Ctrl-Z]Insert an ASCII character. ASCII Character
PrefaceDocumenting Ladder Programs
17-16
Entering Symbols
You can assign symbols to addresses. Symbols identify addresses by names thatmight be more meaningful than the alphanumeric addresses. For example, you couldassign the symbol “LS_1” to the input address “I:000/01”, indicating that this inputcorresponds to “Limit Switch #1”. The documentation you create is stored in adatabase. The database editor lets you create cross references and search fordocumented and undocumented rungs, instructions, and addresses, as well asaddresses without symbols.
To assign a symbol to an address, follow the steps on the left.
A symbol must contain at least one alpha-character and can contain between10 and 20 (depending on default database width) of the following:
· A - Z (both upper and lower case)· 0 - 9· underscore (_) (not in the first position)· pound sign (#) (not in the first position)· period (.) (not in the first position)
Note You can enter a symbol using lower case, but the software automatically converts itto all upper case. For example, the software interprets “Upload” and “UPLOAD”as the same symbol. Make sure that you do not solely use upper or lower case todistinguish one symbol from another.
Once you assign a symbol to an address, you can use the symbol instead of theaddress anywhere in the Ladder Editor.
When you assign symbols to addresses, keep the following in mind:
· All symbols appear in upper case.· If you enter blanks in a symbol, the blanks appear as underscore characters.· You can press [F9] - Next Instruction or [F10] - Previous
Instruction to accept the current symbol and move to the next or previousinstruction in the program.
Ladder EditorMain Menu
F5
Documentationor Alt T
Cursor to instructionthat uses the addressfor which you want todefine a symbol
F6
Modify Symbol
Enter the symbol
Documenting Ladder Programs
17-17
The following considerations apply to multi-operand instructions:
· When you press [Enter] after typing in a symbol, the software accepts thesymbol and moves the cursor to the next address/symbol in the instruction. Ifthe cursor is on the last address of the instruction, the system returns you to theDocumentation screen.
· You can use [F7] - Next Address and [F8] - Previous Address toaccept the current symbol and move to the next or previous address in theinstruction. The [up arrow] and [down arrow] also perform thesame functions.
When the ladder editor is configured to display symbols, the symbol appears insteadof the address. For example, if you assigned the symbol LIMIT to the address I:00,the system will display this symbol combined with the bit address, LIMIT/03. Thiscombination is for display purposes only; the system does not add it to thecomments/symbols database. If you assign a symbol to the complete address I:00/03(for example, SWITCH1), the system displays SWITCH1 instead of thecombination LIMIT/03.
You can also define symbols independently from the programming software (in anASCII file) and import the results to the documentation database. For informationabout creating and importing ASCII documentation files, see chapter 6 in the“Working with Files” section of this manual.
PrefaceDocumenting Ladder Programs
17-18
Using the Database Editor
The database editor provides access to all the comments and symbols for a processormemory file. The database stores program documentation separately from theprogram logic. With the database editor, you can modify, delete, or insert addresses,symbols, and comments into the database.
The database editor does not display instruction or address comments that areassociated with label numbers or subroutine file numbers.
The Database Editor screen has four windows, each for a different type of databaseinformation. These types are:
· addresses and symbols (default)· address comments· instruction comments· rung comments
Tip 6200 software supports any ASCII extended character. The following table listssome of the international ASCII characters available.
To Getthis Character:
Press this Combination of Keys:
ü Alt 0 (zero)â Alt =é Alt shift dash¥ Alt '(right arrow key)¢ Alt a (left arrow key)
Documenting Ladder Programs
17-19
Use [rightarrow][leftarrow] to move the cursor to the window youwant to modify
+======================================================++-Adr Cmt--++-Ins Cmt--+| Address: || ||this is || I:000/10 || ||from push || || ||button 1 || Symbol: PUSHBUTTON || || || || || |+======================================================++----------++----------+------------------------Rung Comment Instruction: ----------------------------
--------------------------------------------------------------------------------
Press a function key or arrow key, or enter new address or existing symbol.>Rem Prog Dbase mode:AddressDBASE Delete Search Relate Modify Remove CreateMode Entry DBASE to Cmt Symbol Symbol X-RefF1 F2 F3 F5 F6 F7 F9
Ladder EditorMain Menu
F5
Documentationor Alt T
F5
Edit Database
To Select an Address:Use [uparrow][downarrow]to move through theaddresses in the database
Enter the address
Press Home Endor
or
or
If You Want to: Press this Key:1
Select from Address, Symbol, Cross Reference Address, and DataTable Address modes.
[F1] - Database Mode
Delete the comments and symbol for the current address from thedatabase. There is no undelete function to recover information onceyou delete it from the database.
[F2] - Delete Entry
Search the database. [F3] - Search DatabaseRemove the comments and symbols from the current address andassign them to a new address.The software prompts you to enter an address that does not havecomments and symbols associated with it.
[F5] - Relate to Comment
Assign a new symbol to the current address. [F6] - Modify SymbolRemove the symbol associated with the current address. [F7] - Remove SymbolGenerate a cross reference report. [F9] - Create X-RefMove the cursor to the window for the type of information you wantto modify.
['][a]
(Continued)
PrefaceDocumenting Ladder Programs
17-20
If You Want to: Press this Key:1
Select an address. [b ][y ]address [Enter][Home] or[End]
Displays the next address. If the cursor is at the bottom of theaddress, symbol, or cross reference database, the cursor wraps tothe beginning.
[b ]
Display the previous address. If the cursor is at the top of theaddress, symbol, or cross reference database, the cursor wraps tothe end.
[y ]
Go to the first element in the database for the currentdatabase mode.
[Home]
Go to the last element in the database for the currentdatabase mode.
[End]
Exit the database editor. [Esc]1The available function keys depend on the Database window you choose. This table describes the tasks you can perform onthe Address/Symbol window.
Multiple users can access the comments/symbols database and the I/O configurationinformation simultaneously. However, only one user can write to thecomments/symbols database at a single time (the second user will receive anerror message).
In order for all users to access comments/symbols information and I/O configurationinformation, you can do the following:
1. Make multiple copies of the database and put the copies in different directories.Use File Utilities, [F4] - Copy.
2. Using the Define Directory function, change the paths to thedifferent directories.
3. Create multiple backup directories. See the Software Configuration andMaintenance manual for more information.
Note If you create multiple copies of your database, you can use the 6200 series softwareMerge function to merge several files into one file. For more information onmerging files, see chapter 5.
Multiple users can attach to different processors without any restrictions.
Documenting Ladder Programs
17-21
Setting the Default Database Width
You can specify the default width of your database for comments and symbols to bebetween 10 and 20 characters. Once set, it remains the default until you change it orexit the software without saving the configuration. Any new databases you createwill use the default width but previously created comments and symbols databasesdo not change. Follow the steps on the left to configure a new default width.
Note The 6200 programming software can read any database that is 10 to 20 characterswide, regardless of what you have set as your default for new databases.
Note Databases created in release 5.0 and later are not compatible with earlier releasesof 6200 programming software.
To change the width of existing databases, see chapter 5.
Saving your new default writes the information to the configuration file.
Address Comment Window
The keys for the Address Comment window are the same as for the Address/Symbolwindow, except for the following:
If You Want to: Press this Key:
Change the current address comment. [F5] - Modify Comment
Function keys [F6] and [F7] are not active for this window.
6200Main Menu
F6
F8
Software Config
Com/Sym Width
Enter DefaultWidth
PrefaceDocumenting Ladder Programs
17-22
Instruction Comment Window
The function keys for this window are the same as for the Address/Symbol window,except for the following:
If You Want to: Press this Key:
Change the current instruction comment. [F5] - Modify CommentSelect the instruction that you wantto comment.
[F6] - Select Instruction
Display the next instruction commentassociated with the current address.
[F7] - Next Instruction
If you press [F6] - Select Instruction, the system displays function keysthat you can use to choose an instruction. These function keys are the same as theinstruction aid that the ladder editor provides for entering instructions. You can alsouse the [PageUp] and [PageDown] arrow keys to move through the key selections.
Rung Comment Window
The function keys for the Rung Comment window are exactly the same as for theInstruction Comment window.
Documenting Ladder Programs
17-23
Choosing the Database Mode
The database address mode that you choose determines what information you wantto access. The following table lists the available modes.
If You Want to Access: Choosethis Mode:
Notes:
Rung, instruction, andaddress comments inthe database
Address If you select this mode, the database editor gives you access to all theaddresses that have comments,symbols, or both that are in thedatabase. These addresses are not necessarily used by the currentprocessor memory file.
Addresses that arerelated to symbols inthe database
Symbol If you select this mode, the database editor gives you access to all theaddresses in the database that have symbols related to them. Theseaddresses are not necessarily used by the current processor memory file.
Cross referencedatabase
CrossReference
If you select this mode, the database displays all addresses in the crossreference database. If you select cross reference mode, the databaseeditor switches to the cross reference database.If no cross reference database exists, the software does not allow you toselect this mode. You must first generate cross reference information. Togenerate a cross reference database, press [F9] - Create X-Ref.When you switch to this mode and the current address does not exist inthe cross reference database, the systemdisplays the closest match.
Data table DataTable If you select this mode, the database editor displays all the addresses fora data type that exist in the data table. This information does not includeindirect addresses.The wrap feature does not apply when you use data table mode. Forexample, if the current address is N7:0 and you press [y ], the systemdisplays the following message:DATA TABLE FILE BOUNDARY REACHED
PrefaceDocumenting Ladder Programs
17-24
Searching the Database
or [Enter] to find thenext occurrence ofthe search item The software searches for the closest match to the item you
specified. If the software cannot find the item you specify, thesoftware displays an error message and leaves the cursor at itscurrent place in the database.
When you search for comment text, the systemchanges the database mode to Address.
+======================================================++-Adr Cmt--++-Ins Cmt--+| Address: || ||this is || I:000/10 || ||from push || || ||button 1 || Symbol: PUSHBUTTON || || || || || |+======================================================++----------++----------+------------------------Rung Comment Instruction: ----------------------------
+----Search Type: Address----------------------------------------------------+| Search for: |+----Replace With: -----------------------------------------------------------+
Press a function key or enter a search string.>Rem Prog Dbase mode:AddressDBASE Search Relate Modify Remove SearchMode to Cmt Symbol Symbol TypeF1 F4 F5 F6 F7 F9
Ladder EditorMain Menu
F5 or Alt T
F5
Edit Database
F3
Search Database
Press this key to select the type of search you want to perform.Enter the search string
Press F4
Search
Documentation
Documenting Ladder Programs
17-25
Type: If You Want to Search for: Select this Search Type:
Address Addresses AddressAddresses without symbols Address without a symbol
Address Comment A specific string within an address comment Address comment textA specific string of address comment textand replace that string
Address comment text/Replace
An address without an address comment Undocumented address/Addresscomment
Instruction Comment A specific string within anaddress/instructioncomment
Instruction comment text
A specific string of instruction comment textand replace that string
Instruction comment text/Replace
An address without an instruction comment Undocumented address/Instructioncomment
Rung Comment A specific string within a rung comment Rung comment textA specific string of rung comment text andreplace that string
Rung comment text/Replace
An address without a rung comment Undocumented address/Rungcomment
All Comment Types A specific string of comment text Any comment textA specific string of comment text andreplace that string (see page 17-8)
Any comment text/replace
Database Search Rules
When you search the database for an address or symbol, the editor searches for theaddress or symbol. If the editor cannot find exactly what you specify, the editorsearches for the closest match. The closest match is based on alphabetical order.
Addresses and symbols are stored in alphabetical order, so when you specify asearch for a database item, the editor follows this search order:
· database item equal to what you specified· next database item greater than what you specified· next database item less than what you specifiedFor example, if you search for C4:0 and that address does not exist in the database,the editor searches for the closest match that is greater than the address youspecified (such as T4:0). If no address exists that is greater than C4:0, the editor thensearches for the closest match that is less than the address you specified (suchas B3:0).
PrefaceDocumenting Ladder Programs
17-26
Searching for and Replacing Comment Text
If you select the search type Any comment text/Replace, Any commenttext, Address without a symbol, or Address, the software searches theappropriate comment database for the search string you specify. When the softwarefinds the text, you can replace that text with new text. To search for and replace text,follow the steps on the left.
Enter the search string.
to find the next occurrence of the search item
If search string is found, enter the replacement string.Press a function key to choose a replace function.
+======================================================++-Adr Cmt--++-Ins Cmt--+| Address: || ||this is || I:000/10 || ||from push || || ||button 1 || Symbol: PUSHBUTTON || || || || || |+======================================================++----------++----------+------------------------Rung Comment Instruction: ----------------------------
+----Search Type: Address----------------------------------------------------+| Search for: |+----Replace With: -----------------------------------------------------------+
Press a function key or enter a search string.>Rem Prog Dbase mode:AddressDBASE Search Relate Modify Remove SearchMode to Cmt Symbol Symbol TypeF1 F4 F5 F6 F7 F9
Ladder EditorMain Menu
F5 or Alt T
F5
Edit Database
F3
Search Database
Press this key until the search you want appears.
Press F4
Search
Documentation
Converting .ACH Files to/from .AF5 Files
A-1
A Converting .ACH Files to/from.AF5 Files
Note If you need to convert PLC-5 files to PLC-5/250 files for your application, seeappendix A in the PLC-5/250 Programming Software Programming manual.
Appendix Objectives
This appendix explains how to use the utility to convert an offline processormemory file created on a software release 3.3 or earlier to a format that can be usedwith release 4.1 or later.
If You Want to: See Page:
Convert files from .ACH to .AF5 format A-3Convert files from .AF5 to .ACH format A-5
Note You must use this utility to edit existing files with release 4.1 or later software.
Note You must have enough disk space to run this utility. The converted file is at leastdouble the size of the original archive file. Make sure you have enough disk spacebefore starting this utility.
PrefaceConverting .ACH Files to/from .AF5 Files
A-2
How the Conversion Utility Works
This utility takes a processor memory archive file and converts the file into aformat that can be used with 4.1 or later software. The .ACH format used withpre-4.1 software is converted to the .AF5 format.
Note This utility does not delete the original archive file.
The destination filename is the same as the source filename, except the system usesa different extension (.AF5) and creates several files for the converted file. Thedestination files are placed in the same directory as the original file (the default is\IPDS\ARCH\PLC5).
Note Note that the new processor memory file is made up of several files, not just one.ACH file as in previous versions.
Any errors the system encounters or messages the system displays during theconversion are written to a log file with the same filename as the original file andwith the extension .CON. This log file is stored in the same directory as the originalfile (the default is \IPDS\ARCH\PLC5).
Converting .ACH Files to/from .AF5 Files
A-3
Converting Files from .ACH to .AF5
To use this utility, follow the steps below.
6200Main Menu F4
Offline ConfigF10
File Convert Util
or6200
Main Menu F1
Online ProgF2
Save/RestoreF4
Restore ProgF10
File Convert Util
F8
Select Format
F8
Select Format
+========================= PLC-5 PROGRAMMING SOFTWARE =========================+| || A 6200 Series S+=== D:\IPDS\ARCH\PLC5\*.ACH ==========+| | Name Size Date || Copyright 1986, 1995, +--------------------------------------+| All Rights| BATCH 1548 09-25-90 || | BATCHIMP 1548 09-28-90 || Release x.x | TEST1 1548 09-25-90 || | || This software is licensed to: Comp| || Loca| || | || Serial Number: AA0A| || | || | || | || | |+=======================================+===Old 6200 Format====================+
Press a function key or enter file name>
Convert Convert Define SelectOne All Dir FormatF1 F2 F7 F8
Enter the file to convert and F1
Convert Oneor F2
Convert All
PrefaceConverting .ACH Files to/from .AF5 Files
A-4
+========================================+| ROCKWELL SOFTWARE INC. || 6200 SERIES SOFTWARE ||PROCESSOR MEMORY FILE FORMAT CONVERSION |+========================================+
Source File. . . . .:BATCH.ACH PLC-5 File. .:ODestination File . .:BATCH.AF5Log File . . . . . .:BATCH.CON
+==============================================================================+|** INITIALIZING ** ||** INITIALIZATION COMPLETE ** ||** CONVERTING - BATCH.ACH ** || || || || || |+==============================================================================+
Press F3 to abort>
AbortUtilityF3
F3
Abort Utility
to abort the utility.
The name of the source filename you selected appears as the source (.ACH), thedestination (.AF5) and the log file (.CON). The file currently being converted islisted in the right corner of this window, in the PLC-5 File: field.
Any messages or errors encountered during the conversion appear in the StatusField (the middle of the screen), and a copy of the message or error is listed in thelog file.
Note If you convert all of the files at one time, all messages or errors for all of the filesare stored in one log file (the filename of the very first file in the list).
Note If the message INSUFFICIENT DISK SPACE TO CONTINUE appears, the systemdid not have enough space on the disk to finish the conversion. Clean your hard diskof unnecessary files and start the utility again.
Converting .ACH Files to/from .AF5 Files
A-5
Converting Files from .AF5 to .ACH
If you need to convert an .AF5 file back to the .ACH format, do the following:
Note The .ACH processor memory file format can only be used with PLC-5/10, -5/12,-5/15 and -5/25 processors.
1. Start at the DOS command line.
2. Change directories to /IPDS/ATTACH/PLC5 (if you are not already there).
3. Type the following command:
AF5TOACH path filename [Enter]
Where:
· path - is the DOS directory where the .AF5 file is stored and where theconverted file will be placed. This field is optional. If no path is specifiedthe software looks for the file in the default \IPDS\ARCH\PLC5 directory.
· filename - is the .AF5 filename (no extension) of the processor memoryfile to be converted.
The file is converted and has the same filename with a .ACH extension.
PrefaceConverting .ACH Files to/from .AF5 Files
A-6
Converting 6200 Series (.AF5 Files) to/from A.I. Series or WINtelligent LOGIC 5 (.X5 Files)
B-1
B Converting 6200 Series (.AF5 Files)to/from A.I. Series or WINtelligentLOGIC 5 (.X5 Files)
Appendix Objectives
You can convert ladder logic, symbols, descriptions, and rung comments betweenprogramming formats in a PLC logic file. The following sections detail theconversion process between 6200 series, A.I. Series, and WINtelligent LOGIC 5PLC-5 programming software.
If You Want to: See Page:
Convert 6200 series (.AF5 files) to A.I. Series or WINtelligent LOGIC 5 (.X5 files) B-3Convert A.I. Series or WINtelligent LOGIC 5 (.X5 files) to 6200 series (.AF5 files) B-5Perform a partial conversion (processor memory files or comments andsymbols only)
B-7
Note For 6200 programming software and PLC-5 processors to work properly, processormemory files need to be in the .AF5 format (.AF5 extension). Any other externalprocessor memory file format must be converted to the .AF5 format.
Note The following table lists the default directory for 6200 series, A.I. Series, andWINtelligent LOGIC 5 PLC-5 programming software:
Product: Default User Directory:
6200 \IPDS\ARCH\PLC5 1
A.I. \PLC5\PROGS 1
WINtelligent LOGIC 5 \ICOM\WINAB5\PROJECTS 2
1 These are the default directory paths assigned by 6200 programming software.2 The WINtelligent LOGIC 5 user directory is not assigned by 6200 programming software; if you
want to import/export to WINtelligent LOGIC 5 software, select [F2] - AI/WL5 Dir from the UserDirectories screen and enter the location of your WINtelligent LOGIC 5 files.
PrefaceConverting 6200 Series (.AF5 Files) to/from A.I. Series or WINtelligent Logic 5 (.X5 Files)
B-2
For detailed information about the conversion between programming packages, seethe following table.
A.I. and WINtelligentConverts From:
Feature: 6200 Characteristics:A.I. and WINtelligentLOGIC 5Characteristics:
6200 to A.I. andWINtelligentLOGIC 5
A.I. andWINtelligentLOGIC 5 to 6200
Address Comments 1 10- 20 characters x 5 lines 9- 15 characters x 5 lines Yes YesInstruction Comments 10- 20 characters x 5 lines not supported Yes 2 N/ARung Comments 80 characters x 65535 lines 3 64K characters per rung Yes Yes 4
SFC Comments 80 characters x 65535 lines 64K characters perstep/transitioncomment
Yes Yes
Symbols 10- 20 characters x 1 line 9- 15 characters x 1 line Yes YesSymbols attachedto labels 5
not supported 9- 15 characters x 5 lines N/A N/A
Page Headers 6 76 characters x 1 line 80 characters x 1 line No No 4, 7
Word-wrap supported not supported N/A N/ACentering supported not supported 8 N/A N/AData Table File Name not supported 10 characters x 1 line N/A N/AData Table Description not supported 40 characters x 1 line N/A N/AProgram File Description not supported 50 characters x 1 line N/A N/ARevision History Notes not supported can be created each time
project is savedN/A N/A
I/O Configuration Data stored in comments/symbolsdatabase
stored separately No No
1 Address comments are called instruction descriptions in A.I. and WINtelligent LOGIC 5 PLC-5 programming software.2 Instruction comments are converted to address comments, or instruction descriptions, in A.I. and WINtelligent LOGIC 5 PLC-5 programming software.3 The 65535 lines reflects the maximum number of lines per project, including rung comments, address comments, SFC comments, etc.4 With A.I. and WINtelligent LOGIC 5 programming software, you can attach the rung comments to the rung number. When you export database comments to the*.TXT file, A.I. and WINtelligent LOGIC 5 programming software automatically converts the attached mode to the output on that rung.
5 Cannot be entered or displayed in 6200 PLC-5 programming software.6 Page headers are called page titles in A.I. and WINtelligent LOGIC 5 PLC-5 programming software.7 When you export from A.I. programming software, the *.TXT file appends the page titles to the end of the rung comment. When you import the *.TXT file into 6200programming software, the A.I. page titles appear at the end of the page title of the given rung.
8 WINtelligent LOGIC 5 supports the justification (left, right, and center) of instruction descriptions only.
Converting 6200 Series (.AF5 Files) to/from A.I. Series or WINtelligent LOGIC 5 (.X5 Files)
B-3
Converting 6200 Series (.AF5 Files) to A.I. Series orWINtelligent LOGIC 5 (.X5 Files)
From the 6200 Main Menu screen, follow the steps on the left and below to convertthe processor file from 6200 series native format (.AF5 files) to A.I. Series orWINtelligent LOGIC 5 (.X5 files).
F7
File Utilities
F7
6200Main Menu
Export
+========================= PLC-5 PROGRAMMING SOFTWARE =========================+| || A 6200 Series S+=== C:\IPDS\ARCH\PLC5\*.AF5 ==========+| | Name Size Date || Copyright 1986, 1995, +--------------------------------------+| All Rights| BATCH 14976 01-09-92 || | BATCH30 15488 01-09-92 || Release 4.x | BATCH40 19072 02-10-92 || | BATCHES 18560 12-19-91 || This software is licensed to: Comp| CHANNEL 2688 08-30-91 || Loca| EXPORT 18560 12-19-91 |+= EXPORT 6200 TO AI/WINLOGIC 5 ======+ | EXPSFC 20608 08-30-91 || | | FIRST 10880 08-29-91 || SOURCE: | | GAMUTLAB 31360 07-25-91 || | | LIMIT 14976 12-19-91 || DESTIN: | | LIMIT1 2688 08-20-91 || | | LIMIT2 80 03-18-91 |+= ESC exits =========================+=+======================================+
Press a Function Key or Enter File Name>
Begin Select Enter Select DefineOper Source Destin Data DirF1 F3 F4 F6 F7
Enter file to convert or cursor to file
3
1
4
F1
Begin Oper
Press this key to select a source.2 Press this key to enter a destination.Enter the name of the .X5 file.
5
F8
6200 To AI/WL5
If the destination you specify already exists, the systemasks if youwant to overwrite the existing PMF and/or database.
If You Want to: Press this Key:Start the export operation [F1] - Begin OperationSelect the source file for the export operation [F3] - Select SourceDefine the destination filename for the export operation 1 [F4] - Enter DestinationSelect both processor memory files and comments and symbols for the conversion configuration (default)orSelect either processor memory files or comments and symbols for the conversion configuration. Formore information, see page B-7.
[F6] - Select Data
Define the directories where you want to store the A.I./WINtelligentLOGIC 5 processormemory/commentsand symbols, backup processor memory/commentsand symbols, processormemory/commentsand symbols, documentation reports, exported files, user configuration, or EthernetWHO files
[F7] - Define Directories
1 Files will be stored in the default directory for A.I. and WINtelligent LOGIC 5 processor memory files and comments and symbols.
PrefaceConverting 6200 Series (.AF5 Files) to/from A.I. Series or WINtelligent Logic 5 (.X5 Files)
B-4
+------------------------------------------------------------------------------+| PLC-5 Ladder Logistics (c) 1987-95 RSI 6200 Import Module v7.21 ||Offline Project:TE62 F10,ALT-H=Help PLC-5 Addr:1 |+------------------------------------------------------------------------------++------------------------------------------------------------------------------+| Converting 6200 Data Base to AI Format |+------------------------------------------------------------------------------+| ||6200 Data Base :e:\ipds\arch\plc5\TE62.* ||AI Data Base :e:\plc5\progs\TE62.* || ||Address :N7:3/04 ||Symbol :VACUUM ||Ins Description :Vacuum Motor is On ||Rung Description: ||When the penny gets stuck in the vacuum brush, if the vacuum is off, toggle it||on. || || || |+------------------------------------------------------------------------------++------------------------------------------------------------------------------+
Note For 6200 programming software and PLC-5 processors to work properly, processormemory files need to be in the .AF5 format (.AF5 extension). Any other externalprocessor memory file format must be converted to the .AF5 format.
The processor memory files and/or database are now ready for use with eitherA.I. Series or WINtelligent LOGIC 5. The 6200 database files are exported into theA.I./WINtelligent LOGIC 5 database in their native format.
Converting 6200 Series (.AF5 Files) to/from A.I. Series or WINtelligent LOGIC 5 (.X5 Files)
B-5
Converting A.I. Series or WINtelligent LOGIC 5 (.X5 Files)to 6200 Series (.AF5 Files)
From the 6200 Main Menu screen, follow the steps on the left and below to convertthe processor file from A.I. Series or WINtelligent LOGIC 5 (.X5 files) to the 6200series native format (.AF5 files).
Note You can only convert processor memory files one at a time.
Enter file to convert or cursor to file
If the destination you specify already exists, the systemasks if youwant to overwrite the existing PMF and/or database.
+========================= PLC-5 PROGRAMMING SOFTWARE =========================+| || A 6200 Series S+=== C:\PLC5\PROGS\*.X5 ===============+| | Name Size Date || Copyright 1986, 1995, +--------------------------------------+| All Rights | BATCHEXP 2959 02-10-92 || | || Release 5.x | || | || This software is licensed to: Comp| || Loca| |+= IMPORT 6200 FROM AI/WINLOGIC 5 ===+ | || | | || SOURCE: | | || | | || DESTIN: | | || | | |+= ESC exits =========================+=+======================================+
Press a Function Key or Enter File Name>
Begin Select Enter Select DefineOper Source Destin Data DirF1 F3 F4 F6 F7
3
1
4F1
Begin Oper
Press this key to select a source.2 Press this key to enter a destination.Enter the name of the .AF5 file.5
F7
File Utilities
F6
Import
F8
6200Main Menu
AI/WL5 To 6200
If You Want to: Press this Key:Start the import operation [F1] - Begin OperationSelect the source file for the import operation [F3] - Select SourceDefine the destination filename for the import operation 1 [F4] - Enter DestinationSelect both processor memory files and comments and symbols for the conversion configuration (default)orSelect either processor memory files or comments and symbols for the conversion configuration. Formore information, see page B-7.
[F6] - Select Data
Define the directories where you want to store the A.I./WINtelligentLOGIC 5 processormemory/commentsand symbols, backup processor memory/commentsand symbols, processormemory/commentsand symbols, documentation reports, exported files, user configuration, and EthernetWHO files
[F7] - Define Directories
1 Files will be stored in the default directory for A.I. and WINtelligent LOGIC 5 processor memory files and comments and symbols.
PrefaceConverting 6200 Series (.AF5 Files) to/from A.I. Series or WINtelligent Logic 5 (.X5 Files)
B-6
Note You can also convert processor memory files in the A.I. Series or WINtelligentLOGIC 5 (.X5 files) format to the 6200 series native format (.AF5 files) using the6200 programming software offline configuration utility. For more information onthe offline configuration utility, see chapter 7 in the Software Configuration andMaintenance manual; for more information on restoring files, see chapter 3 in theProgramming manual.
Note The 6200 programming software can restore and automatically convert A.I. Seriesor WINtelligent LOGIC 5 (.X5 files) directly to a PLC-5 processor. Manualconversion is only necessary if you wish to modify the files off line.
+========================================+| ROCKWELL SOFTWARE INC. || 6200 SERIES SOFTWARE ||PROCESSOR MEMORY FILE FORMAT CONVERSION |+========================================+
Source File. . . . .:BATCH.X5 PLC-5 File. .:Destination File . .:BATCHIMP.AF5Log File . . . . . .:BATCHIMP.CON
+==============================================================================+|** INITIALIZING ** ||** INITIALIZATION COMPLETE ** ||** CONVERTING - BATCH.X5 ** || || || || || |+==============================================================================+
Press F3 to abort>
AbortUtilityF3
When you complete this step, the processor memory files and/or the database isconverted to the 6200 series format.
Converting 6200 Series (.AF5 Files) to/from A.I. Series or WINtelligent LOGIC 5 (.X5 Files)
B-7
Performing a Partial Conversion
When converting 6200 series to/from A.I. Series or WINtelligent LOGIC 5, youmay want to perform a partial conversion (processor memory files or comments andsymbols only). To perform a partial conversion, follow the steps on the left.
F7
File Utilities
F6
6200Main Menu
Import
6200 ToAI/WL5
+========================= PLC-5 PROGRAMMING SOFTWARE =========================+| || A 6200 Series S+=== C:\IPDS\ARCH\PLC5\*.AF5 ==========+| | Name Size Date || Copyright 1986, 1995, +--------------------------------------+| All Rights| BATCH 14976 01-09-92 || | BATCH30 15488 01-09-92 || Release 5.x | BATCH40 19072 02-10-92 || | BATCHES 18560 12-19-91 || This software is licensed to: Comp| CHANNEL 2688 08-30-91 || Loca| EXPORT 18560 12-19-91 |+= EXPORT 6200 TO AI/WINLOGIC 5 ======+ | EXPSFC 20608 08-30-91 || | | FIRST 10880 08-29-91 || SOURCE: | | GAMUTLAB 31360 07-25-91 || | | +=Data Types====================+| DESTIN: | | |*Processor Memory File || | | |*Comments and Symbols |+= ESC exits =========================+=+======================================+
Press a Function Key or Enter File Name>
Begin Select Toggle Reset Select Define SaveOper All Selectn All Data Dir ConfigF1 F2 F3 F4 F6 F7 F9
F8
AI/WL5To 6200 or
F6
Select Data
F7
Exportor
F8
If You Want to: Press this Key:Select both processor memory files and comments andsymbols for conversion
[F2] - Select All
Toggle the cursored conversion parameter [F3] - Toggle SelectionClear the conversion parameters [F4] - Reset AllSave the configuration parameters (on this screen only) [F9] - Save Configuration
PrefaceConverting 6200 Series (.AF5 Files) to/from A.I. Series or WINtelligent Logic 5 (.X5 Files)
B-8