- •16. ADVANCED LADDER LOGIC FUNCTIONS
- •16.1 INTRODUCTION
- •16.2 LIST FUNCTIONS
- •16.2.1 Shift Registers
- •16.2.2 Stacks
- •16.2.3 Sequencers
- •16.3 PROGRAM CONTROL
- •16.3.1 Branching and Looping
- •16.3.2 Fault Detection and Interrupts
- •16.4 INPUT AND OUTPUT FUNCTIONS
- •16.4.1 Immediate I/O Instructions
- •16.4.2 Block Transfer Functions
- •16.5 DESIGN TECHNIQUES
- •16.5.1 State Diagrams
- •16.6 DESIGN CASES
- •16.6.1 If-Then
- •16.6.2 Traffic Light
- •16.7 SUMMARY
- •16.8 PRACTICE PROBLEMS
- •16.9 PRACTICE PROBLEM SOLUTIONS
- •16.10 ASSIGNMENT PROBLEMS
- •17. OPEN CONTROLLERS
- •17.1 INTRODUCTION
- •17.3 OPEN ARCHITECTURE CONTROLLERS
- •17.4 SUMMARY
- •17.5 PRACTICE PROBLEMS
- •17.6 PRACTICE PROBLEM SOLUTIONS
- •17.7 ASSIGNMENT PROBLEMS
- •18. INSTRUCTION LIST PROGRAMMING
- •18.1 INTRODUCTION
- •18.2 THE IEC 61131 VERSION
- •18.3 THE ALLEN-BRADLEY VERSION
- •18.4 SUMMARY
- •18.5 PRACTICE PROBLEMS
- •18.6 PRACTICE PROBLEM SOLUTIONS
- •18.7 ASSIGNMENT PROBLEMS
- •19. STRUCTURED TEXT PROGRAMMING
- •19.1 INTRODUCTION
- •19.2 THE LANGUAGE
- •19.3 SUMMARY
- •19.4 PRACTICE PROBLEMS
- •19.5 PRACTICE PROBLEM SOLUTIONS
- •19.6 ASSIGNMENT PROBLEMS
- •20. SEQUENTIAL FUNCTION CHARTS
- •20.1 INTRODUCTION
- •20.2 A COMPARISON OF METHODS
- •20.3 SUMMARY
- •20.4 PRACTICE PROBLEMS
- •20.5 PRACTICE PROBLEM SOLUTIONS
- •20.6 ASSIGNMENT PROBLEMS
- •21. FUNCTION BLOCK PROGRAMMING
- •21.1 INTRODUCTION
- •21.2 CREATING FUNCTION BLOCKS
- •21.3 DESIGN CASE
- •21.4 SUMMARY
- •21.5 PRACTICE PROBLEMS
- •21.6 PRACTICE PROBLEM SOLUTIONS
- •21.7 ASSIGNMENT PROBLEMS
- •22. ANALOG INPUTS AND OUTPUTS
- •22.1 INTRODUCTION
- •22.2 ANALOG INPUTS
- •22.2.1 Analog Inputs With a PLC
- •22.3 ANALOG OUTPUTS
- •22.3.1 Analog Outputs With A PLC
- •22.3.2 Pulse Width Modulation (PWM) Outputs
- •22.3.3 Shielding
- •22.4 DESIGN CASES
- •22.4.1 Process Monitor
- •22.5 SUMMARY
- •22.6 PRACTICE PROBLEMS
- •22.7 PRACTICE PROBLEM SOLUTIONS
- •22.8 ASSIGNMENT PROBLEMS
- •23. CONTINUOUS SENSORS
- •23.1 INTRODUCTION
- •23.2 INDUSTRIAL SENSORS
- •23.2.1 Angular Displacement
- •23.2.1.1 - Potentiometers
- •23.2.2 Encoders
- •23.2.2.1 - Tachometers
- •23.2.3 Linear Position
- •23.2.3.1 - Potentiometers
- •23.2.3.2 - Linear Variable Differential Transformers (LVDT)
- •23.2.3.3 - Moire Fringes
- •23.2.3.4 - Accelerometers
- •23.2.4 Forces and Moments
- •23.2.4.1 - Strain Gages
- •23.2.4.2 - Piezoelectric
- •23.2.5 Liquids and Gases
- •23.2.5.1 - Pressure
- •23.2.5.2 - Venturi Valves
- •23.2.5.3 - Coriolis Flow Meter
- •23.2.5.4 - Magnetic Flow Meter
- •23.2.5.5 - Ultrasonic Flow Meter
- •23.2.5.6 - Vortex Flow Meter
- •23.2.5.7 - Positive Displacement Meters
- •23.2.5.8 - Pitot Tubes
- •23.2.6 Temperature
- •23.2.6.1 - Resistive Temperature Detectors (RTDs)
- •23.2.6.2 - Thermocouples
- •23.2.6.3 - Thermistors
- •23.2.6.4 - Other Sensors
- •23.2.7 Light
- •23.2.7.1 - Light Dependant Resistors (LDR)
- •23.2.8 Chemical
- •23.2.8.2 - Conductivity
- •23.2.9 Others
- •23.3 INPUT ISSUES
- •23.4 SENSOR GLOSSARY
- •23.5 SUMMARY
- •23.6 REFERENCES
- •23.7 PRACTICE PROBLEMS
- •23.8 PRACTICE PROBLEM SOLUTIONS
- •23.9 ASSIGNMENT PROBLEMS
- •24. CONTINUOUS ACTUATORS
- •24.1 INTRODUCTION
- •24.2 ELECTRIC MOTORS
- •24.2.1 Basic Brushed DC Motors
- •24.2.2 AC Motors
- •24.2.3 Brushless DC Motors
- •24.2.4 Stepper Motors
- •24.2.5 Wound Field Motors
plc iec61131 - 17.1
17. OPEN CONTROLLERS
Topics:
•Open systems
•IEC 61131 standards
•Open architecture controllers
Objectives:
•To understand the decision between choosing proprietary and public standards.
•To understand the basic concepts behind the IEC 61131 standards.
17.1INTRODUCTION
In previous decades (and now) PLC manufacturers favored “proprietary” or “closed” designs. This gave them control over the technology and customers. Essentially, a proprietary architecture kept some of the details of a system secret. This tended to limit customer choices and options. It was quite common to spend great sums of money to install a control system, and then be unable to perform some simple task because the manufacturer did not sell that type of solution. In these situations customers often had two choices; wait for the next release of the hardware/software and hope for a solution, or pay exorbitant fees to have custom work done by the manufacturer.
“Open” systems have been around for decades, but only recently has their value been recognized. The most significant step occurred in 1981 when IBM broke from it’s corporate tradition and released a personal computer that could use hardware and software from other companies. Since that time IBM lost control of it’s child, but it has now adopted the open system philosophy as a core business strategy. All of the details of an open system are available for users and developers to use and modify. This has produced very stable, flexible and inexpensive solutions. Controls manufacturers are also moving toward open systems. One such effort involves Devicenet, which is discussed in a later chapter.
A troubling trend that you should be aware of is that many manufacturers are mislabeling closed and semi-closed systems as open. An easy acid test for this type of system is the question “does the system allow me to choose alternate suppliers for all of the components?” If even one component can only be purchased from a single source, the system is not open. When you have a choice you should avoid “not-so-open” solutions.
plc iec61131 - 17.2
17.2 IEC 61131
The IEC 1131 standards were developed to be a common and open framework for PLC architecture, agreed to by many standards groups and manufacturers. They were initially approved in 1992, and since then they have been reviewed as the IEC-61131 standards. The main components of the standard are;
IEC 61131-1 Overview
IEC 61131-2 Requirements and Test Procedures
IEC 61131-3 Data types and programming
IEC 61131-4 User Guidelines
IEC 61131-5 Communications
IEC 61131-7 Fuzzy control
This standard is defined loosely enough so that each manufacturer will be able to keep their own look-and-feel, but the core data representations should become similar. The programming models (IEC 61131-3) have the greatest impact on the user.
IL (Instruction List) - This is effectively mnemonic programming ST (Structured Text) - A BASIC like programming language
LD (Ladder Diagram) - Relay logic diagram based programming
FBD (Function Block Diagram) - A graphical dataflow programming method SFC (Sequential Function Charts) - A graphical method for structuring programs
Most manufacturers already support most of these models, except Function Block programming. The programming model also describes standard functions and models. Most of the functions in the models are similar to the functions described in this book. The standard data types are shown in Figure 17.1.
plc iec61131 - 17.3
Name |
Type |
Bits |
Range |
|
|
|
|
BOOL |
boolean |
1 |
0 to 1 |
SINT |
short integer |
8 |
-128 to 127 |
INT |
integer |
16 |
-32768 to 32767 |
DINT |
double integer |
32 |
-2.1e-9 to 2.1e9 |
LINT |
long integer |
64 |
-9.2e19 to 9.2e19 |
USINT |
unsigned short integer |
8 |
0 to 255 |
UINT |
unsigned integer |
16 |
0 to 65536 |
UDINT |
unsigned double integer |
32 |
0 to 4.3e9 |
ULINT |
unsigned long integer |
64 |
0 to 1.8e20 |
REAL |
real numbers |
32 |
|
LREAL |
long reals |
64 |
|
TIME |
duration |
not fixed |
not fixed |
DATE |
date |
not fixed |
not fixed |
TIME_OF_DAY, TOD |
time |
not fixed |
not fixed |
DATE_AND_TIME, DT |
date and time |
not fixed |
not fixed |
STRING |
string |
variable |
variable |
BYTE |
8 bits |
8 |
NA |
WORD |
16 bits |
16 |
NA |
DWORD |
32 bits |
32 |
NA |
LWORD |
64 bits |
64 |
NA |
|
|
|
|
Figure 17.1 IEC 61131-3 Data Types
Previous chapters have described Ladder Logic (LD) programming in detail, and Sequential Function Chart (SFC) programming briefly. Following chapters will discuss Instruction List (IL), Structured Test (ST) and Function Block Diagram (FBD) programming in greater detail.
17.3 OPEN ARCHITECTURE CONTROLLERS
Personal computers have been driving the open architecture revolution. A personal computer is capable of replacing a PLC, given the right input and output components. As a result there have been many companies developing products to do control using the personal computer architecture. Most of these devices use two basic variations;
• a standard personal computer with a normal operating system, such as Windows NT, runs a virtual PLC.
plc iec61131 - 17.4
-the computer is connected to a normal PLC rack
-I/O cards are used in the computer to control input/output functions
-the computer is networked to various sensors
•a miniaturized personal computer is put into a PLC rack running a virtual PLC.
In all cases the system is running a standard operating system, with some connection to rugged input and output cards. The PLC functions are performed by a virtual PLC that interprets the ladder logic and simulates a PLC. These can be fast, and more capable than a stand alone PLC, but also prone to the reliability problems of normal computers.
For example, if an employee installs and runs a game on the control computer, the controller may act erratically, or stop working completely. Solutions to these problems are being developed, and the stability problem should be solved in the near future.
17.4SUMMARY
•Open systems can be replaced with software or hardware from a third party.
•Some companies call products open incorrectly.
•The IEC 61131 standard encourages interchangeable systems.
•Open architecture controllers replace a PLC with a computer.
17.5PRACTICE PROBLEMS
1.Describe why traditional PLC racks are not ’open’.
2.Discuss why the IEC 61131 standards should lead to open architecture control systems.
17.6 PRACTICE PROBLEM SOLUTIONS
1.The hardware and software are only sold by Allen Bradley, and users are not given details to modify or change the hardware and software.
2.The IEC standards are a first step to make programming methods between PLCs the same. The standard does not make programming uniform across all programming platforms, so it is not yet ready to develop completely portable controller programs and hardware.