LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Capture data from Arduino UNO

Greetings reader,

Please help me with this issue that I am having because I cannot solve it. I am connecting Arduino UNO R3 with labview. I am trying to capture data using the block diagram code but I cannot get correct data. I don't know what is the problem. Please, review the attached photos. 

I ran arduino and I am getting raw data as I am moving the sensor, but when I use labview and move the sensor I don't get the almost the same data. I tried same motion with arduino IDE and labVIEW. 

 

Thank you in advanced. 

0 Kudos
Message 1 of 15
(1,100 Views)

Reading serial data from an Arduino is no different than any other device with a serial interface.

 

DO NOT USE "Bytes at Port" (ever)

 

I am assuming you programmed the Arduino so you know the communication parameters and can change them.

 

Program the Arduino to send out a termination character (like a Line Feed) and set the VISA Configure Serial port to use a Termination Character. 

 

Set your VISA Read to read a lot more bytes than you expect to receive.

 

Now the VISA read will read until it sees the Termination Character or times out.

evvCapture.PNG

Also I don't see any setting for baud, data bits, parity, and stop bits in the VISA Configure Serial.

Are you sure the default (9600,8,N,1) are correct?

 

 

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 2 of 15
(1,054 Views)

A clear explanation of when/when not to use "Bytes at Port"

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 15
(1,051 Views)

Hello, 

Thank you so much for the reply. I am new to this Arduino and LabVIEW connection. Why should I not use the bytes to port? Can you please explain this?

On Arduino IDE code I have set up the baud 9600. I get readings from the Arduino. On LabVIEW I don't know how to set them up. Could you please help me?

 

Thank you!

0 Kudos
Message 4 of 15
(1,039 Views)

I believe Putnam linked to a very good explanation of when and when not to use Bytes at Port above.

 

You used VISA Configure Serial Port in your code, you just need to configure it.

 

Have you read the help for VISA Configure Serial Port?

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 5 of 15
(1,033 Views)

Yes. I read the VISA serial port configuration. So, I have a BNO055 sensor but when I move it the string indicator data does not change. Why? Can you help me? 

0 Kudos
Message 6 of 15
(1,015 Views)

That's a tall order as the problem could be in your Arduino code...

 

Have you tried using the Arduino IDE serial monitor to inspect the data being sent by the Arduino?

 

Is it valid and changing when the sensor is moved?

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 7 of 15
(1,009 Views)

Also are you still using "Bytes at Port"?

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 8 of 15
(1,003 Views)

No I am not.

Bytes at port was removed. 

Everything works somewhat fine... but sometimes when I stop the program and run it again the values does not change when I move the IMU. Can you think of any reason? 

Arduino IDE work fine like expected. 

0 Kudos
Message 9 of 15
(1,001 Views)

Not without seeing your code

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 10 of 15
(989 Views)