Description
The running by the subprogram call to the program in the CNC memory is prohibited.
And the following operations and the execution of function are prohibited.
-
1) Program edit and search
2) O number search
3) Program input/output from input-output device
1) Program search and delete
-
cnc_search, cnc_delete
-> EW_PROT error occurs
cnc_delall
-> The program which was protected by the parameter or this function is not deleted, but other program are deleted.
2) Program downloading and verifying
-
cnc_download, cnc_cdownload, cnc_dwnend,cnc_verify, cnc_cverify, cnc_vrfend, cnc_download3, cnc_dwnend3
-> EW_PROT error occurs
3) Copy and rename of program.
-
cnc_copyprog
-> When the protected program number is specified for destination number, EW_PROT error occurs.
cnc_renameprog
-> When the protected program number is specified for old program number, EW_PROT error occurs.
Note) Even if the program is protected by cnc_setpglock function, the edit by the line edit function is possible.
Setting of the protection of running/editing can be set to each path.
The protection of running/editing can be set to one path up to program of four.
The setting by this function becomes effective until the setting is released by cnc_resetpglock or the CNC is turned off.
The procedure to edit existing program by the application is shown as follows.
1) | The protection of running/editing to the program which wants to be edited is set by cnc_setpglock. |
2) | The program is edited by the line editing function. |
3) | The protection of running/editing is released by cnc_resetpglock and editing is end. |
* | If you want to edit the new program, it is necessary to register the new program before the procedure 1. |
- O0000 (In case of program number eight digits : "O00000000")
- Selected program or running program (Main, nesting, executing)
- Program protected by parameter. (O9000 or later etc.)
- MDI program.
Universal Fanuc Driver
Fanuc Focas Library CD
Declaration
Arguments : HSSB
Specify the library handle.
See "Library handle" for details.
Program number
Specify the program number which wants to set the protection of running/editing.
Specify the program number of 1 or later registered in CNC.
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) |
This function is not supported by CNC. |
|||||||||
(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. |
|||||||||
(7) |
The program protected in program number(prog_no) by the parameter was specified. |
|||||||||
(8) |
The protection of running/editing has already been set to the program of 4. |
|||||||||
(13) |
The selected program or running program(Main, nesting, executing) was specified for program number(prog_no). |
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
This function can be used in any 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 | 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_resetpglock cnc_rdpglockstat