LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to save string to a file (.txt or .xls)???

I think I do something wrong, because it only writes one string into the txt file.
My vi ,I would like to upgrage runs continously, I have a string
input, which from I made a numeric double.
This string is changing all the time, and I would like to save the
actual strings into a txt file, but I dont have a constant sample
frequency, I would like to do it totally manual.

Could you help me with an example?

It is not needed to be complicated, it would be alright to have either
one row or column of the data.

Download All
0 Kudos
Message 11 of 16
(1,966 Views)

Hi Vamp,

 

your VI doesn't has any file write function. I don't see anything of those things you're writing about...

 

Ever tried to write the string to a file like shown here:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 16
(1,961 Views)

Your VI doesn't show where you are trying to save the data to a file.

 

Your VI is set up to run once.  So if you want to do something repeatedly, you need to put a while loop around your code.  Make sure that only the VISA read and write functions are inside the loop.  There is no need to open and close the VISA resource on every iteration of the while loop.

0 Kudos
Message 13 of 16
(1,960 Views)

Hi manzano,

 

The example here shows a simple VI for writing to a text file.  It requires a manual press of the OK button to write a string into the opened file reference:

 

    https://decibel.ni.com/content/docs/DOC-22371

 

You could modify this to run after every hardware read instead of waiting for manual user input.

 

Regards,

 

Regards,
Chris Elliott
x36772
0 Kudos
Message 14 of 16
(1,944 Views)

Thank you all vey much! The last vi is really what I was looking for.

I hope it will work.

0 Kudos
Message 15 of 16
(1,934 Views)

Thank you all vey much! The last vi is really what I was looking for.

I hope it will work.

0 Kudos
Message 16 of 16
(1,935 Views)