StimTracker Software Commands


When installed, StimTracker’s USB driver emulates a serial port. You can communicate with StimTracker by opening a serial port and then sending commands through it. The available commands are listed below and grouped by functionality. Some commands are common to the XID command set, but please note that StimTracker is not considered an XID device.

Inquiry Commands

The following inquiry commands make it possible for an application to verify the presence of a StimTracker unit and obtain firmware version information:

Command Name

Send Bytes

Information Returned

Get Product Name

Get Product ID

Get Model ID

Get Minor Firmware Revision





The product’s full name. StimTracker returns:


StimTracker ST-100

(c) Copyright Cedrus Corporation, 2008

Returns ‘S’ (ASCII value 83).

Returns ‘C’ (ASCII value 67).

Returns a single byte to indicate the firmware’s revision number. This number is incremented by one for every firmware revision.

Inquire about time stamping board


Returns 1 if the time stamping board option is installed, or 0 otherwise. See additional details below.

Get Major Firmware Revision


Returns a single byte: 0 (ASCII value 48), 1, 2, etc. This number is incremented every time there is a significant change to the firmware.

If the time stamping board option is installed, you send the following additional commands to StimTracker: _dt1, _dt2, _dt3, _dt4, and _dt5. They return information similar to _d1 through _d5 except that it applies to the time stamping board.

Event Code Commands

The following commands let you send event codes:

Command Name

Send Bytes


Set Event Code Lines or Send Pulse

Set Pulse Duration

Get Pulse Duration

mh + bit mask

mp + duration


Sets the state of the output lines or sends a pulse. Send bytes mh followed by two “bit mask” bytes (a binary value). In the first byte, each bit corresponds to an output line. The second byte is currently ignored. See additional details below.

Sets pulse duration for subsequent mh commands. The ‘duration’ parameter is a four byte binary value indicating the number of milliseconds. The four bytes form a little-endian, 32-bit unsigned integer.

Returns _mp followed by the pulse duration.

Get Event Code Lines


StimTracker returns _mh followed by the bit mask indicating which lines are currently raised.

The behavior of the code output depends on the setting of both parameters. The mh command sets the output value and the mp command specifies how long that value will remain on the output pins. At the end of the time period, the output will return to zero. A new mh command with a different value can be sent during that time and the outputs will be updated instantly and the timer restarted.

The exception to this is when the mp command is sent with a value of zero to indicate that the output will not time out and will only change when a new mh command is sent.

Miscellaneous Commands

The following commands miscellaneous commands are available:

Command Name

Send Bytes


Set Serial Port Speed

f1 + parameter

Send bytes f1 followed by one byte indicating the baud rate. Unlike with other commands, the parameter byte for this command is binary, not ASCII. Use:

    0×00 for 9600 baud

    0×01 for 19200 baud

    0×02 for 38400 baud

    0×03 for 56K baud

    0×04 for 115K baud

After sending this command, you must close the serial port on your computer and re-open it at the new baud rate, otherwise your program and StimTracker will not communicate. The factory default is 115K baud.

Do not use this command!

If you do by any chance, StimTracker will hang. Power it off, wait a few seconds, and then turn it back on.

Re-program Flash


Last revision: December 4, 2010


Other Links

Stay in Touch

© Copyright 2017 Cedrus Corporation, P.O. Box 6309, San Pedro, CA 90734 - USA

Toll Free: (800) 233-7871, other (310) 548-9595. Send us an email. See privacy policy.