Description
Reads the NC program by line basis.
This function tries to read the amount of lines which is specified by (*line_len), but when the actual read character size reaches to the number of (*data_len) in this function, the reading process is aborted.
And if the end character of the last line (EOB('\n')) is not finished to read, the last line is not counted as the read line count.
Example)
When you read from 1st to 3rd line of the following program, you have to specify more than 33 as the read character size. If you specify 30 as the character size, the read line count would be 2 because the 3rd line had not been read completely. Then 30 characters would be set in the specified buffer.O1234 ; N001 G01 X0. F100 ; N002 X20. ; N003 X50. ; N004 X80. ; N005 M30 ; %
The conditions of the function about CNC mode and the kind of program are as follows.
MDI mode | Other mode | |
MDI program | O | × |
Selected program | O | O |
Not selected program | O | O |
This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).
When you use this function for the MDI program or the selected program in the following situations, the execution pointer goes to the top of the specified line by line_no.
- MDI program in MDI mode.
- Selected program in EDIT mode.
- Selected program in TJOG/THND mode with the playback option.
Universal Fanuc Driver
Fanuc Focas Library CD
Declaration
Arguments : HSSB
Specify the library handle. See "Library handle" for details.
Specify the program number to read.
When you read the MDI program, you have to specify -1.
Specify the line number to read from.
When you read from the first line of a program, you have tospecify 0.
When you specify other than the existing line number, you get EW_DATA error as the return code.
Specify the address to the buffer to read the program text.
Specify the amount of lines to read.
After calling this function, the actual read line count is set.
Specify the size of character to read.
After calling this function, the actual read character size is set.
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) |
|
|||||||||
(5) |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
|
|||||||||
(6) |
The extended driver/library function is necessary. |
|||||||||
(12) |
||||||||||
(7) |
CNC parameter is a state of write-protection (O8000-/O9000- protection, encoding). |
|||||||||
(13) |
|
As for the other return codes or the details, see "Return status of Data window function"
CNC option
For HSSB connection,
The extended driver/library function is necessary.
CNC parameter
This function is not related to CNC parameter.
CNC mode
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 | H |
"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_rdprogline2 cnc_wrprogline cnc_delprogline cnc_searchword cnc_searchresult