LabVIEW Interface for Arduino Documents

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.

My setup is Arduino uno R3, Labview 2010 on MacOS




Member sraque

This worked really well for me. Thanks!

Active Participant Nathan_B.
Active Participant

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.

Member atm5012

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.

Active Participant hrh1818
Active Participant

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. 


Member kevinlc

It is very useful! Thanks

Member zohair360

thanks, worked perfectly!!

Member Zhoo99

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

Member harbi


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

arduino and labview

Member Zhoo99

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

2016-01-07 7:15 GMT+01:00 harbi <>:

NI Community <> Basic DC Motor,

with PWM (CCW & CW) new comment by harbi

<> View all comments on this

document <>