07-20-2009 09:11 AM - edited 07-20-2009 09:14 AM
Hello Alain!
That was just a tip that I carried from senior LabVIEW programmers. OK i thought i will have to sit and write my explanation in this regards but thanks again to forum...
http://forums.ni.com/ni/board/message?board.id=170&thread.id=153531&view=by_date_ascending&page=2
you will find few other posts too advocating the minimal use of Locals, globals, Value property nodes, etc., which does not follow the data flow paradigm.
Yeah! and i was just suggesting to use wires and shift registers instead!
Regards,
Krunal K Patel
07-20-2009 09:18 AM
Hello Flibbertygibbet,
Please put some light on how have you avoided the code being zero? do you re-run the "Write LED" state if the code is 0?
07-20-2009 09:27 AM
07-20-2009 11:22 AM
Hi Flibbertygibbet,
I'm sure you can do better
Now you sabotage the random generator a bit
I' ve made the following small VI to prove that to you
When you run it several times, you will see that code "1" always comes more often since you replace all the 0's by 1's
It's not me who will tell you what to do, but I'm sure there's a better way to get ride of those 0's and keep all code's to appear as often.
07-20-2009 11:36 AM
07-20-2009 11:47 AM
07-20-2009 01:06 PM
How do you think you will use the "High score" stuff?
Only within one game, one run of the VI? Or do you want to keep track of all high scores from the past?
First try to put your thoughts on "how do I want the high score to work" on paper and then start programming.
Regarding the LCD stuff.
Are you sure that code is Ok? I would try it in an other, completely new VI so that you know exactly how to use it.
I used lots of those HD44780 based LCD's in systems controlled by a microcontroller but never with LabView.
I know that if the initialisation is not well done, lots of things can go wrong.
Make your choice on which of those two problems you will solve first.
Doing two things at the same time is the best way to finish none of them ... ... or
your choice!
Then come back with some ideas.
I noticed you changed some states, so please the updated type def also. Thanks for that.
07-20-2009 07:12 PM
Well in my previous program, I've kept the scores of all previous runs of the VI, so I would like to do it here too.
I'd say I would want to concentrate on the high score part for now as i'm running out of time.
The LCD VI works fine alone and in this VI, the words High score and top score can be displayed, but I can't seem to display the scores tho.