
------------------------------------------------------------------------------
1.64 Read operator's message. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_rdopmsg
[Syntax]
#include <data.h>
#include <fwindow.h>
short cnc_rdopmsg( short type , short length, struct msg *buf ) ;
struct msg {
short datano ; /* Operator's message number. */
short type ; /* Kind of operator's message. */
short char_num ; /* Message length. */
char data[N] ; /* Operator's message. */
} ; /* N is maximum length of string. */
[Arguments]
type Kind of the operator's message ( =0,1,2,3 ).
length Data block length ( =6+(maximum length of string) )
buf Buffer in which the operator's message is stored.
[Return]
EW_OK( 0) Successful.
EW_ATTRIB( 4) Incorrect kind of the operator's message "type".
EW_NOOPT( 6) External message or option of external data input isn't
added.
[Description]
Reads the contents of the operator's message displayed in the CNC's
screen.
Be sure to set "0" to "type".
The operator's message number (100,..,999 or 2000,..,2099) is stored
in "buf.datano" with binary format.
When no operator's message is displayed, "-1" is stored.
Always "0" is stored in "buf.data".
The ASCII strings which terminated by a null character ('¥x00') is
stored in "buf.data". The length of string stored in "buf.data" is
stored in "buf.char_num" with binary format.
This function cannot read any of PMC alarm messages 1000 to 1999.