LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save to TDM file after checking graph?

I am able to save data to TDM/TDX files but I want to only do that only if the information captured is of interest. How do I separate the capture from the Write to File?

Is there a better way to associate the Virtual Channel with the appropriate signal than to insert them into the Unit and Free Text as shown?

Regards,

RL
0 Kudos
Message 1 of 7
(2,858 Views)
1) How do you determine if the informaiton is of interest ? You can e.g. display it in a graph, then use a while loop to wait for the user to press either a "save" or a "discard" button and execute "Write data" only if "save" was pressed ... or am I missing the point here ?

2) Switch your "AI Read" VI to "waveform" data type. The output will then be a 1d array of waveforms that you can wire directly to "Write Data". Name and unit of your measured data will then automatically be transported from "AI Read" to "Write Data". Don't select either "Name" or "Unit" as terminals for "Write Data", because that will overwrite the name and unit "AI Read" sets on each waveform. Name and unit are currently the only attributes that are automatically transported with wav
eforms. Other information must be wired to "Write Data".
0 Kudos
Message 2 of 7
(2,858 Views)
Thank you.

I tried a while loop but something was wrong because it would write the next acquisition instead of the current one. As you surmised I decide to save the information based on the graph.

I will try your #(2) recommendation. Presently I am using 4 independent "Write Data [Channel]" which is not elegant.
0 Kudos
Message 3 of 7
(2,858 Views)
I've modified the VI to a waveform data type. It is true that it will attach the channel # to the appropriate plot line. However it does not allow me to name Virtual Channels (only accepted 0,1,2,3 which is not very useful information). Is this a real bottle neck or just my lack of knowledge?
0 Kudos
Message 4 of 7
(2,858 Views)
That sounds like you might still have the "Name" terminal on the "Write Data" VI activated. If it is there, but not wired, the incoming waveform name will be replaced by an empty string (which will then be enumerated to have unique channel names).

Normally, the channel names are attached to the waveforms by the DAQ VIs, however I have never tested that with traditional DAQ but just with DAQmx. Once you configure the names in MAX, they should make it all the way to the file without any further action.
0 Kudos
Message 5 of 7
(2,858 Views)
"Name" and "Unit" Terminals were not selected. Selecting "Name" without wiring to it yields the same result.

I checked the Channels in Max to be certain that only one Virtual Channel was assigned to each channel.

I'm using a 4452 therefore cannot use DAQmx.
0 Kudos
Message 6 of 7
(2,858 Views)
Further to the previous comment:
If a constant (string) is wired to "Name" it will as you said overwrite but the "Write Data" adds a "0" to that string. It is done within the "Write Data" since a probe after the constant only shows the desired text. If more than one "Write Data" is used, all the "Name" have a concatenated "0".
0 Kudos
Message 7 of 7
(2,858 Views)