Скачиваний:
13
Добавлен:
10.07.2023
Размер:
908.01 Кб
Скачать

plc basic functions - 15.34

11.

AND

Source A I:001

Source B 0000 0010 0001 0100 (binary)

Dest N7:0

EQU

Source A 0000 0010 0001 0100 (binary) O:000/4

Source B N7:0

12.

The data in the source location will be moved bit by bit to the destination for every bit that is set in the mask. Every other bit in the destination will be retain the previous value. The source address is not changed.

N7:2 = (N7:0 & N7:1) + (N7:2 & N7:1)

15.8 ASSIGNMENT PROBLEMS

1.Write ladder logic to calculate the average of the values from N10:0 to N10:99. The operation should start after a momentary contact push button A is pushed. The result should be stored in N7:0. If button B is pushed, all operations should be complete in a single scan. Otherwise, only ten values will be calculated each scan. (Note: this means that it will take 10 scans to complete the calculation.)

2.Write a ladder logic program that will implement the function below, and if the result is greater than 100.5 then the output O:0.0/0 will be turned on.

X

= 6

+ AeB cos ( C + 5)

where,

 

 

 

A = N7:0

B = F8:0

C = N7:1

X = F8:1

3.Write some simple ladder logic to change the preset value of a counter. When the input ‘A’ is active the preset should be 13, otherwise it will be 9.

4.The 16 input bits from I:000 are to be read and EORed with the inputs from I:001. The result is to be written to the output card O:002. If the binary pattern of the outputs is 1010 0101 0111 0110 then the output O:003/0 will be set. Write the ladder logic.

Соседние файлы в папке PLC