LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can someone tell me what these non-standard Vi's do?

Some of you may be familiar with my LV8 upgrade "issues" So i am trying to make a base VI that uses only VI's that are included with Labview. The Vi's attached below were written by a previous employee who really knew his LV inside and out. I do not.
 
This one "Create Data String 1" What does this do? Do i need it? It appears just before write to file. It is not an NI created VI so it is not loaded on new computers with fresh installations of labview. I would like my VI's to be more universally distributable.   
 
 
And then there is this one "Get 2000 proof date time 1" I have no idea what this one is doing, obviously has something to do with 4 digit dates.
 
These two sub-Vi's are contained within this master VI. The purpose of this VI is to scan all 16 channels, Display a graph on the screen and write the data file. The MS multiple obviously controls the number of data points written per second.
 
PLEASE CRITIQUE THE OVERALL DESIGN OF THIS VI, "20166 TBC 14 Temps LV8.vi"
 
It is just a master template i start all vi's from. I would particularly be interested in ways to make it faster. For example, do i need 16 copies of index array and mean? Is there no way for me to do this with one block? Would that even be faster? It also seems it takes a lot of maintenance to get 16 channels to a graph (16 wires and a bundle ) Is there a way for me to write an Excel file directly? Every time i open a labview data file i "import" as tab delimited and all is well, its no problem i was just wondering if there was a way to just have it add the .xls extension that way one does not have to know the correct program that opens the data file.
 
All opinions appreciated. Thanks. 

Message Edited by Vr6Fidelity on 11-29-2005 03:25 PM

0 Kudos
Message 1 of 6
(3,157 Views)
I think the overall design could have been more compact and easier to read.  I usually prefer this over improved performance in cases where this is not an issue.  Since the first 13 or so signal lines are not needed for display in of themselves you can bundle them all up in a single for loop.  See attached picture for details.  Functionally its the same program...
 
 
0 Kudos
Message 2 of 6
(3,134 Views)
It looks like he is trying to avoid y2k date conflicts.  Not really an issue these days. 

I generally do not like to critique other people's programs.  Labview is extremely felxible and there are many different ways to achieve the same objective.  Some of the choices boil down to preference.  For example, I do not like stacked sequences and will go to elaborate lengths to avoid them.  Others use them to great effect.

That said, I can offer some general comments.  There does not seem to be any compelling reason to use a sub-vi for the create data string.  You can use a for loop in place of all the "index array"s and "array mean"s.  "Build array" can be a memory hog if you have a lot of data, but 16 points is not that bad. 

Excel has a propriatory file format.  Adding .xls to the end of the filename will not automagically make it an excel file.  Excel will be importing the file one way or the other.
0 Kudos
Message 3 of 6
(3,127 Views)
Interesting. I happen to love stacked sequences, and have never used a for loop. I dont even quite know what it is.
0 Kudos
Message 4 of 6
(3,094 Views)
A little background on for loops can be found here.

For loops are ideal when you have an array of data you want to perform very similar analysis on.  Like finding the mean of a signal, for example.  Plug the array of signals in one side of the for loop and the loop will automagically perform the actions in that loop on each element of the array.  Pass the processed data back out and it will create an array of the answers (of the same size and in the same order as the input array).

In the example Chaos provided, if you took out the Index Waveform Array function, you could enable indexing (right click on the tunnel); and the for loop will automatically index the array, perfom the mean on each one, and spit out an array of answers.
0 Kudos
Message 5 of 6
(3,055 Views)
DOH!
I cant believe I missed that.  Thats what I get for making modifications to code in 5 minutes during my lunch break Smiley Very Happy
0 Kudos
Message 6 of 6
(3,050 Views)