Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Outline
Review of PLCs
Bit-Level Programming
Review of PLCs
What is a PLC?
Advantages of PLCs
Increased reliability
Physical contacts on electromagnetic relays wear out much faster than PLCs
Same program can be downloaded to many PLCs no chance of miswiring
More flexibility
Easier to make logic changes in the PLC program than the relay circuit
Expanded functionality not just digital I/O
Security features
Lower cost
Relays/Contactors are not cheap.
PLCs do not have to go out of service to process logic changes.
Communications capability
Supervisory control, data gathering, monitoring devices and process parameters, remote I/O
Easier to troubleshoot
Diagnostic capabilities, simulate inputs, check logic, watch program execute in real-time
Parts of a PLC
Modular
Fixed
Principle of Operations
2.
3.
Normally-Open Contact
Normally-Closed Contact
Assignment Coil
Set Coil
Reset Coil
CTU Count Up
CTU Count Up
Addressing
Siemens
Allen-Bradley
I Input
I Input
Q Output
O Output
M Memory
M Memory
Format:
O0:01/00
Timers: T34
Counters: C23
Types of PLCs
Compact
Modular
Rack-mount/chassis-mount
I/O Modules
Discrete I/O
Analog I/O
temperature
speed
level
flow
weight
pressure
position
Special Modules
BCD output module: Used to control BCD outputs like 7-segment displays
PID module: allows complex PID control algorithm to be computed outside the PLC
CPU, freeing the PLC from these cumbersome calculations
Motion and Position Control module: control stepper and servo motors with high
precision for high-speed machining and packaging operations
Ladder Logic
Fundamental Circuits
AND gate
A
OR gate
A
NOT gate
A
NAND gate
A
NOR gate
A
XOR gate
A
PACs look and act like PLCs, but with expanded capabilities:
Software makes the difference. Standard Ladder Logic doesnt change, but
addressing of instructions does.
Memory Layout
Configuration
Configuration (contd)
After drivers are configured, the modules are configured in RSLogix 5000. They
must be configured correctly or they will not work properly (or at all).
RSLinx can also be used to find data about modules like firmware and revision
version.
Project
Project (contd)
Tasks
Programs
Routines
Data types
Trends
I/O configuration
Tags
Tasks
Programs
Routines
Tags
Tags (contd)
Two scopes:
Program scope (local data, visible within
routines within the program)
Controller scope (global data, accessible
by all routines within a controller)
Tags (contd)
base
alias
produced
consumed
Tags (contd)
Data Types
BOOL
SINT
INT
DINT
REAL
BOOL
one bit of data stored in bit
Structures
Predefined Structures
timers
counters
messages
PID
Module-defined Structures
User-defined Structures
Creating Tags
Tag name
Tag description (optional)
Tag type
Data type
Display style
Whether the tag is consumable and the
number of controllers that can consume
it
Array
Bit-Level Programming
Program Scan
Of the five available programming languages for PLCs, Ladder Logic is the
most prevalent.
When creating ladder I/O bit instructions, the following rules apply:
All input instructions must be to the left of an output instruction.
A rung cannot contain an output instruction if it also contains an input instruction.
This means that you can have only an output instruction in a rung.
This is because the rung is evaluated from left-to-right including all inputs before
determining the value of the output.
A rung does not require an input instruction but it must have at least one output
instruction.
A rung with only one output instruction is always TRUE.
Tag-Based Addressing
Initially, all program development can proceed with just the tag
names and the data types assigned.
At a later time, input and output field devices are easily matched to
the pin numbers on the respective module the are connected to.
One-Shot Instruction
References
1.
2.
3.
4.
5.