Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Instrumentation Sensors Book

.pdf
Скачиваний:
16
Добавлен:
27.06.2023
Размер:
2.86 Mб
Скачать

14.3 Controller Operation

235

 

 

 

 

Mass storage

Input module

 

 

sensor data

 

 

Consoles

 

 

ADC

 

Bus

 

Loop 1

 

Multiplexer

 

Memory

 

 

 

 

 

 

 

Address

ADC

 

 

 

Printers etc.

Processor

 

Process

 

 

Address

DAC

 

 

 

Alarms

 

Demultiplexer

 

 

Bus

 

 

 

Loop 2

 

 

 

Network

 

Control

DAC

 

 

 

 

Fieldbus

data

 

 

Output module

 

 

Figure 14.3 Computer-based digitally controlled process.

the digital output signal is fed to the actuator through a demultiplexer and converted to an analog signal by a DAC. The processor also will have mass storage for storing process data for later use or for making charts and graphs. The process also will be able to control a number of peripheral units and sensors as shown, and perform alarm functions [4].

14.3Controller Operation

The central processing unit can be divided into the processor, memory, and input and output units or modules, as shown in Figure 14.4. The units are interconnected by a two-way 16-bit data bus, a one-way address bus, and a one-way enable bus. The address and data buses are common to all units, and the enable bus will select the individual units being addressed and connect the unit’s data bus drivers or receivers to the data bus. The enable and address buses are controlled by the processor, which uses software instructions for its direction. When addressing an input module, the module is selected with its enable bus code. The address bus then can be used to select which external input data is to be put onto the two-way data bus. This data is then transferred to memory to wait for the next step from the software instructions. The output modules are addressed and selected in the same way as the

Data bus

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Input

 

Input

 

Input

 

 

 

 

 

 

 

Output

 

Output

 

Output

 

 

 

 

 

 

unit

 

unit

 

unit

 

Memory

 

Processor

 

unit

 

unit

 

unit

no 1

 

no 2

 

no 3

 

 

 

 

 

 

 

no 1

 

no 2

 

no 3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Address bus

Enable bus

Figure 14.4 Block diagram of processing unit.

236

Programmable Logic Controllers

input modules. The unit is selected by the enable code, and the address bus directs the data placed on the data bus from the memory by the processor to its output.

The operation cycle in the PLC is made up of two separate modes; these are the I/O scan mode, followed by the execution mode [5].

I/O scan mode is the period when the processor updates the output control signals, based on the information received from the previous I/O scan cycle after its evaluation of the signals. The processor then scans the inputs in a serial mode and updates its internal memory as to the status of the inputs.

Execution mode follows the I/O scan mode. In this mode, the processor evaluates the input data stored in memory against the data programmed into the CPU. The programs usually are set up using ladder networks, where each rung of the ladder is an instruction for the action to be taken for each given input data level. The rung instructions are sequentially scanned, and the input data evaluated. The processor then can determine the actions to be taken by the output modules, and puts the data into memory for transfer to the output modules during the next I/O scan mode.

Scan time is the time required for the PLC to complete one I/O scan plus the execution cycle. This time depends on the number of input and output channels, the length of the ladder instruction sets, and the speed of the processor. A typical scan time is between 5 and 20 ms. As well as evaluating data, the PLC also can generate accurate time delays, store and record data for future use, and produce data in chart or graph form.

14.4Input/Output Modules

Input/output modules act as the signal interface between the monitoring sensors and actuators, and the controller. I/O modules also provide electrical isolation, if necessary, to convert the input signals into an electronic format suitable for evaluation by the controller; provide memory storage; and format the output signals for displays and control functions. Modules fall into three categories: (1) those for use with discrete I/O levels, (2) those with analog signal levels, and (3) those that have intelligence to evaluate and modify the input signals before they can be used by the controller. Some modules are configured for local signals up to 500 ft, and some are for remote signals from 500 to 10,000 ft. Input/output modules will typically have 16 inputs or outputs, but can be as high as 32, or as low as 4. Modules that have both input and output ports are also available.

14.4.1Discrete Input Modules

Discrete input modules serve as On/Off signal receivers for the processor. The basic function of the input module is to determine the presence or absence of a signal. The inputs from peripheral devices to the input modules can be ac or dc signals. The voltage ratings for input modules can vary from 24V to 240 V, ac or dc, as well as 5V and 12V TTL levels. The various types of applications that can be used with the discrete input modules are given in Table 14.1.

Figure 14.5 shows examples of the input module tag strips that are normally on the front of the modules. A discrete module typically will have 16 inputs, which can

14.4 Input/Output Modules

237

Table 14.1 Discrete Input Applications

 

Type of Input

Application

 

Discrete input

Push buttons, switch, relay contacts, starter contacts, proximity switch, photo-

 

 

electric device, float switch

 

TTL Input

CMOS logic or TTL level

 

dc or ac Inputs

General purpose high-, medium-, or low-level inputs

 

Discrete parallel inputs

Thumbwheel switches, bar code readers, weigh scales, position encoders, ADC,

 

BCD/parallel data devices

 

 

 

DC +

+ V

 

 

 

 

0

 

 

ac

1

 

0

/dc

2

 

1

 

3

 

2

 

C

 

3

 

4

Input

4

ac

5

 

5

/dc

6

 

6

 

7

 

7

 

C

Input

8

 

8

 

9

ac

9

 

10

10

 

11

/dc

 

 

11

Input

12

 

C

13

 

 

 

12

 

14

ac

13

 

15

14

Input

16

/dc

 

15

DC −

17

 

C

C

 

 

 

(a)

 

(b)

Figure 14.5 Examples of input module switch connections.

be segmented into groups of 4, 8, or 16. Some examples of how the wiring can be implemented in various modules are shown. In Figure 14.5(a), switches are connected in blocks of 4 with ac or dc power supplies. An open switch gives a “0” level input, and a closed switch gives a “1” level input. In Figure 14.5(b), the inputs are transistor logic levels, and the logic output transistor with load is shown. If the transistor is On, the input is a “0” level, and if Off, the input is a “1” level.

The input stage of a dc or ac module is used to detect presence or absence of a voltage, and to convert the input voltage to a logic 5V level. Figure 14.6 shows the block diagram of a discrete input module. The front ends of both the dc and ac modules are shown. With a high dc input voltage, the voltage is stepped down to a low voltage, which then goes through a de-bounce circuit with a noise filter, and threshold detector for “1” or “0” detection, followed by optical isolation, so that the signal can be referenced to the signal ground of the processor. The ac module input

238

 

 

 

 

 

 

 

 

 

 

 

Programmable Logic Controllers

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Input

 

Voltage

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

signal

 

conversion

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Status

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DC Input

 

 

 

 

 

 

 

 

 

LED

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Noise and

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Input

Bridge

 

 

 

Threshold

 

 

Optical

 

 

Logic

 

 

Controller

 

signal

 

de-bounce

 

 

 

 

 

 

 

 

 

rectifier

 

 

 

detector

 

 

isolation

 

 

 

 

 

 

 

 

 

filter

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

AC Input

Figure 14.6 Block diagram of an input module with ac or dc input.

uses a bridge rectifier to convert the ac to dc, then uses the same circuit blocks as in the dc module. The LED is used to indicate the input logic level of the input signal. The input level LED indicators are normally located above the tag strip.

14.4.2Analog Input Modules

Typical analog input modules are used to convert analog signals to digital values or words. Analog signals are derived from temperature, pressure, flow, position, or rate measurements. Analog signals can be single-ended or differential. Figure 14.7 shows the block diagram of a differential analog receiver. The signal is converted into a digital word. The resolution of the ADC is normally 305.176V when using voltage input, and 1.2207A when using a current input. The ADCs are 14 to 16 bits in length. The inputs are floating, so that the output from the ADC uses an optoisolator to reference the digital signal to the ground level of the controller.

Analog input applications are temperature, humidity, pressure, flow rate, load, thermocouple, RTD, magnetic, and acceleration sensors. The typical input voltage levels are from 50 to 500 mV, up to ±10V, and current ranges from 20 to 50 mA.

14.4.3Special Function Input Modules

To satisfy some special cases, a variety of discrete modules are available to process or interface special signals. A list of these functions is given in Table 14.2.

 

 

 

 

Status

 

 

 

 

 

LED

 

CH + 250 kΩ

 

 

 

 

 

 

+

 

 

 

250 kΩ

3 nF

A/D

Optical

Logic

Controller

 

 

converter

isolation

 

 

 

 

250 kΩ

3 nF

 

 

 

 

 

+

 

 

 

CH − 250 kΩ

 

 

 

 

 

Com

 

 

 

 

 

Figure 14.7 Analog input module block diagram.

14.4 Input/Output Modules

239

 

Table 14.2 Special Function Input/Output Modules

 

 

Module Type

Application

 

Interrupt input

Immediate response to signal changes

 

Voltage comparator input

Analog set-point comparison

 

Latching input

Detection of short duration signals

 

Fast input

Fast response to dc level changes

 

Rapid response I/O

Provides fast input/output response

 

Relay contact output

High current switching and signal multiplexing

 

Wire fault input

Wire break and short circuit detection

The interrupt function module is used to interrupt the processor’s scan sequence, in order to perform a task that requires immediate attention.

The voltage comparator module is used to compare the amplitude of the input to an internally generated voltage or an externally derived voltage.

To detect fast transients of a few microseconds that would normally be missed by standard input modules, the latching input module is used to detect transients and set a latch.

The fast input performs a similar function to the latching module, but does not latch the transient. It only holds the information for a scan cycle, so that it can be detected and recorded.

The rapid response module is similar to the latching input module, but can immediately enable an output without having to wait for a scan cycle.

The relay output module has isolated relay contacts to handle high currents and to multiplex signals.

The fault input is used to interface wire fault detection circuits to the processor.

14.4.4Discrete Output Modules

Discrete output modules are used to interface output information from the controller to peripheral units, to provide electrical isolation, and to provide the data in a suitable format for use by the external units. The output from the modules can be either discrete ac or dc outputs, or relay contacts. The output voltage can be from 12V to 230V, ac and dc, and TTL levels with multiple or isolated contacts. Table 14.3 shows a list of discrete output applications.

Figure 14.8 shows the block diagram of solid state discrete output drivers using TRIACs. Only two drivers are shown, but normally the drivers would be in groups of four or eight drivers in a module. The outputs have filtering and surge suppression to protect the drivers against transients and inductive spikes, and are fused for protection against overloads. The LED is located above the tag strip, and is used to indicate the logic state of the output.

Table 14.3 Discrete Output Applications

Type of Output

Application

Discrete outputs

Motor starters, solenoids, alarms, horns, buzzers, pilot lights, fans

TTL output levels

TTL and CMOS logic devices

ac, dc outputs

General purpose high-, medium-, or low-load, ac or dc

Parallel outputs

Seven segment displays, BCD controlled message displays, DAC, BCD/parallel data

 

input devices

240

Programmable Logic Controllers

Status

LED

Output

Controller Logic Optical

isolation

Status

LED

Output

Controller Logic Optical

isolation

Power

Figure 14.8 Discrete ac output module.

14.4.5Analog Output Modules

Analog outputs from the PLC drive analog meters, chart recorders, proportional valves, and variable speed drive controllers. They also are used for current or voltage to pneumatic transducers. The voltage and current output ranges are the same as the input ranges. Figure 14.9 shows the block diagram of an analog output stage. The digital output from the controller is fed via an optical isolator to an ADC to reference the signal to the ground of the peripheral device. The analog output of the converter is amplified and fed to a voltage or current driver, which can have a single-ended output or a differential output. The output signal also will meet the standard voltage or current control ranges.

14.4.6Smart Input/Output Modules

A number of specialized modules have been developed to interface to the controller. They normally contain their own processor and memory, and can be programmed to perform operations independent of the central processor. These modules are categorized in Table 14.4 [6].

Serial and network modules are used for data communication. The serial modules communicate between other PLCs, message displays, operator terminals, and intelligent devices. The network modules are used for LAN and WAN. The Manufacturing Automation Protocol (MAP) is used for communication to robotic devices and a variety of computers of differing manufacturers that can support MAP [7].

The coprocessor modules are basically used for housekeeping functions, such as math functions, algorithms, data manipulation, outputs of reports, outputs to

Status

LED

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Voltage or

 

 

 

 

 

Logic

 

 

Optical

 

 

A/D

 

Amp

Analog

Controller

 

 

 

 

 

 

 

current

 

 

 

 

isolation

 

 

 

output

 

 

 

 

 

 

 

 

 

converter

 

 

driver

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 14.9 Analog output block diagram.

14.4 Input/Output Modules

241

 

Table 14.4 Intelligent Input/Output Module Categories

 

 

Intelligent Category

Intelligent I/O Module Type

 

Serial and network communications

ASCII communications module

 

 

Serial communication module

 

 

Loop controller interface module

 

 

Proprietary LAN network module

 

 

MAP network module

 

Computer coprocessor

PC/AT computer module

 

 

Basic language module

 

 

I/O logic processor module

 

Closed loop

PID control module

 

 

Temperature control module

 

Position and motion

High-speed counter module

 

 

Encoder input module

 

 

Stepper positioning module

 

 

Servo positioning module

 

Process specific modules

Parison control module

 

 

Injection molding module

 

 

Press controller module

 

Artificial intelligence module

Voice output module

 

 

Vision input module

printer, displays, and mass data storage, using basic programming language functions that would be hard for the main processor to perform with ladder logic.

Intelligent modules performing closed-loop control algorithms are required for PID functions, such as maintaining temperature, pressure, flow, and level at set values. However, the introduction of smart sensors reduces the load on the processor and communication to the processor in this case is via the Fieldbus.

The internal control function of the PID module using an analog loop is shown in Figure 14.10. The analog temperature signal from the furnace is the input to the module, where it can be converted to a digital signal and recorded in the computer memory, fed to the PID controller via a gain control. It is then sent to an analog differencing circuit, where it is compared to the set point signal from the processor. The furnace signal and set point are subtracted, giving an analog error voltage. The error voltage is fed to the PID controller. The controller then produces an analog

Processor

ADC

Analog input

T

 

 

 

Furnace

 

Gain adj.

PID module

 

 

DAC

 

Heater

 

 

 

 

Set point

 

 

 

PID controller

Analog output

 

 

Error

 

 

Figure 14.10 Supervisory PID control using an analog control loop.

242

Programmable Logic Controllers

control voltage to adjust the valve controlling the fuel flow to the furnace. The PID module could also use digital techniques, in which case, the analog input signal would be converted into a digital signal, and compared to the set point in a digital comparator to generate the error signal. The controller will use the error signal to generate a PWM signal to control the furnace fuel actuator [8].

The temperature control module normally controls from 8 to 16 temperature zones. The module is configured for two-position control (heat on/heat off), or three-position control (heat on/heat off/cool). The set points are stored in the processor. A typical application is large building HVAC, or controlling the zone temperatures required in plastic injection molding machines.

Position and motion modules enable PLCs to control stepper and servo motors in feedback loops, to measure and control rotation speeds and acceleration, and to control precision tools. This category of devices uses high-speed counting, rotational and linear position decoders, and open and closed loop control techniques, in order to measure axis rotation and linear speed and position. Typical applications of position and motion modules are given in Table 14.5.

Process specific modules are intelligent modules designed to perform a specific control function or a specific series of operations. Many machines built by different vendors perform similar functions and are similar in operation, using similar inputs and outputs. These modules were developed to interface with such machines. The operations they perform are normally repetitive, requiring precise measurements and complex numerical algorithms. Typical applications are profiling and controlling plastic molding and injection systems [9].

Artificial intelligence modules have a number of industrial applications in voice recognition, synthesized speech, and visual inspection. The sound module can give alarm announcements, voice recognition, and echo evaluation, when using sound waves for flaw detection. The video module can provide dimension gauging, visual inspection, flaw and defect detection, position analysis, and product sorting.

Table 14.5 Applications of Position and Motion Modules

Module

Application

High-speed counter module

Up/down counting

 

Generate interrupt for set count

 

Generate gating

 

Generate delays

Encoder input module

Absolute position tracker

 

Incremental position tracker

Stepper-positioning module

Open loop position

 

Setting dwell times

 

Define motion speed

 

Motion acceleration

Servo-positioning module

Transfer and assembly lines

 

Material handling

 

Machine tool setting

 

Table positioning

 

Precision parts placement

 

Automatic component insertion

14.5 Ladder Diagrams

243

14.5Ladder Diagrams

The ladder diagram is universally used as a symbolic and schematic way to represent the interconnections between the circuit elements used in programming a PLC. The ladder network also is used as a tool for programming the operation of the PLC [10]. The elements are interconnected between the supply lines for each step in the control process, giving the appearance of the rungs in a ladder. A number of programming languages are in common use for controllers, as follows:

Ladder;

Instruction list;

Boolean flowcharts;

Functional blocks;

Sequential function charts;

High-level languages (ANSI, C, structured text).

14.5.1Switch Symbols

Figure 14.11 shows the typical switch symbols with switch number used for the elements in a ladder diagram. A number of momentary action switches are shown. These are, from top to bottom: a push to close [normally open (NO)] and push to open [normally closed (NC)]. These switches are the normal momentary action panel mounted operator switches.

Position limit switches sense the position of an object, and close or open when a desired position is reached. Pressure, temperature, and level switches set limits, and can be designed to open or close when the set limits are reached. The level switch shown is the lower limit switch (LLS), The upper limit switch (ULS) or full switch (FS) are not shown. The output from the most common flow meter produces pulses that go to a counter. The symbol for the meter is shown.

PB1

PB2

LS1

LS2

 

 

 

Push button switches

 

 

Limit switches

PS1

PS2

 

 

 

 

 

TS1

 

 

 

 

TS2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Pressure switches

 

 

 

 

Temperature switches

 

 

 

 

 

LLS1

LLS2

FM1

 

Low level switches

Flow meter (pulse output)

Figure 14.11 Switch symbols in use for ladder diagrams.

244

Programmable Logic Controllers

14.5.2Relay and Timing Symbols

Figure 14.12 shows the symbol for relays, timers and counters. A control relay is a circle with the designation CR, followed by the number of the device to distinguish between the various relays used. This is shown with the symbols for its NO and NC contacts. These contacts will carry the same CR and number as the relay. A timer relay has the designation TR in a circle with a number, and its associated NO and NC contacts will be likewise named and numbered. A timer has two sets of contacts:

(1) the On-delay contacts that operate after a time delay, and (2) the Off-delay contacts that operate as soon as the delay is initiated and reset at the end of the set time period. The delay time also will have the delay time specified. A counter has the designation CTR with its number. A third lead on the counter is used to activate the count, and to reset the counter after the count has finished. The counter will specify the number of counts.

14.5.3Output Device Symbols

Symbols for output devices are shown in Figure 14.13. A circle with the letter M and an appropriate number represents a motor. A circle with radiating arms and a letter to indicate its color (e.g., R = red, B = blue, O = Orange, and G = green), plus its number represents an indicator. A solenoid that is used to operate a flow valve or move an object, or for a similar, unspecified, use, is designated SOL with number. Other output elements without specific symbols, such as alarm, heater, or fuse, are represented by boxes, as shown, with the name of the element and its number in the box to distinguish between similar types of elements used in different places.

CR1

 

CR1

CR1

 

 

NO

 

NC

 

 

Control relay and contacts

 

TR1

 

TR1

 

 

TR1

 

 

NO

On-delay

NC

 

 

 

TR1

 

TR1

 

 

NO

Off-delay

NC

 

 

 

Timer delay contacts

 

 

CTR1

 

CTR1

CTR1

 

 

NO

NC

 

Counter and contacts

 

Figure 14.12 Symbols for control relays, timers, counter, and contacts.