LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need to write a simple log file

I have a FOR loop, and for each iteration of the for loop I want to write to a line to a text file with the time stamp and the iteration number. The test I am doing needs to run through 5500 cycles, and I want to know how many iterations were run in case the computer crashes before the test finished. All I want to for each iteration to write the iteration number and maybe the date and time.

 

I've looked through the examples and I couldn't find what I needed.

0 Kudos
Message 1 of 2
(2,473 Views)

Hi Lars,

 

use the FormatIntoFile function with a proper format string.

And look at the examples coming with LabVIEW, they also explain how to use file functions in general…

(You just need OpenFile, FormatIntoFile and CloseFile.)

Best regards,
GerdW


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