From 20bbbcc1d14536ddaa498ac84a6008828df8dc1c Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期三, 13 十二月 2023 20:23:11 +0800 Subject: [PATCH] 往plc写目标数时,优先往写入地址写,没有写入地址再往读取地址写 --- test/plc_test.go | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/test/plc_test.go b/test/plc_test.go index 92ea393..d0e2475 100644 --- a/test/plc_test.go +++ b/test/plc_test.go @@ -17,7 +17,7 @@ log.Fatal(err) } var readValue int - raw, err := service.ReadHoldingRegister(ipPort, address, 1) + raw, err := service.ReadByModbusTCP(ipPort, address, 1) if err != nil { log.Fatal(err) } -- Gitblit v1.8.0