Channel Feature: Counter

I am utilizing the counter feature in channel 0 with a photoelectric diffuse-reflective sensor. The goal is to count products that pass by on a conveyor belt. I am having a problem with certain products because of the shape, it is counted more than once.

Is there a way for the count to only iterate if the sensor beam is broken for more than x amount of time? It currently seems like the count is iterated anytime the beam is broken.

Thank you in advance!

Hi Paul. Welcome to the forums!

I can think of two options depending on the speed of the objects on the conveyor.

  1. Hardware. You could get an external ‘timer’ module. One that the beam plugs into and only outputs a pulse if the beam is broken for the amount of time you adjust the timer module. I have seen these around, they should be pretty easy to buy and affordable. This would very fast and require some initial setting up. They usually have a trim pot for a small blade screwdriver, or a small adjust able knob.
  2. Software. Depending on the speed again you could setup a software timer. If the objects go past pretty quick then something like Python in the shell of the groov Device would be pretty straight forward I would think. If the objects on the conveyor go past at 1 second or longer then even Node-RED would be up for the task.

Thank you for the response Beno!

We are planning to also control the speed of the belt so it sounds like software would be the way to go thank you!

Node-RED would probably be the rout we would go because it should be 1 second or longer. What would you recommend the approach should be when coding it? I am currently utilizing logic to read, reset and stop the count if we start/pause/end a job, so I do know a little bit on how to utilize this feature.

I just assumed you are using a RIO but want to be sure.
If RIO, is it stand alone? No other modules?
Also is there PAC Control in the mix? If so, that would be better than Node-RED perhaps.

Yes I am using a RIO mini. Currently it is stand alone. In the future we will be using modbus tcp to control belt speed with our current equipment.