LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help separating/timing data written to file. Simple vi

Hello all,

 

I made several posts last week seeking help with my simple pressure transducer vi. Though I got some great advice, I found a simpler way to construct it, so I started from scratch today. I'm much happier with the new vi, but I still have a couple issues I need help with.

 

1) I am writing the date, time, and pressure to a file. How do I separate the data into three columns? column 1- date, column 2- press, etc.

 

2) I only want to write to the file once a minute on the minute mark. I was told to wire the "i" terminal of the while loop to the case structure, dividing by 60 and only recording when the remainder=0. But, it doesn't seem to be working.

 

Attached is the vi I'm working with. Any help is MUCH appreciated.

0 Kudos
Message 1 of 3
(2,371 Views)

i would use a tic count function, your 60 is happening every 3 secs...

 

your vi is using build array for you string, use concatenate with comma's between your data to make columns...

0 Kudos
Message 2 of 3
(2,357 Views)

your VI perplexed me...I did have the same problem before, but solve it with a not so "absolute" value. i made a work around for you to play with using tic count and don't forget to use "wait (ms)" in your loop, otherwise it will use 100% of your CPU....Smiley Mad 

 

notice that i did not use "concatenate" with commas, you can also use "format into file" with formatted constant.

 

tic count data save_BD.png

Message 3 of 3
(2,338 Views)