05-31-2012 02:10 PM
Also, if I have a string constant for the headers and a concatenation of strings for my data, how would I use the write to text approach? My setup before had one concatenation with both headers and data which was being written to a text file. Thanks for the help
05-31-2012 02:27 PM
I'm having trouble visualizing what your problem is. Can you post a snippet of your code and possibly some examples of what you are getting?
05-31-2012 02:42 PM
I have posted examples of my output file and what I would like my output file to be like. As for the code, it's very hard to get only what I need without explaining a lot more. It's a huge code and this is only a small part. Lots of nested loops and whatnot. I have a concatenation of strings that are my headers, and a concatenation of strings that are my data values. I want to have a file that writes the headers once, and from then on appends just the data concatenation below it.
05-31-2012 02:49 PM
Your snippet made no sense and your explanation of the problem makes no sense either. Since you obviously running some sort of acquisition in a loop, you simply have to create the header before the main loop starts. I'm sure this has been mentioned in many of the numerous other threads on this same issue.
05-31-2012 03:30 PM
Now my problem is that I can get the headers to come out but only the last run of data is output. I don't get the other runs. It's appending but overwriting so I get one row of headers and one row of data instead of one row of headers and multiple rows of data.
05-31-2012 03:33 PM
The top concatenation is the headers, the bottom concatenation is the data values. Does this clear things up?
05-31-2012 03:33 PM
Something like this doesn't work?
05-31-2012 04:05 PM
@Szklanam wrote:
The top concatenation is the headers, the bottom concatenation is the data values. Does this clear things up?
It's clear that you need to take a LabVIEW tutorial. You just have to separate the writing of the header and the data. As mentioned, the header write is done once - either before the main loop or in a init state if you are using a state machine architecture. It should not be anywhere near where near where you are acquiring data and writing it.
06-01-2012 07:33 AM
Crossrulz, when I tried this, my headers were not output, only the data was. Dennis, why do you think I'm on here? Of course I need tutorials, i'm still beginning, but any tutorial I've seen on loops and outputting data had nothing to do with this, hence the reason I wanted to ask here and get a quicker answer. I ended up writing the header inside the biggest loop I had but I had to write the data inside 4 other nested for loops. My data was in the wrong loop I guess, even though when I used the setup I had for this for my other file it worked perfectly. Thanks to all that helped
06-01-2012 08:13 AM - edited 06-01-2012 08:14 AM
@Szklanam wrote:Dennis, why do you think I'm on here? Of course I need tutorials, i'm still beginning, but any tutorial I've seen on loops and outputting data had nothing to do with this, hence the reason I wanted to ask here and get a quicker answer.
This forums is not tutorials. Neither is it a write-a-VI for you place.
You clearly do not understand the fundamentals of programming in LabVIEW. Until you make the effort to learning the basics of LabVIEW, you will continue to depend on others to do your work. Your problem is very basic. The fact that you can't do it properly says that you do not understand one of the basic concepts of LabVIEW.