Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Jack H.Automating manufacturing systems with PLCs.2005.pdf
Скачиваний:
261
Добавлен:
23.08.2013
Размер:
5.34 Mб
Скачать

plc analog - 22.22

1" or less typical

Figure 22.18 A Twisted Pair

When designing shielding, the following design points will reduce the effects of electromagnetic interference.

Avoid “noisy” equipment when possible.

Choose a metal cabinet that will shield the control electronics.

Use shielded cables and twisted pair wires.

Separate high current, and AC/DC wires from each other when possible.

Use current oriented methods such as sourcing and sinking for logical I/O.

Use high frequency filters to eliminate high frequency noise.

Use power line filters to eliminate noise from the power supply.

22.4DESIGN CASES

22.4.1Process Monitor

Problem: Design ladder logic that will monitor the dimension of a part in a die. If

the

Solution:

22.5SUMMARY

A/D conversion will convert a continuous value to an integer value.

D/A conversion is easier and faster and will convert a digital value to an analog value.

Resolution limits the accuracy of A/D and D/A converters.

Sampling too slowly will alias the real signal.

Analog inputs are sensitive to noise.

The analog I/O cards are configured with a few words of memory.

BTW and BTR functions are needed to communicate with the analog I/O cards.

plc analog - 22.23

Analog shielding should be used to improve the quality of electrical signals.

22.6PRACTICE PROBLEMS

1.Analog inputs require:

a)A Digital to Analog conversion at the PLC input interface module

b)Analog to Digital conversion at the PLC input interface module

c)No conversion is required

d)None of the above

2.You need to read an analog voltage that has a range of -10V to 10V to a precision of +/-0.05V. What resolution of A/D converter is needed?

3.We are given a 12 bit analog input with a range of -10V to 10V. If we put in 2.735V, what will the integer value be after the A/D conversion? What is the error? What voltage can we calculate?

4.Use manuals on the web for an analog input card, and describe the process that would be needed to set up the card to read an input voltage between -2V and 7V. This description should include jumper settings, configuration memory and ladder logic.

5.We need to select a digital to analog converter for an application. The output will vary from - 5V to 10V DC, and we need to be able to specify the voltage to within 50mV. What resolution will be required? How many bits will this D/A converter need? What will the accuracy be?

6.Write a program that will input an analog voltage, do the calculation below, and output an analog voltage.

Vout = ln ( Vin)

7.The following calculation will be made when input A is true. If the result x is between 1 and 10 then the output B will be turned on. The value of x will be output as an analog voltage. Create a ladder logic program to perform these tasks.

A = I:000/00 x = 5y 1 + sin y B = O:001/00

x = F8:0 y = F8:1

8.You are developing a controller for a game that measures hand strength. To do this a START button is pushed, 3 seconds later a LIGHT is turned on for one second to let the user know when to start squeezing. The analog value is read at 0.3s after the light is on. The value is converted to a force F with the equation below. The force is displayed by converting it to BCD and

plc analog - 22.24

writing it to an output card (O:001). If the value exceeds 100 then a BIG_LIGHT and SIREN are turned on for 5sec. Use a structured design technique to develop ladder logic..

Vin

F = -------

6

22.7 PRACTICE PROBLEM SOLUTIONS

1. b)

2.

R =

10-------V----------(--–10----------V---)-

= 200

7 bits = 128

 

0.1V

 

8 bits = 256

The minimum number of bits is 8.

3.

N = 12

R = 4096

Vm in

= –10V

Vmax = 10V

Vin = 2.735V

VI

= INT

 

 

Vin Vm in

 

 

=

2608

 

 

 

 

 

 

 

 

 

 

---------------------------- R

 

 

 

 

 

 

Vmax Vmin

 

 

 

 

 

 

 

VI

 

 

 

 

 

 

 

VC

( Vmax Vmin)

+ Vm in = 2.734V

 

 

= ----

 

 

 

R

 

 

 

 

 

 

 

 

4.for the 1771-IFE card you would put keying in the back of the card, because voltage is being measured, jumpers inside the card are already in the default position. Calibration might be required, this can be done using jumper settings and suppling known voltages, then adjusting trim potentiometers on the card. The card can then be installed in the rack - it is recommended that they be as close to the CPU as possible. After the programming software is running the card is added to the IO configuration, and automatic settings can be used - these change the memory values to set values in integer memory.

plc analog - 22.25

5.

A card with a voltage range from -10V to +10V will be selected to cover the entire range.

R =

10-------V---------(---–10---------V----)-

= 400

minimum resolution

 

0.050V

 

 

8 bits = 256

9 bits = 512

10 bits = 1024

The A/D converter needs a minimum of 9 bits, but this number of bits is not commonly available, but 10 bits is, so that will be selected.

VERRO R

=

Vmax

Vmin

=

10V – ( –10V)

=

± 0.00976V

--------------

--------------

-------2----(--1024------------)--------

 

 

2R

 

 

 

plc analog - 22.26

6.

FS

BT9:1/EN BT9:0/EN

BT9:1/EN

BT9:1/DN

BTW

Rack 0

Group 0

Module 0

Control Block BT9:0

Data N7:0

Length 37

Continuous No

BTR

Rack 0

Group 0

Module 0

Control Block BT9:1

Data N7:37

Length 20

Continuous No

BTW

Rack 0

Group 1

Module 0

Control Block BT9:2

Data N7:57

Length 13

Continuous No

CPT

Dest N7:57 Expression "LN (N7:41)"

plc analog - 22.27

7.

A

LIM

lower lim. 1 value F8:0 upper lim. 10

SIN

Source A F8:1

Dest. F8:0

ADD

Source A 1

Source B F8:0

Dest. F8:0

SQR

Source A F8:0

Dest. F8:0

XPY

Source A 5

Source B F8:1

Dest. F8:2

MUL

Source A F8:0

Source B F8:2

Dest. F8:0

B

A

 

 

 

 

MOV

 

 

 

 

 

 

 

 

 

 

Source A F8:0

 

 

 

 

 

 

 

 

 

 

 

Dest. N7:0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A

 

BT9:0/EN

BTW

 

Rack 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Group 0

 

 

 

 

 

 

 

 

 

 

Module 0

 

 

 

 

 

Control Block BT9:0

 

 

 

 

 

Data N7:0

 

 

 

 

 

Length 13

 

 

 

 

 

Continuous No

 

 

 

 

 

 

 

plc analog - 22.28

8.

 

 

 

 

 

 

 

 

FS

S1

TON(S1,START)

S2

F>100

S3

 

 

waiting

 

 

sampling

 

winner

 

 

 

TON(S2, 1sec)

 

 

 

 

 

 

FS

 

 

TON(S3, 5sec)

 

 

 

 

L

ST1

 

 

 

 

 

 

 

 

 

TON

 

 

 

 

 

 

 

 

 

 

 

 

U

ST2

 

 

T4:1

 

 

 

 

 

 

preset 1s

 

 

 

 

 

 

 

 

 

 

 

 

U

ST3

T4:0/DN

 

BTR

 

 

 

 

BTW

 

 

 

Device Analog Input

 

 

 

 

 

 

location 000

 

 

 

Device Analog Input

 

 

Control BT10:1

 

 

 

location 000

 

 

Data N9:40

 

 

 

Control BT10:0

 

 

Length 20

 

 

 

 

Data N9:0

 

BT10:1/DN

 

DIV

 

 

 

 

Length 37

 

 

 

 

 

 

 

 

 

 

Source A N9:40

 

 

ST2

 

 

 

 

 

 

 

LIGHT

T4:1/DN

Source B 6

 

 

 

 

 

 

 

 

ST3

 

 

T4:1/DN

 

Dest. N7:0

 

 

 

 

 

 

U

ST2

 

 

 

 

BIG_LIGHT

 

 

 

 

 

SIREN

 

 

L

ST1

 

 

ST1

MCR

 

 

 

 

 

 

 

 

 

TOD

 

 

 

START

 

 

 

 

 

 

 

TON

 

 

Source A N7:0

 

 

 

 

 

Dest. O:001

 

 

T4:0/TT

T4:0

 

 

 

 

T4:1/DN

GRT

 

 

 

 

preset 3s

 

U

ST1

 

 

 

 

 

 

Source A N7:0

 

 

 

 

 

 

T4:0/DN

 

 

 

 

 

 

U

ST1

 

Source B 100

L

ST3

 

 

 

 

 

 

 

 

 

L

ST2

ST3

 

MCR

 

 

 

 

 

 

MCR

 

 

 

MOV

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Source 0.0

 

 

 

TON

 

 

 

 

Dest F8:0

 

 

 

 

 

 

 

 

 

 

T4:2

 

 

 

 

 

 

 

 

 

 

 

 

MCR

 

 

preset 5s

 

 

 

 

T4:2/DN

 

 

 

 

 

ST2

 

 

 

U

ST3

 

 

MCR

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TON

 

 

 

L

ST1

 

 

 

 

 

 

 

 

 

 

 

T4:0

 

 

 

MCR

 

 

 

preset 0.3s