RobotC External Robot Configuration file?

I have written several programs in RobotC, many of which are useful at different times, but I have found that the physical configuration of our robot has changed frequently, making it a tedious task to change the configuration of the robot in programming every time I go to use a program I have already written.

Is there a way to have the configuration of the robot (motors and sensors setup) in one file and make it possible to use that configuration in another file?

(in other words, I would like to have my program written in one file and use another to configure the motors and sensors, so that I can simply reference the configuration file in all of my programs. that way if I change the configuration in one place, it is changed in all places)

There is, but it’s a bit complex as I don’t think you can use an include file for robot configuration. What I have done in the past is create a new “standard robot model” which can then be used instead of the normal configuration. Let me look into it a little later on and see if I can put together some instructions. You end up with a statement like

#pragma config(StandardModel, “My Standard Model”)

instead of all the motor and IO configuration.

Good Idea!

I have found the file that holds all of the standard models, and can put in what would seem to be the appropriate files in order to create my own standard model. The model then shows up in the drop box of standard models in the Motors and Sensors Setup dialog box, but I can’t actually select the model.

Hopefully that is helpful in making instructions.

Thanks in advance!

I posted some instruction here.

It worked!

Thanks again. this will be very useful.