From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Interface for Arduino Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Basic DC Motor, with PWM (CCW & CW)

I want to share a basic code for PWM control with a DC motor, through a Shield (L293 & L298).

I Use a DFROBOT Shield.

http://www.dfrobot.com/index.php?route=product/product&product_id=69#.UTkCM9GcHrs

My setup is Arduino uno R3, Labview 2010 on MacOS

Regards

Rafael

Mexico

Download All
Comments
sraque
Member
Member
on

This worked really well for me. Thanks!

Nathan_B.
Active Participant
Active Participant
on

You forgot to set the pin mode for all the digital pins.  I posted a cleaned up version and a solution to one issue here.

atm5012
Member
Member
on

Can this be done with the adafruit motor shield 2.0?  I would like the accomplish the same functionality i.e. DC motor speed and direction control with Labview.  Not sure which digital pins should be used with this shield.

hrh1818
Active Participant
Active Participant
on

At the present time LIFA  provides support for using stepper motors with the Adafruit motor shield but not DC motors..  If you must use LIFA than you would need to add support for DC motors to the LIFA code. 

Or you could use the serial monitor capability of Labview to send commands to a sketch running on an Arduino Uno to control a DC motor. 

hrh1818

kevinlc
Member
Member
on

It is very useful! Thanks

zohair360
Member
Member
on

thanks, worked perfectly!!

Zhoo99
Member
Member
on

Hi, I am asking whene I use arduino with the shield L298P it work fine, but with "NI MyRIO" It dosn't work at all ?
I tryed the simple way :


get the pins [4 5 6 7] at "High"

with "arduino" both of 2 motors turn with full speed and same direction

measurements: [3.4 v at pins 4 5 6 7]

with "My RIO" ... nothing happened

measurements: [3.1 v at pins 4, 7] and [2.8v at pins 5, 6].


any ideas guys

harbi
Member
Member
on

hi

can  you help me by  how  i can generat PWN  by using serial port (VISA)

arduino and labview

Zhoo99
Member
Member
on

here is my skype " benzo-25" i will try to help you

2016-01-07 7:15 GMT+01:00 harbi <web.community@ni.com>:

NI Community <https://decibel.ni.com/content/index.jspa> Basic DC Motor,

with PWM (CCW & CW) new comment by harbi

<https://decibel.ni.com/content/people/harbi> View all comments on this

document <https://decibel.ni.com/content/docs/DOC-27770#comment-46667>

Contributors