Configuring Import: Configuration CSV Commands
Use the Import File: Configuration CSV command to import comma-separated values (.csv) files containing configuration data, for gas or liquid data types, into your CygNet Measurement system. The imported configuration data can be applied to the Node record for a specified date/time or for a date/time range. Prior to executing the import command, you can optionally configure and edit the corresponding configuration data .csv file, gas or liquid, to prepare it for successful importation into FMS. The file to use for the import is defined by the value of the Import file directory parameter.
CygNet Measurement provides sample CSV files, for gas (SampleConfigGasImport.csv) or liquid (SampleConfigLiquidImport.csv) configuration data, that you can adjust and use to create CSV files for new imports. The sample .csv files are located in the CygNet\Services\FMS\ImportSamples folder on your host server.
In addition, you can optionally define details about how items in your configuration .csv file are imported into FMS, and how they will appear in the imported file. To do this, column and data source settings can be customized using an import definition file (.idf) if desired. Samples of these files, for gas (CxFmsImportCsvConfigGas.idf) or liquid (CxFmsImportCsvConfigLiquid.idf) configuration data, are also provided by CygNet Measurement. The sample .idf files are located in the CygNet\Services\FMS\ImportSamples folder on your host server. See Using an Import Definition File for more information about this option.
See FMS Commands and Import: Configuration CSV for more information about this command.
See Scheduling FMS Command Tasks in the MSS for more information about scheduling commands.
See FMS ActiveX Controls and CxHmiFms for more information about using commands via FMS ActiveX controls on CygNet Studio or CygNet Vision screens.
See CxFms for more information about scripting commands.
Preparing the CSV Import File
Include the appropriate column(s) to apply imported configuration records to a specified date/time or to a date/time range, as follows.
- To apply imported records for a specified date/time, use only the ConfigDateTime column.
- To apply imported records for a date/time range, use both the ConfigDateTime and the EndDateTime columns.
Note: When a date/time range is defined, the import creates a new configuration record only when it finds that configuration data item values have changed.
Imported configuration data is applied in the following manner, depending on the date/time(s) defined in the .csv file and the records present in the device.
- If a specific date/time is defined, the new configuration record is created at the specified date/time.
- If a date/time range is defined, and no configuration records exist within the specified range, the new configuration record (equal to the most recent configuration record) is created at the beginning of the specified range.
- If a date/time range is defined, and configuration records already exist within the specified range, all configuration records within the specified range will be updated.
- If a date/time range is defined, and a configuration record exists that is more recent than the specified range, the new configuration record is created at the end of the specified range.
Customizing the CSV Import File
You can also use an import definition file (.idf) to define details about how the items in your configuration .csv file are imported into FMS and how they will appear in the file. To do this, customize the column and data source settings using an .idf. See Using an Import Definition File for more information.
Command Definition Properties
The following command definition properties apply to Configuration CSV File Import commands.
| Property | Description |
|---|---|
|
Command type |
For system commands, this property will be read-only and will display the selected command type. See FMS Commands for more information about command types. |
|
Priority |
Select a processing queue Priority for the command from the drop-down menu. Options from least to greatest priority are as follows.
Default value is Low level processing queue priority. |
|
Logging |
Select a Logging level for the command results from the drop-down menu. Options are as follows.
Default value is Low level logging when scheduling a command in the MSS. Default value is High level logging when creating or running an ad-hoc command in FMS Explorer. |
Command Parameters
The following command parameters apply to Import: Configuration CSV commands, when creating or editing commands in FMS. See Configuration Import CSV Files for more information about setting up your configuration .csv file for import.
| Parameter | Value |
|---|---|
|
Enter the directory location from which to import the file. Type in the value or click ... to access the Browse for Folder dialog box, and browse to the directory location. Note: The directory specified is relative to the computer hosting the FMS. This parameter is required. |
|
|
Import file mask |
If specified, only files meeting the file mask will be considered for import. Type the file mask name. Default file mask value is "*" (multiple character wildcard). This parameter is optional. |
|
Processed files retention (days) |
If specified, the files that have been processed will be deleted after the specified number of days. If not specified, processed files will never be deleted. Type the number of days. This parameter is optional. |
|
Unit set |
If specified, select a unit set in which to view the data. Options appear in the drop-down menu, which is populated by the unit sets defined in the service. See Configuring Unit Set Definitions for more information. This parameter is optional. Notes: If you do not specify the unit set with this parameter, units for each included value must be specified using an .idf file. If you specify the unit set with this parameter AND in the .idf file, the value specified in the .idf file prevails, and overrides this setting. In this way, you may override individual unit values by setting them in the .idf file. |
|
Recalculate affected history records |
Select whether or not to recalculate history records affected by the configuration value change. Options are as follows.
If set to Yes, the system will automatically recalculate energy, volume and/or mass values for any historical records affected by the configuration change. If set to No, the system will not recalculate any historical records, but configuration value changes will be saved. If set to Energy only, the system will automatically recalculate energy values only, for any historical records affected by the configuration change, while preserving previous history edits. If no historical records are affected, this parameter will be ignored. This parameter is required. |
|
If specified, all devices with imported data will be added to the group. Type the name of the group to which the imported devices will be added. Note: Nodes added to this group are added for the entire span of the Node or group (whichever is less). Example In the case of a gas quality import, you could execute a Send Gas Quality command to send GQ data from all imported files to the devices. This parameter is optional. |
|
|
Clear existing group entries |
If specified, options are Yes or No. If set to Yes, and a value has been specified for Add devices to group, any existing entries will be removed from the specified group before executing the command. If set to No, the existing group entries will be retained when executing the command. Note: Nodes cleared from this group are cleared for the entire span of the Node or group. This parameter is optional. |
|
Comments |
If specified, the comments will be part of the audit record for the file import. Type comments regarding the import. This parameter is optional. |
Configuration Import CSV Files
Note: Prior to importing a configuration .csv file, the following conditions must be met for each Node for which you are importing data.
-
The device Node must exist in your FMS system. See Using the Nodes Menu for more information about creating FMS Nodes.
Use the following procedure to prepare a configuration import .csv file for import into FMS. Sample .csv files are provided for your use in the CygNet\Services\FMS\ImportSamples folder on your host server.
To Configure and Edit a Configuration Import CSV File
Once generated, you can edit the configuration import .csv file as follows, prior to importing it into FMS.
- Open a .csv file for your configuration import.
- Insert required (as noted) columns into your file, using your .csv editor. All required configuration import .csv columns are noted in the table below.
- Insert additional columns into your file, as desired. All available configuration import .csv columns are described or referenced in the tables below.
- Edit any configuration items desired (e.g. description, etc.) at this time, in preparation for importing the file to FMS.
- Save and Close the .csv file when you are done.
Configuration Import CSV Columns
Required Configuration Import CSV Columns
The following table lists the columns for which values must exist in the configuration import .csv file (as noted in each description) in order for the FMS import to succeed.
| Column | Description |
|---|---|
| Device | The device name This column is required. |
| ConfigDateTime | The date/time for which to import and update the configuration record
Note: When EndDateTime is also defined, this value functions as the beginning date/time of a date range for which to update all records found. This column is required. |
| eFMS_CFG_CALC_METHOD_PRIMARY | The primary calculation method Options are as follows.
This column is required. Note: If you already have this configuration value imported, this field may not be required. |
| eFMS_CFG_METER_TYPE | The device type Options are as follows.
This column is required. Note: If you already have this configuration value imported, this field may not be required. |
| [as specified in an .idf] | In the import definition file (.idf), additional columns may be identified as required="true" in order to perform the import. See Using an Import Definition File for more information. |
Additional Configuration Import CSV Columns
Additional column headers can optionally be included in the configuration import .csv file. Columns can be included for any supported FMS Configuration Data Items for which you have data in your system.
The following table lists options for column headers that may be contained in your .csv file. The list is not complete; it is provided only for reference. See FMS Configuration Data Items for a complete list of configuration items which could also appear as column headers in your configuration import .csv file.
| Column | Description |
|---|---|
| EndDateTime | The ending date/time of a date range. Any records that exist within the defined date range will be updated with the new configuration data.
Note: When specified, this value functions in conjunction with ConfigDateTime to define a date range for which to update all records found. |
| eFMS_CFG_CALC_METHOD_FPV | Compressibility Calc Method Options are as follows.
|
| eFMS_CFG_CALC_METHOD_DISCHARGE_COEFFICIENT | Discharge Coefficient Calc Method Options are as follows.
|
| eFMS_CFG_CALC_METHOD_GAS_EXPANSION_FACTOR | Gas Expansion Factor Method Options are as follows.
|
| eFMS_CFG_METER_TUBE_MATERIAL | Meter Tube Material Options are as follows.
Note: This field is "Unspecified" for devices that do not return a material type value. In these cases, a (non-zero) thermal expansion coefficient value (eFMS_CFG_PIPE_COEFFICIENT_THERMAL_EXPANSION) is required for calculation to succeed. |
| eFMS_CFG_ORIFICE_PLATE_MATERIAL* | Orifice Plate Material* Options are as follows.
Note: This field is "Unspecified" for devices that do not return a material type value. In these cases, a (non-zero) thermal expansion coefficient value (eFMS_CFG_ORIFICE_COEFFICIENT_THERMAL_EXPANSION) is required for calculation to succeed. |
| eFMS_CFG_CONE_MATERIAL | Cone Material Options are as follows.
Note: This field is "Unspecified" for devices that do not return a material type value. In these cases, a (non-zero) thermal expansion coefficient value (eFMS_CFG_CONE_COEFFICIENT_THERMAL_EXPANSION) is required for calculation to succeed. |
| eFMS_CFG_DP_TAPS_TYPE* | DP Taps Type* Options are as follows.
|
| eFMS_CFG_SP_TAP_LOCATION | SP Tap Location Options are as follows.
|
| eFMS_CFG_SP_SENSOR_TYPE | SP Sensor Type Options are as follows.
|
| eFMS_CFG_INTEGRAL_VALUE_VARIABLES | Variables included in IV Options are as follows.
|
| eFMS_CFG_HEATING_VALUE_BASIS | Heating Value Basis Options are as follows.
|
| eFMS_CFG_FLUID_TYPE | Fluid Type Options are as follows.
|
| eFMS_CFG_USE_LIVE_TEMP | Use Live Temperature Options are as follows.
|
| eFMS_CFG_AGA3_EXPANDED_RANGE | AGA 3 Expanded Range Options are as follows.
|
| eFMS_CFG_AGA8_EXPANDED_RANGE | AGA 8 Expanded Range Options are as follows.
See AGA 8 Data Ranges for more information. |
| eFMS_CFG_CUSTOM1 | 10 Custom configuration items are available to be mapped to supported items as desired.
See FMS Configuration Data Items for a complete list of all supported configuration items. See Configuring Custom Device Data for more information about the configuration process. |
| eFMS_CFG_CUSTOM2 | |
| eFMS_CFG_CUSTOM3 | |
| eFMS_CFG_CUSTOM4 | |
| eFMS_CFG_CUSTOM5 | |
| eFMS_CFG_CUSTOM6 | |
| eFMS_CFG_CUSTOM7 | |
| eFMS_CFG_CUSTOM8 | |
| eFMS_CFG_CUSTOM9 | |
| eFMS_CFG_CUSTOM10 |
*Orifice
**Turbine


