![Esam E1200 Скачать руководство пользователя страница 15](http://html.mh-extra.com/html/esam/e1200/e1200_user-manual_2425208015.webp)
MANUALE D’USO / USER’S GUIDE
E1200
[email protected] www.esam.biz
page 15 - 16
rev. 1.07
0714
SOLUZIONE PROBLEMI DI COMUNICAZIONE /
COMMUNICATION TROUBLESHOOTING
L’interfaccia seriale RS485 è basata su una linea di
comunicazione differenziale bilanciata, impedenza tipica: 120
.
La lunghezza massima del collegamento non è definita ma
dipende dalla velocità comunicazione, dal rapporto segnale
disturbo, dalla qualità del cavo. Si fissa generalmente a 1200 metri
la lunghezza massima.
Si può usare cavo non schermato se la distanza è di qualche
metro in ambiente elettricamente poco “rumoroso”. Per distanze
comprese tra 15 e 100 metri è possibile usare un generico cavo
schermato e twistato, mentre per i collegamenti oltre 100 metri è
opportuno usare cavo di qualità, ad esempio CEAM CPR 6003 o
BELDEN 9841.
Lo schermo del cavo utilizzato dovrà essere collegato al morsetto
0 e messo a terra da un lato (preferibilmente lato master).
Quando Modbus su RS485 non funziona:
1) Provare con una rete Modbus semplice, un master e uno
slave: controllare il cablaggio sia corretto, ovvero che A, B e
0 del master siano collegati ai rispettivi A, B e 0 dello slave
2) Verificare che i parametri base di comunicazione del master
siano: 8 bit, 1 stop bit, bit di parità assente, e che il baud rate
sia lo stesso dello slave
3)
Verificare che l’indirizzo assegnato allo slave sia quello che il
master cerca di interrogare
4) Se si utilizza un convertitore RS232/485, verificare che si
commuti in ricezione prima che lo slave abbia iniziato ad
inviare la risposta
5) Se la rete smette di funzionare quando si aggiunge uno
slave, controllare che l’ultimo slave aggiunto non abbia A e B
invertiti o lo stesso indirizzo di un altro slave già collegato.
6) Le variabili float devono essere lette o scritte con un singolo
comando Modbus: non e’ possibile leggere o scrivere
“mezzo float”.
7) Per specifica del protocollo i registri Modbus (quelli scritti nel
manuale dello strumento) si contano a partire da 1, ma gli
indirizzi dei registri si contano da 0. Ciò significa che per
chiedere la variabile che si trova nel registro 100 sulla linea
seriale viaggia il numero 99. Il software dell’unita’ master
dovrebbe provvedere a inviare 99 quando gli si chiede il
registro 100, in modo che per l’utente tutto sia trasparente.
Se così non fosse impostare nel master il numero del registro
- 1 (cioè in questo esempio 99)
8)
L’analizzatore ESAM E1200 gestisce la richiesta di un blocco
di holding registers (modbus funzione 3) fino a un massimo
di 120 word (60 variabili float): gli indirizzi iniziale e finale non
devono cadere a metà di una variabile float.
9) Negli strumenti ESAM la scrittura in blocco di holding
registers (modbus funzione 16) e’ limitata a 2 word, ovvero
una variabile float
10)
Se si ricevono numeri senza senso, verificare che l’ordine in
cui lo slave invia le due word che compongono le variabili
float sia quello che il master sia aspetta. In caso contrario
impostare diversamente il master o lo slave.
11) In caso di malfunzionamento solo in campo, verificare che la
rete RS485 sia cablata a regola d’arte, soprattutto per
collegamenti di lunghezza elevata e con molti slave connessi:
usare doppino schermato di buona qualità, collegare la calza
al terminale 0 degli slave, mettere la calza a terra in un unico
punto, evitare diramazioni della linea e collegamenti “a
stella”, montare la resistenza di terminazione (120 ohm) ai
due estremi della linea.
The RS485 serial interface is based on a differential balanced
communication line with a typical impedance of 120 ohms.
The maximum achievable length of the link depends on
communication speed, signal to noise ratio and cable quality: it
is generally specified as 1200 meters.
An unshielded twisted pair can be used on short distances if the
electrical environment is not too noisy.
For distances between 15 and 100 meters any shielded twisted
pair will work, but for longer links a high quality low loss cable
like CEAN CPR 6003 or BELDEN 9841 is suggested.
The cable shield must be connected to the 0 terminals and
grounded at one point only (preferably on master side).
When Modbus on RS485 doesn’t work:
1) Try a simple Modbus network, just one master and one
slave: check wiring, that is master A, B, 0 terminals
properly connected to slave A, B, 0.
2) Check master communication parameters: they must be 8
data bits, 1 stop bit, no parity, baud rate the same of the
slave
3) Check if the address of the slave is the one the master is
trying to access.
4) If you are using a RS232/RS485 converter, verify that it
properly switches in receive mode before the slave starts
sending its reply.
5) If the network stops working when you add a slave, check
if the slave is properly wired and if its address is not the
same of another slave already connected
6) Floating point variables must be read and written with a
single Modbus command: it is not allowed to read or write
one half of a float.
7) According to Modbus specification, Modbus registers (that
is those listed on the instruction manual) are counted
starting from 1, while their addresses starts from 0. This
means that when you ask for register 100 the actual
number which the master must send on the line is 99. The
master should deal with this in a transparent way for the
user: if not, you have to modify master setup entering
register number - 1 (in this example 99)
8) ESAM E1200 implements Modbus function 3 (read holding
registers) up to a maximum of 120 words (60 floating point
variables): initial and final addresses of the block must not
be in the middle of a float.
9) ESAM instruments implement Modbus function 16 (preset
multiple registers) only for 2 words, that is 1 floating point
value.
10) If the master is receiving meaningless numbers, check if
the slave sends the two words of a float in the same order
as the master is expecting. If not change setup either in the
master or in the slave
11) If you experience network malfunctioning in field only,
verify the layout of the RS485 line. Use high quality
shielded pairs, always connect 0 terminals, ground the
shield in one point only, avoid line branches and star
topologies, put the 120 ohm termination resistance at the
ends of the line. All this is most important with long lines
and many slaves connected.