From be40c6bbad18cee0444c50069d98967cd26b6c3b Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期二, 19 十二月 2023 20:10:24 +0800
Subject: [PATCH] plc读写参数调整,读写方式调整

---
 crontask/cron_task.go |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/crontask/cron_task.go b/crontask/cron_task.go
index 2ee7286..da24026 100644
--- a/crontask/cron_task.go
+++ b/crontask/cron_task.go
@@ -38,7 +38,7 @@
 		}
 		for _, addressItem := range plcConfig.Details {
 			if addressItem.FieldName == constvar.PlcStartAddressTypeFinishNumber {
-				value, err := service.PlcReadDirect(plcConfig, addressItem.StartAddress, addressItem.Length, addressItem.Type)
+				value, err := service.PlcReadDirect(plcConfig, addressItem)
 				if err != nil {
 					logx.Infof("plc read finish number err: %v", err)
 					continue
@@ -64,7 +64,7 @@
 		}
 		for _, addressItem := range plcConfig.Details {
 			if addressItem.FieldName == constvar.PlcStartAddressTypeTotalNumber {
-				value, err := service.PlcReadDirect(plcConfig, addressItem.StartAddress, addressItem.Length, addressItem.Type)
+				value, err := service.PlcReadDirect(plcConfig, addressItem)
 				if err != nil {
 					logx.Infof("plc read total number err: %v", err)
 					continue
@@ -81,9 +81,9 @@
 
 	if isMaster {
 		s.Every(20).Seconds().Do(SyncProductionProgress) //鍚屾鐢熶骇鏁版嵁
-		//s.Every(30).Seconds().Do(SyncTaskStatus)         //鍚屾浠诲姟鐘舵��
-		s.Every(10).Seconds().Do(CheckNsqConn) //鏌ヨnsq杩炴帴
-		s.Every(30).Seconds().Do(ReportData)   //涓婃姤鏁版嵁
+		s.Every(30).Seconds().Do(SyncTaskStatus)         //鍚屾浠诲姟鐘舵��
+		s.Every(10).Seconds().Do(CheckNsqConn)           //鏌ヨnsq杩炴帴
+		s.Every(30).Seconds().Do(ReportData)             //涓婃姤鏁版嵁
 	}
 
 	s.Every(20).Seconds().Do(QueryClusterStatus) //鏌ヨ闆嗙兢鑺傜偣鏁伴噺

--
Gitblit v1.8.0