LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Data communication from Labview to Arduino

Hello,

I recently started in a project that involves Labview and Arduino. I use them for monitoring and controlling of a temperature into a chamber (it is a part of my master thesis). Particularly, my idea consists that Arduino read a temperature sensor and warm a thermal resistor, depending of the temperature reference. I use Labview for monitoring the temperature in the chamber and showing a graphics. However, it will be very interesting to fix the temperature reference through Labview, and this writes this value on a Arduino register.

The problem is how I can do it: programming Labview for write information (a register for example) in Arduino. Sincerently, I don't know how start. Any help?

Thank you very much,

best regards.

Antonio.

0 Kudos
Message 1 of 9
(7,232 Views)

try this method.
first write a program for arduino using arduino IDE,in which the serial ports are monitored for inputs.then connect arduino to computer.write a program in labview to write to a serial port to which arduino is attached.you can do this using VISA in labview.choose the correct COM port for your arduino.arduino should read the data written by computer,which could be strings or numeric or anything else.code should use this value to change the reference.

Electronics and Instrumentation Engineer
Freelance LabVIEW and Arduino programmer.
For projects contact me ; djac791@gmail.com
0 Kudos
Message 2 of 9
(4,541 Views)

What information are you trying to write to Arduino?  Also, what do you do mean by "fix the temperature reference"?

0 Kudos
Message 3 of 9
(4,541 Views)

Thank you very much for your support.

The idea that I have is that there is a label with a temperature in the control pannel in labview. Arduino function is to control the temperature of a chamber through the warming of a thermal resistor and monitoring the temperature through a sensor. It would be great that the final temperature of the system can be modified by using a Labview label.

However, I am having a problem with the communication between Labview and Arduino before this step that we are talking about. I try to run the Labview example (Anduino Analog Read Pin.vi), but I don't know how my laptop (a Mac) calls the USB port where Arduino is connected, and therefore, there is the typical error 5005 that VISA Resource is not correct. Arduino calls this port as /dev/tty.usbmodemfa131, but this doesn't work in Labview. And in the other threads that I have read, this problem for Mac laptop is not solved. How should I call it?

Thank you very much again,

Antonio Jesús .

0 Kudos
Message 4 of 9
(4,541 Views)

Were you able to upload the firmware with the Arduino IDE?  If yes, you should know what COM port to use.  Create a constant on the VISA Resource input of Init.vi and choose that COM port.

0 Kudos
Message 5 of 9
(4,541 Views)

Thank you for your answer Nathan_B. Yes, I select the serial port /dev/tty.usbmodemfa131 and I can upload the firmware correctly. As you say, I thought that this serial port would be valid in Labview programm, but it is not. Selecting this port in Labview, VISA doesn't understand this port and gives me the 5005 error.

0 Kudos
Message 6 of 9
(4,541 Views)

I just read that NI-VISA 5.1.2 needs this Mac requirements:

- Mac OS X 10.6.x x86 and x86-64

- Mac OS X 10.7.x x86 and x86-641

I'm using Labview evaluation 2012 and my operative system is Mac OS X 10.6.8 (kernel Darwin 10.8.0). Maybe is there a problem of compatibility between NI-VISA, Labview and my Mac?

I hope this will not be the error :S

Thank you very much,

Antonio Jesús

0 Kudos
Message 7 of 9
(4,541 Views)

Labview preenta no errors between VISA and the serial port, check these examples to communicate Arduino + programmer Labiew'm still new but I work very well, good luck, you can check the following article, I hope to serve you, good luck https://decibel.ni.com/content/thread/16912?tstart=0

0 Kudos
Message 8 of 9
(4,541 Views)

You can check the following code, I hope you serve

Download All
0 Kudos
Message 9 of 9
(4,541 Views)