DEVICE WRITE(向 PLC 軟設(shè)備寫入值)
始 命令 首地址 位數(shù) 數(shù)據(jù) 終 和校驗(yàn)
STX CMD GROUP ADDRESS BYTES 1ST DATA 2ND DATA . . . . . . LAST DATA ETX SUM
例子: 向 D123 開始的兩個(gè)存儲(chǔ)器中寫入 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
求問(wèn)D123怎么轉(zhuǎn)換成31h, 30h, 46h, 36h的SUM=CMD+. . . . . . +ETX;
求問(wèn)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重新編輯 ]