Dim Address_R As String
Dim Address_W As String
Dim Address_B As String
Dim ReadPlc As Boolean
Dim Lenth As Double
Dim SetLenth As Double
Dim Bit As String
Dim Instruction As Byte
Private Sub Combo1_Click()
Select Case Combo1.Text
Case "IB"
Address_R = "0000"
Lenth = 1
Case "ID"
Address_R = "0000"
Lenth = 4
Case "IW"
Address_R = "0000"
Lenth = 2
Case "QB"
Address_R = "0100"
Lenth = 1
Case "QD"
Address_R = "0100"
Lenth = 4
Case "QW"
Address_R = "0100"
Lenth = 2 字串6
Case "MB"
Address_R = "0200"
Lenth = 1
Case "MD"
Address_R = "0200"
Lenth = 4
Case "MW"
Address_R = "0200"
Lenth = 2
Case "VB"
Address_R = "0800"
Lenth = 1
Case "VD"
Address_R = "0800"
Lenth = 4
Case "VW"
Address_R = "0800"
Lenth = 2
End Select
End Sub
Private Sub Combo2_Click()
Select Case Combo2.Text
Case "IB"
Address_W = "0000"
SetLenth = 1
Case "ID" 字串2
Address_W = "0000"
SetLenth = 4
Case "IW"
Address_W = "0000"
SetLenth = 2
Case "QB"
Address_W = "0100"
SetLenth = 1
Case "QD"
Address_W = "0100"
SetLenth = 4
Case "QW"
Address_W = "0100"
SetLenth = 2
Case "MB"
Address_W = "0200"
SetLenth = 1
Case "MD"
Address_W = "0200"
SetLenth = 4
Case "MW"
Address_W = "0200"
SetLenth = 2
Case "VB"
字串7
Address_W = "0800"
SetLenth = 1
Case "VD"
Address_W = "0800"
SetLenth = 4
Case "VW"
Address_W = "0800"
SetLenth = 2
End Select
End Sub
Private Sub Combo3_Click()
Select Case Combo3.Text
Case "Q"
Address_B = "0100"
Case "M"
Address_B = "0200"
Case "V"
Address_B = "0800"
End Select
End Sub
Private Sub Combo4_Click()
Select Case Combo4.Text
Case "0"
Bit = "00"

