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.
05-13-2013 05:36 AM
There have been a few forum threads discussing a problem while attempting to extract an averaged waveform from a variety of Agilent scopes using the agx2k3k driver. The symptoms of the bug are that upon trying to read the waveform, the "Fetch Waveform" VI is called (either explicitly or from a higher level VI) and the scope responds first with the error "No data for operation", and then "Query unterminated".
The cause of the error is that the "Fetch Waveform" VI always requests a RAW data record (":WAV:POIN:MODE RAW"), regardless of the acquisition mode selected. This is an invalid request, as the Infiniivision X-Series programmer's guide explicitly says that if using RAW or MAX data retrieval that: ":ACQuire:TYPE must be set to NORMal or HRESolution.". Another problem with the driver is that the specified data encoding ":WAV:BYT LSBF;:WAV:FORM BYTE;" is only 8-bit, which causes a loss of resolution from the possible 16-bit data in either averaging or high resolution modes. Also the LSBF option should be changed to MSBF to ease conversion into a Labview-type waveform.
I have attached a demonstration VI to show the averaging working. I am new to VISA and Labview (primarily being a C coder under Linux, and as such not a fan of graphical programming), so please excuse the poor "coding" style and the further bugs I've introduced.
jophos
Reference threads:
http://forums.ni.com/t5/LabVIEW/acquire-mode-average-Oscilloscope-Agilent-DSO-X-2002A/td-p/1916371
http://forums.ni.com/t5/LabVIEW/acquire-data-from-agilent-dso-3104-in-avraging-mode/m-p/2320378
05-15-2013 06:25 AM
Hi jophos,
A Corrective Action Request has been submitted to be looked at by R&D.
Thanks for your help!
08-09-2013 08:56 PM
Do we have a more robust fix to this code now? I have the same issues with my scope, and although the fix presented here is good, I would like to see the Fetch Waveform VI fixed alone.
Thanks,
John
08-12-2013 09:41 AM
Hi John,
Currently the workaround is all we have for the moment. I appreciate this is not ideal however R&D are aware of the issue and a fix will be target for a future version of the driver.
Best regards
08-14-2013 11:31 AM - edited 08-14-2013 11:45 AM
Hi John,
I'm with the Instrument Drivers team and have looked at the Corrective Action Request that has been filed. Because I am unable to reproduce your error using any of the Example VIs that also use "Fetch Waveform.vi", I am led to believe that the error is in your averaging code somewhere. I am using an MSO-X 4052A (with Firmware 03.12.2013041700).
The Agilent 2000 3000 X-Series driver is extensive, and all the commands that you are sending through VISA are in these VIs. Instead of writing your own custom commands, you should use the VIs, as they may take care of other customization things behind the scene. You should let the VIs take care of communication with the instrument, and then you can do the averaging code based off of the DATA being returned by the VI. If you do it this way, I think you'll be much better off.
If you run the example VIs and run into an issue, or if you use our VIs in the appropriate, documented order and run into an issue, this is where we can help you.
Best Regards,
Stephen Schwahn
Instrument Drivers
National Instruments
08-14-2013 12:38 PM
Hi Stephen,
Thanks for you response in regard to the instrument drivers for the Agilent InfiniiVision series oscilloscopes. There is some confusion about the driver sets though. The agx2k3k drivers are IVI drivers, not VISA. I also have no issues running that driver set. My only gripe with the IVI driver is that it doesn't allow me to access a lot of the scope's internal features.
The person who posted the fix here (jophos) was actually responding the the errors in the VISA driver set called Agilent 2000 3000 4000 X-Series plug and play style drivers. I still have errors with those drivers when trying to acquire in Averaging mode.
Try running the Edge Triggered Acquisition example and adding the Configure Waveform VI so that you can set the mode to averaging instead of normal. You will have an error associated with the Read Waveform VI, and that error stems from the Fetch Waveform VI. I've attached my example.
Thanks,
John
08-14-2013 12:55 PM - edited 08-14-2013 12:59 PM
Hey John,
I ran your example and I received an error -221 Settings conflict error, which means that there is something wrong with the order/selection of certain attributes with other attributes, and I was able to fix it by localizing which part of it was throwing an error. The issue was the way that the Configure Channel VI was set up. I had to wire in an additional constant to make it work correctly.
I have attached the correct way to run the averaging code. As for the IVI code, I'll let someone with that expertise look into that issue and re-evaluate. It appears that somewhere along the way, the Corrective Action Request was written to be about the LabVIEW PNP driver.
Best Regards,
Stephen Schwahn
Instrument Drivers
National Instruments
08-14-2013 01:12 PM - edited 08-14-2013 01:18 PM
Stephen,
Thanks for your response. It looks like you added the Input Impedance option to the Configure Channel VI. You set it to 50 Ohms. If I run in averaging mode, I get the -220,"Parameter error" and +0,"No error" errors
If I switch the input impedance to 1 MOhm (which is the default), I still have an erorr which looks like:
Also, if I leave it at 50 Ohms, I get the same -220 error when trying to run in Normal mode..
My scope is the DSO-X-2004A, so it is different than yours. I've added another block to the code that configures the channel to include the bandwidth limit 20 MOhms, which is something I need for my application.
Still having trouble though.
Best,
John
08-14-2013 01:58 PM
Hi John,
I ran your VI and it worked well on my instrument, so I think what will help our group diagnose your issue is to perform an IO Trace so that we can narrow down the issue to (hopefully) a single VI. At that point, I can file a Corrective Action Response and see if we can get a 2000 series instrument to reproduce it on.
Thanks for the feedback so far!
Stephen Schwahn
Instrument Drivers
National Instruments
08-14-2013 02:10 PM - edited 08-14-2013 02:13 PM
Stephen,
Ok I attached the IO trace here. This forum would not allow me to attach the .nitrace file directly though, so I had to import a pdf. If you want the trace file directly, please PM me an email address. Thanks for the help!
- John
[Edit] To be clear, I ran my last VI using these settings: 1 Mohm Input Impedance, Bandwidth Limit = True, Averaging 8 count