SignalExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

Save scalar ascii data to columns

Hello,
 
I have created a signal express project (signalexpress 2.0) that creates 60 second averages of data coming in over an NI USB-6251.  It runs through a conditional repeat of aquire steps until a generated signal (time) reaches 60 seconds.  This part of the workbench seems to function fine, but the final step is to save the resulting scalar data to an ascii file - and the output is not in a normal column format. 
 
Each time I hit the "run once" button, I would like a row of data to be appended to the ascii file - with each channel under the appropriate channel name (in the appropriate column).  Instead, I get an output that has channel names in each column, followed by a line of string output for each channnel.  You can see the output in the attached "NewTest1.txt" file.
 
The project is also attached.  Rename ".txt" to ".seproj" to open it.
 
 
Any suggestions?
Download All
0 Kudos
Message 1 of 7
(6,999 Views)
Hi,
 
I believe this is a bug in SignalExpress in this situation, so I filed a bug report to have them look into it.
 
In the meantime (and I realize this is not the ideal solution for you), I created a LabVIEW VI that you can call from SignalExpress using the "Run LabVIEW VI" step. I wrote this VI using the User-Step template which is included with SignalExpress, and using LabVIEW 7.1, not knowing which version of LabVIEW you might have, if any, should you want to modify the VI.
 
To use this VI, replace the Save To ASCII step that you have and call the top-level VI in the LLB included below. Since the VI doesn't have access to the names of the inputs, I had to include an array of string which you'll have to write the names of your inputs in. I hardcoded it to have a maximum of 7 inputs like in the project you provided.
 
I hope this helps until the bug if actually fixed. Please reply if you have any questions regarding the attached files.
 
Phil
 
Message 2 of 7
(6,995 Views)

Phil,

Thanks for the quick reply and the vi.  I'll certainly post a reply with questions if anything comes up.  The only other solution I could devise (As I do not have labview), was to post process and rearrange the data using an excel macro.  This could work fine, but adds unnecessary time and steps - so I really appreciate your solution.

Paul 

 

0 Kudos
Message 3 of 7
(6,985 Views)

Phil,

 

I do have one question.  The step works great, but it seems to overwrite my data file each time I hit "run once", rather than appending to the file.  Is there something I can do to have it append the new data to the next row (with no header line) each time I hit "run once" using the same file name?

Thanks again,

Paul

0 Kudos
Message 4 of 7
(6,981 Views)
Paul,
 
Certainly. I modified the attached VI to only write the headers when it's a new file, and if the file already exists, then just append the data. This means you'll have to delete the file any time you want to start over (or select a different filename).
 
Phil
 
0 Kudos
Message 5 of 7
(6,978 Views)
Oops. Classic. Wrong attachment with the same name, here is the correct LLB (still with the same name).
 
Sorry about that.
 
Phil
 
Message 6 of 7
(6,977 Views)

Perfect!  It is now the only thing that has gone right today...

 

Paul

0 Kudos
Message 7 of 7
(6,968 Views)