05-30-2020 02:36 PM
Hi,
I am trying to acquire data through DAQ card and successfully did it. but now I want to show a graph which represents voltage versus no of samples instead of voltage versus time. can any body help how can I do that.
I want to replace time on x asxis with no. of samples acquired in one cycle
Regards,
Haziq
Solved! Go to Solution.
05-30-2020 03:11 PM
If you are plotting a waveform, extract the data from it using Get Waveform Components and send the Y array to the graph instead.
05-30-2020 06:54 PM
Hi,
Thank you for your reply. I tried to used get waveform component and try to plot y on second graph but its not working. I am new to lab view so if I am making any mistake can you please help. I am attaching pic of my vi.
Regards,
Haziq
05-31-2020 12:52 PM
Attach your VI. We can't execute a picture, nor can we see it clearly enough to be sure we are "doing what you are trying to do".
Bob Schor
05-31-2020 12:52 PM
Without knowing how the DAQ Assistant is setup, I don't know what the data output contains so don't know how Append Waveforms will handle it. This is one of the many reasons why I don't like the Express VIs - stuff is often hidden. My suggestion would be to right-click on the DAQ Assistant and select Generate NI-DAQmx code. This will give you something that does the same as DAQ Assistant but is much easier to understand, and troubleshoot. You would then put all the setup stuff before the loop, the DAQmx Read inside the loop and the DAQmx Clear Task after the loop. This will do away with the Dynamic Data type and you can set DAQmx Read to produce data for each channel as a waveform or an array of doubles.
06-01-2020 11:39 AM
Hi
first of all sorry I didn't upload the CV so I am uploading it now. For simplicity in this cv instead of using DAQ assistant I just simply generate sine wave with 1 KHz frequency with 100 samples. Now usually graph represents time vs voltage graph but I want to plot a graph that represent no.of samples vs voltage.
Regards,
Haziq
06-01-2020 12:03 PM - edited 06-01-2020 12:04 PM
Do you want your graph to just show the last capture? Or do you want a limited history? Or ALL of the data? My recommendation is the limited history since that is by far the simplest route to go. Just replace your Waveform Graph with a Chart. A chart will default to storing the last 1024 samples. You can increase the "History Size" with a right-click option at edit time.