The FX5-2HC/ES supports differential line drivers (5 V) only.
The FX3U-2HC supports open collectors (24 V/12 V/5 V) and differential line drivers (5 V).
If you are using an open collector (24 V), consider replacing it with an FX5 CPU Module built-in high-speed counter or a high-speed pulse input/output Module.