| 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.
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 communications error.
•‘w’ = BUSY: if the communications port is currently busy.
5.3.Main Commands
a.Output Current Readings – ‘r’
This command tells the THCD to get the current reading of the input channel data. If the input voltage of the channel is more than 15% over the full scale voltage set for the channel, 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 semicolon:
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. This number is mainly included for use with the
b.Output Current Readings Repeatedly – ‘rp’
The THCD is also able to report the current readings repeatedly, at a given interval. This command starts and stops this repeat activity by setting the parameter accordingly:
0 = Repeat off
1 = Repeat every 100ms (not allowed if using a baud rate < 57600)
2 = Repeat every 500ms (not allowed if using a baud rate < 57600)
3 = Repeat every second
4 = Repeat every minute The timing commences from the point at which the ‘rp’ command is entered. Use this command with care on a RS485 multidrop network! ‘r’ is recommended.
NOTE for 100ms repeat readings: The data output is effectively lots of small data packets. On TCP networks, this can cause problems when communicating with front end software running on MS Windows. It has been found that the Winsock control, commonly used in TCP communications development on Windows, does not handle lots of small data packets very well, coming in at speeds of around 10Hz or faster. As such, it has been decided that, when 100ms repeated output is used,
Page 18 of 28 |