6 - 127 6 - 127
MELSEC-Q/QnA
6 BASIC INSTRUCTIONS
POINTS
(1) The SPD instruction registers the data from the argument device in the CPU module work
area, and the actual count operation is conducted during a system interrupt.
(The device data registered to the work area of the CPU module are cleared when the
command input is turned OFF or when the CPU module is STOPped and then RUN.)
Therefore, to count the pulses, it is necessary to provide their ON and OFF time as long as
the interrupt time of the CPU module or longer.
The interrupt time of individual CPU module is shown below:
CPU module Type Name Interrupt Time
High Performance model QCPU, Process CPU 1ms
QnACPU 5ms
(2) • When QCPU is used:
The instruction is not processed when n=0.
• When QnACPU is used:
The instruction is not processed when n=0 or when n is not a multiple of 5.
(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.
[Operation Errors]
(1) There are no operation errors associated with the SPD instruction.
[Program Example]
(1) The following program measures the pulses input to X0 for a period of 500 ms when X10 goes
ON, and stores the result at D0.
[Ladder Mode] [List Mode]
Steps
Instruction
Device
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com