revisited 29/1/02

Sending Messages to more than one RCX

A well known problem of the standard LEGO firmware, Spirit-OCX and the more recent SDK 2.0 is the fact that it is not easily possible to establish a one-way communication from the PC to the RCX because of the master-slave mode the RCX-designers decided to implement. Generally, the RCX must reply when receiving something from the tower.

If we want to use two RCXs, the replies will cause IR-garbage leading to an error-message.

The question how an unidirectional communication can be set up is simply answered. Since the SendMessage(x) command allows one-way RCX to RCX communication, we only have to send the correct opcode from the tower.

This has been described by many people. Here a non-exhaustive list :

Mindstorms IR-communication, Stef Mientki

RCX Internals, Opcodes, Protocol Description, Kekoa Proudfoot and Dave Baum

Opcodes and complement, Jürgen Stuber

send messages from IR-tower to rcx, Ian Warfield

sending messages with VB, Falco Kleinschmidt

3rd Year Project Dissertation - Lego Mindstorms, David Loudon et al

java - class IRProtocol, David Loudon

55 FF 00 F7 08 03 FC FA 05

where 55 FF 00 is the universal opcode-header

F7 is the opcode for the SendMessage-command

08 is the complement of F7  (e.a. 0xFF - 0xF7 = 0x08)

03 the message, FC its complement

FA the checksum, 05 its complement

To operate the opcode-transmission correctly under Robolab we have to design a special vi with the help of LABVIEW (the type cast icon is not directly accessible in Robolab but nevertheless programmable). So the following vi will perfectly run under Robolab.

Note : If you want to convert bidirectional opcodes to strings in order to send them via tower, don't use this vi, because of the particularity that for error-preventing reasons the RCX designers decided to toggle the 8th bit of an opcode every time the same instruction is send twice consecutively. Instead you should use the Cmd to which is located in the Robolab directory ..\Robolab\Engine\vi.lib\Rcx1\VBrick.llb

For use of the RS232-port have a look at : Using Labview with RS232

The following program will send the message 3 to the RCX.

The RS232 vis may be found in the directory ..\Robolab\Engine\vi.lib\Utilities\Serial.llb

You may test the vi with the help of the following Robolab RCX-program :

Note that the slightly transformed vi could also send the other unilateral opcodes used by the LEGO IR-remote control.

RetourMain Page