Difference between pages "Tutorials/Programming with the new VEX Integrated Encoder Modules" and "Creating an RBC file"

From ROBOTC API Guide
< Tutorials(Difference between pages)
Jump to: navigation, search
 
(Virtual World Index)
 
Line 1: Line 1:
[[File:Tut_vex-motor-encoders_1.jpg|200px]]ROBOTC 3.06 now includes functionality to support the new VEX Integrated Encoder Modules!
+
<yambe:breadcrumb self="Creating an RBC file">Main|Main page</yambe:breadcrumb>
  
The VEX Integrated Encoder Modules (IEMs) replace the plastic caps on the backs of 2-Wire Motors (269 and 393) with quadrature encoders. Unlike the existing VEX Shaft Encoders, they connect to the Cortex Microcontroller using the I2C port and provide feedback directly from the motor (with the added benefit of not hogging up your digital ports). These encoders will allow you to identify and control how fast the motors spin, how far the robot travels, and what direction it should move.
+
{{tl|1|}}
  
For more information and assembly instructions for the Integrated Motor Encoder for the '''VEX 2-wire 393 Motor''', see this PDF [[Media:393.pdf]].
+
== What is an RBC file? ==
 +
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;" width="100%" cellpadding="5%" cellspacing="0" border="0"
 +
|-
 +
|An RBC file is a special type of XML file that can be used with ROBOTC v3.52 or later. Once an RBC file is created properly, you will be able to configure ROBOTC's Platform Type, Compiler Target, Menu Level, and other important settings all with the click of a button. You can even configure the RBC program to load a user program and automatically download it to a robot or Virtual World of your choosing.
 +
|-
 +
|}
  
For more information and assembly instructions for the Integrated Motor Encoder for the '''VEX 2-wire 269 Motor''', see this PDF [[Media:269.pdf]].
+
== How to create an RBC file ==
 +
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;" width="100%" cellpadding="5%" cellspacing="0" border="0"
 +
|-
 +
|There are several steps required in order to create a working RBC file. You will need an activated installation of ROBOTC and a text file editor installed on the computer. For this demonstration, we used ROBOTC for VEX Robotics 4.0 and Notepad++ as our text file editor.
 +
|-
 +
|'''1)''' Create a new file in your text file editor (generally found under the 'File -> New' menu option).
 +
|-
 +
|'''2)''' Save the file with a custom name and a '.rbc' file extension. You may also need to change the 'File Type' dropdown menu to 'All Files', depending on the text editor settings.
 +
|-
 +
|'''3)''' Add the following parameters to the file:
 +
*<?xml version="1.0" encoding="UTF-8"?>
 +
*<RBCVersion>1.0.0</RBCVersion>
 +
*<Platform></Platform>
 +
*<CortexDLMethod></CortexDLMethod>
 +
*<CircuitBoard></CircuitBoard>
 +
*<MenuLevel></MenuLevel>
 +
*<CompilerMode></CompilerMode>
 +
*<CompileAndDownload></CompileAndDownload>
 +
*<VirtualWorldIndex></VirtualWorldIndex>
 +
*<SourceFileName>.c</SourceFileName>
 +
*<RVWParameters></RVWParameters>
 +
*<SourceCode></SourceCode>
 +
|-
 +
|'''4)''' Modify the parameters to fit the settings for the program. For a full listing of all of the available parameters, see the 'XML Parameters' section below.
 +
|-
 +
|'''5)''' Save the RBC file.
 +
|-
 +
|'''6)''' Manually open the RBC file icon by double clicking on it. If the file is configured correctly, ROBOTC should open with the specified parameters using the specified source code. If the program does not open correctly (or opens with the wrong settings), double check the parameters for accuracy.
 +
|}
  
All of the basic Fischertechnik sensors meet these qualifying characteristics, making them perfect candidates for use with the VEX Cortex!
+
== XML parameters ==
 +
===XML Version===
 +
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;" width="100%" cellpadding="5%" cellspacing="0" border="0"
 +
|-
 +
| The XML Version parameter will identify the document as valid XML. This must always be at the top of the RBC document.
 +
*'''<?xml version="1.0" encoding="UTF-8"?>'''
 +
|-
 +
|}
 +
===RBC Version===
 +
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;" width="100%" cellpadding="5%" cellspacing="0" border="0"
 +
|-
 +
| Identifies the current RBC specification being used.  As of today, this value should be specified as 1.0.0.
 +
*'''<RBCVersion>1.0.0</RBCVersion>'''
 +
|-
 +
|}
 +
===Platform Type===
 +
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;" width="100%" cellpadding="5%" cellspacing="0" border="0"
 +
|-
 +
| Sets the platform type in ROBOTC. Requires the ROBOTC installation to have an appropriate license activated and valid in order to work properly.
 +
*'''<Platform>PlatformType</Platform>'''
 +
|-
 +
|}
 +
{| class="wikitable"
 +
|-
 +
|'''To set this platform type'''
 +
|'''Use this parameter'''
 +
|-
 +
|VEX PIC
 +
|VEX
 +
|-
 +
|VEX Cortex
 +
|VEX2
 +
|-
 +
|LEGO NXT
 +
|NXT
 +
|-
 +
|LEGO NXT + TETRIX
 +
|TETRIX
 +
|-
 +
|Arduino
 +
|ARDUINO
 +
|}
  
==I2C Overview==
+
===Cortex Download Method (VEX Cortex only)===
As stated above, these new encoders connect to the single I2C port on the Cortex:
+
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;" width="100%" cellpadding="5%" cellspacing="0" border="0"
 +
|-
 +
| Sets the Cortex Download Method – used to modify the cortex download method to allow the Cortex to either require a VEXnet/USB cable in order to run, or to allow “standalone” mode to run a user’s program without searching for a COMM link. If the Cortex is using the VEXNet system or will be physically tethered to a Joystick Controller using the USB A-to-A cable, the VEXNet option should be used. Otherwise, use the USB-Only mode
 +
*'''<CortexDLMethod>DownloadMode</CortexDLMethod>'''
 +
|-
 +
|}
 +
{| class="wikitable"
 +
|-
 +
|'''To set this download method'''
 +
|'''Use this parameter'''
 +
|-
 +
|USB Only
 +
|USBOnly
 +
|-
 +
|USB or VEXNet
 +
|USBorWifi
 +
|-
 +
|Competition (VEXNet)
 +
|Competition
 +
|-
 +
|}
  
[[File:Tut_vex-motor-encoders_2.jpg|500px]]
+
===Circuit Board===
 +
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;" width="100%" cellpadding="5%" cellspacing="0" border="0"
 +
|-
 +
| This specifies the circuit board to be used. Has only real application with Arduino to differentiate between different board models (Uno,1280,2560,etc). Default value of blank (no value) for all other platforms.
 +
*'''<CircuitBoard></CircuitBoard>'''
 +
|-
 +
|}
 +
===Menu Level===
 +
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;" width="100%" cellpadding="5%" cellspacing="0" border="0"
 +
|-
 +
| Sets the ROBOTC GUI Menu Level. Used to show/hide functionality by adjusting the menu level types (Basic, Advanced, and Super User)
 +
*'''<MenuLevel>Level</MenuLevel>'''
 +
|-
 +
|}
 +
{| class="wikitable"
 +
|-
 +
|'''To set this menu level'''
 +
|'''Use this parameter'''
 +
|-
 +
|Basic
 +
|Basic
 +
|-
 +
|Expert
 +
|Expert
 +
|-
 +
|Super User
 +
|SuperUser
 +
|-
 +
|}
  
 +
===Compiler Mode===
 +
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;" width="100%" cellpadding="5%" cellspacing="0" border="0"
 +
|-
 +
| Sets ROBOTC’s compiler mode (Compiler Target) – used to switch between real robots, the PC-based emulator, and Virtual Worlds compiling targets.
 +
*'''<CompilerMode>CompilerTarget</CompilerMode>'''
 +
|-
 +
|}
 +
{| class="wikitable"
 +
|-
 +
|'''To set this compiler target'''
 +
|'''Use this parameter'''
 +
|-
 +
|Physical Robot
 +
|Real
 +
|-
 +
|PC-based Emulator
 +
|Emulator
 +
|-
 +
|Virtual Worlds
 +
|VirtualWorlds
 +
|-
 +
|}
  
Unlike the DIGITAL and ANALOG ports on the Cortex, having only one I2C port does not limit you to only one I2C device. I2C ports allow multiple devices to be connected in a manner frequently referred to as daisy-chaining:  
+
===Compile and Download===
 +
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;" width="100%" cellpadding="5%" cellspacing="0" border="0"
 +
|-
 +
| Flag to specify if the source code should be “compiled” or “compiled and downloaded”. If set to “Yes”, the code will automatically be downloaded to the robot or Virtual World. Otherwise ("No", it will only be compiled.
 +
*'''<CompileAndDownload>Yes</CompileAndDownload>'''
 +
|-
 +
|}
 +
===Virtual World Index===
 +
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;" width="100%" cellpadding="5%" cellspacing="0" border="0"
 +
|-
 +
| Sets the numerical type of the RVW Level Pack Index that should be launched. – This is only a numerical number that references the RVW Level Pack “ID” number.
 +
*'''<VirtualWorldIndex>IndexNumber</VirtualWorldIndex>'''
 +
|-
 +
|}
 +
{| class="wikitable"
 +
|-
 +
|'''To set this Virtual World'''
 +
|'''Use this parameter index'''
 +
|-
 +
|Learning ROBOTC Tables Preview
 +
|2
 +
|-
 +
|Curriculum Companion
 +
|3
 +
|-
 +
|FTC Block Party!
 +
|8
 +
|-
 +
|VEX Toss Up
 +
|9
 +
|-
 +
|FTC Ring It Up!
 +
|10
 +
|-
 +
|VEX Sack Attack
 +
|11
 +
|-
 +
|Robots to the Rescue: Operation Reset
 +
|12
 +
|-
 +
|Palm Island: Luau Edition
 +
|14
 +
|-
 +
|Ruins of Atlantis
 +
|15
 +
|-
 +
|RVW Level Builder
 +
|18
 +
|-
 +
|}
  
[[File:Tut_vex-motor-encoders_3.jpg|500px]]
+
===Source File Name===
 
+
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;" width="100%" cellpadding="5%" cellspacing="0" border="0"
 
+
|-
The Integrated Encoder Modules support this by having built-in sets of input and output pins. A 4-wire cable connects the Cortex to Motor 1, another 4-wire cable connects Motor 1 to Motor 2, another 4-wire cable connects Motor 2 to Motor 3, and so on. In fact, ROBOTC 3.06 will support up to 8 devices on the single I2C port!
+
| Name of the file that will be saved/displayed on the ROBOTC tab-bar at compile time – Note this file only is used if SourceCode is provided.
 
+
*'''<SourceFileName>Name_Of_Program.c</SourceFileName>'''
[[File:Tut_vex-motor-encoders_4.jpg|500px]]
+
|-
 
+
|}
 
+
===RVW Parameters===
==Programming Overview==
+
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;" width="100%" cellpadding="5%" cellspacing="0" border="0"
===Motors and Sensors Setup===
+
|-
ROBOTC has undergone substantial changes to support the new encoders. Some of the most visually noticeable changes are in the Motors and Sensors Setup. On the Motors tab, the Type drop-down box allows you to choose from the different motors available in the VEX Robotics System:
+
| Command Line Parameters that will be passed the next time Robot Virtual Worlds is launched. If the “CompileAndDownload” flag is set to “NO”, these parameters will be stored for the next execution. After the Virtual Worlds has been executed once, these parameters are discarded.
 
+
*'''<RVWParameters>parameter1 parameter2 parameter3</RVWParameters>'''
[[File:Tut_vex-motor-encoders_5.png|500px]]
+
|-
 
+
|}
 
+
===Source Code===
This is significant because each of the new IEMs return a different number of encoder counts per revolution. Specifically, the IEM for the '''2-wire 269 motor measures 240.448 counts per revolution''' of the motor output shaft. The '''2-wire 393 motor measures 627.2 counts per revolution''' of the output shaft in its default '''high-torque configuration''' and '''392 counts per revolution''' of the output shaft in its modified high-speed configuration.
+
{| style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;" width="100%" cellpadding="5%" cellspacing="0" border="0"
 
+
|-
 
+
| Source Code of program to be open/compiled/downloaded. This is not a reference to an existing file but rather the actual contents of the file. Because the RBC file uses XML formatting, the file cannot contain any XML escape markups in the Source Code section. Instead, the escape markups must be replaced with the characters below:
Let’s take a look at a physical robot and configure it using the Motors and Sensors Setup.
+
|-
 
+
|}
[[File:Tut_vex-motor-encoders_6.jpg|500px]]
+
 
+
 
+
* This robot has two 269 motors with encoders.
+
* The right motor is connected on MOTOR port 1. The left motor is connected on MOTOR port 10.
+
* The encoder on the right motor is the first device plugged into the I2C port.
+
* The encoder on the left motor is the second device, daisy-chained off of the right motor.
+
 
+
[[File:Tut_vex-motor-encoders_7.jpg|500px]]
+
 
+
 
+
We can configure this in ROBOTC by going to the Robot > Motors and Sensors Setup menu.
+
 
+
[[File:Tut_vex-motor-encoders_8.png|500px]]
+
 
+
 
+
On the motors tab, we can enter all of the information necessary so that it matches our physical robot:  
+
 
+
[[File:Tut_vex-motor-encoders_9.png|500px]]
+
 
+
 
+
Note that:
+
 
+
* “rightMotor” was configured in port1 as a VEX 269 Motor.
+
* rightMotor was “Reversed” so that positive power levels will allow the robot to move forward.
+
* The “Encoder” box was checked and “I2C_1″ was chosen since it is the first device plugged in to the Cortex.
+
* “leftMotor” was configured in port10 as a VEX 269 Motor.
+
* The “Encoder” box was checked and “I2C_2″ was chosen since it is the second device along the daisy-chain.
+
* It is not necessary that the order of your motor ports correspond with the order of the I2C ports, although doing so will reduce confusion. It is necessary that your Motors and Sensors Setup perfectly match the physical setup of your robot.  
+
 
+
 
+
Additionally, you’ll notice that there is also a new “I2C Sensors” tab in the Motors and Sensors Setup:
+
 
+
[[File:Tut_vex-motor-encoders_10.png|500px]]
+
 
+
 
+
The additional configuration you can do here is '''optional'''. Like existing VEX Sensors, you can use this tab to name your I2C devices and monitor their values in the Sensor Debug Window. Note that these values are the raw values – not adjusted for polarity or the “Reversed” checkbox on the Motors tab.
+
 
+
When you’re done configuring your motors and encoders, you can press '''OK''' to apply your changes.
+
 
+
 
+
===Function Library===
+
In addition to the Motors and Sensors Setup, you’ll also notice new commands available in the Function Library. Most notably, we’ve included the nMotorEncoder[] command.
+
 
+
[[File:Tut_vex-motor-encoders_11.png|500px]]
+
 
+
 
+
Those of you familiar with the NXT system will be very familiar with the nMotorEncoder[] command. To those who are not, it acts very similarly to the SensorValue[] command you may be more used to. The nMotorEncoder[] command gives you read-write access the value of the encoder associated with the motor specified within the brackets.
+
 
+
 
+
===Sample Code===
+
For example, in the sample code below, the nMotorEncoder[] command is used to clear the values of the encoders on lines 19 and 20, and then also control the distance the robot moves in the while loop on line 23. This program will cause the robot to move forward for a specified number of encoder counts (1000), while displaying encoder values to the VEX LCD.
+
 
+
<span class="wikiHeader">Sound Test:</span>
+
<br />
+
<syntaxhighlight lang="ROBOTC">
+
 
+
#pragma config(I2C_Usage, I2C1, i2cSensors)
+
#pragma config(Sensor, I2C_1,    rightIEM,            sensorQuadEncoderOnI2CPort,        , AutoAssign)
+
#pragma config(Sensor, I2C_2,    leftIEM,                sensorQuadEncoderOnI2CPort,        , AutoAssign)
+
#pragma config(Motor,    port1,                        rightMotor,        tmotorVex269, openLoop, reversed, encoder, encoderPort, I2C_1, 1000)
+
#pragma config(Motor,    port10,                    leftMotor,        tmotorVex269, openLoop, encoder, encoderPort, I2C_2, 1000)
+
//*!!Code automatically generated by 'ROBOTC' configuration wizard                            !!*//
+
+
task main
+
{
+
  wait1Msec(2000);
+
+
  //Setup the VEX LCD for displaying encoder values
+
  clearLCDLine(0);
+
  clearLCDLine(1);
+
  displayLCDString(0, 0, "R: ");
+
  displayLCDString(1, 0, "L: ");
+
+
  //Clear the encoders associated with the left and right motors
+
  nMotorEncoder[rightMotor] = 0;
+
  nMotorEncoder[leftMotor] = 0;
+
+
  //While less than 1000 encoder counts of the right motor
+
  while(nMotorEncoder[rightMotor] < 1000)
+
  {
+
    //Display the right and left motor encoder values
+
    displayLCDNumber(0, 3, nMotorEncoder[rightMotor], 6);
+
    displayLCDNumber(1, 3, nMotorEncoder[leftMotor], 6);
+
+
    //Move forward at half power
+
    motor[rightMotor] = 63;
+
    motor[leftMotor]    = 63;
+
  }
+
}
+
 
+
</syntaxhighlight>
+
<br />
+
 
+
You can see the code running on an the robot here:
+
 
+
[youtube http://www.youtube.com/watch?v=LGynIouwrZM]
+
 
+
 
+
For a more detailed explanation of how this code and encoders work, you should check out the videos in the Movement > Shaft Encoders section of the [http://www.education.rec.ri.cmu.edu/products/teaching_robotc_cortex/ VEX Cortex Video Trainer]. For more information on the nMotorEncoder[] command and how it is used in the NXT system, check out this video.
+
 
+
 
+
==Motors Debug Window==
+
Yet another change in ROBOTC to support the new encoders was made in the Motors debug window, found by going to Robot > Debug Windows > Motors. ROBOTC will now display the Type of motor you have connected and the Encoder value as your robot runs.  
+
 
+
[[File:Tut_vex-motor-encoders_12.png|500px]]
+
 
+
 
+
This window, unlike the Sensor Debug window, will take the motor “Reversed” setting and polarity into account; positive motor powers will always result in positive encoder values and negative motor powers will always result in negative encoder values. In other words, the Encoder column displays the same value that gets returned by the nMotorEncoder[] command.
+
 
+
 
+
==Conclusion and Future Development==
+
The new VEX Integrated Encoder Modules are a fantastic addition to the VEX Robotics System, which we’re thrilled to support in ROBOTC. That being the case, we have additional improvements with the encoders coming down the pipeline. With integrated encoders, we’ll be able to implement “Encoder Targets” and “PID Control” like we have available for the NXT Platform. With Encoder Targets, you’ll be able to specify a “target” encoder value for the motors to spin to, and the robot will actually slow to a stop at that value, rather than letting its momentum carry it too far. With PID, we’ll be able to use feedback from the encoders to constantly adjust the power levels of the motors so that their physical performance matches what you set in the code – all with no extra effort on your part! Again for lots of additional information on both Encoder Targets and PID Control, check out the Movement > Improved Movement section of [http://www.education.rec.ri.cmu.edu/previews/robot_c_products/teaching_rc_lego_v2_preview/ Teaching ROBOTC for Mindstorms].
+
 
+
Finally, if the VEX IEM’s seem like something you’d like to have (and they should) you can purchase them for the 2-wire 393 Motors ([[Media:393.pdf]]), and the 2-wire 269 Motors ([[Media:269.pdf]]).
+

Revision as of 16:31, 8 April 2014

Creating an RBC file


What is an RBC file?

An RBC file is a special type of XML file that can be used with ROBOTC v3.52 or later. Once an RBC file is created properly, you will be able to configure ROBOTC's Platform Type, Compiler Target, Menu Level, and other important settings all with the click of a button. You can even configure the RBC program to load a user program and automatically download it to a robot or Virtual World of your choosing.

How to create an RBC file

There are several steps required in order to create a working RBC file. You will need an activated installation of ROBOTC and a text file editor installed on the computer. For this demonstration, we used ROBOTC for VEX Robotics 4.0 and Notepad++ as our text file editor.
1) Create a new file in your text file editor (generally found under the 'File -> New' menu option).
2) Save the file with a custom name and a '.rbc' file extension. You may also need to change the 'File Type' dropdown menu to 'All Files', depending on the text editor settings.
3) Add the following parameters to the file:
  • <?xml version="1.0" encoding="UTF-8"?>
  • <RBCVersion>1.0.0</RBCVersion>
  • <Platform></Platform>
  • <CortexDLMethod></CortexDLMethod>
  • <CircuitBoard></CircuitBoard>
  • <MenuLevel></MenuLevel>
  • <CompilerMode></CompilerMode>
  • <CompileAndDownload></CompileAndDownload>
  • <VirtualWorldIndex></VirtualWorldIndex>
  • <SourceFileName>.c</SourceFileName>
  • <RVWParameters></RVWParameters>
  • <SourceCode></SourceCode>
4) Modify the parameters to fit the settings for the program. For a full listing of all of the available parameters, see the 'XML Parameters' section below.
5) Save the RBC file.
6) Manually open the RBC file icon by double clicking on it. If the file is configured correctly, ROBOTC should open with the specified parameters using the specified source code. If the program does not open correctly (or opens with the wrong settings), double check the parameters for accuracy.

XML parameters

XML Version

The XML Version parameter will identify the document as valid XML. This must always be at the top of the RBC document.
  • <?xml version="1.0" encoding="UTF-8"?>

RBC Version

Identifies the current RBC specification being used. As of today, this value should be specified as 1.0.0.
  • <RBCVersion>1.0.0</RBCVersion>

Platform Type

Sets the platform type in ROBOTC. Requires the ROBOTC installation to have an appropriate license activated and valid in order to work properly.
  • <Platform>PlatformType</Platform>
To set this platform type Use this parameter
VEX PIC VEX
VEX Cortex VEX2
LEGO NXT NXT
LEGO NXT + TETRIX TETRIX
Arduino ARDUINO

Cortex Download Method (VEX Cortex only)

Sets the Cortex Download Method – used to modify the cortex download method to allow the Cortex to either require a VEXnet/USB cable in order to run, or to allow “standalone” mode to run a user’s program without searching for a COMM link. If the Cortex is using the VEXNet system or will be physically tethered to a Joystick Controller using the USB A-to-A cable, the VEXNet option should be used. Otherwise, use the USB-Only mode
  • <CortexDLMethod>DownloadMode</CortexDLMethod>
To set this download method Use this parameter
USB Only USBOnly
USB or VEXNet USBorWifi
Competition (VEXNet) Competition

Circuit Board

This specifies the circuit board to be used. Has only real application with Arduino to differentiate between different board models (Uno,1280,2560,etc). Default value of blank (no value) for all other platforms.
  • <CircuitBoard></CircuitBoard>

Menu Level

Sets the ROBOTC GUI Menu Level. Used to show/hide functionality by adjusting the menu level types (Basic, Advanced, and Super User)
  • <MenuLevel>Level</MenuLevel>
To set this menu level Use this parameter
Basic Basic
Expert Expert
Super User SuperUser

Compiler Mode

Sets ROBOTC’s compiler mode (Compiler Target) – used to switch between real robots, the PC-based emulator, and Virtual Worlds compiling targets.
  • <CompilerMode>CompilerTarget</CompilerMode>
To set this compiler target Use this parameter
Physical Robot Real
PC-based Emulator Emulator
Virtual Worlds VirtualWorlds

Compile and Download

Flag to specify if the source code should be “compiled” or “compiled and downloaded”. If set to “Yes”, the code will automatically be downloaded to the robot or Virtual World. Otherwise ("No", it will only be compiled.
  • <CompileAndDownload>Yes</CompileAndDownload>

Virtual World Index

Sets the numerical type of the RVW Level Pack Index that should be launched. – This is only a numerical number that references the RVW Level Pack “ID” number.
  • <VirtualWorldIndex>IndexNumber</VirtualWorldIndex>
To set this Virtual World Use this parameter index
Learning ROBOTC Tables Preview 2
Curriculum Companion 3
FTC Block Party! 8
VEX Toss Up 9
FTC Ring It Up! 10
VEX Sack Attack 11
Robots to the Rescue: Operation Reset 12
Palm Island: Luau Edition 14
Ruins of Atlantis 15
RVW Level Builder 18

Source File Name

Name of the file that will be saved/displayed on the ROBOTC tab-bar at compile time – Note this file only is used if SourceCode is provided.
  • <SourceFileName>Name_Of_Program.c</SourceFileName>

RVW Parameters

Command Line Parameters that will be passed the next time Robot Virtual Worlds is launched. If the “CompileAndDownload” flag is set to “NO”, these parameters will be stored for the next execution. After the Virtual Worlds has been executed once, these parameters are discarded.
  • <RVWParameters>parameter1 parameter2 parameter3</RVWParameters>

Source Code

Source Code of program to be open/compiled/downloaded. This is not a reference to an existing file but rather the actual contents of the file. Because the RBC file uses XML formatting, the file cannot contain any XML escape markups in the Source Code section. Instead, the escape markups must be replaced with the characters below: