Electronic – Trigger PLC multiple times with delays

plc

I am brand new to PLC's (don't even have a single device in use yet), but I have been programming for more than 20 years and haven taken classes in electrical controls, so I understand machine logic very well.

I am planning an application where a machine will make a simple movement with a preset delay after being triggered. Specifically, there are many items on a conveyor belt and some of them will be diverted off the belt. The sensor that triggers this is near the beginning of the belt, and the device to remove them is at the other end. There will likely be multiple triggers/inputs occurring prior to the end of the previous delayed output.

Is this something most PLC's will readily handle and is there anything special I would need to do to accomplish this?

Best Answer

Traditionally we use a shift register to track parts through a machine. This works well for discrete moves but is more problematic for continuous motion such as on a conveyor.

If, for example, your product is 200 mm long then I would index the shift register every 50 mm or so and that way you're guaranteed that each product will be seen at least once and tracked in the shift register. The number of stages required will be the distance between sensors divided by the step. So, for a 1500 mm conveyor you would need 1500 / 50 = 30 stages.

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. Pseudo ladder logic code for a 30-bit shift register.

In the pseudo code above a 30-bit shift register has been set up starting at F200 (F for 'flag'). If the photoeye is on during a rising edge of the CLK then a '1' is loaded into the shift register at F200 after the existing data has been moved up one position. Any time a '1' reaches F229 the ejector output will turn on.

The 50 mm pulse would ideally be triggered by sensing the rotation of a shaft on the conveyor but if the speed does not change it could be done on a timer.


From the comments:

The important part of the question is the concern that there will be several items on the conveyor at a time in between the sensor and the ejector, will the logic still work as is?

Yes.

         | sensor                                           | ejector
     _______         ________        ________        ________
    |_______|       |________|      |________|      |________|   >>>     
 ___________________________________________________________
(___________________________________________________________)
                        Conveyor

         1 1 0 0 0 0 1 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 1 1 1 1    0 mm
         1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 1 1 1   50 mm
         1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 1 1  100 mm

Figure 2. Shift register contents.

Related Topic