06-29-2012 01:50 PM
I am an EE intern using LabVIEW to create a program to control and retrieve data from a testing pedestal for antennas. I am using LabVIEW 2011 Version 11.0.1.
I am currently having trouble with the index portion of the LabVIEW program I am currently creating. Right now, on the bottom left of the VI, I have a case structure that begins counting whenever the "Start/Stop" button on the front panel is un-pressed(when the VI stops acquiring data) so that the button is now on "stop"(sorry if my description is confusing). However, the number stored in Index always seems to start at 2 and not at 0, where I want it to start. Consequently, the data stored in the array Data Stored always begins storing data from index 2.
My question is, what is the problem with the way I am counting for the Index, and how can I fix this so that the array Data Stored will always begin storing data from its 0 index?
Solved! Go to Solution.
06-29-2012 02:04 PM
Your code is overly complex. In your true case, simply have a build array function where one input is wired to the shift register and the other input is wired to the new value. The false case would simply have the shift register wired through. Right click in the shift register and select 'Create>Constant' so that you start with an empty array. Get rid of everything else (Insert Into Array, the case statement with the index count, and each and every local variable.