11-29-2014 01:09 AM
HI.
I use visa and serial protocl in my vi nad want to save data come from MCU in labview in txt file format which in data save in each line not each tab.
I just want to save data not time. meanwhile I plot the data in graph.
I search in forum and review the posts but can not find solution.
Solved! Go to Solution.
11-29-2014 01:53 AM
11-29-2014 12:13 PM
Yes you are right.
my expectation from vi : those arrays are my final data and I want to save them into separate txt file (each bnumber in separate line), with float format with 9 precision. data will be saved until I stop program and next time that I run program, new files create in vi directory and save new data. file names are date and time with suffix (number of channel). like : channel1_2014_11_29_17_30.txt or
here is my blocks :
p.s. I appreciate for your helps and I don't need available VI (I don't like that it cause to misunderstanding with you 😉 ) it will be good if you give me explanation from VI .
Thank you.
11-29-2014 12:37 PM
11-29-2014 01:18 PM
Thanks for your answer.
delay in while loo is for serial communication and it is 1ms.
I want every time I run program data of 4 channel save in seperate txt file. if save in new file cause my program be slow, I can save data in each file and next overwrite files with new data and don;t need to new file and new name and ...
11-29-2014 02:17 PM
11-29-2014 02:29 PM
can u send an exapmle for me ?
a VI which in your method has been used.
Thanks.
11-29-2014 02:44 PM
12-07-2014 01:42 PM - edited 12-07-2014 01:46 PM
I use this methode for save waveform, but when I stop the program and view ftxt file, only one byte saved in it and other data don't save !
here is my prgram block diagram and my chart in front panel, as you can see waveform in front panel can't save in specified txt file.
Chart :
Thank you.
12-07-2014 01:51 PM
You have the append to file? input left disconnected. The default is False, meaning that it will overwrite the file everytime it is called. Tush, you get only the last value.
You need to set append to file False the first time you call the VI to create the file and then set it True on all subsequent calls to append the data.
Similarly, you do not need to use String Size. Just wire return count from VISA Read directly to the case selector terminal. That terminal will accept integer numeric types. Set what is now the False case "..0" to handle all negative values and zero. Change the True case to "1.." to handle all positive values.
Lynn