I was trying to program in RobotC for a 393 integrated motor and wanted to enable the encoder in motor setup, but for some reason it was grayed out, and I could not click or enable it. So I was wondering if anybody else had this problem or a potential fix. Thanks!
P.S. in my old 3.08 version does have the ability to enable encoders.
In ROBOTC 3.51, you can select which encoders are being used by navigating to the Motors tab of the Motors and Sensors Setup window. After setting up a motor port with a motor type, the ‘Encoder Sensor Port’ drop down menu will appear to the right of the ‘PID Control’ check box.
From here, you can select if an encoder is attached to the motor (leave the drop down menu as ‘none’ if there is no encoder attached) and if it is a digital or I2C encoder. In the case of the Integrated Motor Encoders, you will want to select the I2C option that is appropriate for the encoder.
For instance, if the encoder is the first one in the ‘chain’ of I2C devices, you will want to make sure that it is set to ‘I2C_1’. If it is the second device in the chain, you will want I2C_2, if it’s the third then I2C_3, etc.
Once the encoder type is set, you can then go into the ‘I2C Sensors’ tab of the Motors and Sensors Setup window to give the encoder an alias, if desired.
The same rules apply for the Quadrature Encoders, but instead of selecting a location on the I2C chain you must select the digital port that the first encoder wire is plugged into. ROBOTC will then automatically assign the next higher-numbered port as the second encoder wire port, and the encoder will show up in the ‘VEX 2.0 Digital Sensors 1-12’ tab.
The ability to check/uncheck the encoders box is planned to be re-released in a future patch. You can find full instructions on how to setup and use the Integrated Motor Encoders in ROBOTC on our wiki guide.