LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 De-multiplexing data using Visa Read

Hello
 
I'm trying to do a simple task, but being new to this I'm having problems.
 
I transmit data down a RS232 line at 9600 baud. I have two channel of data say x and y where A and B are one byte each.
I multiplex/alternate them down the line i.e ABABABABABAB.....etc
 
At the labview end I want to seperate the data back to seperate channels for plotting on a graph. i.e A with time and B with time.
 
There must be a way of toggling some array builder conected to the visa Read VI ie odd for A and even for B and then plotting them in two seperate wave charts.
 
Iv'e got a single channel working but A and B are mixed together. (see attachment).
 
Any ideas if it can be done.
 
Thanks Bill
0 Kudos
Message 1 of 3
(2,747 Views)
If you always read an even number of bytes, you can use decimate array to split them apart.
0 Kudos
Message 2 of 3
(2,738 Views)
RatHunter wrote:
> Hello
>  
> I'm trying to do a simple task, but being new to this I'm having problems.
>  
> I transmit data down a RS232 line at 9600 baud. I have two channel of data say x and y where A and B are one byte each.
> I multiplex/alternate them down the line i.e ABABABABABAB.....etc
>  
> At the labview end I want to seperate the data back to seperate channels for plotting on a graph. i.e A with time and B with time.
>  
> There must be a way of toggling some array builder conected to the visa Read VI ie odd for A and even for B and then plotting them in two seperate wave charts.
>  
> Iv'e got a single channel working but A and B are mixed together. (see attachment).
>  
> Any ideas if it can be done.
>  
> Thanks Bill
>

Hi Bill

I think you were 90% of the way there.

If all you want to do is see the two waveforms on diffierent plots you
can right click on your chart and select stacked plots. I think you
have to increase the size of your ledgend to show two plots.

If you want the data on two different charts, index your array to two
different charts. I'm assuming by your picture that you are reading 2
bytes at a time.
Using two graphs could be useful if your plots had different time
scales. But i think the stacked plots makes more sense.

Good Luck
Eric

0 Kudos
Message 3 of 3
(2,694 Views)