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.
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
_d1
The product’s full name. StimTracker returns:
StimTracker ST-100
(c) Copyright Cedrus Corporation, 2008
Get Product ID
_d2
Returns ‘S’ (ASCII value 83).
Get Model ID
_d3
Returns ‘C’ (ASCII value 67).
Get Major Firmware Revision
_d4
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.
Get Minor Firmware Revision
_d5
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
_d6
Returns 1 if the time stamping board option is installed, or 0 otherwise. See additional details below.
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.
The following commands let you send event codes:
Command Name
Send Bytes
Description
Set Event Code Lines or Send Pulse
mh + bit mask
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.
Get Event Code Lines
_mh
StimTracker returns _mh followed by the bit mask indicating which lines are currently raised.
Set Pulse Duration
mp + duration
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.
Get Pulse Duration
_mp
Returns _mp followed by the pulse duration.
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.
The following commands miscellaneous commands are available:
Command Name
Send Bytes
Description
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.
Re-program Flash
f3
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.
Last revision: December 4, 2010
PRODUCTS
SUPPORT
STAY IN TOUCH
© Copyright 2024 Cedrus Corporation, P.O. Box 6309, San Pedro, CA 90734 - USA
Phone: +1-310-548-9595. Send us an email. See privacy policy.
qwerasdf