‎01-23-2005 05:54 AM
‎01-23-2005 06:11 AM
@Fred wrote:
Hi!
I will recieve numerical values (unsigned integers 0-255) from hardware via the
visa serial read function. This function only delivers data through a string!
My question is:
Is there a way to collect the values (read one byte at a time) in the way they come, as numerical
data, or will this readfunction in some way convert all data to ascii-values or does it only
"understand" asciivalues? This will make difference in code.
Lets say the numerical number 123 goes from hardware to LV:s visa serial read, Can I
collect this number directly through the string even though its a different datatype?
/thanks fred
‎01-23-2005 02:06 PM
‎01-23-2005 02:35 PM
@Fred wrote:
So I Can use "string to byte array" function as you say and this output will be exact number from hardware?
My question is really in which form my unsigned 8 bit integer from hardware will "come out"
from the readfunction. If i want to get one whole value from hardware, lets say 123, how many bytes must
the readfunction take to read, one i hope?
Or is it so that the hardware must convert this value to strings,"1", "2" and "3" before sending so that the readfunction must take three bytes and then you have to program a little to get those to one numerical value?
‎01-23-2005 03:41 PM
‎01-23-2005 03:49 PM
@Fred wrote:
Hi again!
So your answer is I can use "string to byte array" function, and let
the readfunction take one byte, and i dont have to worry?
/Thanks Fred!
‎01-24-2005 02:16 AM
‎01-24-2005 04:08 AM
‎01-24-2005 12:11 PM
‎01-24-2005 12:45 PM