Example
- 16 Dec 2021
- 1 Minute to read
- Print
- PDF
Example
- Updated on 16 Dec 2021
- 1 Minute to read
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Importing a CSV file using DataImporter
The following example demonstrates how the DataImporter module can be used to import data from a CSV file.
- Step 1: Add a new module in the “Modules” section, choose a name, and select “DataImporter” as the “Module type”.
Figure 8: Creating new module instances
- Step 2: Configure the Logger and API settings for the DataImporter module. In this example, the default configuration is left unedited since, in most cases, this is a valid configuration.
- Step 3: Add a new Agent in the “Model” section and choose a name for it.
Figure 9: Creating a new Agent
- Step 4: Configure the Agent (Enabled, Scan rate, Path, Parser, etc.) and save the changes. In this example, data will be imported from a CSV file located in the folder for this DataImporter instance (C:\Program Files (x86)\N3uron\data\DataImporter\input).
Figure 10: Agent parameters
- Step 5: Add a new Tag in the Model section and choose a name for it.
Figure 11: Creating a new Tag
- Step 6: Configure the Tag (Filename, Period, Mode, Input Tag Group, etc.). In this example, the “CURRENT” tag will be imported from a CSV file containing the dataset for an electrical meter.
Figure 12: Tag parameters
- Step 7: Place the CSV file for importing within the input folder for this DataImporter instance.
Figure 13: CSV file import
In this example, the following files have been used:
:Tag,min,max,first,last,avg,count,good
ANGLE_PHASE,333.30,333.81,333.37,333.30,333.52,9,1.00
CURRENT,4.15,4.24,4.16,4.16,4.19,10,1.00
ENERGY_ACTIVE_IMPORTED,8584.83,8584.84,8584.83,8584.84,8584.84,2,1.00
ENERGY_ACTIVE_EXPORTED,0,0,0,0,0,1,1.00
FREQUENCY,50,50.05,50.05,50,50.00,2,1.00
POWER_ACTIVE,729.36,746.19,729.38,730.33,734.67,13,1.00
POWER_ACTIVE_MAX,4872.16,4872.16,4872.16,4872.16,4872.16,1,1.00
POWER_APPARENT,815.94,832.45,815.94,817.36,821.09,13,1.00
POWER_FACTOR,0.90,0.90,0.90,0.90,0.90,1,1.00
POWER_REACTIVE,-368.99,-365.57,-365.72,-366.97,-366.64,13,1.00
VOLTAGE,231.45,232.26,231.83,232.05,231.83,13,1.00
Result:
Figure 14: Loaded CSV file
Figure 15: Current Tag
Was this article helpful?