亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? tsda.frm

?? 用于電腦和TSDA臺(tái)灣伺服控制器進(jìn)行通訊
?? FRM
?? 第 1 頁 / 共 2 頁
字號(hào):
Dim j As Integer
Dim S As String
Dim a As String
Dim b(4) As String
VSgrid.Enabled = False
Cmd_read.Enabled = False
Cmd_save.Enabled = False
Cmd_exit.Enabled = False
VSgrid.Editable = flexEDNone
Adodc1.Recordset.MoveFirst
For i = 1 To Adodc1.Recordset.RecordCount
   If Adodc1.Recordset.EOF = True Then GoTo R_END
    MSComm1.OutBufferCount = 0 '...清空輸出寄存器
    S = Adodc1.Recordset.Fields("地址")
    MSComm1.Output = Sx_str(S) '...發(fā)送數(shù)據(jù)
    Delay (80)
    If i = 11 Or i = 12 Or i = 13 Or i = 14 Then
       a = Rx_str(MSComm1.Input)
       If Len(a) = 1 Then GoTo R_END
       For j = 1 To 4
          Adodc1.Recordset.Fields("當(dāng)前值") = Val(Mid(a, 5 - j, 1))
          Adodc1.Recordset.Update
          
          Adodc1.Recordset.MoveNext
       Next
       
    Else
        a = Rx_str(MSComm1.Input)
        If a = "!" Then GoTo R_END
        Adodc1.Recordset.Fields("當(dāng)前值") = Val("&h" & a)
        Adodc1.Recordset.Update
        Adodc1.Recordset.MoveNext
    End If
Next

R_END:
Adodc1.Recordset.MoveFirst
Cmd_read.Enabled = True
Cmd_save.Enabled = True
Cmd_exit.Enabled = True
VSgrid.Enabled = True
End Sub




Private Sub Cmd_save_Click() '傳送
Dim S As String
Dim D As String
Dim Check As String
If Write_enable = False Then
   MsgBox ("傳送不允許!")
   Exit Sub
End If
VSgrid.Enabled = False
Cmd_read.Enabled = False
Cmd_save.Enabled = False
Cmd_exit.Enabled = False
VSgrid.Editable = flexEDNone
Adodc1.Recordset.MoveFirst

For i = 1 To 10
'   If Adodc1.Recordset.EOF = True Then GoTo R_END
    MSComm1.OutBufferCount = 0 '...清空輸出寄存器
    S = Adodc1.Recordset.Fields("當(dāng)前值")
    D = Adodc1.Recordset.Fields("地址")
    MSComm1.Output = W_str(S, D) '...發(fā)送數(shù)據(jù)
    Delay (200)
    Check = MSComm1.Input
    If Check = "!" Then
       MsgBox ("數(shù)值設(shè)置錯(cuò)誤!請(qǐng)檢查")
       GoTo W_END
    End If
    If Check = "" Then
       MsgBox ("通訊錯(cuò)誤,請(qǐng)檢查通訊電纜連接是否正確!")
        GoTo W_END
    End If
    Adodc1.Recordset.MoveNext

    
Next
For i = 10 To 13
    MSComm1.OutBufferCount = 0 '...清空輸出寄存器
    S = ""
    D = Adodc1.Recordset.Fields("地址")
    For j = 1 To 4
      S = S & Trim(Adodc1.Recordset.Fields("當(dāng)前值"))
      Adodc1.Recordset.MoveNext
    Next
    MSComm1.Output = W4_str(S, D) '...發(fā)送數(shù)據(jù)
    Delay (200)
    Check = MSComm1.Input
    If Check = "!" Then
       MsgBox ("數(shù)值設(shè)置錯(cuò)誤!請(qǐng)檢查")
       GoTo W_END
    End If
    If Check = "" Then
       MsgBox ("通訊錯(cuò)誤,請(qǐng)檢查通訊電纜連接是否正確!")
       GoTo W_END
    End If
    
Next
For i = 13 To 39
'   If Adodc1.Recordset.EOF = True Then GoTo R_END
    MSComm1.OutBufferCount = 0 '...清空輸出寄存器
    S = Adodc1.Recordset.Fields("當(dāng)前值")
    D = Adodc1.Recordset.Fields("地址")
    MSComm1.Output = W_str(S, D) '...發(fā)送數(shù)據(jù)
    If Not Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveNext
    Delay (200)
    Check = MSComm1.Input
    If Check = "!" Then
       MsgBox ("數(shù)值設(shè)置錯(cuò)誤!請(qǐng)檢查")
       GoTo W_END
    End If
    If Check = "" Then
       MsgBox ("通訊錯(cuò)誤,請(qǐng)檢查通訊電纜連接是否正確!")
       GoTo W_END
    End If
Next
W_END:
Adodc1.Recordset.MoveFirst
Cmd_read.Enabled = True
Cmd_save.Enabled = True
Cmd_exit.Enabled = True
VSgrid.Enabled = True
End Sub

Private Sub Form_Load() '...初始化
On Error GoTo MY_END


MSComm1.CommPort = 1 '...使用Com1口

MSComm1.Settings = "9600,n,8,1" '...設(shè)置通訊參數(shù)

MSComm1.PortOpen = True '...打開串口

VSgrid.ColHidden(9) = True
VSgrid.ColHidden(10) = True
Adodc1.RecordSource = "參數(shù)"
'Adodc1.RecordSource = "select * from 參數(shù) where 控制模式 like 'A'"
Adodc1.Refresh

VSgrid.Cell(flexcpBackColor, 1, 8, Adodc1.Recordset.RecordCount, 8) = &HE0E0E0
VSgrid.Cell(flexcpFontBold, 1, 8, Adodc1.Recordset.RecordCount, 8) = True
VSgrid.Cell(flexcpForeColor, 1, 8, Adodc1.Recordset.RecordCount, 8) = &HFF0000
VSgrid.Cell(flexcpAlignment, 0, 1, 0, 8) = flexAlignCenterCenter
VSgrid.Cell(flexcpAlignment, 1, 1, Adodc1.Recordset.RecordCount, 1) = flexAlignCenterCenter
VSgrid.Cell(flexcpAlignment, 1, 3, Adodc1.Recordset.RecordCount, 3) = flexAlignCenterCenter
VSgrid.Cell(flexcpAlignment, 1, 4, Adodc1.Recordset.RecordCount, 4) = flexAlignCenterCenter
VSgrid.Cell(flexcpAlignment, 1, 5, Adodc1.Recordset.RecordCount, 5) = flexAlignCenterCenter
VSgrid.Cell(flexcpAlignment, 1, 6, Adodc1.Recordset.RecordCount, 6) = flexAlignCenterCenter
VSgrid.Cell(flexcpAlignment, 1, 7, Adodc1.Recordset.RecordCount, 7) = flexAlignCenterCenter
VSgrid.Cell(flexcpAlignment, 1, 8, Adodc1.Recordset.RecordCount, 8) = flexAlignCenterCenter
Exit Sub
MY_END:
MsgBox ("請(qǐng)先到控制面板中ODBC數(shù)據(jù)源設(shè)定data.mdb為TSDA")
End Sub

Private Sub VSgrid_AfterEdit(ByVal Row As Long, ByVal Col As Long)
If VSgrid.TextMatrix(Row, Col) = Temp Then Exit Sub
VSgrid.Cell(flexcpBackColor, Row, Col, Row, Col) = &HC0C0FF
End Sub

Private Sub VSgrid_BeforeEdit(ByVal Row As Long, ByVal Col As Long, Cancel As Boolean)
Temp = VSgrid.TextMatrix(Row, Col)
End Sub

Private Sub VSgrid_Click()
If Adodc1.Recordset.Fields("定義") <> "" Then
   Lab_sm.Caption = Adodc1.Recordset.Fields("定義")
Else
   Lab_sm.Caption = "無說明"
End If
End Sub


Private Function Sx_str(ByVal str As String) As String
Dim a As String
Dim b As String
Dim c As String
Dim i As Integer
Dim S1 As String
Dim S2 As String
Dim Check_sum As String

a = "&h52" 'R
b = "&h35" '5

S1 = "&h" & Hex(Asc(Left(str, 1)))
S2 = "&h" & Hex(Asc(Right(str, 1)))
Check_sum = Hex(Val(a) + Val(b) + Val(S1) + Val(S2))
Sx_str = "R5" & Trim(str) & Check_sum

End Function

Private Function Rx_str(ByVal str As String) As String
Dim a As String
Dim b As String
Dim c As String
Dim i As Integer
Dim S(7) As String
Dim Check_sum As String

For i = 1 To 7
   
   S(i) = Mid(str, i, 1)
   If S(1) <> "%" Then
      Rx_str = "!"
      MsgBox ("無法讀取到數(shù)據(jù),請(qǐng)檢查通訊電纜后重試!")
      Exit Function
   End If
Next

Check_sum = Hex(Val(Asc(S(1))) + Val(Asc(S(2))) + Val(Asc(S(3))) + Val(Asc(S(4))) + Val(Asc(S(5))))
If Val("&h" & Right(Check_sum, 2)) = Val("&h" & S(6) & S(7)) Then
   Rx_str = S(2) & S(3) & S(4) & S(5)
Else
   MsgBox ("check number error!")
End If

End Function


Private Function W_str(ByVal str As String, ByVal ad As String) As String
Dim a As String
Dim b As String
Dim c As String
Dim i, j As Integer
Dim L As Integer
Dim S(10) As String
Dim buff As Long
Dim Check_sum As String

S(1) = "W" 'W
S(2) = "5" '5
S(3) = Mid(ad, 1, 1)
S(4) = Mid(ad, 2, 1)
    
    a = Hex(Val(str))
    L = Len(a)
    Select Case L
    Case 0
      MsgBox ("數(shù)值為空")
    
    Case 1
      S(5) = "0"
      S(6) = "0"
      S(7) = "0"
      S(8) = a
    Case 2
      S(5) = "0"
      S(6) = "0"
      S(7) = Mid(a, 1, 1)
      S(8) = Mid(a, 2, 1)
    Case 3
      S(5) = "0"
      S(6) = Mid(a, 1, 1)
      S(7) = Mid(a, 2, 1)
      S(8) = Mid(a, 3, 1)
    Case 4
      S(5) = Mid(a, 1, 1)
      S(6) = Mid(a, 2, 1)
      S(7) = Mid(a, 3, 1)
      S(8) = Mid(a, 4, 1)
    End Select
    buff = 0
    For j = 1 To 8
        buff = buff + Val(Asc(S(j)))
    Next
    check_num = Hex(buff)
    check_num = Right(check_num, 2)
    W_str = ""
    For j = 1 To 8
        W_str = W_str & S(j)
    Next
    W_str = W_str & check_num


End Function
Private Function W4_str(ByVal str As String, ByVal ad As String) As String
Dim a As String
Dim b As String
Dim c As String
Dim i, j As Integer
Dim L As Integer
Dim S(10) As String
Dim buff As Long
Dim Check_sum As String

S(1) = "W" 'W
S(2) = "5" '5
S(3) = Mid(ad, 1, 1)
S(4) = Mid(ad, 2, 1)
    a = str
S(5) = Mid(a, 4, 1)
S(6) = Mid(a, 3, 1)
S(7) = Mid(a, 2, 1)
S(8) = Mid(a, 1, 1)
buff = 0
For j = 1 To 8
    buff = buff + Val(Asc(S(j)))
Next
check_num = Hex(buff)
check_num = Right(check_num, 2)
W4_str = ""
For j = 1 To 8
    W4_str = W4_str & S(j)
Next
W4_str = W4_str & check_num


End Function


Private Sub VSgrid_RowColChange()
   If Edit_mode = False Then Exit Sub
   If VSgrid.Col = 8 Then
      
      VSgrid.Editable = flexEDKbd
      SendKeys "{ENTER}"
   Else
      VSgrid.FocusRect = flexFocusNone
      VSgrid.Editable = flexEDNone
   End If
End Sub

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产99一区视频免费| 秋霞电影一区二区| 97久久精品人人做人人爽50路| 精品国产人成亚洲区| 国产不卡免费视频| 国产精品天天摸av网| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 91精品在线一区二区| 午夜久久久久久久久久一区二区| 欧美日高清视频| 免费成人av在线| 国产欧美一二三区| 色94色欧美sute亚洲线路一ni | 久久久精品国产99久久精品芒果 | 国产精品一色哟哟哟| 久久久美女毛片| 一本高清dvd不卡在线观看| 亚洲精品乱码久久久久| 欧美日韩国产影片| 精品亚洲porn| 亚洲日本va午夜在线影院| 欧美三级乱人伦电影| 精品一区二区三区久久久| 中文字幕精品—区二区四季| 在线观看一区二区精品视频| 蜜桃视频一区二区三区| 国产精品美女久久久久av爽李琼| 欧美在线色视频| 久久av资源站| 亚洲精品中文字幕在线观看| 欧美一级片在线观看| 波多野结衣精品在线| 日韩专区在线视频| 亚洲欧洲精品成人久久奇米网| 一区二区三区在线观看国产| 日韩一区二区影院| 91在线小视频| 韩国女主播一区| 亚洲激情欧美激情| 亚洲精品一区二区三区99| 91国产免费观看| 粉嫩一区二区三区性色av| 日日夜夜免费精品| 亚洲六月丁香色婷婷综合久久| 精品日韩在线观看| 欧美日韩综合在线免费观看| 成人黄色在线视频| 免费亚洲电影在线| 亚洲线精品一区二区三区八戒| 久久久久久久久99精品| 制服丝袜日韩国产| 在线欧美日韩精品| 成av人片一区二区| 国产高清无密码一区二区三区| 午夜激情一区二区三区| 亚洲丝袜美腿综合| 国产三级精品在线| 精品va天堂亚洲国产| 91精品蜜臀在线一区尤物| 色偷偷88欧美精品久久久| 国精产品一区一区三区mba桃花| 91精品蜜臀在线一区尤物| 亚洲日本一区二区三区| 国产精品精品国产色婷婷| 国产精品午夜在线观看| 日本aⅴ亚洲精品中文乱码| 欧美在线色视频| 色伊人久久综合中文字幕| 久久99久久99| 丝袜亚洲另类欧美| 韩国一区二区在线观看| 97精品久久久午夜一区二区三区| 欧美疯狂性受xxxxx喷水图片| 国产精品欧美一区二区三区| 韩日av一区二区| 91免费版在线看| 正在播放一区二区| 中文字幕一区二区三区不卡| 亚洲国产日韩一级| 亚洲欧美国产毛片在线| 在线综合+亚洲+欧美中文字幕| 岛国精品一区二区| 色综合久久中文综合久久牛| 欧美精品三级在线观看| 国产成人午夜精品5599| 91猫先生在线| 蜜臀久久99精品久久久久久9| 国产精品综合视频| 91热门视频在线观看| 日韩一区在线播放| 91精品国产黑色紧身裤美女| 欧美日韩一区二区在线观看 | 99re热这里只有精品免费视频| 中文字幕亚洲区| 欧美视频一区二区三区在线观看| 一区二区在线电影| 久久99久国产精品黄毛片色诱| 国产乱码精品1区2区3区| 亚洲精品福利视频网站| 国内精品自线一区二区三区视频| 欧美日韩精品一区二区三区四区| 欧美大片在线观看| av福利精品导航| 免费在线观看不卡| 亚洲电影激情视频网站| 日韩免费看的电影| 秋霞电影网一区二区| 国产一区二区主播在线| 日韩欧美中文字幕公布| 欧美日韩亚洲不卡| 成人av免费在线观看| 99re成人在线| 国产福利精品一区| 久久99国产精品久久99果冻传媒| 欧美在线一区二区| 国产成人无遮挡在线视频| 亚洲国产裸拍裸体视频在线观看乱了| 国产一区二区精品久久91| av在线免费不卡| 最新国产精品久久精品| 成人免费毛片app| 中文字幕一区视频| 久久久久国产精品免费免费搜索| 亚洲高清免费一级二级三级| 欧美精品在线一区二区三区| 成人免费黄色在线| 99精品视频在线观看| 精品久久一二三区| 亚洲卡通欧美制服中文| 91久久精品网| 成人三级伦理片| 日韩视频在线一区二区| 欧美视频中文字幕| 国产成人在线观看| 欧美日韩国产综合一区二区| 国产欧美日韩不卡| 久久精品夜夜夜夜久久| 日韩理论片在线| 国产亚洲一本大道中文在线| 4438x成人网最大色成网站| 中文一区在线播放| 午夜精品福利一区二区蜜股av| 亚洲欧美日韩久久| 欧美日韩亚洲综合在线| 中文字幕第一区综合| 偷拍一区二区三区四区| www.亚洲精品| 337p日本欧洲亚洲大胆精品 | 日韩电影在线观看电影| 色综合久久久久网| 国产亚洲女人久久久久毛片| 麻豆成人久久精品二区三区红| 欧美羞羞免费网站| 亚洲精品成人悠悠色影视| 99视频在线精品| 国产精品乱码人人做人人爱 | 婷婷综合久久一区二区三区| 99re这里只有精品视频首页| 亚洲国产成人自拍| 国产毛片精品视频| 精品国产污污免费网站入口| 日本不卡不码高清免费观看| 欧美日韩国产色站一区二区三区| 亚洲激情综合网| 色综合欧美在线视频区| 亚洲三级电影网站| 色妞www精品视频| 亚洲自拍偷拍av| 欧美三片在线视频观看| 亚洲午夜在线电影| 欧美天堂一区二区三区| 亚洲国产精品一区二区尤物区| 在线这里只有精品| 午夜一区二区三区视频| 欧美区一区二区三区| 视频一区二区不卡| 日韩午夜在线观看| 久久99国内精品| 国产欧美日韩在线视频| 成人av在线网站| **欧美大码日韩| 欧美亚洲国产一区二区三区va| 亚洲国产精品综合小说图片区| 欧美日韩欧美一区二区| 青椒成人免费视频| 精品久久国产老人久久综合| 国产精品亚洲成人| 136国产福利精品导航| 欧美在线免费观看亚洲| 日本在线不卡视频| 久久日一线二线三线suv| 粉嫩一区二区三区性色av| 亚洲摸摸操操av| 欧美久久久久久久久中文字幕| 久久机这里只有精品| 国产精品欧美极品| 欧美乱熟臀69xxxxxx| 精品一区二区三区av| 成人欧美一区二区三区1314 | 日韩黄色在线观看|