LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS List Contents does not update contents

Solved!
Go to solution

Hi,

I want to create:

Group "0", "Channel1", "Channel2", "Channel3"...;

Group "10", "Channel1", "Channel2", "Channel3"...;

Group "20", "Channel1", "Channel2", "Channel3"....

for a TDMS file. When I use the attached VIs, it did not work properly. I do not know why? Any help will be appreciated.

Thanks,

Steve

Download All
0 Kudos
Message 1 of 11
(4,597 Views)

I can't open anything newer than 2014, so include a snippet of the TDMS VIs in your code or save for previous version for more help.

 

Make sure you are closing out your TDMS reference at the end because the data doesn't get written to file until that. You can also use the TDMS Flush VI to write the current buffer if you don't want to close yet.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 11
(4,592 Views)

Sorry I forgot to mention I am using LabVIEW 2015.

 

0 Kudos
Message 3 of 11
(4,586 Views)

When I created Group "0", it created "Channel1", "Channel2", "Channel3". That was fine. But when I changed to Group "10", it created "Channel3". Why?

Steve

0 Kudos
Message 4 of 11
(4,580 Views)

I don't see any problem.  The code is convoluted and could use simplifying (why are the locals and sequence needed?).  I ran the VI giving it Group 0, and it made a Group 0 with Channel 1, I ran it again with Group 10 and it made a Group 10 with Channel 1, then I ran again Group 0 and it made a Channel 2 under Group 0, because Channel 0 already existed.  What doesn't work?

 

Save (SubVI)_BD.png

Also if you just want to make groups and channels it can be simplified to make them at once.

 

EDIT: Nevermind I do see some oddness give me a sec to test.

 

0 Kudos
Message 5 of 11
(4,559 Views)

Okay this does look like it is a bug with the List Contents function which only behaves this way in 2015.  I back saved to 2014 and it works as expected.  Attached is a VI in 2014, that when ran in 2015 shows the bug.  Basically it looks like the list contents is returning some information from the incorrect group.  Also I think not wiring the Group to the List Contents returns the expected data, but there is more work involved because you then need to find how many Channels are in your Group, out of all channels in all groups.

0 Kudos
Message 6 of 11
(4,545 Views)

Because I need to use TDMS Detele Data function in LabVIEW 2015, I have to stick to LabVIEW 2015. Do you have any idea how to get around it for my application for the time being? By the way, have you reported the bug to National Instrument yet?

Thank you very much.

Steve

0 Kudos
Message 7 of 11
(4,525 Views)
Solution
Accepted by topic author Shijie

@Shijie wrote:

Do you have any idea how to get around it for my application for the time being? 


Yeah attached is an updated Save sub that should work I just tested it quickly.  It doesn't ask for just one group's channels, but all.  Then we iterate over all group channel pairs, looking for the right group, and the channels to have "Channel" in them.

 


@Shijie wrote:

By the way, have you reported the bug to National Instrument yet?


That's what these forums are for, I suspect there is an NI engineer trying to isolate the issue as we speak (or soon) they usually reply after getting a concrete answer on "This is a bug" or "No you dummy you did it wrong".  I'm pretty confident this is a bug, especially since it gets different results from 2014 or 2015.

Message 8 of 11
(4,511 Views)

Thank you very much.

Steve

0 Kudos
Message 9 of 11
(4,502 Views)

Hello all!

 

This issue has been filed as a CAR. You can track it with the following number: 549450. Thanks for identifying this issue for us!

 

Regards,

 

Kevin

Applications Engineer

National Instruments

www.ni.com/support

0 Kudos
Message 10 of 11
(4,356 Views)