01-22-2010 02:31 PM
Hello,
I'm having trouble figuring out how to write to measurement file at a certain time interval. Meaning, I don't want to record every single point of data, but rather, only at say every 1 second. I'm using the Write to Measurement File IV and sending in a signal to it. The signal is a AC signal at 1K, but I only want to record the output value at every 1 second, rather than every 0.001 or whatever.
Thanks so much.
Brian
01-22-2010 02:57 PM
Simple way is to use the Elapsed Time function. Wire the time has elapsed output to a case statement with your write inside the true case.
01-22-2010 04:23 PM
Hey Dennis,
The problem I'm getting is that the data is not being recorded ONCE every specifed elasped time. It's doing the recording like 50 times after the enabled time since the signal is running at 1k Hz
01-22-2010 04:28 PM
Then you've programmed something incorrectly. The default behavior of the elapsed time function is to reset after the time target. That means that the case statement will only be true once until the next time interval. It does not matter what the sample rate is. Post your code.
01-22-2010 04:37 PM
01-22-2010 04:39 PM
01-22-2010 04:45 PM - edited 01-22-2010 04:47 PM
You haven't even tried to use the elapsed time function.
It's even an express VI so it would feel right at home with everything else you have.
p.s. It's on the Timing palette.
edit - ok so that one will run once a second and save the 100 samples you are taking.
01-22-2010 04:52 PM
01-22-2010 06:15 PM