LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Lifa

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 ??

0 Kudos
Message 1 of 7
(4,467 Views)

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.

Message 2 of 7
(3,286 Views)

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

0 Kudos
Message 3 of 7
(3,286 Views)

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:

PWM_Example.PNG

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).

Message 4 of 7
(3,286 Views)

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.

0 Kudos
Message 5 of 7
(3,286 Views)

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).

0 Kudos
Message 6 of 7
(3,286 Views)

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.

0 Kudos
Message 7 of 7
(3,286 Views)