Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 482 -
------------------------------------------------------------------------------
1.67 Read modal data. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_modal
[Syntax]
#include <data.h>
#include <fwindow.h>
int cnc_modal( int type, int block, struct odbmo *buf ) ;
struct odbmo {
int datano ; /* Kind of modal data. */
int type ; /* Objective block. */
union {
char g_data[2] ; /* Modal data of G code. */
struct {
long aux_data ; /* Modal data other than G code.*/
char flag1 ; /* Flag1. */
char flag2 ; /* Flag2. */
} aux ;
} modal ;
} ;
[Arguments]
type Kind of modal data.
block Objective block.
buf Buffer in which the modal data are stored.
[Return]
0 Successful.
3 Incorrect kind of data "type".
4 Incorrect objective block "block".
-1 It has been failed to read modal data because
the CNC software was updating the modal data.
[Description]
Reads the modal information of CNC.
The readable modal data are modal G code, M/S/T code or commanded data
such as F.
Specify the kind of modal data to be read in "type". (mentioned later)
Specify the objective block to be read in "block".
block Block to be read.
-------+-------------------------
0 Currently executed block
1 Next block
2 Next to next block