servo Twiching in Labview

Hello, i’ve been working with labview and i open a new advanced project and trying to get my camera to track with servos. but when i loaded the code the servos just twiched in place when i viewed the get angle function it twiched between 0-85. i can’t help to think i put the open servo and close servo in the wrong place. in the teleop i put the open servo to the left of the case which is connected to the get/set angle inside of the execute function and the close on the right side of the case. Did i set this up wrong?

Thanks.

David Elizondo
(Programmer)

David -

You may be opening and closing the reference each time your code executes. This could cause twitching, as the “close” sets the PWM output value to disabled. I suggest drilling down into servo.close and take a look. Servo.close calls PWM.close, which sets the output to disabled.

The LVMastery video helped me understand the advanced framework. Now, when I teach teams, I get them up to speed using the basic and then point them to this video to get them to the advanced. Highly Recommended.

http://www.lvmastery.com/tipjar2009-01-05

Check out the Two Color Tracking Demo found here. You’ll see that they update the servos in a separate while loop so they update more smoothly.

Also, I think you want anything that has to do with the camera in the vision processing vi. This vi runs along side both teleop and autonomous, so you can do camera stuff in both modes.