LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xy graph

Hi everybody,

I'm just starting with LabView and I'm trying to plot some values read in from a
file. Because I do read a string I got to convert this one to a number which can
be plotted. What function do I have to use for this conversion?
Thanks for help

Jens
0 Kudos
Message 1 of 3
(2,915 Views)
Use "Type cast" or "Unflatten from String" which are found in the Advanced>>Data
Manipulation functions subpallet. Make sure you wire up an object of the
data type you want the string converted into to the "type" terminal of the
function.

"Jens Pueschel wrote:
>Hi everybody,>>I'm just starting with LabView and I'm trying to plot some
values read in from a>file. Because I do read a string I got to convert this
one to a number which can>be plotted. What function do I have to use for
this conversion?>Thanks for help>>Jens>
0 Kudos
Message 2 of 3
(2,915 Views)
Jim Kring wrote:

> Use "Type cast" or "Unflatten from String" which are found in the Advanced>>Data
> Manipulation functions subpallet. Make sure you wire up an object of the
> data type you want the string converted into to the "type" terminal of the
> function.

Erm, this will _not_ work except in the case that the file contains
numeric data which has been flattened to string before it was written to disk.

Assuming that you file contains ASCII representations of numbers then
you want to look at the string conversion functions in the string
pallette. If it contains tabulated numbers then Spreadsheet String to
array will work nicely (though you'll have to chop and dice the array
to get it into an x-y plot). Scan from string is quite good in most
other sit
uations, although you'll probably want to read you file in
line by line.

If the file contains non-labview generated binary data then you're
going to have more work to get the data back. You'll need a
description of the binary format in use and convert
the string to an array of unsigned bytes and then interpret the
bytes in the right way to recover the data.

> "Jens Pueschel wrote:
>>Hi everybody,>>I'm just starting with LabView and I'm trying to plot some
> values read in from a>file. Because I do read a string I got to convert this
> one to a number which can>be plotted. What function do I have to use for
> this conversion?>Thanks for help>>Jens>


--
Gavin Burnell Dept. Materials Science and Metallurgy
Device Materials Group University of Cambridge, UK
Errors using inadequate data are much less those using no data at all.
(Charles Babbage 1792-1871)
--
Gavin Burnell
Condensed Matter Physics Group, University of Leeds, UK
http://www.stoner.leeds.ac.uk/
0 Kudos
Message 3 of 3
(2,915 Views)