Description
This function returns whether DNC operation or M198 operation is being executed or not.
This function returns EW_OK in case that DNC operation or M198 operation are started.
If a return value is EW_OK at M198 operation, this function returns a program number/program name demanded from CNC, instead at DNC operation, NULL is returned for the program number/program name.
Also, if a return value is EW_OK, it become possible to output the
program of DNC operation or M198 operation by a function cnc_dnc2
This function returns EW_REJECT in case that DNC operation or M198 operation has not been started.
The following functions will return EW_FUNC in case that cnc_dncstart2 function is not executed.
cnc_dnc2
cnc_dncend2
A basic procedure for DNC operation or M198 operation is shown below.
This function is not available to Embedded Ethernet. |
Universal Fanuc Driver
Fanuc Focas Library CD
Declaration
Arguments
Specify the library handle. See "Library handle" for details.
The pointer of the area where the NC program number/program name will be set by CNC.
In order to get the program number for operation, at least 16 bytes area is required.
Otherwise, the result of this function is not predictable.
In order to get the program name for operation, at least 64 bytes area is required.
Otherwise, the result of this function is not predictable.
Program number/program name is set as ASCII code with NULL terminated at this area.
<Example1> | In case that 'O1234' was designated as the program number, the following character string is set to 'filename'. |
"O1234" + NULL | |
<Example2> | In case that 'GEAR_PARTS_001' was designated as the program name, the following character string is set to 'filename'. |
"GEAR_PARTS_001" + NULL |
The NULL string is set as the program number/program name in case of DNC operation, and the character string that shows the program number/program name in case of M198 operation.
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) |
cnc_dncstart2 function has been executed. Terminate DNC operation by using cnc_dncend2 function. |
(6) |
The extended driver/library function is necessary. |
(9) |
The following CNC parameter must be set. Series 15/15i 7713#0 = 1 Series 16/18, 16i/18i/21i, 0i-A/B/C 8706#1 = 1 |
(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/D/F, Series 30i and PMi-A, 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 related to the following CNC parameter.
See the manual of CNC parameter for details.
7713#0 = 1 (must be set)
0020 = 15 (must be set)
0020 = 15 (must be set)
8706#0 (influenced by setting) (This parameter is effective only in path 1. Set 0 except the 1st path.)
8706#1 = 1 (must be set)
0020 = 15 (must be set)
0020 = 16 (must be set)(In case of HSSB PORT2 function)
0020 = 15 (must be set)
0020 = 16 (must be set)(In case of HSSB PORT2 function and NCGuidePro)
0020 = 6 (must be set)
0020 = 6 (must be set)
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 | O |
"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_dnc2 cnc_dncend2 cnc_rddncdgndt
Example(C Language)
Example(C#)