NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Randomness of TestStand Random() function

Does anyone know how good the Random() function in TestStand is? If I called Random() in the same sequence running on two different stations, can I expect different values? What kind of random-number generator is it, and how is it seeded?
0 Kudos
Message 1 of 3
(5,287 Views)
The random generator is the same one you can find in the CVI toolbox.fp instrument driver, which includes the source code. I think TestStand takes the default seed, so that you should get the same sequence on different stations. However, you should confirm that empirically. I don't think TestStand has a way to reset the seed or reseed from the clock, so I'll enter a suggestion for that.
0 Kudos
Message 2 of 3
(5,287 Views)
You are correct. The same numbers come out every time I restart TestStand. As a workaround, I can start my sequence with a loop that burns through some number of Random calls based on the clock and maybe a hash of the station id. That should be good enough for my purpose.
0 Kudos
Message 3 of 3
(5,287 Views)