Appendix B - Communication Protocol; Ascii - Mantracourt DSC User Manual

Hide thumbs Also See for DSC:
Table of Contents

Advertisement

Appendix B - Communication Protocol

ASCII

The ASCII protocol uses only printable characters and carriage-return ('<CR>'), which allows a "dumb" terminal
device or a PC programme like Hyper-Terminal to interrogate the device.
Host Command Message Format
The command required to write 123.456 to parameter SGAI on station 1 is made up as follows:
Framing
Station
Character
Address
!
001
Where
• Framing Character
A "!" character is used to signal the start of a new message. This character is only ever transmitted by the host,
for framing purposes
• Station Address
A three-digit ASCII decimal number (0-999), determining which slave device(s) the command is intended for.
All three digits must be sent.
Address 000 is reserved for broadcast addressing.
• Separator
This is always present. As no checksum or message verification technique is used, slaves use this as an extra
check on message validity
• Command Identifier
Up to 4 alpha-numeric characters, case insensitive, giving the name of the required command.
• Access Code (read/write only)
Defines what sort of response is expected :–
'=' means write data is expected to follow
'?' means the host is expecting to receive read data back
• Data
An ASCII decimal-formatted number, can include 0..9, '+','–', '.' and spaces.
This field can have a maximum length of 15 characters
• End of frame
<CR> always present to indicate the end of the message
The above command would be sent as follows
!001:SGAI=123.456<CR>
Summary
• A command message begins with '!', followed by a three-digit station address, then a ':', and finishes with a
<CR>.
• The '!' and <CR> only appear at the beginning and end of commands respectively
• From the ':' to the final <CR> is the command 'instruction' (of read, write or execute type)
• All instructions begin with an alphanumeric command identifier of up to 4 characters (see commands list
below), and end with a non-alphanumeric (which may be the final <CR>).
Mantracourt Electronics Limited
Separator
Command
Identifier
:
SGAI
Access Code
Data
(read/write
(write only)
only)
=
123.456
71
DSC/DLC User Manual
End of
frame
<CR>

Advertisement

Table of Contents
loading

Table of Contents