LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview and higher baud rate data real time plotting

hi there friends...

I want to plot my data at real time..

Baud rate is 57600..

Hyperterminal data is in the format like

212   121

43     24

186   144

34     53

 

means column 1 for my ADC channel 1 and column 2 for ADC channel 2

I have tried another software but since baudrate is high, data captured by hyperterminal is too fast therefore cant plot real time..

So please could you people guide me that is this possible through Labview..

I hope really good from this software...Smiley Sad

thank You guys...

0 Kudos
Message 1 of 16
(2,653 Views)

Hi C3,

 

It should be possible assuming your CPU is fast enough.  With a Baud rate of 57600 if my calculations are correct it looks like you will need to take a sample every ~17.36us which should be easily achievable using modern processors.  Using the "Wait Until Next ms Multiple" function you should be able to control the timing of each iteration of a while loop.  I am not familiar with Hyperterminal, but it appears to be using a serial interface.  If you are using this setup there are VISA serial communication VIs available within Labview that can be used to access serial data.  The connection must be set up an then the data can be read from the port.  There are several serial examples available in the example finder which should give you a good starting point.  After the data is read each iteration it can be plotted using the Waveform Chart.

Justin D
Applications Engineer
National Instruments
http://www.ni.com/support/
0 Kudos
Message 2 of 16
(2,635 Views)

hi thank you for the reply..

I have started with the basic serial read and wite example..

I am getting data from COMM port in this format..

 134 0

 132 0

 131 0

because I have some voltages on Ch0 of ADC and 0 voltages on ch1 of ADC...

Now the data is in string format ..

Using Decimal string to Number and then futher passing it from (DBL) double precison float I connected the wire with waveform chart this is merging my both columns means plotting at 134 then  0 and so on,,

Now the problm is that I want to plot 1st columnn seprately as a channel and 2nd column seprately as a channel could you please guide me how to do that in labview...

In another software I have done this using reshape/resize array..

Thank you...

0 Kudos
Message 3 of 16
(2,609 Views)

Hey C3,

 

I set up a little example for you that I think should accomplish the task at hand.  It splits that string and then plots it as 2 separate plots on a Waveform Graph.

Justin D
Applications Engineer
National Instruments
http://www.ni.com/support/
Message 4 of 16
(2,594 Views)

Try:

 

 Transpose an 2D Array

 

Programming>Array>transpose 2D


@C3-C4 wrote:

hi thank you for the reply..

I have started with the basic serial read and wite example..

I am getting data from COMM port in this format..

 134 0

 132 0

 131 0

because I have some voltages on Ch0 of ADC and 0 voltages on ch1 of ADC...

Now the data is in string format ..

Using Decimal string to Number and then futher passing it from (DBL) double precison float I connected the wire with waveform chart this is merging my both columns means plotting at 134 then  0 and so on,,

Now the problm is that I want to plot 1st columnn seprately as a channel and 2nd column seprately as a channel could you please guide me how to do that in labview...

In another software I have done this using reshape/resize array..

Thank you...



array.

0 Kudos
Message 5 of 16
(2,591 Views)

hi Justin and Mark..

I am going to implement this...

Thank you  for the help...Smiley Happy

0 Kudos
Message 6 of 16
(2,579 Views)

Hey Justin which block do you use after Decimal String to Number blocks..?

 

 

0 Kudos
Message 7 of 16
(2,575 Views)

Okay I got it 🙂 but there is one problem that my serial data coming from port is string but in your example you have 1D array of string ..

It means I have to convert my serial string data into 1D array of string data Am I rite...?

0 Kudos
Message 8 of 16
(2,550 Views)

I think Justin was assuming that each string you read from the serial port contains the two data values separated by a space character. Then the loop which contains the Read function has an autoindexing output so that the array of strings is generated automatically.

 

If you are doing it differently or need to interpret the data while the Reads are continuing, you will need to use parallel loops and a queue or functional global VI to transfer the data.

 

Show us what you have tried.

 

Lynn

0 Kudos
Message 9 of 16
(2,546 Views)

Hi, Thank you Guys 🙂

Specially Justin 🙂

Okay now I am getting data of my two columns serialand plotting on wave form graph , problem is that I want to move my x axis means my data is compressing on the same window of waveform graph which i dont want so how to move x axis (updating) that data should not compressed on the same window... ?

Thank you.........!

0 Kudos
Message 10 of 16
(2,522 Views)