6-170
6.8 Other Convenient Instructions
6.8.7 Pulse density measurement
SPD
(2) When the measurement directed by the SPD instruction has been completed, the
measurement is executed again from 0.
Turn OFF the execution command to stop the measurement directed by the SPD instruction.
1. With the SPD instruction, the argument device data are registered in the work
area of the CPU module and counting operation is processed as a system
interrupt. (The device data registered in the work area is cleared by turning the
execution command OFF, or turning the STOP/RUN switch from STOP to
RUN.) For this reason, the pulses that can be counted must have longer ON
and OFF times than the interrupt interval of the CPU module. The interrupt
interval of each module is shown below.
2. When using the High Performance model QCPU
The instruction is not processed when n = 0.
3. The SPD instruction can be used as many as 6 times within all the programs
being executed. The seventh and the subsequent SPD instructions are not
processed.
O
p
erat
i
on
E
rror
In the following case, an operation error occurs, the error flag (SM0) is turned ON, and the
corresponding error code is stored to SD0.
• The device specified for
exceeds the corresponding device range. (For Universal
model QCPU only)
(Error code: 4101)
Program
E
xam
pl
e
In the following program, the pulses input to X0 are measured for a period of 500ms when X10
turns ON, and the result is stored to Var_D0.
[Structured ladder]
[ST]
IF X10 THEN
SPD(TRUE,X0,500,Var_D0);
END_IF;
CPU module model
Interrupt interval
High Performance model QCPU, Universal model QCPU
1ms
s
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......