From 9e2fbcdc62bc4b45519715c8243446a11ee011cf Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期三, 20 十二月 2023 17:26:27 +0800 Subject: [PATCH] goborrow rtu地址-1 --- 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