Jump to content

Continuous Acquisition


MeganWhite

Recommended Posts

Hey Guys,

I was curious to know if it is possible to add header information to a continuous acquiring data write.vi every second without loosing data? I am attaching the case structure where it writes data till the file size is reached and then writes the header. How can I make a loop so that when the file size is not reached still the header keeps updating after every 1 second duration?

Megan

Link to comment

Have you considered running two loops in parallel?

The first loop constantly generates/gathers the data and writes it into a write buffer.

The second loop checks the time, if 1s is up, it updates the header, if not, it copies the write buffer to an output buffer and clears the write buffer. Then it writes the output buffer to disk.

This way you decouple the storage part of the task from the gathering part. You just have to avoid the gathering part to write to the buffer while the storage part is clearing it. This will cause a slight delay in you gathering routine, but only for a couple of milliseconds.

I attached a buffer vi. Take a look at it and modify it for your use. In the gathering loop, use the 'add to buffer' action. In the storage loop use the 'read & clear buffer' action. Then you can just loop through the buffer elements to save them. Use the 'Initialise' action before you add the first point.

Download File:post-1022-1100531206.vi

Link to comment

I am already buffering the data with the polymorphic vi AI config and AI read. What I need is when it writes into write.vi the data should be like

header

data

header

data...

in each file that is created. And all the files created should be in the same format continuously. Writing lvm does not help as I need to buffer the continuous data.

Thanks a lot guys

Megan

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.