The program has several dialogs that provide access to the robot, it's axes and structure and allow you to program it, monitor it's internal data and retrieve status messages from your program.
These dialogs are acessible through the view menu, and some keyboard keys, the following paragraphs describe these dialogs and how to work with them to manipulate your robot.
This dialog shows the axes of your robot, each axis has its own name and range of movement.
You can move each axis by dragging the slider left or right and watch the effect on your robot.
Below the sliders appear the sounds and lights of your robot as check boxes, checking these will turn this light or sound on or off.
You can reset all axes to their initial position by pressing "Reset Axes", and also you can enable the joystick control by pressing the button below.
For robot with multiple axes, or lights, this dialog may become bigger than the screen itself, in such case there will appear a vertical slider on which you can scroll the controls up and down the screen so you can access all of them.
This dialog shows the structure of your robot in schematic form, each of the different parts of your robot is shown in different color by its function.
At the top you see the robot name, below you see component names.
Below you see motos or axes which produce momenents, colored green.
Below you see sounds and light in magenta.
Below you see sensors and outputs you can read from your robot, such as the collision and robot position and orientation, colored white.
When the robot has many sxes or outputs, the schemtic view becomes larger than appears on screen, you can press anywhere on the view to drag it around untill you see all the parts.
The collision returns positive value if
the robot collided with some object.
The damage returns the damage value the robot sustained by a laser shot.
The robot object ( also other objects you define as position output ) has properties which can be accessed using the robot.property keyword.
x - returns the position of the object along the x axis
y - returns the position of the object along the y axis
z - returns the position of the object along the z axis
vx - returns the speed of the object along the x axis
vy - returns the speed of the object along the y axis
vz - returns the speed of the object along the z axis
rx - returns the rotation speed of the object around the x axis
ry - returns the rotation speed of the object around the y axis
rz - returns the rotation speed of the object around the z axis
rvx - returns the relative speed of the object along its x axis
rvy - returns the relative speed of the object along its y axis
rvz - returns the relative speed of the object along its z axis
rrx - returns the relative rotation speed of the object around its x axis
rry - returns the relative rotation speed of the object around its y axis
rrz - returns the relative rotation speed of the object around its z axis
alfa - returns the elevation angle of the object in radians.
beta - returns the yaw angle of the object in radians.
gama - returns the roll angle of the object in radians.
m11, m12, m13 - return the first line of the object matrix
m21, m22, m23 - return the second line of the object matrix
m31, m32, m33 - return the third line of the object matrix
This is perhaps the most important dialog of the program, it shows you the program loaded onto your robot, allows you to run, edit and debug it.
The following icons appear below the program text window:
Go - runs or resumes the program after break point was reached.
Break - breaks execution at the current position of the program, current position is marked in yellow.
Step - executs one line each time, also breaks execution at current position.
Set Line - select line on your program and then press this icon to set execution point.
Restart - reset the program and set execution point at the beginning.
Break Point - select a line on the program and press this icon to set a break point, when break point is met the program stops and waits for you, break points appear in bold case, you can have as many of them as you wish.
Remove BreakPoints - removes all break points.
Reload Program - reloads the program from file, this is useful if you are working with an external text editor and wish to reload your changes.
Edit Program - opens the program text editor, or an external text editor.
Breakpoints break execution on normal program lines, if your lines are surrounded by execution points break points do not work when program runs, unless you run it in debug mode.
Debug mode shows you detailed information about each line and expression, and also executes lines one at a time regradless of any execution blocks you may have set, to run the program in debug mode use Shift+F5 or Shift+6.
The important functions of the program screen are acessed more quickly using keyboard keys:
F5 - run the program, Shift + F5 - run the program in debug mode.
F6 - step the program, Shift + F6 - step the program in debug mode.
F7 - break execution and reset axes.
F8 - reset the program and set execution point at the beginning.
The program editor is shown when you press the edit program icon on the program dialog, when the internal editor option is set the following dialog appears:
This dialog is made out of stadrad windows coponents because it allows functions such as copy and past, and standard text editing, this makes it behave like an external component of the program but still able to send and retrieve data from it.
This dialog can be set below or ontop the program window, when pressing upon the program window this dialog is pushed back and is hidden below, but still available on the taskbar, and also by pressing the edit program icon again.
The program is seen inside this window and may be edited directly, you can make any change and test it by pressing Upload to robot, and also get the program as arranged by the internal parser of your robot by pressing Download from robot.
Any change you make is not saved to disk untill you press Save to disk, so make sure to press it if you wish to save the changes you have made.
This dialog can be resized, minimized and restored, it is also available on your taskbasr for quick access.
While typing your program the editor does not show autocomplete or tips of any kind, parsing of your program and syntax check is made only after uploading it to your robot, any syntax errors are seen in Red on the status information on the right side of your screen.
Robot Simulator allows you to use an external text editor such as Textpad or Notepad++ instead of this editor dialog, to use this option press O to show the options dialog and clear the option called "Use internal editor".
Using a good external editor allows you to have multiple undo operations, clever text formatting, syntax checking while you type and more, see more about these options on Textpad or Notepad++
This dialog shows all the varaibles and sensors used by the program, and shows their values.
Each of the variables is associated with a memory slot, to see the index of this memory slot select the variable from the list.
The variables include the axes of your robot, inputs, outputs, variables you have declared in your program and goto labels.
You can set the value of any variable by selecting it from the list, then entering a value on the textbox below and pressing set.
While the program runs you can only see the values change, to examine each value or change it, press F6 to break execution, then resume by pressing F5.
This dialog is also shown on some of the existing layouts, press F9 to change the layout of your dialogs.
This dialog shows the standard output from your program, normally this output is seen on the lower right side of your screen, next to the tollbar.
The benefit of using this log screen is that you can scroll the messages and even save them to file.
Pressing Save Log saves a file called Output.txt into your program directory, this is useful if you wish to explore robot behavior or the performance of your program and wish to get the full output buffer.
Each time the program is reset the output buffer is reset as well, so when you need to save the output buffer you can do so at the end of each program run.
The maximum number of output lines you can save to file is 1024.
Some layouts show this log dialog only and some show it with the program window, select the layout that best fits you need by pressing F9.