Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 1050 -
6. Detail of CNC window function's input/output data
The general structure of CNC window' input/output data is as follows.
(1) Case of function code is equal to or less than 255.
iodata[0] Function code
iodata[1] Return code
iodata[2] Data length
iodata[3] Data number
iodata[4] Data attribute
iodata[5] and later Data area
(2) Case of function code is equal to or greater than 256.
iodata[0] Function code
iodata[1] Return code
iodata[2] Data length
*(long *)&iodata[3] Data number #1
iodata[5] Data attribute
*(long *)&iodata[6] Data number #2
*(unsigned long *)&iodata[8] Data address
Function code This number specifies function of CNC window.
Return code The return code is stored here.
Generally, "0" if successful, non-"0" if any error.
Data length This specifies input/output data size.
Data number, These specify kind of process, index number or kind
Data attribute, of data.
Data number #1,
Data number #2
Data address This specifies address in where input/output data are
stored.
A linear address of data area is stored. "Pointer"
format address that used in C language program is
not allowed. "Data area" is an arbitrary memory
space the application program allocates.
All data are stored in binary format. Negative value is represented as 2's
complement. How data are stored in each member depends on individual CNC
window function. All data may not always have to be stored.