LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do we read ASC 11 data and convert it into 32 bit floating point binary.

how do we read ASC 11 data from a file and convert it into 32 bit floating point binary.an example would be nice. thanks
0 Kudos
Message 1 of 4
(3,090 Views)
By "ASC 11", do you mean ASCII (American Standard Code for Information Interchange)?
Start by looking at the Write to Text File.vi and Read from Text File.vi examples that ship with LabView. To find the examples, from any LabView window, goto Help >> Find Examples >> Search. Then enter File I/O in the box labeled Type a keyword to find. These examples are specific to tab-delimited spreadsheet-format files, but you'll see how to open a file, read from it, convert from string to numeric, and close the file.
On the String >> String/Number Conversion palette, there are several conversion functions. The most flexible function to convert to a number is Scan Value, where you can specify the numeric representation of the output number. LabView calls 32-bit floating poin
t numbers Single Precision.
0 Kudos
Message 2 of 4
(3,090 Views)
There are two examples which ship with LabVIEW that may really help you out here. They are:

Write to Text File.vi
Read From Test File.vi

One writes data to a text file and the other reads that data, converts it to floats, and then plots them. It's probably very similar to what you are looking for.
J.R. Allen
0 Kudos
Message 3 of 4
(3,091 Views)
0 Kudos
Message 4 of 4
(3,090 Views)