LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

No signal read in labview from arduino connected to a current sensor

Aweeesommme..thank you so much

0 Kudos
Message 11 of 15
(2,095 Views)

My project is to control the speed of the dc motor(Hardware) using PID controller in LabVIEW. For interfacing Labview with dc motor, I am using Arduino Uno. For encoder, I am using Optocoupler and a schmitt trigger.

I have attached a vi and a pic of the encoder.

I tried to run the closed loop code using an encoder(Optocoupler and a schmitt trigger In the feedback path) to measure the speed of the dc motor. I am getting an error 5001 and in the error its mentioned pin 0 & 1 of arduino are reserved for communication with LabVIEW. But where do I connect those pins. On the arduino board, pin 0 & 1 are Rx & Tx pins. Also the moment I connect my USB cable to the laptop, my motor starts moving.

Please help me in this.

Thanks & Regards,

Neelam PunjabiIMG-20140410-WA0005.jpgIMG-20140410-WA0005.jpg

whatsap45 wrote:

As titled, I have problem to get reading in the labview from arduino. The block diagram is a shown in the attachment, can anyone please explain what have I done wrong?

lol.PNG

From my serial monitor in arduino shows around 2.5v, I have checked with my multimeter as well, it showed 2.5v even when no load is connected. If there is a load connected, the voltage signal will be increased. Thus, the result I'm getting is always 0 as shown in the attachement below.

qwwq.PNG

The baud rate I have changed from 9600 to 115200 to observe any changes to the result. Can anyone figure it out what might be the problem?

whatsap45 wrote:

As titled, I have problem to get reading in the labview from arduino. The block diagram is a shown in the attachment, can anyone please explain what have I done wrong?

lol.PNG

From my serial monitor in arduino shows around 2.5v, I have checked with my multimeter as well, it showed 2.5v even when no load is connected. If there is a load connected, the voltage signal will be increased. Thus, the result I'm getting is always 0 as shown in the attachement below.

qwwq.PNG

The baud rate I have changed from 9600 to 115200 to observe any changes to the result. Can anyone figure it out what might be the problem?

0 Kudos
Message 12 of 15
(2,095 Views)

Neelam,

You should start your own discussion since your topic is not related to this discussion.

0 Kudos
Message 13 of 15
(2,095 Views)

Why is the baud rate hardcoded? Can we change it somehow? If you change the baud rate in the Arduino code from 9600 to 115200 to match that of the VI and try to read a thermistor data, the Arduino spits out a bunch of nonsense characters instead of resistance and temperature reading.

0 Kudos
Message 14 of 15
(2,095 Views)

There is no other option than to hard code the baud rate because the baudrate is used to start the serial communication which is required for LabVIEW to be able to communicate with it.  You can change the baudrate in the firmware, compile it, and then re-upload it if you need/want a different baudrate.  However, not all baudrates work correctly when working with the Arduino Mega (I've not used any other Arduino).  I've never been able to get the Mega to work at 115200 starting with version 1.0 of the Arduino IDE.  In the version prior to that, it worked.

0 Kudos
Message 15 of 15
(2,095 Views)