38.9.4.2 Read SRAM backup data

The Read function reads data in the SRAM backup memory and saves the data as a file on your computer.

The saved file format for filing data is saved in a binary format and other files are saved in CSV format.

Function Name

INT WINAPI EasyBackupDataRead(LPCSTR sSaveFileName,LPCSTR sNodeName,INT iBackupDataType,INT iSaveMode);

Argument

sSaveFileName: (In) File path of a destination file for read data (Text pointer)

sNodeName: (In) Name of node of data source to be read (Text pointer)

The station name is fixed as #WinGP.

iBackupDataType: (In) Types of read data

Value

Types of data

0x0001

Filing Data

0x0002

Sampling data of sampling group number 1

0x0003

All sampling group data except for sampling group number 1

0x0004

0x0005

Alarm Block1

0x0006

Alarm Block2

0x0007

Alarm Block3

0x0008

Alarm Block4

0x0009

Alarm Block5

0x000A

Alarm Block6

0x000B

Alarm Block7

0x000C

Alarm Block8

Other than those above

(Reserved)

When the data type is alarm block 1 to 8, one alarm block stores a maximum of three types of data - active data, history data, and log data - based on the GP-Pro EX settings. This API confirms whether data is available based on the following priorities, and uses that data if it exists.

(1) Alarm History

(2) Alarm Log

(3) Active Alarm

If none of the above is available, an error occurs.

iSaveMode: (In) How to save

Return value (NULL)

Normal End: 0

Problem: Error code

Special Item

When reading alarm data or sampling data, the date data is handled as "yy/mm/dd."