大家好,我正在开发一个程序,用于通过LAN和LAN连接Agilent 34972。
使用热敏电阻进行温度测量。
在我公司购买设备之前,我尝试使用VB中Agilent34970 IVI-COM驱动程序中的模拟器功能。
已经安装了驱动程序和
共享组件,添加了相关驱动程序的参考资料。
在驱动程序init中启用了模拟[with simula
tion = true option]。
如文档中所指定。
Init Code Sequence如下:-------------------------------------------
------------------------------------ Dim resourceDesc As String resourceDesc =“TCPIP0 :: 127.0.0.1:
:5025 :: SOCKET“'设置IVI定义的初始化选项Dim standardInitOptions As String standardInitOptions =”Cache = false,InterchangeCheck = false,QueryInstrStatus = true,RangeCheck = false,RecordCoercions = false,Simulate = true“'设置驱动程序特定的初始化
options Dim driverSetupOptions As String driverSetupOptions =“DriverSetup = Model = 34972A,Trace = false”driver.Initialize resourceDesc,False,False,standardInitOptions +“,”+ driverSetupOptions ----------------
--------------------------------------------------
-----------------------------------对于试验,我调用了Thermistermeasure方法,该方法应该输出一个double。
但是,当我按以下顺序得到错误*“类型不匹配”*时。
Dim measuredValue As Double measuredValue = driver.Measure.ThermistorMeasure(“103”,Agilent34970Thermistor5000,Agilent34970MinMaxEnum.Agilent34970Def)*任何人都可以告诉我错误的原因。* PS。
我正在通过以下序列获得仪器制造商ID,固件版本等的模拟响应。
Dim instFirmwareRevision As String instFirmwareRevision = driver.Identity.InstrumentFirmwareRevision Dim instManufacturer As String instManufacturer = driver.Identity.InstrumentManufacturer
以上来自于谷歌翻译
以下为原文
Hi All,
I am developing a program for interfacing Agilent 34972 over LAN & perform temperature measurements using thermisters.
Until my company purchase the equipment, I try to use the simulator feature in the Agilent34970 IVI-COM Driver in VB.
Have installed the drivers & shared components, added the references to the relevant drivers & enabled simulation [with simulation=true option] in driver init. as specified in docs.
Init Code Sequence is as follows:
-------------------------------------------------------------------------------
Dim resourceDesc As String
resourceDesc = "TCPIP0::127.0.0.1::5025::SOCKET"
' Setup IVI-defined initialization options
Dim standardInitOptions As String
standardInitOptions = "Cache=false, InterchangeCheck=false, QueryInstrStatus=true, RangeCheck=false, RecordCoercions=false, Simulate=true"
' Setup driver-specific initialization options
Dim driverSetupOptions As String
driverSetupOptions = "DriverSetup= Model=34972A, Trace=false"
driver.Initialize resourceDesc, False, False, standardInitOptions + "," + driverSetupOptions
-----------------------------------------------------------------------------------------------------
For a trial , I invoked the Thermistermeasure method which should output a double.
However, when I get an error *"Type mismatch"* at the following sequence.
Dim measuredValue As Double
measuredValue = driver.Measure.ThermistorMeasure("103", Agilent34970Thermistor5000, Agilent34970MinMaxEnum.Agilent34970Def)
*Could anybody educate me the reason for the error.*
PS. I am getting the simulated responses of the Instrument manuafacturer ID, firmware version etc with the following sequences.
Dim instFirmwareRevision As String
instFirmwareRevision = driver.Identity.InstrumentFirmwareRevision
Dim instManufacturer As String
instManufacturer = driver.Identity.InstrumentManufacturer
0