10-15-2015 03:22 PM
So I have an array and I have an index to the array and I have a string indicator reading the array element. That works fine. Then I have a case structure, which depending on the nature of the element that is deposited into the string, it goes to a specific case. This used to work fine. I also have 6 buttons and depending on which case you are in depicts which buttons are made visible/invisible on the Front Panel. My problem is that for some reason only Buttons, K500, Cave 1, and Cave 2 keep being ever visible no matter what case I'm in.
Again, this was working not but an hour ago and I have no idea what I did to frack it up. The VI example is below. Oh and to get this working insert test, 1, 2A, 2B, 5A, 6A, 7A in the array at 1,1,0. Or where the index array is pointing at. Thanks.
10-15-2015 03:27 PM
Worked fine for me. I would get rid of the local variable to avoid race conditions.
10-15-2015 03:43 PM
Wait, how did it specifically work for you? Did you see a different group of buttons arise for each different element you put into the array?
For example in the array 1,1,0 you could put 2A and then only buttons k500, Cave1, and Cave2 appeared? But then you could put in 5A and buttons K500, K150, and Cave 3 appeared?
Well, if that's the case, at least thanks for knowing that it worked for somebody!
10-15-2015 03:45 PM
Yes, the different values made different buttons visible and invisible. When I opened the VI, the indices were not set to 1,1,0, so double check that the value you want to extract is at that index.
10-15-2015 04:08 PM
Good point, but I know it is because the value I put in at the element does show up in the string indicator box just below the array on the Front Panel. I'l keep trying but good to know it does work for somebody.
10-15-2015 04:10 PM
Did you put on highlight execution so you know which case is running? Make sure you don't type any spaces into the string, or it will not select the desired case.
10-15-2015 04:13 PM
Doh!!! I figured it out. And as usual it's the quentessential missing semi-colon that fracks the whole program kind of mistake. Somehow in the element in the array I had some letters/numbers that weren't visible, like I accidentally pressed the space bar too much and didn't know it. So it hid the extra numbers in the element where I couldn't see them and the program was like What the hell is 475hahsd? Anyway, thanks.