10-06-2010 03:08 AM
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
10-06-2010 03:31 AM
@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
10-06-2010 03:43 AM
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.
10-06-2010 06:18 AM
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
10-06-2010 06:25 AM
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.
10-06-2010 08:39 AM
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
10-06-2010 08:46 AM
@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
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-07-2010 05:01 AM
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
11-22-2013 04:22 PM
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
11-22-2013 04:23 PM
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