
181-122018_THCD-101 Instruction Manual Page 18 of 26
4.2.2. Command/Query format
The format of the commands and queries is common between all available communication channels for ease of
use and understanding when switching communication methods:
Format: accc[?] [p][,p][,p]⏎
… where ‘a’ = address, ‘ccc’ = command/query, ‘?’ = query identification; ‘p’ = parameter (separated by
commas if more than one) and ⏎indicates a carriage return followed by a line feed.
The first letter to be entered on the command line, before any command or query, is the address identifier.
This is a legacy character and can no longer be configured. It is now fixed to the character ‘a’ but must be
present.
Most commands are identified by three letters (although this is not always the case) and a query is identified
by following the command letters with a ‘?’ character. For all commands with parameters, you must separate
the command from its parameters with a space, and separate multiple parameters with commas.
Table 1 in Appendix A summarizes all commands and queries available. Note that where a command is also a
query, you do not enter any parameters for the query ‘version’ unless explicitly stated in the table.
For everything sent on the communications port, the THCD-101 will reply by informing the user of the
command/query it has just received, along with any parameters identified, any data requested (if it was a
valid command/query) and a line indicating whether the command was accepted. This reply block is the same
for anything sent to the THCD-101 and is as follows.
(‘⏎’ indicates a carriage return/line feed pair):
For a command: For a query:
*<a>*:<cmd>;<params>⏎*<a>*:<cmd>;<params>⏎
!<a>!<response>!⏎<data>⏎
!<a>!<response>!⏎
where: <a> is the address letter
<cmd> is the command/query (query identified by a ‘?’ after the three chars)
<params> is the comma separated parameter list, if any
<response> is the acceptance indicator.
<data> is the data requested if a query was sent. Note the data usually consists of some identification string, in
CAPS, followed by a colon (:) and then the actual data. Some queries return multiple lines of information. See
individual commands for details as appropriate. Since many response include carriage return / line feed
characters in the middle of the response, the carriage return / line feed cannot be used to signal that the end
of the message has been reached. However the “!⏎” combination can be used to indicate message
termination.
The acceptance indicator is a single character as follows:
‘o’ = OK: if the command/query was recognized and accepted;
‘b’ = BADCMD: if the command/query was not recognized or has incorrect/invalid parameters
‘e’ = ERROR: if there was some internal communication error.
‘w’ = BUSY: if the communication channel is currently busy.
4.2.3. Main commands
(a) Output current readings – ‘r’
This command tells the THCD-101 to get the current reading of the input channel data and send it to the
communications channel. If the input voltage is more than 15% over the full scale voltage, the <reading> below
will be replaced with the over range error – “RANGE!”.
The readings output format is as follows with the channel data followed by a setpoint mode indication,
separated by a semi-colon:
READ:<reading>;<setpoint mode>⏎
The <setpoint mode> is a single number that represents the current mode of the setpoint: 0 = Auto, 1 = Open,
2 = Closed.