ITI Technician Mechatronics (AITT Theory) study materials
ITI Technician Mechatronics (AITT Theory) study resources

Photoeye Counting Error on a Sorting Conveyor

ITI Technician Mechatronics (AITT Theory) · Put your knowledge to work in context.

All case studies

Photoeye Counting Error on a Sorting Conveyor

A sorting conveyor uses a 24 V DC diffuse photoelectric sensor to detect 80 mm tall cartons. The sensor has a PNP (sourcing) output and a response time of 1 ms. It is wired to input X4 of a PLC whose input card is marked 'sinking/source selectable' but is currently wired with the sensor output connected to X4 and the sensor 0 V to the card common; the card common is connected to +24 V. The conveyor runs at 1.2 m/s and cartons are spaced 300 mm apart. The PLC scan time is 12 ms, and the input filter is set to 10 ms. Operators report that roughly one carton in 40 is not counted, always when the line is running at full speed; at low speed the count is correct. The sensor LED flickers when a carton passes, and a voltmeter at X4 reads about 1.8 V when the carton is present and 0 V when clear. Replacing the sensor with an identical spare gives the same result.

1. Determine whether the sensor-to-PLC wiring is compatible and explain the 1.8 V reading.

Read the worked answer

A PNP sensor sources current from its output to the load, so it needs a sinking input that returns current to 0 V. Here the input card common is connected to +24 V, which configures the input as a sourcing type expecting an NPN sensor to pull the input down to 0 V. The PNP sensor cannot drive that input correctly. The 1.8 V at X4 is a floating or leakage voltage, not a valid logic high; it may sit near the input threshold and switch unpredictably with temperature, cable capacitance or sensor alignment. The correct fix is to change the card common to 0 V and select sinking input configuration, or use an NPN sensor or a suitable interface relay. After rewiring, verify that the input goes above the guaranteed ON voltage when a carton is present and below the guaranteed OFF voltage when clear.

2. Assess the timing: calculate the carton dwell in the sensor beam and compare it with the PLC filter and scan time. Is timing the likely cause?

Read the worked answer

Dwell time = carton height / conveyor speed = 0.080 m / 1.2 m/s = 0.0667 s, or 66.7 ms. Carton pitch time = 0.300 m / 1.2 m/s = 250 ms. The detection chain is sensor response 1 ms + input filter 10 ms + worst-case scan delay 12 ms, about 23 ms in total. That is well below the 66.7 ms dwell, so a correctly wired input should be seen for several scans. Timing alone does not explain one missed carton in 40. The marginal 1.8 V input is the stronger explanation, with contamination, misalignment or a background reflection as secondary possibilities. A 10 ms filter is appropriate for this speed; increasing it would reduce noise but also reduce the available detection window, so fix the wiring first.

3. Recommend changes and a verification test before the line is returned to full speed.

Read the worked answer

Correct the input common and configuration, then check the sensor output current against the input card rating. Align the sensor so the carton body gives a solid return, and check that the conveyor background does not produce a false ON. Keep the input filter at 10 ms unless tests show electrical noise. Verify with a PLC input trace or high-speed counter while running at 1.2 m/s: pass at least 100 cartons and confirm 100 counts. Measure the pulse width at X4 with an oscilloscope or PLC trace to confirm it is well above the scan and filter times. If counts are still missed after correct wiring, inspect cable routing and shielding, then test a different input channel. Record the wiring change and the verification count so the fix is traceable.