ROBOLAB Online Documentation: Internet Control of the RCX
Internet Control of the RCX
An RCX unit can be controlled over the Internet. The program you write can be downloaded to an RCX located
near any computer running ROBOLAB that is linked via the Internet.
Note: you need two computers, an internet connection with a known IP address. One computer must have the IR
Transmitter and RCX set up and ready to go.
Running the ROBOLAB Server
First, set up the computer which is going to receive the ROBOLAB program and download it to the
waiting RCX. This computer must run a special software called ROBOLAB Server. The
ROBOLAB Server is different than ROBOLAB. The ROBOLAB Server Program is in the Extras
Folder.
Before running ROBOLAB Server, make sure that ROBOLAB is not running on the remote
computer. You may want to start by running ROBOLAB to test communications between the remote computer, the
IR Transmitter, and the RCX.
IMPORTANT Note: The ROBOLAB Server must be from version 2.0.1 or later to run properly.
To start ROBOLAB Server, choose File Open. Next, open the Extras folder and then the Server folder. Double
click on ROBOLAB Server.exe.
Running the ROBOLAB Server
opens a window on the remote
computer. This window must be
open for Internet control of the
RCX to work.
Select COM Port
Click on the COM
Port list to specify
which Port is being
used.
Testing Communication is
successful when the RCX plays a
rising sweep and the green
indicator in the ROBOLAB
Server window turns from red to
green.
Test Communication
Click to test for
communication
between the remote
computer and RCX.
Red test indicator light shows no communication between computer and RCX.
After starting the ROBOLAB Server, the computer and RCX are ready to receive programs over the internet.
www.LEGO.com/education/mindstorms 2000 The LEGO Group.
This page may be photocopied for non-commercial educational use. All other rights reserved.
ROBOLAB Online Documentation: Internet Control of the RCX
How do you create ROBOLAB programs to send over the Internet?
There are two new types of ROBOLAB commands used for Internet control of
the RCX. These commands are found in the Internet sub menu of the
Programmer - Inventor Level 4 or in the Investigator - Program Level 5.
They are the Internet Begin & Begin Internet
Direct Mode, each with a corresponding end
command.
Note: If you do not see these icons, you must install
extras. Under Project choose Install Extras and
follow the prompts.
Internet sub-menu
Inventor Menu
Internet Begin and End
The Internet Begin command is used instead of the standard Begin
command in ROBOLAB programs. It is required as the first command
in every Investigator or Inventor Internet program that will be
downloaded to the remote RCX. The IP address of the remote
computer that will be transmitting the program to the RCX must be
specified. The remote computer must be running ROBOLAB Server.
The Internet End command is used at the end of every Investigator or
Inventor Internet program that begins with the Internet Begin
Command.
Investigator Menu
The String modifier is used to specify the IP address of the remote computer.
Example 1
Download a program from a remote computer to run a motor for 2 seconds.
This program sends a program to the remote
computer with IP address 130.62.208.54.
This computer then downloads the program
to the remote RCX. When the remote RCX
is run the motor on Port A runs for 2
seconds and stops.
Note: the remote computer must be running
the ROBOLAB Server and have an IR
Transmitter attached with the remote RCX
on and nearby.
Program InternetRCXex1.vi
Behavior: When the program is downloaded the remote RCX must be run by pushing the red run button. The
remote RCX will then run the motor on Port A for 2 seconds.
www.LEGO.com/education/mindstorms 2000 The LEGO Group.
This page may be photocopied for non-commercial educational use. All other rights reserved.
ROBOLAB Online Documentation: Internet Control of the RCX
Direct Mode over the Internet
The Begin Internet Direct Mode command is used to actively control the remote RCX. It is used instead
of the standard Begin command or Internet Begin command. This command downloads and runs the
program in the remote RCX. The IP address of the remote computer that will be transmitting the program
to the RCX must be specified. The remote computer must be running ROBOLAB Server.
The End Internet Direct Mode command is used at the end of every direct mode program that begins
with the Begin Internet Direct Mode command.
Example 2
Download and run a program to run a motor for 1
second.
This program is sent to the remote computer with
IP address 130.64.208.54. The remote computer
then downloads and runs the program in direct
mode on the remote RCX. The RCX runs the
motor on Port A for 1 second and then stops.
Clicking on the run arrow
sends the program
via the Internet to the remote computer where it is
downloaded and run on the RCX. There is no
indication on the local computer if the program was
completed successfully.
Program InternetRCXex2.vi
An error message appears if there are any problems with the
transmission from the local computer to the remote computer.
The programs in these examples use simple commands. Programs for Internet Control of the RCX can be as
complex as any of the conventional RCX programs for your local computer. There are a few exceptions
ROBOLAB Server does not support Internet Direct Mode for programs with Data Acquisition or Looping
structures. These formats are supported by the Internet Mode.
See the Getting Started: Teachers Guide to Robolab Software or Advanced Programmingon the web at
www.lego.com/dacta/robolab for more information on the Programmer and Investigator commands.
www.LEGO.com/education/mindstorms 2000 The LEGO Group.
This page may be photocopied for non-commercial educational use. All other rights reserved.