ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DSC Module Library Settings: Save State Periodically

On the Project Library Properties dialog box, Category DSC Settings Process, there's a check box for 'Save State Periodically'.

Where is this state of the shared variables 'saved'?  Is it 'logged' in the Citadel Database/

 

Gretchen

0 Kudos
Message 1 of 6
(2,924 Views)

Hi Gretchen,

 

The save state VI is used to save the state of the Shared Variable Engine. Here is the link to the online help that explains this functionality http://zone.ni.com/reference/en-XX/help/371618H-01/lvdsc/dsc_settings_process_db/

 

You can also enable logging on the individual variables in the library which will automatically log the variable to the local citadel database. If you change the settings in the library settings you can point to an external citadel database as described below:

 

http://zone.ni.com/reference/en-XX/help/371618H-01/lvdsc/dsc_settings_db/

 

Hope this helps!

Patrick H | National Instruments | Software Engineer
0 Kudos
Message 2 of 6
(2,892 Views)

thanks for the response.

 

Yes, i know about turning logging on for variables, but the sv is not logged unless it changes.

so when my user goes to plot, he doesn't understand why there is no data for certain time periods ( -- I don't want to use 'maintain trending')

If I could 'force' DSC to log a data point every hour, even if the variable is still zero, that'd be great.

I was hoping that was the purpose of 'Save State Periodically'.

Gretchen

0 Kudos
Message 3 of 6
(2,877 Views)

Hi Gretchen,

 

The shared variable should be logged at what update rate you specify. The deadband percentage is used to avoid logging small changes of your data. If your update rate is every hour then the point should be logged regardless if it changes or not.

Patrick H | National Instruments | Software Engineer
0 Kudos
Message 4 of 6
(2,864 Views)

Patrick,

Where do I specify this 'update rate'?

Gretchen

0 Kudos
Message 5 of 6
(2,838 Views)

Hi Gretchen,

 

I actually made a mistake in my previous post and was thinking about the "Update Rate" option when you great an OPC I/O Server. For shared variables there is no option to log at a specific rate but the logging option should minimize the data as much as possible. If the data does not update because it did not exceed the dead band it will not log a new point. However, the database will allow you to query any point in time and if the value never changed around that time it is smart enough to give the correct value. If that is still not something that you would like to do you can also look into the DSC >> Historical >> Database Writing palette to get VIs that allow you to programmatically write the database. The timing of when that code executes would have to be controlled in your VI but you could simply write the data you read from the shared variable.

Patrick H | National Instruments | Software Engineer
0 Kudos
Message 6 of 6
(2,828 Views)