When the M0 is ON, HSC0 counts the rising edge of the OFF to ON of the input X0 port at
high speed.
When M1 rising edge comes, reset HSC0 high-speed counter and HSCD0 (double word).
When SM0 is on, HSC0 counts X0 port in single-phase incremental mode, the setting value
is K888888, and reads the high-speed counting value to D0 (double-word) in real time.
When D0 (double words) is less than D2 (double words), Y0 is ON, when D0 (double
words) is equal to or larger than D2 (double words) and less than D4 (double words), Y1 is
ON. when D0 (double words) is equal to or larger than D4 (double words), Y2 is ON.
When M1 rising edge is coming, reset HSC0 and HSCD0(double words).
As the high speed counter is double words counter, please use double words instruction
DLD < and DLD ≥.
Since the high-speed count value is 32-bit, the
instructions here are all 32-bit instructions.
Such as DMOV,DLD<, DLD≥