LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

interpreting TCP read output string

Solved!
Go to solution

TCP read brings back strings, but in reality, a string is just a series of bytes.  What you do with that series of bytes is up to you.  If you just display the string, LabVIEW will show the bytes according to its ASCII table.  You can typecast the string to a U8 array.  You can typecase it to an array of  U16, I16, U32, ......   or to other more complicated structures if you know how the data is laid out.

 

What does the data represent in the database, and how do you want to view it in your LabVIEW program.

 

 

0 Kudos
Message 11 of 13
(952 Views)

Thank you for the description.

 

In terms of interpretation, I struggle with strings (MySQL - TEXT). If there are special characters, LV interprets them as ASCII instead of utf-8. Is there a way to interpret the outcome of the TCP read as utf-8? Think there is a function Flatten/Unflatten String, but I do not know how to use it in my case. My temp solution is kinda hack, not a real solution, vi attached ...

0 Kudos
Message 12 of 13
(923 Views)

now incl. the vi ...

0 Kudos
Message 13 of 13
(920 Views)