LabVIEW

cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

binary handling

Hello !

I'm having a measuring systems that gets the data thru the serial port. In
my system there are four channels that collects data and puts it the to the
SERIAL PORT via A/D. So I have a bitsream that has data from four censors.
So my problem is separate the bits into four array to get them plotted?
Now I need a good hint or an address where I could get more advice how to do
that ?
๐Ÿ™‚
0 Kudos
Message 1 of 3
(2,678 Views)
Depends on the precise form of the data coming back in- this is really two
questions

1) How to convert an array 123412341234 into four arrays 111 222 333 444
-> use the resizeable "Decimate 1D Array" node from
the Array palette and make it four elements high

2) How to convert a string of bytes to a single or double precision number
-> In advanced/data manipulation palette, look at the
"join numbers" and "swap words/bytes" functions to get
the data in the correct form internally, from whatever
form the instrument sends it, and use the "type cast"
function to finally cast the bytes into a single or double
precision number.

It's probably easiest to first do (2) t
hen (1).

"LabViewRookie" wrote in message
news:UgfZ7.82$BJ4.12188@read2.inet.fi...
> Hello !
>
> I'm having a measuring systems that gets the data thru the serial port. In
> my system there are four channels that collects data and puts it the to
the
> SERIAL PORT via A/D. So I have a bitsream that has data from four censors.
> So my problem is separate the bits into four array to get them plotted?
> Now I need a good hint or an address where I could get more advice how to
do
> that ?
> ๐Ÿ™‚
>
>
0 Kudos
Message 2 of 3
(2,678 Views)
LabViewRookie wrote:

> Hello !
>
> I'm having a measuring systems that gets the data thru the serial port. In
> my system there are four channels that collects data and puts it the to the
> SERIAL PORT via A/D. So I have a bitsream that has data from four censors.
> So my problem is separate the bits into four array to get them plotted?
> Now I need a good hint or an address where I could get more advice how to do
> that ?
> ๐Ÿ™‚

############

Hi,
usually the bits coming from the serial port are handled by the serial vis.
These VIs give them back as strings. So use the VI "String Subset" to divide the
string in portions and convert them afterwards in numbers.
This is the way I allways handle this.

Good luck,
Rainer
0 Kudos
Message 3 of 3
(2,678 Views)