From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DSC

Hello,
 
I'm using the DSC module and the Citadel database to create a data log for a period of time. To log the data I use "shared variable" enabling log in options and etc.
However when I have a power problem and the computer turns off suddenly, I lose all data since the last time I turned on the computer and ran the program. If the computer is shut down properly the data is written to the database correctly.
 
How can I do to solve this "data loss"?

0 Kudos
Message 1 of 10
(3,258 Views)

If the data is held in memory and only written when a "Close" command is given, then one way to handle this is to periodically issue Close, issue (Re-)Open, process the existing data so you can "append" data, then continue.  Depending on your data rate and its periodicity, this may "always work", "sometimes work" or "never work".  Optimistic situations are where the sampling is very slow (say, 1/minute, so you have plenty of time between samples to do a Close/ReOpen cycle) or is episodic, say multiple "trials" that have high data rates, but have time between successive trials for the Close/ReOpen cycle.

 

Bob Schor

0 Kudos
Message 2 of 10
(3,250 Views)
And a ups is pretty cheap insurance against power outages.
0 Kudos
Message 3 of 10
(3,239 Views)

Hello, 

 

How can a I "Close"?

 

The first time the data stay in Citadel, but the second time the data is lost. I get a 1 sample per second. 

 

Thank you.

0 Kudos
Message 4 of 10
(3,233 Views)

I assume your code is simply writing to a variable that has logging enabled. What are the logging resolution and deadband settings for the variable?

 

If you open MAX and use the historical data viewer to view your trace, do you see it updating in real-time while your program runs?

 

I'll second the UPS option too. Data loss is frustrating, but complete database corruption can be much worse!




Certified LabVIEW Architect
Unless otherwise stated, all code snippets and examples provided
by me are "as is", and are free to use and modify without attribution.
0 Kudos
Message 5 of 10
(3,209 Views)

Hello, 

 

I'm using shared variable to log data. I configured the deadband to 0.1%. I can see the variable value and the graphic using MAX.

 

If I turnoff the PC in rigth mode, the log data stay in database CItadel memory. But if the pc turn off sudenly the data is lost since the last time I turn on the PC.

 

I tried open and close the database, but don't work. I tried use simple write trace (open trace, write trace, close trase every second) but the same result.

 

I think it's critical problem to Citadel database. I can lost an hour of data for example, it's no problem, but lost data since the last time I turn on the PC is much.

 

I will use UPS, but if occurs any problems with the PC I will lost all my data? 

0 Kudos
Message 6 of 10
(3,141 Views)

Your problems all seem to be related to your comp crashing.

 

If you don't want to program in a way that saves data more frequently, why not just get a computer that's more stable?

0 Kudos
Message 7 of 10
(3,128 Views)

Hello natasftw

 

How can I save data more frequently using DSC module? 

0 Kudos
Message 8 of 10
(3,102 Views)

When you close the program correctly, the Citadel database is saved as you'd desire correct?

 

If that's the only way your database will update, just write a VI that closes out periodically with another set to open it.  It's not a DSC issue

0 Kudos
Message 9 of 10
(3,092 Views)

Hello natasftw

 

This is the problem. If I close my program correctly and if before 1 hours my PC turn off suddenly I lost all data since last PC start up. How can I save the CItadel data?

0 Kudos
Message 10 of 10
(3,068 Views)