觸摸屏存儲數(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