The maximum operating frequency of the counter in the PLC ladder program is limited by the scan period and is generally only a few tens of Hz. In industrial control, the PLC is sometimes required to have a fast counting function, and the counting pulse may come from a rotary encoder, a mechanical switch or an electronic switch. The high-speed counting module can count pulses of several tens of kHz or even hundreds of Hz. Most of them have one or several switching output points. When the current value of the counter is equal to or greater than the preset value, the switching output can be changed in time through the interrupt program. status. This process has nothing to do with the scanning process of the PLC, which ensures that the load is driven in time.
FX2N’s high-speed counter module FX2N–1HC has a high-speed counter that can be used for single-phase/dual-phase 50kHz high-speed counting. The external counter or through the PLC program can reset the counter or start the counting process. It can be connected to the encoder. . The single-phase 1 input and single-phase 2 input are less than 50 kHz, and the two-phase input can be set to 1 octave, 2 octave and 4 octave modes, and the counting frequencies are 50 kHz, 25 kHz and 12.5 kHz, respectively. The count value is a 32-bit signed binary number, or a binary 16-bit unsigned number (0 to 65 535). The counting method is automatic up/down counting (for 1 phase 2 input or 2 phase input) or optional up/down counting (for 1 phase 1 input). The hardware comparator can be used to implement the set value and the count value. When the output is consistent, the output can be output, or the software comparator can be used to achieve consistent output (maximum delay of 200 s). It has two NPN open collector outputs, rated at DC5 ~ 12V, 0.5A. The instantaneous value, comparison result and error status can be monitored, occupying 8 I/O points in the program.