LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to know whether all the cases in a case structure (or all the pages in a Tab Control) has executed??

Please provide more details on what you're tyring to determine, as the question doesn't make much sense. A case structure executes based on the value of the selection terminal, so you really need to look at the values that are fed to that terminal.
0 Kudos
Message 2 of 9
(2,660 Views)

You probably want to create a boolean array with as many elements as you have cases. Place it into a shift register and wire it across all cases. In each case turn the associated element true. If all elements are true, all cases have executed at least once.

 

 Are you changing the tabs from the front panel or programmatically? With the tab control, you can do something similar as above. Of course a tab does not "execute" in the same sense. You could keep track of whenever the tab changes and do the same thing as above.

Message 3 of 9
(2,646 Views)

Thank u 4 the reply.....

The scenario is, I have a tab control with 5 pages, with each page outputting a string, which i want to concatenate outside of the case structure for the tab control....

The problem is I do not want to do this concatenation unless I have manually (not programatically) selected each page...

I could'nt find any property for the case structure which says --- "all cases executed atleast once".....

Also, I'm not sure how I can add a shift register to a case structure to solve this problem, simply bcoz I'm not able to add a shift register to a case structure??? 

Anyway, after a lot of trial and error, I finally came up with a solution that works... I have attached it... 

But I don't know whether it is a neat way of solving the problem... If anybody have any better ideas please feel free to edit the attached vi and state your point.... 

0 Kudos
Message 4 of 9
(2,629 Views)

I made some change, let me know if it fit your requirement

0 Kudos
Message 5 of 9
(2,619 Views)

sorry jjcimon, I am unable to open your vi since I'm using Labview 8.5....

it would be great if u can post it as an image.... thank u 4 responding......

0 Kudos
Message 6 of 9
(2,607 Views)
  • The "replace array subset" code is the same in all cases, thus it belongs outside the case structure.
  • Same with the "numeric 2" and logical OR. Only the diagram constant belings inside the case.
  •  You should eliminate all your value property nodes. Use shift registers instead.
Message Edited by altenbach on 10-26-2008 10:53 AM
0 Kudos
Message 7 of 9
(2,594 Views)

I'm sorry altenbach!!!!  I'm unable to follow what ur saying.....

Can u please edit the vi I posted in my previous post, and show me what exactly ur indicating at....

 

0 Kudos
Message 8 of 9
(2,576 Views)

OK, here's a quick draft. See if it makes sense.

 

The first case structure is not needed. The controls retain all values, so there is no need to copy them over to an indicator just to later read from a value property node. Right?

 

Of course you don't even need the integer math (blue shift register), because you could use the output from "all done" for the second case structure instead of cheching for x1F. I left both alternatives in (green shift register + blue shift regsiter), but of course you only need one of the two.

 

It would make more sense to use an event structure or "wait for FP activity" instead of constantly spinning the loop. I have not implemented this.

0 Kudos
Message 9 of 9
(2,561 Views)