knowledge-database (beta)

Current group: comp.lang.labview

Re: read numerical data with visa serial read

Re: read numerical data with visa serial read  
chilly charly
From:chilly charly
Subject:Re: read numerical data with visa serial read
Date:Sun, 23 Jan 2005 06:40:33 -0600 (CST)


fred wrote:
Hi!

I will recieve numerical valu=
es (unsigned integers 0-255) from hardware via the
visa serial read func=
tion. 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" asciivalue=
s? 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 num=
ber directly through the string even though its a different datatype?
r>/thanks fred



Serial data are always transmitt=
ed as a series of bytes. Upon reception, you can convert the byte series to=
anything you want. There are a number of tools for that in LV. The most st=
raightforward is probably the String To Byte Array function (in the Functio=
n>Strings>String/Array/Path conversion sub palette).
Come back and ask f=
or more help if deeded...

CC
   

Copyright © 2006 knowledge-database   -   All rights reserved