Pulse Width/Pulse Period Measurement Function [M8075 To M8079, D8074 To D8097] - Mitsubishi Electric FX3G SERIES Programming Manual

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
36.8
Pulse width/Pulse period measurement function [M8075 to M8079, D8074
to D8097]
The pulse width/pulse period measurement function stores the values of 1/6 μs ring counters at the input signal rising
edge and falling edge to special data registers. This function also divides by "60" the difference in the counter value
(pulse width) between the rising edge and the falling edge or the difference in the counter value (pulse period)
between the previous rising edge and the current rising edge, and stores the obtained pulse width or pulse period in
units of 10 μs to special data registers.
The pulse width/pulse period measurement function becomes valid when a program is described using M8075 as a
contact. Specify the pulse width measurement flag in the subsequent OUT instruction, and set an input terminal to be
used.
When the pulse width/pulse period measurement function is valid, it always operates while the PLC mode is RUN.
Assignment of special auxiliary relays and special data registers
Pulse input
X000
X001
X003
X004
*1.
Cleared when the PLC mode switches from STOP to RUN.
The measurable pulse width is 10 μs minimum and 100 s maximum.
*2.
The measurable pulse period is 20 μs minimum.
1. Program example
1)
Pulse width measurement
The pulse width of the input signal from X000 is measured.
X000
This duration is measured.
Step
0
M8075
Pulse width/Pulse period
measurement
setting flag
interrupt
M8000
pointer
I000
RUN monitor
818
Pulse width/
Pulse period
Pulse period
measurement
measurement
*1
mode
flag
M8076
M8080
M8077
M8081
M8078
M8082
M8079
M8083
ON
OFF
FNC 04
EI
M8076
FNC 06
FEND
X000 Falling edge interrupt
FNC 12
D8078
DMOV
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]

Ring counter value
*1
for rising edge
[Unit: 1/6 μs]
D8075,D8074
D8081,D8080
D8087,D8086
D8093,D8092
Interrupts are enabled after EI (FNC 04)
instruction.
The main program is described.
X000 is used for the pulse width/pulse period
measurement function.
When the interrupt routine is executed at the
falling edge of the input signal from X000, the
D0
pulse width of input signal from X000 stored in
D8078 and D8079 is transferred to D1 and D0.
Interrupt return
Ring counter value
Pulse width
*1
for falling edge
/Pulse period
[Unit: 1/6 μs]
[Unit: 10 μs]
D8077,D8076
D8079,D8078
D8083,D8082
D8085,D8084
D8089,D8088
D8091,D8090
D8095,D8094
D8097,D8096
*1*2

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents