Sie sind auf Seite 1von 2

Detecting the direction of a conveyor belt

The following figure shows a conveyor belt that is equipped with two photoelectr
ic barriers (PEB1 and PEB2).
The photoelectric barriers are designed to detect the direction in which an obje
ct is moving on the conveyor belt.
Implementation
The following table shows the definition of the tags used:
Name
Declaration
Data type
Description
Photoelectric barrier LS1
Input
BOOL
Photoelectric barrier 1
Photoelectric barrier LS2
Input
BOOL
Photoelectric barrier 2
RIGHT
Output
BOOL
Display for movement to the right
LEFT
Output
BOOL
Display for movement to the left
The following SCL program shows how to implement this example:
SCL
IF "LS1" = 1 AND NOT "LS2" = 0
THEN "LEFT" = 1;
IF "LS2" = 1 AND NOT "LS1" = 0
THEN "RIGHT" := 1;
IF "LS2" = 0
THEN "RIGHT" := 0;
IF "LS1" = 0
THEN "LEFT" = 0;
clipboard
If the photoelectric barrier "PEB1" has signal state "1" and the photoelectric b
arrier "PEB2" has signal state "0" at the same time, the object on the belt is m
oving to the left. If the photoelectric barrier "PEB2" has signal state "1" and

the photoelectric barrier "PEB1" has signal state "0" at the same time, the obje
ct on the belt is moving to the right. The displays for a movement to the left o
r right will be turned off when the signal state at both photoelectric barriers
is "0".

Das könnte Ihnen auch gefallen