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

Melsec fx series programmable logic controllers
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
measurement
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

36.8 Pulse width/Pulse period measurement function [M8075 to M8079, D8074 to D8097]

Pulse width/
Pulse period
Pulse period
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
D0
DMOV
User program
FNC 03
IRET
END
36 Interrupt Function and Pulse Catch Function
Ring counter value
Ring counter value
*1
for rising edge
for falling edge
[Unit: 1/6 µs]
[Unit: 1/6 µs]
D8075,D8074
D8077,D8076
D8081,D8080
D8083,D8082
D8087,D8086
D8089,D8088
D8093,D8092
D8095,D8094
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
pulse width of input signal from X000 stored in
D8078 and D8079 is transferred to D1 and D0.
Interrupt return
Pulse width
*1
*1*2
/Pulse period
[Unit: 10 µs]
D8079,D8078
D8085,D8084
D8091,D8090
D8097,D8096
869
31
32
33
34
35
36
37
38
A
B

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents