用MSComm控件对仪器编程问题

zhouats2000 2003-03-13 08:04:20
仪器说明: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

用仪器附带的工具就可以控制到仪器,我怎么做都不行,请高人指点。
...全文
62 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhouats2000 2003-03-14
  • 打赏
  • 举报
回复
大哥,关健就是控制不到仪器呀
zt31 2003-03-14
  • 打赏
  • 举报
回复
不是明白吗,怎么还问?
zhouats2000 2003-03-14
  • 打赏
  • 举报
回复
To:fangboy(猛将兄)

Users need to send "[+]" (neglect the quotation marks)command first to enable the remote control function.

仪器说明:
1. [:Used to represent the start of a command.
2. ]:Used to represent the end of a command.
3. +:Command used to enable/start a remote connection
4. -:Command used to disable/terminate a remote connection
fangboy 2003-03-13
  • 打赏
  • 举报
回复
不是写了要发送“[+]”吗?你怎么只发了一个“+”号?

1,451

社区成员

发帖
与我相关
我的任务
社区描述
VB 控件
社区管理员
  • 控件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧