
3
CARLO GAVAZZI
CONTROLS
SERIAL COMMUNICATION PROTOCOL
UDM - USC
V1 R1
Page
1 SERIAL COMMUNICATION PROTOCOL
1.1 INTRODUCTION
UDM and USC can be equipped with a RS485 serial interface. It is possible to connect up to 255
instruments using MODBUS protocol.
The command structure of the protocol allows the user to read and write from/in the µP RAM
memory and the peripheral devices so that all the functions are completely transparent.
The communication parameters are in accordance with the following table:
Tab. 1-1
Interface Baud rate (bps) Parity Stop bit
RS485 4800, 9600, 19200, 38400
None 1
NOTE: please refer to the instruction manual for any detail on the instrument programming.
The communication can be started only by the HOST unit, which sends the request frame. Each
frame contains the following information:
• slave address: is a number from 1 to 255, which identifies the instrument connected to the
network. Address 0 (zero) is accepted (in write frames only) by all the instruments, which will
execute the relevant command but won’t send any answer frame.
• command: it defines the command type (e.g. read function, write function etc.).
• data fields: these numbers define the operating parameters of the command (e.g. the address of
the word, the value of the word to be written, etc.).
• CRC word: it allows detecting transmission errors that may occur. CRC calculation is carried out
by the MASTER unit once it has defined address, command and data fields. When the frame is
received by the SLAVE, it is stored in a temporary buffer. The CRC is calculated and then
compared with the received one. If they correspond and the address is recognised by the SLAVE
unit, the command is executed and an answer frame is sent.
If the CRC is not correct, the frame is discarded and no answer is sent.
1.2 FUNCTIONS
UDM and USC accept the following three commands:
• Read words (code 03h or 04h)
• Write one word (code 06h)
• Diagnostic function (code 08h)
Komentarze do niniejszej Instrukcji