DeltaV Reporter > Worksheet function reference for DeltaV Reporter

Raw Data function (DvCHRaw)

This worksheet function can be used to retrieve available samples for a single tag within a specified time period. The function must be entered as an array formula in a range that has the appropriate number of rows and columns. You can use the Configure Raw Data Function dialog in DeltaV Reporter to set up a call to this function.

Syntax

DvCHRaw(connection, tag, show_header, columns, time_mode, period_start, period_end, start_boundary, end_boundary, max_num_values)

Example Array Formula

=DvCHRaw("localhost","DeltaV=MAIN_WORKSTATION CHS250_1S/SGGN1/OUT.CV",TRUE,"Value;Timestamp,Local;Parameter Status,IsGood;Collection Status,Text","GMT","10/11/08 3:02:05 PM","10/12/08 3:02:05 PM",1,1,50)

Function Arguments

connection
The node name of the DeltaV Continuous Historian server.
tag

The DeltaV tag for which you want to retrieve data. The tag can be text, such as FIC101.PV, or a cell reference. In the case of a cell reference (such as $A$1), the contents of the referenced cell must contain a valid tag.

show_header

A Boolean (TRUE or FALSE) that indicates whether or not you want the returned data to have a column header row.

columns
A string that defines the columns to be included in the worksheet. Column definitions are separated by semicolons. Each column definition comprises the column name and, optionally, various attributes relating to that specific column. Column attributes are separated by commas. The following columns and attributes are supported:
  • Column name: Timestamp
    • Mode attribute: Local, GMT, or GMT ±hh:mm

  • Column name: Value
    • For Int32, UInt32, and Float data types, the value stored by Excel is a Variant Double.

    • For strings, the value stored by Excel is a Variant String.

    • For enumerations, the value stored by Excel is the state name in a Variant String.

  • Column name: Parameter Status (that is, FfStatus)
    • Mode attribute. Valid modes are:
      • Text – which yields a descriptive string, such as GoodNonCascade NonSpecific NotLimited

      • IsGood – which yields a Boolean: TRUE if the parameter status is good, or FALSE if it is not good (that is, bad or uncertain)

      • Number – which yields the raw value as an integer

  • Column name: Collection Status (that is, DvCHStatus)
    • Mode attribute. Valid modes are:
      • Text – which yields a descriptive string

      • IsGood – which yields a Boolean: TRUE if the collection status is good (that is, 0) or FALSE if it is not good (not zero)

      • Number – which yields the raw value as an integer

time_mode
Indicates how the time stamp argument should be interpreted. The DeltaV Continuous Historian database records all times in GMT; the time_mode argument specifies what conversion, if any, should be applied to the supplied time stamp in order to convert to GMT.
  • Local – the time stamp is treated as being in the time zone of the client PC. Conversion to GMT takes into consideration whether the time stamp falls within daylight saving time.

  • GMT – no conversion is necessary

  • GMT ±hh:mm – the time is adjusted by the specified hh:mm; daylight saving time has no effect.

period_start

The time stamp of the start of the period. Specify period_start as text or a cell reference.

period_end

The time stamp of the end of the period. Specify period_end as text or a cell reference.

Note

If period_start is a later time than period_end, samples are retrieved in reverse chronological order from the (later) start time toward the (earlier) end time.

If you specify the period_start or period_end argument as a cell reference, the cell must contain a valid date and time in standard Excel format, not exceeding millisecond precision—for example, "10/12/2008 21:06:40.676".

start_boundary
Defines how the start boundary is handled:
  • If 0 (inside), the first sample returned is the first sample after (or at exactly the same time as) the period_start.

  • If 1 (outside), the first sample returned is the first sample before (or at exactly the same time as) the period_start.

  • If 2 (interpolated), an interpolated sample is created for the period_start time.

end_boundary
Defines how the end boundary is handled:
  • If 0 (inside), the last sample returned is the first sample before (or at exactly the same time as) the period_end.

  • If 1 (outside), the last sample returned is the first sample after (or at exactly the same time as) the period_end.

  • If 2 (interpolated), an interpolated sample is created for the period_end time.

max_num_values

The maximum number of values you wish to retrieve. Any samples in the database within the time period in excess of this number are not retrieved. If max_num_values is set to –1, all samples within the time period are retrieved.