Cicode Programming Reference > Cicode Function Categories > Display Functions Introduction > DspInfoField


Obtains static and real-time data from a variable tag. You get static data from the Variable Tags database. The additional field "Eng_Value", returns dynamic real-time data for the variable tag. To get this real-time data, you need to first call the DspInfoNew() function to get the information block handle hInfo.

Getting the raw value of a variable tag using DspInfoField is no longer supported. To get the raw value of a tag, use the TagSubscribe function, specifying a value of “Raw” for the sScaleMode parameter. When using TagSubscribe, you can either call SubscriptionGetAttribute to obtain the value whenever required or register callback cicode function to run when the value changes. See TagSubscribe for more details.


DspInfoField(hInfo, sTag, sField [, ClusterName] )


The object information block handle, as returned by DspInfoNew(). This handle identifies the table (or block) where all data on the object is stored. Set this handle to 0 (zero) if you do not require real-time data.


The name of the variable tag. The name of the tag can be prefixed by the name of the cluster that is "ClusterName.Tag". This argument does not support arrays. If array syntax is used, the information will be retrieved for only the tag name.


The name of the field from which to extract the data:

Cluster - Name of the cluster in which the Tag resides

Comment - Variable tag comment

Eng_Full - Engineering Full Scale

Eng_Zero - Engineering Zero Scale

Eng_Units - Engineering Units

Eng_Value - Scaled engineering value - Dynamic

Field - Description

FullName - Full name of the tag in the form cluster.tagname.

Name - Variable Tag Name

Type - Data Type

Unit - I/O Device Name


Specifies the name of the cluster in which the Tag resides. This is optional if you have one cluster or are resolving the tag via the current cluster context. The argument is enclosed in quotation marks "".

Return Value

The data (as a string).

Related Functions

DspInfo, DspInfoNew, DspInfoDestroy, SubscriptionGetAttribute, SubscriptionAddCallback, TagSubscribe


! Get the  I/O device that Variable Tag "PV123" belongs to.
! Get the real-time engineering value of a tag.

See Also

Display Functions