11-15-2010 04:51 PM
I'm creating a new VI and need a new random number each time I hit a button... this will eventually be replaced with en externally triggered boolean, but for now, I'd like to just hit a button, get a new number, use that number, hit the button, get a new number (erase previous), etc etc.
Thanks,
-Steve
Solved! Go to Solution.
11-15-2010 05:44 PM
OK. What have you tried? There's a random number function in the Numerics tab. All you need is a front panel with 2 buttons (Generate and Stop) and an indicator. In the code all you need is a while loop with an event structure. I'd give you the code, but then you should really try this yourself.
Have you taken any of the LabVIEW tutorials? To learn more about LabVIEW it is recommended that you go through the introduction material, tutorial(s), and other material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.
11-15-2010 11:30 PM
Hi Steve...
as smercurio_fc told, You have to got through the basic training material....
But any way for your referance... Try this...
<<Kudos are welcome>>
11-15-2010 11:47 PM
Why the case statement? You can eliminate that.
11-16-2010 12:09 AM
Hi Dennis...
You are right.. By mistake, in the flow. I just put it....
Sorry for the inconvenience...
<<Kudos are welcome>>
11-16-2010 12:47 AM - edited 11-16-2010 12:51 AM
Just to add up what SAM has posted you can generate in a different ranges without limiting it.. Its just a very simple logic... Try this..
11-17-2010 11:07 AM
Thank you all very much! I'm not 100% clear on why/how this works. But I've been able to modify it to what I need. Thanks again!