03-14-2013 09:29 AM
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.
03-14-2013 09:54 AM
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.
03-14-2013 03:46 PM
What information are you trying to write to Arduino? Also, what do you do mean by "fix the temperature reference"?
03-15-2013 07:05 AM
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 .
03-15-2013 12:58 PM
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.
03-16-2013 07:27 AM
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.
03-16-2013 11:12 AM
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
04-11-2013 08:02 PM
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
04-11-2013 08:08 PM
You can check the following code, I hope you serve