LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sampling a sine wave

Solved!
Go to solution

ok sorry think we got our wires crossed. So what you are saying is that the data coming out of the simulation is actually an array of sampled amplitude values, and so there is no further sampling mechanism required? So if I were to sample from a DAQ assistant for a real device, the data coming out of the DAQ asistant block would actually be the sampled data. So I could have a block for writing the data to file going directly to the write to file block and it would save a 1 dimensional array of ampliotude values that I could stick straight into excel and plot a sine wave with? That prob explains why there are no tutorials, sampling only actually requires one block of code. I thought I had to do a bit more to sample the data.

0 Kudos
Message 11 of 14
(1,991 Views)
Solution
Accepted by David-Baratheon
You can simulate a DAQ device and see that the returned data is exactly like the signal you are currently getting. The DAQ Assistant returns the evil dynamic data but underneath it is a waveform data type that consists of a y array, start time, and the time between samples. That is all that you need to recreate the signal.
Message 12 of 14
(1,978 Views)
Solution
Accepted by David-Baratheon

There's actually quite a wealth of tutorials on waveform sampling but the phrase "LabVIEW waveform sampling" probably won't find them.  Search for "NI DAQmx tutorials" instead.  And although there's no real point in sampling a simulated signal, you could certainly use the Analog Out of your DAQ card connected to an Analog IN on the same card to practice working with DAQmx.  

 

The DAQ Assistant will work for simple applications and it is easy to setup but I suggest you go through some DAQ tutorials and/or training if you want to learn the true power NI-DAQ.  The DAQ Assistant is kind of like putting training wheels on a Harley or swimming in the baby pool. Smiley Wink

 

http://www.ni.com/product-documentation/5434/en/

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
Message 13 of 14
(1,954 Views)

I generated the waveform without simulate signal and write a file but the issue is i need the samples of  sine wave and read from the data and store it as array.Can anyone help me?

0 Kudos
Message 14 of 14
(1,075 Views)