08-14-2015 08:40 AM
Hi
Wonder if anyone could advise an easier, cleaner solution or I may end up making big mess on my block diagram!
I use DaqmxConfigureLogging.vi to write data into .tdms file and this is all working. Unfortunately, this vi sets the channel names to physical names such as Dev1/ai0 in both root and group sheet of tdms file.
I would like to read individual fields where these are being written and replace them with channel names. The location of these channel names is fixed on the tdms file. However i noticed using file i/o functions such as open/close/set file position could not work as those files do not seem to recognize .tdms file. And there aren't any tdms functions to set positions to desired fields on root/channel sheets of tdms file and read the desired fields as string data!
Any suggestions? I may be missing something fairly simple!
Solved! Go to Solution.
08-14-2015 09:01 AM
Are these properties? Just use the TDMS Set Properties setting the name to the same one you want to replace.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
08-14-2015 09:24 AM - edited 08-14-2015 09:25 AM
k-waris wrote: Unfortunately, this vi sets the channel names to physical names such as Dev1/ai0 in both root and group sheet of tdms file.
Actually, it uses whatever names you give the channels and groups. If you do not set the names, then the defaults are used. So just name your channels and groups.
08-14-2015 10:00 AM
'Actually, it uses whatever names you give the channels and groups'
I am using Dev1/ai0:15 to log all 16 channels. So unfortunately using 'name to assign' input will not do the job in my case!
08-14-2015 10:27 AM
@k-waris wrote:
'Actually, it uses whatever names you give the channels and groups'
I am using Dev1/ai0:15 to log all 16 channels. So unfortunately using 'name to assign' input will not do the job in my case!
Sure it will. Use a FOR loop with the Create DAQmx Channel to create each channel and give them a name.
08-16-2015 11:54 PM
If you want to update the channel name in the TDMS file, maybe you can try to use "TDMS Set Properties" to set the "name" property. Just wire the correct names for the group and channel, and wire a string "name" to the property name, and wire a string with the new name to the "property value".
08-17-2015 05:55 AM - edited 08-17-2015 05:56 AM
@crossrulz wrote:
@k-waris wrote:
'Actually, it uses whatever names you give the channels and groups'
I am using Dev1/ai0:15 to log all 16 channels. So unfortunately using 'name to assign' input will not do the job in my case!
Sure it will. Use a FOR loop with the Create DAQmx Channel to create each channel and give them a name.
Just to clarify what I meant here...
08-17-2015 07:04 AM
Thank you. That's worked
I did everything but not used 'Daqmx Create Task' vi and was going in very wrong direction by adding more properties using Set Properties vi!!! You have shown me a very elegant and clean solution. Thank you.