2005-07-08
http://www.delta.c om.tw/indus trialautomation /
DVP Peripheral Series
Frequency Measurement Card
Instruction Sheet
1 WARNING
This frequency measurement card is a specific function card for DVP-EH PLC, please use this card with
DVP-EH MPU.
Frequency measurement card is an OPEN TYPE without any mechnical shield. When installing this card,
user is supposed to power off the MPU and take precaution against static (anti-static glove) to prevent the
surface parts of the card from being damaged.
Do NOT connect the AC power line to any of the input/output terminals, or it will damage the PLC. Make sure
all the wiring is correct before power on.
To enhance the anti-interference performance of product, please make sure terminal FG is properly
grounded.
Frequency measurement card is only workable for the DVP-EH with the version greater than 1.1.
2 INTRODUCTION
Thank you for choosing Delta DVP series product. The frequency measurement card (DVP-F2FR) is the
function card with 2 external inputs that accept digital signals. By using FROM-TO instruction, PLC can
read/write the data or parameter in the frequency measurement card.
There are 255 built-in CRs (Control Register) in DVP-F2FR with 16 bits for each register. DVP-EH MPU can
control the function of DVP-F2FR by programming the CRs.
Nameplate Explanation:
Mode Number
Serial Number & Barcode
Version
Model:
DVP-F2FR
DVPF2FR0T5280001
VX.XX
Serial Number Explanation:
Production number
Production week
Production year 2005
Production factory (Taoyuan plant)
Version type
Production model
Product Outline:
Vertical view
Screw hole
Terminal
Dismounting Holder
(for dismount ing from PLC)
RUN/STOP indicator
Power indicator
Terminal
3 SPECIFICATION
3.1 Basic Specification:
Terminals [A+] & [A-], [B+] & [B-]: DC22~30V, 8~12mA.
1
t
2
t
3
t
o
C~55oC (Temperature), 50~95% (Humidity), Pollution degree: 2
t
1
t
2
3
SINK or SOURCE
t1: rising/falling time ≦0.8us
t2: ON/OFF pulse bandwidth ≧2.5us
t3: phase difference of A, B phase ≧1us
Input Signal
Storage and
Environment
Electric Level
t
Pulse Type
Storage -25oC~70oC (Temperature), 5~95% (Humidity)
Operation Operation: 0
5011637600-FME0
MADE IN XXXXXX
F0
F1
3.2 Operation mode:
There are 3 types of operation mode for the frequency measurement card. User can decide the operation mode by
setting CR1. Detail information as follows:
Mode 1: Pulse Interval Length Measurement (CR1=K1)
Measurement method of pulse interval:
Interval of rising-edge
Interval of falling-edge
Inputs of pulse interval measurement: F0, F1.
Time unit of pulse interval measurement: 50ns, 100ns.
Interrupt function: I180 will be executed after frequency measurement card detects rising edge or falling
edge in F0 and F1. And bit 0 of CR9 will inform interrupt trigger by F0 while bit1 of CR9 by F1. For more
information, please see section 6.1.
Input frequency range: 1Hz~1kHz.
Accuracy: ±0.01% (max.)
Mode 2: High-speed Counter (CR1=K2)
There are 3 types for mode 2 the high-speed counter. The maximum input frequency of Pulse/Direction can be
up to 200kHz. Explanation as follows:
Pulse/Direction: F0 is pulse input point. F1 is the signal to control the count-up or count-down. Counting
method is shown as diagram as follow:
F0
F1
Count up
Count value
Count down
A/B-phase two times frequency: F0 is the input pulse of A phase and F1 is the input pulse of B phase.
Counting method is shown as follow:
F0
F1
Count up
Count value
Value
F1
(B phase)
A/B-phase four times frequency: F0 is the input pulse of A phase and F1 is the input pulse of B phase.
Counting method is shown as follow:
High Count-down Count-up
Low Count-up Count-down
Rising-edge Falling-edge
F0
F1
Count up
Count value
Count down
F0 (A phase)
Count down
F0 F1 Value
Rising-edge Falling-edge
High Count-down Count-up High Count-up Count-downF1
Low Count-up Count-down
Value
Rising-edge Falling-edge
F0
Low Count-down Count-up
Mode 3: Pulse Number Capture (CR1=K3)
Input point: F0 is pulse input point. F1 is the signal to capture pulse number.
Following diagram show the count method of pulse number:
F0
F1
Pulse Captu red Period
The calculation of the pulse numbers for F0 is based on the interval between two rising edge or falling
edge of F1.
Interrupt function: when PLC set M1019 (flag of operation mode setting for frequency measurement card)
and D1034 (flag of operation mode setting for frequency measurement card) to set up operation mode,
I180 will be triggered based on the rising-edge or falling-edge of F1. If PLC has I180, it will execute I180.
Accuracy: ±1 pulse.
4 CONTROL REGISTER
DVP-EH MPU perform read/write operation to the CR via programming FROM-TO instruction.
CR will re
Control Register Explanation Table:
setting
Latched
Mode Function explanation
Frequency measurement card execution mode
°
°
1 F0 measure time unit
°
1 F1 measure time unit
°
2
°
3
°
1 F0 time-out setting (K0~K32767)
°
1 F1 time-out setting (K0~K32767)
K1 (mode 1) K2 (mode 2) K3 (mode 3)
Pulse interval
measurement
Frequency measurement card Run of Stop
K0 K1
Stop Run
Trigger by rising edge or falling edge
CR5 Low byte CR5 High byte
F0 F1
When F0 trigger I180, bit0 of CR9 will be ON.
When F1 trigger I180, bit1 of CR9 will be ON.
When PLC read CR10~CR11, bit0 of CR9 will be OFF.
When PLC read CR12~CR13, bit1 of CR9 will be OFF.
K0 K1 K2
Pulse/Direction
Indication flag of count up or count down
K0 K1
Count up Count down
Flag of start-up counting of high-speed counter
K0 K1
Stop counting Start counting
Pulse number non-accumulated Pulse number accumulated
When writing “1” into CR33, all the CR of frequency measurement
card will return to factory setting and modify former “1” as “0”.
Version explanation: high byte is the value in the left side of decimal
and low b
K0 K1
te is the value in the right side of decimal. e.g. H1000 is
High-speed counter
rising edge=0, falling-edge=1
Mode 1: interrupt trigger flag
High-speed counter mode
A/B phase two
times frequency
count
Method of pulse count
Return to factory setting
Pulse number
capture
50ns measure unit K1
100ns measure unit K2
High-speed counter value won’t
be cleared when frequency
measurement card stop
A/B four times
frequency count
CR NO.
HW LW
#0 R H2A0 ° System default, read only, number=H’2A0
#3 R/W* K0 ° 1,3 F0 record item (range 0~40)
#4 R/W* K0 ° 1,3 F1 record item (range 0~40)
#6 Reserved
#11 #10 R K0 ° 1 F0 pulse interval measurement
#13 #12 R K0 ° 1 F1 pulse interval measurement
#15 #14 R K0 ° 1 F0 value of frequency floating point
#17 #16 R K0 ° 1 F1 value of frequency floating point
#19 #18 R K0 ° 1 F0, F1 rising-edge or falling-edge, time difference
#21 #20 R/W K0 ° 2 High-speed counter value
#26 #25 R/W K0 ° 3 Number of captured pulse
#28 R/W K0
#29 R/W K0
Attribute
#1 R/W* K0
#2 R/W K0 ° 1,2,3
#5 R/W* K0 ° 1,3
#7 R/W* K2
#8 R/W* K2
#9 R K0 ° 1
#22 R/W* K0
#23 R K0 ° 2
#24 R/W K0 ° 2
#27 R/W* K0
#33 W* K0 °
#34 R K0 °
Factory
#30~#32 Reserved
CR NO.
HW LW
Attribute
Factory
setting
Latched
Mode Function explanation
V1.00 version.
#35~#49 Reserved
#50 R K51 ° 1,3 The index of F0 record value (record the number from CR51~130)
#51~#130 R K0 ° 1,3 F0 record value (each value occupy 2 group CR)
#131 R K132 ° 1,3 The index of F1 record value (record the number from CR132~211)
#132~#211 R K0
°
1,3 F1 record value (each value occupy 2 group CR)
#222~#255 Reserved
The usage of CR varies based on operation mode. Please follow the table above to read or write CR.
In column Attribute, ‘*” means writing is allowed when frequency measurement card is not working.
When the writing value is out of available range, the value of upper/lower bound shall prevail to write once the
value is out of upper/lower bound.
The CR28 and CR29 are the time-out setting for F0 and F1. When setting them to a non-zero value in mode 1,
it will monitor the signal input from F0 or F1 and start a time-out counting. If no signal detected in F0 and F1 with
the time-out counter reaching the setting, it will clear the CR10~CR11 or CR12~CR13 and inform the PLC by
I180 interrupt. Moreover, when CR28 and CR29 are set to zero, the time-out counter will not work anymore.
CR50~CR211 will record the value according to the operation mode. Explanation as follows:
Mode 1 Mode 2 Mode 3
CR51~CR130
CR132~CR211
The index number of each record is plus 2 for CR50 and CR131 after both registers record on next. Once the
index number reaches to the maximum, it will back to the 1
To record F0 pulse interval (CR10,
CR11)
To record F1 pulse interval (CR12,
CR13)
N/A N/A
N/A
st
index number.
To record F1 pulse interval
(CR25, CR26
It takes about 125us for instruction FROM/TO to read or write a CR of the frequency measurement card. One
more read/write item of CR, 30us more for register.
5 INSTRUCTION EXPLANATION
5.1 Instruction Explanation for Frequency Measurement Card
API
78 D
FROM
P
Read Special Module CR Data
Instruction
Explanation
API
79 D
: Number of special module (m1=0~7). Number of frequency measurement card, m1=200.
: Number of CR of special module that will be read.
: Location to save reading data.
: Data number of reading one time.
TO
P
Special Module CR Data Write In
Instruction
Explanation
: Number of special module (m1=0~7). Number of frequency measurement card, m1=200.
: Number of CR of special module that will be read.
: Location to save writing data.
: Data number of reading one time
5.2 Explanation of special D, M and Interrupt:
Device Explanation Range
D1034 Mode setting of frequency measurement card D1034 = K1~K3 (Mode 1~Mode 3)
M1019 Flag of mode setting
I180
Frequency measurement card trigger
interrupt
After PLC run at the first scan time, PLC will detect flag M1019 is ON or OFF. If M1019 is ON, PLC will modify
the frequency measurement card’s operation mode based on D1034 setting. Program example as follow is
operation mode 1:
M1002
MOV
K1 D1034
6 APPLICATION EXAMPLE
6.1 Pulse Interval Length Measurement
Following the program example of setting operation mode 1 (D1034, M1019) for frequency measurement card.
For F0 and F1, set the time unit of sampling rate is 100ns (D7, D8) and the sampling record number as 20 (D3,
D4). Moreover, I180 will be triggered when F0 or F1 detects a rising or falling edge. PLC can read CR9 via
instruction FROM to decide which channel to detect the signal.
EI
M1002
M1013
M1000
I 180
& D9 K1
& D9 K2
MOV K1
SET M1019
MOV
MOV
MOV
MOV
TO
FROM
FROM K200
FEND
FROM K200 K9 K11
DMOV
DMOV D12 D300
IRET
END
D1034
K20
D3
K20
D4
K2
D7
K2
D8
K3 D3 K6
K200
K50 D50
K200
K131 D131 K41
D10
D300
K41
D9
6.2 High-speed Counter
The setting for the following program example:
1. Operation mode: Mode 1.
2. Counting method: Pulse/Direction.
3. Set M0=ON to start counting.
M1002
M1013
M0
K2
MOV
SET M1019
MOV
TO
FROM K200
TO K24 K1 K1
END
D1034
K0 D22
K200
K20 D20 K3
K200
K1K22 D22
6.3 Pulse Number Capture
The following program example is Mode 3 for frequency measurement card. Whenever frequency
measurement card detects the rising-edge in F1, it will trigger the Interrupt I180 of PLC. When PLC execute
Interrupt I180, it will read the content of CR25, 26 of frequency measurement card via instruction FROM.
EI
K3
MOV
SET M1019
K20
MOV
K200
TO
FROM K200
FEND
K200
FROM
IRET
END
D1034
D4
K131
K25 D25
D4K4
D131
K1
K40
K2
I 180
M1002
M1013
M1000
6.4 Differential Input Interface (please refer to the following wiring method)
+24VDC
4.7K
Differential
output
Differential
output
470
470
NPN Tansistor
ON MMBT4401LT1G
+24VDC
NPN Transistor
ON MMBT4401LT1G
A+
A-
B+
B-
4.7K
4.7K
4.7K
F0
F1
Suggestion: if it is necessary to measure the input signal of frequency measurement card, please connect one
clip of the oscillograph probe to either terminal A- or B- and the other clip of the oscillograph probe to the
ground .
7 INSTALLATION AND MAINTENANCE
Wiring Method for Frequency Measurement Card
Open collector
output
Open collector
out pu t
+24VDC
+24VDC
Isolating cable
Isolating cable
A+
A-
B+
B-
4.7K
4.7K
F0
4.7K
F14.7K
There is a SDSP1 indication LED in the front end of the DVP-F2FR frequency measurement card. When power
on the PLC MPU, the LED will light up (green). If the LED doesn’t light up with power on, it means that there is
error with the card. Please power off the PLC and re-install the card again.
Before power on the system, please check A/B phase loop and make sure they connect to the input terminal
with correct electrical level.
SET M1019
PLC can use M1019 (flag of operation mode setting for frequency measurement card) and D1034 (flag of
operation mode setting for frequency measurement card) to set operation mode 1 (measurement of pulse
interval) and operation mode 2 (measurement of pulse number) to support Interrupt function I180.