Transcript
PROGRAMMABLE CONTROLLERS Jerzy Kasprzyk
Lecture: PLC Hardware
1. Introduction In the respect of the PLC architecture, one can distinguish: • Compact controllers, • Modular controllers. Table 1. The most popular PLC families Manufacturer
Intelligent relays
Small
Medium
Large
Siemens
Logo
SIMATIC S7200
SIMATIC S7-300
SIMATIC S7-400
Schneider Electric
Zelio
Nano, Micro, Twido
Premium, Compact, Momentum
Quantum
GE Fanuc
VersaMaxNano
VersaMaxMicro
90-30, VersaMax, PACSystems RX3i
90-70, PACSystems RX7i
Mitsubishi Electric
ALPHA
MELSEC FX1, FX2
MELSEC QnAS
MELSEC QnA, MELSEC System Q
CPM1, CPM2, CQM1H
C200H-alpha, CJ1, CS1
CVM1
MicroLogix
SLC500, FlexLogix, ControlLogix
PLC-5
Omron
Rockwell Automation (Allen-Bradley)
Pico
Others: PCD family of SAIA-Burgess, Bernecker & Rainer (multitasking operating system), Beckhoff, WAGO, Moeller, etc.
Fig. 1. Simatic families: S7-400, S7-300 and S7-200
Fig. 2. Omron’s controller CJ1
Fig. 3. Mitsubishi’s family Q controller
Elements of PLC hardware: • Baseplate (rack) with slots, expansion baseplates, remote baseplates, Remote Input/Output Station (RIOS); • Power Supply (PS), Central Processing Unit (CPU); • basic I/O modules:
Digital Input (DI), Digital Output (DO), (called also discrete),
Analog Input (AI), Analog Output (AO),
• other modules (also “intelligent”):
High-Speed Counter (HSC),
Axis Positioning Module (APM),
Communication modules,
Input modules for temperature sensors,
PID modules or fuzzy logic controllers,
Module for code bar readers, etc.
Hardware configuration: • number and type of baseplates, types of modules, • parameters of the modules that can be configured by the user, e.g. signal ranges, voltage or current mode for AI or AO, code (e.g. binary, BCD), references (direct addresses).
In the older systems, some of the parameters have been set in hardware (e.g. jumpers), nowadays it is rather done in a software way.
For communication modules, the user should declare: parameters of the communication link (e.g. speed rate, address of the node, data protection), references for transmitted data, etc.
User program as well as configuration can be protected by a software or hardware key.
2. Central Processing Unit (CPU) Basic features: • Execution Speed, e.g. duration of a typical cycle (e.g. 1K of bit instructions), processing times for different type instructions; • Supply Voltage, Power Consumption, Wiring and Cabling; • Maximum Number of DI and DO, AI and AO, optionally the maximum number of modules or baseplates; • Memory size for the user program and user data and memory type (RAM, EPROM, FLASH); • Floating Point Operations; • Forcing Capabilities; • Number of Built-in Communication Ports, Protocols; • Operating Conditions (Environment, like e.g. Temperature, Humidity, Vibration, Schock). Often: Real-time clock with battery backup (can be synchronized via a network). Usually, the CPU module is equipped with a number of LEDs to indicate the state of PLC: POWER, READY, RUN, STOP, FAULT etc., as well as to show the states of communication ports. Some CPUs have also switches (or keys) to change the mode of functioning (PROGRAM, RUN)
Program sweep and CPU modes PLC must work in Real Time. Classical solution: Program Sweep (fraction of ms up to few dozen of ms).
INITIALIZATION INITIALIZATION
SCAN THE INPUTS ?
NO
YES READING THE INPUTS
READ THE INPUTS
MODE "RUN" ?
NO
SCAN TIME
YES PROCESSING OF PROGRAM LOGIC
EXECUTE A PROGRAM
UPDATE THE OUTPUTS ? YES WRITE THE OUTPUTS
COMMUNICATION
DIAGNOSTICS
NO
WRITING THE OUTPUTS
COMMUNICATION WITH PADT AND SYSTEM COMMUNICATION
DIAGNOSTICS
NEW CYCLE (SCAN)
Fig. 4. Typical PLC program cycle (program sweep, scan)
Two modes of functioning: •
RUN – typical mode, all phases are executed including application program;
•
STOP – application program is not executed.
Other modes: Constant Sweep, test modes: Single Sweep, Step by Step, RUN without digital output activation. Scan Time (sweep time) can not be arbitrary long – there is a watchdog in CPU that prevents PLC against program hang-up (typically 100 ms to 500 ms).
In modern PLCs one can define three types of tasks: • cyclic (continuous); • periodic (timer event); • event controlled. Table 2. Times of data exchange between CPU and modules of GE Fanuc series 90-30 Time [ms] Modules
Baseplate
Extension
Remote
16 DI
0,030
0,055
0,206
16 DO
0,030
0,053
0,197
4 AI
0,075
0,105
0,396
2 AO
0,058
0,114
0,402
16 AI
0,978
1,446
3,999
8 AO
1,274
1,988
4,472
HSC
1,381
2,106
5,221
APM (1 axis)
1,527
2,581
6,388
Ethernet
0,038
0,041
0,053
without any connections
0,567
0,866
1,830
32 nodes with 64 I/O points each
1,714
2,514
5,783
without any connections
0,798
1,202
2,540
32 nodes with 64 I/O points each
18,38
25,377
70,777
GCM
GBC
3. Digital Input Module DI module converts discrete (2-level) input signals into bits that are transferred to reference locations defined by the prefix %I or %IX.
To other circuits
Optical coupling
Fig. 5. Simplified schematic and field wiring diagram for MDL 646 (24Volt DC Positive/Negative Input Module)
Optical coupling
Fig. 6. Simplified schematic and field wiring diagram for MDL 231 (240 Volt AC Isolated Input Module)
Digital Input Module Specifications: • Rated Voltage – typically 24VDC or 120/240 VAC; • Number of Inputs, optionally Number of Groups; • Isolation (e.g. RMS of breakdown voltage); • Electrical Characteristics of state levels: ON (e.g. > 15V) and OFF (e.g. < 5 V); • ON Response, OFF Response Times; • Power Consumption, Internal Power Dissipation; • Operating Conditions – Temperature, Humidity, Vibration.
4. Digital Output Modules DO module converts bits transferred from reference locations defined by the prefix %Q or %QX into discrete (2-level) output signals.
To other curcuits
Fig. 7. Simplified schematic and field wiring diagram for MDL 742 (24Volt DC Positive Output Module)
Digital Output Module Specifications: • Rated Voltage – typically 24VDC or 120/240 VAC; • Number of Outputs, optionally Number of Groups; • Isolation (e.g. RMS of breakdown voltage); • Electrical Characteristics of ON and OFF levels; • ON Response Time, OFF Response Time; • Load Current/Output; • Max Load Current/Module; • Inrush Current; • Power Consumption, Internal Power Dissipation; • Operating Conditions – Temperature, Humidity, Vibration.
a)
b)
.022mF 100 Ω
630V
1A, 100V
DO
c)
0.5 W
DO
d)
DO
DO
Fig. 8. Protecting DO modules from Inductive Back EMF
5. Analog Input Modules In AI module analog input signals (voltage or current) are converted into digital data (usually words) that are transferred to reference locations defined by the prefix %IW. For some modules it is also possible to define limits (high and low) for alarms. Exceeding the limits is indicated by setting on the associated binary references (%IX).
Typical nominal ranges for analog signals: •
–10 V, +10 V;
•
0 V, +10 V;
•
+1 V, +5 V;
•
4 mA, 20 mA;
•
0 mA, 20 mA.
Analog inputs can be: •
differential (A/D converts the difference voltage between the inputs IN+ and IN– );
•
single-ended (A/D converts the difference voltage between the input and COM).
Additional element of the curcuit
A 250Ω
D %IW1
A 250Ω
GND
24V
D
%IW2 ANALOG INPUT
Analog Current Input Module
Fig. 9. Wiring diagram for a single-ended AI current module and 2-wire sensors
Additional element of the curcuit
A
4-wire sensor
250Ω
D %IW1
A
4-wire sensor
250Ω
D %IW2
GND ANALOG INPUT
24V
Analog Current Input Module
Fig. 10. Wiring diagram for a differential AI current module and 4-wire sensors
Additional element of the circuit
-
+ A D %IW1
-
+
A D %IW2 GND ANALOG INPUT
optional
Analog Voltage Input Module
Fig. 11. Wiring diagram for an AI voltage module
Main (metrological) specifications for AI modules: • Resolution; The maximum value of the quantization error is defined with reference to the LSB (Least Significant Bit) of the register in A/D converter, e.g. 4 µA/LSB.
• Accuracy; It is defined as the maximum difference between expected and measured values e.g.
±0.25% of the whole range at 25 °C. • Linearity; It is defined as the difference between the measured changes corresponding exactly to 1 LSB for two neighboring channels, e.g. less than 1 LSB within the range 4 to 20 mA.
• Common Mode Rejection Ratio (CMRR), e.g. 80 dB; • Cross-Channel Rejection Ratio (CCRR), e.g. 80 dB; • Update Rate, e.g. 4ms. Other specifications: • Number Of Channels; • Input Current Ranges or Input Voltage Ranges; • User Supply Voltage; • Absolute Maximum Input Voltage; • Calibration; • Absolute Accuracy; • Update Rate; • Isolation; • Input Impedance, Inductance, Capacitance; • External Supply Voltage Range and External Supply Voltage Ripple; • Power Consumption, Internal Power Dissipation; • Operating Conditions – Temperature, Humidity, Vibration, etc.
6. Analog Output Modules In AO module digital data (usually words) transferred from reference locations defined by the prefix %QW are converted into analog output signals (voltage or current).
Typical nominal ranges for analog signals:
•
–10 V, +10 V;
•
0 V, +10 V;
•
+1 V, +5 V;
•
4 mA, 20 mA;
•
0 mA, 20 mA.
Usually, a user can also define the signal state on the output while PLC is in the STOP mode (Timeout State). It can be done in hardware way (using jumpers) or software way (during configuration). Then the user can declare the state as e.g. User Defined or Last Value.
Additional element of the circuit %QW1
D A
%QW2
D A
ANALOG OUTPUT
24V
Analog Current Output Module
Fig. 12. Wiring diagram for an AO current module
Basic features of AO modules: • Number of Channels; • Output Current Ranges or Output Voltage Ranges; • User Supply Voltage; • Absolute Maximum Input Voltage; • Resolution; • Absolute Accuracy; • Update Rate; • Isolation; • Load Impedance, Inductance, Capacitance; • External Supply Voltage Range and External Supply Voltage Ripple; • Power Consumption, Internal Power Dissipation; • Operating Conditions – Temperature, Humidity, Vibration, etc.
7. Systems with redundancy 7.1. Hot Standby
A hot standby system consists of two identically configured PLC units that are communicating with each other via hot standby processors. If there is a failure of the primary PLC, the secondary (or backup) PLC will assume the control check. Under normal conditions, the secondary PLC assumes no control functions, it only checks status information to detect errors.
Primary PLC
Secondary PLC
PS CPU RIO CHS
PS CPU RIO CHS
Fiber optic link
Connector to RIOS
Fig. 13. Hot standby solution
The following three items are important. 1.
The two systems must be identical.
2.
The order of the modules in each rack must be the same.
3.
The software revisions must be the same.
The Hot Standby solution provides bumpless transfer of I/O using remote I/O. In case of a failure, the controllers switchover and the system recovers quickly. After Hot Standby system has been started and is running normally, it will continue to function automatically. It constantly tests itself for faults and is always ready to transfer control from the Primary to the Standby, if it detects a fault.
While the system is running, the primary CHS module will automatically transfer a predetermined amount of state RAM to the Standby unit each scan. This ensures that the Standby is ready to take control if needed. If one or both of the links between the Hot Standby modules are broken, the Primary controller will function as though no backup is available. If the Primary controller fails, the Standby automatically assumes control of the remote I/O network. If the Primary controller recovers from failure, it assumes Standby responsibilities. If it cannot recover, it remains offline. If the Standby controller fails, it goes offline. The Primary controller functions as a standalone and continues to manage the I/O networks.
Other solutions: Hot Backup, Warm Standby.
7.2. Triple Modular Redundancy (TMR)
TMR is a fault tolerant solution, in which three systems perform a process and that result is processed by a voting system (two of three) to produce a single output. This means, if one of the three systems fails, the other two systems can correct and mask the fault. Example: the GE Fanuc Genius Modular Redundancy (GMR) system.
Fig. 14. GMR system (Load in H connection)