DEVICE WRITE(向 PLC 软设备写入值)
始 命令 首地址 位数 数据 终 和校验
STX CMD GROUP ADDRESS BYTES 1ST DATA 2ND DATA . . . . . . LAST DATA ETX SUM
例子: 向 D123 开始的两个存储器中写入 1234, ABCD
02h 31h 31h, 30h, 46h, 36h 30h, 34h 33h, 34h, 31h, 32h, 43h, 44h, 41h, 42h 03h 34h, 39h
地址算法: address=address*2+1000h
求问D123怎么转换成31h, 30h, 46h, 36h的SUM=CMD+. . . . . . +ETX;
求问SUM=31h+31h+30h+46h+36h+30h+34h+33h+34h+31h+32h+43h+44h+41h+42h+03h = 34h, 39h[ 此帖被天涯gg在2023-02-28 09:57重新编辑 ]