Jump to content

Data acqusition: reset by press save


Recommended Posts

Hello everybody. I'm about to acquire Data with DAQmx. As the attached Vi shows, the data muss be acquired continuously in the loop since save pressed. once save pressed the data will be acquired and saved until the stop-condition is verified.
Setting-parameter for the Acquisition are sample frequency: 12500 Hz, number of Sample: 2048, Timing for the save 2 min, meaning after 732 Iteration. my question is: how could i set the loop condition so that by pressing save the iteration reset and start to count from 1 to 732 and store data during that elapsed time?

Thank you so much for the suggestions.

test.vi

Link to comment

Attatched is some suggestions.  We stop the DAQ task at the end, we stop on error, and we improve the reading by leaving it as an array of waveforms instead of dynamic data types.  This allows is to write both channels with one TDMS write improving fragmentation.  There are many ways to do this but I decided to keep track of the amount of time that has been logged, by multiplying the number of samples, by the amount of time that separates the samples.  Then add those up and if the time is greater than 2 minutes stop.

 

I'd still suggest using an event structure, and some how disable the user from stopping saving, once a save has started.  Potentially a user could turn on the save, save for a few seconds then turn it off, and start it again.  Now the log data will not be continuous.

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.