Showing results for 
Search instead for 
Did you mean: 

Auto-Indexed Tunnel Problem

Go to solution

I have a data acquisition program that uses an Auto-Indexed Tunnel into a For Loop to process and display the data in a 1-D array.  The program is behaving very strangely with the first value in the array (time that the program has been running, in seconds).  The other 13 values in the array all update correctly, but the time value always displays approximately the same number.  The loop is timed to update the front panel values once per second.  If I use an Index Array block outside of the For Loop to get the time value out of the array, I get the correct value for time that increments up by about a second every time the loop runs. 

So basically, when the Time value is passed through the Auto-Index Tunnel, it's output fluctuates up and down by a few tenths of a second each time the loop executes (staying at a single value... usually around 90, although it changes every time I run), instead of starting at 0 and increasing with the time that the program's been running.


I'm running LabVIEW 8.5.1




Download All
0 Kudos
Message 1 of 6
Can you upload an actual example? Also, do you happen to have any locals or anything else which might change the value of the indicator?

Try to take over the world!
0 Kudos
Message 2 of 6

I've attached the files in the program in a zip file.  The file is the one in question.  I'm fairly new to LabVIEW, and this program is an adaptation of an older DAQ system.  We took the basic Producer-Consumer structure and replaced all the I/O in the producer loop with DAQ assistants (we use an M-Series card for frequency measurement/SCXI control, an SCXI chassis with a couple input cards, and a USB-6008 for some analog I/O.  I realize that a lot of the program is probably not coded ideally (we changed as little as possible from the older version), but I still found this behavior strange.  I should also mention that the Auto-indexed tunneled value for time was working correctly before I added a couple more of the DAQ Assistants (when it was working, we only had one).  Not sure what would have triggered this.  I have also tried restarting the computer.  Thanks for looking into this.


0 Kudos
Message 3 of 6
Accepted by usaplanb

SInce I don't have any DAQ installed, I cannot tell what size the array is, but if it is larger than 14, the later elements will overwrite the time because case 0 is also the default. For safety, I would add another (empty) case (e.g. -1) and make it the default.


A lot of things make very little sense, for example in the "calculate" you append an empty array to the array. This does not really do anything useful, right? 

Message Edited by altenbach on 03-19-2009 01:37 PM
Message 4 of 6
Beware of the DEFAULT setting on your CASE structure. It could be doing something to you.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.

Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 5 of 6

You were correct about the array being larger than 14 elements long.  I feel somewhat silly not realizing the signifcance of the data that was being output on by the "Time" variable (it was representing my valve position).  I had thought I was only outputting one value for my last addition to the array (totaling 14 elements), but it turns out I was outputting multiples of the same type of measurment, due to the way my DAQ Assistant was configured.  I fixed that and sure enough, my time value is now correct.


I do know an empty array is being appended to the original array.  Initially, some other work was done inside that Calculate_DataHCCI VI, but all the processing is now done in the DAQ Assistant.  I haven't studied the "Save Data" VI yet to see if not appending the empty array will cause a problem.  Once I finish cleaning the program up, I'll probably eliminiate that VI entirely.


Thank you very much for your help!

0 Kudos
Message 6 of 6