Introduction: Reading Real Time Analog Input Using Arduino and Plotting Using LabVIEW

Picture of Reading Real Time Analog Input Using Arduino and Plotting Using LabVIEW

When i was doing my projects one of the integral part was reading analog data and plotting it .Since i found no articles or instructable with reliable material to do it i thought of writing down the steps which i finally used to accomplish my task.

The software used is LabVIEW .

http://www.ni.com/download-labview/

After downloading LabVIEW Evaluation Version :

http://digital.ni.com/public.nsf/allkb/A20FBBD3682...

Step 1: Getting the Hardware Ready

Interface your Arduino Board to read Analog Input .And pass them as output value in your Serial Peripheral Monitor.

For example : If you are reading analog value from pin A0 and want to plot the data

const int analogInPin = A0; // Analog input pin that the potentiometer is attached to

void setup() { // initialize serial communications at 9600 bps: Serial.begin(9600); }

void loop() {

// read the analog in value: sensorValue = analogRead(analogInPin);

// print the results to the serial monitor:

Serial.print("sensor = " );

Serial.print(sensorValue);

// wait 2 milliseconds before the next loop // for the analog-to-digital converter to settle // after the last reading: delay(2); }

Step 2: Getting the Software Ready

After the hardware is ready and interfaced upload the file analog read file .

Power up the Arduino do not open the Serial monitor And make sure that the arduino IDE is not ope because if you try to open both ArduinoIDE and LabVIEW to read your data it will show you an error as the values coming over the SPI will be both be tried to be obtained by LabVIEW and ArduinoIDE.

How to open LabVIEW

Just download the attached VI(Virtual instrumentation) and open the Front Panel

Can you find comp port click the arrow and click on the PORT your arduino is connected to Be Careful to choose the right Port

Click on the button Read

Comments

exzibit29 (author)2016-11-14

Is it possible to read AC voltage using this vi?

AkhileshT (author)2015-10-24

Which version of LABVIEW did you use

There are 4 different options for download

himshekhar.das (author)2015-07-09

I have developed the VI in labview 2011

yamela (author)2015-07-09

I can't open the VI.. do you have the labview 2011 version to upload? Thank you!

MsSweetSatisfaction (author)2015-01-17

Dude this is some awesome information that I bet can lead to some very exact results! You should think about entering this into our Explore Science Contest!

Send me a link for the contest

About This Instructable

19,282views

28favorites

License:

Add instructable to: