Mitsubishi Electric MELSEC FX3U Programming Manual page 619

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
Program example
In the program example shown below, a random number is stored to D100 every time X010 turns ON.
When the PLC mode switches from STOP to RUN, the time data converted into seconds and added by the
value "(Year + Month) × Day" is written to D8311 and D8310.
M8002
X010
FNC166
TRD
FNC164
D3
DHTOS
FNC 20
D0
D1
ADD
FNC 23
D10
D2
MUL
FNC 20
D14
D12
DADD
FNC184
RNDP
24.2 FNC184 – RND / Random Number Generation
D0
The clock data is read.
Data in hour, minute and second → Data in second
D14
D10
The data in second is added by the value "(Year +
D12
Month) × Day", and written to D8311 and D8310.
D8310
D100
END
24 Others – FNC181 to FNC189
617
21
22
23
24
25
26
27
28
29
30

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents