LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Delay between labview and arduino

Dear all

I have a discussion on https://decibel.ni.com/content/message/44035#44035  to control a dc motor with labview.

I finished the project, but there is one problem, when I load labview program the motor moves fast in a few milisecounds thens stops and when labview program is completly load and in run mode controls perfectly the motor.

Why the board http://www.dfrobot.com/index.php?route=product/product&product_id=69#.UKFv1-TtRg g

gives power to the motor without any instruction from labview program?

Best regards

CPalha

0 Kudos
Message 1 of 5
(7,877 Views)

We will need more details.  When does the motor start to run on its own?  When you plug in the Arduino or when you first run the LabVIEW program?  What mode are you using on the motor shield?

0 Kudos
Message 2 of 5
(3,396 Views)

Dear Nathan

Thanks for your answear.

The motor starts run when I press the run button in labview.

The arduinoi is plugged and it is always when i press run to start the program, labview is loaded and nothing appends.

How can I see the mode? I change the way and speed in digital ports.

Best regards

CPalha

0 Kudos
Message 3 of 5
(3,396 Views)

When you click Run in LabVIEW the Arduino is reset.  This is because the DTR (serial modem line) is toggled.  Arduino uses this line to reset the Arduino when you program it using the Arduin IDE.  When the Arduino is reset the pins tend to do some funky things.

What specific pins are you using, what type of signals are you sending and to what controller?  You may be able to put some circuitry in place to hold the values until the Arduino is fully booted and under LabVIEW's control.

Thanks,

-Sam K

LIFA Developer

0 Kudos
Message 4 of 5
(3,396 Views)

Hi Sammy

Here is the code.

In the analogue I read an IR distance sensor.

Thanks

CPalha

0 Kudos
Message 5 of 5
(3,396 Views)