用MSComm控件对仪器编程问题
仪器说明:To start the remote control,users need to send "[+]" (neglect the quotation marks)command first to enable the remote control function.When in the remote mode,REMOTE indicator will turn on.
9 to 9 pins RS-232 cabling:
PIN NUMBER PIN NUMBER
TX 2 2 RX
RX 3 3 TX
GND 5 5 GND
Private Sub cmdReset_Click()
Dim buffer As Variant
With Form1.MSComm1
.CommPort = 1
.PortOpen = True
If .PortOpen = False Then .PortOpen = True
.Settings = 9600 & ",N," & 8 & "," & 1
.InputLen = 1
.Handshaking = comRTS
.RTSEnable = True
.InputMode = comInputModeText
buffer = "+"
.Output = buffer
Text2.Text = buffer
Text1.Text = .Input
End With
If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
End Sub
用仪器附带的工具就可以控制到仪器,我怎么做都不行,请高人指点。