Jump to content

capturing single point of streaming data


Recommended Posts

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.