From 98ea38910b2795c86023c54b83d70030c7bb08c5 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期六, 16 九月 2023 22:06:18 +0800
Subject: [PATCH] 更改:UINT to DINT

---
 pkg/plc/apacheplc4x/modbus.go |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkg/plc/apacheplc4x/modbus.go b/pkg/plc/apacheplc4x/modbus.go
index 2f17e8d..4a07521 100644
--- a/pkg/plc/apacheplc4x/modbus.go
+++ b/pkg/plc/apacheplc4x/modbus.go
@@ -52,7 +52,7 @@
 
 func readHoldingRegisterSingle(connection plc4go.PlcConnection, address int) ([]byte, error) {
 	tag := fmt.Sprintf("tag:%v", address)
-	tagAddress := fmt.Sprintf("holding-register:%d:UINT", address)
+	tagAddress := fmt.Sprintf("holding-register:%d:DINT", address)
 
 	// 璇绘ā寮�
 	readRequest, err := connection.ReadRequestBuilder().AddTagAddress(tag, tagAddress).Build()
@@ -82,7 +82,7 @@
 
 func readHoldingRegisterList(connection plc4go.PlcConnection, address, length int) ([]byte, error) {
 	tag := fmt.Sprintf("tag:%v:%v", address, length)
-	tagAddress := fmt.Sprintf("holding-register:%d:UINT[%d]", address, length)
+	tagAddress := fmt.Sprintf("holding-register:%d:DINT[%d]", address, length)
 
 	// 璇绘ā寮�
 	readRequest, err := connection.ReadRequestBuilder().AddTagAddress(tag, tagAddress).Build()

--
Gitblit v1.8.0