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!
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
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?
Good job on the progressing with the stuff.
Few suggested next steps,
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.
So I have encountered a weird problem.
voltage controlled oscillator (VCO)
_ input voltage of VCO
_ frequency of VCO
_ I want to plot Freq vs Voltage
_ I am attempting a structing of producer/consumer
_ 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.