CSV Data Driver Addressing

The I/O tag’s History Address must be used when reading from the CSV Data Driver. Data is imported from a comma-separated file and the time of import is not used as the data timestamp

The addressing system to use in your I/O tags relates directly to the format of your CSV file. Three formats are supported. Formats 1 & 2 are flexible, and can be adapted to nearly any purpose. Format 3 follows the California Metering Exchange Protocol standard and files must adhere to that standard.

All files to be read by one CSV Data driver must have the same format. The format is specified within the driver. (CSV Data Driver)

For formats 1 & 2, a Date column is mandatory. A time value is optional but if provided, may be included as part of the date stamp, or as a separate column.

A Unique Key column is optional in format 1 but if provided, can be used to import similar data to multiple tags. For example, if the file has a single column for Temperature and no Unique Key column, then any (and every) tag watching for temperature values from this driver will be given the value from each row. If there is a Unique Key column, then only the tag watching for a temperature value from a specific site matching the Key will be given the value from that row. (Here, "Unique Key" refers to a site or other identifier within the data, not to any VTScada tag's Unique ID value.) The Unique Key is not case-sensitive.

If a comma-separated file does not have a Unique Key column, all data in a file column will be imported to any IO tags configured to that file’s column or parameter name.

You are able to configure the format used for Time and Date within the driver tag (CSV Data Driver: Date/Time Mappings tab).

Format 1

Columns may be in any order, but it is typical to begin with either Date or Unique Key. Use the tag addressing to identify which column contains which parameter. ("Req'd" -> "Required", "Opt." -> "Optional", "Recm'd" -> "Recommended")

Each parameter type is in a separate column. (Temperature, Pressure, etc.)

DDate (Req'd), Time (Opt.), Unique Key (Opt.), Parameter 1 value, etc ...
DDate (Req'd), Time (Opt.), Unique Key (Opt.), Parameter 1 value, etc ...

Format 2

Columns may be in any order, but it is typical to begin with either Date or Unique Key. The Unique Key is recommended.

DDate (Req'd), Time (Opt.), Unique Key (Recm'd), Parm Name, Parm Value
DDate (Req'd), Time (Opt.), Unique Key (Recm'd), Parm Name, Parm Value

Format 3

Refer to the California Metering Exchange Protocol standard. An example is provided here:

MEPMD01,20080501,SENSUS,TRAL:134000,91258124,B85460925,202007311236,1,OK,W,F,1.0,,1,202007310600,R0,78

 

Format 1 Tag Addressing

The acceptable IO tag addressing formats can be one of the following:

UNIQUE KEY::DATA COLUMN
::DATA COLUMN
DATA COLUMN

If “::DataColumn” or “DataColumn” is used as the addressing format, ensure the CSV Data Driver is configured not to use a Unique Key in the CSV data File.

Example: Given a Unique Key of 01-31-026-19W3...

01-31-026-19W3::12

Data is being read from the 12th column (where the first column in the CSV file is 0).

Format 2 Tag Addressing

The acceptable IO tag addressing formats can be one of the following:

UNIQUE KEY::DATA COLUMN{Parameter}
::DATA COLUMN{Parameter}

Example: Given a Unique Key of 88599886...

88599886::3{Pressure}
88599886::3{Temperature}

The column in the CSV file containing the data for each parameter is column 3 (where the first column in the CSV file is 0).

Format 3 Tag Addressing (CMEP MEPMD01)

The CSV driver can follow MEPMD01 but does not implement the entire protocol. Refer to the Pacific Gas & Electric website for detailed information about the protocol.

The acceptable IO tag addressing formats can be the following:

Receiver ID::Meter ID

For Example:

94563136::2

The Receiver ID in this example is 94563136 and the Meter ID is 2.