FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

"Basic motor control " program not working !

Hello there ,

                     I've been trying to work the basic motor control tutorial from ni.com. I followed the instruction as per the tutorial and still I could not run the motor at

full speed.The motor only works for a value of 0.1 and -0.1 whereas the tutorial says that the motor should work for a range of 1 to -1. Also I'm using a victor controller in this code. Can anyone tell me if I have to do any alterations to the code to get the maximum speed of the motor?

Thanks,

Murthy

0 Kudos
Message 1 of 7
(4,470 Views)

Hi murthyz,

What happens when you try to run the motor with a value outside of the 0.1 or -0.1 range? Do you get an error or does it just simply seem like it's not going any faster?

0 Kudos
Message 2 of 7
(2,822 Views)

Hello ,

           When i enter values beyond  + or - 0.1 the motor simply attains intermittent motion.It moves very very slowly like stepper motor. Also the light on the victor motor controller is blinking at the same rate as the motor.

when the values are between + or - 0.1 then no light glows on the victor controller and motor runs quite fast ( not at full speed though).

Thanks,

Murthy

0 Kudos
Message 3 of 7
(2,822 Views)

Hi Murthy,

Actually, based on the LED of the controller, it sounds like it's working properly when the value is outside +/-0.1.

How do you have the wires connected between the Victor and the digital side car (DSC)? That is, which pin from one is connected to which pin on the other?

0 Kudos
Message 4 of 7
(2,822 Views)

If you are using a Victor speed controller, make sure to choose Victor in the Open Speed Controller. If you choose Jaguar, it will have a 200hz update rate, which is more then the victor can handle and may cause your problem.

0 Kudos
Message 5 of 7
(2,822 Views)

Hi there !

                  Actually I selected the victor mode from the VI. When I try values other than + or -0.1 the motor seems to obtain an intermittent motion just like a stepper motor !. Also I would like to mention that I have connected the pwm port 1(black facing the outside) from digital side car to the victor controller.

Do I need to convert the PWM values to a scaled one or something in the code?

Thanks,

Murthy

0 Kudos
Message 6 of 7
(2,822 Views)

Do you have power going to the Digital Sidecar? Sometimes its easy to crimp one of the power wire's insulation and not actually get any power to the digital sidecar. One way to check this is to remove the 37 pin cable and verify that all 3 power LEDs remain lit.

It would help if you posted a picture of your hardware setup, as well as your VI, so that people can check for errors more thouroughly, rather then just guessing.

0 Kudos
Message 7 of 7
(2,822 Views)