| BrainStem Console - Getting Started |
Last Modified: 2009-11-05
About the BrainStem Console
The Console provides the main terminal into the BrainStem Modules. Overview information can be found at the Software Technologies - aConsole page.
Before you Begin
To set up communication between the host computer and your BrainStem module, you need the interface cable appropriate to your host computer platform.
Downloading and Installing the aConsole
If you do not already have the aConsole software, you will need to download it from the Acroname Download Center. Software is grouped by product.
For example, if one intends to interface a BrainStem GP to the aConsole on a Windows based operating system, on would download the "GP Support" for Windows. Inside the "acroname/aBinary" directory is the aConsole application.
Connecting to a Physical BrainStem
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.
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.
Several things occur:
The aConsole enables you to provide inputs, view outputs, and check the health of your connection. Launch the Console application. The Console displays a welcome and some version information.
Output after launching the aConsole application using Mac OS X Terminal.
Power Cycle a BrainStem
Power cycling the BrainStem will provide feedback to the aConsole. With appropriate link settings, one will see:
< 02:cmdMSG("power up reset") o brainstem>
The "<" character indicates data coming back from the BrainStem. The next bit of information is the module address (02 - default value for BrainStem GP modules). After the colon ":", the BrainStem command is decoded and printed. The command cmdMSG was sent by the BrainStem, which has a message code of 4. The message code "4" indicates a "power up reset".
Command Packet Communication
BrainStems core operation mode is to respond to structured command packets. Command listings can be found in the BrainStem reference manual.
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.
Round trip communication can be tested by sending a debug packet to a BrainStem. For this example, we send the values 1, 2, 3 and 4 to the BrainStem. The packet sending is shown after the ">". Once the BrainStem receives the packet, it sends it back up to the host, indicated by the "<".
brainstem> 2 23 1 2 3 4 > 02:cmdDEBUG(01, 02, 03, 04) < 02:cmdDEBUG(01, 02, 03, 04) O brainstem>
Many BrainStem module system parameters can be adjusted using the aConsole application. Settings such as I2C data rate, module address, router address, serial baudrate and many more can be adjusted by manipulating system properties.
One visual method of adjusting system parameters is to manipulate the heartbeat rate. For example, to adjust the heartbeat rate to 5.12 milliseconds (default is 25.6 milliseconds, increment of 2.56 milliseconds), send a cmdVAL_SET packet as follows (assuming module address 2):
brainstem> 2 18 2 2 > 02:cmdVAL_SET(02, 02)
Working with aConsole
TEA programs and reflexes need to get loaded onto a BrainStem before they can be executed. The leaf and steep utilities are compiling tools. The "load", "batch" and "launch" utilites are built into the aConsole application as they are link dependent. These tools will not do any good if a BrainStem link is not established. Detailed command usage examples are provided in the Getting Started Guides.
Items in blue are some commonly used commands when using aConsole. Items in red are files created by an individual.
"stat" is a very simple command that displays information about your Console application. In the Console input area, type:
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.bat" Save the file in the aUser subdirectory under your main acroname directory. In this file, type the following lines:
/* filename: test.bat */ /* Send a few debug packets */ /* Comments get taken out when run through aConsole */ 2 23 1 2 2 23 3 4 2 23 5 6
Now you have a batch file that can be used from the aConsole by entering:
brainstem> batch test.bat executing batch file test.bat brainstem> 2 23 1 2 > 02:cmdDEBUG(01, 02) brainstem> 2 23 3 4 > 02:cmdDEBUG(03, 04) brainstem> 2 23 5 6 > 02:cmdDEBUG(05, 06) < 02:cmdDEBUG(01, 02) < 02:cmdDEBUG(03, 04) < 02:cmdDEBUG(05, 06)
The Output Area displays the outgoing packets followed by the reply debug packets from the BrainStem module.
Close the aConsole application by first typing "exit" in the Input Area. Then, unplug the power to power down the BrainStem module.
Check out the Getting Started Section for a complete list of resources to guide you through the BrainStem architecture.
| voice: 720-564-0373, email: email@example.com, address: 4822 Sterling Dr., Boulder CO, 80301-2350, privacy |
© Copyright 1994-2012 Acroname, Inc., Boulder, Colorado. All rights reserved.