52 lines
927 B
C
52 lines
927 B
C
|
#ifndef MESSAGE_H
|
|||
|
#define MESSAGE_H
|
|||
|
|
|||
|
typedef unsigned char CHAR;
|
|||
|
|
|||
|
#define ANSWER_LEN 0x80 //70 // 16+16+16+16+6
|
|||
|
#define REPLY_LEN 0x19
|
|||
|
|
|||
|
#define byte_hi byte_1
|
|||
|
#define byte_lo byte_0
|
|||
|
|
|||
|
typedef struct
|
|||
|
{
|
|||
|
unsigned char Address; // <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
unsigned char Number; // <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
BAITE byte0;
|
|||
|
BAITE byte1;
|
|||
|
BAITE byte2;
|
|||
|
BAITE byte3;
|
|||
|
BAITE byte4;
|
|||
|
BAITE byte5;
|
|||
|
BAITE byte6;
|
|||
|
BAITE byte7;
|
|||
|
|
|||
|
unsigned char crc_lo;
|
|||
|
unsigned char crc_hi;
|
|||
|
unsigned char add_byte;
|
|||
|
} CMD_TO_TMS;
|
|||
|
|
|||
|
extern WORDE Modbus[];
|
|||
|
extern WORDE reply[];
|
|||
|
|
|||
|
extern LONGE* outputs;
|
|||
|
|
|||
|
extern int DataAnalog1,DataAnalog2;
|
|||
|
|
|||
|
extern unsigned int Maska[][9];
|
|||
|
|
|||
|
//void ReceiveCommand(RS_DATA *rs_arr);
|
|||
|
void ReceiveCommandModbus3(RS_DATA *rs_arr);
|
|||
|
void ReceiveCommandModbus6(RS_DATA *rs_arr);
|
|||
|
|
|||
|
void reset_errs(int sens, ERROR er);
|
|||
|
|
|||
|
void Save_params(void);
|
|||
|
void Load_params(void);
|
|||
|
void Load_caliber(void);
|
|||
|
void Default_params(void);
|
|||
|
|
|||
|
#endif //MESSAGE_H
|