资源描述:
《VC++实现基于MODBUS协议通信程序》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、MASTER:staticunsignedcharauchCRCHiQ={0x00,0xC1,0x81,0x40,0x01,OxCO,0x80,0x41,0x01,0x00,0x80,0x41,0x00,OxC1,0x81,0x40,0x01,0x00,0x80,0x41,0x00,OxC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,OxCO,0x80,0x41,0x01,OxCO,0x80,0x41,0x00,OxC1,0x81,0x40,0x00,0x01,0x81,0x4
2、0,0x01,OxCO,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,OxCO,0x80,0x41,0x01,OxCO,0x80:0x41,0x00,0xC1,0x81,0x40,0x01,OxCO,0x80,0x41,0x00,OxC1,0x81,0x40,0x00,OxCt0x81,0x40,0x01,OxCO,0x80,0x41,0x00,0xC150x81,0x40,0x01,OxCO,0x80,0x41,0x01,OxCO,0x80,0x41,0x00,OxC1,0x81
3、,0x40?0x00?OxC1,0x81,0x40,0x01,OxCO,0x80,0x41,0x01,OxCO,0x80,0x41,0x00,OxC1,0x81,0x40,0x01,OxCO,0x80,0x41,0x00,OxC1,0x81?0x40,0x00,OxC1,0x81,0x40,0x01,OxCO?0x80,0x41,0x01,OxCO,0x80,0x41,0x00,OxC1?0x81,0x40,0x00,OxC1,0x81,0x40,0x01,OxCO,0x80,0x41,0x00,OxC1
4、,0x81,0x40,0x01,OxCO,0x80,0x41,0x01,OxCO,0x80,0x41,0x00,OxC1,0x81,0x40,0x00,OxC1,0x81,0x40t0x01,OxCO,0x80,0x41,0x01,0x00,0x80,0x41,0x00,0x01,0x81,0x40,0x01,0x00,0x80,0x41,0x00,OxC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,OxCO,0x80,0x41,0x00,OxCt0x81,0x40,0x01,
5、OxCO,0x80,0x41,0x01,OxCO,0x80,0x41,0x00,0xC1,0x81,0x40,0x01;OxCO,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,OxC1,0x81,0x40,0x01,OxCO,0x80,0x41,0x01,OxCO,0x80,0x41,0x00,OxC1,0x81,0x40,0x00,OxC1,0x81,0x40,0x01,OxCO,0x80,0x41,0x00,OxC1,0x81,0x40,0x01,OxCO,0x80,0x41,
6、0x01,OxCO,0x80,0x41,0x00,OxC1?0x81,0x40};staticunsignedcharauchCRCLo[]={0x00,OxCO,0xC1,0x01,0xC3,0x03,0x02,0xC2,0xC6,0x06,0x07,0xC7,0x05,0xC5,OxC4,0x04,OxCC,OxOC,OxOD,OxCD,OxOF,OxCF?OxCE,0x0E,OxOA,OxCA,OxCB,OxOB,0xC9?0x09,0x08,0xC8,0xD8,0x18,0x19,0xD9,0x1
7、B,OxDB,OxDA,0x1A,0x1E,OxDE,OxDF,0x1F,OxDD,0x1D,0x1C,OxDC,0x14,0xD4,0xD5,0x15,0xD7,0x17,0x16,0xD6,0xD2,0x12,0x13,0xD3,0x11,OxD1,OxDO,0x10,OxFO,0x30,0x31,OxF1,0x33,0xF3,0xF2,0x32,0x36,0xF6,0xF7,0x37,0xF5,0x35,0x34,0xF4,0x3C,OxFC,OxFD,0x3D,OxFF,0x3F,0x3E,OxF
8、E,OxFA,0x3A,0x3B,OxFB,0x39,0xF9,0xF8,0x38,0x28,0xE8,0xE9,0x29,OxEB,Ox2B,0x2A,OxEA,OxEE,0x2E,0x2F,OxEF,0x2D,OxED,OxEC,0x2C,0xE4,0x24,0x25,0xE5,0x27,0xE7,0xE6,0x26,0x22,0xE2,0xE3,0x23,OxE1,0x21,0x20,OxEO,OxAO,0x60,0x6