Description
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[0] = "SRAM1_0A.FDB" fname[1] = "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
Declaration
Arguments
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.
Return
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 |
---|---|
(1) |
|
(2) |
|
(10) |
Retry because the buffer is empty. |
(13) |
As for the other return codes or the details, see "Return status of Data window function"
CNC option
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.
When Ethernet board is used,
- only Ethernet function is required.
CNC parameter
This function is not related to CNC parameter.
CNC mode
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.
Available CNC
0i-A | 0i-B/C(Note) | 0i-D | 0i-F | 15 | 15i | 16 | 18 | 21 | 16i-A | 18i-A | 21i-A | 16i-B | 18i-B | 21i-B | 30i-A | 30i-B | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
M (Machining) | |||||||||||||||||
T (Turning) | - | ||||||||||||||||
LC (Loader) | - | - | - | - | - | - | - | - |
0i-D | 0i-F | 16i | 18i | 30i-A | 30i-B | |
---|---|---|---|---|---|---|
P (Punch press) | - | |||||
L (Laser) | - | - | - | - | ||
W (Wire) | - | - |
Power Mate i-D | |
Power Mate i-H | |
Power Motion i-A | X |
"O" | : | Both Ethernet and HSSB | |
"E" | : | Ethernet | |
"H" | : | HSSB | |
"X" | : | Cannot be used | |
"-" | : | None |
Note) 0i-C does not support the HSSB function.
See Also
cnc_getsraminfo cnc_sramgetstart cnc_sramgetend