Download here, an example of a PLC program and HMI project for part length control with tolerance.
An ACE 1430 and a 7″ HMI with incremental encoder (C1, C2 inputs) are used.
The entry of the part and its final positioning is detected by sensors (Inputs C3, C4).
An output is used in case of out of tolerance parts.
The history of the parts inspected is stored on page 2 of the HMI: