Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 345 -
------------------------------------------------------------------------------
1.8 Output NC program to be compared. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_verify
[Syntax]
#include <data.h>
#include <fwindow.h>
int cnc_verify( char *data, int number ) ;
[Arguments]
data NC program data (ASCII string).
number Character number of NC program data (1 - 256).
[Return]
0 Successful.
1 The start-up procedure of CNC for comparing NC program has not
been completed, or no start-up command has been commanded.
2 Incorrect character number "number".
5 Incorrect NC program data. This code is returned under one of
following conditions.
- Any difference has been detected during comparing process.
- The target program to be compared is selected in foreground.
- A character which is unavailable for NC program is detected.
- When TV check is effective, a block which includes odd
characters (including 'LF' at the end of the block) is
detected.
[Description]
Outputs NC program to be compared with already registered one to CNC.
NC program output is a string of ASCII code characters.
"Start output of NC program to be compared(cnc_vrfstart)" must be
called before outputting NC program to be compared to CNC, and "Stop
output NC program to be compared(cnc_vrfend)" after outputting.
Format of NC program to be compared is same as one of "Output NC
program to be registered(cnc_download)"
Refer description of "cnc_download" function for format of output
data, etc.
There is one buffer (256 bytes) between CNC and C library. It is used
as a ring.
Buffer size = 256 bytes
+--------------------------------------------------+
+-->| 1st output | 2nd output | ... | | --+
| +--------------------------------------------------+ |
| |
+----------------------------------------------------------+
When any data can not be output because comparing process has not been
completed (i.e. the buffer is full), the C library waits until it can
be output. ERROR 5 and 8 may be returned late because NC program is
sent to CNC via buffers. That is, the return code of an output process
may be one of it several times before.
Moreover, return codes of several output before the last one may be
returned by "Stop output NC program to be compared(cnc_vrfend)".