
Strain Gage Reaction Torquemeters Installation Guide
S. Himmelstein and Company
© 2017 S. Himmelstein and Company—all rights reserved www.himmelstein.com
11
APPENDIX IV
T
his specification of the serial communications for the NGRTM
is subject to change at any time without notice.
SERIAL COMMUNICATIONS
FOR THE NEXT GENERATION RTM
Communication Port Settings
•
8 data bits
•
No parity
•
No hardware / handshaking
•
1 start bit
•
1 stop bit
•
38400 baud
General conventions used in this document
•
OK stands for the string “OK”
•
index is an alphanumeric character (A-Z or 0-9)
•
CR is a carriage return (^M / 13 decimal / 0D hexadecimal /
15 octal)
•
LF is a line feed (^J / 10 decimal / 0A hexadecimal / 12 octal)
•
int is an integer number string (e.g. “1234”)
•
long is a long integer number string (e.g. “1234567”)
•
string is a string (e.g. “LB-IN”)
•
hexNUM is a hexadecimal *string* that is NUM characters long
(e.g.
hex4 could be “8FC4”)
General information
•
All messages to and from the NGRTM are terminated with a
CR
or
LF
.
–
The default termination character is
CR
.
•
To set a value on the NGRTM, find the message that retrieves
the data you want to change. Then append to that message the
desired value of the parameter. The NGRTM should respond
with “OK”.
•
All hexadecimal/binary data from the NGRTM is in big-endian
(MSB first) format.
In response to any command, the NGRTM returns one of the
following:
•
“
string
” where
string
is the data requested.
•
“OK” operation was successful
•
Some error message starting with a “!” character. Some common
error messages include:
–
“!BadArg” command has a bad argement
–
“!BadIndex” The given index is out of range for the given
command.
–
“!PasswordProtected” The parameter is password protected
from change.
–
“!Unknown” an unknown error occurred.
–
“!xx” Command “xx” is unrecognized
EXAMPLES
•
Retrieve data:
Send “
d
” to the NGRTM. The return message should look something like “1234”.
•
Retrieve the filter:
Send “
C
G” to the NGRTM. The return message should be something like “7” which implies
(referring to the appropriate list under the “
C
G” message) that torque has a filter of 10 Hz.
•
Set the filter to 100 Hz:
Refer to the list under the “
C
G” (filter) command to find that a 100 Hz filter corresponds to the
value 4. Therefore, send “
C
G4” to the NGRTM. The NGRTM should respond with “OK” if the
operation was successful.
•
Apply the positive shunt calibration signal:
Send “
AS
B” to the NGRTM. To remove this signal send “
AS
A”.