11-26-2024 09:33 PM
11-27-2024 12:56 AM - edited 11-27-2024 12:57 AM
Hi fan,
@soccerfan wrote:
However ii know a fiew hings about events stucture and that is what i used in this problem
Where exactly did you use the event structure mentioned by Bob?
It isn't visible in your image!
What's the point of using a while loop that iterates only once???
suggestion: use a type-defined enum instead of a combobox to select a predefined number of cases!
Why don't you write you want to implement a Darts counter algorithm!?
11-27-2024 03:57 AM
@GerdW a écrit :
Why don't you write you want to implement a Darts counter algorithm!?
I love how solving this small project became primarily understanding what the project is haha. The 501 and 301 reminded me of something as well that I couldn't point out, well done.
@Soccerfan a couple of things:
11-27-2024 07:03 AM
@GerdW wrote:Where exactly did you use the event structure mentioned by Bob?
It isn't visible in your image!
I think he was referring to my snippet that used an event structure.
@soccerfan,
Learn to use the Event Structure. It is one of the most useful features when dealing with a GUI. Just play around with it. This might be one place to start: Event-Driven Programming in LabVIEW
11-27-2024 03:53 PM
You are right this is from a dart scoring sheet ( 501 and 301 gave it away). This is just a snippet that i pulled from my bigger project that uses a state machine . I did not want to show you the whole project that is a mess right now. I am interested only in the problem i mentioned earlie for now. I am sure more questions will follow about the whole project
11-27-2024 05:05 PM
Attached is my project , If you know about dart game and willig to help, i will appreciate it.
It is still in working process (i know it's a mess), The only part that seems to work now is:
-select player1 and 2
-select game
-Player 1 The 1st time you enter your score (ie 100 or any score 170 or less ) and that comes my problem for the next score
If you play darts you should know what i mean.
Come on Champs,,
Thanks
11-27-2024 08:43 PM
@soccerfan wrote:
Thanks for your answer. You almost got it. I cosidere myself an intermadiate labview learner, i still have a long way to go. However ii know a fiew hings about events stucture and that is what i used in this problem
Your figure shows a While Loop around a Case Structure. An "Event Loop" is a While Loop around an "Event Structure". On the LabVIEW Structure Palette, the Case Structure is the fourth item in the Structure Palette, with the Event Structure being the fifth shown. Please learn about it, as it seems to be the "missing piece" in your understanding of the problem you are trying to solve.
Here is a simple example of an Event Loop. You can ignore the Invoke Node on the left -- that's just there to reset all the variables on the Front Panel to their defaut values before the code runs. Code this up or drag the Image to an empty Block Diagram (it's a LabVIEW Snippet, so it might magically become LabVIEW code). See how it behaves when you run it (including understanding when and how you stop the program). When you think you understand what is going on, try modifying the program by dragging the Number control outside the While Loop (so it is just "hanging out in the breeze" -- before you run it in this configuration, what do you think will happen? Did it behave as you expected? Why (or why not)?
Bob Schor
11-28-2024 12:07 AM
Thank you for your time, However that's not what i am looking for. Check my project that i posted earlier ( darts.app .vi) to have a grasp of what i am looking for.
Thank you again
Also, dragging the snippet did not work for me
11-28-2024 01:22 AM
Hi fan,
@soccerfan wrote:
Check my project that i posted earlier ( darts.app .vi) to have a grasp of what i am looking for.
Unfortunately you failed again in providing a downconverted version of your VI.
Somehow you aren't able to read our messages or willing to follow them…
11-28-2024 02:03 AM
I did, i converted all the way down to version 9. What version do u want me to converted to?