Your system, as you have described it, does not seem very stable nor reliable.
It appears that you are relying very heavily on timing. This does not provide "positive" control. By using timing, you are "assuming" that the part will be where it needs to be and when it needs to be there. If your conveyor operated in an indexing fashion you could develop a positive timing relationship between the part-type and its position.
I assume, based on what you have said (or rather, not said) that once the parts pass the sensors the PLC has essentially "lost sight" of the parts.
So, it appears that you are hoping to be able to pass "type-bits" through a bit-register, or some-such, at the same speed that the conveyor is moving.
The problem with that approach is that there is nothing to cause the speed of the bit-registers to be synchronized with the speed of the conveyor. Each will be running independently of the other.
If there is the slightest variation in conveyor speed, or if the PLC program is very large... actually, it doesn't matter how large or small the program is...
Even if the speed of the conveyor is absolutely steady, if you don't have a means to keep the two synchronized, the PLC will go out of synch with the conveyor.
However, just for the sake of discussion, let's assume that the speed of the conveyor is synchronized with the speed of the PLC...
You need to have TWO bit-shift registers; one for the High sensor and one for the Low sensor. Both registers need to shift together.
Let's look at the Ejectors (lower right in the drawing below).
The High-Bin Ejector is monitoring the state of Bit-12 in the HIGH-REG.
The Low-Bin Ejector is a little bit different. It has to monitor Bit-12 of the LOW-REG and Bit-14 of the HIGH-REG. If it only monitored the state of Bit-12 in the LOW-REG then it would operate in every slot where there was a High-part, even though the High-part has been already ejected.
HIGH
SENSOR
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
HIGH | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
REG +---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| |
LOW | |
SENSOR | |
| | |
1 2 3 4 5 6 7 8 9 10 11 12
LOW +---+---+---+---+---+---+---+---+---+---+---+---+
REG | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
+---+---+---+---+---+---+---+---+---+---+---+---+
H L L L H L
HIGH LOW
BIN BIN
EJECT EJECT
.
Everytime the registers shift, according to your bit-shift index timer, each ejector responds to the state(s) of the bits that the particular ejector is monitoring. I have assumed that there is always a gap between parts and that the gap is at least as large, timewise, as a part. If so, then after ejecting a part, the next bit will ALWAYS be a zero, thus retracting the ejector.
This drawing shows that there is a 2-bit difference between the two registers. That is, Bit-1 of the LOW-REG is aligned, timewise, with Bit-3 of the HIGH-REG.
Everytime that a bit-shift is to occur, the state of each sensor is loaded into its' respective register.
In this manner, having a part in front of each sensor at the time of a bit-shift is not a problem.
Each sensor should be observed separately and recorded separately.
In terms of the problem as you have described it, if this doesn't give you what you need then you simply MUST explain WHY!
Thyrn, you simply have to know... 90% of the effort required to develop a solution is developing the right question; that is, properly identifying the problem!
(183)
BTW Thyrn, don't leave us hanging... this is interesting and interested minds want to know!