The Matlab interface to the communication server consists of a single routine to interact with the communication server: mComm. Connection to and interaction with the communication server are achieved by using different arguments to the mComm function. The mComm function performs three different functions: opening communication with the communication server, setting data for a particular robot's motor speeds, and closing communication with the communication server. The communication routines use port identifiers to maintain connections to the communication server. By using this system a single Matlab session would be able to make connections to multiple communication servers or to make multiple connections to a single communication server. Each time a connection to a communication server is opened with the 'open' command it should later be closed with the 'close' command. Typically the usage is of the form: result=mComm(command [, options]) The available commands are: 'open' - Open a connection to the communication server Arguments: The character representation of the TCP/IP address of the machine running the communication server Returns: A port identifier used for future communication with the communication server. Example: com_port=mComm('open','127.0.0.1'); % Open a connection to the server on the machine with address % 127.0.0.1 (This is a loop back address - it will always connect % to the machine on which the Matlab session is running) % And save the port identifier in the com_port variable 'close' - Close the connection to the communication server Arguments: A port identifier created by the 'open' command Returns: Nothing Example: mComm('close',com_port); % Close a connection to the communication server that was % created earlier and who's port identifier was stored in % the com_port variable. 'set' - Set the left and right motor speeds for a specific robot Arguments: A port identifier created by the 'open' command A numeric value representing the ID number set on the radio turret dip switches of the desired robot A left motor velocity (in units of 0.78cm/s) A right motor velocity (in units of 0.78cm/s) Returns: Nothing Example: mComm('set',com_port,1,5,-5); % Set the motor velocities on the communication server % who's port identifier is stored in com_port. % set the velocities for robot 1. % set the left motor velocity to 5 % set the right motor velocity to -5 % Returns 0 on success