Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Measurement Advisor

Understanding the Input APIs associated with AVEVA Measurement Advisor

Understanding the Input APIs associated with AVEVA Measurement Advisor

  • Last UpdatedAug 05, 2025
  • 9 minute read

These stored procedures are used to input meter data into the EFM database.

There is a different stored procedure for each granularity. They are as follows:

  • For 15-minute data, use the writeReadingRawMi stored procedure to input data into the database.

  • For hourly data, use the writeReadingRawHy stored procedure to input data into the database.

  • For daily data, use the writeReadingRawDy stored procedure to input data into the database.

  • For monthly data, use the writeReadingRawMy stored procedure to input data into the database.

    Notes: Handling of irregular meter data is discussed in the section [dbo].[writeReadingRawIrr] stored procedure.
    Raw data also is copied into the rdm_ReadingAuditXX tables, where a copy of the unprocessed data will be kept for audit purposes. Any data that is incomplete or invalid will be moved to the rejected reading tables (sys_ReadingRejectedXX) for the user to evaluate. It is possible to view the already processed data in the Meter Summary from within the AVEVA Measurement Advisor client.

    Internal Field (Parameter) Name

    Field Req'd?

    Data Type (alias, SQL data type)

    Description

    @objName

    Y

    T_nameType, nvarchar(32)

    @objName is the name of the meter. This value will be checked against the meterName in the meterDefine table. If the system has the CD_CONTACT module enabled and the @orgName is provided, the system will consider the @objName to be the externally known name and lookup the name internal to AVEVA Measurement Advisor. For example, the organization 'Big Corp' calls our meter '12345-01' by the name 'FHILLS01'. In this case, the orgName is 'Big Corp' and the objName is 'FHILLS01'. The system will use this to look up that the internal name is '12345-01'. orgName will be compared to the column organizationName in the organizationDefine table. The objName will be checked against the aliasName column in the objectOrgAlias table for objects of type Meter. If the @objName is not found, the meter data will be rejected.

    @orgName

    N

    T_nameType, nvarchar(32)

    @orgName will be compared to the column organizationName in the organizationDefine table. The @orgName is used when looking up the meter alias. If the meter alias is not found, the meter data will be rejected.

    @localTime

    N

    T_nameType, nvarchar(32)

    Either the @localTime or @time parameters must be provided. If both parameters are provided, the system will use the value of @time. This value should be consistent with the @timeFormat that is used.

    @timeFormat

    N

    T_nameType, nvarchar(32)

    A string to let the system know how to interpret the @localTime string. The @timeFormat is the format you have used for the @localTime string. The default is '%m/%d/%Y %T'.

    Additionally, the following timeFormats are also considered valid:

    • '2/22/2021 5AM', '%m/%d/%Y %I'

    • '22/2/01 17:00:00', '%d/%m/%y %T'

    • '2/22/21 17:32', '%m/%d/%y %R'

    • '21/02/22 7:32', '%y/%m/%d %R'

    • '2021/02/22 7:32', '%Y/%m/%d %R'

    @userName

    Y

    T_nameType, nvarchar(32)

    The name of the user or system that is submitting the meter reading.

    @editStateName

    N

    T_nameType, nvarchar(32)

    Default is Observed.

    Options are:

    • Manual Override

    • Edited

    • Actualized

    • User Estimate

    • System Estimate

    • Observed

    • Observed Accepted

    The provided value will be checked against the column editStateName in the editStateDesc table. If the edit state is not found, the meter data will be rejected.

    @unitProfileName

    N

    T_nameType, nvarchar(32)

    Default is NULL. If a value is not provided, the system will retrieve the configured Input Unit Profile for the meter (inputProfileId from the meterDefine table). If a value is provided, the value will be checked against the unitProfileName column in the unitProfileDefine table. If the unitProfileName is not found, the meter data will be rejected.

    @dqInfoName

    N

    T_nameType, nvarchar(32)

    The value will be checked against the column dqInfoName in the dqInfoDesc table. Options are as follows:

    • Null/None — No data quality information to report.

    • Clock Drift — Clock drift check failed.

    • Clock Sync — Clock sync check failed.

    • Invalid — Data source deems data invalid.

      If the dqInfoName is not found, the meter data will be rejected.

    @volume

    N

    T_doublePrecisionType, float

    The volume of the fluid corrected to standard conditions. The units are defined by the configured Input Unit Profile of the meter if a unit profile is not included as part of the meter reading.

    @energy

    N

    T_doublePrecisionType, float

    The amount of energy released if the volume was part of an ideal combustion reaction. The units are defined by the configured Input Unit Profile of the meter if a unit profile is not included as part of the meter reading.

    @flowTime

    N

    T_flowTimeType, real

    The amount of time that the commodity (usually gas) was flowing. For an hourly record, the max would be between 0 and 1 hour inclusively. The units are defined by the configured Input Unit Profile of the meter if a unit profile is not included as part of the meter reading. The flowTime will be less than or equal to the runTime.

    @pressure

    N

    T_singlePrecisionType, real

    The recorded static pressure or gauge pressure depending on the unit profile in use. The units are defined by the configured Input Unit Profile of the meter if a unit profile isn't included as part of the meter reading.

    @temperature

    N

    T_singlePrecisionType, real

    The recorded temperature. The units are defined by the configured Input Unit Profile of the meter if a unit profile isn't included as part of the meter reading.

    @rawValue

    N

    T_doublePrecisionType, float

    The data provided for this value will depend on the type of meter the data is for:

    • Orifice meter — Differential pressure

    • Pulse meter — Pulse count

    • Corrector meter — Pulse count

    • Manual meter — Pulse count

    • Linepack meter — Inlet pressure

    • Coriolis meter — Pulse count

      The units are defined by the configured Input Unit Profile of the meter if a unit profile isn't included as part of the meter reading.

    @intermediateValue

    N

    T_doublePrecisionType, float

    The data provided for this value will depend on the type of meter the data is for:

    • Orifice meter — Flow extension

    • Pulse meter — Uncorrected volume

    • Corrector meter — Uncorrected volume

    • Manual meter — Uncorrected volume

    • Linepack meter — Inlet temperature

    • Coriolis meter — Uncompensated mass

    The units are defined by the configured Input Unit Profile of the meter if a unit profile isn't included as part of the meter reading.

    @primaryFactor

    N

    T_doublePrecisionType, float

    The data provided for this value will depend on the type of meter the data is for:

    • Orifice meter — C' factor from the factored form of American Gas Association (AGA)-3

    • Pulse meter — Fp*Ft*Fpv2 for AGA-7, this is the pressure, temperature, compressibility factor combined into one factor.

    • Corrector meter — Fp*Ft*Fpv2 for AGA-7, this is the pressure, temperature, compressibility factor combined into one factor.

    • Linepack meter — This is the outlet pressure.

    The units are defined by the configured Input Unit Profile of the meter if a unit profile isn't included as part of the meter reading.

    @waterVaporFactor

    N

    T_doublePrecisionType, float

    A correction factor to account for gas that is carrying water over a contractually defined limit [usually 7 lbs/MMCF, for wet gas]. How the factor is applied is dependent upon the delivery condition defined in the unit profile and whether the factor has been configured to be applied to the volume or heating value. If this is not specified, it will be calculated according to the Meter Properties.

    @volumeAccum

    N

    T_doublePrecisionType, float

    The data provided for this value will depend on the type of meter the data is for:

    • Linepack meter — volume, called Instantaneous Volume. This is used to calculate the linepack volume (@volume) which is the difference between this value and the Instantaneous Volume of the previous reading

    • All other meter types — total volume accumulated. This value keeps increasing until the rollover value of the device has been reached.

    The units are defined by the configured Input Unit Profile of the meter if a unit profile isn't included as part of the meter reading.

    @energyAccum

    N

    T_doublePrecisionType, float

    The data provided for this value will depend on the type of meter the data is for:

    • Linepack meter — energy, called Instantaneous Energy. This is used to calculate the linepack energy (@energy) which is the difference between this value and the Instantaneous Energy of the previous reading

    • All other meter types — total energy accumulated. This value keeps increasing until the rollover value of the device has been reached.

    The units are defined by the configured Input Unit Profile of the meter if a unit profile isn't included as part of the meter reading.

    @miscValue

    N

    T_doublePrecisionType, float

    Miscellaneous value. The data provided for this value will depend on the type of meter the data is for.

    • Linepack meter — Outlet temperature

    • All other meter types — This can be used for numerical values that get reported by the device that aren't usually part of a meter reading.

    The units are defined by the configured Input Unit Profile of the meter if a unit profile isn't included as part of the meter reading.

    @validate

    N

    T_booleanType, char(1)

    Default is NULL (gets turned into a Y if NULL). Options are:

    • NULL — System will perform validation on the record.

    • V — System will perform post calculation validation only.

    • Y — System will perform validation on the record.

    • N — System will skip validation on the record.

    @isSummer

    N

    T_booleanType, char(1)

    This is used when the system is interpreting the localTime when Daylight Saving Time ends and the datetimes during that transition are unclear. For example, during the fall DST change in North America, the 1-2AM time is repeated, this is used to specify which 1AM record it is. Options are:

    • NULL — Indicates an N

    • N — If there's a question about the time, the system will assume the winter timezone (not in DST)

    • Y — If there's a question about the time, the system will assume the summer timezone (in DST)

    @runTime

    N

    T_doublePrecisionType, float

    The total time between the start of the reading and the end of the reading. If the record is a split record, then the runtime is a portion of the period. The units are defined by the configured Input Unit Profile of the meter if a unit profile isn't included as part of the meter reading.

    @chartLabelId

    N

    T_chartLabelType, int

    It is for informational purposes only.

    Note: Only applicable to daily meter readings. This has been deprecated.

    @time

    N

    T_GMTtime, int

    The time in seconds from Jan 1, 1970 in Greenwich Mean Time (GMT). If this is configured, localTime, timeFormat and isSummer will be ignored.

    @offset

    N

    T_GMToffset, smallint

    The timezone represented in minutes from GMT. For example, Mountain Standard timezone is -420. Mountain Daylight timezone is -360. It is calculated based on the time of the data and the timezone of the meter.

    @mass

    N

    T_doublePrecisionType, float

    The mass of the fluid. The units are defined by the configured Input Unit Profile of the meter if a unit profile isn't included as part of the meter reading. If mass is not provided, it will be calculated from the volume and the specific gravity or density of the associated gas quality for gas or liquid respectively.

    @Zratio

    N

    T_doublePrecisionType, float

    A dimensionless number that represents the compressibility factor of the gas at base conditions (Internal Storage) divided by the compressibility of the gas at flowing conditions (the base conditions of the unit profile specified in CD_ZRATIO_UNIT_PROFILE).

    This is calculated by the system.

    @hydrocarbonDewpoint

    N

    T_doublePrecisionType, float

    For the static pressure of the meter reading, this is the temperature where hydrocarbon liquids begin to form. The units are defined by the configured Input Unit Profile of the meter if a unit profile isn't included as part of the meter reading. If this is not specified, it will be calculated according to the Telemetry Calculation Policy.

    @uncorrVolAccum

    N

    T_doublePrecisionType, float

    The total flowing volume (not corrected to standard conditions) accumulated. This value keeps increasing until the rollover value of the device has been reached. The units are defined by the configured Input Unit Profile of the meter if a unit profile is not included as part of the meter reading.

    @rawValueAccum

    N

    T_doublePrecisionType, float

    For a pulse meter, this is the total accumulated pulse counts over time. The value would reset at the meter rollover value.

    @volumeRatio

    N

    T_doublePrecisionType, float

    This is also known as the volume correction factor (VCF). This is a ratio of the volume as reported by the field to the volume as recalculated using the original reported values (Pressure, Temperature, Differential Pressure, composition, etc).

    This is calculated by the system and is not used.

    @adjustmentCodeName

    N

    T_nameType, nvarchar(32)

    If an adjustment is made to a previously submitted reading, the source system may choose to include a reason for the adjustment. This value maps to the column adjustmentCodeName in the table adjustmentCodes. If the code doesn't exist in the system, the reading will be sent to the Rejected Readings table with a reason of Invalid Adjustment Code Name.

TitleResults for “How to create a CRG?”Also Available in