Get Adobe Flash player
FacebookTwitterGoogle+
English Arabic French German Italian Portuguese Russian Spanish

Did you know?

The first use of water to generate electricity was in 1882 on the Fox river, in the USA, which produced enough power to light two paper mills and a house.
 

Help us stay online:

small donate

 

LABVIEW signal processing COM port www.Electronics-Base.com frontendLABVIEW is data flow oriented programming language. It gives engineer many possibilities to make complex program in few minutes. Down side is that it is usually used with NI data acquisition boards which are expensive. In this example we will use data received from cheap microcontroller via COM port of PC to process and display data.

 

LABVIEW is data flow oriented programming language. It gives engineer many possibilities to make complex program in few minutes. Down side is that it is usually used with NI data acquisition boards which are expensive. In this example we will use data received from cheap microcontroller via COM port of PC to process and display data.

Program is very simple and easy to follow. Front panel is divided into several tabs for easy usage.

In COM port configuration tab configure COM port name, correct baud rate.. When high sample rate by microcontroller and sending to COM port is used, reading one by one character would be very slow. Because of this we set number of bytes per COM port data readout. This means that no data will be plotted to graph until this amount of bytes declared are received. My advice is that you set small numbers, even 1 if you are sending data few times a second. In my case I sent 5000 ADC samples to UART in one second. Each byte sent to COM port represents signal amplitude and it is 8-bit value.

After receiving data from UART it is converted to numeric value and processed for various parameters such as RMS, amplitude, frequency and displayed on chart.

LABVIEW VI file can be downloaded from this link and it is displayed on pictures below:

FRONTEND

LABVIEW signal processing COM port www.Electronics-Base.com frontend

DATAFLOW DIAGRAM

LABVIEW signal processing COM port www.Electronics-Base.com code

On video below you can see this code in action. COM port receives data from AVR ATmega8 microcontroller. Each byte receives is 8-bit value that is ADC readout. AVR is connected to function generator. We change signal shape, amplitude, frequency, turned on frequency sweep... These changes can be seen on charts.

AVR microcontroller C code can be downloaded from this link.