Torrey Pines Scientific, Inc.
39
APPENDIX B: Commands Using the Serial Port
As described in Section
XIII. (“RS232 SERIAL COM INTERFACE”) communication
between the SC25 units and an external computer is accomplished using the RS232
protocol via the DB9 connector. See Section XIV for cable wiring and COM parameters.
Appendix B describes each command available to get information from and/or to control
the behavior of the SC25 unit using a terminal emulator program running on the PC (like
HyperTerminal). The interface also enables automated operation via a user written
application written in any of several languages like C# or Python.
Appendix A Conventions
<CR>
The notation “<CR> “ refers to the ASCII character for “carriage return” which is decimal 13 or hex D.
Every valid SC25 command must be terminated by this character. In HyperTerminal the character is sent
when the “enter” key is pressed. Programs written in C for example, typically send this character when
“\r” is appended to the transmitted command string.
<LF>
The notation “<LF> “ refers to the ASCII character for “line feed” or “new line” which is decimal 10 or hex
A. Every string that is returned from the SC25 will be terminated with this character. Actually, every
string that is returned from the SC25 will be terminated with a <CR> then a <LF>. In HyperTerminal the
combined characters will cause the cursor to return to the beginning of the next line. Programs written in
C for example, can use this character (often “\n”) for parsing returned strings.
(string)
Characters within parenthesis are strings consisting of 7-bit ASCII characters and the string itself is the
argument for a command. The length of the string is clarified in the discussion of the command and the
two parentheses are not included in the transmission of the command string.
Unit Identification Commands
Command:
v
Function:
Return SC25 Model and Version
Description: When the command v<CR> is received by the SC25 unit, the model number and the firmware
version will be returned in a text string terminated by <CR><LF>. If the command is not received in the
proper syntax, e<CR><LF> will be returned.
Example:
send: v<CR>
returned: SC25 v6.0<CR><LF>
Command:
V
Function:
Return Serial Number
Description: When the command V<CR> is received by the SC25 unit, the 8 character serial number will
be returned in a text string terminated by <CR><LF>. The serial number for every SC25 unit is unique. If
the command is not received in the proper syntax, e<CR><LF> will be returned.