henrywang10
級別: 略有小成
精華主題: 0
發(fā)帖數(shù)量: 249 個
工控威望: 306 點(diǎn)
下載積分: 742 分
在線時間: 164(小時)
注冊時間: 2015-10-06
最后登錄: 2024-11-07
查看henrywang10的 主題 / 回貼
樓主  發(fā)表于: 2022-01-03 23:59
歐姆龍CP1H上傳數(shù)據(jù)到威倫觸摸屏并做數(shù)據(jù)庫!
比如將壓力值上傳到觸摸屏,并將多次上傳的值做成數(shù)據(jù)庫,方便查詢!謝謝各位了
qq240559043
干就完了
級別: 略有小成
精華主題: 0
發(fā)帖數(shù)量: 192 個
工控威望: 332 點(diǎn)
下載積分: 4111 分
在線時間: 143(小時)
注冊時間: 2012-06-06
最后登錄: 2024-11-08
查看qq240559043的 主題 / 回貼
1樓  發(fā)表于: 2022-01-04 08:13
圖片:
差不多做完了
henrywang10
級別: 略有小成
精華主題: 0
發(fā)帖數(shù)量: 249 個
工控威望: 306 點(diǎn)
下載積分: 742 分
在線時間: 164(小時)
注冊時間: 2015-10-06
最后登錄: 2024-11-07
查看henrywang10的 主題 / 回貼
2樓  發(fā)表于: 2022-01-04 22:23
這得會宏指令。∮悬c(diǎn)人回復(fù)你明白
qq240559043
干就完了
級別: 略有小成
精華主題: 0
發(fā)帖數(shù)量: 192 個
工控威望: 332 點(diǎn)
下載積分: 4111 分
在線時間: 143(小時)
注冊時間: 2012-06-06
最后登錄: 2024-11-08
查看qq240559043的 主題 / 回貼
3樓  發(fā)表于: 2022-01-12 08:12
//********配方系統(tǒng)變量的定義******
short Formula_Selection   //選中配方的編號
short Formula_Count   //配方大小
char Formula_QR[20]       //配方中產(chǎn)品的二維碼

char null[20] = "                "

GetData(Formula_Count, "Local HMI", RECIPE, "DATA1.Count")
GetData(Formula_Selection, "Local HMI", RECIPE, "DATA1.Selection")
GetData(search, "Local HMI", LB, 500, 1)
if search == true then
   StringGet(QR[0], "Local HMI", LW, 500, 10)
    /////********************************搜索配方中是否存在相同產(chǎn)品的二維碼信息******************
   if Formula_Count > 0 then
      index_dis = 0
      for index_qr = 0 to Formula_Count step 1
          QR_Same = true
          SetData(index_qr, "Local HMI", RECIPE, "DATA1.Selection")
          StringGet(Formula_QR[0], "Local HMI", RECIPE, "DATA1.ProdInfo")
          for index = 0 to 1 step 1
              if QR[0] <> Formula_QR [0] then
                 QR_Same = false
                 break
              end if
           next
           if QR_Same == true then
              //搜索到相同的數(shù)據(jù),打印
              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_dis*100, 1)
              StringSet(QR[0], "Local HMI", LW, 1001 + index_dis*100, 20)
              StringSet(date[0], "Local HMI", LW, 1022 + index_dis*100, 11)
              SetData(AirP, "Local HMI", LW, 1040+ index_dis*100, 1)
              if date2[0] == ' ' then
                 StringSet(null[0], "Local HMI", LW, 1042 + index_dis*100, 11)
              else
                 StringSet(date2[0], "Local HMI", LW, 1042 + index_dis*100, 11)
              end if
              SetData(TestP, "Local HMI", LW, 1060+ index_dis*100, 1)
              SetData(Leap, "Local HMI", LW, 1062+ index_dis*100, 1)
              StringSet(Result1[0], "Local HMI", LW, 1064 + index_dis*100, 4)
              if index_dis < 9 then
                 index_dis = index_dis + 1
                 disFull = false
              else
                 disFull = true
              end if
              //break
           end if
       //DELAY(3000)
       next
       if disFull == false then
           for index = index_dis to 9 step 1
               StringSet(null[0], "Local HMI", LW, 1000 + index*100, 1)
               StringSet(null[0], "Local HMI", LW, 1001 + index*100, 20)
               StringSet(null[0], "Local HMI", LW, 1022 + index*100, 11)
               SetData(F_Zero, "Local HMI", LW, 1040+ index*100, 1)
               StringSet(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)
               StringSet(null[0], "Local HMI", LW, 1064 + index*100, 4)
           next
       end if
    end if
end if
henrywang10
級別: 略有小成
精華主題: 0
發(fā)帖數(shù)量: 249 個
工控威望: 306 點(diǎn)
下載積分: 742 分
在線時間: 164(小時)
注冊時間: 2015-10-06
最后登錄: 2024-11-07
查看henrywang10的 主題 / 回貼
4樓  發(fā)表于: 2022-01-16 23:16
雖然用不上,還是非常感謝樓上的幫助