03-29-2013 02:49 PM
Hey guys,
I am fairly new to LabView, but had a question on how to set up my shift registers. For an in class assignment we are to create a game to familiarize ourselves with LabView. I chose to design a roulette program.
I am having some trouble in keeping track of the money total. An image of what I have is shown below (so far just betting on the color red, I have not added betting on numbers, betting on black, or betting on green just yet). The problem I am having is the user can make their way from the initial while loop where they choose color or number, then choose red, make it inside the second case loop where either red or black is chosen (>.5 or <= .5), and then the system decides if the user wins or loses in the final case. The system then repeats itself over and over. Is there function I can use to update the total each time the system makes it through the loop once.
The shift register never seems to update. I'm guessing that is due to the fact that it will update once whent he whie loop is finished. Since this is an infinite while loop that will not work for this case. Is there any other way to take the buy in value, and add or subtract the winnings each time the loop repeats itself on an indicator?
Thanks
03-29-2013 03:09 PM
@Kapell10 wrote:
Hey guys,
I am fairly new to LabView, but had a question on how to set up my shift registers. For an in class assignment we are to create a game to familiarize ourselves with LabView. I chose to design a roulette program.
I am having some trouble in keeping track of the money total. An image of what I have is shown below (so far just betting on the color red, I have not added betting on numbers, betting on black, or betting on green just yet). The problem I am having is the user can make their way from the initial while loop where they choose color or number, then choose red, make it inside the second case loop where either red or black is chosen (>.5 or <= .5), and then the system decides if the user wins or loses in the final case. The system then repeats itself over and over. Is there function I can use to update the total each time the system makes it through the loop once.
The shift register never seems to update. I'm guessing that is due to the fact that it will update once whent he whie loop is finished. Since this is an infinite while loop that will not work for this case. Is there any other way to take the buy in value, and add or subtract the winnings each time the loop repeats itself on an indicator?
Thanks
That's a pretty neat concept to get yourself going in LabVIEW! You are absolutely correct in using the shift register to bring your total around to the beginning, and also right on in initializing it with your buyin value. Now what you need to do is run a wire from the left shift reister all the way to the point of where you figure out how much you've won or lost, add the win/loss to the total, and that is your new total which gets wired to the right shift register. Not a bad start! 🙂
03-29-2013 04:27 PM - edited 03-29-2013 04:32 PM
01-20-2015 07:22 AM
I need the vi plz
01-20-2015 08:16 AM
It's pretty simple and the post is rather old. You'll spend less time recreating the VI than you will waiting for someone to come back and give it to you (assuming they remember where they saved it)
You'll also note it wasn't working in this thread. Why not debug your own code based on their idea than try to debug theirs?