User guide

SERIAL RS485 COMUNICATION
PAGE 32 AMIS-DMA1 INSTALLATION & OPERATION MANUAL
IMPORTANT!
The introduction of CheckSum at the end of the block of data
and characters of CR + LF is defi ned in the confi guration fi le
confi g.txt (par. 9.2).
9.8 Control codes
The control codes are characters (they belong to the fi rst 32 ASCII characters
and cannot be printed out) which defi ne the type of information contained in
the packet following them.
The control codes used are those which appear on the following table.
The DMA1 initialises serial communications when it receives the character
ENQ.
MNEMONIC CODE DESCRIPTION
STX
02H Start TeXt. Beginning of reply packet
ETX 03H End TeXt. End of reply packet
ENQ 05H EnQuiry. Beginning of packet addressed to DMA1
ACK 06H ACKnowledged. Beginning of reply packet: all OK!
LF 0AH Line Feed. End of line code
CR 0DH Carriage Return
NAK 15H Not AcKnowledged. Beginning of reply packet: ERROR!
9.9 Address (ADD)
The address is a unique number that allows the control system to establish
communication with one of the various modules connected to the same serial
communications line.
The DMA1 address is defi ned in the confi guration fi le confi g.txt (par. 9.2).
IMPORTANT!
When setting the address it is necessary to be careful to not defi ne
more than one DMA1 with the same address, otherwise the
communication becomes confused and irregular.
The address can assume any value between 00H and 1FH.
The address is expressed in ASCII characters and consists of
2 characters.
9.10 Command (CMD)
CMD (command) is used to defi ne an operation to be carried out (for example
PLAY, reading the state or setting of the volume). Commands are defi ned as
ASCII characters and consist of 2 characters.
In the following sections of this chapter a list of commands (and detail about
each command) will be provided.