Software code for detecting gaps in pallets


Thread Starter


I am looking for some code that can help me to stop a pallet at predetermined (using timers!!)positions on a pallet conveyor. The positions are determined by how many gaps there are between the blocks on the bottom of the pallet, either two or three gaps per pallet. I also need to signal that if say the gap number is one then after tasking this allows the pallet to run out.
HI Graham...

Do yourself a favor and forget about the idea of using timers to control pallet location? We have several pallet motion systems and pallets are
always getting hung up all over the place. If the motion was controlled by timers it would be a disaster. We use separate emitter and receiver
photocell units mounted on a 45 degree angle looking across the pallet conveyor. This allows us to "see" the incoming edge of the pallet. Works

Best Regards... Rick Kelly

Chief Technician N/C
Cheese Operations
Kraft Canada Inc.
Ingleside, Ont.

V (613) 537-8069
F (613) 537-8044
[email protected]

Tech Support:

"How much free space do you have on your hard drive?"


"Well, I thought I could use more so I went on the Internet, and downloaded ten hours of free space. Is that enough?"

Michael Griffin

If I understand your explanation correctly, you are trying to stop pallets at particular points by timing the travel of individual pallets on an indexing conveyor. I have had a fair bit of experience with Bosch
conveyors and pallets, and I would not recommend doing it this way. You will not get consistent behaviour from the pallets, especially after the track inserts or the bottoms of the pallets start to wear after a few years.

If the objective is to stop a pallet at a particular point, then with a conventional continuously running conveyor, use a pallet stop. With an indexing conveyor, use a sensor. An indexing conveyor will not usually give you a stopping location (even with a sensor) accurate enough for a pick & place to work with, but it would be OK for an operator.

Michael Griffin
London, Ont. Canada


In my experience, it is far better in the long run to re-configure your sensor to see the whole pallet. Whether this can be done by increasing the sensitiviy so that you see the underside of the top of the pallet, or, if looking from the side, simply raising the sensor up, or lowering it and looking up at a 45 deg angle depends on the situation.

If you are completely unable to do this then:

Use a counter to count the blocks. Have the counter's done bit signify the end of the pallet, which would then reset the counter upon the sensor going off. Use the accumulated value of the counter in a compare instruction to start the timer that stops the pallet. ie:

-| sensor |-----------(Counter 1) PRE 3

|Counter 1 done|---| / sensor 1|------(reset counter 1)--

-|counter 1 = 2|---------(timer 1) .25 sec

|Timer 1 done|-----------(stop conveyor)--

or something similar. The problem is that there is a greater potential for error this way than if you just have the sensor on for the entire length of the pallet. This is caused by missing, deformed, discolored, etc. blocks that could foul the count value. By re-aiming the sensor you could use:

-|sensor |-----------------(timer 1) 1.5 sec

|timer 1 done|-------------(stop cnoveyor)----


--Joe Jansen