LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

or gate signal to timer before stop in while loop HOW?

Solved!
Go to solution

Good afternoon,

 

Could someone please help. I have a project that is very basic. It is replicating the game mastermind in the labview2009 VI. I have got it to work but as soon as all conditions met are true my final or gate sends the signal to the while loop stop button.

 

This means there is no time for my "congratulations string" to show before the game resets. What I need to do is put a timer between the final or gate and my stop button but all the metods i have tried dont seem to work as the data types dont match.

 

Please Please Please some one help

 

Alex

0 Kudos
Message 1 of 16
(3,555 Views)

Posting your code would probably help out a lot, because your explanation does not make a whole lot of sense to me.  But this is what I came up with based on your post (although it is probably not what you are looking for):

 

random snippet.png

 

The False condition of the Case Structure is just a wire feed through.  If the or gate is true (i just through some constants for the sake of example), then the case structure uses the "Wait (ms)" VI to wait for 1 second.  Once the 1 second is up, the TRUE condition is fed to the conditional control for the while loop which will stop it.

0 Kudos
Message 2 of 16
(3,550 Views)

I think i know what you mean but i can post the code to you if you dont mind.

 

Its quite large where can i post it thats easy for you?

 

thanks so much for this

0 Kudos
Message 3 of 16
(3,540 Views)

The best thing to do is to NOT post all of your code, but instead make a simple example of your understanding of the problem.  In fact, that should be your first approach to solving a problem in LabVIEW.  Isolate your problem so you can properly understand it.

 

A lot of posts here look the same:

 

"Hi!  I have problem.  Here is all my code, please solve it!  Thanks!"

 

Then they post multiple files that is a bunch of speghetti code, and wonder why nobody is helping them.  

0 Kudos
Message 4 of 16
(3,535 Views)
I also would like to add that images of code will help generate solutions from the forum faster than downloadable code.  Some of the more advanced LabVIEW users (I am definitly not one of them, by far) who frequent this forum can look at an image of code and be able to quickly answer your question.  However, if they have to download and load your code into LabVIEW they may be less-willing to take the time to try and help you.
0 Kudos
Message 5 of 16
(3,528 Views)
I don't agree. It's impossible to run an image unless it's one of the new png snippets.
Message Edited by Dennis Knutson on 12-21-2009 11:09 AM
0 Kudos
Message 6 of 16
(3,524 Views)

And the new png snippets are not always runnable...

 

I've seen a lot of posts here where the downloadable code was un-usable because files were missing or what have you.  For the sake of completeness, you are right Dennis.  Posting both code and images seem to generate the best responses.

0 Kudos
Message 7 of 16
(3,512 Views)
WELL IM STRUGGLING TO POST A PICTURE OF MY CODE. I HAVE SCALED IT DOWN TO A SIMPLE ARRANGEMENT THAT GIVES YOU A BETTER IDEA OF WHAT I WANT. HOW DID YOU POST THAT SMALL PIECE OF CODE IN THE MESSAGE BLOCK
0 Kudos
Message 8 of 16
(3,505 Views)

If you are running LV2009:

 

1.  Select the code you want to include in the snippet.

 

2. Goto Edit->Create Snippet from Selection

 

3. Save the file

 

4. Make a post, and click on the "Upload or Insert Image."  NIs post editor makes it easy for you.

 

Beware, Local Variables don't translate correctly in Snippets.  Posting your code as-is, is better than not posting at all.

0 Kudos
Message 9 of 16
(3,503 Views)

SNIPPET.png

Excellent, I hope this makes more sense.

Cheers

0 Kudos
Message 10 of 16
(3,499 Views)