![Coolmay MX2N Series Programming Manual Download Page 22](http://html.mh-extra.com/html/coolmay/mx2n-series/mx2n-series_programming-manual_2661266022.webp)
MX2N series HMI PLC all in one programming manual
22
5 Random number instructions
1) Random number related register: Start convert relay-M8005
Random number save register-D8005 (low) D8006 (high)
2) If you need to generate the random number, just need to set M8005 ON in the program.
When the random number is generated and be saved to D8005 D8006, M8005 will be set OFF
automatically.
3) Therefore, M8005 is set from OFF to ON, then start the random number conversion.
And M8005 turn from ON to OFF, then the conversion is completed.
4)
Example
:
LDP
M0
M0 - No Pulse
SET
M8005
SET M8005
LDF
M8005
M8005 ‘s Down
-
Conversion completed
DMOV
D8005
D0
Extract random numbers to D0 D1