modbus主站源程程序unsignedcal_crc(char*pucFrame,charusLen)intreadDO(unsignedwReg,unsigned*pwValue)intreadDI(unsignedwReg,unsigned*pwValue)intreadAO(unsignedwReg,unsigned*pwValue)intreadAI(unsignedwReg,unsigned*pwValue)intwriteDO(unsignedwReg,unsignedpwValue)