Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
(EOD).Mechatronics.pdf
Скачиваний:
81
Добавлен:
23.08.2013
Размер:
5.07 Mб
Скачать

page 515

ditioner that gives 1V at 500F and 3V at 1500F. The controller should have a start button and E-stop.

29.3.2 Statistical Process Control (SPC)

We can do SPC checking using analog inputs, and built in statistics functions.

Recall the basic equations for a control chart.

m

 

 

=

 

j

UCL =

 

 

+ 3σ

 

 

 

X

X

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

j = 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LCL =

X

– 3σ

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

The general flow would be,

1.Read sampled inputs.

2.Randomly select values and calculate the average and store in memory. Calculate the standard deviation of the stored values.

3.Compare the inputs to the standard deviation. If it is larger than 3 deviations from the mean, halt the process.

4.If it is larger than 2 then increase a counter A, or if it is larger than 1 increase a second counter B. If it is less than 1 reset the counters.

5.If counter A is =3 or B is =5 then shut down.

6.Goto 1.

29.4 PRACTICE PROBLEMS

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

Vout = ln ( Vin)

page 516

2. 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 = 5y1 + sin y B = O:001/00

x = F8:0 y = F8:1

ans.

A

LIM

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

page 517

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

 

 

 

 

 

 

 

3. 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 writing it to

page 518

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

page 519

ans.

 

 

 

 

 

 

 

 

FS

S1

START

S2

F>100

S3

 

 

waiting

 

 

sampling

 

winner

 

 

 

TON(S2, 1sec)

 

 

 

 

 

 

 

 

 

TON(S3, 5sec)

 

 

 

FS

L

ST1

 

 

TON

 

 

 

 

 

 

T4:1

 

 

 

 

 

 

 

 

 

 

 

 

U

ST2

 

 

preset 1s

 

 

 

 

T4:0/DN

 

BTR

 

 

 

 

 

 

 

 

 

 

 

U

ST3

 

 

Device Analog Input

 

 

 

 

 

 

 

location 000

 

 

 

BTW

 

 

 

Control BT10:1

 

 

 

Device Analog Input

 

 

Data N9:40

 

 

 

location 000

BT10:1/DN

 

Length 20

 

 

 

Control BT10:0

 

DIV

 

 

 

 

Data N9:0

 

 

 

 

 

 

 

 

 

 

Source A N9:40

 

 

 

Length 37

 

 

 

 

 

 

 

T4:1/DN

Source B 6

 

 

 

 

 

 

 

 

 

 

T4:1/DN

 

Dest. N7:0

 

 

ST2

 

 

 

U

ST2

 

 

 

LIGHT

 

 

 

 

 

 

 

 

 

 

 

 

ST3

 

BIG_LIGHT

 

L

ST1

 

 

 

 

 

 

 

 

 

 

 

SIREN

 

 

TOD

 

 

 

ST1

 

 

 

 

Source A N7:0

 

 

MCR

 

 

Dest. O:001

 

 

 

T4:1/DN

 

 

 

START

U

ST1

 

GRT

U

ST1

 

 

 

Source A N7:0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Source B 100

L

ST3

 

 

L

ST2

 

 

 

 

 

 

 

 

 

 

 

 

MOV

 

 

 

MCR

 

 

 

 

ST3

 

MCR

 

 

 

Source 0.0

 

 

 

 

 

 

Dest F8:0

 

 

 

TON

 

 

 

 

 

 

 

 

 

 

 

 

MCR

 

 

T4:2

 

 

 

ST2

 

 

 

 

preset 5s

 

 

 

MCR

T4:2/DN

 

 

 

 

 

 

 

U

ST3

 

 

 

 

 

 

 

 

 

 

TON

 

 

 

L

ST1

 

 

 

T4:0

 

 

 

 

 

 

preset 0.3s

 

 

 

MCR

 

 

 

 

 

 

 

 

page 520

4.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

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

6.

Соседние файлы в предмете Электротехника