LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

drawback of using multiple "write to Measurement file VI"

Hi guys,

I am considering using 2 write to measurement file express VIs inside the same while loop. One for saving the data every 10 seconds and one for every 1 hour. What I'd like to know is, would it cause any error / issues if I were to run the code for 30 days? I guess many labview users are not a great fan of using express VIs. Since I am new to labview, it will be helpful If you can suggest me any other way to write the data acquired at every 10 seconds and every 1 hour (both are having the same signal input). The data is acquired continuously real time. Any suggestion is greatly appreciated.

 

Thanks,

Raj

0 Kudos
Message 1 of 4
(2,249 Views)

If you don't want to use the express VI's you could set up your VI to open the file and then pass the reference to a shift register.   Each time you want to write use the reference to write to file.  This way you are not opening and closing the file all the time.  At your speed this might not matter, but it reduces the overhead.

 

Also, you could consider writing the 10 second data as a batch, collect the information in an array and dump the array to the file every 1 or 2 or "whatever your tolerance is for loosing data" minutes.  Then over write the array and use again.

 

You could consider using only one file with time stamps and batch save, since the input to both files is the same.

-------
Mark Ramsdale
-------
0 Kudos
Message 2 of 4
(2,233 Views)

Thanks for your suggestions Mark. I will try out the different options you mentioned and see which one suits my requirement better!

0 Kudos
Message 3 of 4
(2,231 Views)

Based on the time between writes, there is no issue writing directly to the file without using arrays.  I would use arrays if you suspect that data will have to be acquired much faster at some point in the future (plan ahead).

 

Edit: By the way, the LV instructors push Express VIs pretty hard during training due to the easy setup and use.  With experience, I've come to prefer the lower level VIs to the Express VIs because they give you more control.  I rarely ever use Express VIs, if ever.  But their OK if your just starting out, but don't get too comfortable with them.Smiley Wink

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 4 of 4
(2,215 Views)