01-15-2014 04:36 AM
Hello,
I am new to automation but just needing to do it. Would anyone help me identify what NI Driver or if it's VISA do I need for me to control oscilloscope using MS Excel thru USB?
Thanks in advance.
01-15-2014
08:34 AM
- last edited on
03-11-2025
03:44 PM
by
Content Cleaner
The NI driver that is used for USB communication is NI-VISA development. You will also need the wiindows driver from the scope vendor.
01-15-2014 08:37 PM
Would there be trial version of NI Visa which is free for a certain period of time. Just for me to try, and then will get a full version once I am successful with my project?
01-15-2014 10:26 PM
01-15-2014 11:02 PM
I already installed NI Visa, and I am now working on VBA codes in MS Excel to control oscilloscope:
Below are the codes but I am having run time error in opening a communication to the instrument, though I can already control the instrument using a built in software. But on excel I have problem.
I already added the 'VISA COM 3.0' and 'VISA COM 488.2 Formatted I/O' in the References, is there something I still need to do?
'''*******************************
Function AcquireIDN()
Dim ioMgr As VisaComLib.ResourceManager
Dim instrAny As VisaComLib.FormattedIO488
Dim idn As String
'instrAddress = 1
Set ioMgr = New VisaComLib.ResourceManager
Set instrAny = New VisaComLib.FormattedIO488
Set instrAny.IO = ioMgr.Open("USB::0x0699::0x040F::C012694::INSTR") '''I am having run time error '-2147221487 (80040011)' in this specific line...
instrument.WriteString "*IDN?"
idn = instrument.ReadString()
ActiveSheet.Cells(1, 1) = idn
End Function
'''*******************************
01-15-2014 11:23 PM
01-16-2014 12:20 PM
HI,,
Usually there is a number after the USB in the resource name. Try a zero or 1 after USB.
"USB0::0x0699::0x040F::C012694::INSTR"
Curt
01-23-2014 05:57 AM
I have a similar problem.
I am trying to read an RTD channel from an NI PXI-4357 input module in a NI-PXIe chassis.
I tried the following codes to connect to the module, but encounter "Type mismatch" error
on the ioMgr.Open statement:
Sub ReadRTD()
Dim ioMgr As VisaComLib.ResourceManager
Set ioMgr = New VisaComLib.ResourceManager
Dim pxi4357 As VisaComLib.FormattedIO488
Set pxi4357 = New VisaComLib.FormattedIO488
Set pxi4357.IO = ioMgr.Open("PXI24::0::INSTR")
.
.
.
End Sub
I have search through the web for programming examples and these codes are identical to those I've found. What have I done wrong?
Besides, anybody know how do I select a particular input channel for reading? Where can I find programming reference/manual
on the VBA VisaComLib?
Thanks in advance
01-23-2014 09:49 AM
You don't need the VISA manual for this, you need the Oscope instrument programming manual. You never did state which Oscope you are using. Go to the NI web section for drivers and type in tyour manufacturer and model number and find the driver for the scope. You might look at the examples they will most likely have in the instrument manual showing how to address and command the instrument.