02-11-2010 08:59 AM
Hi All,
Another Newbie question, I'm afraid. The problem is that I am using Export Waveforms to Spreadsheet function, and am getting my report in the format I want except that there is a blank line between each iteration of the report. Note that I am setting append to file to be true; this test is going to run literally for weeks, and I just want one huge *.tsv file that contains all of the data, with a single timestamp column at the left of the data records.
Note also that I am recording redundant information, by also using the Write to Measurement File vi. this one has a single timestamp at the head of the report, and then just rows of data; it's my backup in case the power goes out or anything during the long run of the program.
To be clear; the data looks like this:
TIME STAMP 123.456 123.456
TIME STAMP 123.456 123.456
TIME STAMP 123.456 123.456
etc. I want to be able to open this file in Excel and create graphs, etc.; so I don't want that extra line of white space. Any ideas?
Thanks,
Danielle
02-11-2010 11:39 AM
I just whipped up a simple VI and I do not see the behavior you're describing. My guess is that the second DAQ Assistant that you have there is returning more than one point since you do not have the constant of 1 wired to it, like you do with the others.
Notes:
02-11-2010 11:50 AM
Hey, thanks. I'll give that a try. On your second observation; pretty much most of what I am doing in LV at this point is unintentional. Hopefully that'll change...
Danielle
02-11-2010 12:40 PM
Afraid that wasn't it. I should have known; the file created by the parallel "Write to Measurement File.vi" doesn't have those extra lines. It seems to have something to do with the way that the Export Waveforms to Spreadsheet.vi interacts with the DAQ assistant creations. If, for example, I tell the three parallel Express instruments to collect three samples instead of one, there are three lines of data then a line of white space. Wouldn't be an issue if I could just write the thing to collect thousands of samples before leaving the loop, but then the graphs don't update until that whole thing has run.
Sort of in conjunction with your comment on the greedy loop thing; could I write something that opens the data file and truncates a carriage return and several tabs (which make up that extra line) and park it in the lower right-hand corner of the loop, so it would iterate once each time the thing loops? Sorry that isn't clearer; just haven't done much with LV yet...
Thanks,
Danielle
02-11-2010 01:24 PM
Instead of wiring the evil dynamic data directly, try using the From DDT function to convert to a waveform data type which is what is expected. You have some coercion going on.
Also, using three separate DAQ Assistants is just plain wrong unless you have three separate DAQ cards. Use one.
02-11-2010 02:25 PM
Oh I do have three separate cards. In fact, I don't see any way to split a single card into more than one DAQ assistant and make it work...
Thanks for the tip, though. You're probably right about the data type issue. Will give it a shot.
02-11-2010 08:38 PM
Odd.... When I did my test I used the Simulate Signals Express VI since I wanted dynamic data to try and replicate your VI as much as possible. Each dynamic data wire had one value in it, and the Export Waveforms to Spreadsheet VI generated the rows without blank lines between them.
Maybe if you post the VI it might shed some light. At least the DAQ Assistant configuration can be looked at.
02-12-2010 03:00 PM
Thanks, this is it. I am not currently able to get at the computer that's running this vi, but will be able to change it on Monday of next week. Hopefully someone will spot the problem in my code.
Danielle
02-12-2010 06:08 PM
The problem isn't the dynamic data. The problem is the Export Waveforms to Spreadsheet File VI. Or rather, how it has changed. I did my test in LabVIEW 8.2, and I saw no extra lines. However, in LabVIEW 2009 the Export Waveforms to Spreadsheet File VI does not function the same way. It adds an additional row. It's not clear to me why it does this. It seems completely unncessary to me. Regardless, that's what is giving you the extra row. The same thing would happen if you were to feed in a waveform datatype.
Thus, you have two choices:
02-15-2010 09:03 AM
Thanks so much. I kind of thought I was losing it, as I'd looked back at prior work (done in 8.6) and saw that I'd written the data successfully, in the past. I have about an hour this morning while the trial is shut down; will try to implement your fix.
Thanks,
Danielle