From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read Serial Data from Arduino using labview VISA?

Solved!
Go to solution

Thanks,

DailyDose
...

It helped me a lot!

0 Kudos
Message 51 of 141
(2,871 Views)

Hey guys, I have another problem.
Three different kinds of data are been generated and they can be read on Arduino serial monitor. I would like to read the data on LabView interface; but the first data should be read and then it should be shown on Labview interface. Likewise, for the second and third data it should happen the same thing; however, these three kinds of data should be read on different indicators.
I do not know what I should do since the Labview program read everything that is in the Arduino serial monitor and for a specific indicator I suppose to show a specific data from serial monitor.
If you could help me I would be really grateful.
Thanks!   

0 Kudos
Message 52 of 141
(2,863 Views)

What kind of data are you trying to send?  String or Values.

Message 53 of 141
(2,853 Views)
How is the data separated? Is it sent as one string with a terminator at the end and comma/tab between values? Or do you prepend something to each value such as ch1=? Obviously, if each channel is transmitted separately, you have no idea which channel is which.
0 Kudos
Message 54 of 141
(2,850 Views)

what he says   is the most recommended, place a delimiter between each data sent 

 

0 Kudos
Message 55 of 141
(2,840 Views)

I'm trying to send values. There are three different values that I need to send and I need to show them separated.

0 Kudos
Message 56 of 141
(2,817 Views)
Unless you show exactly how you are receiving the data now, it is impossible to say how to separate them, As mentioned, you cannot separate them if you are not sending correctly.
0 Kudos
Message 57 of 141
(2,811 Views)

dbarbosa@lakehead.ca wrote:

I'm trying to send values. There are three different values that I need to send and I need to show them separated.


Not trying to be rude man, but I feel as though I've already shown/explained how to do this.  There's a SubVI in my attachment that, after receiving the bits, splits them into readable data.  Like I've said. you need to send the data in the appropriate order and then break it down after receiving and storing.  Values = binary.  If you're wanting to send a value of 1012 (just a random number for example), you'll need to use the Serial.Write and send the data as separate single bytes.  Then you'll need to use that receive and store it appropriately then break it down the same way you received it.  It's all in that VI I attached man.

Message 58 of 141
(2,801 Views)

haha... that's ok, man!
Thanks a lot.
However, I'm not able to open your SubVI block. Do you break the data inside of this block? Your code appears like that picture I attached here.
Well, I appreciate your attention so far... I really thank you!

0 Kudos
Message 59 of 141
(2,788 Views)
Since you are unwilling to provide the requested and necessary information, let's consider your question answered and this thread closed.
0 Kudos
Message 60 of 141
(2,781 Views)