10-22-2015 08:43 AM
Hi,
This is Kalyan. I am new to Labview. I am doing my Msc in Electronics and Communications. I could not able to generate random numbers between 1 to 10000 and match the random number with the input which i provide and glow a led light upon true. Please, guide me.
Kalyan
10-24-2015 06:52 AM
Hi Kalyan
There a are a number of questions to this that will need answering.
The input you are providing. Is it an integer? (lets assume yes for now because matching a real or floating point exactly will take quite a few integrations.
Next, how do you want the function to perform? is it called once or do you input a number and let it loop until it finds a match in the random number generator?
The example below works not to bad as a start.
The dice generate a random number between 0 and 1, you multiply that by 10000, the first case statement forces the output to be at least "1" and the next function rounds to nearest integer value.
(note: there are two case blocks to illistrat both casses. )
Hope this helps
Chuck
10-25-2015 01:59 PM
Hi,
Thank you for the help.
Regards,
Kalyan