07-13-2019 11:54 AM
Getting back into labview after a long break. Have a 2D array that just need to index with buttons to show a particular pump info. This can't be the most efficient way to do this and not sure why the case structure is giving an error?
07-13-2019 01:32 PM
The Last Shall Be First. Did you click the Broken Arrow and look at the list of Errors? Do you not understand "Case Structure: No case for some selector values"?
Your Selector is a Boolean. It has two Values. How many values are in your Case Structure? [Hint -- the answer is not 2]. Hence an error. On the other hand, you, at least, are consistent -- all of your Case Structures have the same Error.
LabVIEW Is Not Matlab. LabVIEW is not C (or C++). There are tutorials shown on the first page of the Forum.
I cannot figure out what you are trying to do -- it makes no sense to me. Maybe spend a little less time developing a fancy Front Panel (with all of the Labels hidden so we have to "hunt around in the dark" to find the variables you are using) and more time with, maybe, a 2D array of integers and work out the logic that way.
BOW_Selected should not be a Float -- it is used as an index to an array. See the coercion dots? [Those are the little red dots where the orange wire goes into an input that is expecting "something else"]. They are a "hint" that something might be wrong, or at least "illogical".
Bob Schor
07-15-2019 05:30 AM
Thank you Bob. I added the false case and the error went away. No other programming language I have used requires that so didn't make sense to me. The code was meant to just simply be a way to scroll through the array with the first, previous, next and last buttons. Just seemed like a lot work to implement and figured there was a much more efficient way to do this that I wasn't thinking of.