Logging Historical Data to the Citadel Database
- Updated2025-11-07
- 4 minute(s) read
Logging Historical Data to the Citadel Database
The Citadel historical database is a database that the LabVIEW Datalogging and Supervisory Control (DSC) Module and other products use.
Data processed by the SVE is contained in memory; LabVIEW does not create a file to hold the data. When you run an application configured to log data, LabVIEW logs data from the SVE to the Citadel historical database. You cannot log data when the SVE is stopped.
The Citadel historical database includes an ODBC driver, which enables other applications to directly retrieve data from a Citadel database using SQL queries. The Citadel 5 ODBC driver is compliant with SQL 92 and ODBC 2.5 standards. All clients that follow these standards can retrieve data from a Citadel 5 database. ADO clients can use the ODBC driver through the Microsoft OLE DB Provider for ODBC Drivers to access the Citadel 5 database. MS Query wizard can be used to build-up queries. The Citadel database runs on Windows as a service.
The data you log to a Citadel database resides in a set of files in the target directory you set for logging. This data can include shared variable values from the application as well as alarms and events. You determine the data that is logged to a specific location when you configure shared variables and alarm and event logging for shared variables. Shared variable data that logs to the Citadel database is called a trace. A trace contains the data type, data values, timestamps, and qualities of the shared variable. Each shared variable logs to an independent trace. You also can log data in sets.
You can access Citadel data through the Historical Data Viewer, Historical VIs, SQL queries, or any other ODBC-compliant application such as Microsoft Query, Microsoft Access, or Microsoft Excel.
Specifying an Appropriate Database Location
To ensure that data logging to the Citadel database is successful, you must specify an appropriate database location to which the DSC Module has full access.
By default, the DSC Module configures appropriate access rights for the labview\data folder and stores the database in that folder. If you want to store the database in a different folder, ensure that the folder meets the following requirements:
- The database folder is readable by all members of the USERS group. The Citadel database is a shared resource and must be available to all users of the system. Alarm logging fails if the database folder is not readable to all users.
- The database folder is writable by the user who wants to log data.
- The database folder is readable and writable by the SYSTEM user. The Citadel service runs as a SYSTEM user and must have sufficient access rights to manage the database files.
- The database folder is writable by the NETWORK SERVICE user. By default, the folders under the C:\Users directory and the top-level folders that the NETWORK SERVICE user creates are writable by that user.
If you do not store the database in the labview\data folder, the manufacturer recommends that you place the database under the Windows Public user directory, located at C:\Users\Public. This folder always meets the requirements above. Do not use the following folders to store the database:
- C:\Windows—The system has highly restricted access to this folder.
- C:\Users\Username—This folder is visible only to the owning user, so the system has restricted access to this folder.