The SRAM data which was read by this function should be restored by using the Boot function.(The SRAM data cannot be restored while the system is running).
It is necessary to make the file having the file name which was acquired by cnc_getsraminfo function to restore the SRAM data by using the Boot function.
Refer to the following for the method of making the file for the S-RAM data. The procedure of reading S-RAM data and storing the data to the file is as follows.
The total size which can be read finally is S-RAM size(sramsize) acquired by the cnc_getsraminfo function. When you store the read SRAM data to the file, please store the divided S-RAM data into the files whose names were acquired by cnc_getsraminfo function in order of the file names.
The size of one file is calculated from information of cnc_getsraminfo as follows.
Size of S-RAM data (sramsize) Size of one file = Number of file division (dibnumber)
Ex.) i Series(1Mbyte S-RAM) Information acquired by cnc_getsraminfo
sramsize = 1Mbyte(1048576byte) = 1024Kbyte divnumber = 2 fname = "SRAM1_0A.FDB" fname = "SRAM1_0B.FDB" Size of one file = 1024Kbyte / 2 = 512Kbyte Make the file whose size is 512 Kbyte in order of SRAM1_0A.FDB, SRAM1_0B.FDB.
Universal Fanuc Driver
Fanuc Focas Library CD
Specify the library handle. See "Library handle" for details.
Specify the address of the variable by which the reading state of S-RAM is stored.
|0||:||End of reading process|
|1||:||Reading process continued|
Call the cnc_sramgetend function in case of stat=0.
Pointer to the variable to which the reading data is stored.
Specify the pointer of the variable to which the S-RAM data is stored.
Pointer to the variable to which the data length was set.
Specify the size in byte which you want to read to the variable. After executing this function, the size of data which was actually read is set.
The maximum size which can be read at a time is S-RAM size (sramsize) acquired by the cnc_getsraminfo function.
EW_OK is returned on successful completion, otherwise any value except EW_OK is returned.
The major error codes are as follows.
|Return code||Meaning/Error handling|
Retry because the buffer is empty.
As for the other return codes or the details, see "Return status of Data window function"
For HSSB connection,
For Ethernet connection,
The Ethernet function and the extended driver/library function are necessary. However, in case of Series 16i/18i/21i-B, 0i-B/C, the required CNC option is as follows. When Embedded Ethernet is used,
above two optional functions are not required.
The Ethernet function and the extended driver/library function are necessary.
However, in case of Series 16i/18i/21i-B, 0i-B/C, the required CNC option is as follows.
When Embedded Ethernet is used,
When Ethernet board is used,
- only Ethernet function is required.
This function is not related to CNC parameter.
Do not operate the system while reading when the system (FAPT etc.) does not have "Emergency" state. If the system is operated, the contents of the S-RAM data is not guaranteed.
|P (Punch press)||-|
|Power Mate i-D|
|Power Mate i-H|
|Power Motion i-A||X|
|"O"||:||Both Ethernet and HSSB|
|"X"||:||Cannot be used|
Note) 0i-C does not support the HSSB function.
cnc_getsraminfo cnc_sramgetstart cnc_sramgetend