3. Instruction Set
6. If any of the X0~7 is used in SPD instruction, its associated high-speed counters or external
interrupts cannot be used in this instruction or other instructions. The same input can only be
used once at a time.
7. For ES2/EX2 before V0.92: when X0, X2, X6 and X7 are used, they will be detected as 1-phase
input. When X1 is used, X0(A) and X1(B) will be applied together as AB-phase input.
8. For EC5/SS2/SA2/SX2/SE/ES2/EX2: V1.00 or later: when X0, X2, X4 and X6 are used, they will
be detected as 1-phase input. When X1, X3, x5, X7 are used, X0, X2, X4, X6 will be applied
together as AB-phase input.
9. This instruction is mainly used to obtain the value of rotation speed and the results in D are in
proportion to the rotation speed. Rotation speed N can be calculated by the following equation
N=
N: Rotation speed
n: The number of pulses produced per rotation
t: Detecting time specified by S
2
(ms)
Program Example:
1. When X7 = ON, D2 stores the high-speed pulses at X0 for 1,000ms and stops automatically.
The results are stored in D0, D1.
2. When the 1000ms of counting is completed, D2 will be reset. When X7 turns ON again, D2
starts counting again.
X7
X1
1,000
1,000ms 1,000ms
D2: Present value
Content in D2
Content in D4
D4: Remaining time (ms)
D0: Detected value