1、 3 99 EV1000 2 1 RS232 PC RS485 PLC TD1000 TD2000 TD2100 EV1000 RS485-RS232 RS232 PC EV1000 RS485 RS485-RS232 1 2 RS485 8-N-2 19200bps FF 1 Modbus 2 3 100120 3 Modbus RTU ASCII 3.5 3.5 Modbus RTU 0x3A : 0xD,0xA Modbus ASCII 2 Modbus Big Endian RTU RTU Modbus Modbus 100 3 EV1000 3.5 CRC-16 CRC 3.5 1
2、002 0x01 0x03 0x00 0x02 0x00 0x01 0x25 0xCA 1 0x01 0x03 0x02 0x13 0x88 0xB5 0x12 ASCII 0x3A 0x0D 0x0A ASCII ASCII 4 4 ASCII 7 A F ASCII LRC ASCII Modbus 4000 0xFA0 1 002 LRC =(01+06+00+02+0x0F+0xA0) =0x48 LRC : 0 1 0 6 0 0 0 2 0 F A 0 4 8 CRLF ASCII 3A 30 31 30 36 30 30 30 32 30 46 41 30 34 38 0D 0A
3、 RTU 3.5 ASCII 1ms 4 Modbus Modbus 0x03 0x06 0x08 0x10 0x41 0x42 Modbus F0 0x00 F1 0x01 F2 0x02 F3 0x03 F4 0x04 F5 0x05 F6 0x06 F7 0x07 F8 0x08 F9 0x09 FA 0x0A Fb 0x0B FC 0x0C Fd 0x0D FE 0x0E FF 0x0F FH 0x10 FL 0x11 Fn 0x12 FP 0x13 FU 0x14 0x32 0x33 F3.02 0x302 FF.01 0xF01 Modbus Modbus RTU ASCII 3
4、101 EV1000 1 0x03 1 2* 2* 0x80 0x1 0x2 0x3 0x4 0x5 0x6 0x18 0x20 0x22 1 0x06 2 0x00000xFFFF 2 0x00000xFFFF 1 0x06 2 0x00000xFFFF 2 0x00000xFFFF 0x80 1 0x08 2 0x00000x0030 2 0x00000xFFFF : 1 0x08 2 0x00000x0030 2 0x00000xFFFF 88H 0x0000 0x0000 0x0001 0xFF00 0xFF00 0x0003 00 00 ASCII , 0x7F, 0x3A 0x00
5、04 0x0000 0x0000 0x0000 0x00300x0001 0x0001 102 3 EV1000 1 0x10 2 0x00000xFFFF 2 0x00010x0004 1 2* 2* 1 0x10 2 0x00000xFFFF 2 0x00010x0004 0x41 0x06 0x06 0x41 0x41 0x06 1 0x42 2 0x00000x0007 2 ( ) 1 0x42 2 0x00000x0007 2 0x00000xFFFF 0x0000 0x0001 0x0002 0x0003 00 0x0004 00 00 0x0005 3 103 EV1000 00
6、 00 0x0006 0x3300 0x0007 0x3300 2 Bit 000B 010B 1 011B 2 100 3 Bit2Bit0 Bit3 00B 1 Bit5Bit4 01B 10B 11B Bit7Bit6 00B 0000B 0001B HZ 0010B A 0011B V 0100B r/min 0101B m/s 0110B % Bit11Bit8 1 4 Bit12 0 Bit15Bit13 0x3200 0x3201 0x3202 0x3203 0x3204 0x3205 AO1 0x3206 AO2 0x3207 DO 0x3208 0x3209 0x320A 1
7、 0x320B 1 0x3300 1 0x3301 0x3302 0x3303 0x3304 0x3305 0x3306 0x3307 0x3308 0x3309 0x330A 0x330B 0x330C 0x330D 0x330E 0x330F BIT014=X1X8,Y1,Y2,TC,FAN,BRAKE,FWD,REV 0x3310 0x3311 0x3312 0x3313 0x3314 0x3315 104 3 EV1000 0x3316 0x3317 0x3318 0x3319 VCI 0x331A CCI 0x331B 0x331C 1 0x331D 1 0x331E 0 1 2 0
8、x331F 2 0x3320 0 1 1 2 UP/DN 2 3 3 VCI 4 CCI 5 PULSE 6 0x3321 : 0 9999 TD EV 1000 2000 3000 3100 TDXXXX 0*1000+0*100+XXXX/100 EVXXXX :1*1000+0*100+XXXX/100 PVXXXX :1*1000+0*100+XXXX/100+1 111B 110B 0 101B 1 011B 2 Bit2 1 0 100B 1 Bit3 0 1 Bit4 0 1 Bit5 0 1 Bit6 0 1 Bit7 0 1 Bit8 0 1 Bit9 0 Bit15Bit1
9、0 000000B Bit4 Bit5 Bit0Bit2 1 1 Bit0 0 1 Bit1 0 Bit2 1 3 105 EV1000 0 1 Bit3 0 Bit74 0000B Bit158 000xFF 0 0 E014 0x0E 0x1F 2 1 Bit0 0 1 Bit1 0 1 PLC Bit2 0 PLC 1 Bit3 0 1 Bit4 0 1 Bit5 0 1 Bit6 0 5 1 ASCII 2 3 FH.09 FP.03 FP.00 FP.00 4 MODBUS 6 CRC CRC-16 CRC-16 C CRC 106 3 EV1000 unsigned short C
10、RC16 ( unsigned char *msg, unsigned char length) /* The function returns the CRC as a unsigned short type */ unsigned char uchCRCHi = 0xFF ; /* high byte of CRC initialized */ unsigned char uchCRCLo = 0xFF ; /* low byte of CRC initialized */ unsigned uIndex ; /* index into CRC lookup table */ while
11、(length-) /* pass through message buffer */ uIndex = uchCRCLo *msg+ ; /* calculate the CRC */ uchCRCLo = uchCRCHi (crcvalueuIndex 8); uchCRCHi =crcvalueuIndex return (uchCRCHi | uchCRCLo8) ; /* Table of CRC values */ const unsigned int crcvalue = 0x0000,0xC1C0,0x81C1,0x4001,0x01C3,0xC003,0x8002,0x41
12、C2,0x01C6,0xC006,0x8007,0x41C7, 0x0005,0xC1C5,0x81C4,0x4004,0x01CC,0xC00C,0x800D,0x41CD,0x000F,0xC1CF,0x81CE,0x400E, 0x000A,0xC1CA,0x81CB,0x400B,0x01C9,0xC009,0x8008,0x41C8,0x01D8,0xC018,0x8019,0x41D9, 0x001B,0xC1DB,0x81DA,0x401A,0x001E,0xC1DE,0x81DF,0x401F,0x01DD,0xC01D,0x801C,0x41DC, 0x0014,0xC1D4
13、,0x81D5,0x4015,0x01D7,0xC017,0x8016,0x41D6,0x01D2,0xC012,0x8013,0x41D3, 0x0011,0xC1D1,0x81D0,0x4010,0x01F0,0xC030,0x8031,0x41F1,0x0033,0xC1F3,0x81F2,0x4032, 0x0036,0xC1F6,0x81F7,0x4037,0x01F5,0xC035,0x8034,0x41F4,0x003C,0xC1FC,0x81FD,0x403D, 0x01FF,0xC03F,0x803E,0x41FE,0x01FA,0xC03A,0x803B,0x41FB,0x
14、0039,0xC1F9,0x81F8,0x4038, 0x0028,0xC1E8,0x81E9,0x4029,0x01EB,0xC02B,0x802A,0x41EA,0x01EE,0xC02E,0x802F,0x41EF, 0x002D,0xC1ED,0x81EC,0x402C,0x01E4,0xC024,0x8025,0x41E5,0x0027,0xC1E7,0x81E6,0x4026, 0x0022,0xC1E2,0x81E3,0x4023,0x01E1,0xC021,0x8020,0x41E0,0x01A0,0xC060,0x8061,0x41A1, 0x0063,0xC1A3,0x81A2,0x4062,0x0066,0xC1A6,0x81A7,0x4067,0x01A5,0xC065,0x8064,0x41A4, 0x006C,0xC1AC,0x81AD,0x406D,0x01AF,0xC06F,0x806E,0x41AE,0x01AA,0xC06A,0x806B,0x41AB, 0x0069,0xC1A9,0x81A8,0x4068,0x0078,0xC1B8,0x81B9,0x4079,0x01BB,0xC07B,0x807A,0x41BA, 0x01BE,0xC07