09-01-2014 12:17 AM
Hi All , I recently worked on a project called two axis solar tracking system that tracks the motion of the sun via mathematical formulas. I used Arduino platform as a controller. Now the communication between Arduino and computer is needed through Serial port. I want to create LabView program to read and write values to and from Arduino via VISA. the VI sends the Longitude and Latitude as user input to the controller and receives the values of Azimuth and Elevation angles and save these values into txt file, also I need that txt file contains the date and time of the readings. thanks to any one who try to help .
09-01-2014 01:54 AM
So, What have you done so far.
Is your Arduino sketch ready and now you just want to communicate with LabVIEW.
If you are succesfully reciving the values from Ardunio then communicating with LabVIEW will be easy.
09-01-2014 05:53 AM
I have no problem with Arduino, my issue with labview because I am new with it , thanks
09-01-2014 05:58 AM
Ok, then look at the VISA palatte , you will find a lot of examples that ships with LabVIEW.
Start with simple VISA read write and post your vi here if you are having any problems.
09-01-2014 07:20 AM - edited 09-01-2014 07:33 AM
I tried with this vi but the readings apear for a while and disapear unlike arduino serial monitor stay and scrolling, I need the data stay on the indicator and scrolling , finally I want these data saved in txt file or any common format for documentation.
09-01-2014 07:49 AM
Sice you wrote the Arduino code, you have control over the serial protocol. So let's talk about that before we start getting into the LabVIEW part of it.
How is the data formatted? ASCII? Raw binary?
When is the data send from the Arduino? Only as a response? Every X ms?
09-01-2014 07:59 AM - edited 09-01-2014 07:59 AM
Data transmitted from arduino to the Computer in ASCII format. thanks
09-01-2014 08:11 AM
Ok, since we are dealing with ASCII data, make sure you are appending an End Of Line to your data inside of the Arduino. This will make life a lot easier.
With the termination character enabled, the VISA Read will stop reading when 1) the desired number of characters are read, 2) the termination character is read, or 3) a timeout happens. So get rid of that Bytes At Port node. Instead, wire in a large number of characters to read (something like 50). The VISA Read will stop when that termination character is found and just return your single message.
Now, when does the Arduino send that data to your host computer?
09-01-2014 08:38 AM
09-01-2014 12:20 PM - edited 09-01-2014 12:39 PM
the values of Azimuth and elevation angle sent to labview program every single minute.