From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-26-2011 03:35 PM
I am trying to set up communication from Labview 2010 SP1 to an Agilent oscilloscope (DSO-X 2014A) via NI-VISA (USB). Installed to official driver from NI website and try to run the included examples. The scope is recognized fine, but every vi that is supposed to grap the scope output simply resets teh scope and freezes it up.
Any advice to a novice ?
08-27-2011 11:31 PM
Use NI Spy and see exactly what command string is the vi sending the scope. After that, try each command string through MAX and see which command is causing the problem
08-29-2011 11:31 AM
Hi Newmexican,
Please try jyang72211’s suggestion and respond if you are still having issues.
Regards,
Josh Brown
08-29-2011 01:37 PM
So,
I followed your advice and logged all commands that are send by the included example.
I found a *RST that resets the instrument to defaults. The full sequence of commands is
1. viGetAttribute (0x09987EA8, 0x3FFF018F, VI_TRUE)
2. viFindRsrc (0x09987EA8, "?*", 0x04645868, 1, "USB0::0x0957::0...51130102::INSTR")
3. viParseRsrcEx (0x09987EA8, "USB0::0x0957::0...51130102::INSTR", 7, 0, NULL, NULL, "")
4. viClose (0x04645868)
5. viSetAttribute (0x09987EA8, FIND_RSRC_MODE, 3)
6. viFindRsrc (0x09987EA8, "?*", 0x04645868, 1, "LPT1")
7. viParseRsrcEx (0x09987EA8, "LPT1", 4, 10, NULL, "ASRL10::INSTR", NULL)
8. viClose (0x04645868)
9. viSetAttribute (0x09987EA8, FIND_RSRC_MODE, 0)
10. viParseRsrc (0x09A540B0, "USB0::0x0957::0...51130102::INSTR", 7, 0)
11. VISA Open ("USB0::0x0957::0...51130102::INSTR", False, 0, 0, "USB0::0x0957::0...51130102::INSTR")
12. VISA Clear ("USB0::0x0957::0...51130102::INSTR")
13. VISA Set Attribute ("USB0::0x0957::0...51130102::INSTR", 0x3FFF001A, 10000)
14. VISA Write ("USB0::0x0957::0...51130102::INSTR", "*IDN?")
15. VISA Read ("USB0::0x0957::0...51130102::INSTR", 256, "AGILENT TECHNOLOGIES,...")
16. VISA Write ("USB0::0x0957::0...51130102::INSTR", "*RST")
17. VISA Write ("USB0::0x0957::0...51130102::INSTR", ";*ESE 61;*SRE 48;*CLS;")
18. VISA Write ("USB0::0x0957::0...51130102::INSTR", ":SYST:ERR?")
19. VISA Read ("USB0::0x0957::0...51130102::INSTR", 256)
This includes setting the VISA resource name and the "Initialize" sequence in the sample vi to acquire a wave form.
I did not figure out how to submit each command from MAX. I tried to submit commands from the I/O interface in viUSBControlOut, but nothing happened.
When I open the individual subvi's of the aquire waveform vi, the "initialize" call is the one that resets and freezes the instrument.
I stepped through the vi and confirmed that the *RST freezes up the instrument. This call is provided by the "Reset" function provided by the driver. Is there any known issue with the Agilent MSO-X 2000 3000 drivers?
08-29-2011 02:55 PM - edited 08-29-2011 02:56 PM
I know it's not really a solution but you could try NOT resetting the scope.
The standard "Initialize vi" opens a VISA session, performs an *IDN and *RST.
There should be boolien inputs to turn off the *IDN and *RST.
Or just don't use the "Initialize vi", as you don't really need it with a USB or GPIB interface...
I never use the "Initialize vi" that comes with any of my instruments.
08-29-2011 03:01 PM
We thought of that too. The problem is that the example vi does not allow modifications. But I will try again.
Thanks
08-30-2011 07:48 PM
Hi Newmexican,
This document may be of assistance.
http://zone.ni.com/devzone/cda/tut/p/id/4478
I am not sure if the device you are using uses USB RAW or USB INSTR. This could be causing an issue for you. Either way this document shows you how to properly go about setting up a USB instrument and code it in LabVIEW. You may have already seen it. If so let me know and I will look into the matter further.
Regards,
Josh Brown
08-31-2011 12:06 PM
Thanks,
I had not sen this document yet. I will work through this.
Oh, I believe I am using USB INSTR
08-31-2011 01:56 PM
You mentioned that the reset command freeze up the program. Did it freeze it up permanently, and you had to power cycle the instrument, or you just have to wait for a long time? If you have to wait for a long time, how lone? If it is not too long, you should just put a wait in there that is right after the reset command (use error cluster to enforce sequence).
If you have to power cycle it, is there a power cycle command? If so, you should try it after reset.
If there are other type of reset command in there, you should try to use the one that would reset what you want but do not freeze up the program.
08-31-2011 02:15 PM
I need to power cycle o unfreeze the instrument. I am working through teh USB Instrument Control Tutorial right now to undertand the system better.