LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino read write serial interface

This is not a forum for doing someone's homework but help will be provided for people who do most of the work themselves. Personally, I think your arduino code should be modified to do a single read of multiple values. No need for a prompt to the user since you are not displaying the prompt and doing it manually. You can easily send both values with a single write as I have already mentioned. In the LabVIEW code, have separate controls for the latitude and longitude and only do a write when you click a Boolean.
0 Kudos
Message 11 of 17
(1,544 Views)

Listen "

0 Kudos
Message 12 of 17
(1,535 Views)
I am helping. I've given you ideas and a link to working arduino code. You have had plenty of time to try the different things I've suggested. You won't learn anything if someone just gives you a solution. You have not shown 'many ways'. You've shown one and the reason it doesn't work has been explained.
0 Kudos
Message 13 of 17
(1,515 Views)
p.s. Since I am convinced you can fix the problem by changing the arduino code to a better architecture, being new to LabVIEW does not carry much weight in my opinion.
0 Kudos
Message 14 of 17
(1,504 Views)
p.s. Since I am convinced you can fix the problem by changing the arduino code to a better architecture, being new to LabVIEW does not carry much weight in my opinion.
0 Kudos
Message 15 of 17
(1,496 Views)

@EngFarouk89 wrote:

Listen "


Whether or not you like the response you are given, please realize that you have asked for help and someone has volunteered it when they had no obligation to do so.  Ignore it, ask the question a different way, go somewhere else, whatever you want to do but please don't disrespect the person doing effort on your behalf.

 

As I understand it:

  you want the Arduino to post "Enter the Latitude" to the serial port

  the VI should recieve this and ask the VI user to enter a number

  the VI should write this number to the serial port

  the Arduino recieves this and then posts "Enter the Longitude" to the serial port

  the VI should recieve this and ask the VI user to enter a number

  the VI should write this number to the serial port

 

If my understanding is correct, everything I posted in post #5 is still true.  Read the serial port (first) and decide what do with what you get by using a CASE structure. Rework your VI per the suggestions and if you're still having problems post your updated VI and tell us what is not working for you. 

Message 16 of 17
(1,478 Views)

@EngFarouk89 wrote:

Hello every one ...  I am working recently on a read write serial communication with Arduino via LabVIEW. At the beginning Arduino asks like that " Please enter the value of Latitude" and I type a value of a certain latitude ( like 33) and then it askes for longitude "Please enter the value of Longitude" , I type a value of longitude ( like 44) but what happend the labview sends 33 to the arduino and does not send the another value (44) , so the Arduino takes (33) for both latitude and longtude unlike what I want so what is the problem. the block digram shown below . thanks to every one tries to help me Heart

lv block.jpg


 

EDIT:

If the Arduino is prompting you for latitude value why aren't you waiting for it and then writing the value back?

 

As currently written, you have a WHILE loop that repeatedly/continuously writes the value in Write string control to the serial port  then Reads the serial port.

 

 

 

 

 

 

 

 

 

 

 

0 Kudos
Message 17 of 17
(1,461 Views)