LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Motor with encoder

Hi, 
I am trying to make a VI for programming a motor to use on a robot. The thought behind this VI is to make the motor turn with x degrees, and then wait for a new degrees signal. It works fine for degrees greater than 0 (positive). But when I try to go to negative values or zero it just oscillates around the desired degree. 

This VI uses some VI's for the motor drive, so it may be difficult to understand perfectly. 

Vegard

0 Kudos
Message 1 of 3
(2,821 Views)

@Vegard123 wrote:


This VI uses some VI's for the motor drive, so it may be difficult to understand perfectly. 

Vegard


Even harder to understand when these vis are not attached. From the rest of the code what I can see if that if you set degrees to -1 and speed to 70 the value of s?t:f (what does this represent? You should give significative names to indicators) will be negative. Is it a negative feedback value that causes instability? Have you tried setting a speed value of less than 64 to get a positive feedback value?

 

Ben64

0 Kudos
Message 2 of 3
(2,788 Views)

Hi, 
I think the solution to this problem were to set a desired deviation, ie 3% instead of taking percentages of the desired degree value. When the degrees come closer to zero, the accepted offset in degrees are a lot smaller than it is at larger degrees. 

0 Kudos
Message 3 of 3
(2,745 Views)