A common way to generate random numbers in a PLC is to use a time value, either a free running timer value or a system clock.
With a timer, each time the PLC program scans the logic it should see a different accumulated time, since the program scan and the timer typically run asynchronous.
If you have a system clock, you could just look at the current seconds or milliseconds value, each time the program scans the rung. Again, if the clock and program scan are asynchronous, you should get a different value on each program scan.