zhangqian
2023-09-16 98ea38910b2795c86023c54b83d70030c7bb08c5
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()