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

AVEVA™ Plant SCADA

TagBrowseFirst

  • Last UpdatedFeb 02, 2024
  • 1 minute read

The TagBrowseFirst function places the data browse cursor at the first record.

This function is a blocking function. It blocks the calling Cicode task until the operation is complete.

Syntax

INT TagBrowseFirst(LONG Session)

Session:

The handle to a browse session previously returned by a TagBrowseOpen call.

Return Value

0 if successful -1 if unsuccessful.

TagInfoEx, TagInfo, TagBrowseClose, TagBrowsePrev, TagBrowseNumRecords, TagBrowseOpen, TagBrowseNext,TagBrowseGetField

Example

// first

count = 1;

TBResult = TagBrowseFirst(TBHandle);

ErrLog("First: " + IntToStr(TBResult) + ", Error = " + IntToStr(IsError()));

WHILE (TBResult <> -1) DO

ErrLog("Entry " + IntToStr(count) + ": " +

"Tag: " + TagBrowseGetField(TBHandle , "TAG") + ", " +

"Type: " + TagBrowseGetField(TBHandle , "TYPE") + ", " +

"Addr: " + TagBrowseGetField(TBHandle , "ADDR") + ", " +

"Error = " + IntToStr(IsError()));

TBResult = TagBrowseNext(TBHandle);

ErrLog("Next: " + IntToStr(TBResult) +

", Error = " + IntToStr(IsError()));

count = count + 1;

END

See Also

Tag Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in