572
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
24 Others – FNC181 to FNC189
24.2 FNC184 – RND / Random Number Generation
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.
Data in hour, minute and second
→
Data in second
X010
FNC184
RNDP
D100
END
M8002
FNC166
TRD
D0
FNC164
DHTOS
D14
D3
FNC 20
ADD
D10
D1
D0
FNC 20
DADD
D8310
D12
D14
The clock data is read.
The data in second is added by the value “(Year +
Month)
×
Day”, and written to D8311 and D8310.
FNC 23
MUL
D12
D2
D10
Содержание FX3U Series
Страница 1: ...PROGRAMMING MANUAL Basic Applied Instructions Edition FX3U FX3UC SERIES PROGRAMMABLE CONTROLLERS ...
Страница 2: ......
Страница 889: ......