LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino LabView interface

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 .

0 Kudos
Message 1 of 11
(3,196 Views)

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.

Message 2 of 11
(3,176 Views)

I have no problem with Arduino, my issue with labview because I am new with it , thanks 

0 Kudos
Message 3 of 11
(3,155 Views)

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.

Message 4 of 11
(3,152 Views)

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.

Untitled.jpg

 

0 Kudos
Message 5 of 11
(3,137 Views)

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?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 11
(3,125 Views)

Data transmitted from arduino  to the Computer in ASCII format.  thanks

0 Kudos
Message 7 of 11
(3,122 Views)

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?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 11
(3,108 Views)

and don't forget this , and this , you need to put a wait after configuring your VISA.

Message 9 of 11
(3,096 Views)

the values of Azimuth and elevation angle sent to labview program every single minute. 

0 Kudos
Message 10 of 11
(3,080 Views)