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 of read data (Text pointer)
sNodeName: (In) Name
of a participating station of the location to which the data is
read (Text pointer)
The station name is fixed as #WinGP.
iSaveMode: (In) How
to save
-
0: New (If a file with the same file name exists,
the file is deleted and overwritten.)
-
1: Add (Add data to the end of a file. If there
is no file, a new file is created.)
-
Other than those above: Reserved
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.
Return value (NULL)
Normal End: 0
Problem: Error code
|