LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

regarding queue and case structures

Solved!
Go to solution

Hi,

 

While executing the attached VI an error appears stating "no case for some selector values".Can any one explain the reason for this.

0 Kudos
Message 1 of 14
(3,660 Views)
Solution
Accepted by topic author vaishnavinatarajan

You did not cover all of the possibilities of the string in the case structure in the bottom loop.  Did you make a "Default" case?


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 2 of 14
(3,655 Views)

yes,I have created a default case.My condition is when I enable a boolean control only that partoicular case should get executed.That is what I have given in my first while loop.

0 Kudos
Message 3 of 14
(3,638 Views)

Hi,

 

In the attached VI,case structure does not execute the case fed to case selector terminal.I am unable to make out the reason for that.If any of you find the solution kindly share with me.

0 Kudos
Message 4 of 14
(3,586 Views)

What is it you what to do?
For us to help you, you need to explain your problem in details.

And you need to tell us what the program should do.

0 Kudos
Message 5 of 14
(3,560 Views)

How come you attached a VI that looks completely different from the image attached earlier?  It is kind of hard to help you solve your problem when the problem changes from one message to the next.

0 Kudos
Message 6 of 14
(3,549 Views)

Which case selector?  What value?

 

I am noticing you don't have a "black" case in your consumer loop, but it is a possible value coming from your top loop.

 

Your cascading of case structures makes it really hard to follow your code.  You should use an Event Structure to key off of when your buttons change values.  It'll make things a lot easier to read.


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 14
(3,501 Views)

Hi,

 

Hereby I have attached the question and my updated code.I am getting the result for the first tabulation.For the second tabulation I sont know how to implement the concept using event structure.Kindly share your solutions.In case of any clarifications let me know.

0 Kudos
Message 8 of 14
(3,476 Views)

You really need to learn the State Machine.  That will be the best way to go with any CLD exam.  And you will be able to do it all in a single loop.

 

I would recommend keeping an array and an index in a shift register.  This array will tell you which lights turn on for which time iteration.


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 9 of 14
(3,440 Views)

Here is a link to some help on the different design patterns in LabVIEW .

That is a must starting point for CLD.

 

http://www.ni.com/white-paper/7605/en/

0 Kudos
Message 10 of 14
(3,426 Views)