キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

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 件の賞賛
メッセージ1/11
4,177件の閲覧回数

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.

メッセージ2/11
4,157件の閲覧回数

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

0 件の賞賛
メッセージ3/11
4,136件の閲覧回数

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.

メッセージ4/11
4,133件の閲覧回数

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 件の賞賛
メッセージ5/11
4,118件の閲覧回数

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?



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
メッセージ6/11
4,106件の閲覧回数

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

0 件の賞賛
メッセージ7/11
4,103件の閲覧回数

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?



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
メッセージ8/11
4,089件の閲覧回数

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

メッセージ9/11
4,077件の閲覧回数

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

0 件の賞賛
メッセージ10/11
4,061件の閲覧回数