Mitsubishi Electric FX3G SERIES Programming Manual page 822

Programmable controllers
Hide thumbs Also See for FX3G SERIES:
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
3)
Signal delay time measurement
The delay time from the rising edge of the input signal from X000 to the rising edge of the input signal from X001
is measured.
Step
0
M8075
Pulse width
/Pulse period
measurement
setting flag
X001 Rising edge interrupt
interrupt
M8000
pointer
I101
RUN
monitor
When either one between the ring counter value at the rising edge of the input signal from X000 and
the ring counter value at the rising edge of the input signal from X001 is located ranging from
H80000000 to HFFFFFFFF, the following process is executed, and the value "Ring counter value
at the rising edge of the input signal from X001 - Ring counter value at the rising edge of the input
signal from X000" is stored in D9 and D8*
FNC 230
X000 Rising edge ring counter value:
X001 Rising edge ring counter value:
FNC 226
X000 Rising edge ring counter value:
X001 Rising edge ring counter value:
M8000
820
X000
X001
This duration is measured.
FNC 04
EI
M8076
M8077
FNC 06
FEND
FNC 12
D8074
D0
DMOV
FNC 12
D8080
D2
DMOV
FNC 21
D2
D0
DSUB
D0
K0
LDD>=
H0 to H7FFFFFFF
H80000000 to HFFFFFFFF
D0
K0
LDD<
H80000000 to HFFFFFFFF
H0 to H7FFFFFFF
FNC 23
D8
K60
DDIV
User program
FNC 03
IRET
END
36 Interrupt Function and Pulse Catch Function
36.8 Pulse width/Pulse period measurement function [M8075 to M8079, D8074 to D8097]
Interrupts are enabled after the EI (FNC 04) instruction.
The main program is described.
X000 is used for the pulse width/pulse period
measurement function.
X001 is used for the pulse width/pulse period
measurement function.
The interrupt routine is executed at the rising edge of
the input signal from X001.
The ring counter value at the rising edge of the input
signal from X000 stored in D8074 and D8075 is
transferred to D1 and D0.
The ring counter value at the rising edge of the input
signal from X001 stored in D8080 and D8081 is
transferred to D3 and D2.
The value "Ring counter value at the rising edge of
the input signal from X001 - Ring counter value at the
D8
rising edge of the input signal from X000" is stored in
D9 and D8.
1
.
FNC 234
D2
K0
ANDD<
FNC 238
D2
K0
ANDD>=
The obtained value is converted into a value in units
D10
of 10 μs.
Interrupt return
ON
OFF
ON
OFF
FNC 21
H7FFFFFFF
D0
DSUB
FNC 21
D2
H80000000
DSUB
FNC 20
D4
D6
D8
DADD
FNC 24
D8
DINC
FNC 21
HFFFFFFFF
D0
DSUB
FNC 20
D2
D4
D8
DADD
FNC 24
D8
DINC
D4
D6
D4

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents