You could program the PLC PWM to output a pulse with variable duty cycle and frequency between 50 Hz to 50KHz. The frequency is generated using 16-bit counter and hence at low frequency the resolution is well below 0.1Hz. What frequency range do you need to work with?
The PLC can measure the frequency or pulse width of the incoming pulses very accurately (down to 0.1 microsecond pulse width) and this can be compared with the frequency it is supposed to output and get the difference.
Hopefully this will meet your application objectives.