1. Start by creating your database using LabVIEW, through the Create Database VI, or with NI MAX.
- When using LabVIEW, you can place the Create Database VI to generate a new database as shown in the image below.
- When using NI MAX to create a new database, you can complete the following steps:
1. Right-click on Historical Data and select Create New.
2. Select the type of database to create (Citadel 5 Database) from the Create New Wizard and click on Next.
3. Follow the instructions to create the database. Provide its location, path, and name. Once you are done, click on Finish.
2. Log the required data to your recently created database. There are several methods that you can use to achieve this task. Please refer to the following article that explains how you can
log data to a Citadel database.
3. Use the following LabVIEW snippet to programmatically determine the size of your database in Windows.
Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram
As you can see, the above LabVIEW code utilizes the System Exec VI to execute the dir command in the Windows Command Prompt. When being run over a folder, the command will list the total number of files, their cumulative size, and the free space (in bytes) remaining on the disk.