发布于 2010-06-07 19:35:54
3楼
自己上来神一下,哈!这样就可以了
Private Sub Command1_Click()
Dim t(8) As Byte
t(0) = &H1
t(1) = &H5
t(2) = &H0
t(3) = &H3
t(4) = &HFF
t(5) = &H0
t(6) = &H7C
t(7) = &H3A
MSComm1.Output = CVar(t)
End Sub
Private Sub Form_Load()
With MSComm1
.CommPort = 1
.Settings = "19200,n,8,1"
.InputMode = comInputModeBinary
End With
MSComm1.PortOpen = True
End Sub