Board sorting line

It does really depend on the Encoder resolution & the number of revs to drive the conveyor x position i.e. speed, however, high res encoder pulses directly driving a shift register is probably not practicable as the time to shift thousands of places so a simple solution is divide the pulses etc. & have a lower res for the shift. The chances are the position of the transfer i.e. RAT or other probably does not need to be precise, if so the addition of 5 sensors to detect the leading edge is probably the easy way.
Again it's a clear fact that lack of information makes these posts into epic conversations.
He did somewhat provide that in the first post. His encoder resets every 500mm and increments a unit of count called a tact. Each array position would represent a tact. His diverter position is 100 tacts away (5000mm), so it's not unfathomable to just use a tact as the shift event. It would be very granular in resolution, and that's the answer we need. What precision is needed.
 
Again it's a clear fact that lack of information makes these posts into epic conversations.
Nah, it's just any one that I sink my teeth into :rolleyes: ?:ROFLMAO:.

My TIA Portal example divided the encoder pulses by looking at the rising edge of bit 2 (NO_contact(encoder_count.%X2; bit value of 4, times two for up and down => divide by 8).

I am pretty sure OP's S7-1500 ignores integer rollover, so assuming that the scan cycles never miss any increment encoder count (after any dividing), i.e. if the boards move slowly "enough" (whatever that means), @Peter Nachtwey's original idea could be adapted to work if each station had its own FIFO queue of boards head for that station and did an equals comparison (not greater than, which is what was suggested in the original post). But again, that would require that the PLC scan cycle catches every divided encoder count.

IIRC Logix 5000 throws a minor fault on overflow, but does not halt the PLC CPU; Logix 500 (e.g. MicroLogix) throws a minor fault on overflow, which minor fault, if not explicitly cleared, is promoted to a major fault at the end of the scan cycle, which in turn halts the PLC.
 
He did somewhat provide that in the first post. His encoder resets ever 500mm and increments a unit of count called a tact. Each array position would represent a tact. His diverter position is 100 tacts away (5000mm), so it's not unfathomable to just use a tact as the shift event.
The first post said a tact was 500mm, but it also implied a tact was 100mm. That discrepancy was resolved in post #6, with 500mm being the right number. In the end the problem was that a 500mm tact is too coarse.

Many ways to skin this cat, but the first issue it to select a tact size that if fine enough to model the system.

The FIFO shift register, modeling parts moving past fixed stations, example I posted is one example (8mm ≡ 1tact); I think this is as simple as it gets for coding; speed could be an issue if the shift register is too big (tact is too small), but I am pretty sure that OP's system would not have an issue here.

An alternative shift register approach, as suggested by @Peter Nachtwey earlier, would model the stations moving past fixed part positions, and could be made relatively simple by encapsulating the calculation, of array index at an offset from the moving index of the grading station, into a user-defined function block. This approach would be the choice if the array were too large to be shifted in a single scan cycle.

@Peter Nachtwey's Post #14 approach is another, if corrected per the caveats of my previous post. But then there would need to be code to manage five different ejection station trigger FIFOs (since more than one board at a time can be in the system and destined for any single ejection station), so the overall complexity goes up even if the comparison is simple.

Ultimately the data schema chosen to model, and the size of the problem, the process will determine the best approach.

P.S. is tact* a normal English or technical word for this? I have never heard it used this way. Perhaps it is a translation of the word takt from slovenian to tact in english: The Google translates tact in english to taktnost in Slovenian; however it translates takt in Slovenian to either tact* or beat i.e. rhythm in English.

* a keen sense of what to do or say in order to maintain good relations with others or avoid offense
 
I certainly don't see why the OP is restting the count at 500 with a 32 bit count it would be 2,147,483,647, But I do agree with resetting it, this becomes cleaner however, I would think the size of the largest board would be well within that figure even using the raw data without scaling it.
It's all down to what needs to be achieved & selecting the correct components to acheive it.
I did a complete re-write of a strapping machine that originally required an operator to asses the size of the pallet, move the pallet into position & strap it.
However, there were many strap patterns 21 in all, so there were something like small single, standard single, double standard, with or without bottom runners & a few more. The pattern of strapping could also depend on customer & types of pallet, there was 3 swords for strapping to allow for small or large pallets.
It also could rotate to strap both ways & feed strap without the swords (guides to feed strap between top & bottom runners if there were no bottom runners.).
The idea was to automatically determine the size (length), if it had bottom runners & so on.
This was done by fitting PE's to detect length, PE's to detect if it had bottom runners, & toothed wheels with sensors to determine size/position etc.
It became more complex as these pallets were wooden & not exactly the same size, so through beam sensors were also fitted at the sides of the swords to determine if the path was clear. if not it would move back/forward by a given length upto 3 times to see if it could find the gaps or fault out if not.
The operation was when a pallet arrived at the infeed it was measured, checked for if it had bottom runners, this determined the strap pattern, this was shifted into the shift register & moved on, the queue was not large but the infeed sections could take upto 4 standard pallets, when the strapper was free, the pallet was moved in, the size in the array would then be used to determine the strap pattern, for example a very small pallet needed one strap rotated then another strap. if it was a standard sized pallet then two straps (used any two of the three swords or guides depending on actual size), rotate & do the same.
If a longer pallet then could be upto 4 straps but no rotation. From the above you can see there is a lot of data per pallet being moved down the line, again this would have been very difficult without the addition of extra sensors, so I urge the OP to think about that. I might make his life easier.
 

Similar Topics

We have some Z-312J board PLCs, there is a project to integrate Cobots, and the PLC program needs to be modified, How can we get the software for...
0
Replies
101
Views
This is WinCC V17, no I don't know if it is "flexible" "comfort" "professional" "Advanced" or any other snappy marketting word. Attached is a...
10
Replies
299
Views
I have a Siemens s1214. I made the mistake of hot swapping an RS485 board, one mounted at the front. At first the plc would flash lights randomly...
0
Replies
135
Views
There is a pad batch machine and 10 Lenze 9300 servo inverters are used. One of them is the master and they communicate via CN-bus. Additionally...
3
Replies
322
Views
Hi folks, Working on a Power Flex 755 drive that uses a 20-750-UFB-1 Universal Feedback Board to read an analog sin/cos encoder. Experiencing...
0
Replies
437
Views
Top