High-speed counter (HSC) of Mitsubishi FX series PLC

1. High speed counter


The 21-point high-speed counters C235 to C255 share the eight high-speed counter input terminals X0 to X7 of the PLC, and one input terminal can only be used for one high-speed counter at the same time. These 21 counters are all 32-bit up/down counters (see Table 3–7). Different types of high-speed counters can be used simultaneously, but their high-speed counter inputs cannot conflict.

The operation of the high-speed counter is based on the interrupt, which means that the triggering of the event is independent of the scan time. When counting external high-speed pulses, the coil of the high-speed counter in the ladder diagram should always be energized to indicate that the input point associated with it has been used, and the processing of other high-speed counters cannot conflict with it. The coil of the high-speed counter can be driven by the normally open contact of the M8000, which is always ON at runtime.


When X14 is ON, the high-speed counter C235 is selected. The counting input of C235 is X0, but it does not appear in the program. The counting signal is not provided by X14.

\
The component number of the input terminal corresponding to the high-speed counter, U and D in the table are the addition and subtraction count inputs respectively, A and B are the A and B phase inputs respectively, R is the reset input, and S is the set input.


2. One-phase high-speed counter


C235~C240 are high-speed counters with no start/reset input for one phase, C24l~C245 are high-speed counters with one phase start/reset terminal, M8235~M8245 can be used to set the counting direction of C235~C2415, and when M is ON, it is countdown. When it is OFF, it is counted up. C235~C240 can only be reset by RST instruction.


C244 in Fig. 1 is a high-speed counter of the 1-phase start/reset end. As can be seen from Table 1, Xl and X6 are the reset input and the start input respectively, and their reset and start are independent of the scanning mode, and their functions are immediate. And direct. If X12 is ON, once X6 turns ON, counting starts immediately and the count input is X0. X6 turns OFF and stops counting immediately. The set value of C244 is specified by D0 and D1. In addition to using Xl for immediate reset, it can also be reset with a reset command in the ladder diagram.


3. Two-phase bidirectional counter


The two-phase bidirectional counter (C246~C250) has an up-counting input terminal and a down-counting input terminal. For example, the C246 up and down counting input terminals are X0 and Xl respectively, and when the counter coil is energized, on the rising edge of X0, The current value of the counter is incremented by 1. On the rising edge of X1, the current value of the counter is decremented by 1. Some counters also have reset and start inputs.


4. A-B phase type double counting input high speed counter


C25l~C255 are A-B phase type double counting input high-speed counters. They have two counting inputs, and some counters also have reset and start inputs.


When X12 in FIG. 2 is ON, C25l counts the operation of the A-phase signal input by X0 and the B-phase signal of X1 input by interruption. When X11 is ON, C251 is reset. When the count value is greater than or equal to the set value, the coil of Y2 is energized. If the count value is less than the set value, the coil of Y2 is de-energized.


The A/B phase inputs not only provide counting signals, but also provide the direction of counting based on their relative phase relationships. The A/B phase type encoder mounted on the rotary shaft automatically counts up when the machine is rotating forward, and automatically counts down when it is reversed. When the A phase input is ON, if the B phase input changes from OFF to ON, it is counted up (see Figure 2b); when phase A is ON, if B phase turns from ON to OFF, it counts down (see Figure 2c). The M8251 can monitor the C251's up/down count status. When the count is increased, M8251 is OFF, and when the count is down, M8251 is ON.

5. High speed counter counting speed


General counting frequency: single phase and bidirectional counters up to l0kHz, A/B phase counters up to 5kHz.


The highest total count frequency: 60 kHz for FXlS and FXlN, 20kHZ for FX2N and FX2NC, and the frequency of the A/B phase counter should be doubled when calculating the total count frequency. X0 and X1 of FX2N and FX2NC have special hardware for single-phase or two-phase counting (C235, C236 or C246) up to 60 kHz, and C25l two-phase counting up to 30 kHz.


The application instruction SPD (speed detection, FUC56) has the characteristics of high-speed counter and input interrupt. X0~X5 may be used by SPD instruction. The input point used by SPD instruction cannot conflict with the input point of high-speed counter and interrupt. When calculating the total count frequency of the high-speed counter, the SPD instruction should be considered as a 1-phase high-speed counter.

Top