qq240559043
干就完了
級別: 略有小成
精華主題: 0
發(fā)帖數(shù)量: 191 個
工控威望: 332 點
下載積分: 4111 分
在線時間: 144(小時)
注冊時間: 2012-06-06
最后登錄: 2024-12-19
查看qq240559043的 主題 / 回貼
樓主  發(fā)表于: 2022-01-18 19:25
觸摸屏存儲數(shù)據(jù),用的配方存儲。一個配方分兩次存。先得到前半部分數(shù)據(jù)->存儲->后半部份如何寫空

if RFormula_Selection > -1  then
           SetData(RFormula_Selection, "Local HMI", RECIPE, "DATA1.Selection")
          
           StringGet(Mode[0], "Local HMI", RECIPE, "DATA1.Mode")
           GetData(QR[0], "Local HMI", RECIPE, "DATA1.ProdInfo")
           //StringGet(QR[0], "Local HMI", RECIPE, "DATA1.ProdInfo")
           StringGet(date[0], "Local HMI", RECIPE, "DATA1.Date1")
           GetData(AirP, "Local HMI", RECIPE, "DATA1._Result")
           StringGet(date2[0], "Local HMI", RECIPE, "DATA1.Date2")
           GetData(TestP, "Local HMI", RECIPE, "DATA1.TestP")
           GetData(Leap, "Local HMI", RECIPE, "DATA1.Leak")
           StringGet(Result1[0], "Local HMI", RECIPE, "DATA1.T_Result")
          
          
           StringSet(Mode[0], "Local HMI", LW, 1000 + index*100, 1)
           StringSet(QR[0], "Local HMI", LW, 1001 + index*100, 20)
           StringSet(date[0], "Local HMI", LW, 1022 + index*100, 11)
           SetData(AirP, "Local HMI", LW, 1040+ index*100, 1)
           if StringLength(date2[0]) == 0 then
              //StringSet(null[0], "Local HMI", LW, 1042 + index*100, 11)
              SetData(null[0], "Local HMI", LW, 1042 + index*100, 11)
           else
              StringSet(date2[0], "Local HMI", LW, 1042 + index*100, 11)
           end if
           SetData(TestP, "Local HMI", LW, 1060+ index*100, 1)
           SetData(Leap, "Local HMI", LW, 1062+ index*100, 1)
           StringSet(Result1[0], "Local HMI", LW, 1064 + index*100, 4)
       else  //寫入空值
           SetData(null[0], "Local HMI", LW, 1000 + index*100, 1)
           SetData(null[0], "Local HMI", LW, 1001 + index*100, 20)
           SetData(null[0], "Local HMI", LW, 1022 + index*100, 11)
           SetData(F_Zero, "Local HMI", LW, 1040+ index*100, 1)
           SetData(null[0], "Local HMI", LW, 1042 + index*100, 11)
           SetData(F_Zero, "Local HMI", LW, 1060+ index*100, 1)
           SetData(F_Zero, "Local HMI", LW, 1062+ index*100, 1)
           SetData(null[0], "Local HMI", LW, 1064 + index*100, 4)
       end if
本帖最近評分記錄:
  • 下載積分:+1(bruce2020) 真誠感謝!