LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading ascii codes from serial port and plotting them

Solved!
Go to solution

Hello

 

I am trying to build a VI that reads data (ascii values) from the serial port.

 

I am trying to build a wireless phonocardiogram. I have a microphone that acquires heart sounds. these signals are amplified and sent to a A/D converter to digitize them. the digital signal are sent to a base unit. The digitals signals received at the base unit have to be sent to a computer (over a serial port to view them).

 

I would like build a VI to plot ascii data received over the serial port.

 

I would like to plot those values so that the plot just looks like a analog signal (the one I had before A/D conversion).

 

Can anyone provide me some help?

 

Thanks in advance.....

 

0 Kudos
Message 1 of 14
(5,628 Views)

Hi chaitu209

What is your transmission speed,  samplerate, and bandwidth needed in your project? The bandwidth of the serial port is somewhat limited. Let me give you an example

Say you are using 115200 Kbit per second as transmission speed, one start bit/stop bit and parity bit, and 8 bit data. This will give you 115200/11 bytes pr second as the maximum theoretical transfer rate/sample rate. But if you are using up to 16 bit AD your  maximum samplerate will be 115200/(2x11). So my advise to you is to use a binary transfer protocol not ASCII based protocol. This is not a problem in Labview with serial transmission.



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 2 of 14
(5,610 Views)
Solution
Accepted by topic author chaitu209
hii
0 Kudos
Message 3 of 14
(5,598 Views)

Naveen Santhosh wrote:
hii

 

Could you please elaborate somewhat 😉


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 4 of 14
(5,591 Views)

Naveen Santhosh wrote:
hii

Syntax Error in line 1.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 14
(5,529 Views)
Solution? Eh again starting to see things!!!
0 Kudos
Message 6 of 14
(5,454 Views)
I guess you have worked with graphic programming language to long. If you had been working with a text based programming language. You would have seen the the brilliant and genius ingenuity in the answer from Naveen Santhosh. Like some of us obvious did.


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 7 of 14
(5,450 Views)

 

 

 hmm.jpg

 

 

 

 

 

ok.PNG

 

 

Message 8 of 14
(5,432 Views)

how to plot ascii data while it is coming from the port

the scheme said earlier works with a predefined string

kindly some one respond if the solution is known

Message Edited by chaitu2 on 10-13-2009 12:30 AM
0 Kudos
Message 9 of 14
(5,278 Views)
If the data is truly ASCII, then all you need to do is use the Scan From String function and wire the output of that to a chart.
0 Kudos
Message 10 of 14
(5,237 Views)