04-22-2009 10:59 AM
04-23-2009 01:18 AM
Hi knicewar,
where is the wrong name? Can you explain what you expect and what you get? Do you mean the groupname? You can set it with the "TDMS Write" function.
Mike
04-23-2009 04:17 PM
Hey knicewar,
I agree with Mike, a little more information on what you are getting and what you expect would be helpful. In the example that I opened there is simple one channel and the name seems to match whatever I enter in 'name to assign'. What are you seeing if you use multiple channels?
-Ben
04-23-2009 11:52 PM
You need to use more than one channel to see the problem. What I'm seeing is that only the first channel has the name I assigned and all the others do not have the names I assigned. I can work around this by assigning the names in the TDMS Write call but IMHO I shouldn't need to do this because the channel name attributes are in the waveform.
04-24-2009 09:10 AM
04-24-2009 09:20 AM
Plese post the code that reads the file. The issue may be at the other end (assuming you are changing the name after the first run).
Just trying to help,
Ben
04-24-2009 09:24 AM
knicewar,
You should create an array of Channel Names (strings) and wire that into the Channel Names input of the TDMS write.
04-24-2009 10:01 AM
Yes, like I said, I found this work-around. But why do I have to use it? The waveform has all the information it needs to assign names to channels, and from the docs it says that if I don't wire the names input to the TDMS Write VI, it will use the waveform attributes.
As for the other questions, I'm using the digital waveform acquire VI which returns an array of waveforms but for whatever reason, it only returns an array of one waveform. This waveform has multiple channels (although internally I'm sure it uses a single integer to represent all channels). Perhaps this is what is confusing the TDMS Write. With the AI acquire function, I get a single waveform per channel. So perhaps it's thinking there is only one channel to name. But it obviously can tell there is more than one channel because the TDMS viewer (built-in -- I didn't write it) shows the separate channels.
04-24-2009 10:29 AM
How are you entering the names? Here is text straight from the LabVIEW Help
name to assign specifies a name to assign to the virtual
channel this VI creates. If you do not wire a value to this input, NI-DAQmx uses
the physical channel name as the virtual channel name. If you use this input to
provide your own names for the virtual channels, you must use the names when you
refer to these channels in other NI-DAQmx VIs and Property Nodes, such as the
source input of the DAQmx Trigger
VI.
If you create multiple virtual channels with one DAQmx Create
Virtual Channel VI, you can specify a comma-separated list of names to assign to
the virtual channels. If you provide fewer names than the number of virtual
channels you create, NI-DAQmx automatically
assigns names to the virtual channels.
Are you entering multiple names seperated by a comma?
04-24-2009 05:44 PM