oceansoul
Member
Registered: 19th Jun 06
Location: Sunbury, Surrey
User status: Offline
|
I need assistance with the random number generator.
Ta.
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
Hi
|
oceansoul
Member
Registered: 19th Jun 06
Location: Sunbury, Surrey
User status: Offline
|
Ive been given an assignment and have done most of it. But its based on a random number generator to provide 4 numbers between 1 and 10 that users have to guess. I put the random number generator block and a multiplied by 10. But the random number generator constantly generates a number and i cant seem to stop it. If i put it in a "Do while" Loop then none of the other bits worked i.e. the compare generated number and users guess :s
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
Without seeing the VI it's difficult to tell what the problem is. I assume the whole VI is in a while loop, so your random numbers are constantly updating.
What you could do is use a task sequence that has a while loop that loops until the user has entered all the guesses, once they have been entered they can be tunnelled to the next frame. Then the next sequence will have a while look that will loop 4 times filling and array with your random numbers. The random number array will then be tunnelled to the next frame along with the guess numbers. You can then use your array and guesses to check for matches in whatever way you like.
|
oceansoul
Member
Registered: 19th Jun 06
Location: Sunbury, Surrey
User status: Offline
|
Hi again. Ive my programming all working now. Just one more thing however, ive got my VI here
but when i press the run button i want all the input boxes to default to 0, not at there previous value. Ive look in all the settings for the input box etc.
TIA
[Edited on 23-12-2009 by oceansoul]
|