NI LabVIEW,CVI,数据采集等产品讨论区

取消
显示结果 
搜索替代 
您的意思是: 

请大虾指教!急!多谢!


附件是vi程序,下面是vb脚本文件(是对两个端口的),运行没有问题。 可是转移到labview
上,却读不出数据。请高手之点一二。谢谢!
Dim GWProbes1 As New ProbeX
Dim GWProbes2 As New ProbeX


Sub LogData()
For i = 4 To 24
For j = 1 To 5
Cells(i, j + 1) = GWProbes1.GetReading(1, j)
Cells(i, j + 6) = GWProbes2.GetReading(1, j)
Next j
Application.Wait Now + TimeValue("0:00:01")
Next i
End Sub

Private Sub Workbook_Open()
GWProbes1.simulated = False
GWProbes1.PortNum = 6
If (GWProbes1.Open) Then
MsgBox "Error opening port 1"
End If
If (GWProbes1.AddProbe(1)) Then
MsgBox "Error connecting to probe 1"
End If
GWProbes2.simulated = False
GWProbes2.PortNum = 2
If (GWProbes2.Open) Then
MsgBox "Error opening port 2"
End If
If (GWProbes2.AddProbe(1)) Then
MsgBox "Error connecting to probe 2"
End If
End Sub
0 项奖励
1 条消息(共 1 条)
4,339 次查看