From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.


Showing results for 
Search instead for 
Did you mean: 

Random Number w/ Min/Max, Min stays at zero - not taking the random #s

Go to solution


My issue is that the minimum is staying at zero, how can I get the minimum to output the first random # and then compare from there? 

0 Kudos
Message 1 of 3
Accepted by topic author Anomalous

You need to initialize your shift registers.

Typically, the min with +inf and the max with -inf.


Else it remembers the last values between runs. On the first run, you get the default, i.e zero, which remains the min.

Message 2 of 3

Also remember that we have ptbypt VIs, so your code look as follows:




(Depending on the rest of the code, you might what to init if i=0)


Also note that your loop time is instantaneous, so the indicator terminals don't belong inside the loop.


0 Kudos
Message 3 of 3