Automated dimensional measurement of parts, logs, posts, pipes, or other objects traveling on a conveyor belt is a common requirement in manufacturing, lumber processing, and quality control operations. Measuring both the length and diameter of a cylindrical or elongated object as it moves through a production line — without stopping the conveyor or physically contacting the part — can be accomplished with a combination of infrared photoelectric sensors and an ultrasonic sensor, interfaced with a PLC programmed to perform the dimensional calculations.

The Application

Consider a production line where wooden posts, steel bars, PVC pipes, or similar elongated objects travel along a conveyor belt toward a sorting or packaging station. The control system needs to know both the length and the diameter (or cross-sectional height) of each piece to route it to the correct destination, reject out-of-specification parts, or accurately log production data.

Manual measurement is labor-intensive, introduces human error, and cannot keep pace with typical conveyor speeds. A properly configured sensor system performs these measurements automatically, in real time, as each object passes through the sensing zone.

Sensor Selection

Laser micrometer sensor pair precisely measuring diameter of cylindrical rod on conveyor

Photoelectric Sensors for Length Measurement

A set of through-beam infrared photoelectric sensors is positioned so the infrared beam crosses the conveyor at right angles to the direction of travel. As an object travels along the conveyor, its leading edge breaks the beam, and its trailing edge clears it. The photoelectric sensor output is connected to the PLC, which records the exact time at which the beam is broken and the time at which it is restored.

Using the conveyor belt speed — which is either a known constant or measured with an encoder — the PLC calculates the length of the object:

Length = Conveyor Speed x Beam Blocked Duration

This calculation requires that the conveyor speed be accurately known. For variable-speed conveyors or applications requiring high precision, a tachometer or rotary encoder on the conveyor drive provides the speed data directly to the PLC for use in the calculation.

Ultrasonic Sensor for Diameter Measurement

An ultrasonic sensor is mounted above the conveyor, facing downward toward the belt surface, positioned in the same cross-sectional plane as the photoelectric sensor pair. Before any object is present, the ultrasonic sensor measures the distance to the bare conveyor belt surface. This establishes the reference distance for the calculation.

When an object passes beneath the sensor, the ultrasonic beam reflects off the top surface of the object, returning a shorter distance reading. The PLC calculates the object's height (diameter) as:

Object Height = Reference Distance - Current Distance Reading

For cylindrical objects where height equals diameter, this provides the full dimensional measurement needed for sorting or quality decisions.

System Integration and PLC Programming

The photoelectric sensor and ultrasonic sensor are connected to separate inputs on the PLC. The photoelectric sensor provides a discrete (on/off) digital input that indicates when an object is present in the measurement zone. The ultrasonic sensor provides a continuous analog input that represents the distance from the sensor face to the nearest surface below it.

The PLC program uses the photoelectric sensor input for two purposes:

  1. Triggering the length calculation — the timer or encoder-based measurement begins when the beam is broken and stops when the beam is restored
  2. Gating the ultrasonic measurement — the PLC reads and processes the ultrasonic analog input only while the photoelectric sensor confirms an object is present, avoiding spurious readings when the belt is empty

Timing and Throughput

The response time of both sensors must be adequate for the conveyor speed. At higher conveyor speeds, objects pass through the sensing zone more quickly, requiring sensors with faster response times to capture accurate edge transitions. Consult the sensor specifications to confirm that the switching frequency and response time are appropriate for the maximum conveyor speed in the application.

Accuracy Considerations

Photoelectric Sensor Beam Characteristics

The accuracy of length measurement depends in part on the beam diameter of the photoelectric sensor. A narrow, well-focused beam provides sharper edge detection than a wide-angle diffuse beam. Through-beam sensors with focused optics are preferred for length measurement applications requiring high precision.

Ultrasonic Sensor Beam Angle

Ultrasonic sensors emit sound in a cone rather than a tight beam. The width of this cone — the beam angle — affects how the sensor responds to objects with irregular surfaces or to objects narrower than the beam cone's footprint. For uniform cylindrical objects, this is rarely an issue. For objects with very small diameters or highly irregular surfaces, a sensor with a narrow beam angle provides better accuracy. Review the sensor's beam angle specification relative to the smallest object dimension to be measured.

Conveyor Belt Flatness and Vibration

Variations in the conveyor belt surface height — due to belt splice bumps, worn idler rollers, or belt sag — will register as small changes in the reference distance and can affect diameter measurement accuracy. Establish the reference measurement with the conveyor running (not stationary) to capture the average belt surface height under normal running conditions. Regularly verify the reference calibration and recalibrate after major conveyor maintenance.

PLC Programming Requirements

The length and diameter calculations must be implemented in the PLC program by personnel who are familiar with the PLC's analog input scaling, timer functions, and mathematical instruction blocks. The calculation logic itself is not complex, but the implementation requires accurate scaling of the ultrasonic analog input into engineering units (millimeters or inches), proper timer configuration, and clear output formatting for display or data logging. If PLC programming expertise is not available in-house, work with a qualified integrator to develop and commission the measurement application.

Practical Applications

This sensor combination is used across a wide range of industries:

Lumber and timber processing — measuring log and lumber dimensions for grading, sorting, and yield optimization

Steel and metals — measuring bar stock, tube, and structural shapes for compliance with dimensional specifications

Plastics extrusion — monitoring the cross-section of extruded profiles to detect drift from the target dimension and trigger die adjustment

Concrete products — measuring precast elements for dimensional conformance before delivery

Agricultural products — sorting produce by size for grading and packaging applications

Benefits of Non-Contact Dimensional Measurement

The primary benefits of this sensor-based approach over contact or manual measurement methods are:

  • Speed — measurements are made at conveyor speed, with no need to stop or slow the line
  • Consistency — every piece is measured with the same accuracy, eliminating the variability of manual measurement
  • No product contact — sensors do not touch the object, avoiding surface damage and eliminating mechanical wear on the measurement system
  • Data integration — dimensional data is available in the PLC for immediate use in sorting decisions, quality logging, or process control
  • Scalability — multiple measurement zones can be added to a single PLC to capture additional dimensional data at different points in the process

With proper sensor selection, careful installation, and well-implemented PLC logic, an automated dimensional measurement system delivers reliable, repeatable results that manual methods simply cannot match.