Mitsubishi Electric MELSEC-L02SCPU User Manual page 254

Cpu module, built-in i/o function
Table of Contents

Advertisement

(7) Frequency measurement instructions: ICFCNT1, ICFCNT2
ICFCNT1
ICFCNT2
Internal device
Setting data
Bit
D
(a) Setting data
Setting data
Start number of the device where a measured
D
frequency value is stored
(b) Function
This instruction measures frequencies according to the value set to "Frequency Measurement Unit Time
Setting". When ICFCNT1 is executed, a measured value is stored into
starts at rising of the ICFCNT1 execution command and ends at falling.
The number of steps is basically two.
(c) Error
In the following cases, an operation error occurs. Error flag (SM0) turns on and an error code is stored into
SD0.
• The device specified in
• Other than "Frequency Measurement Mode" is selected for "Operation Mode Setting" of the specified
channel.
• High-speed counter function of the specified channel is not enabled.
(d) Program example
Frequencies are measured at CH1 while M0 is on.
252
Command
Command
R, ZR
Word
Bit
Word
Setting item
is exceeding its range.
D
J\
U\G
Bit
Word
Setting range
Within the range of a specified
device
ICFCNT1
D
ICFCNT2
D
Constant
Z
K, H
Data type
Device name
and
+1. Frequency measurement
D
D
(Error code: 4101)
(Error code: 4116)
(Error code: 4116)
Others
$

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents