06-11-2013 05:12 PM
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
06-11-2013 09:35 PM
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?
06-12-2013 02:59 PM
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
06-12-2013 03:51 PM
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
06-12-2013 04:04 PM
Hi Sammy
Here is the code.
In the analogue I read an IR distance sensor.
Thanks
CPalha