LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS driver error doubt of version in 2017?

I did a try in Labview 2017 and there is a standrd program structure as below:

]00L{G3Y0WC6JDX_PQ@A4B8.png

In one loop, the above structure could work well in Labview2015, cause of the synchronized data acqusition and storage, but in the latest version of 2017, the "TDMS close" will be instabled to affact the normal loop work,  while you put your data path out of the C:, such as in D:\data\1.tdms ....

you will see the loop goes lower.  I do just doubt this is the version error between 2015-2017, but more possbile will be the errors in the "TDMS write" /"TDMS close"   themselves. Because "TDMS write" include  the buffer memory and feel hard to be released by "TDMS close". So, this trouble may be a big problem!  If anyone knows how it is sloved pls try your best to let me know, thanks a lot.

 

0 Kudos
Message 1 of 9
(2,925 Views)

It is a bit difficult to understand your English, but as I understand you have a problem with TDMS functions. I doubt there is any bug in LV2017, I extensively use TMDS operations since LabVIEW 2011, in every version, recently version 2017. Never had any problem, at least what you describe.

 

Could you detail what you mean about the following sentences, I just do not get them:

"the "TDMS close" will be instabled to affact the normal loop work,  while you put your data path out of the C:, such as in D:\data\1.tdms ....you will see the loop goes lower. "

What do you mean "the loop goes LOWER" ???

 

"Because "TDMS write" include  the buffer memory and feel hard to be released by "TDMS close". So, this trouble may be a big problem!"

 

Also difficult to understand this sentence. I am just guessing, you have a fast iteration loop, where you repeatedly open and close TDMS files? Do not do that if so! Always use a parallel "consumer" loop with a lossless Queue (or Channel) to save data to TDMS file. Also, do not repeatedly open/close a TDMS file in a loop if there is no reason to do so! Open the TDMS reference BEFORE the loop, and close the reference AFTER the loop...

 

I strongly suggest you to attach your VI which you talk about, so people can have a look, and suggest solutions/fixes!

 

0 Kudos
Message 2 of 9
(2,912 Views)

Greating thanks a lot to your respond, actually it is truely hard to discribe this issue. I agree with your answers with "do not repeatedly open/close a TDMS file in a loop if there is no reason to do so! Open the TDMS reference BEFORE the loop, and close the reference AFTER the loop..." , this is a standard struture when you are doing every program.

 

But, pls focus my key of "TCMS write can't release the buffering memory until the whole program exit".  That's meant "TCMS close" doesn't work sometimes - instable  (can't exit and release memory). I try to do more test and pls see my demo program in annex.   Actually TCMS could support the synchronous acqusition and storage (put all in one loop) as I did and worked program in version 2015.

 

    If not so,  what I want to do is  creating different TDMS data according the time stamp changed (such as 10s create one tdms file automatically), can you fix better idea? If any unclear we could discuss more in here, I really feel so so thanks to your respond and patience.


@Blokk
0 Kudos
Message 3 of 9
(2,855 Views)

Greating thanks to your respond,  I tried to reply but failed I see this cause of a forum issue.

 

I agree with your "do not repeatedly open/close a TDMS file in a loop if there is no reason to do so", this is a standard program structure, but as I know the TDMS could support the structure - put all " TDMS open+write+close" stay in one loop,  because I want to create TMDS data file according the different time stamp (such as 10s to create one file automatically). 

 

But so far,  I did success in V2015 but failed in 2017,  the "TCMS write" as I known it has own memory storage and could be released by "TDMS close", but in 2017 it seems doesn;t work.  Pls see my innex (Chinese version) and fix if any better idea. So thanks for your patience.

0 Kudos
Message 4 of 9
(2,889 Views)

Just some comments:

  1. Your timeout (20 msec) does not do anything, you just display random numbers? Why do you need this? An Event structure does not need to have a Timeout case, you could just delete it
  2. Your "Stop" button should have a dedicated Event case, and not being in the While loop only!
  3. You use the "Open or create" for the TDMS Open function along with a constant file path, is this what you want?

I do not see any obvious reason why this code fails after some runtime, but maybe you try to access a network drive which is slow? Or is this your whole project, or just some example you put together? I do not really see what is your goal actually with this VI...

 

Here is a snippet for those who are reading with smart phone:

 

TDMSx_BD.png

Message 5 of 9
(2,877 Views)

Greetings my friend, I got your fast respond and who's from overseas, thanks again.

 

This demo is only a verification, pls check if you really get nothing error while you going after longer times running? (try to forbid/open TDMSclose running compare and see the loop times or waveforms)

 

 In my system, the tcms.close is very instable, I doubt is it an issue caused by 32bit/64bit system?  and the way to achieve "auto 10s create a new TDMS file"  I guess  I will have to use two while loops together then, any better idea for this?

0 Kudos
Message 6 of 9
(2,872 Views)

In my system, the tcms.close is very instable

 

I still do not understand the problem. Anyway, you can have a look at the template "Producer consumer (Data)", to see how to decouple Data acquisition and data recording...

0 Kudos
Message 7 of 9
(2,867 Views)

I got the directly respond from this China tech support. They told me in one loop -   if you frequently  open/close function, it will delay the loop time.

So probably I will have to change the structure by using two loops to achieve my way.

OK, pretty thanks to your help, anymore issue or update pls lets discuss it again.

0 Kudos
Message 8 of 9
(2,862 Views)

85642559@qq.com wrote:

I got the directly respond from this China tech support. They told me in one loop -   if you frequently  open/close function, it will delay the loop time.

So probably I will have to change the structure by using two loops to achieve my way.

OK, pretty thanks to your help, anymore issue or update pls lets discuss it again.


This is what I told you. Use a producer/consumer pattern.

0 Kudos
Message 9 of 9
(2,859 Views)