Automatic discharge system from the conveyor on an industrial programmable relay

There is a conveyor on which a defect sensor and an actuator - a dumper are installed. Objects are moving along the conveyor, the task is to reset in case of a defect. The length of the object is from 1.5 to 7 meters, in order to avoid various interesting effects, the discharge must be made at the moment the center of the object passes by the dropper. The distance traveled by the object is measured using a displacement sensor (incremental encoder), the presence of the object is determined by the presence sensor (photosensors). After processing the data from these sensors, you can measure the length of the object and calculate the required displacement to the drop point.





This is a story about using a simple programmable relay in a real-life industrial automation task. But is it that simple? Welcome to programming without a single line of code!





To solve this problem, we use the available Siemens LOGO 6 series programmable relay. Many manufacturers have similar relays, they are usually small in size and placed on a standard DIN rail. I will try to use the example of LOGO to tell you what they are and how they differ from PLCs.

The basic module has several inputs, outputs, a connector for programming, a display and control buttons (there are cheaper models without buttons and a display). Newer series (starting from 7) have an SD card slot and Ethernet. The power supply is both low-voltage and 230 volts. Expansion modules can be connected to the base module - input, output, communication. The maximum configuration is 24 inputs and 16 outputs, the program can contain up to 200 elements (up to 400 starting from the 7th series).

Difference from PLC: inputs and outputs are connected to one-piece terminal block, there is no indication of their status, the program cannot be changed during execution and is only rewritten entirely. Only two languages ​​from the IEC 61131-3 standard can be used for programming: LAD (Ladder Ladder) and FBD (Function Blocks).





This is the same program, on the left FBD, on the right LAD
This is the same program, on the left FBD, on the right LAD

, , - , ( 7 ), . , , , . ? , . .





This is the first sketch when it seemed that the main problem was to determine the reset point.
,

, - , 3 . - . 9 , 6 - . , . , - . . "". , . - .





Recursion

- , , . - . - , - .





The program counter has the function of turning on / off the output signal when the set thresholds are reached
/

.





Math is simple - 4 steps
- 4

: , " ". , . , . . . 4 , . - , , , ( ), . .





, 3. . - 10 . , - . - , - , , . , - . - , LOGO - , . , - , .





The program is graphically placed on 8 A4 sheets, here I bring it in the form of two pictures (be careful, they are large).





Picture 1
Picture 2

This is a real project that has been working in hardware for the fifth year with minor modifications - a light and sound indication of the start of the input conveyor has been added, there have been experiments with resetting without stopping (added as a disabled option).








All Articles