Title | PLCChap 03 - Lecture notes Chapter 3 |
---|---|
Course | Computer-Aided Manufacturing |
Institution | Kent State University |
Pages | 13 |
File Size | 326.5 KB |
File Type | |
Total Downloads | 89 |
Total Views | 135 |
CNC Programming Concepts...
Chapter 3: Memory Organization and Addressing
Computer Aided Manufacturing TECH 4/53350
1
Memory Organization & Addressing Learning objectives
Understand memory organization and addressing for the following PLCs:
IEC 61131-3 Model
Allen-Bradley ControlLogix
Allen-Bradley PLC-5/SLC-500
Computer Aided Manufacturing TECH 4/53350
2
IEC 61131-3 Model Technology Overview
IEC 61131-3 Protocol International Electrotechnical Commission (IEC) V d IIndependent Vendor d d t St Standardized d di d Programming P i L Language for f Industrial Automation Specifies Syntax, Semantics and Display for:
Ladder Diagram Sequential Function Charts Function Block Diagram Structured Texts Instruction Lists
IEC 61131- 3 refers to Part 3 of IEC 61131 suite
Part 1 – General Overview Part 2 – Hardware Part 3 – Programming Language Part 4 – User Guidelines P t 5 - Communication Part C i ti
Computer Aided Manufacturing TECH 4/53350
3
Memory Organization & Addressing
IEC 61131-3 Model IEC 61131- 3 Protocol: A mutually agreed upon set of rules, conventions, and agreements for the efficient and orderly design of PLCs
Layered Software Architecture Each layer hides details of lower layers Common Elements of IEC 61131-3 Architecture: Configuration (Top layer)
It describes entire software (program + data) for one PLC Each PLC, within an organization, has a separate configuration
Includes resources, memory addresses for I/O channels, system capabilities Resource (within Configuration layer)
Provides support function for the execution of IEC programs Configuration may consist of one or more resources Provides an interface between a program and and aa I/O ports of of the PLC
Computer Aided Manufacturing TECH 4/53350
4
IEC 61131-3 Model C Common Elements El t off IEC 61131 61131-33 A Architecture hit t ((continued) ti d)
Tasks (within Resource layer)
Control the execution of a set of programs and/or function blocks Programs/function blocks can be executed periodically or can be event driven Programs must be assigned to a task in order to be executed
The task must be configured to either execute periodically or upon a trigger
Resource layer may consist of one or more Tasks
http://www.personal.kent.edu/~asamba/tech43550/iec61131.pdf
Computer Aided Manufacturing TECH 4/53350
5
IEC 61131-3 Memory Model Configuration Resource Task
Task
Resource Task
Task
Task
Program Func- Function tion Block Block
Program
Program
Program
FB
FB
FB
Function Bl k Block
FB
FB
Lcl Glbl
Lcl Glbl
Local Global Prog. Vars Prog. Vars
Lcl Glbl
Global and directly represented variables
Access Paths
Computer Aided Manufacturing TECH 4/53350
6
IEC 61131-3 Memory Model Variables Local Variable
Defined within the software element Accessible only by the software element Software Element: Function Block, Resource or Configuration
Global Variables
Defined for a configuration A Accessible ibl tto allll elements l t contained t i d in i the th configuration fi ti
Global Config variable can be accessed by all software elements Global Program Variable can be accessed by all function blocks in the program
Directly Represented Variables
Refers to memory and I/O locations
Computer Aided Manufacturing TECH 4/53350
7
A-B ControlLogix Memory Project Task1
Task2
Program 32 Program Program 1 Main Routine Fault Routine
Controller (global) Tags
Config. Task3 Program (local) Tags
Status
Watchdog
Task32
Other R ti Routines
I/O Data
Controller Fault Handler
Computer Aided Manufacturing TECH 4/53350
System-shared Data Power Up Handler
8
Simple Ladder Logic NOT Operation Tasks
Configured to control execution of one or more programs Maximum of 32 tasks No more than one continuous task Others are periodic, scheduled at fixed interval. May be interrupted by a higher-priority periodic task.
Programs
Consists of Routines • Max. of 32 per task • Executed in order as listed in task
Computer Aided Manufacturing TECH 4/53350
9
Simple Ladder Logic NOT Operation NOT Truth Table
Possible Combinations of the 2 Switches: (22)
Computer Aided Manufacturing TECH 4/53350
A
B
Light
OFF
OFF
OFF
OFF
ON
OFF
ON
OFF
ON
ON
ON
OFF
10
ControlLogix Program Organization
Tasks
Configured to control execution of one or more programs Maximum of 32 tasks No more than one continuous task Others are periodic, scheduled at fixed interval. May be interrupted by a higher-priority periodic task .
Programs
Consists of Routines Max. of 32 per task
Executed in order as listed in task
Computer Aided Manufacturing TECH 4/53350
11
ControlLogix Program Organization Routines
Encapsulate code in single programming language Main Routine is first one executed Must call other routines Fault Routine is executed if a program fault is encountered during execution
Controller Tags
Global Gl b l directly di tl represented t d varibles ibl Represents global controller memory I/O data
Computer Aided Manufacturing TECH 4/53350
12
ControlLogix Scan
Control logic (program) continuously scanned. Data is transferred to/from I/O modules any time during the logic scan. If input data must remain constant, make a copy at beginning of scan and use the copy throughout scan
Computer Aided Manufacturing TECH 4/53350
13...