ENUMNATIVEVALUE

The ENUMNATIVEVALUE modifier retrieves the native, numeric values such as 1 or 2 instead of string values such as on/off for the data that has enumerated states associated with it.

Note: You can use the ENUMNATIVEVALUE modifier with any sampling or calculation mode.
Example

Import this data to demonstrate the use of ENUMNATIVEVALUE:

[Tags]
Tagname,DataType,HiEngineeringUnits,LoEngineeringUnits
STATETAG,SingleInteger,60,0
[Data]
Tagname,TimeStamp,Value,DataQuality
STATETAG,06-Aug-2012 9:08:00.000,4,Good
STATETAG,06-Aug-2012 9:14:00.000,4,Good
STATETAG,06-Aug-2012 9:22:00.000,2,Good

Assume the tag has an enumerated set associated where 2=Stopped and 4=Running. When you do the interpolated query you get the string value:

set starttime='06-Aug-2012 09:10:00',endtime='06-Aug-2012 09:30:00' 
select timestamp,value,quality
from ihrawdata
where tagname = STATETAG and samplingmode=Interpolated and numberofsamples=6
Time StampValueQuality
8/6/2012 09:13:20 running100.0000000
8/6/2012 09:16:40 running100.0000000
8/6/2012 09:20:00 running100.0000000
8/6/2012 09:23:20 stopped100.0000000
8/6/2012 09:26:40 stopped100.0000000
8/6/2012 09:30:00stopped100.0000000

Using the ENUMNATIVEVALUE query modifier, you can get the numeric value suitable for plotting

set starttime='06-Aug-2012 09:10:00',endtime='06-Aug-2012 09:30:00' 
select timestamp,value,quality
from ihrawdata
where tagname = STATETAG and samplingmode=Interpolated and numberofsamples=6 and criteriastring='#enumnativevalue'
Time StampValueQuality
8/6/2012 09:13:20 4100.0000000
8/6/2012 09:16:40 4100.0000000
8/6/2012 09:20:00 4100.0000000
8/6/2012 09:23:20 2100.0000000
8/6/2012 09:26:40 2100.0000000
8/6/2012 09:30:002100.0000000
Note: For bad data, the values are returned as string values based on the Enumerated State table though the enumerative value is set to FALSE.
Anticipated Usage

Use the ENUMNATIVEVALUE query modifier to plot tags that use enumerated values. You can put the string value in a data link and put the native value in a chart.