LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data transmission

Hi all,
I have difficulties in data conversion and transmission.
(1) In data transmission, if i can only transmit SGL (singe precision float) thru COM port with 1 byte each time limitation. What can I do?
(2)Some recommended me to convert the nos. to hex display and some recommended ASCII code and some binary, I do confuse. What are the differences among them?
(3) I downloaded some VI converting numbers to ASCII code, but I find they work only for numbers from 0-127 but not in extended ASCII table 128-255.
When using ASCII code, is there any problem in transmitting unprintable characters (Dec 0-31)?
(4) I attach my VI in which SGL is converted into ASCII code, how can I read them in decimal format and how I can transmit the correct nos. fr
om 128-255?
I think those questions are elementary but I�ve never handle this kind of question before. Please advise me.
Thank you very much
nick
0 Kudos
Message 1 of 3
(2,701 Views)
Why do you convert the sgl to an integer string and then to a U8 and then type cast that to a string which you send? All you need is to flatten it to a string (once) and if you want to keep the precision you cannot convert it to a U8.

If you have an SGL and want to read that SGL across a serial link type cast the SGL to a string (just wire it to the type cast function, it defaults to a string), wire that string to the serial write...and then when you read it make sure you get all the bytes (4) and then wire that string to a type cast with an SGL as the specified type. By just type casting you are sending the data as a binary string. Unless you have some reason for adding overhead there is no need to make it a readable string.
0 Kudos
Message 2 of 3
(2,701 Views)
Mads,
i got it. thx
nick
0 Kudos
Message 3 of 3
(2,701 Views)