LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating 2D output

Hi,
I have written a program to communicate with Granville Phillips pressure gauge controller. It reads three measurements of the pressure and writes them to a file. However, I cannot figure out how to display those three data points in a row. The final file contains just one column while ideally it would be 3 columns (P1, P2 and P3 respectively). I am attaching the VI file here.
Thanks, 😃
Tony
0 Kudos
Message 1 of 5
(2,960 Views)

Hey Tony,

      To answer your question: the strings you're reading probably end with a carrage-return (AKA "\r" or ASCII(13)) or a line-feed (AKA "\n" or ASCII(10)) - or both.  Since you're writing the strings to a file, these End-Of-Line (EOL) characters are forcing every value to a new line! Smiley Surprised  The modification I made to your VI (attached) is to replace embedded EOLs with spaces, then add an EOL before writing one row!

There are other improvements that could be made, please consider reading the LabVIEW  Style-Guide - particlularly the "Block Diagram Checklist".  Making diagrams easy to read will help us help you! Smiley Wink

Cheers!

 

 

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Message 2 of 5
(2,941 Views)
Hey,
thanks a lot for the help. I am using LabView 7.0 and the output that I am getting now looks like:
 

2.00E-07\s

0.00E+00\s5.40E-02

However my goal is to get 2.00E-07 0.00E+00 5.40E-02

Do you know what the problem might be (the Labview version) or something else).

Thanks again,

Tony

0 Kudos
Message 3 of 5
(2,911 Views)
Hi Tony,
      Here's the VI saved for 7.0.  While back-saving, there was some complaint about the VISA VIs.  Not knowing what problem that might leave for 7.0, here's a pic of the change - just in case.
 
 
Your most recent post suggests there's still an EOL sneaking through. Smiley Wink
Please let me know if attached example doesn't work!
 
Cheers!
 
 

Message Edited by tbd on 03-05-2007 04:30 PM

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Download All
0 Kudos
Message 4 of 5
(2,901 Views)
Hi thanks for help,
I managed to finally fix it. 😃
 
 
0 Kudos
Message 5 of 5
(2,897 Views)