06-26-2012 05:08 PM
Hi,
I've created a case structure where I have a 32-bit integer (coming from an index array) as the selector values. The selector values range from 0 to 1720. The input tunnel is a 2-D array of single 32 bit numbers. I'm performing a simple multiplication by a constant on the 2-D array, inside the structure, and then sending it on its way to the output tunnel of the structure.
I've created several cases and set a default case as well for any selector value that doesn't fall within my specified cases. I keep getting this error now: Every case in a Case structure must have at least one selector value that selects it. Firstly, I really can't have a case and just have it not be selected if it's selector value doesn't come up? Secondly, in the "set" of 32-bit integer selector values that come through, all of the cases are covered! So, I'm not sure why this error is coming up. Am I missing something?
Thanks
-James
06-26-2012 05:14 PM
@JPKelly662 wrote:The selector values range from 0 to 1720.
I've created several cases and set a default case as well for any selector value that doesn't fall within my specified cases.
Does your default case actually implement "Default" or did you simply handle every other value from 0 - 1720 that is not explictly handled in another case? The case structure MUST handle every possible value possible from the 32-bit interger. The easiest way to do this is to add an additional case and right click the case structure and choose "Make this the default case".
06-26-2012 05:16 PM
I actually made an extra case, right clicked, and chose "Make this the default case".
06-26-2012 05:17 PM
could you post the code?
06-26-2012 05:20 PM
I can try. It's a small section of a much larger, very complex code. What is the easiest way to post the code?
06-26-2012 05:21 PM
Just create a simple copy of the VI you are having troubles with and post that.
06-26-2012 05:21 PM
Attach the VI directly
06-26-2012 05:37 PM
Unfortunately, I don't think I'm allowed, by my company, to post the entire VI. I will ask. In the meantime, I've attached the case structure.
06-26-2012 05:41 PM
You need a bit more than that. You should at least leave the control that is wired to the selector. A borken wire is pretty useless to see what is going on. However, it is complaining about the empty cases.
06-26-2012 05:42 PM
There were a couple of cases in the structure that didn't have any way to handle them. That is what is causing your problems, you cannot have a case in a case struct that doesn't have a value assigned to it. This code cannot be accessed and LabVIEW won't allow that.
Charles