Hi SuB-ZeRo,

The RANDOM function requires a "Seed" to be placed in the variable before using it.

For instance,

sayi1 = 12345
RANDOM sayi1

Unfortunately, doing it that way, you will end up with the exact same numbers every time you run the program. One way around it might be to let a Timer free-run untill some external event happens, such as a button press, or maybe a character being received via RS232. Then once that happens, use the timer value as the seed.

Once you have the seed, you'll need to use the same variable for each of your 6 random numbers, then copy it to the other variables as needed.

As you start playing with the RANDOM function, you'll realize that it's not very Random at all. If you keep getting random numbers from the same seed, you'll start seeing a repeating pattern. And if the seed is set to 0, you will only get 0's as the random number.

Keep in mind that the number will be between 1 and 65535 so if you want to limit it to a certain range, you'll have to do a little math on it.

HTH,
   Darrel