From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-19-2009 02:00 PM
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
Thanks,
Sam
Solved! Go to Solution.
03-19-2009 02:20 PM
03-19-2009 02:31 PM
I've attached the files in the program in a zip file. The HCCI.vi 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.
-Sam
03-19-2009 03:35 PM - edited 03-19-2009 03:37 PM
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 dataHCC.vi" you append an empty array to the array. This does not really do anything useful, right?
03-19-2009 03:54 PM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
03-19-2009 04:03 PM
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!