Справочник Пользователя для Mitsubishi Electronics MELSEC -Q/L

Скачать
Страница из 1086
6  BASIC INSTRUCTIONS
6.8  Other Convenient Instructions
347
6
Pulse density measurement
SPD
*1 Local devices and the file registers set for individual programs cannot be used.
Processing details
 • The number of turning OFF
ON input of the device specified by (S) is counted for just the amount of time specified by n, 
and the count results are stored in the device specified by (D).
 • When measurement directed by the SPD instruction has been completed, measurement is done again from 0. Turn OFF 
the execution command to stop the measurement directed by the SPD instruction.
 • With the SPD instruction, the argument device data is 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 STOP
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 the CPU module is 1ms.
 • The instruction is not processed when n = 0.
 • 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.
 • While the measurement is in execution (while the command input is ON) by the SPD instruction, the setting 
value cannot be changed. Turn OFF the command input before changing the setting value.
(S):   Pulse input (bits)
n:  
Measurement time (unit: ms) (BIN 16 bits)
(D):   Head number of the devices where the measurement result will be stored (BIN 16 bits)
Setting 
data
Internal device
R, ZR
J\
U\G
Zn
Constant
K, H
Others
Bit
Word
Bit
Word
(S)
 (Only X)
n
(D)
Basic
Redundant
Process
High
performance
Universal
LCPU
Command
SPD
n
S
D
SPD
ON
OFF
OFF
Ex
ecution command
Start of measurement
n [ms]
n [ms]
M
easurement result is stored at (D)
ON
S
M
easurement result is stored at (D)