01-08-2010 02:53 PM
I have a basic VI that generates random numbers between 0-10. the user must correctly guess the 4 numbers in a sequence. This all takes place inside a while loop and once the user guesses the correct sequence the game stops. The user must then click the start game again button. However the numerical inputs remain in the same position from the previous game. How do i set it up so that they reset to 0 when the new game begins.
cheers
01-08-2010 02:58 PM - edited 01-08-2010 02:59 PM
You can either:
01-08-2010 03:13 PM
01-08-2010 03:14 PM
Did you do either of the two things S-mercurio listed in his message?
01-08-2010 03:34 PM
Obviously not, you'll have to excuse me but im not the greatest with this software so some termanologies im not to sure on. What I did was right click the numerical input in the front panel and selected; data operations_make current value default and then data operations_reinitialize to default.
Its totally a user error on my part, just want some extra credit with this assignment.
Cheers
01-08-2010 04:00 PM
01-11-2010 04:18 AM
Hey Guys,
Building on the excellent advice given by smercurio_fc, if you need to reinitise a control back to its default value at the start of your application (i.e. when you hit the run button), use data flow to ensure the execution order of your block diagram. Below you can see a simple screencap, which shows how to use the error cluster of the invoke node to make sure the "reinitialise method" is called before the main body of the code.
Hope this has been useful.
Ta Ta,