Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Siglent 1202X-E VI Building Tutorial

Ok. So I want to make a VI that can record data from my oscilloscope and store the waveform data into a txt file. Preferably with only numbers and nothing that would make Matlab annoyed... not sure if that is too much to ask about..

 

Channels 1 and 2, trigger from external event. Continuous data saving to multiple files.

 

For context, I am trying to get waveform data from my voltage controlled oscillator to determine the fundamental and harmonic frequencies (channel 1). Then I will plot them against voltage (channel 2) 

 

For a beginner, is this doable? Thanks for any feedback!

0 Kudos
Message 1 of 5
(1,538 Views)

Yes, it is doable. The community will be glad to guide you with the process and help troubleshoot if you face any issue.

 

1. Get LabVIEW drivers for the oscilloscope model you're working with (search in the manufacturer's website or on IDNet)

2. Connect the scope, run the example code that comes with driver and make sure you're able to communicate well

3. Understand what scope driver APIs need to be used to get the waveform data from the scope

4. If you already know File I/O functions in LabVIEW, you would need to put together a VI that takes in data from the waveform data provided by the Scope driver API into the text file format you are looking to use with MATLAB.

 

You could even implement all these in MATLAB as long as your scope has drivers for MATLAB or you're able to build drivers for MATLAB based on the programmer's manual of the scope.

 

Note: All these information are assuming that your scope had some sort of remote control feature like GPIB/RS232/LXI/USB

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 5
(1,482 Views)

Thank you.

 

I have done 1 and 2.

3 I followed the examples to make my own VI and that has worked for a simple waveform acquisition and managed to write it to a file

4 I am learning file I/O right now. Some of the spreadsheet VIs would work nicely, but the time resolution does not work (my scope samples , with one channel, at 1GS/sec).

 

Unfortunately, I have not found any MATLAB drivers online (siglentna.com)

After watching the "Getting Started with LabVIEW Modules", I realized that I can do my whole hobby project testing in LabVIEW.

 

Hopefully this is not too much detail... but

 

1  Get waveform. Done. Get DC waveform. Not done.

_  side not here. the example for acquiring from both channels does not work. hopefully it will work in my VI

2  Compute FFT. Working on this right now.

3  Get "x-values" from maxima in the FFT. Save to an array. New "y-value".

_  Save DC value as second array. This will be my "x-value"

4  Repeat for voltages [0-10]Vs at around ~100mV increments.

5  Save result in a file and display on a graph (I can just copy the graph data, but I should learn how to properly write my data to a file)

 

As of right now, my only questions are

 

Are there any VIs that can write my oscilloscope data to a file without me messing with them to make my own?

What type of loop would you recommend for getting multiple waveforms and processing them?

 

0 Kudos
Message 3 of 5
(1,479 Views)

Good job on the progressing with the stuff.

 

Few suggested next steps,

  1. Understand the order and which APIs to call and configure the scope to do what you intend (yes, it is not going to be easy as configuring stuff on the scope interface and it takes time to understand the programmer's manual too)
  2. Look for a scope API (if there is one) which can save the acquired waveform to a file

 

Notes

  • there will be latency between each sope interaction based on the mode of communication and the scope's response time (sometimes it will apply the settings and it might take some time for it to respond back).
  • Not all functionality of the scope are exposed as API, you might need to dig deep into programmer's manual to understand if those functionalities can be automated and if those are, then which APIs provide them and if there is none, be prepared to create your own API based on the programming syntax defined in the manual

 

Just to make sure to set the expectations right, the drivers are provided by scope manufacturer and not created by NI, any bug or limitation of the driver is the sole responsibility of the scope manufacturer. As a programming language, LabVIEW provides a lot of built-in functions to make such data acquisition, analysis and logging easy.

As for the loop related question, if you would like to do parallel capture and analysis, producer-consumer architecture would be good.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 4 of 5
(1,469 Views)

Hello,

 

So I have encountered a weird problem.

voltage controlled oscillator (VCO)

 

Context

_    input voltage of VCO

_    frequency of VCO

_    I want to plot Freq vs Voltage

_    I am attempting a structing of producer/consumer

 

Problem

_    I used queuing and for loops because I can set the number of samples that I want to

_    collect and process.

_    I cannot get the data (frequency and voltage) for each sample. Only the last sample.

_    At this point I am able to generate an array of data per sample, but I can only keep the last one.

_    How do I keep each sample? I will include an image of my current VI to provide more

_    information than words

 

Also, do I need to mark any of your replies as the "solution"? I am still new to this forum. Thanks.

0 Kudos
Message 5 of 5
(1,454 Views)