PROTOCOLS DESCRIPTION
Three modes of communication are provided; The ASCII mode uses a simple protocol compatible with various series of
DITEL instruments. The ISO mode, in accordance with the ISO 1745 standard, enables more effective communication in
noisy environments as it checks the validity of messages both on transmission and reception.
And also the MODBUS RTU protocol (see manual at www.ditel.es)
As can be seen in the table of functions, the ASCII protocol uses 1 or 2 bytes depending on the type of command and
the ISO 1745 protocol imposes the use of two bytes per command.
•
ASCII PROTOCOL
The word format is 1 START bit, 8 DATA bits, NO parity and 1 STOP bit.
FORMAT OF THE MESSAGE TO SEND
A message addressed to the instrument must consist of the following series of ASCII characters:
*
D
d
C
A character "*" [ASCII 42] to start the message.
Two address digits (between 00 and 99).
One or two ASCII characters corresponding to the desired command according to the function table.
If the command is of the parameter modification type, the new value will be sent in the form of a sign byte
+ [ASCII 43] or - [ASCII 45] followed by a block of "N" ASCII characters (depending on the model), including the
decimal point.
A "CR" [ASCII 13] end-of-message character.
INSTRUMENT RESPONSE MESSAGE FORMAT
The format of the messages sent from the instrument in response to a data request type command is as follows:
SP
X ........................... X
One byte of white space [ASCII 32].
A text (required value) consisting of a sign byte + [ASCII 43] or - [ASCII 45] followed by a block of "N" ASCII
characters (depending on the model) including the decimal point.
A "CR" [ASCII 13] end-of-message character.
If the command is of the command or parameter change type, the instrument does not send any response.
•
ISO 1745 PROTOCOL
The word format is 1 START bit, 7 DATA bits, 1 EVEN PARITY bit, and 1 STOP bit.
FORMAT OF THE MESSAGE TO SEND
A message from the master device must consist of the following sequence of characters:
SOH
D
d
STX
One SOH start-of-message byte [ASCII 01].
Two bytes corresponding the first to the tens and the second to the units of the address of the device to be inte-
rrogated.
One byte STX start of text [ASCII 02].
Two command bytes according to the function table
In case of parameter change commands, a block of N bytes corresponding to the numerical value including sign
and decimal point.
One ETX end of text byte [ASCII 03].
A control BCC byte calculated as follows:
Carry out an exclusive-OR of all the bytes included between the STX (not included) and the ETX (yes included).
- If the byte obtained in ASCII is greater than 32, it can be taken as BCC.
- If the result in ASCII is less than 32, the BCC control byte will be obtained by adding 32.
KOSMOS SERIE
C
X ........................... X
CR
C
C
X ...... X
ETX
www.ditel.es
CR
BCC
RS2
25