Direct Functions
 
Icon & Quick Hints Example
Begin, End direct mode Hints: These two icons are used to start and end direct communication between the RCX and the tower. Commands that appear between the two icons are sent to the RCX in direct mode (there must be continuous line of sight between the RCX and the tower). This piece of code would turn motor A on for 2 seconds, and then turn motor A off.
Is RCX in view? Hints: If you are running a direct mode program it can be useful to know if the RCX is in view of the tower and can receive commands. This command updates a Boolean (true / false) indicator with a true if the tower can talk to the RCX and a false if the tower cannot talk to the RCX. This piece of code looks to see if the RCX is in view of the tower. It updates the Boolean indicator Exists? with the current status.
Memory Map Hints: The memory map icon gives you a reading of the memory contents of the RCX. It MUST be used in direct mode and outputted to the front panel. To create the Memory Allocation indicator, right click (control-click for Mac users) on the lower right corner and choose create indicator. This piece of code will read the RCX memory contents and display the readings on an indicator on the front panel.
Read Run Status Hints: Use this Icon to determine whether your RCX is still running a program (i.e. is the person running?). Should be used in direct mode. This piece of code displays on the front panel whether the RCX is running and whether it is in range.
Read tower power Hints: Use this icon to determine the power setting of the tower (little and big arrows equal high and low power mode). Most usable in direct mode programming. This piece of code reads the tower power and displays a true state on the Front Panel if it is in high state (and a false state if it is in low power mode).
Set RCX Tower Power Hints: Use this icon to set the IR power of your RCX (high or low - usually done in Administrator). Can be done in any (direct, remote, local) programming mode. The Power modifier is a Boolean (true / false) control. If true is selected, the RCX IR power is set to High. If false is selected, it is set to Low. This piece of code sets the RCX IR power to High when the program is run.
Read Battery Power Hints: Use this command in direct mode to determine the remaining battery power of your RCX. Useful if your battery power significantly impacts RCX performance.

This piece of code will display the Battery Power level on the front panel (between 0-9 Volts).
Read Value Hints:  Use this command in direct mode to read the value of any memory location. This command will NOT automatically display that value. To display automatically use the Read and Display Value command. To display using the Read Value command, string an indicator to the Value read terminal. Also, you can choose which port to poll using the Modifier to read terminal.  This piece of code reads the value of sensor 1 in direct mode and displays it to the control panel.
Read and Display Value Hints:  Use this command in direct mode to read and display the value of any memory location. This command displays automatically. Choose which port to poll using the modifier to read terminal. This piece of code waits until the RCX is in view of the tower, then reads and displays the value of sensor 1.
Wait for RCX to be in view Hints:  Use this command if you need the RCX to be in view of the tower before moving on.  This piece of code waits until the RCX is in view of the tower, then reads and displays the value of sensor 1.