02-18-2024 10:35 PM
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?
Solved! Go to Solution.
02-18-2024 11:03 PM - edited 02-18-2024 11:09 PM
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.
02-19-2024 10:23 AM
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.