LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with a labview project - character guessing game

Hello! So I'm working on a comprehensive project for my computer tech course and what I am trying to do is create basically a who said it quiz in labview. The user is prompted with a quote display after pressing start and has to attempt to guess which character it is until they get it right. I can't figure out how to let someone type an answer while the VI is running or to have a button for them to press with the character's name as their choice. I just need help getting it up and running structurally. This is the first time in the course that I've been excited about an assignment since we got to come up with this one and I'll actually have my friends be test subjects because the data has to be written to an excel file where I can collect the results and insert them into a histogram. Aditionally, I am trying to make it display the picture of the character and a sound bit of the actual quote when they get it right. I have everything wired to show the pictures and I'm sure I can do the sound file but I need help with the actual guessing game VI part. Any help would be greatly appreciated.

0 Kudos
Message 1 of 11
(2,161 Views)

So where are you stuck?

 

What have you started with?

 

Without a VI for us to look at, how do you expect us to be able to help?

 

It sounds like you don't have a LabVIEW problem yet, but a program logic problem.

Have you written down with some pseudo code or flowchart what the program should be doing logically?

0 Kudos
Message 2 of 11
(2,143 Views)

slharlow616_0-1614970579354.png

this is what I'm working with right now. Attempting to use a case structure to discern between character quotes. I have a function over to the side that will allow me to force the VI to wait for the user's input on the front panel but it won't connect to anything I have so far. Ideally, when the message is displayed, the subject would be able to click okay to clear the message and then press one of the buttons with the characters name (shown here as boolean)

0 Kudos
Message 3 of 11
(2,133 Views)

I highly recommend looking into a State Machine architecture.  One of those states can contain an Event Structure where you wait for button presses and react accordingly.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 11
(2,129 Views)

Okay.. so I've read that whole article a few times through and I'm not sure what is not clicking or why but how do you build it? Because its not just a function on the control panel... or if it is I can't find it

0 Kudos
Message 5 of 11
(2,116 Views)

I figured out how to create this, nevermind. But we haven't really worked with these so I'm not sure how to make it work with this VI

0 Kudos
Message 6 of 11
(2,113 Views)

@slharlow616 wrote:

But we haven't really worked with these so I'm not sure how to make it work with this VI


Think carefully through the order of operations of your program.  You will see steps that much be completed.  Generally speaking, each of those steps is a state in the state machine.  Use shift registers to maintain which state to call next and the variables in the system.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 11
(2,101 Views)

I understand how to use the shift registers with the state machine. I am currently trying to build the single run before I put in the continous loop and this is where I have gotten to but I can't seem to wire it to where it will display the image...? I'm able to see the first quote and choose the character.

slharlow616_0-1614978807891.png

 

0 Kudos
Message 8 of 11
(2,095 Views)

What exactly do you mean by "I can't seem to wire it to where it will display the image".  I see you have a file path and a Read JPEG and picture in the case structure.

 

But I can tell your VI is broken because the tunnel executing that case structure doesn't have a boolean value wired for all cases.

When your run arrow is broken like yours must be in the situation, click on it and investigate the errors.

0 Kudos
Message 9 of 11
(2,084 Views)

Alright guys, the guessing game works but I'm having issues wiring it to write it to an excel file. Here's the block diagram.

slharlow616_0-1615044629905.pngslharlow616_1-1615044646868.pngslharlow616_2-1615044654624.pngslharlow616_3-1615044661526.pngslharlow616_4-1615044668975.png

Its a stacked flat sequence

 

0 Kudos
Message 10 of 11
(2,052 Views)