Re: No more "nPidUpdateInterval" in public RC2?
The field is still there, but I believe has been renamed to xxxx.
But you should be aware of the following:
- THe PID algorithms -- i.e. the PID constants -- were tuned to improve the PID performance. Motion is less jerky.
- There's a nifty little sample program included to demonstate this. It's in the samples folder and has a name like "motor consistentcy". It draws a graph on the NXT LCD screen showing the movement of the motor vs time. You should also use this with the "NXT devices" debugger display which shows the "instantaneous" (or actual) power applied to the motors to obtain the PID managed speed.
- If you're playing with the PID interval, you may also be interested in the "NXT devices" display -- with the "MORE" option clicked -- because it allows writing new values to the PID weighting factors. THese are not permanent changes, the factors are reset to default settings every time a new program is started. The capability was added primarily for the initial development and tuning of the PID algorithms.
- There was a general cleanup of the ROBOTC user interface and the "PID interval" variable got moved into the new (and undocumented) "Super User" menu level. This is why it's not in the built-in documentation. It's a little tricky to get into "Super User" menu level because it is not normally visible in the "Select User Level" menu. You have to select a check box in the "Preferences" setup to make the command visible; I think the check box is in the "Internal" tab. Once this check box is selected and you're already in "Expert mode" then the "Super User" selection will be visible.
- The actual variable for the interval was renamed because there are now two variables for selecting the PID update interval. One is for the NXT motors. The second is for the new FTC motors that are connected via a HiTechnic motor controller. This is for the new FIRST FTC competition. The FTC motors needed a different update intervale because they have different characteristics and, more importantly, sit behind an I2C bus that is relatively slow to read/write to obtain encoders settings and set power.
Hope above has explained what's happened and how this came about.
But more importantly, I don't expect many users will want or should change the update interval. By default it is set to 25 milliseconds. [This is four times faster than the 100 milliseconds used in NXT-G firmware]. The PID factors are tuned for this setting. If the interval is changed, then the PID factors would also need to be adjusted.
ROBOTC firmware uses the PID interval variable to adjust for speed regulation. When moving to a specific target encoder position and the motor is close to the position, then ROBOTC firmware switches to a faster, and non-user modifyable, update rate.