LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Motor w/ Time Delay and Direction Change

Attached is an image of my setup. I have two DC motors wired to a driver board which is attached to a NI myRio with a ribbon cable. The myRio and the driver board are both getting power from a wall outlet. 

 

I have been looking at my professor's setup, but I don't quite understand it myself. Attached is my professor's VI for motor control using an encoder, which is of course different from the assignment i must do. 

 

I'm not sure what steps to take next, though. 

Download All
0 Kudos
Message 11 of 16
(2,615 Views)

Okay.  I see you have an external power supply for the motors.  That's good.

 

I can't tell what that white box is.  Is it just a breakout board for the myRIO?  Perhaps it contains relays.

 

So I'm looking at the differences between your VI and the professor's VI's.  I see some definite differences between them.  You should take a closer look and try to implement the stuff that you are missing.

 

Spoiler
1.  There is a PWM modulation VI that sets the speed.  I don't see that at all in yours.
2.  For one motor, two pins are set, One to True and the other to False.  I'm going to guess that the white box contains relays and allows one pin to go to the negative supply and the other to the postive supply.  You are only writing to one pin.  If the other is not set, it may be in teh wrong state to wrong.  (Think about what would happen if you set both sides of the motor to the positive supply!)

 

0 Kudos
Message 12 of 16
(2,613 Views)

I was able to get my motors to turn CW and CCW by correctly labeling some true and false directions. However, I'm just not able to get my elapsed time and my time delays to work. It is running the four loops, just without stopping and pausing. 

 

Th whtie box is my driver board (what myprofessor called it, i'm not quite sure what it really should be called). 

0 Kudos
Message 13 of 16
(2,608 Views)

Post your latest VI.

 

Looking at your first VI, I don't see where you are stopping the motor.  And I don't think you understand the difference between Time Delay express VI and the Elapsed Time VI.  (Look at context help on them.)

0 Kudos
Message 14 of 16
(2,604 Views)

Attached! Sorry I updated it. 

0 Kudos
Message 15 of 16
(2,600 Views)

Okay.  Thanks for attaching the updated file.

 

Now go back and read my previous message.

 

Where do you actually stop the motor?

0 Kudos
Message 16 of 16
(2,598 Views)