
------------------------------------------------------------------------------
2.3 Read PMC message. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
pmc_rdpcmsg
[Syntax]
#include <data.h>
#include <fwindow.h>
short pmc_rdpcmsg( unsigned short adr_no, unsigned short adr_bit,
struct pmcmsg *buf ) ;
struct pmcmsg {
unsigned short msg_len ; /* Length of message. */
unsigned char pmc_msg[256] ; /* PMC message string. */
} ;
[Arguments]
adr_no PMC address A. ( =0 - 24 )
adr_bit Bit of PMC address A. ( =0 - 7 )
buf Buffer in which PMC message is stored.
[Return]
EW_OK( 0) Successful.
EW_NUMBER( 3) Incorrect PMC address A.
EW_ATTRIB( 4) Incorrect bit of PMC address A.
EW_DATA( 5) No message for specified address.
[Description]
Reads the specified PMC message data.
This function reads the corrsponding message to the specified PMC
address A and bit number.
Specify the number of address A in "adr_no" with binary format.
Specify the bit number 0 - 7 in "adr_bit" with binary format.
The PMC message is stored in "buf.pmc_msg". The PMC message is the
ASCII string as same as one which is displayed in the CNC's alarm
message screen. The 2-byte character such as Japanese Kanji character
is stored by Shift-JIS code. A 'null' character ('¥x00') is added
at the end of the string. The length of the string stored in
"buf.pcm_msg" is stored in "buf.msg_len" with binary format.