INTRODUCTION
The DMG series power analyzers support the modbus protocol in the variants RTU, ASCII and TCP. The
protocols differ mainly in the structure of the messages, although the information content is equivalent,
and in some constraints which make them suitable for different communication buses.
RTU
Message structure:
Pause
Modbus node
Function
3,5 characters
1 byte
1 byte
Bit timing is critical, therefore the RTU variant is suitable for serial buses (RS485).
ASCII
Message structure:
Character
Modbus node
Function
:
2 chars
2 chars
The beginning and end of a message are marked by specific bytes and there are no time constraints, so
the ASCII variant is suitable for buses with non-deterministic timings (for example, modems).
TCP
Message structure:
Transaction ID
Protocol ID
2 bytes
00 00 (2 bytes)
The messages are marked by an identifier which lets the association between a specific query of the
master and the relevant response of the slave, therefore the TCP variant is suitable for buses in which
the sequence of messages is not guaranteed (ethernet).
PROTOCOL SPECIFICATIONS
Byte and word order: big endian (high word first, high byte first), except for CRC which is a little
endian (low byte first) register.
A maximum of 120 registers can be contained in the data.
Max connection number supported on Modbus TCP: 1 each physical communication port.
Supported functions:
Function
Query data content
0x03 (Read holding register)
Address (2 bytes)
0x04 (Read input register)
Register number R (2 bytes)
0x06 (Preset single register)
Address (2 bytes)
Register (2 bytes)
0x10 (Preset multiple
Address (2 bytes)
registers)
Register number R (2 bytes)
Registers (2R bytes)
0x11 (Slave ID)
-
Model code:
DMG7000: 0x70
DMG7500: 0x75
DMG8000: 0x80
DMG9000: 0x90
In the event of an error, the reply of the DMGs involves modifying the function code by raising the most
significant bit (for example, if the error occurs with function 0x04, the function code in the response is
0x84) and the data consists only of 1 byte for the exception code:
Error code
Description
0x01
Function is not valid
0x02
Address is not valid
0x03
Value is out of range
0x04
Operation not valid
0x06
Slave busy
Data
CRC16
2N bytes
2 bytes
Data
CRC16
2N chars
2 chars
Length
Modbus node
Function
2 bytes
1 byte
1 byte
Reply data content
Replied registers byte number (1 byte)
Registers (2R bytes)
Address (2 bytes)
Register (2 bytes)
Address (2 byte)
Writen bytes number
Replied registers byte number (1 byte)
Model code (1 byte)
Firmware revision (1 byte)
Hardware revision (1 byte)
Parameter revision (1 byte)
0x11
0x00
0x00
0x00
POWER ANALYZERS
Modbus manual
ANALIZZATORI DI RETE
Manuale modbus
DMG7000-7500-8000-9000
INTRODUZIONE
Gli analizzatori di rete della serie DMG supportano il protocollo modbus nelle tre varianti RTU, ASCII e
TCP. I tre protocolli si differenziano principalmente per la struttura dei messaggi, benché il contenuto
informativo sia equivalente, e per alcuni vincoli che li rendono adatti a diversi bus di comunicazione.
RTU
Struttura messaggio:
Pausa
Nodo modbus
Pause
3,5 caratteri
3,5 characters
La temporizzazione dei bit è fondamentale, perciò la variante RTU è adatta a bus seriali (RS485).
ASCII
Struttura messaggio:
Carattere
Nodo modbus
Characters
:
CR LF
variante ASCII è adatta a bus con tempistiche non deterministiche (ad esempio modem).
TCP
Struttura messaggio:
Data
ID transazione
ID protocollo
2 byte
00 00 (2 byte)
2N bytes
master e la risposta relativa dello slave, perciò la variante TCP è adatta a bus in cui non è garantita la
sequenza dei messaggi (ethernet).
SPECIFICHE PROTOCOLLO
Ordine byte e word: big endian (high word first, high byte first), tranne CRC che è un registro little
endian (low byte first).
Nei dati possono essere contenuti al massimo 120 registri.
Massimo numero di connessioni supportate su Modbus TCP: 1 ogni porta di comunicazione fisica.
Funzioni supportate:
Funzione
0x03 (Read holding register)
0x04 (Read input register)
0x06 (Preset single register)
0x10 (Preset multiple
registers)
0x11 (Slave ID)
Codice modello:
DMG7000: 0x70
DMG7500: 0x75
DMG8000: 0x80
DMG9000: 0x90
In caso di errore, la replica dei DMG prevede la modifica del codice funzione alzando il bit più
0x84) e i dati sono costituiti solo da 1 byte per il codice eccezione:
Codice errore
0x01
0x02
0x03
0x04
0x06
Funzione
Dati
1 byte
1 byte
2N byte
Funzione
Dati
2 char
2 char
2N char
Lunghezza
Nodo modbus
2 byte
1 byte
Contenuto Dati Query
Indirizzo (2 byte)
Numero registri R (2 byte)
Indirizzo (2 byte)
Registro (2 byte)
Indirizzo (2 byte)
Numero registri R (2 byte)
Registri (2R byte)
-
0x04, il codice funzione nella risposta è
Descrizione
Funzione non valida
Indirizzo non valido
Valore fuori range
Operazione non valida
Slave occupato
CRC16
Pausa
2 byte
3,5 caratteri
LRC
Caratteri
2 char
CR LF
Funzione
Dati
1 byte
2N byte
Contenuto Dati Reply
Numero byte registri restituiti (1 byte)
Registri (2R byte)
Indirizzo (2 byte)
Registro (2 byte)
Indirizzo (2 byte)
Numero byte scritti
Numero byte registri restituiti (1 byte)
Codice modello (1 byte)
Revisione firmware (1 byte)
Revisione hardware (1 byte)
Revisione parametri (1 byte)
0x11
0x00
0x00
0x00
Need help?
Do you have a question about the DMG7000 and is the answer not in the manual?
Questions and answers