LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert output buffer format to text

Solved!
Go to solution

I received an ASCII output from a signal source analyzer that I would like to convert to a readable text format. In the attached vi (LV2009) the read buffer string control contains the data I'm receiving and I put a free label on the front panel that contains the expected output. When I typecast to an array of single I got the good values but every 3 values I got a number that is probably a conversion of a return character. I could sort the array to convert the number to string and every third value to \r\n but it seems a silly way to solve this. There must be an easy way to do it. Any idea?

 

Ben64

0 Kudos
Message 1 of 4
(3,045 Views)

Edit: Missed convert to text part.

 

RemoveEvery3rd.png

0 Kudos
Message 2 of 4
(3,041 Views)
Solution
Accepted by topic author ben64

As an added bit of fun, I originally wanted to do this:

 

CompileError.png

 

A little annoying that the Build Matrix function does not deal with SGL, but for some reason LV9 throws this at you:

 

CompileWarningBox.PNG

 

Consider this my report to NI Tech Support.

 

Adding a coercion to DBL before Build Matrix kind of defeats the purpose, but fixes the problem.

Message 3 of 4
(3,034 Views)

Thanks Darin, by adding the coercion to double I got the expected result format.

 

Ben

0 Kudos
Message 4 of 4
(3,007 Views)