buttonNum, buttonAddr, buttonNVRAMAddr, oldModBitBack); }
DelayMs(50);
/* Print(\ */
if(0 == responseFromTouch_init) /* 第一次写入Touch_P失败重新写 */
{ responseFromTouch_init = WriteMultipleWordToModBusSlave(comPort, parameterData, parameterNum, parameterAddr);
response = responseFromTouch_init; /* responseFromTouch_P = 1; /*test*/ } else {
/* 读取设定参数 */
response = ReadWordFromModBusSlave(kind, comPort, parameterData, parameterNum, parameterAddr, parameterEEPROMAddr, oldModWordBack); }
/* Print(\ Print(\ */ DelayMs(2);
/* 写入开关量 */
/* response = WriteMultipleBitToModBusSlave(comPort, DOData, DONum, DOAddr); */
response = WriteAllBitByBitToModBusSlave(comPort, DOData, DONum, DOAddr);
/* bitmcpy(oldDOData, DOData, DONum); */
/* Print(\ */ DelayMs(40); /* 写入采样值 */ response = WriteMultipleWordToModBusSlave(comPort, AIData, AINum, AIAddr);
/* Print(\ */ if(response); }
/*-------------------------------------------------------------------------------*/
MODBUS通讯+C语言源代码 - 图文
![](/skin/haowen/images/icon_star.png)
![](/skin/haowen/images/icon_star.png)
![](/skin/haowen/images/icon_star.png)
![](/skin/haowen/images/icon_star.png)