VEMCO - VR2C Manual
9
Jul 2018
32
3.2.4
ASCII Command/Response Format
VR2C ASCII commands are formatted as follows:
*SSSSSS.P#CC,
command
\r
Where
SSSSSS =
serial number of VR2C
P =
port to address (0 for commands, 1-X reserved for future use)
CC =
decimal summation of preceding S and P digits (eg. *450088.0# would
require CC to
be 25 because 4+5+0+0+8+8+0=25)
command =
one of the ASCII commands listed above in section 3.2.2
\r =
carriage return (0x0D)
The VR2C responds to every ASCII command with a response packet. Response packets are structured as
follows:
*SSSSSS.P#CC[LLLL],
response,status,#HH
\r\n
Where
SSSSSS
=
serial number of device
P =
0
CC =
simple decimal summation of preceding S and P digits
LLLL =
number of bytes to follow “]” including “\r\n”
response
=
response data (optional)
status
=
response status (OK, FAILURE,INVALID)
HH =
8-bit hex sum of characters between leading “],” and “,#”
\r\n =
carriage return, line feed (0x0D, 0x0A)
3.2.5
ASCII Command Details
This section describes the VR2C’s ASCII commands in detail.
Note the following:
When showing command examples, a VR2C with serial number 450088 is used.
When showing command examples, it is assumed that the receiver’s serial transceivers have
already been enabled (refer to section 3.2.3).
‘
\r
’ and ‘
\r\n
’ refer to carriage return and line feed (0x0D, 0x0A). When typing commands in a
serial terminal program, you do not actually type the slash-r or slash-n characters.
The VR2C incoming command processor looks for the carriage return (‘
\r
’) to know when the
incoming command is complete. The VR2C will not interpret incoming ASCII commands properly
if a line feed (‘
\n
’) precedes the carriage return. Ensure your serial terminal program does not
automatically insert a line feed before a carriage return when the ‘Enter’ button is typed on the
keyboard.