02-02-2009 04:27 PM
Hello,
I'm realtively new to the lab view environment. I'm trying to log three temps and two pressures with the rate determined by the input box. It keeps popping various errors after running for some time and is not logging at the requested rate. Thank you!
02-02-2009 04:33 PM
Do you have this code in a loop?
You can adjust the wait in the loop to determine how frequently data will be written to a file.
If there is no loop, how is this code running? (And please dont say you press 'run continuously')
Also, what errors are you getting?
If possible, can you attach your actual code so I can see what is going on.
02-02-2009 04:50 PM
02-02-2009 06:07 PM - edited 02-02-2009 06:14 PM
you can wire an elapsed timer express VI to a case structure. When time expires, switch the case structure to true and in the true case have the data recording part of your VI. This also allows you to have a control on the front panel to change the time for which it counts down (i.e. time target.)
02-02-2009 06:22 PM - edited 02-02-2009 06:24 PM
is this sort of what you want?
I forgot a wait in the loop so it doesn't become greedy but you'd also want some sort of wait. Maybe 100 ms or something.
02-03-2009 11:35 AM
I think that will do what I'm looking for, but now I'm getting an error 200279 about my buffer size. I can't set DAQ assistant to on demand, so I have it set to continous sampling. I have a control box where the user puts in the rate at which they want the data to write to the file. Also, what are you saying about the wait? Thanks for all the help!
02-03-2009 12:04 PM
02-03-2009 12:47 PM
Why Do I Get Error -200279 When Writing Continuously Acquired Data to a File?
Error -200279 or other Buffer Errors During a Continuous, Buffered Acquisition
Basically, you're not reading the buffer fast enough, so it's getting overwritten. This means you're losing data. What does your new code look like?
02-03-2009 02:20 PM
Here is the new screen shot. (the write is just cut off) I'm not sure where to put this wait, outside the conditional area, and inside the loop, just setting there? Thanks for the help again, I'm just not familiar with much other than python.
02-03-2009 02:20 PM
screen shot attached