Introduction: Interface Arduino With Labview

In this we will see how we connect arduino with labview with serial communication and controlling led.Labview is software that work as grapical representation code so anybody can use and make cool stuffs.

Step 1:

Open labview.

Create a new VI in File > New VI.

In block diagram

  • right click->Instrument I/0->Serial->Visa configure serial port

  • right click->Instrument I/0->Serial->Visa write

  • right click->Instrument I/0->Serial->Visa close

Step 2:

For toggle of led we use switch for that go to Front panel>right click->Boolean-> Vertical switch. you can use any switch you want.

Come back to block digram.Now Switch we used is boolean so we any conversion to string.For that will convert the boolean to (0,1) and then to string.

  • right click->search-> boolean to (0,1)
  • right click->search ->format to string.

Step 3:

for Continuously running use while loop from structures menu.

That's it labview now come to arduino.

open arduino & write following code also availabel inbuild in arduino.

int data;
void setup()

{

Serial.begin(9600);

pinMode(13,OUTPUT);

}

void loop()

{

if(Serial.available()>0)

{

data=Serial.read();

if(data=='1')

{

digitalWrite(13,1);

}

else if(data=='0')

{

digitalWrite(13,0);

}

}

}

Step 4:

Upload the code and run the labview vi.