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

AVEVA™ Measurement Advisor

[dbo]​.[writeCombinedMtrConfigGQRecord] stored procedure

[dbo]​.[writeCombinedMtrConfigGQRecord] stored procedure

  • Last UpdatedJun 20, 2025
  • 8 minute read

This stored procedure transfers properties data for meter configuration and gas quality (GQ) from the Measurement Advisor Data Connector for Autosol Communications Manager (ACM). The meter properties configuration data goes to the rdm_configRaw table for normal processing. The GQ data goes to the rdm_GasAnalysisRaw<XX> table for processing.

For new configuration property uploads

If the configDesc item CD_SCADA_CREATE_OBJECTS is set to "Y" and the connected meter, GQ, or measurement point (MP) does not yet exist in the system, this stored procedure also creates the needed objects, connects them, and continues on to set the downloaded properties. The database objects are created according to the following rules and can be viewed in Sightline so the operator can then make any needed adjustments to the records:

  • In general, the dataset is set to the value in CD_DIST_GLOBAL_DATASET; and the AOR/AOR group of the associated organization is set to "NEW." (All related objects created are connected to this AOR.) However, if CD_MULTIPLE_SCADA_ENV = Y, then the AOR/AOR group/dataset are set to the value in orgName.

  • If two meters in two systems have the same name, then the first meter is created with the name itself; and the second meter is created with the value in "orgName" prepended to its meter name ("objName"). Therefore, the new complete name takes the form "orgName-objName."

  • Meters are created with the following characteristics:

    • The metering method is set according to the MeterType specified in the configuration. Supported types are Orifice, Coriolis and Pulse (Ultrasonic, Turbine, and Positive Displacement).

    • The Primary History Granularity (PHG) is set to hourly.

    • The Input Unit Profile is set to Internal Storage.

    • The Auto Update config property is turned on.

    • Remaining meter properties are set using the rest of the properties in the ACM data transfer record.

  • Measured GQs are created with the following characteristics:

    • A PHG of hourly.

    • An Input Unit Profile of Internal Storage.

    • The Auto Update config property is turned on.

    • Supercompressibility set to the meter's compressibility.

  • For MPs created, the meter and Measurement Quality (MQ) are connected with a state of Active and for the entire datetime range (Jan 1/1970- Feb 2038).

  • For new meter records, a problem row record is created and attached to the meter with the units and base conditions. The operator can then view the problematic data on the Problem tab in the Meter Editor or in the Problem Summary (from the Tools menu). From there, the operator can set the correct input unit profile and make any other necessary adjustments.

  • If there are issues with the meter's properties, a rejected configuration row is created. For more information, see "Rejected Readings" in the AVEVA Measurement Advisor User Guide.

For configuration property changes

When the system receives configuration changes, they are checked to see if they can be entered into the system and rejected if they cannot. For rejected configuration data, the operator should fix any issues using the Tools->Rejected readings->Event Details screen in the client application. For example, the operator should fix the object’s name if it is incorrect, fix the time specification, and so on.

New configuration data is then compared to existing configuration data in the system and if it is different, it will be available to the Measurement Analyst in the "Problematic Configuration" screen to determine which values the system will use. If the Measurement Analyst wants to skip this step and always use the field values, they can enable the Meter General->Auto update config property for the meter. For more information, see "Configuration Check" and "Problematic Configuration" in the AVEVA Measurement Advisor User Guide.

Note: If a configuration item has no changes, the property will not be updated.

Mappings

The [tblAsiEFMCodeDescriptions] from ACM_Import are loaded into a mapping table called scadaDomainDesc. The definitions for the mapping are in the scadaDomainDesc.xml data file and can be overridden similarly to that of other object registry files. For more information, see "Use the MeasConfig Tool to Make Updates to the Object Registry" in the AVEVA Measurement Advisor Installer Guide.

The scadaDomainDesc table will be used to map the ACM configuration codes to objItemDomain names in Measurement Advisor as follows:

Note: For the Gas Quality (GQ) mappings noted in the table below, the applicable granularity assigned is determined by the properties configured for the meter. If the GQ is a measured GQ, the Measurement Quality (MQ) calculation granularity property is used. If the GQ is a zone quality, the Zone Quality (ZQ) calculation granularity property is used.

Internal Field (Parameter) Name

Field req'd?

Data Type (alias, SQL data type)

Mapping to the Meter Properties or GQ Data (for the meter)

@objName

Y

T_nameType, nvarchar(32)

Meter tab > Name

@orgName

N

T_nameType, nvarchar(32)

Meter tab > Organization Aliases

@userName

N

T_nameType, nvarchar(32)

N/A

@UpdateTime

Y

T_datetimeType, datetime

Meter tab > Last Mod Times (as applicable to the configuration updated)

This time is also used as the timestamp for the included GQ data.

@AtmosphericPressure

N

T_singlePrecisionType, real

Meter tab (Meter General group) > Atmospheric pressure

@BasePressure

N

T_singlePrecisionType, real

Meter tab (Meter General group) > Base pressure

@BaseTemperature

N

T_singlePrecisionType, real

Meter tab (Meter General group) > Base temperature

@BTU

N

T_singlePrecisionType, real

GQ.heatingValue

@BTUBase

N

T_shortType, smallint

N/A

@CalcMethod

N

T_shortType, smallint

For pulse meters: Pulse Meter tab > Volumetric calculation

For orifice meters: Orifice Meter tab > Volumetric calculation

For Coriolis meters: Coriolis Meter tab > Volumetric calculation

@ColdStartDateTime

N

T_datetimeType, datetime

N/A

@ContractDay

N

T_shortType, smallint

N/A

@ContractHour

N

T_shortType, smallint

For meters: Meter tab (Meter General group) > Field device contract hour

For GQs,: Gas Quality tab (Gas Quality General group) > Field device contract hour

@DefaultTemperature

N

T_singlePrecisionType, real

N/A

@DPBackflowAlarmSetpoint

N

T_singlePrecisionType, real

N/A

@DPCalibRangeHigh

N

T_singlePrecisionType, real

N/A

@DPHighAlarmSetpoint

N

T_singlePrecisionType, real

N/A

@DPLowAlarmSetpoint

N

T_singlePrecisionType, real

N/A

@DPLowFlowCutoff

N

T_singlePrecisionType, real

For orifice meters: Orifice Meter tab > DP low flow cut-off

@DPTransducerRangeHigh

N

T_singlePrecisionType, real

N/A

@Elevation

N

T_singlePrecisionType, real

For meters: Meter tab (Meter General group) > Elevation

@FittingType

N

T_shortType, smallint

N/A

@FixedFactor

N

T_singlePrecisionType, real

N/A

@FPVMethod

N

T_shortType, smallint

For meters: Meter tab (Meter General group) > Supercompressibility calculation

For GQs: Gas Quality tab (Gas Quality General group) > Compressibility calculation

@KFactor

N

T_singlePrecisionType, real

For pulse meters: Pulse Meter tab > K factor

For Coriolis meters: Coriolis Meter tab > K factor

@Latitude

N

T_singlePrecisionType, real

For meters: Meter tab > Meter General group > Latitude

@MeterAccessDateTime

N

T_datetimeType, datetime

N/A

@MeterFactor

N

T_singlePrecisionType, real

For pulse meters: Pulse Meter tab > Meter factor

For Coriolis meters: Coriolis Meter tab > Meter factor

@MeterTaps

N

T_shortType, smallint

For orifice meters: AGA-3 1985 or AGA-3 1992 tab > Tap type

Note: Though the system does support other orifice meters (for example, AGA-3 1992 Liquid or AGA-3 2010), the ACM mapping does not support them. If needed, add the configuration via the object registry files.

@MeterType

N

T_shortType, smallint

For all meters: Meter tab (Meter General group) > Metering method

For orifice meters: Orifice Meter tab > Data source

For pulse meters: Pulse Meter tab > Data source

For Coriolis meters: Coriolis Meter tab > Data source

Note: Though the system does support liquids meters (for example, AGA-3 1992 Liquid), the ACM mapping does not support them. If needed, add the configuration via the object registry files.

@OrificePlateDiameter

N

T_singlePrecisionType, real

For orifice meters: Orifice Meter tab > Plate diameter

@OrificePlateMaterial

N

T_shortType, smallint

For orifice meters: AGA-3 1985 or AGA-3 1995 tab > Orifice material

Note: Though the system does support other orifice meters (for example, AGA-3 1992 Liquid or AGA-3 2010), the ACM mapping does not support them. If needed, add the configuration via the object registry files.

@OrificeRefTemp

N

T_singlePrecisionType, real

For orifice meters: Orifice Meter tab > Orifice reference temperature

@PipeDiameter

N

T_singlePrecisionType, real

For orifice meters: Orifice Meter tab > Tube diameter

@PipeMaterial

N

T_shortType,smallint

For orifice meters: AGA-3 1992 tab > Tube material

Note: Though the system does support other orifice meters (for example, AGA-3 1992 Liquid or AGA-3 2010), the ACM mapping does not support them. If needed, add the configuration via the object registry files.

@PipeRefTemp

N

T_singlePrecisionType, real

For orifice meters: AGA-3 1992 tab > Tube reference temperature

Note: Though the system does support other orifice meters (for example, AGA-3 1992 Liquid or AGA-3 2010), the ACM mapping does not support them. If needed, add the configuration via the object registry files.

@RecordSource

N

T_descType, nvarchar(128)

N/A

@RecordSpan

N

T_shortType, smallint

N/A

@SampleDate

N

T_datetimeType, datetime

N/A

@SampleType

N

T_shortType, smallint

N/A

@SPCalibrationHigh

N

T_singlePrecisionType, real

N/A

@SPCalibrationLow

N

T_singlePrecisionType, real

N/A

@SpecificGravity

N

T_singlePrecisionType, real

GQ.specificGravity

@SpecificHeatRatio

N

T_singlePrecisionType, real

N/A

@SPHighAlarmSetpoint

N

T_singlePrecisionType, real

For orifice meters: Orifice Meter tab > Max. Static Pressure Range

For pulse meters: Pulse Meter tab > Max. Static Pressure Range

@SPLowAlarmSetpoint

N

T_singlePrecisionType, real

For orifice meters: Orifice Meter tab >Min. Static Pressure Range

For pulse meters: Pulse Meter tab > Min. Static Pressure Range

@SPTransducerRangeHigh

N

T_singlePrecisionType, real

N/A

@StaticPressTap

N

T_shortType, smallint

For orifice meters: AGA-3 1985 or AGA-3 1992 tab > Tap location

Note: Though the system does support other orifice meters (for example, AGA-3 1992 Liquid or AGA-3 2010), the ACM mapping does not support them. If needed, add the configuration via the object registry files.

@StaticPressType

N

T_shortType, smallint

For meters: Meter tab > Input Unit Profile field > Select a Unit Profile pop-up > Static pressure setting

@TempCalibrationRangeHigh

N

T_singlePrecisionType, real

N/A

@TempCalibrationRangeLow

N

T_singlePrecisionType, real

N/A

@TempHighAlarmSetpoint

N

T_singlePrecisionType, real

For orifice meters: Orifice Meter tab > Max. Temperature Range

For pulse meters: Pulse Meter tab > Max. Temperature Range

@TempLowAlarmSetpoint

N

T_singlePrecisionType, real

For orifice meters: Orifice Meter tab > Min. Temperature Range

For pulse meters: Pulse Meter tab > Min. Temperature Range

@TempTransducerRangeHigh

N

T_singlePrecisionType, real

N/A

@TempTransducerRangeLow

N

T_singlePrecisionType, real

N/A

@Viscosity

N

T_singlePrecisionType, real

For orifice meters: AGA-3 1985 or AGA-3 1992 tab > Gas viscosity

GQ.Viscosity

Note: Though the system does support other orifice meters (for example, AGA-3 2010), the ACM mapping does not support them. If needed, add the configuration via the object registry files.

@WarmStartDateTime

N

T_datetimeType, datetime

N/A

@Argon

N

T_singlePrecisionType, real

GQ.Ar

@CO

N

T_singlePrecisionType, real

GQ.CO

@CO2

N

T_singlePrecisionType, real

GQ.CO2

@Ethane

N

T_singlePrecisionType, real

GQ.C2

@H2

N

T_singlePrecisionType, real

GQ.H2

@H2O

N

T_singlePrecisionType, real

GQ.H20

@H2S

N

T_singlePrecisionType, real

GQ.H2S

@Helium

N

T_singlePrecisionType, real

GQ.He

@iButane

N

T_singlePrecisionType, real

GQ.iC4

@iPentane

N

T_singlePrecisionType, real

GQ.iC5

@Methane

N

T_singlePrecisionType, real

GQ.C1

@N2

N

T_singlePrecisionType, real

GQ.N2

@nButane

N

T_singlePrecisionType, real

GQ.nC4

@nDecane

N

T_singlePrecisionType, real

GQ.C10

@NeoPentane

N

T_singlePrecisionType, real

GQ.neoC5

@nHeptane

N

T_singlePrecisionType, real

GQ.C7

@nHexane

N

T_singlePrecisionType, real

GQ.C6

@nNonane

N

T_singlePrecisionType, real

GQ.C9

@nOctane

N

T_singlePrecisionType, real

GQ.C8

@nPentane

N

T_singlePrecisionType, real

GQ.nC5

@O2

N

T_singlePrecisionType, real

GQ.O2

@Propane

N

T_singlePrecisionType, real

GQ.C3

@UnitBaseAtmosPress

N

T_shortType, smallint

Operator sets the Input Unit Profile.

@UnitBasePressure

N

T_shortType, smallint

Operator sets the Input Unit Profile.

@UnitBaseTemp

N

T_shortType, smallint

Operator sets the Input Unit Profile.

@UnitCorrectedVolume

N

T_shortType, smallint

Operator sets the Input Unit Profile.

@UnitDP

N

T_shortType, smallint

Operator sets the Input Unit Profile.

@UnitEnergy

N

T_shortType, smallint

Operator sets the Input Unit Profile.

@UnitExtension

N

T_shortType, smallint

Operator sets the Input Unit Profile.

@UnitHeatingValue

N

T_shortType, smallint

Operator sets the Input Unit Profile.

@UnitKFactor

N

T_shortType, smallint

Operator sets the Input Unit Profile.

@UnitLiquidMass

N

T_shortType, smallint

Operator sets the Input Unit Profile.

@UnitOrificeDiameter

N

T_shortType, smallint

Operator sets the Input Unit Profile.

@UnitOrificeRefTemp

N

T_shortType, smallint

Operator sets the Input Unit Profile.

@UnitPipeDiameter

N

T_shortType, smallint

Operator sets the Input Unit Profile.

@UnitPipeRefTemp

N

T_shortType, smallint

Operator sets the Input Unit Profile.

@UnitSP

N

T_shortType, smallint

Operator sets the Input Unit Profile.

@UnitTemp

N

T_shortType, smallint

Operator sets the Input Unit Profile.

@UnitUncorrectedVolume

N

T_shortType, smallint

Operator sets the Input Unit Profile.

@UnitViscosity

N

T_shortType, smallint

Operator sets the Input Unit Profile.

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