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

AVEVA™ Plant SCADA

DevPrev

  • Last UpdatedJul 18, 2023
  • 1 minute read

Gets the previous record in a device. If the start of the database is reached, the EOF flag is set and an error code is returned.

Syntax

DevPrev(hDev)

hDev:

The device handle, returned from the DevOpen function. The device handle identifies the table where all data on the associated device is stored.

Return Value

0 if the record is read successfully, or an error code if the start of the database is reached.

DevOpen, DevEOF, DevNext

Example

Status=0;

I = 0;

hDev = DevOpen("Log", 0);

iError = DevSeek(hDev, DevSize(hDev)); ! seek to end

WHILE iError = 0 DO

DspText(20 + I, 0, DevGetField(hDev,"Tag"));

I = I + 1;

iError = DevPrev(hDev);

END

DevClose(hDev);

See Also

Device Functions

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