i'm new to Labview and currently working on a project which requires me to visualize/ control an oscilloscope from a computer. I use a keysight USB/GPIB adapter and a Lecroy waverunner LT342L. I haven't succeeded to display the signal part of my screen and i would really appreciate if someone could help me.
I see the command syntax of this scope model is very different and i really can't find the right command to display the waveform with the correct scaling. ( INSPECT?''SIMPLE'', WF?DAT)
How can i make my program faster so that it gets data in (or close to) real time?
Here is a driver for your scope - http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=E3B19B3E943E659CE034080020E748...
Unfortunately, I don't have LV2021 to open your VI, please reattach the VI in 2016 to cover a larger audience.
Next, "realtime", I believe you understand that it will not be realtime, as the scope captures at t0, it takes some time for the scope to transfer the data to the computer and data arrives at t1 and some additional time to process and plot the data on the screen. This means based on the communication protocol and your scope's speed to transfer such large data, your data available in the software is hundreds of ms or even seconds delayed.
Any specific reason you have to recreate the scope visualization? why not use any software that comes with LT342L
Hi Santhosh ,
thank you for your suggestions. i have attached the 2016 version of my vi here.
I can't use the software because recreating the scope visualization is my project task in itself.
The driver mentioned just implements the SCPI commands you are already sending. You should have a look at how they do things.
At the very least you need to Open, timeout setting and Close VISA out of the while loop. You only need to do all of those operations once, not every loop.
The driver in the link is IVI based driver.
Once you install the driver, you can use the shipping example (already does the continuous acquisition) under Hardware Input and Output >> Instrument Drivers >> IVI >> Class
You do not need to implement the low-level SCPI unless those are not already available in the IVI driver.
Thanks alot Craig. I tried it the data acquisition works perfect anfd it is faster. My problem now is the graphical representation of the waveform . I get the waveform data but i think i need a decoder somehow.
I attached the picture of what i get as results which is different from what is on the oscilloscope.
PS: before the change with the visa open and close out of the while loop the waveform wasn't still thesame.
On youtube tutorials i see other versions of Scope using 'Measure volt' command but the Lecroy waverunner LT342L i'm using has different commands. Maybe there is something i'm doing wrong.
Thanks very much Santhosh. I downloaded and installed the IVI drivers but when i tried out it gives me this error.
I have attached pictures of the settings and also the error it shows. Any hint on what i didn't do correctly?
PS: I am using a keysight GPIB/USB adapter to connect the scope to the computer.
Talking about a decoder i found this set of vi which reads and interpretes the waveform code from a lecroy scope but unfortunately it doesn't work well with mine.
-I copied and pasted the waveform code into this VI it took less than 10s to complete but the waveform is not thesame i you can see you can barely see anything. The other information ( device name, offset , v/div , s/div , vertical gain, coupling, etc ) are correct but the scaling of the graph is off. I had just a rectangular wave on my scope when i was recording it.
-I combined it directly in thesame VI (without the while loop) but it takes like 4minutes to complete and still doesn't give me the correct wave.
I suggest you look at Chapter 4 of the manual you posted - "Know Your Waveform". It explains how the scope data structure is organized and how you can use templates to interpret it. It also mentions commands to download the data in ASCII format, which would be easy to manipulate as a first step. It also instructs you in all of the necessary steps to re-create the x-axis data array. Then you can use a x-y graph rather than the waveform graph to display your data. Make sure the scales are set to autoscale, or you manually set them to match the scope. You mention you hardly see anything, but that's probably just a scaling issue since it should be in mV not Volts.
I would work through understanding that chapter about the data format before programming much more. Once you've got that figured out, you can move onto trying to make your program faster. ASCII data transfer is usually slower, there's a translation step on the instrument side, so your idea of a Binay "decoder" is good. You probably want to look at the example and how they setup the instrument before transferring the data to just use their code as-is. I haven't looked at the decoder code you posted yet, perhaps later today. (4mins is way too long for 1000pts!)