01-23-2019 04:29 PM
Hi,
I am trying to build a program in Labview in order to acquire the data presented in the waveform of my oscilloscope. I am using a Rigol oscilloscope which is connected to the pc through a usb cable. I am trying to connect the oscilloscope to Labview via Visa. Moreover, the aim of my program is to first present in Labview the waveform depicted in the oscilloscope and secondly to acquire and save the data of the waveform. As I am relatively new to Labview could you please help me build up this program?
Thanks in advance!
01-23-2019 04:47 PM
Hi John,
The first step would be to get your scope to communicate with the computer using a software provided by Rigol.
Hopefully you can find some drivers for your Rigol instrument on the instrument drivers page or from Rigol's website. Once you get those, you will copy them your "instr.lib" folder, and then they will appear in the palettes.
Many drivers follow a similar pattern of Open Instrument -> Do Stuff -> Close Instrument. Try to search through the VI Tree and see if you can find the ones you need to do the stuff you want to do.
Once you have your data, there are a variety of ways to write it to a file. I find "Write Delimited Spreadsheet" works a lot of the time for me.
When you get stuck, post your code here (the VI, or a zip folder of VIs) and we will help you get unstuck. Good luck!
01-23-2019 04:50 PM
Take a look at these links:
It is usually good to start to search Google with a part number, manufacturer and LabVIEW or LabVIEW drivers. There should also be a communication manual that will explain how to talk with the equipment you are interested in if it is available. The manufacturer vi's may not be the best, but they are usually a good start.
01-23-2019 05:05 PM
Thank you for the helpful info. As I have started building the block diagram I have seen that many people use the following component (see picture) for acquiring data. Do you know where I can find it?
01-23-2019 05:10 PM
Also if anybody knows where I could find these 2 components (see picture) it would be extremely helpful!
01-23-2019 05:19 PM
That's a waveform chart or graph. They both work similarly- one maintains a history and the other only shows the data presented at its terminal.
Get those on your front panel by right clicking, selecting the Graphs palette, then Waveform Chart (or Graph, depending on your needs).
01-23-2019 05:25 PM
Hi John,
The first picture is a waveform indicator. It has nothing to do with the actual acquisition of the data, but is just a container for it, and a display on the front panel.
The second picture uses the Fract/exp string to number function to convert a string to a number.
If you go to the top of the LabVIEW forums page you will find LabVIEW Training Resources which will teach you some of the basics. LabVIEW is a programming environment by the way. So just like you wouldn't expect to be able to write a program in C without any prior knowledge, same goes for LabVIEW.
01-24-2019 11:05 AM
@Gregory wrote:
Hi John,
The first picture is a waveform indicator. It has nothing to do with the actual acquisition of the data, but is just a container for it, and a display on the front panel.
The second picture uses the Fract/exp string to number function to convert a string to a number.
If you go to the top of the LabVIEW forums page you will find LabVIEW Training Resources which will teach you some of the basics. LabVIEW is a programming environment by the way. So just like you wouldn't expect to be able to write a program in C without any prior knowledge, same goes for LabVIEW.
The caveat here is that LabVIEW makes it a whole lot easier to write bad code because the beginner can intuit just enough to get themselves into some real trouble.
01-24-2019 11:15 AM
once you donwload the code from the Rigol LabVIEW example from the webpage you will have a starting point to start programming your vi.
Run the example and understand what is being doing. That's pretty straight forward.
01-24-2019 12:48 PM
@ROtake wrote:
Run the example and understand what is being doing. That's pretty straight forward.
After a while it may become second nature, but that's not particularly helpful for someone brand new to LabVIEW. The best way to become acquainted with the features of the development environment is to go through some training first.