egraham Posted January 22, 2008 Report Posted January 22, 2008 First off I wanted to say thanks to all the support provided by the people in the LabVIEW community. It's great that experienced veterans are willing to help out beginners like me who are trying to get our feet off the ground. Today's questions spawned from creating a VI that allows me to control when I capture single data points from analog inputs and write that data to a streaming data file (TDMS). This VI runs for five seconds, takes data from a simulated DAQmx device, cleans it up, plots it to a chart, continuously writes it to a streaming data file, and also lets me record individual data points versus time. I took the "TDMS - Write data (events)" example and modified it slightly to make it work for me. 1. In the attached VI does it make sense to add a Wait timing function to the loop? If not, it appears the loop runs at the rate set on the DAQmx timing function. If I add a Wait function to the loop it seems that the Wait function overrides the sample clock.Or is the sample clock still running at its set speed and just dumping data to file after every loop iteration? Adding a Wait function seems like it decreases the frequency of the sine wave coming from the simulated device. 2. Buffer – I've read the LV help on how buffer size is determined when the sample mode is set to continuous samples. I created the DAQmx property node to monitor available samples per channel. As long as I don't add a timing function the available samples per channel stays at zero. This is desirable, correct? This tells me that I have more than enough space available in my buffer?? The only problem I worry about with respect to my buffer is when it gets too full? 3. Error signal wiring – because LV is a data flow language, in this case it's important how I wire my error signal so I don't start reading data until I have created the TDMS file. Have I correctly wired my error wire? Data will not be read until after the TDMS file has been created, correct? 4. Is this VI the correct way to accomplish what I'm trying to do – control when I capture a single data point and simultaneously stream the data to file? I want to make the VI as efficient as possible. I want it to do exactly what I need it to do and nothing more. Thanks in advance for all your help. All of you are great. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.