beautypg.com

5 advanced usage, 1 using the command interpreter – Guralp Systems CMG-EDU User Manual

Page 31

background image

Operator's guide

5 Advanced usage

You can connect to the internal software of the CMG-EDU over its

output serial port and communicate with it.

To enter command mode from Scream!, right-click on the digitizer's
icon and select Terminal... from the menu that pops up. A window
will open, and once the digitizer and computer are communicating

properly you will see the prompt

ok

If you prefer, you can use a terminal program on your computer (such

as minicom on Linux, or hypertrm on Microsoft Windows) to
connect to the CMG-EDU.

Whilst you are in terminal mode, data transfer will be interrupted.

Some commands, such as SET-TAPS, require a reboot to take effect.

If you have problems connecting to the console, you should check that
the serial port's options and baud rate are set correctly in Scream! or

your terminal program. As supplied, the CMG-EDU expects
connections at 19200 baud, with 8 data bits, no parity bit and 1 stop

bit. No flow control is used.

5.1

Using the command interpreter

The CMG-EDU uses a FORTH-like interpreter to implement its

features. To issue a command in FORTH, you must supply the
arguments before the command, for example:

3 SENSOR-TYPE

In FORTH, anything you enter is termed a word. New words (case
insensitive) are placed on a stack. Some words are known to the

system, and may represent commands; if a command finds itself at the
top of the stack (e.g. because it is the last thing you typed), they will

execute, remove themselves from the stack, and then remove further
items from the stack to use as arguments. Thus, in the command

3 SENSOR-TYPE

the 3 has no immediate effect, so stays on the stack; SENSOR-TYPE
takes itself and the previous item (here 3) off the stack, then performs

its action on the 3 .

If a command completes with nothing remaining on the stack, the

October 2005

31