LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

arduino, labview and communication

Hi all,

 

I'm new in Labview. I would like to do a communicatiom between Arduino Duemilanove and Labview.

 

I have this program for Arduino:

 

/*
  Analog input, serial output
 
 Reads an analog input pin, prints the results to the serial monitor.
 
 The circuit:

 * potentiometer connected to analog pin 0.
   Center pin of the potentiometer goes to the analog pin.
   side pins of the potentiometer go to +5V and ground
 
 created over and over again
 by Tom Igoe and everyone who's ever used Arduino
 
 */
 
 void setup() {
  Serial.begin(9600);
 }
 
 void loop() {
  // read the analog input into a variable:
   int analogValue = analogRead(0);
   // print the result:
   Serial.println(analogValue);
   // wait 10 milliseconds for the analog-to-digital converter
   // to settle after the last reading:
   delay(10);
 }

 

I can not read a value of potentiometer. I don't know how to do the serial comunication in Labview.

I found this page http://web.me.com/iklln6/automation/LabVIEW.html, but it doesn't work.

I don't know what is wrong.

 

Could you help me?

 

Thank you.

 

bonatius

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

@bonatius wrote:

... I don't know how to do the serial comunication in Labview.

...


Hi bonatius,

see the example finder and search for serial. There you'll find a starting point.

 

Mike

 

0 Kudos
Message 2 of 14
(5,011 Views)

Hi Mike,

 

I have tried to use this Arduino Connection (SubVI).vi from this page http://web.me.com/iklln6/automation/LabVIEW.html, but Labview is ansvering with this error code -1073807246 and source Property Node (arg 1) in VISA Configure Serial Port (Instr).vi->Arduino Connection (SubVI).vi and nothing works.

 

I don't know what is wrong.

 

0 Kudos
Message 3 of 14
(5,005 Views)

Hi bonatius,

sorry, but i can't open the link. It seems like it is not valid.

Did you try it with the serial example? Do you use your device from another program? May be this would explain the error message.

 

Mike

0 Kudos
Message 4 of 14
(4,995 Views)

The error code says the VISA is unable to access it.   Is the device is being accessed from some other application like hyperterminal? if so close the applications that is accessing this device and give a try.

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
0 Kudos
Message 5 of 14
(4,991 Views)

Since I also do work with microcontrollers. I one helped out a friend learning to use Arduino. I am not using it my self, so do not ask me any Arduino questions. But here we go. Start here http://www.ladyada.net/learn/arduino/ depending on your skills you may go directly to lesson 4. Run the example as showed to ensure your system is ready to go. Load your Arduino with the second example that send "Hello world" in a loop. Quit the Arduino development system Then start Labview. Goto help in the toolbar select Find Examples. And then so a search for serial open the "Basic Serial Write and Read.vi" example. Select correct com port and use these settings Baud rate=9600, data bits=8, paryti=none, stop bits=1, flow control=none. Turn write OFF.  and set byes to read like say 20. Reset your Arduino and run the Labview example. You should now be able to read from your Arduino 

 



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

 


@MikeS81 wrote:

Hi bonatius,

sorry, but i can't open the link. It seems like it is not valid.

 

Mike


 

He had a comma at the end of the link here is the site he was refering to.  Looks like a nice quick way to get LabVIEW to take measurements from an Arduino.

 

http://web.me.com/iklln6/automation/LabVIEW.html

0 Kudos
Message 7 of 14
(4,969 Views)

Hi Coq Rouge,

 

you are right, the Arduino development system have to be quit. Now it works.

 

Now I try to do some tests.

 

Thank you.

 

bonatius

0 Kudos
Message 8 of 14
(4,928 Views)

hello such, any consultation with arduino is better than consult in the next group, also find, documentation, examples

 https://decibel.ni.com/content/groups/labview-interface-for-arduino

0 Kudos
Message 9 of 14
(3,470 Views)

You can see an example for analog reading, make a program in LabVIEW to test and verify the correct operation of our program in the Arduino , we will make the reading of data transmitted by the Arduino from the serial port on the card installed , proceed to read the COM port 

https://decibel.ni.com/content/docs/DOC-33278

Download All
0 Kudos
Message 10 of 14
(3,468 Views)