毕设外文翻译(6)
发布时间:2021-06-07
发布时间:2021-06-07
cell transported from NC server to NC core
{
Bit32 Flag;//transfer content type
Bit32 dword0; //control flag, file new or old, or first data
Bit32 dword1; //file flag, command type, or second data
Bit32 dword2; //file name size, cell number, or third data
Bit32 dword3; //file data size, size of a cell, or fourth
data
union DataBuffer{
struct CharData
{
char dataBuf1[40]; //file name, or first buffer unit
char dataBuf2[1024]; //file content, or second buffer
unit
}String;
struct LongData
{
Bit32 databuf[300];
}Data;
}buf;
};//1220Bytes
从数控子系统发送到数控服务器的状态数据结构如下:
#define AxisNumMax 9
struct nc_status_data{
Bit32 command_pos[AxisNumMax];
Bit32 actual_pos[AxisNumMax];
double command_vel[AxisNumMax]; // Velocity
double actual_vel[AxisNumMax];
float feed_speed;
char message_buf[1024];
struct NC_EVENT event_buf;
struct ERROR_MSG err_buf;
int mode,status;
int free_buf;
int current_feature;//thread,line,dot line,color
Bit32 current_gcode_row,current_o_num;
};//1303 bytes
struct NC_EVENT{
long msgtype;
unsigned char sentry;
int used;
};
struct ERROR_MSG
{