
------------------------------------------------------------------------------
1.33 Read alarm information. <Main,Alarm>
------------------------------------------------------------------------------
[Name]
cnc_rdalminfo
[Syntax]
#include <data.h>
#include <fwindow.h>
short cnc_rdalminfo( short type, short alm_type, short length,
struct alminfo *buf ) ;
struct alminfo {
union {
struct {
struct {
long axis ; /* Axis information. */
short alm_no ; /* Alarm number. */
} alm[N] ; /* N is number of messages to be read. */
long data_end ;
} alm1 ;
struct {
struct {
long axis ; /* Axis information. */
short alm_no ; /* Alarm number. */
short msg_len ; /* Message length. */
char alm_msg[32] ; /* Alarm message. */
} alm[N] ; /* N is number of messages to be read. */
long data_end ;
}alm2 ;
} u ;
} ;
[Arguments]
type Data format ( =0(without message), 1(with message) ).
alm_type Kind of alarm ( =0,..,31 ).
length Data block length ( =4+6*N(without message),
4+40*N(with message) ).
buf Buffer in which the alarm information is stored.
[Return]
EW_OK( 0) Successful.
EW_LENGTH( 2) Incorrect data block length "length".
EW_NUMBER( 3) Incorrect data format type "type".
EW_DATA( 5) Incorrect kind of alarm "alm_type".