BrainStem Console - Getting Started
Last Modified: 2007-08-28
find:

basket

Acroname Robotics PDF webpage version BrainStem Console - Getting Started PDF

Related
Products

Product image for BrainStem Moto 1.0 Module
BrainStem Moto 1.0 Module
Product image for Brainstem GP 1.0 Module
Brainstem GP 1.0 Module

Contents

About the BrainStem Console

The Console provides the main terminal into the BrainStem Modules.  With the Console you can:

  • Send packets to the BrainStem modules you are using. 
  • Compile, disassemble, and load TEA programs and reflexes
  • View output from routines running on the BrainStem modules
  • Relay BrainStem communications across the Internet

Before you Begin

To set up communications between the host computer and your BrainStem module, you need the interface cable appropriate to your host computer platform. 

Downloading and Installing the Console

Step 1

Log in to the Acroname Download Center .  Select the Console application for your platform, then select download.  Depending on your platform, the software archive may automatically decompress.  If not, download the software into a temporary location and extract the files.  The Console application interweaves with other software within the BrainStem architecture.  If you have other BrainStem software already in place, put the Console application and support files in the same location. 
Note:

Need some additional information for your platform? Refer to the specific instructions for MacOS , PalmOS , and Windows.  

The Console application is in the aBinary subdirectory of the brainstem directory, unless you are using the PalmOS version.  For PalmOS, you need to install and hotsync the Console application and support libraries (console.prc, aIO.pdb, aStem.pdb, aTEAvm.pdb, aSteepOpt.pdb, aSteepGen.pdb, aSteep.pdb, aLeaf.pdb, and aUI.pdb). 

Step 2

Launch the Console application.  The Console displays a welcome and some version information. 

Step 3

Plug the host side of the interface cable into your host computer.  If your computer has more than one serial port, note which serial port you plug it into.  On the PC, the COM1 port is the default.  To use other ports, you need to add a configuration file. 

Plug the stem side of the interface cable into the BrainStem Module.  The serial port on the module has 4 conductors and is below the LEDs.  Take care to observe the correct orientation when plugging the cable into the module, as shown in the diagram. 

Ground wires are always oriented away from the status LEDs for the serial, power, and bus interfaces.

Step 4

Power up the module.  Refer to the specific module descriptions for power supply requirements and considerations.  Take care to get the orientation correct when plugging in the power to the module as shown in the diagram for step 3. 

Several things occur:
  • The steady red power LED on the module indicates that the board has power. 
  • The blinking green heartbeat LED on the module indicates the link between your module and the host computer running the Console program is configured correctly. 
  • The red LED on the module side of the interface cable indicates the interface cable has power. 
  • The yellow LED on the interface cable's host side indicates the host is providing an RS-232 signal. 
  • The green LED on the Console program blinks in unison with the heartbeat on the BrainStem board, indicating the link is working round-trip. 

User Interface Elements

Step 5

The Console enables you to provide inputs, view outputs, and check the health of your connection. 
Screenshot of Console showing major UI elements.
  • Output Area - Displays outputs from the Console as well as from the BrainStem module's TEA programs
  • Heartbeat LED - Blinks to signal the link between your Console and your module is healthy, the application is working correctly on your host computer, the module has power, and the module is functioning and configured properly. 
  • Input Area - Provides an area to enter packets and commands to compile and load TEA programs, run batch files, and send raw link data. 
When you first plug in the power to your module, the output area displays:
2: power up reset
This message is from your module and indicates that it has IIC address 2 and has powered up. 

Sending Packets

Step 6

Packets are the lowest available level of communication with the BrainStem modules via the link.  Control, IO, and reflex commands are associated with a code, for example, cmdVAL_SAV = 19.  These codes, including reserved codes, are fully documented in the BrainStem Reference under the Commands link. 

In the Input area, type the following packet, which is a simple debugging command that echoes what is given back to the host, and press Enter:
2 23 4 5 6
In this string, 2 is the address where you want to send the packet, in this case, IIC address 2, your BrainStem module.  23 is the debugging command, cmdDBG .  The rest of the numbers form the packet data. 

The following displays in the output area:
> 02:17,04,05,06 < 02:17,04,05,06
These lines are formatted in hexadecimal, so the 23 from the input displays as 17.  The first line is the outbound packet you typed.  > indicates an outbound packet.  The second line shows the reply from the BrainStem module.  < indicates the packet is from a module.  The first number in each line is the address of the packet.  Line one was addressed to IIC address 2 and line two came from IIC address 2.  All the bytes in the packet follow this address. 
Tip:

Each packet consists of an address, length byte, and data.  The length byte is not displayed in the output and you don't need to type it in.  When you are typing the packets in, the parser figures out the length based on the number of bytes you type.  Similarly, the length of an inbound packet (from a module) is easily deduced from the number of data bytes following the address.  These are handled automatically to make things easier when working with packets. 

Example: Changing System Parameters
You can change the system parameters, such as the heartbeat rate, of a BrainStem module by using the cmdVAL_SET (code 18) and cmdVAL_GET (code 17) commands.  Heartbeat rates define the delay between the heartbeat packets that move between the BrainStem and host computer.  Heartbeats are specified in timer units of roughly 25.6ms.  The default heartbeat is 10.  To set the rate to 20, type the following string and press Enter:
2 18 2 20
In this string:
  • 2 is the address of the module
  • 18 is the cmdVAL_SET command
  • 2 is the parameter ID for the heartbeat rate
  • 20 is the value
The packet displays in the output area and the heartbeat indicator slows to half its previous rate (assuming it was previously set to the default).  The module does not reply to this packet. 

For a complete list of system parameters, refer to the Resources section of the BrainStem Reference Guide
Note:

Remember to save your changes.  The heartbeat and many other settings can be manipulated while the Module is running but they are not automatically saved.  Use the cmdVAL_SAV packet to save settings.  To save the heartbeat change, type in the Console input area.  Unless saved, the original settings are restored when the module is powered up again. 

Info:

Heartbeat packets are automatically handled by the underlying aStem shared library that the Console uses to communicate with the link, which is why you don't see them in the Output Area. 

Commands

Step 7

Console Commands are a more powerful means of communicating with the BrainStem Modules.  These commands are fully documented under the Console link of the BrainStem Reference Guide . 

stat is a very simple command that displays information about your Console application.  In the Console input area, type:
stat
and press Enter.  A list of version and installation information displays in the Output Area.  (It is critical to include this information with any support requests you may have for Acroname.)

If you have large numbers of packets to get to the BrainStem Module, you can use the batch command instead of typing them by hand.  To use the batch command, create a new file using a text editor and name it "test.bag" (Make sure your text editor does not add an extension to the file, such as .txt.) Save the file in the aUser subdirectory under your main brainstem directory.  In this file, type two lines:
2 23 1 2 2 23 3 4
Tip:

When using PalmOS, a filename is the entire first line of the memo you are writing.  For this example the first line should contain the four characters "test". 

Now you have a batch file that can be used from the Console by entering:
batch "test"
in the Input Area.  The Output Area displays the two outgoing packets followed by the two reply debug packets from the Module. 

Shutting Down

Step 8

Close the Console Application by first typing "exit" in the Input Area.  Then, unplug the power to power down the Module. 

What's Next

Check out the Getting Started Section for a complete list of resources to guide you through the BrainStem architecture. 

BrainStem
Resources

 
 
voice: 720-564-0373, email: sales@acroname.com, address: 4822 Sterling Dr., Boulder CO, 80301-2350, privacy
© Copyright 1994-2008 Acroname, Inc., Boulder, Colorado. All rights reserved.