LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File save issue

Hello Folk,

 

I have been facing an unexpected issue with file save in RT. I acquire data at rate of 1ms and write it down in TDMS file. 

The issue is during writing if RT power goes down the syste does not save data. I do not have any issue with coding it works fine till RT is powered On. 

 

For an example, Lets say I planned to acquire data for 50 seconds however before this 50 seconds if RT goes down that leads to file with no data. Now if RT runs for this 50 seconds then it is capable of saving data. 

 

what issue could be with this ?

 

your help will be truly appreciated. 

CLAD
Passionate for LabVIEW
0 Kudos
Message 1 of 12
(2,754 Views)

Be sure to be saving data while acquiring, and not only at the end of acquisition.

You can try reducing the TDMS buffer size: http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/setting_tdms_buffersize/

 

The best would be to give a look to your code to understand what's happening.

 

Regards,

Marco

0 Kudos
Message 2 of 12
(2,735 Views)

@MarcoMauri wrote:

Be sure to be saving data while acquiring, and not only at the end of acquisition.

You can try reducing the TDMS buffer size: http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/setting_tdms_buffersize/

 

The best would be to give a look to your code to understand what's happening.

 

Regards,

Marco


Do you mean to say I need to save file after each bunch I write into file?

Is there such option of saving file for TDMS?

CLAD
Passionate for LabVIEW
0 Kudos
Message 3 of 12
(2,727 Views)

I was trying to figure out if you were calling "TDMS write" vi only after the 50s of acquisition 🙂

 

You can give a try calling "TDMS Flush" from time to time to actually save data to disk....

 

Marco

0 Kudos
Message 4 of 12
(2,714 Views)

As was said, it would help a lot if you could show us some of your code that exhibits the issue you are seeing.  It could be a simple fix based on what your code looks like.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 12
(2,678 Views)

No I do not call TDMS write vi after 50 ms. I do call it every second.


@MarcoMauri wrote:

I was trying to figure out if you were calling "TDMS write" vi only after the 50s of acquisition 🙂

 

You can give a try calling "TDMS Flush" from time to time to actually save data to disk....

 

Marco


 

CLAD
Passionate for LabVIEW
0 Kudos
Message 6 of 12
(2,636 Views)

Hiii,

 

Please find part of code in image here.


@crossrulz wrote:

As was said, it would help a lot if you could show us some of your code that exhibits the issue you are seeing.  It could be a simple fix based on what your code looks like.


 

CLAD
Passionate for LabVIEW
0 Kudos
Message 7 of 12
(2,626 Views)

Did you try placing  "TDMS Flush"  just after the writing?

Does it make any difference?

Regards,

Marco

0 Kudos
Message 8 of 12
(2,619 Views)

Where is that File Ref coming from?  I don't see where you open the file.  Nor do I see where you are closing it.

 

It also concerns me that you are passing the reference to two different places.  I can't see what is happening in your subVI, but that is a potential issue.

 

You should be using the "Not a Number/Path/Refnum?" function to check to see if your file reference is valid.

 

Your loops run forever.  You should have a way to gracefully shut down your VIs instead of just cutting power.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 12
(2,614 Views)

Yes I tried but It dint make any difference. 


@MarcoMauri wrote:

Did you try placing  "TDMS Flush"  just after the writing?

Does it make any difference?

Regards,

Marco


 

CLAD
Passionate for LabVIEW
0 Kudos
Message 10 of 12
(2,585 Views)