I have done this on a travelling cut off saw, the pipe was continuously extruded while the cut off saw was at it's start position, when the length was reached the cut was initiated (start cut & travel at same speed as extruded pipe) and at the same time the counter was reset to start measuring the next length.
This seems almost the same as your application, so I think all you need once you have the counter programmed is to compare the set point with the counter, start the cut, reset the counter, the only caveats are you may need to add a little offset depending on the scan time of the PLC (only required if the speed of the extrusion is very high.
The one I did in the early 90's was actually a giant diamond encrusted circular saw, there was a calculation that took the size, shape, wall thickness of the extruded metal pipe (square/round) & calculated the cut rate based on the number of teeth etc. to get the most out of the life of the blade.
So....
Scale the high speed counter into mm for example if it was 100 pulses per mm divide the high speed counter by 100 & store this in a register (assuming +- 1mm tolerance).
Compare this register with the HMI Set point with a greater than or equal >= (do not use just an equals as if the count was greater by 1mm then it would not start the cycle this could happen if the scan time of the PLC was greater than the time it took the encoder to count the raw equivelent of 100 (1mm)). Some will say use interrupts but it could just happen, in the very unlikely scenario it would mean the extrusion would be 1mm longer or what ever the setting is, start the cut sequence & reset the high speed counter so that as the cutter travels with the extrusion it starts to count the next length.
This seems almost the same as your application, so I think all you need once you have the counter programmed is to compare the set point with the counter, start the cut, reset the counter, the only caveats are you may need to add a little offset depending on the scan time of the PLC (only required if the speed of the extrusion is very high.
The one I did in the early 90's was actually a giant diamond encrusted circular saw, there was a calculation that took the size, shape, wall thickness of the extruded metal pipe (square/round) & calculated the cut rate based on the number of teeth etc. to get the most out of the life of the blade.
So....
Scale the high speed counter into mm for example if it was 100 pulses per mm divide the high speed counter by 100 & store this in a register (assuming +- 1mm tolerance).
Compare this register with the HMI Set point with a greater than or equal >= (do not use just an equals as if the count was greater by 1mm then it would not start the cycle this could happen if the scan time of the PLC was greater than the time it took the encoder to count the raw equivelent of 100 (1mm)). Some will say use interrupts but it could just happen, in the very unlikely scenario it would mean the extrusion would be 1mm longer or what ever the setting is, start the cut sequence & reset the high speed counter so that as the cutter travels with the extrusion it starts to count the next length.