LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS file logging - in case of power off

Hi guys!

 

Here's the deal: I'm using a cRIO 9023 controller, a 9101 chassis with a 9213 module, to read thermocouple values.

 

I'm logging data for all 16 channels in a TDMS file format, on the controller.

I'v built an application which runs once I start up my controller.

 

So the application starts running, reading the temperature data and logging it on the controller (it has 2 GB nonvolatile storage) in TDMS file format.

 

The problem: I don't know when I'm going to power off the controller, which means that the last steps in my code (including the 'TDMS close') won't run, so I will be unable to read my TDMS file later.

 

Any solutions for this problem wopuld be appreciated.

 

Thanks!


Levi

0 Kudos
Message 1 of 4
(2,596 Views)

There already exists some discussions http://forums.ni.com/t5/LabVIEW/TDMS-file-backup/m-p/2572881#M775637 on the forum, which might be useful to you.

0 Kudos
Message 2 of 4
(2,574 Views)

Thank you for the reply!

0 Kudos
Message 3 of 4
(2,564 Views)

We use UPSs on test systems that have this type of requirement running long term unattended.  Many UPSs have a serial port and you can just ping it once in a while and ask if it is on battery.  If it is then close the file and shutdown (this is on Windows) but a similar technique could be used on cRIO.

 

We also periodically flush the file, and defrag the file as testing goes on.  This helps keep file size down, and ensure data is being written to disk periodically.

Message 4 of 4
(2,548 Views)