From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-21-2012 06:06 PM
Hello,
I am relatively new to LabVIEW 8.0 and I am having a problem with being able to monitor signals as I acquire two simultaneous analogue signals. I have the user input the sample rate and sample duration and then I run the scan, however upon running the scan, I cannot see any results on the graph until the sample duration has elapsed, at which point all of the data presents itself. Previously I was able to see the data acquisition in real time and I do not know what I have done since then to have possibly stopped this from working. I have attempted to introduce some sort of delay to perhaps allow the software time to apply the data to the graphs but I have had no success.
I have attached the VI of the data acquisition component.
Thank you kindly for reading this.
Solved! Go to Solution.
03-21-2012 07:18 PM
03-21-2012 10:42 PM
Thank you Dennis for your reply,
Based on what you have said and some further research I did, I decided to redo that portion of my coding to utilize Waveform charts instead. It appears to have worked however it has caused a new problem.
Initially, though I was unable to view the data until the entire sampling period was over, I was able to save all of the data to a .txt file without any problems. Currently, I have used a timed loop to break up the sample periods in such a way that the waveform charts are allowed to update periodically and simulate real-time data monitoring. However, now when I proceed to save the data, I am only able to save the last sample period instead of the entire sample period. I am assuming this is a consequence of my attempt at simulating real-time monitoring. Is there a workaround for this or perhaps a way to avoid this issue altogether?
I have attached the updated VI as a reference.
Thanks for your assistance.
03-22-2012 02:44 AM
Hi
I would suggest you to try these two options:
1. In every iteration of the while loop, add your data to the data from the previous iteration, ie use a shift register to build up an arrya of waveform data that you acquired. When you save the data to a file, read this array data and not the current waveform value. You can read the array data by using a queue, or using any simple method to pass data between to blocks.
When you are using a local variable of the waveform chart, you are only reading the current value in the chart, not its history.
2. Use a property node of waveform charts to read the chart history, convert the 2D array of chart to 1D array using waveform cluster unbundle functions and write to the file when 'save' is clicked.