Professional Documents
Culture Documents
7 PLC - Arithemetic, Compare, Data Handling Functions
7 PLC - Arithemetic, Compare, Data Handling Functions
Compare Functions
Arithmetic Functions
Data Handling Functions
COMPARE FUNCTIONS
EQUAL
NOT EQUAL
GREATER THAN OR EQUAL TO
LESS THAN
GREATER THAN
LESS THAN OR EQUAL TO
Values to be compared are at IN1 & IN2. The O/P is 1 only if the
comparison is true
ARITHMETIC FUNCTIONS
ADD
SUBTRACT
DIVIDE
MULTIPLY
INCREMENT
DECREMENT
Here the O/P is on if the inputs A & B are both 1 And if the
comparison is true!
Value at IN1 is added to value at IN2 and the sum is obtained at OUT
The skipped elements remain in the state they were during the
previous scan! ( before skip was enabled)
If Skip is enabled
Lines 1,2,7,8 function normally!
Lines 4,5,6 are frozen / previous state
as long as skip remains enabled!
When a part arrives at the beginning of the conveyor a sensor detects the
presence of parts
At the third station an inspection takes place. If the part is good then it
continues down the operating line; if it is bad it is shunted to a side conveyor
& repaired. After repair the part re enters at the beginning of the conveyor.
As a part proceeds down the counter an
operation is performed (if set up) when
the part is detected by sensors at each
station
If MCR is disabled
Lines 1,2,7,8 function normally!
Lines 4,5,6 are turned off as long as
Master Control Relay remains disabled!
When it re enters it turns on an input which turns on & seals an relay that
turns off MCR
When the part gets to station relay is unsealed & MCR is turned on!
Part continues through stations 6,7 and 8
SKIP MCR
Next specified section (frozen area) Next specified section (frozen area)
stays in the previous scan state remains off!
(on/off)
Skip is active when enabled! MCR is active when disabled! i.e. when
enabled program occurs normally!
Fail Safe!
Jump with Return
Jump with No - Return
A command that causes a sequence to go on / branch to a specified point
other than the next line in a program
Jump with non-return: Similar to skip – Leaps over a certain portion of the
main program when called upon to do so
The inputs of the skipped portion are never scanned & hence the outputs
remain frozen
Note: Both JMP & LBL must have the same address!
If i/p 121 is true (line 17), program jumps to LBL (line 22)
Lines 18-21 are not scanned hence O/Ps remain in their last state!
If i/p is false, program continues to line 18!
It is possible to jump to the same location (LBL) from different locations
(JMP)