📄 hmican_usb.h
字号:
__REG32 ID6_8 :1; //////////////////
__REG32 ID6_9 :1;
__REG32 ID6_10 :1;
__REG32 ID6_11 :1;
__REG32 ID6_12 :1; //////////////////
__REG32 ID6_13 :1;
__REG32 ID6_14 :1;
__REG32 ID6_15 :1;
__REG32 ID6_16 :1; //////////////////
__REG32 ID6_17 :1;
__REG32 ID6_18 :1;
__REG32 ID6_19 :1;
__REG32 ID6_20 :1; //////////////////
__REG32 ID6_21 :1;
__REG32 ID6_22 :1;
__REG32 ID6_23 :1;
__REG32 ID6_24 :1; //////////////////
__REG32 ID6_25 :1;
__REG32 ID6_26 :1;
__REG32 ID6_27 :1;
__REG32 ID6_28 :1; //////////////////
__REG32 ID6_29 :1;
__REG32 ID6_30 :1;
__REG32 ID6_31 :1;
__REG32 ID6_32_59 :28;
__REG32 ID6_60_63 :4;
} ID6Snd_bits;
typedef struct {
__REG32 ID7_0_7 :8;
__REG32 ID7_8_15 :8;
__REG32 ID7_16_23 :8;
__REG32 ID7_24_31 :8; ////////
__REG32 ID7_32_56 :25; ////////
__REG32 ID7_57 :1;
__REG32 ID7_58 :1;
__REG32 ID7_59 :1;
__REG32 ID7_60_63 :4;
} ID70Snd_bits;
typedef struct {
__REG32 ID7_0_6 :7;
__REG32 ID7_7_13 :7;
__REG32 ID7_14_20 :7;
__REG32 ID7_21_27 :7;
__REG32 ID7_28_31 :4; ////////
__REG32 ID7_32_38 :7;
__REG32 ID7_39_45 :7;
__REG32 ID7_46_52 :7;
__REG32 ID7_53_59 :7;
__REG32 ID7_60_63 :4;
} ID71Snd_bits;
/*typedef struct {
__REG32 ID7_0_7 :8;
__REG32 ID7_8_15 :8;
__REG32 ID7_16_23 :8;
__REG32 ID7_24_31 :8; ////////
__REG32 ID7_32_60 :29; ////////
__REG32 ID7_61 :1;
__REG32 ID7_62 :1;
__REG32 ID7_63 :1;
} ID7_bits;*/
typedef struct {
unsigned long l32 :32;
unsigned long h32 :32;
}__Long64bits;
typedef struct {
unsigned char c7 :8;
unsigned char c6 :8;
unsigned char c5 :8;
unsigned char c4 :8;
unsigned char c3 :8;
unsigned char c2 :8;
unsigned char c1 :8;
unsigned char c0 :8;
}__Char64bits;
//////////接收数据定义
union{
__Char64bits SndRevChar0;
ID0_bits ID0;
} ;
union{
__Char64bits SndRevChar1;
ID1_bits ID1;
} ;
union{
__Char64bits SndRevChar2;
ID2_bits ID2;
} ;
union{
__Char64bits SndRevChar3;
ID3_bits ID3;
} ;
union{
__Char64bits SndRevChar4;
ID4_bits ID4;
} ;
union{
__Char64bits SndRevChar5;
ID50_bits ID50;
ID51_bits ID51;
ID52_bits ID52;
} ;
union{
__Char64bits SndRevChar6;
ID60_bits ID60;
ID61_bits ID61;
} ;
union{
__Char64bits SndRevChar7;
ID70_bits ID70;
ID71_bits ID71;
} ;
//////////发送数据定义
union{
__Char64bits SndRevChar00;
ID0_bits IDSnd0;
} ;
union{
__Char64bits SndRevChar11;
ID1_bits IDSnd1;
} ;
union{
__Char64bits SndRevChar22;
ID2_bits IDSnd2;
} ;
union{
__Char64bits SndRevChar33;
ID3_bits IDSnd3;
} ;
union{
__Char64bits SndRevChar44;
ID4_bits IDSnd4;
} ;
union{
__Char64bits SndRevChar50;
ID50Snd_bits IDSnd50;
};
union{
__Char64bits SndRevChar51;
ID51Snd_bits IDSnd51;
};
union{
__Char64bits SndRevChar52;
ID52Snd_bits IDSnd52;
};
union{
__Char64bits SndRevChar66;
ID6Snd_bits IDSnd6;
} ;
/* union{
__Char64bits SndRevChar77;
ID7_bits IDSnd7;
} ;*/
union{
__Char64bits SndRevChar70;
ID70Snd_bits IDSnd70;
} ;
union{
__Char64bits SndRevChar71;
ID71Snd_bits IDSnd71;
} ;
union pUnion
{
float fval;
unsigned char cval[4];
} myUnion;
union lpUnion
{
float fval;
unsigned long lval;
} myUnionl;
//////////////接收参数
bool ACUisMain; //ACU为主机
int InOil[16]; //各缸注油总次数
int InOilAllCount; //总注油次数
//int InOilPerMin[16];
////////////////////////////////////ACU发过来的
bool dire[16]; //延时方向
int delayRev[16]; //延时值
int ICount[16]; //注油次数
float tempcurRev,tempaRev,tempbRev,loadcurRev,loadaRev,loadbRev; //温度传感器电流,a,b,负荷传感器电流,a,b
int luboiltemp,luboiltempalmh,luboiltempalml; //转速,滑油温度,滑油温度高报警值,滑油温度低报警值
float pressure,sulfur; //平均有效压力,含硫量
bool IsStart[16]; //各缸启动
bool IsNormal[16]; ////各缸正常中断
bool IsBig[16]; //各缸大小
bool IsEnable[16]; //使能
int preJet[16]; //各缸预喷动作次数
int Temp,Load,Speed;
int worktype; //工作模式
int TempSet,LoadSet,SpeedSet; //测试专用温度负荷速度设定
bool IsTempSet,IsLoadSet,IsSpeedSet; //显示设定值或真实值
float h[16],hSet[16]; //0-15缸h值
int state[16]; //缸测试状态
int rank[16]; //缸的状态磨合系数档位值
float q,A;
int Nmco;
/////////////////////////////////////////////BCU发过来的
bool direB[16]; //延时方向
int delayRevB[16]; //延时值
int ICountB[16]; //注油次数
float tempcurRevB,tempaRevB,tempbRevB,loadcurRevB,loadaRevB,loadbRevB; //温度传感器电流,a,b,负荷传感器电流,a,b
int luboiltempB,luboiltempalmhB,luboiltempalmlB; //转速,滑油温度,滑油温度高报警值,滑油温度低报警值
float pressureB,sulfurB; //平均有效压力,含硫量
bool IsStartB[16]; //各缸启动
bool IsNormalB[16]; ////各缸正常中断
bool IsBigB[16]; //各缸大小
bool IsEnableB[16]; //使能
int preJetB[16]; //各缸预喷动作次数
int TempB,LoadB,SpeedB;
int TempSetB,LoadSetB,SpeedSetB; //测试专用温度负荷速度设定
bool IsTempSetB,IsLoadSetB,IsSpeedSetB; //显示设定值或真实值
float hB[16],hSetB[16]; //0-15缸h值
float qB,AB;
int NmcoB;
int stateB[16]; //缸测试状态
int worktypeB; //工作模式
int rankB[16]; //缸的状态磨合系数档位值
////////////////发送参数
bool direSnd[16];
int delaySnd[16];
float tempcurSnd,tempaSnd,tempbSnd,loadcurSnd,loadaSnd,loadbSnd; //温度传感器电流,a,b,负荷传感器电流,a,b
int luboiltempalmhSnd,luboiltempalmlSnd; //滑油温度高报警值,滑油温度低报警值
int sulfurSnd,NmcoSnd; //含硫量
bool IsStartSnd[16]; //各缸启动
bool IsNormalSnd[16]; ////各缸正常中断
bool IsBigSnd[16]; //各缸大小
bool IsEnableSnd[16]; //使能
bool IsTempSetSnd,IsLoadSetSnd,IsSpeedSetSnd; //温度测试使能负荷测试使能转速测试使能:
int TempSnd,LoadSnd,SpeedSnd; //温度测试,负荷测试,速度测试
float hSnd[16]; //0-15缸h值
int stateSnd[16]; //缸测试状态
int rankSnd[16]; //缸的状态磨合系数档位值
int worktypeSnd; //工作模式
float qSnd,ASnd;
CString almlist[28];
///////////////////
int saveflag;
int forceflag;
int m_cannum;
int m_devtype;
DWORD m_devind;
int m_connect;
int freshflag1,freshflag2,freshflag3;
int strtodata(unsigned char *str, unsigned char *data,int len,int flag);
int chartoint(unsigned char chr, unsigned char *cint);
void SendData(CString frmid,__Char64bits SndChar) ;
bool alarm[28]; //报警
bool alarmB[28]; //报警
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CHMIcan_usbApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CHMIcan_usbApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
extern CHMIcan_usbApp theApp;
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_HMICAN_USB_H__EA844F33_7E4B_4C90_B336_E99E3B0CDC9E__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -