LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing timestamp data to a text file

All,

 

I've written a VI that cycles solenoids for different time duration, and due to our data logging software, we can't interface with LabVIEW to log our data. In order to know when each valve cycles I've set up a method to write to a text file with the date/time the solenoid switched. I would like to write to the same file for each section of the code. The way I've set it up works fine, but I'm thinking it's not the best way to do it. I've attached a screen shot of what I have. I was thinking of making the control a type-def or reference, but it doesn't work that way. 

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

Hi,

 

What's the purpose of the sequence structure?

And why don't you use the reference wire instead of the file path?

I also miss the File close function: there should be one for each FileOpen...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,599 Views)

Why is the file reference repeatedly opened in the loop?

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

The sequence shifts from one sample to the next with a purge in between. I didn't use a reference wire because I don't know what that is (I'm still new to LabVIEW). The Close File doesn't seem to effect the outcome. I've attached the VI so you can see what I'm going after. 

0 Kudos
Message 4 of 4
(2,580 Views)