LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing to a data file with time stamp - Help!

I ran the program and it has an error when it reaches 12:00 am. IT says the file " todays date" does not exist.?
0 Kudos
Message 11 of 39
(1,444 Views)
This is the error I get?
0 Kudos
Message 12 of 39
(1,441 Views)
Hi

Please find attached Vi useful 🙂

Cheers!
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
Message 13 of 39
(1,433 Views)
Ian,
How do I integrate this into my existing program. Should I group my write file in the while loop or what...sort of confusing. Can you show me with my existing program.
Thanks
0 Kudos
Message 14 of 39
(1,424 Views)
In the small case statement inside the while loop, I forgot to set the functon for Open/Create/Replace File to Create or Replace. It defaults to Open only so when it is time to create a new file, the error will appear.
Message 15 of 39
(1,414 Views)
Dennis,

I have already figured that out and made a constant for the open/replace vi. But unfortantely the original file keeps logging. I'm not sure why but the original one never closes. Any other suggestions. I have tried to put a close file in the case structure if the time = 12Am. let me know..
0 Kudos
Message 16 of 39
(1,402 Views)
hi PierT,

I have integrated it into your VI without removing the original file IO functions.
You might, still, need to further polishing it 🙂

Cheers!
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
Message 17 of 39
(1,367 Views)
Ian,

Thanks for the help. I ended up doing it a different way but I guess either one will work. Attached is what I came up with.

One question I have is if there is a way for my program to have a delay before writing data to a .csv file after my trigger goes high and to stop the writing before the trigger turns off.

To specify more I have a trigger which tells my program to start logging data. Now my device takes 5 seconds to get a good reading so I have to start after 5 sec. And then when it turns off it takes about 5 seconds again. Any suggestions would be great. My trigger by the ways is 7sec on 2 seconds off.

Should I use shift registers? not sure?
0 Kudos
Message 18 of 39
(1,359 Views)


One question I have is if there is a way for my program to have a delay before writing data to a .csv file after my trigger goes high and to stop the writing before the trigger turns off.

To specify more I have a trigger which tells my program to start logging data. Now my device takes 5 seconds to get a good reading so I have to start after 5 sec. And then when it turns off it takes about 5 seconds again. Any suggestions would be great. My trigger by the ways is 7sec on 2 seconds off.

Should I use shift registers? not sure?




Hi Pier,

I am not quite sure if I understand your problem faced as quoted. Nevertheless, please have a look at the attached VI. I have included, to the VI, a 5000ms timer, which starts timing when the Channel Data >= HighLevel Trigger. In this case, this next Channel Data which exceeds the HighLevel Trigger level will take effect only after the file save.

Hope this is clear 😛

Cheers!
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
Message 19 of 39
(1,335 Views)
If I need to take an average of the values that I read from my channels and take out any high readings and then write them out to a file, can i do that in a seperate case statement within the main?
0 Kudos
Message 20 of 39
(1,329 Views)