From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-28-2015 01:33 PM
Hello,
I am using LabVIEW 2014 with a student license. The problem that I want to solve is how to retrieve signal data generated from an instrument (date stamp, temperature, humidity and pressure) that is already stored in a TDMS file; my vi is able to search in the TDMS file based in a date range requested by user and then passing that information to an array built in a for loop, display requested data in 3 XY graphs and finally export that information into an excel spreadsheet.
However, I found that if you run the application once it works fine, but if you don’t close the project and run the vi again the data is duplicated several times in my array resulting in a excel spreadsheet with unnecessary information (duplicated) and confusing charts.
Please help me understand whys this is happening and how I can solve this. I already try to replace shift registers with index tunnels but my XY graphs functions are not accepting the data format.
Thanks and regards
Solved! Go to Solution.
08-28-2015 01:40 PM
Without openning your VI I will tell you that it is because your shift registers are uninitialized (no input to the left hand SR). In this case they retain values from the previous run unless your VI is recompiled. What you want instead is to right click the left hand SR and select 'Create Constant' so they start with empty arrays.
08-28-2015 01:47 PM
Thank you so much Darin.K, applying the constants solved the problem.
Thanks again
08-28-2015 01:48 PM - edited 08-28-2015 01:59 PM
You have LabVIEW 2014, so you have the new tunnels!
Delete the shift registers and "insert into array" nodes and wire the 1D array directly to the right loop boundary. Now right-click the tunnel and set the tunnel mode to "Concatenating" (see picture). repeat for all outputs.
The code will be much cleaner than with all these shift registers!
08-28-2015 01:59 PM
Great, this works also.
Thanks altenbach for the good practice advise.
08-28-2015 02:00 PM - edited 08-28-2015 02:00 PM