ROBOTC.net forums
http://robotc.net/forums/

Servo Initialization
http://robotc.net/forums/viewtopic.php?f=52&t=7972
Page 1 of 1

Author:  Boson [ Mon Feb 17, 2014 6:38 pm ]
Post subject:  Servo Initialization

We have observed that all the servo's on our FTC robot drive to powered initial positions when the first "servo" command is executed, even if those servo devices ports have been specifically defined as "tServoNone" in the program header. Testing of various combinations of code while using the Servo Control debug window reveals that the servo's all have an initial position default value of 128 at NXT start up. When the first "servo" command is executed, all the servo's are powered and position themselves at the default value except the one defined in the "servo" command. The last servo position for each servo is retained in the NXT's memory even after the execution is ended. These values then become the default values for the next program execution. Cycling the NXT off/on will reset the defaults to 128. If this interpretation of our observations is incorrect, we would welcome corrections. NOTE: The values are retained in the NXT, not the servo controller.

Here is our questions. It is possible to insert a "SrvoPosition" declaration in the program device header, but this does not seem to have any effect (a full command line example follows)

#pragma config(SrvoPosition, Position01, 128, 150, 215, 50, 128, 128, 128, 128)

What we would expect is that this would re-set the starting default servo values to these values, but it does not. It also is not clear why there are 8 values, rather than the 6 a HyTechnic controller can control. So, what does this config declaration do and can we use it to define the starting servo default positions?

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/