How Can I Optimize Memory Usage With LabVIEW DSC?

Updated Apr 27, 2018

Reported In

Software

  • LabVIEW
  • LabVIEW Datalogging and Supervisory Control Module

Issue Details

I am using LabVIEW DSC for a very large application. I need to save and store data in efficient mode, without increase the memory. Because I do not want to increase the database memory. How can I do it?

Solution

To log data there are two ways:
  •  Shared Variables
Configure Shared Variable properties to log data
Configure in dialog or dynamically
Log Alarms and Events
  •  Historical VIs in LabVIEW
DSC Module» Historical» Database Writing
Database VIs are more efficient than Shared Variable Engine

Shared Variables

To log data, you first must enable logging for the shared variables whose data you want to log. You can enable logging for shared variables in the Shared Variable Properties dialog box or in the Multiple Variable Editor window.
  • Value Resolution—Sets the resolution, in engineering units, for logging the shared variable value in the Citadel historical database.LabVIEW writes shared variables to the Citadel historical database in compressed format with the specified resolution.The default value is 0.01
  • Value Deadband—Sets the deadband percentage for logging shared variables in the Citadel historical database. LabVIEW logs a new shared variable value only if the difference between the new value and the previous logged value is greater than or equal to the deadband percentage of the engineering scale range.

 

Historical VIs in LabVIEW​

In addition to logging data using shared variables, you can manually log data to Citadel using the Database Writing VIs. You can use these VIs to add data with a specific timestamp. This type of operation is useful when using OPC servers that maintain relatively constant values. OPC servers send data only when the value changes. Therefore, you can update the value timestamps by writing periodically to the database using the VIs shown above.

Because the Shared Variable Engine has to make determinations about which data to log, and when, writing directly to Citadel is more efficient. Data is written directly to the Citadel Service, not routed through the SVE.
 

Example

Refer to the Database Direct Write Demo.lvproj in the labview\examples\lvdsc\Data and Alarm Historical Logging\Database Direct Write Demo directory for an example of using the Write Trace VI.

Additional Information

The DSC Module logs data in the following manner
  • Data is written to the Shared Variable Engine (SVE)
  • The SVE sends data to the Citadel database
  • Citadel determines the location in which to store the data

WAS THIS ARTICLE HELPFUL?

Not Helpful