03-14-2015 12:49 AM
i am using a NI cDAQ 9472 to control the direction of motor with the help of a motor driver L293D by generating a pwm signal. I am able write the code for one direction of the motor, but how to write the code to control both directions of motor
03-14-2015 10:42 AM
To change the direction of a DC motor, you need to reverse the polarity of the leads. That means you will need to either have a PWM signal that outputs a negative voltage for the reverse direction and a postive voltage for the forward. Whether you can do that depends on your DAQ device and whether the L293D driver can do that.
The other possiblity is to use a digital output to drive a DPDT relay that reverses the leads.
03-14-2015 11:39 AM
venky@4 a écrit :
i am using a NI cDAQ 9472 to control the direction of motor with the help of a motor driver L293D by generating a pwm signal. I am able write the code for one direction of the motor, but how to write the code to control both directions of motor
You didn't provided much information, we don't know what your code looks like and how you connected the L293D. Typically you would have to reverse to polarity of the outputs feeding the inputs of the L293D (1A, 2A or 3A, 4A).
Ben64