Ascii Protocol; Introduction; Command Format - Brainboxes ED-549 Product Manual

Ethernet to analogue io
Hide thumbs Also See for ED-549:
Table of Contents

Advertisement

7 ASCII Protocol

Introduction

The ASCII protocol is a query-response or a question and answer communication protocol in which a host PC
uses ASCII characters to send commands to a device and then receives responses back from that device. The
ASCII command set is used to configure devices, send data to devices and to read data and status information
back from devices.
The ASCII protocol was first introduced in the 1980s by Analog Devices with its RS485 Half Duplex connected
6B Series modules and digital I/O boards and has been adopted and adapted by many other companies since.
It is the de-facto communication protocol on the widely used RS485 Half Duplex connected
ADAM/NuDam/eDAM modules. A very wide range of PC based data acquisition packages have support for this
command protocol communicating over PC COM port. The Brainboxes ED-xxx range of devices are completely
backwards compatible with these devices.

Command Format

The command string is made up of several different parts. For example, the command
down into as many as 6 separate parts.
$
Delimiter
Address
* Optional parameter for the command.
Every ASCII command sequence is a series of ASCII characters starting with a prefix delimiter and terminating
with a carriage return character. All of the ASCII characters used are easily entered from a PC keyboard and
every ASCII command is terminated with a Carriage Return character; hex 0D, denoted by (CR). All commands
being sent to the device must be in uppercase characters.
Prefix or Delimiter: Each ASCII command starts with a single character command prefix or delimiter. The prefix
will be one of the following five characters:-
#
the hash or pound sign, ASCII value hex 0x23
%
the percentage sign, ASCII value hex 0x25
$
the dollar sign, ASCII value hex 0x24
@
the at sign, ASCII value 0x40
~
the tilde or approx. sign, ASCII value hex 0x7E
These prefix signs cannot be used interchangeably but are particular to the command string which follows.
Address: Since it was initially developed for an RS485 bus system containing many devices, each ASCII
command must include the address of the particular device the command is directed to. The address is a two
character field giving the hexadecimal address of the device (
field is written as aa in the examples that follow.
A few commands do not have an address as these are broadcast commands that go to all the devices. Here the
address field aa is replaced by the wildcard two star signs **. Two such examples are #** and ~**.
Command: The command field contains the command that you want to send to the device. The next section
(Command
List) gives a detailed description of how to use each command and what the commands do.
Data: The data being sent to the device which is required in the command. Depending on the command this
data is in different formats.
Ethernet Analogue DIO
Product Manual V1.3
aa
5
Command
© Copyright Brainboxes Ltd
vv
[CS]
Parameters
Checksum*
00-FF
). The default address is 01. The address
$aa5vv
can be broken
(CR)
Carriage Return
Page 53 of 100

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ed-560

Table of Contents