09-14-2012 10:17 AM
Hi,
I would like to use LabVIEW to capture the waveform already displayed on the screen of my Agilent Oscilloscope (model 54642D). With this waveform, I would like to obtain the current settings of the oscilloscope-channel as well (volts/div, time/div, probe atten., delay, offset, cursors with freq/period, etc.). In other words, I acquire a signal with the scope (not LabVIEW), adjust the scope settings to my liking on the front panel of the oscilloscope, and then I would like to capture the exact waveform displayed on the scope screen WITH the settings of the oscilloscope.
I have been using the project-style driver, found here: http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=724
This works for controlling the oscilloscope settings and acquiring a waveform, but it's not what I want. I simply want LabVIEW to capture the current state of the oscilloscope display and settings used.
Thanks much,
Brad
Solved! Go to Solution.
09-14-2012 10:37 AM
The vast majority of the time, a user has the driver control a scope's settings and would be readily available in the code. If you are setting the scope manually and then wanting to do a capture, you can add the queries to your code. Typically, it is the same as the command to set something with a '?' at the end. The manual will fully explain how to read the settings.
09-14-2012 10:52 AM
Thank you for your quick response Dennis! I'm new to all things LabVIEW, so I'm glad to hear that what I want to do is possible.
When you say "manual", do you mean the oscilloscope manual, VISA manual, or driver manual? I can't find any standalone manual for the driver, other than the context help.
09-14-2012 11:21 AM
The scope's manual.
09-14-2012 12:43 PM
Nothing is mentioned about LabVIEW or VISA in my scope's manual (http://cp.literature.agilent.com/litweb/pdf/54622-97036.pdf).
Could you elaborate more on the procedure/syntax of querying for a setting?
09-14-2012 01:23 PM
I couldn't find any of the commands in that manual. There's should be a programmer's manual somewhere. In it will be SCPI commands that you can send via VISA.
09-14-2012 01:28 PM
Nothing will be mentioned in a manual about LabVIEW or VISA. What will be mentioned is the SCPI commands that you need to send to the instrument in order to request a setting. You linked to the user manual. There is probably a separate programming manual. That is the one you need. The basics would be to use a VISA Write to send the query (i.e CHAN1:COUP? to get the coupling) and then do a VISA read to get the value. You always have to write to the instrument first in order to tell it what data it should return. There is an Initialize function in the driver you have. Look at the block diagram and you'll see a VISA Write with a *IDN? command written and then a VISA Read returns the identification. You'll be doing the same basic procedure with different commands written.
In MAX, you have a VISA interactive control option where you can do a query, write, or a read. A query combines a write and a read. That is what you will be doing so you can do all of your testing in MAX. When you have the query command correct, you can copy it into LabVIEW.
09-14-2012 01:59 PM
Great information! I'll work off what you've given me, and post further questions or results as I go.
Thanks again,
Brad
09-14-2012 02:04 PM - edited 09-14-2012 02:05 PM
Link to the Agilent 54642D Programmer's Guide and Programmer's Reference Help File:
09-17-2012 05:21 PM
Thanks Dennis, that worked great as far as being able to acquire the scope's settings.
However, is there a simple method to acquire the exact waveform displayed on the scope's screen, with the same scaling settings, cursor settings, etc.? Or will I have to perform some calculations to scale the raw waveform myself using the acquired scope settings?