06-03-2013 01:01 PM
Hello ...
I am trying to write a program where one can select the array elements dynamically from the front panel when the VI is in run mode.
So far, IC_OpenDevice.vi gives me the various Video formats [It is a 1D array], right now I assume the last but one among this array as an example. But, I would like to design the program in such a way that the user can select any Video Format from the front panel. How do I achieve that ??
Block Diagram :
Front Panel:
Solved! Go to Solution.
06-03-2013 01:41 PM
Use a numeric control to pick the index you want. I'm not sure what else you are looking for.
06-03-2013 01:48 PM - edited 06-03-2013 02:38 PM
Place the array into the "strings []" properties of e.g. a ring, then use the ring output to index into the array of video formats. Or you could use a listbox.
(Also note that if your stop and grab buttons are latch action, their terminal should be placed into their respective event cases so they reset properly.)
06-03-2013 04:13 PM
I tried following the same method on my program.
However, I get the Error -2147352567 ... Below is the changes I made to my program ...
06-03-2013 04:18 PM
Why didn't you put the update to the video format in the event structure? You could use the "Video Format 2":Value Change event. Then it is all in one easy loop.
And you don't need that wait in your top loop since teh event structure will take care of your timing.
06-03-2013 05:21 PM
Thanks for the idea. I tried putting the event change in the while loop and let the even handler control the video format input. But, when I run the VI , why do I get this error ?
06-03-2013 05:25 PM
Thanks !
Figured out ... This event strucrue is really helpful stuff ...