04-17-2018 03:39 AM
I did a try in Labview 2017 and there is a standrd program structure as below:
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.
04-17-2018 04:30 AM
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!
04-17-2018 05:03 AM - edited 04-17-2018 05:04 AM
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
04-17-2018 05:19 AM
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.
04-17-2018 06:05 AM - edited 04-17-2018 06:06 AM
Just some comments:
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:
04-17-2018 06:43 AM
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?
04-17-2018 06:58 AM
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...
04-17-2018 07:06 AM
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.
04-17-2018 07:19 AM
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.