05-15-2014 04:05 PM
To whom it may concern:
I have seen a lot of way to comunicate with the Arduino microcontroller using Labview. But I am having a lot of trouble of finding ways and examples using LabWindows CVI, can anybody help me with the #include files that I need to use in order to comunicate with the microcontroller?
Regards
Francisco
Solved! Go to Solution.
05-16-2014 06:08 AM
Hi Francisco,
Arduino connects like a virtual COM port. So the RS-232 library of LabWindows is capable of communicating with the Arduino.
See the instrument help for the RS-232 (serial) library.
There is also nice examples about using that library. They are installed together with the CVI environment.
See if you can find them and post back if you need more help.
Regards,
05-16-2014 10:15 PM
Thank you very much ebalci, the RS232 library worked awesome:
First I program the arduino using the arduino software
I use:
// in the main section
DisplayPanel (...) //then i added the next line to open the port COM15 (Location of the Mega 2560 microcontroller)
OpenComConfig (15,"COM15", 9600, 0, 8, 512, 512);
To send instructions
ComWrt(15,"0",1)
To read values
ComRd(15,HandShake, 256) //HandShake is a 256 char.
In the exit button I added
CloseCom(15);
This work fine for controling relays
05-16-2014 10:16 PM
Thank you very much ebalci, the RS232 library worked awesome:
First I program the arduino using the arduino software
I use:
// in the main section
DisplayPanel (...) //then i added the next line to open the port COM15 (Location of the Mega 2560 microcontroller)
OpenComConfig (15,"COM15", 9600, 0, 8, 512, 512);
To send instructions
ComWrt(15,"0",1)
To read values
ComRd(15,HandShake, 256) //HandShake is a 256 char.
In the exit button I added
CloseCom(15);
This work fine for controling relays
05-16-2014 10:21 PM
Thank you very much ebalci, the RS232 library worked awesome:
First I program the arduino using the arduino software
I use:
// in the main section
DisplayPanel (...) //then i added the next line to open the port COM15 (Location of the Mega 2560 microcontroller)
OpenComConfig (15,"COM15", 9600, 0, 8, 512, 512);
To send instructions
ComWrt(15,"0",1)
To read values
ComRd(15,HandShake, 256) //HandShake is a 256 char.
In the exit button I added
CloseCom(15);
This work fine for controling relays