03-19-2013 11:00 AM
hello everyone!
I am new to labView i want to control a dc motor using labview and arduino.
Do i have to write c program if for the arduino ??
03-19-2013 12:42 PM
Ideally the answer is no but you will need to be more specific about what motor controller you are using. All the motor controllers that I use require a PWM signal to tell it how to give power to the motor. If this is the case for you, you don't need to modify anything in the Arduino (you just need to upload the firmware that comes with LIFA). You would simply send the PWM signal via LabVIEW using the LIFA functions.
03-20-2013 09:51 AM
THank you for replying!
I have written the PWM code but it was showing an error 5001 , can you please give the code for generating PWM in Labview
03-20-2013 03:41 PM
If you google for the error you will find the error page for 5001. Here is a simple example of using PWM VIs for arduino:
If you have further issue you will need to provide more details. What motor controller are you using? Which Arduino are you using? Also post the code that you have tried (save it for LabVIEW 2009 so I will be able to open it).
03-23-2013 09:35 AM
my arduino board is mega2560.
Detail of the motor i am using is as follows
Free -run speed@ 12v= 200rpm
Free- run current@12v=300mA
stall current@12v=5000mA
stall torque@12v=170 oz-in
I want to have open loop control of this motor.
my Labview program was similar to yours but sometimes it shows error 5001 and sometimes it shows 5002.
so can you tell me that what are the things i have to do on arduino side?
the program which you have given will work or not for this motor?
Please do reply!
If there are any modification in the program then please give it to me.
03-23-2013 02:01 PM
You need to post details about the motor controller that you are using (preferably a link to the datasheet). If you experience errors, first look up the error page for it and look through the possible solutions. Also, if you have a LabVIEW VI, post it so we can see it (save it for LabVIEW 2009 before posting).
03-26-2013 11:32 AM
thank you for your help . now iam able to have open loop control the motor .
now iam trying to interface a gyro with arduino and control the motor using gyro.
if i face any problem i will again post a question.