本人在用RS232 進行資料傳輸時,把萬用表的GPIB地址設定成非31,用官網提供的keysight IO Libraries Suite 發送 MEAS:VOLT:DC?
MEAS:VOLT:AC? 可以進行相應的功能卻換,換成31 則不對。本人想用VB語言進行撰寫上位機界面,自己試了一下不管設定什么地址都
發送指令萬用表都沒有反應,求大俠幫看看。設定地址為31自動接收來自萬用表的資料,但是發送指令沒有反應,設定成別的地址發送接收都沒有反應
Private Sub Comm1_OnComm() '接收到的字符顯示在文本框中 ,是一個接收事件觸發
Select Case Comm1.CommEvent
Case comEvReceive
txtR.Text = txtR.Text + Trim(Comm1.Input)
txtR.SelStart = Len(txtR.Text) '將文本框中的位置移到最下端,是的最新的資料可以顯示
End Select
End Sub
Private Sub Command2_Click() '退出系統
End
End Sub
Private Sub Command3_Click()
txtR.Text = ""
incom.Text = ""
End Sub
Private Sub Command4_Click() '發送指令
Comm1.Output = "MEAS:VOLT:DC?"
End Sub
Private Sub Form_Load() '表單下載打開串口
Comm1.CommPort = 1
Comm1.Settings = "9600,n,8,1"
Comm1.PortOpen = True
Comm1.RThreshold = 1
End Sub
哪位大神有相關代碼可否發給我一份,非常感謝 [email protected] [email protected]
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/86812.html
標籤:控件
上一篇:怎么用EXCEL做儀器的資料采集
