⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmain.h

📁 用CS5532做的无线吊钩称的接收称重显示器程序
💻 H
📖 第 1 页 / 共 2 页
字号:
0x12,0x16,0x0c,0x20,0x01,0x00,
0x12,0x16,0x0c,0x20,0x02,0x00,
0x12,0x16,0x0c,0x20,0x05,0x00,
};
unsigned char code textcheck[]=
{
0x1b,0x0e,0x1c,0x20,0x15,0x17,//set  lo
0x1b,0x0e,0x1c,0x20,0x11,0x12,//set  up
};
unsigned char code textcleanadd[]=
{
0x1c,0x17,0x20,0x0c,0x15,0x1a, //to clr
0x1c,0x17,0x20,0x18,0x1f,0x0c, //to p-c
0x1c,0x17,0x20,0x18,0x1a,0x1c, //to prt
};
unsigned char code textclock[]=
{
0x1b,0x0e,0x1c,0x20,0x0d,0x0a,//set  da
0x1b,0x0e,0x1c,0x20,0x1c,0x12, //set ti
};
unsigned char code textoff[]=
{
0x0c,0x15,0x17,0x0c,0x14,0x20,  //clk
0x0b,0x15,0x20,0x20,0x20,0x20,  //bl
0x0b,0x0e,0x0e,0x18,0x20,0x20,  //beep                                      
};
unsigned char code textunitswitch[]=
{
0x1d,0x1c,0x20,0x17,0x0f,0x0f,
0x1d,0x1c,0x20,0x20,0x17,0x16
};
unsigned char code textclockmodel[]=
{
0x0c,0x15,0x14,0x20,0x17,0x0f,
0x0c,0x15,0x14,0x20,0x17,0x16,
};
unsigned char code textbeepmodel[]=
{
0x0b,0x18,0x20,0x20,0x20,0x01,
0x0b,0x18,0x20,0x20,0x20,0x02,
0x0b,0x18,0x20,0x20,0x20,0x03,
};
unsigned char code textbkmodel[]=
{
0x0e,0x15,0x20,0x20,0x0a,0x1d,
0x0e,0x15,0x20,0x17,0x0f,0x0f,
0x0e,0x15,0x20,0x20,0x17,0x16,
};
unsigned char code textcommodel[]=
{
0x18,0x20,0x0a,0x1d,0x1c,0x17,  //p auto
0x18,0x20,0x20,0x18,0x1a,0x1c,  //p  prt
0x18,0x20,0x0c,0x17,0x16,0x1c,  //p  cont
0x1b,0x0e,0x12,0x20,0x1a,0x0e,  //sei re
0x0a,0x1b,0x14,0x20,0x20,0x20,  //ask 
0x18,0x20,0x0c,0x16,0x1c,0x02,  //p  cot2 5                 
};
unsigned char code textptype[]=
{
0x1c,0x1e,0x20,0x20,0x1c,0x18,  //ty  tp
0x1c,0x1e,0x20,0x07,0x01,0x01,  //ty 711
0x15,0x18,0x1f,0x05,0x00,0x20,  //lp-50
};
unsigned char code textplab[]=
{
0x15,0x0a,0x0b,0x20,0x20,0x00, //lab  0
0x15,0x0a,0x0b,0x20,0x20,0x01, //lab  1
0x15,0x0a,0x0b,0x20,0x20,0x02, //lab  2
0x15,0x0a,0x0b,0x20,0x20,0x03, //lab  3
};
unsigned char code textbaud[]=
{
0x0b,0x20,0x20,0x06,0x00,0x00,  //600
0x0b,0x20,0x01,0x02,0x00,0x00,  //1200
0x0b,0x20,0x02,0x04,0x00,0x00,  //2400
0x0b,0x20,0x04,0x08,0x00,0x00,  //4800
0x0b,0x20,0x09,0x06,0x00,0x00,  //9600
};
unsigned char code textpformat[]=
{
0x18,0x1a,0x20,0x20,0x20,0x00, //pr  0
0x18,0x1a,0x20,0x20,0x20,0x01, //pr  1
0x18,0x1a,0x20,0x20,0x20,0x02, //pr  2
0x18,0x1a,0x20,0x20,0x20,0x03, //pr  3
0x18,0x1a,0x20,0x20,0x20,0x04, //pr  4
0x18,0x1a,0x20,0x20,0x20,0x05, //pr  5
0x18,0x1a,0x20,0x20,0x20,0x06, //pr  6
0x18,0x1a,0x20,0x20,0x20,0x07, //pr  7
};
unsigned char code textprotocol[]=
{
0x0c,0x17,0x16,0x1c,0x20,0x01,
0x0c,0x17,0x16,0x1c,0x20,0x02,
0x0c,0x17,0x16,0x1c,0x20,0x03
};
unsigned char code textpcs[]=
{
0x18,0x20,0x20,0x20,0x01,0x00,
0x18,0x20,0x20,0x20,0x02,0x00,
0x18,0x20,0x20,0x20,0x05,0x00,
0x18,0x20,0x20,0x01,0x00,0x00,
0x18,0x20,0x20,0x02,0x00,0x00
};
unsigned char code textscalemodel[]=
{
0x30,0x17,0x0d,0x0e,0x20,0x01,
0x30,0x17,0x0d,0x0e,0x20,0x02,
0x30,0x17,0x0d,0x0e,0x20,0x03,
0x30,0x17,0x0d,0x0e,0x20,0x04,
};
unsigned char code textpass[]=
{
	0x20,0x18,0x0a,0x1b,0x1b,0x20	//pass
};
unsigned char code textfail[]=
{
	0x20,0x0f,0x0a,0x12,0x15,0x20	//fail
};
unsigned char code textuwlow[]=
{
	0x20,0x31,0x33,0x15,0x17,0x32	//fail
};
/////////////////
unsigned char code snfdn_kg[]=
{
5,1,2,5,10,20,50
};
unsigned char code snfdn_lb[]=
{
1,2,5,10,20,50,100
};

code unsigned char snfd2[]=      /////零点跟踪范围
{
0,1,2,4,8
};

code unsigned char snmanualzero[]=
{
2,4,10,20,50,100
};
code unsigned char snpcs[]=
{
10,20,50,100,200
};


code unsigned char snautozero[]=
{
0,2,4,10,20
};

unsigned long code snepx[]=
{
1,10,100,1000,10000,100000,1000000
};

unsigned char code snday[]=
{
0,32,30,32,31,32,31,32,
32,31,32,31,32,
};
//////////////
/////////////////////////lp_50的格式
unsigned char code   textlpstart[]=
{
"FR\"AA\"\r\n\
?\r\n#"
};

unsigned char code   textlpend[]=
{
"P1,1\r\n#"
};	     			 
///////////////打印机参数   
unsigned char code  textlppara[]=
{
"FK\"AA\"\r\n\
FS\"AA\"\r\n\
V00,07,N,\"A\"\r\n\
V01,07,N,\"B\"\r\n\
V02,07,N,\"C\"\r\n\
V03,07,N,\"D\"\r\n\
V04,07,N,\"E\"\r\n\
V05,02,N,\"F\"\r\n\
V06,07,N,\"G\"\r\n\
V07,07,N,\"H\"\r\n\
V08,07,N,\"I\"\r\n\
V09,02,N,\"J\"\r\n\
D8\r\n\
I0\r\n\
ZT\r\n\
Q200,50\r\n\
q384\r\n\
j0\r\n\		     
TDY4/MN/DD\r\n\   
TTH:M\r\n\ 
R0,0\r\n#"
};	   
//////////////
unsigned char code textlptime[]=
{
"A30,11,0,4,1,1,N,TD\"    \"TT\r\n#"
};
///////////////
unsigned char code textlpout00[]=
{
"A32,82,0,4,1,2,N,\"WEIGHT:   \"V01V05\r\n\   
FE\r\n#"
};
unsigned char code textlpout01[]=
{
"A30,60,0,4,1,2,N,\"WEIGHT:   \"V01V05\r\n\   
A30,120,0,4,1,2,N,\"TOTAL:    \"V02V05\r\n\   
FE\r\n#"
};
unsigned char code textlpout02[]=
{
"A40,60,0,4,1,1,N,\"NET:    \"V01V05\r\n\   
A40,100,0,4,1,1,N,\"GROSS:  \"V06V05\r\n\   
A40,140,0,4,1,1,N,\"TARE:   \"V07V05\r\n\   
FE\r\n#"
};
unsigned char code textlpout03[]=
{
"A40,50,0,4,1,1,N,\"NET:    \"V01V05\r\n\   
A40,85,0,4,1,1,N,\"GROSS:  \"V06V05\r\n\   
A40,120,0,4,1,1,N,\"TARE:   \"V07V05\r\n\   
A40,155,0,4,1,1,N,\"TOTAL:  \"V02V05\r\n\   
FE\r\n#"
};
unsigned char code textlpout04[]=
{
"A30,110,0,4,1,2,N,\"WEIGHT:   \"V01V05\r\n\   
A30,50,0,4,1,2,N,\"S/NO:     \"V00\r\n\   
FE\r\n#"
};
unsigned char code textlpout05[]=
{
"A40,100,0,4,1,1,N,\"WEIGHT:  \"V01V05\r\n\   
A40,140,0,4,1,1,N,\"TOTAL:   \"V02V05\r\n\   
A40,60,0,4,1,1,N,\"S/NO:    \"V00\r\n\   
FE\r\n#"
};
unsigned char code textlpout06[]=
{
"A40,85,0,4,1,1,N,\"NET:    \"V01V05\r\n\   
A40,120,0,4,1,1,N,\"GROSS:  \"V06V05\r\n\   
A40,155,0,4,1,1,N,\"TARE:   \"V07V05\r\n\   
A40,50,0,4,1,1,N,\"S/NO:   \"V00\r\n\   
FE\r\n#"
};
unsigned char code textlpout07[]=
{
"A40,75,0,4,1,1,N,\"NET:    \"V01V05\r\n\   
A40,105,0,4,1,1,N,\"GROSS:  \"V06V05\r\n\   
A40,135,0,4,1,1,N,\"TARE:   \"V07V05\r\n\   
A40,165,0,4,1,1,N,\"TOTAL:  \"V02V05\r\n\   
A40,45,0,4,1,1,N,\"S/NO:   \"V00\r\n\   
FE\r\n#"
};
unsigned char code textlpout08[]=
{
"A40,120,0,4,1,2,N,\"TOTAL:  \"V02V05\r\n\   
A40,60,0,4,1,2,N,\"S/NO:   \"V00\r\n\   
FE\r\n#"
};
unsigned char code textlpout09[]=
{
"A30,60,0,4,1,1,N,\"WEIGHT:   \"V01V05\r\n\   
A30,100,0,4,1,1,N,\"UNIT WT:  \"V03V09\r\n\   
A30,140,0,4,1,1,N,\"PCS:      \"V04\"pcs\"\r\n\   
FE\r\n#"
};
unsigned char code textlpout10[]=
{
"A57,90,0,6,1,1,N,\"重量:\"\r\n\   
A140,93,0,4,1,1,N,V01V05\r\n\   
FE\r\n#"
};
unsigned char code textlpout11[]=
{
"A50,69,0,6,1,1,N,\"重量:\"\r\n\   
A49,123,0,6,1,1,N,\"总重:\"\r\n\   
A149,74,0,4,1,1,N,V01V05\r\n\   
A148,128,0,4,1,1,N,V02V05\r\n\   
FE\r\n#"
};
unsigned char code textlpout12[]=
{
"A50,53,0,6,1,1,N,\"净重:\"\r\n\   
A50,93,0,6,1,1,N,\"毛重:\"\r\n\   
A50,133,0,6,1,1,N,\"皮重:\"\r\n\   
A155,56,0,4,1,1,N,V01V05\r\n\   
A155,96,0,4,1,1,N,V06V05\r\n\   
A155,136,0,4,1,1,N,V07V05\r\n\   
FE\r\n#"
};
unsigned char code textlpout13[]=
{
"A50,47,0,6,1,1,N,\"净重:\"\r\n\   
A50,87,0,6,1,1,N,\"毛重:\"\r\n\   
A50,127,0,6,1,1,N,\"皮重:\"\r\n\   
A50,167,0,6,1,1,N,\"总重:\"\r\n\   
A155,50,0,4,1,1,N,V01V05\r\n\   
A155,90,0,4,1,1,N,V06V05\r\n\   
A155,130,0,4,1,1,N,V07V05\r\n\   
A155,170,0,4,1,1,N,V02V05\r\n\   
FE\r\n#"
};
unsigned char code textlpout14[]=
{
"A47,114,0,6,1,1,N,\"净重:\"\r\n\   
A48,67,0,6,1,1,N,\"序号:\"\r\n\   
A149,72,0,4,1,1,N,V00\r\n\   
A149,118,0,4,1,1,N,V01V05\r\n\   
FE\r\n#"
};
unsigned char code textlpout15[]=
{
"A50,95,0,6,1,1,N,\"净重:\"\r\n\   
A50,140,0,6,1,1,N,\"总重:\"\r\n\   
A50,50,0,6,1,1,N,\"序号:\"\r\n\   
A158,47,0,4,1,1,N,V00\r\n\   
A158,95,0,4,1,1,N,V01V05\r\n\   
A160,140,0,4,1,1,N,V02V05\r\n\   
FE\r\n#"
};
unsigned char code textlpout16[]=
{
"A50,81,0,6,1,1,N,\"净重:\"\r\n\   
A51,116,0,6,1,1,N,\"毛重:\"\r\n\   
A50,153,0,6,1,1,N,\"皮重:\"\r\n\   
A50,46,0,6,1,1,N,\"序号:\"\r\n\   
A156,85,0,4,1,1,N,V01V05\r\n\   
A156,120,0,4,1,1,N,V06V05\r\n\   
A156,156,0,4,1,1,N,V07V05\r\n\   
A157,49,0,4,1,1,N,V00\r\n\   
FE\r\n#"
};
unsigned char code textlpout17[]=
{
"A50,70,0,6,1,1,N,\"净重:\"\r\n\   
A50,100,0,6,1,1,N,\"毛重:\"\r\n\   
A50,132,0,6,1,1,N,\"皮重:\"\r\n\   
A50,165,0,6,1,1,N,\"总重:\"\r\n\   
A50,40,0,6,1,1,N,\"序号:\"\r\n\   
A160,43,0,4,1,1,N,V00\r\n\   
A161,75,0,4,1,1,N,V01V05\r\n\   
A160,106,0,4,1,1,N,V06V05\r\n\   
A160,138,0,4,1,1,N,V07V05\r\n\   
A160,169,0,4,1,1,N,V02V05\r\n\   
FE\r\n#"
};
unsigned char code textlpout18[]=
{
"A50,120,0,6,1,1,N,\"总重:\"\r\n\   
A50,65,0,6,1,1,N,\"序号:\"\r\n\   
A150,122,0,4,1,1,N,V02V05\r\n\   
A149,69,0,4,1,1,N,V00\r\n\   
FE\r\n#"
};
unsigned char code textlpout19[]=
{
"A50,110,0,6,1,1,N,\"单重:\"\r\n\   
A50,65,0,6,1,1,N,\"重量:\"\r\n\   
A150,113,0,4,1,1,N,V03V09\r\n\   
A149,69,0,4,1,1,N,V01V05\r\n\   
A50,152,0,6,1,1,N,\"个量:\"\r\n\   
A149,155,0,4,1,1,N,V04\"pcs\"\r\n\   
FE\r\n#"
};
unsigned char    code     txvc50[]={
                                   		0x20,0x1d,0x0c,0x1f,0x05,0x00
							     	 };

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -