Rockwell Automation 1747-PTxx User Manual

ALLEN–BRADLEY
The Getting Started Guide for HHT
(Catalog Number 1747–PTA1E & 1747–PT1)
User Manual

Important User Information

Solid state equipment has operational characteristics differing from those of electromechanical equipment. “Safety Guidelines for the Application, Installation and Maintenance of Solid State Controls” (Publication SGI-1.1) describes some important differences between solid state equipment and hard–wired electromechanical devices. Because of this difference, and also because of the wide variety of uses for solid state equipment, all persons responsible for applying this equipment must satisfy themselves that each intended application of this equipment is acceptable.
In no event will the Allen-Bradley Company be responsible or liable for indirect or consequential damages resulting from the use or application of this equipment.
The examples and diagrams in this manual are included solely for illustrative purposes. Because of the many variables and requirements associated with any particular installation, the Allen-Bradley Company cannot assume responsibility or liability for actual use based on the examples and diagrams.
No patent liability is assumed by Allen-Bradley Company with respect to use of information, circuits, equipment, or software described in this manual.
Reproduction of the contents of this manual, in whole or in part, without written permission of the Allen-Bradley Company is prohibited.
Throughout this manual we use notes to make you aware of safety considerations.
ATTENTION: Identifies information about practices or circumstances that can lead to personal injury or death, property
!
damage, or economic loss.
Attentions help you:
identify a hazard
avoid the hazard
recognize the consequences
Important: Identifies information that is especially important for successful
application and understanding of the product.
PLC, PLC 2, PLC 3, and PLC 5 are registered trademarks of Allen-Bradley Company, Inc. SLC, SLC 500, PanelView, RediPANEL, and Dataliner are trademarks of Allen-Bradley Company, Inc. IBM is a registered trademark of International Business Machines, Incorporated.

Preface

Preface
Read this preface to familiarize yourself with the rest of the manual. This preface covers the following topics:
who should use this manual
the purpose of this manual
how to use this manual
conventions used in this manual
Allen–Bradley support

Who Should Use this Manual

Purpose of this Manual

Use this manual if you are responsible for designing, installing, programming, or troubleshooting control systems that use Allen–Bradley small logic controllers.
You should have a basic understanding of SLC 500 products. You should understand programmable controllers and be able to interpret the ladder logic instructions required to control your application. If you do not, contact your local Allen–Bradley representative for information on available training courses before using this product.
This manual is a learning and reference guide for the HHT. It is an introductory document, designed to allow you to begin programming in the shortest time possible. It does this by focusing on a simple controller and a simple program. Basic concepts are presented, but only with enough detail to get you started and let you know that there is more to be learned.
P–1
Preface
Contents of this Manual
Chapter: Title: Purpose:
Shows you how to set up a controller, install your
1 Setting Up Your Equipment
Memory Pak, Battery, and communication cable,
and connect your HHT to the controller. 2 Control Basics 3 Creating a Program Shows you how to create a program. 4 Online Operations
Appendix
A
Appendix
B
AppendixCIdentifying HHT Function Keys
Glossary Glossary Provides definitions of terms used in this guide.
Additional Ladder Program
Exercises
Troubleshooting Errors
& Instruction Mnemonics
Presents basic information you will need to know
before you can begin programming with the HHT.
Shows you how to download (restore) your program
to the controller, monitor, and test the program.
Introduces you to branching of instructions and the
timer instruction.
Provides a listing of error messages that you may
encounter while working through the guide. Also,
offers possible solutions for these errors.
Provides a listing of HHT function keys and their
meaning. Also provided is a list of instruction
mnemonics.
Related Documentation
The following documents contain additional information concerning Allen–Bradley SLC and PLC products. To obtain a copy, contact your local Allen–Bradley office or distributor.
For Read this Document
An overview of the SLC 500 family of products SLC 500 System Overview 1747–2.30
Document Number
A description on how to install and use your Modular SLC 500 programmable controller
A description on how to install and use your Fixed SLC 500 programmable controller
A procedural and reference manual for technical personnel who use an HHT to develop control applications
A complete listing of current Automation Group documentation, including ordering instructions. Also indicates whether the documents are available on CD–ROM or in multi–languages.
A glossary of industrial automation terms and abbreviations Allen–Bradley Industrial Automation Glossary ICCG–7.1
P–2
Installation & Operation Manual for Modular Hardware Style Programmable Controllers
Installation & Operation Manual for Fixed Hardware Style Programmable Controllers
Allen–Bradley Hand–Held Terminal User’s Manual 1747–809
Automation Group Publication Index SD499
1747–804
1747–800
Preface

How to Use this Manual

Common Techniques Used in this Manual

Allen–Bradley Support
To use this manual effectively:
Work through the chapters in sequential order, completing each one
before moving on to the next.
Perform the exercises in appendix A to apply what you have learned in
the chapters.
Consult appendix B to correct and identify any errors you encounter while
working through this manual.
Refer to the glossary for definitions of unfamiliar terms.
Use the index to locate further information on topics.
The following conventions are used throughout this manual:
Bulleted lists such as this one provide information, not procedural steps.
Numbered lists provide sequential steps or hierarchical information.
Italic type is used for emphasis.
Text in this
font
indicates words or phrases you should type.
Key names match the names shown and appear in bold, capital letters
within brackets (for example,
Allen–Bradley offers support services worldwide, with 78 Sales Support offices, 494 Authorized Distributors and 242 authorized Systems Integrators located throughout the United States, plus Allen–Bradley representatives in every major country in the world.
[ENTER]).
Local Product Support
Contact your local Allen–Bradley representative for:
Sales and Order Support
Product Technical Training
Warranty Support
Support Service Agreements
Technical Product Assistance
If you need to contact Allen–Bradley for technical assistance, please review the information in appendix B, Troubleshooting Errors, first. Then call your local Allen–Bradley representative.
Your Questions or Comments on this Manual
If you have any suggestions for how this manual could be made more useful to you, please send us your ideas on the enclosed reply card.
If you find a problem with this manual, please notify us of it on the enclosed Publication Problem Report.
P–3
T
able of Contents
The Getting Started Guide for HHT
Setting Up Your Equipment
Control Basics
Chapter 1
Controller Styles 1–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Setting
Up a Demo Unit
Setting
Up a Field–Wired Controller Installing the Memory Pak, Battery HHT
Features Powerup
HHT
HHT Display Format 1–9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The
Keyboard
Menu
Function Keys (F1, F2, F3, F4, F5)
Data Entry Keys (A 7, B 8, C 9...) 1–10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Auto
Shift
Cursor Keys 1–10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ZOOM and RUNG Keys 1–10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
, and Communication Cable
Chapter 2
SLC
500 File Concepts
Program 2–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Program Data
How External I/O Devices Communicate with the Processor 2–3. . . . . . . . . . . . .
Addressing
External I/O Addressing Formats 2–5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
HHT Display of Instructions/Addresses 2–5. . . . . . . . . . . . . . . . . . . . . . . . . .
Ladder
True/False Logical
Processor Operating Cycle 2–8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Files
Files
External I/O
Logic Concepts
Status
Continuity
1–3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1–4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1–4. . . . . . . . . . .
1–8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1–9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1–9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1–9. . . . . . . . . . . . . . . . . . . . . . . . .
1–10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2–4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2–6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2–6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2–7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating a Program
Chapter 3
Configuration
Controller Styles 3–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Catalog Numbers 3–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Arbitrary
Creating
Clearing the Memory of the HHT 3–5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Naming
Naming Your Program 3–6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Processor 3–7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring Y Monitoring Y
Programming
Entering
of SLC 500 Controllers
Controller Used in this Guide
a Program
the Program and Configuring the Controller
our I/O
our Data File
a Simple Ladder Rung
a Rung
3–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3–4. . . . . . . . . . . . . . . . . . . . . . . . . . .
3–4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3–6. . . . . . . . . . . . . . . . .
3–8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3–10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3–11. . . . . . . . . . . . . . . . . . . . . . . . . . . .
3–11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
i
T
able of Contents
The Getting Started Guide for HHT
Online Operations
Additional Ladder Program Exercises
Entering Entering
Saving Your Program 3–14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
an “Examine if Closed” Instruction an “Output Energize” Instruction
Chapter 4
Downloading Your Program 4–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Going
Online
Downloading Your Program 4–3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Changing Monitoring
Testing Y Monitoring
Program Mode to Run Mode
the Program in Run Mode
our Downloaded Program
Data Files
Appendix A
Entering
Entering
Input and Output Branches Creating Adding Inserting Adding Inserting Saving Downloading Testing
Entering
the Program
an Input Branch
an Instruction
an Output Branch
an Instruction
the Program
the Program
the Ladder Program
a T
imer Instruction A–5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
the Program
3–12. . . . . . . . . . . . . . . . . . . . .
3–13. . . . . . . . . . . . . . . . . . . . . . .
4–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4–3. . . . . . . . . . . . . . . . . . . . . . . . . .
4–4. . . . . . . . . . . . . . . . . . . . . . . . . . .
4–5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4–5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A–3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A–3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A–3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A–4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A–5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Troubleshooting Errors
Identifying HHT Function Keys & Instruction Mnemonics
Glossary
ii
Appendix B
HHT Error Messages B–1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
System LED Status B–3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Processor Error Codes B–4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Appendix C
HHT
Function Keys and Their Meaning
Instruction Mnemonics C–3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C–1. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Getting Started Guide
for HHT
Chapter
Chapter 2
A–B
1
Setting Up Your Equipment
This chapter briefly describes SLC 500 controller styles, then shows you how to set up your equipment in preparation for the exercises in later chapters. Topics include:
Controller Styles
Setting up a Demo Unit
Setting up a Field–Wired Controller
Installing the Memory Pak, Battery, and Communication Cable
HHT Features
HHT Powerup
HHT Display Format
The Keyboard
1–1
Chapter 1
Setting Up Your Equipment

Controller Styles

The SLC 500 comes in two different styles: modular and fixed. These styles are shown below. The modular controller consists of a rack, power supply, processor (CPU), and Input/Output (I/O) modules. The fixed controller consists of a power supply, processor (CPU), and a fixed number of I/O contained in a single unit. You can add an expansion rack to the fixed controller.
Output Module
SLC 500 Modular Controller
Power Supply
Output Terminals
Processor
Input Modules
Slot 0 1 2 3
Power Supply
Processor (CPU)
Input Terminals
Slot 0
SLC 500 Fixed Controller
Further information on hardware is found in the Installation and Operation Manuals, Publication 1747–800 (fixed controllers) and 1747–804 (modular controllers).
1–2
Getting Started Guide
for HHT
Chapter 1
Setting Up Your Equipment

Setting Up a Demo Unit

SLC 500 Modular Controller
SLC 500 demo units are available with either a fixed controller or modular controller. This guide assumes you are using a modular controller demo unit for all the programming exercises. If you use a fixed controller demo unit, you will need to use different configuration information and I/O addresses in the exercises. This is explained later.
The figure below shows an SLC 500 modular controller demo unit. It is completely wired, with 12 external inputs (6 push buttons and 6 selector switches) and 8 external outputs (pilot lights).
Note the On/Off Power Switch and the Power Supply Receptacle on the demo. Make certain that the power switch is Off, then insert one end of the power cord into the power supply receptacle and the other end into an electrical socket.
Input/Output Panel
Power Supply Receptacle
On/Off Power Switch
Pilot Light
102
60
0
6
O
O
F
N
F
O
6
O
N
F F
Combination Pilot Light/Pushbuttons
Selector Switches
1–3
Chapter 1
Setting Up Your Equipment
Setting Up a Field–Wired Controller

Installing the Memory Pak, Battery, and Communication Cable

The details of installing and wiring the controller and external input/output devices are beyond the scope of this guide.
If you are using a field–wired fixed or modular controller, refer to the Installation and Operation Manuals, Publication 1747–800 (fixed controllers) and 1747–804 (modular controllers), for information on installation and wiring of the controller and external input/output devices.
We recommend that your controller have two external input circuits and two external output circuits to complete the exercises in this guide.
The HHT (with communication cable), the memory pak, and the battery are supplied separately. Install the memory pak, battery, and communication cable as follows:
1. Install the memory pak first. The English version is catalog number
1747–PTA1E. Important: The memory pak contains CMOS devices. Wear a
grounding strap and use proper grounding procedures to guard against damage to the memory pak from electrostatic discharge.
A. To install the memory pak, remove the cover from the back of the
HHT.
Backside
Slide cover to the left. Lift of
of HHT
f cover
.
1–4
Getting Started Guide
for HHT
Chapter 1
Setting Up Your Equipment
B. Insert the memory pak in its compartment as indicated in the following
figure.
After the memory pak is in the compartment, press down on handle to secure connector in socket.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Backside of HHT
1–5
Chapter 1
Setting Up Your Equipment
2. Install the battery, catalog number 1747–BA. The battery compartment is
next to the memory pak compartment.
ATTENTION: If you do not install a battery, the letter B appears flashing on the prompt line of the HHT display to let you
!
know that battery power is low; in addition, each time you power up, the self–test diagnostic will be interrupted, and the statement
BATTERY
TEST FAILED
will appear.
To prevent this from happening, leave the battery low defeat jumper” inserted in the battery socket. The HHT will be functional, but your user program will be cleared form memory when you de–energize the HHT. If you do not download the user program to the processor before you de–energize the HHT, your program will be lost.
A. Remove the jumper from the battery socket, then plug the battery
connector into the socket (red wire up). Secure the battery between the clips.
Battery Compartment
Plug battery connector into socket (red wire up).
Secure battery between clips.
B. Replace the cover.
. .
.
Backside of HHT
1–6
Getting Started Guide
for HHT
Chapter 1
Setting Up Your Equipment
3. Locate the Communications Port of the controller. The figure below
shows where it is located on modular and fixed controllers.
Processor Module (Modular Controller)
(cover open)
(Communication Port)
SLC 500 Fixed Controller
Connectors are keyed. Connect one end of the 1747–C10 communication cable to the top of the HHT. The other connector plugs into the communication port on the front of the fixed I/O controller, or into the communication port on the front of the CPU module of modular controllers.
1747–C10 Cable
SLC Controller (Modular)
HHT
If you are using a 1747–NP1 Wall–Mount power supply or a 1747–NP2 Global Desk Top power supply, plug the communication cable connector into the socket provided.
1–7
Chapter 1
Setting Up Your Equipment

HHT Features

Display Area
Use the Hand–Held Terminal to configure the SLC 500 controller, enter/modify a user program, download/upload programs, monitor controller operation, test, and troubleshoot. The HHT has its own memory to store a program.
You can use the HHT stand alone (for remote programming development with 1747–NP1 or NP2 power supply), point–to–point (one HHT to one controller), or on a DH–485 network (communicate with up to 31 nodes over 4,000 feet). When equipped with a battery (1747–BA), the HHT will retain a user program in memory for storage and later use.
The HHT is menu–driven. The display area accommodates 8 lines x 40 characters. You can display five rungs of a user program. When monitoring the program in the RUN mode, instructions in a ladder diagram are intensified to indicate “true” status.
SLC 500 PROGRAMMING SOFTWARE Rel. 2.03
Allen–Bradley Company Copyright 1990
PRESS A FUNCTION KEY
SELFTEST TERM PROGMAINT UTILITY
All Rights Reserved
F1 F2 F3 F4 F5
1747 – PTA1E
OFL
1–8
Calculator–style, color–coded keyboard
Keys operate with motion and tactile response.
F1 F2
NO
ACC/POS
PRE/LEN
A
7
D
4
T
1
#0–
F3 F4 F5
S
I
U
B
C
8
9
E
F
5
6
R
M
2
3
.
:/
SPACE
SHIFT
ESC
ZOOMRUNG
Enter
Getting Started Guide
for HHT
Chapter 1
Setting Up Your Equipment

HHT Powerup

HHT Display Format

After you install the memory pak and battery, and plug in the cable, you can test operation of the HHT by powering up the controller (or plugging in the Wall–Mount or Global Desk Top power supply).
When the HHT is energized, it will go through a series of diagnostic tests. Then the following display is shown.
SLC 500 PROGRAMMING SOFTWARE Rel. 2.03
Allen–Bradley Company Copyright 1990
All Rights Reserved
PRESS A FUNCTION KEY SELFTEST TERM PROGMAINT
F1 F2 F3 F4 F5
1747 – PTA1E
OFL
UTILITY
The HHT display format consists of the following:
Display area
Prompt/Data Entry/Error Message area
Menu tree functions
The figure below indicates what appears in these areas. (To access this
[F3]
screen, press
– PROGMAINT
.)
Prompt/Entry/Error Area
Menu tree functions are directly accessible.
Menu function keys are selected
[F1]
with

The Keyboard

to
[F5] keys.
Display Area
File Name: 101 Prog Name: 1492 File Name Type Size(Instr) 0 System * 1 Reserved * 2 101 Ladder *
OFL
CHG_NAM CRT_FIL EDT_FIL DEL_FIL MEM_MAP >
F1 F2 F3 F4 F5
When the > symbol is present, pressing [ENTER] will toggle additional menu functions.
Indicates that the HHT is offline.
This section is intended only as a brief preview of keyboard operation. Beginning in chapter 3, you will become familiar with the keyboard as you are guided through various programming procedures.
Menu Function Keys (F1, F2, F3, F4, F5)
The top row of purple keys, F1 through F5, are menu function keys. They select the menu functions at the bottom of the screen. Note that when the > symbol is present, the any) at a particular menu level. The previous menu level.
[ENTER] key will toggle additional menu functions (if
[ESC] key exits the display to the
1–9
Chapter 1
Setting Up Your Equipment
A
B
Data Entry Keys (
C
7,
8,
9...)
These blue keys include numbers, letters, and symbols used for addresses, password, file numbers, and other data. The data you enter always appears on the prompt/data entry/error message area of the display.
In general, you obtain the upper character of a key by pressing the
[SHIFT]
key first. You do not have to hold it and press next key. Just press and release
If you make an error while entering data, press
[SHIFT] and then press the next key.
[ESC]
and re–enter the data,
or use cursor keys and the space key. To complete a data entry, press
[ENTER]. You can also use the [ESC] key to exit the data entry and return to
the next higher (previous) menu level.
Auto Shift
When you enter an instruction address, the HHT automatically goes to SHIFT mode. This mode is indicated by a small arrow in the bottom right hand corner of the display.
ZOOM on XIC NAME: EXAMINE IF CLOSED BIT ADDR:
ENTER BIT ADDR:
F1 F2 F3 F4 F5
] [
2.0.0.0.*
Indicates that the HHT is in SHIFT mode (e.g., to enter the letter “I” you do not have to first select SHIFT).
1–10
Cursor Keys
,,,
Use these four green, arrow keys to:
Correct data entry errors (either type over or use space key).
Move the cursor left, right, up, and down in a ladder program. Rungs not
shown in the HHT display will automatically scroll into view as you cursor down (or up) in the program.
Scroll through controller and I/O configuration selections.
Scroll through program file directories.
Scroll through the elements and bits of individual data files.
ZOOM and RUNG Keys
The [ZOOM] key brings up a display that shows the parameters of an instruction (helpful with timers, counters, sequencers, etc.; also helpful during editing).
[RUNG] key moves the cursor to a particular rung. Using the [RUNG] key
The saves time when you have a long ladder diagram. When you press you are prompted for the rung number that you want to edit or monitor. You enter the rung number and press
[ENTER], then the cursor moves to the
selected rung and the rung appears at the top of the screen.
[RUNG],
Getting Started Guide
for HHT
Chapter
A–B
2
Control Basics
This chapter introduces you to basic concepts essential for understanding how the SLC 500 controller operates. It covers:
SLC 500 file concepts
How external I/O devices communicate with the processor
Addressing external I/O
External I/O addressing formats
Ladder logic concepts

SLC 500 File Concepts

The CPU, or processor, provides control through the use of a program you create. This program contains files that break down into more manageable sections. These sections are:
Program Files — provide storage and control of the main program and
subroutines.
Data Files — contain the status of inputs, outputs, the processor, timers,
counters, and so on.
Notes on terminology: The term program used in Hand–Held Terminal (HHT) displays and documentation is equivalent to the term processor file used in APS software displays and documentation. Both terms mean the collective program files and data files created under a particular program or processor file name.
Program
The HHT and each CPU can hold one program at a time. The program is made up of program files (up to 256 per controller) and data files (up to 256 per controller).
Program
Program Files
Data Files
A program is created in the offline mode using your HHT. It is then downloaded to the processor for online operation.
2–1
Chapter 2
Control Basics
Program Files
Program files contain controller information, the main control program, and any subroutine programs. The first three program files are required for each program. These are:
File
0
This file stores the controller configuration and other system information.
File
1
This file is reserved for internal controller use.
File
2
This file stores the main control program.
Files
Most of your work with program files will be in file 2, the main program file. This file contains your ladder logic program that you create to control your application.
3 – 255
These files are optional and used for subroutine programs.
Data Files
Data files contain the data associated with the program files. Each program can contain up to 256 data files. These files are organized by the type of data they contain. Each piece of data in each of these files has an address associated with it that identifies it for use in the program file. For example, an input point has an address that represents its location in the input data file. Likewise, a timer in the timer data file has an address associated with it that allows you to represent it in the program file.
The first 9 data files (0 – 8) have default types. You designate the remainder of the files (9 – 255) . The default types are:
File 0 – Output Data
This file stores the state of the output terminals for the controller.
File
1 – Input Data
This file stores the status of the input terminals for the controller.
File
2 – Status Data
This file stores controller operation information.
Files
File
Files
3 – 7
These files are pre–defined as Bit, Timers, Counters, Control, and Integer data storage, respectively.
8
This file is reserved for internal use.
9 – 255
These files are user–defined as Bit, Timer, Counters, Control, and Integer data storage.
2–2
Most of your work with data files will be in files 0 and 1, the output and input files. Refer to appendix A for an example of the Timer data file.
Getting Started Guide
for HHT
Chapter 2
Control Basics

How External I/O Devices Communicate with the Processor

Input Module in slot 1
F8
0
Pushbutton 0 is wired to terminal 0. Pressing pushbutton 0 will cause the corresponding status bit in the input data file to go from 0 to 1.
The figure below applies to a modular controller demo unit having an input module in slot 1 and an output module in slot 3. See page 1–2 for a diagram of the slot location. To simplify the illustration, only pushbutton 0 and pilot light 0 of the external I/O are shown.
Each of the external input circuits is represented by a status bit in the input data file of the program. Each of the external output circuits is represented by a status bit in the output data file of the program. During controller operation, the processor applies the input data to the program, solves the program based on the instruction you enter, and energizes and de–energizes external outputs.
SLC 5/01 CPU
INPUT
INPUT
INPUT
IN 0 IN 1 IN 2 IN 3
Input Data File
address data
I:1 0000
Status bit 0 corresponds to terminal 0 of the input module in slot 1.
Closing an external input circuit changes the corresponding status bit from 0 to 1. Opening an external input circuit changes the corresponding status bit from 1 to 0.
Output Module in slot 3
0
Pilot light 0 is wired to terminal 0. The pilot light will be energized when the processor has completed evaluation of the program and transfers the ON/OFF status to the outputs.
When an output data file status bit has been solved as a 1, the corresponding external output circuit will be energized (ON).
When an output data file status bit has been solved as a 0, the corresponding external output circuit is de–energized (OFF).
OUTPUT
OUT OUT 1 OUT 2 OUT 3 OUT 4 OUT 5 OUT 6 OUT 7
Output Data File
address data
0
O:3 0000 0000
Status bit 0 corresponds to terminal 0 of the output module in slot 3.
2–3
Chapter 2
Control Basics

Addressing External I/O

As pointed out in the last section, external inputs and outputs are linked to the input data file and output data file of the program. Each status bit in these files has an address. You specify the appropriate address when you enter an instruction in your ladder program.
For our purposes, input addresses have the form I:e/b where
= Input data file
I :
= Element or slot delimiter = Slot number of the input module
e
= Bit or terminal delimiter
/ b
= Terminal number used with input device
Similarly, output addresses have the form
O:e/b
where
O
= Output data file
:
= Element or slot delimiter = Slot number of the output module
e /
= Bit or terminal delimiter = Terminal number used with output device
b
Examples:
I:1/0
= Input, slot 1, terminal 0
I:2/0 = Input, slot 2, terminal 0 O:3/0 = Output, slot 3, terminal 0 O:3/7 = Output, slot 3, terminal 7 O:0/7 = Output, slot 0, terminal 7 (fixed controllers only because of slot 0) I:0/4 = Input, slot 0, terminal 4 (fixed controllers only because of slot 0)
Eventually, you will be addressing other data files, such as Status, Bit, Timer, Counter, Integer, and Control. Addressing of these files is discussed in the HHT User Manual.
2–4
Getting Started Guide
for HHT
Chapter 2
Control Basics

External I/O Addressing Formats

There are three ways in which an external I/O address appears in this guide:
The five keyboard entries you make to enter the address in the HHT:
Delimiter Delimiter
O:2/7
Output Data File Slot 2 Terminal 7
The full address, as it appears in the HHT displays:
Word 0Data File 0
O0:2.0/7
Output Data File Slot 2 Terminal 7
The convention we use to show the address in the ladder diagrams:
Word 0Slot 2Output Data File
Your programming device displays the full address. For example, when you assign the address O:3/0, the programming device will show it as O0:3.0/0 (output file, file 0, slot 3, word 0, terminal 0).
O:2.0
( )
7
Terminal 7
HHT Display of Instructions/Addresses
The HHT displays I/O addresses as shown below.
When you locate the cursor on an instruction (as shown below), the HHT displays the instruction address in the upper left corner of the display.
NO FORCEOTE:O0:3.0/0
] [
<END>
INS_RNG MOD_RNG SEARCH DEL_RNG UND_RNG
F1 F2 F3 F4 F5
These numbers provide you with the follow­ing ladder program information:
2.0.0.0.2
( )
OFL
file number rung number nest level branch level
instruction number (An asterisk (*) means the cursor is not on an instruction.)
>
2–5
Chapter 2
Control Basics

Ladder Logic Concepts

As we mentioned earlier, the program files you create contain the program used for your controlling application. The programs are written in a programming language called Ladder Logic. This name is derived from its ladder–like appearance.
A ladder logic program consists of a number of rungs, on which you place instructions. Instructions each have a data address associated with them and based on the status of these instructions the rung is solved.
The figure below shows a simple 1–rung ladder program. The rung includes two input instructions and an output instruction. Note, in the example below each instruction has a name (Examine if Closed), a mnemonic (XIC), and an address (I:1/0).
Input Instructions Output Instruction
XIC
I:1.0
] [
0
XIC = Examine if Closed XIO = Examine if Open
OTE = Output Energize
A simple rung, using bit instructions.
XIO OTE
I:1.0
]/[
1
O:3.0
Address I:1/0 Address I:1/1 Address O:3/0
( )
0
True/False Status
The data file bits that these instructions are addressed to will be either a logic 0 (OFF) or a logic 1 (ON). This determines whether the instruction is regarded as “true” or “false”:
The status of the instruction is
If the data file
bit is
Logic 0 False True False Logic 1 True False True
XIC
Examine if Closed
] [
XIO
Examine if Open
]/[
OTE
Output Energize
( )
2–6
Getting Started Guide
for HHT
Chapter 2
Control Basics
Logical Continuity
During controller operation, the processor evaluates each rung, changing the status of instructions according to the logical continuity of rungs. More specifically, input instructions set up the conditions under which the processor will make an output instruction true or false. These conditions are:
When the processor finds a continuous path of true input instructions in a
rung, the OTE output instruction will become (or remain) true. We then say that “rung conditions are true.”
When the processor does not find a continuous path of true input
instructions in a rung, the OTE output instruction will become (or remain) false. We then say that “rung conditions are false.”
The figure below indicates the data file conditions under which the rung is true:
Input Instructions Output Instruction
XIC
I:1.0
] [
0
Input Data File
address data
I:1 0001
Status bit I:1/1 is a logic 0, making the XIO instruction true.
Status bit I:1/0 is a logic 1, making the XIC instruction true.
In the above example, if the input data file was 0000, then the rung would be false and the output data file would read as 0000 0000.
XIO OTE
I:1.0
]/[
1
O:3.0
address data
O:3 0000 0001
The processor changes status bit O:3/0 to a logic 1, because a continuous path of true input instructions exist in the rung.
( )
0
Output Data File
2–7
Loading...
+ 53 hidden pages