0% ont trouvé ce document utile (0 vote)
134 vues50 pages

Formation Interface Communication 30

Transféré par

kader boudi
Copyright
© © All Rights Reserved
Nous prenons très au sérieux les droits relatifs au contenu. Si vous pensez qu’il s’agit de votre contenu, signalez une atteinte au droit d’auteur ici.
Formats disponibles
Téléchargez aux formats PDF, TXT ou lisez en ligne sur Scribd
0% ont trouvé ce document utile (0 vote)
134 vues50 pages

Formation Interface Communication 30

Transféré par

kader boudi
Copyright
© © All Rights Reserved
Nous prenons très au sérieux les droits relatifs au contenu. Si vous pensez qu’il s’agit de votre contenu, signalez une atteinte au droit d’auteur ici.
Formats disponibles
Téléchargez aux formats PDF, TXT ou lisez en ligne sur Scribd

Y1959A FR 29-08-2006 16:06 Pagina 1

Modbus ®

Protocole de communication
Série Modbus®

Septembre 06
Y1959B
Y1959A FR 29-08-2006 16:06 Pagina 2
Y1959A FR 29-08-2006 16:06 Pagina 3

Table des matières

Protocole Modbus® . . . . . . . . . . . . . . . . . . . . 4
Configuration des paramètres de communication .. 4

Protocole Modbus® RTU . . . . . . . . . . . . . . . . . 5


Fonctions Modbus® prévues . . . . . . . . . . . . . . . . . 5
Fonction 04 - Read input register . . . . . . . . . . . . . 6
Fonction 06 - Preset single register . . . . . . . . . . . . 7
Fonction 07 - Read exception status . . . . . . . . . . . 7
Fonction 17 - Report esclaves ID . . . . . . . . . . . . . 8
Erreurs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Tableau 1 - Codes erreur . . . . . . . . . . . . . . . . . . 8

Protocole Modbus® ASCII . . . . . . . . . . . . . . . .


9
Calcul du CRC (CHECKSUM pour RTU) . . . . . . . . 10
Calcul du LRC (CHECKSUM pour ASCII) . . . . . . . 11

Tableaux des adresses . . . . . . . . . . . . . . . . 12


Tableau 2 - Mesures fournies par le protocole
de communication . . . . . . . . . . . . . . . 12
Tableau 3 - Bit généraux d’état . . . . . . . . . . . . . . 13
Tableau 4 - Commandes à distance . . . . . . . . . . . 16
Tableau 5 - Paramètres de Setup . . . . . . . . . . . . . 17

Connexion PC-Centrale (26 194) via RS-232 . 23

Connexion PC-Centrale (26 194) via RS-485 . 24

3
Y1959A FR 29-08-2006 16:06 Pagina 4

Protocole Modbus®

• La Centrale (26 194) supporte les protocoles de • En cas d’utilisation de l’interface RS-485, sur le
communication Modbus RTU® et Modbus ASCII® même bus (câble de connexion) peuvent être
sur les ports série RS-232 et RS-485. branchés plusieurs esclaves (appareils) qui doivent
• Grâce à cette fonction, il est possible de lire l’état avoir une adresse différente de toutes les autres.
des appareils et de les contrôler à l’aide de logi- • Le Maitre s’adresse à un esclave plutôt qu’à un
ciels dédiés, logiciels de supervision standard autre en utilisant l’adresse correspondante.
fournis par des tiers (SCADA) ou par l’intermédiai- • Le protocole RTU est de type binaire. Il est le plus
re d’appareillages dotés d’interface Modbus® tels utilisé et le plus rapide, la longueur des messages
que PLC et terminaux intelligents. étant inférieur de près de 50% comparé au proto-
• Il s’agit d’un protocole Maitre/esclave sur lequel le cole ASCII.
Maitre(généralement un PC) est le seul dispositif à • Le protocole ASCII est utilisé en présence de
pouvoir prendre l’initiative d’interroger les esclaves. modem ou d’autres appareillages qui ne permet-
• Lorsqu’ils sont interrogés, ces derniers répondent tent pas de garantir la rapidité nécessaire en
au Maitre selon des règles préétablies. Ils ne termes de transmission/réception.
génèrent jamais de messages de leur propre ini- • Pour qu’ils puissent dialoguer, Maitre et esclave
tiative mais restent en principe dans un état passif doivent être configurés avec les mêmes protocole,
dans l’attente d’être interrogés. vitesse, parité, etc.

Configuration des paramètres de communication


• Les paramètres relatifs au protocole de communication serie sont regroupés dans le menu P6 (voir tableau
ci-dessous).

Menu Interfaces Series


P6.01 B Adresse série RS-232 1…245 01
P6.02 B Vitesse (bauds) RS-232 240 = 2400 960
480 = 4800
960 = 9600
19.2 = 19200
38.4 = 38400
P6.03 B Protocole RS-232 Rtu = Modbus RTU RTU
ASC = Modbus ASCII
P6.04 B Parité RS-232 No = Aucune No
EVE = Even (paire)
Odd = Odd (impaire)
P6.05 Adresse Serie RS-485 1…245 01
P6.06 Vitesse (bauds) RS-485 240 = 2400 960
480 = 4800
960 = 9600
19.2 = 19200
38.4 = 38400
P6.07 Protocole RS-485 Rtu = Modbus RTU RTU
Les paramètres
ASC = Modbus ASCII
sur fond coloré
sont présents P6.08 Parité RS-485 No = Aucune No
uniquement sur la EVE = Even (paire)
version 26 194 Odd = Odd (impaire)

4
Y1959A FR 29-08-2006 16:06 Pagina 5

Protocole Modbus® RTU

En cas d’utilisation du protocole Modbus® RTU, la structure du message de communication est la suivante:

T1 T1
Adresse Fonction Données CRC
T2 T2
(8 bit) (8 bit) (N x 8 bit) (16 bit)
T3 T3

• Le champ Adresse contient l’adresse de l’instru- • Ceci permet, en présence d’interférences sur la ligne
ment esclave auquel le message est envoyé. Il est de transmission, d’ignorer le message transmis pour
théoriquement possible de connecter 245 appa- éviter les problèmes côté Maitre et côté esclave.
reils (esclaves). • La séquence T1 T2 T3 correspond à la durée pen-
• La champ Fonction contient le code de la fonction dant laquelle aucune donnée ne doit être échan-
que l’esclave doit exécuter. gée sur le bus de communication, pour permettre
• Le champ Données contient les données trans- aux instruments connectés de reconnaître la fin
mises à l’esclave ou celles envoyées par l’esclave d’un message et le début du suivant. Cette durée
comme réponse à une interrogation. doit être égale à 3,5 caractères.
• Pour la Centrale (26 194), la longueur maxi- • La Centrale (26 194) mesure la durée écoulée
mum admise pour le champ données est de 32 entre le réception d’un caractère et celle du carac-
registres de 16 bit (64 bytes). tère suivant: dans le cas où cette durée dépasse-
rait celle nécessaire à la transmission de 3,5
• Le champ CRC permet au Maitre et à l’esclave de
caractères, sur la base de la vitesse en bauds pro-
s’assurer de l’absence d’erreurs de transmission.
grammée, le caractère suivant est considéré
comme le début d’un nouveau message.

Fonctions Modbus® prévues


Les fonctions disponibles sur la Centrale (26 194) sont les suivantes:
04 = Read input register Permet la lecture des mesures disponibles sur la Centrale (26 194)
06 = Preset single register Permet de modifier les paramètres du setup et de transmettre des commandes
07 = Read exception Permet de lire líétat de l ’appareil
17 = Report esclaves ID Permet de lire des informations relatives à la version de l’appareil

Par exemple, pour lire depuis la Centrale (26 194) avec adresse 1 la valeur de tension L3 ligne principale
présente sur la position 6 (06 Hex), le message à transmettre est le suivant:
01 04 00 05 00 02 61 CA
Message dans lequel:
01 = adresse esclaves
04 = fonction de lecture position
00 05 = adresse de la position diminuée d’une unité, contenant la valeur de tension L3 ligne principale
00 02 = nombre de registres à lire à partir de l’adresse 06
61 CA = checksum CRC

La réponse de la Centrale (26 194) est la suivante:


01 04 04 00 00 00 E7 BB CE
Réponse dans laquelle:
01 = adresse de la Centrale (26 194) (Esclave 01)
04 = fonction requise par le Maitre
04 = nombre de byte envoyés par la Centrale (26 194)
00 00 00 E7 = valeur hexadécimale de tension L3 ligne principale = 231 VAC
BB CE = checksum CRC

5
Y1959A FR 29-08-2006 16:06 Pagina 6

Fonction 04 - Read input register


La fonction 04 permet de lire une ou plusieurs grandeurs consécutives en mémoire.
L’adresse de chaque grandeur est indiquée dans les Tableaux des dernières pages du présent manuel.
L’adresse indiquée dans le message doit être diminuée de 1 par rapport à celle effectivement présente dans
le tableau.
Si l’adresse requise est absente du tableau ou si le nombre de registres est supérieur à 32, la Centrale (26 194)
renvoie un message d’erreur (voir tableau erreurs).

Interrogation du Maitre Réponse de l’Esclave


Adresse esclave 01h Adresse esclave 01h
Fonction 04h Fonction 04h
MSB Adresse registre 00h Nombre de byte 10h
LSB Adresse registre 0Fh MSB Donnée 10h 00h
MSB Nombre registres 00h LSB Donnée 10h 00h
LSB Nombre registres 08h -------------------------------- ----
MSB CRC C1h MSB Donnée 17h 00h
LSB CRC CFh LSB Donnée 17h 00h
MSB CRC ---
L’exemple ci-dessus indique que sont demandés à
LSB CRC ---
l’esclave 18 registres consécutifs à partir de
l’adresse 10h.
La réponse est toujours constituée de l’adresse de
Sont par conséquent lus les registres 10h à 17h. La
l’esclave, de la fonction requise par le Maitre et des
commande se termine toujours par la valeur de
données des registres requis. La réponse se termine
checksum CRC.
toujours par la valeur de checksum CRC.

6
Y1959A FR 29-08-2006 16:06 Pagina 7

Fonction 06 - Preset single register


Cette fonction permet d’écrire sur les registres. Elle peut être utilisée uniquement avec les registres d’adresse
supérieure à 1000 Hex. Il est par exemple possible de configurer les paramètres du Setup. Dans le cas où
l’adresse configurée ne serait pas comprise entre la valeur minimum et la valeur maximum du tableau, la
Centrale (26 194) répond par un message d’erreur. Dans le cas où serait requis un paramètre à une adres-
se inexistante, en guise de réponse, est transmis un message d’erreur. L’adresse et l’intervalle valable pour les
différents paramètres figurent dans les Tableaux 5, 6 et 7.
La fonction 06 permet en outre d’exécuter des commandes (ainsi le passage de manuel à automatique et
vice-versa) en utilisant les adresses et les valeurs figurant dans le Tableau 4.

Interrogation Maitre Réponse Esclave


Adresse esclave 01h La réponse est un écho de l’interrogation, à savoir
que sont envoyées au Maitre l’adresse de la donnée
Fonction 06h
à modifier et la nouvelle valeur du paramètre.
MSB Adresse registre 31h
LSB Adresse registre 01h
MSB Donnée 00h
LSB Donnée 32h
MSB CRC 57h
LSB CRC 23h

L’exemple ci-dessus montre qu’est demandée la modi-


fication du paramètre P1.03 à l’adresse 3102 Hex
(Temps d’interblocage) avec la valeur 50 (5.0 sec).

Fonction 07 - Read exception status


Cette fonction permet de lire l’état dans lequel se trouve la Centrale (26 194).

Interrogation Maitre Réponse Esclave


Adresse esclave 01h Adresse esclave 01h
Fonction 07h Fonction 07h
MSB CRC 41h Byte Données 01h
LSB CRC E2h MSB CRC E3h
LSB CRC F0h

Le tableau suivant indique la signification du byte


envoyé par la Centrale (26 194) comme réponse:
Bit Signification
0 Mode fonctionnement Reset/Off
1 Mode fonctionnement Manuel
2 Mode fonctionnement Automatique
3 Alarme en cours

7
Y1959A FR 29-08-2006 16:06 Pagina 8

Fonction 17 - Report esclaves ID


Cette fonction permet d’identifier le type d’appareil et les révisions internes.

Interrogation Maitre Réponse Esclave


Adresse esclave 01h Adresse esclave 01h
Fonction 11h Fonction 11h
MSB CRC C0h Nombre de bytes 04h
LSB CRC 2Ch Donnée 1 (Type Centrale - 26 194)* 01h
Donnée 2 (Révision software) 00h
Donnée 3 (Révision hardware) 00h
Donnée 4 (Révision paramètres) 00h
MSB CRC F8h
LSB CRC BDh

* 00h = CENTRALE (26 194) BASE


* 01h = CENTRALE (26 194) COM

Erreurs
Dans le cas où l’esclave recevrait un message erroné, il en informe le Maitre en répondant par un message
constitué de la fonction requise en OR avec 80 Hex, suivie d’un code d’erreur.

Tableau 1 - Codes Erreur


Dans le tableau ci-dessous sont indiqués les codes d’erreur transmis au Maitre par l’esclave.

Code Erreur
01 Fonction non valable
02 Adresse registre erronée
03 Valeur du paramètre hors limite
04 Opération impossible
06 Esclave occupé, fonction momentanément non disponible

8
Y1959A FR 29-08-2006 16:06 Pagina 9

Protocole Modbus® ASCII

Le protocole Modbus® ASCII est généralement utilisé sur les applications qui nécessitent une communication
via modem.
Les fonctions et les adresses disponibles sont identiques à celles de la version RTU sauf que caractères trans-
mis sont en ASCII et que la fin du message n’est pas établie sur la base d’une durée mais en fonction des
caractères de retour à la ligne.
En cas de sélection depuis le menu du protocole Modbus® ASCII, la structure du message de communication
sur le port de communication correspondant est la suivante:

Adresse Fonction Données LRC


: CR LF
2 caractéres 2 caractéres (N caractéres) 2 caractéres

• Le début du message est indiqué par le caractère comme réponse à une interrogation. La longueur
‘:’ (ASCII 3Ah). maximum admise est de 32 registres consécutifs.
• Le champ Adresse contient l’adresse de l’appareil • Le champ CRC permet au Maitre et a l’esclave de
esclave auquel le message est envoyé. s’assurer de l’absence d’erreurs de transmission.
• Le champ Fonction contient le code de la fonction • Ceci permet, en présence d’interférences sur la ligne
que l’esclave doit exécuter. de transmission, d’ignorer le message transmis pour
• Le champ Données contient les données trans- éviter les problèmes côté Maitre et côté esclave.
mises a l’esclave ou celles envoyées par l’esclave • Le message se termine toujours par les caractères
de contrôle CRLF (0D 0A).

Exemple:
Pour lire depuis la Centrale (26 194) avec adresse 8 la valeur de tension instantanée équivalente présente
sur la position 04 (04 Hex), le message à envoyer est le suivant:
: 0 8 0 4 0 0 0 3 0 0 0 2 E F CR LF
Message dans lequel:
: = ASCII 3Ah - délimiteur début de message
08 = ASCII 30h 38h - adresse esclave
04 = ASCII 30h 34h - fonction de lecture position
00 03 = ASCII 30h 30h 30h 33h - adresse de la position diminuée d’une unité,
contenant la valeur de tension instantanée
00 02 = ASCII 30h 30h 30h 32h - nombre de registres à lire à partir de l’adresse 04
EF = ASCII 45h 46h - checksum LRC
CRLF = ASCII 0Dh 0Ah - délimiteur de fin de message

La réponse de la Centrale (26 194) est la suivante:


: 0 8 0 4 0 4 0 0 0 0 0 1 A 0 4 F CR LF
Réponse dans laquelle:
: = ASCII 3Ah - délimiteur début de message
08 = ASCII 30h 38h - adresse la Centrale (26 194) (Esclave 08)
04 = ASCII 30h 34h - fonction requise par le Maitre
04 = ASCII 30h 34h - nombre de byte envoyés par l’esclave
00 00 01 A0 = ASCII 30h 30h 30h 30h 30h 31h 41h 30h - valeur hexadécimale de tension
instantanée = 416 V
4F = ASCII 34h 46h - checksum LRC
CRLF = ASCII 0Dh 0Ah - délimiteur de fin de message

9
Y1959A FR 29-08-2006 16:06 Pagina 10

Calcul du CRC (CHECKSUM pour RTU)


Algorithme de calcul Exemple de calcul:
du CRC Message à transmettre = 0207h

Initialisation CRC 1111 1111 1111 1111


Charge 1° byte 0000 0010
Exécution xor avec 1° 1111 1111 1111 1101
Byte du frame
Hex FFFF = CRC
Exécution 1° shift à dx 0111 1111 1111 1110 1
Carry = 1, charge polynôme 1010 0000 0000 0001
Exécution xor avec le polynôme 1101 1111 1111 1111
CRC xor BYTE = CRC
Exécution 2° shift dx 0110 1111 1111 1111 1
Carry = 1, charge polynôme 1010 0000 0000 0001
n=0
Exécution xor avec le polynôme 1100 1111 1111 1110
Exécution 3° shift 0110 0111 1111 1111 0
Exécution 4° shift 0011 0011 1111 1111 1
CRC right shift
Carry = 1, charge polynôme 1010 0000 0000 0001
Exécution xor avec le polynôme 1001 0011 1111 1110
Exécution 5° shift dx 0100 1001 1111 1111 0
carry over
Exécution 6° shift dx 0010 0100 1111 1111 1
Carry = 1, charge polynôme 1010 0000 0000 0001
Exéc. xor avec polynôme 1000 0100 1111 1110
CRC xor POLY = CRC
Exécution 7° shift dx 0100 0010 0111 1111 0
Exécution 8° shift dx 0010 0001 0011 1111 1
Carry = 1, charge polynôme 1010 0000 0000 0001
n=n+1
Charge 2° byte du frame 0000 0111
Exécution xor avec le 1000 0001 0011 1001
n>7
no yes 2° byte du frame
Exécution premier shift dx 0100 0000 1001 1100 1
next BYTE Carry = 1, charge polynôme 1010 0000 0000 0001
Exécution xor avec le polynôme 1110 0000 1001 1101
Exécution 2° shift dx 0111 0000 0100 1110 1
end message
no
Carry = 1, charge polynôme 1010 0000 0000 0001
yes Exécution xor avec le polynôme 1101 0000 0100 1111
Exécution 3° shift dx 0110 1000 0010 0111 1
End
Carry = 1, charge polynôme 1010 0000 0000 0001
Exécution xor avec le polynôme 1100 1000 0010 0110
Exécution 4° shift dx 0110 0100 0001 0011 0
Exécution 5° shift dx 0010 0100 0000 1001 1
Carry = 1, charge polynôme 1010 0000 0000 0001
Exécution xor avec le polynôme 1001 0010 0000 1000
Exécution 6° shift dx 0100 1001 0000 0100 0
Exécution 7° shift dx 0010 0100 1000 0010 0
Note: Le byte 41h est envoyé Exécution 8° shift dx 0001 0010 0100 0001 0
en premier (y compris s’il s’agit Résultat CRC 0001 0010 0100 0001
du LSB), puis est transmis 12h
12h 41h

10
Y1959A FR 29-08-2006 16:06 Pagina 11

Calcul du LRC (CHECKSUM pour ASCII)


Exemple de calcul:
Adresse 01 00000010
Fonction 04 00000100
Démarrageaddress hi. 00 00000000
Démarrageaddress lo. 00 00000000
Nombre registres 08 00001000
Somme 00001100
Complément à 1 11110011
+1 00000001
Complément à 2 11110100
Résultat LRC F4

11
Y1959A FR 29-08-2006 16:06 Pagina 12

Tableaux des adresses

Tableau 2 - Mesures fournies par le protocole de communication


Adresses utilisables avec fonctions 03 et 04.
Adresse Mots Mesure Unité Format
02h 2 Tension de ligne principale L1-N VAC Unsigned long
04h 2 Tension de ligne principale L2-N VAC Unsigned long
06h 2 Tension de ligne principale L3-N VAC Unsigned long
08h 2 Tension de ligne principale L1-L2 VAC Unsigned long
0Ah 2 Tension de ligne principale L2-L3 VAC Unsigned long
0Ch 2 Tension de ligne principale L3-L1 VAC Unsigned long
0Eh 2 Tension de ligne secondaire L1-N VAC Unsigned long
10h 2 Tension de ligne secondaire L2-N VAC Unsigned long
12h 2 Tension de ligne secondaire L3-N VAC Unsigned long
14h 2 Tension de ligne secondaire L1-L2 VAC Unsigned long
16h 2 Tension de ligne secondaire L2-L3 VAC Unsigned long
18h 2 Tension de ligne secondaire L3-L1 VAC Unsigned long
1Ah 2 Fréquence ligne principale Hz / 10 Unsigned long
1Ch 2 Fréquence ligne secondaire Hz / 10 Unsigned long
1Eh 2 Tension de batterie VDC / 10 Unsigned long
20h 2 Temps total de fonctionnement de la Centrale (26 194) sec Unsigned long
22h 2 Temps total tension principale dans les limites sec Unsigned long
24h 2 Temps total tension ligne secondaire dans les limites sec Unsigned long
26h 2 Temps total tension ligne principale hors limites sec Unsigned long
28h 2 Temps total tension ligne secondaire hors limites sec Unsigned long
2Ah 2 Temps total interrupteur ligne principale fermé sec Unsigned long
2Ch 2 Temps total interrupteur ligne secondaire fermé sec Unsigned long
2Eh 2 Compteur mises sous tension appareil compteur Unsigned long
30h 2 Compteur nombre de fermetures interrupteur ligne principale compteur Unsigned long
32h 2 Compteur nombre de fermetures interrupteur ligne secondaire compteur Unsigned long
40h 2 État bit d’erreur* bits Unsigned long

* En lisant le mot à l’adresse 40h sont restitués 32 bit dont la signification est indiquée dans le tableau ci-dessous:

12
Y1959A FR 29-08-2006 16:06 Pagina 13

Bit Code Alarme


0 A01 Tension batterie trop basse
1 A02 Tension batterie trop élevée
2 A03 Timeout Interrupteur ligne principale
3 A04 Timeout Interrupteur ligne secondaire
4 A05 Séquence phase erronée ligne principale
5 A06 Séquence phase erronée ligne secondaire
6 A07 Timeout charge non alimenté
7 A08 Générateur non prêt
8 A09 Urgence
9 - (Libre)
10 A11 Fréquence ligne principale hors limite
11 A12 Fréquence ligne secondaire hors limite
12 A13 Asymétrie ligne principale
13 A14 Asymétrie ligne secondaire
14 - Interrupteur ligne principale déclenché
15 - Interrupteur ligne secondaire déclenché
16 - Interrupteur ligne principale non enclenché
17 - Interrupteur ligne secondaire non enclenché
18…31 - (Libre)

Tableau 3 - Bit généraux d’état


Adresses utilisables avec fonctions 03 et 04.
Adresse Mots Mesure Unité Format
2070h 1 État boutons clavier  bits Unsigned integer
2071h 1 État entrées numériques  bits Unsigned integer
2072h 1 État sorties a relais  bits Unsigned integer
2074h 1 État tension ligne principale  bits Unsigned integer
2075h 1 État interrupteur ligne principale  bits Unsigned integer
2076h 1 État tension ligne secondaire  bits Unsigned integer
2077h 1 État interrupteur ligne secondaire  bits Unsigned integer
2078h 1 État fonctions d’entrée  bits Unsigned integer
2079h 1 État fonctions de sortie  bits Unsigned integer

13
Y1959A FR 29-08-2006 16:06 Pagina 14

 En lisant le mot à l’adresse 2070h sont restitués 16 bit dont la signification est indiquée dans le tableau
ci-dessous:
Bit Touche Bit Touche
0 Ouvrir/Fermer ligne secondaire 5 Ouvrir/Fermer ligne principale
1 Reset 6 Sél. mesures secondaire
2 Man 7 Sél. mesures principale
3 Aut 8…15 (Libre)
4 Setup

 En lisant le mot à l’adresse 2071h sont restitués 16 bit dont la signification est indiquée dans le tableau
ci-dessous:
Bit Entrée Bit Entrée
0 Contact AUX ligne principale 5 Ligne secondaire non enclenché
1 Ligne principale déclenchée 6 Prog. 1
2 Ligne principale non enclenchée 7 Prog. 2
3 Contact AUX ligne secondaire 8…15 (Libre)
4 Ligne secondaire déclenchée

 En lisant le mot à l’adresse 2072h sont restitués 16 bit dont la signification est indiquée dans le tableau
ci-dessous:
Bit Sortie à relais Bit Sortie à relais
0 Ouvrir ligne principale 4 Prog. 1
1 Ouvrir ligne secondaire 5 Prog. 2
2 Fermer ligne principale 6 Prog. 3
3 Fermer ligne secondaire 7…15 (Libre)

 En lisant le mot à l’adresse 2074h (ligne principale) ou 2076h (ligne secondaire) sont restitués 16 bit
dont la signification est indiquée dans le tableau ci-dessous:
Bit État ligne Bit État ligne
0 Ligne dans les limites 7 Tension > maximum
1 Ligne ok 8 Tensions hors seuil asymétrie
2 Tension dans les limites 9 Tension < seuil absence phase
3 Tension ok 10 Fréquence < minimum
4 Fréquence dans les limites 11 Fréquence > maximum
5 Fréquence ok 12 Séquence phases erronée
6 Tension < minimum 13…15 (Libre)

14
Y1959A FR 29-08-2006 16:06 Pagina 15

 En lisant le mot à l’adresse 2075h (ligne principale) ou 2077h (ligne secondaire) sont restitués 16 bit
dont la signification est indiquée dans le tableau ci-dessous:
Bit État interrupteur Bit État interrupteur
0 Interrupteur fermé 4 Sortie commande fermeture
1 Alarme déclenchée 5 Sortie commande ouverture
2 Alarme non réarmée 6…15 (Libre)
3 État commandé (1 = fermé)

 En lisant le mot à l’adresse 2078h sont restitués 16 bit dont la signification est indiquée dans le tableau
ci-dessous:
Bit État fonctions entrée Bit État fonctions entrée
0 Interrupteur ligne principale fermée 8 Bouton arrêt d’urgence
1 Interrupteur ligne principale déclenché 9 Démarrage générateur
2 Interrupteur ligne principale non enclenché 10 Générateur prêt
3 Interrupteur ligne secondaire fermé 11 Blocage clavier
4 Interrupteur ligne secondaire déclenché 12 Blocage programmation
5 Interrupteur ligne secondaire non déclenché 13 Blocage contrôle à distance
6 Forçage sur ligne secondaire 14…15 (Libre)
7 Inhibition retour sur ligne principale

 En lisant le mot à l’adresse 2079h sont restitués 16 bit dont la signification est indiquée dans le tableau
ci-dessous:
Bit État fonctions sortie Bit État fonctions sortie
0 Ouverture ligne principale 5 Démarrage générateur
1 Ouverture ligne secondaire 6 Centrale (26 194) prête
2 Fermeture ligne principale 7 Load shed
3 Fermeture ligne secondaire 8…15 (Libre)
4 Alarme globale

15
Y1959A FR 29-08-2006 16:06 Pagina 16

Tableau 4 - Commandes à distance


Adresses utilisables avec fonction 06.
Adresse Mots Fonction Format
2F00h 1 Changement modalité opérative  Unsigned integer
2F01h 1 Reset appareil (warm boot)  Unsigned integer
2F02h 1 Rétablissement de tous les paramètres de setup par défaut  Unsigned integer
2F03h 1 Sauvegarde paramètres en mémoire EEPROM  Unsigned integer
2F04h 1 Remise à zéro de tous les compteurs du temps de travail  Unsigned integer
2F05h 1 Remise à zéro de tous les compteurs de manœuvres de travail  Unsigned integer

 Le tableau suivant indique les valeur à inscrire à l’adresse 2F00h pour obtenir les fonctions correspondantes:

Valeur Fonction
0 Passage à modalité RESET/OFF
1 Passage à modalité MAN
2 Passage à modalité AUT

 En inscrivant la valeur 0001h à l’adresse indiquée, on obtient l’exécution de la fonction.

 En inscrivant la valeur 00AAh à l’adresse indiquée, on obtient l’exécution de la fonction.

 Le tableau suivant indique les valeurs à inscrire à l’adresse 2F03h pour obtenir les fonctions correspondantes:

Valeur Fonction
1 Mémorisation des paramètres sur EEPROM uniquement
2 Mémorisation sur EEPROM suivie du reset de l’appareil
4 Mémorisation sur EEPROM suivie du reset de l’appareil

16
Y1959A FR 29-08-2006 16:06 Pagina 17

Tableau 5 - Paramètres de Setup


Adresses utilisables avec fonctions 04 et 06.
• Les configurations des paramètres de Setup peuvent de configuration (si OFF est vers le bas, trans-
être lues par le Maitre à l’aide de la fonction 04 ou mettre la valeur minimum de l’intervalle, différem-
inscrites sur l’esclave à l’aide de la fonction 06. ment la valeur maximum).
• L’adresse de chaque paramètre peut être calcu- • Si le type de paramètre est constitué d’une sélec-
lée comme suit: 3000h + 100h* numéro du tion de fonctions, la première fonction de la liste
groupe de paramètres (menu) + numéro du para- correspond à la valeur 0, la seconde à la valeur
mètre - 1. Par exemple P3.07 devient 3000h + 1 et ainsi de suite.
3*100h + 7 – 1 = 3306h. • La modification des paramètres doit toujours être
• La valeur numérique transmise est toujours un effectuée à partir de la Centrale (26 194) en
nombre entier. Dans le cas des paramètres confi- position RESET/OFF, y compris si le protocole
gurés avec virgule décimale, celle-ci est ignorée. accepte les commandes hors de cette modalité.
Par exemple, si P1.03 a la valeur 3,5 s, il est • Après modification d’un ou de plusieurs paramètres,
nécessaire de transmettre 35. pour rendre effectives les modifications, il est néces-
• Si le type de paramètre permet une configuration saire d’exécuter la commande de mémorisation sur
numérique + OFF, pour configurer sur OFF, trans- EEPROM et ensuite de procéder à la réinitialisation
mettre la valeur à l’une des limites de l’intervalle de l’appareil (voir tableau précédent).

Menu données nominales


Adresse Mots Paramètre Intervalle Format
Unsigned
3000h 1 P0.01 – Tension nominale de ligne 100…690
integer
Unsigned
3001h 1 P0.02 – Rapport TV 100…999
integer
0…2
0 = Triphasé Unsigned
3002h 1 P0.03 – Type de connexion
1 = Biphasé integer
2 = Monophasé
0…1
Unsigned
3003h 1 P0.05 – Fréquence nominale 0 = 50Hz
integer
1 = 60Hz
0…2
0 = OFF Unsigned
3004h 1 P0.06 – Tension nominale batterie
1 = 24 VDC integer
2 = 48 VDC

17
Y1959A FR 29-08-2006 16:06 Pagina 18

Menu données générales


Adresse Mots Paramètre Intervalle Format
0…1
Unsigned
3100h 1 P1.01 – Type d’application 0 = Utility-to-Generator
integer
1 = Utility-to-Utility
0…2
0 = OFF Unsigned
3101h 1 P1.02 – Contrôle séquence phase
1 = L1 L2 L3 integer
2 = L3 L2 L1
0…1
Unsigned
3102h 1 P1.05 – Contrôle interrupteurs 0 = Normale
integer
1 = Feedback
Unsigned
3103h 1 P1.06 – Temps timeout interrupteurs 1…900
integer
0…1
Unsigned
3104h 1 P1.07 – Habilitation entrées non enclenchées 0 = OFF
integer
1 = Validées
Unsigned
3105h 1 P1.08 – Temps timeout charge non alimentée 1…900
integer
Unsigned
3106h 1 P1.09 – Retard mise en marche générateur 0…900
integer
Unsigned
3107h 1 P1.10 – Temps refroidissement générateur 1…3600
integer
69…100 Unsigned
3108h 1 P1.11 – Tension minimum batterie
OFF = 69 integer
100…141 Unsigned
3109h 1 P1.12 – Tension maximum batterie
OFF = 141 integer
Unsigned
310Ah 1 P1.13 – Retard alarme batterie 0…60
integer

18
Y1959A FR 29-08-2006 16:06 Pagina 19

Menu ligne principale


Adresse Mots Paramètre Intervalle Format
Unsigned
3200h 1 P2.01 – Seuil tension minimum (décrochage) 70…98
integer
Unsigned
3201h 1 P2.02 – Seuil de tension minimum (rétablissement) 75…100
integer
Unsigned
3202h 1 P2.03 – Temps retard tension minimum 1…9000
integer
102…121 Unsigned
3203h 1 P2.04 – Seuil tension maximum (décrochage)
OFF = 121 integer
Unsigned
3204h 1 P2.05 – Seuil tension maximum (rétablissement) 100…115
integer
Unsigned
3205h 1 P2.06 – Temps retard tension maximum 1…9000
integer
59…85 Unsigned
3206h 1 P2.07 – Seuil absence phase
OFF = 59 integer
Unsigned
3207h 1 P2.08 – Temps retard absence phase 1…300
integer
1…21 Unsigned
3208h 1 P2.09 – Seuil asymétrie tensions
OFF = 21 integer
Unsigned
3209h 1 P2.10 – Temps retard asymétrie tensions 1…9000
integer
79…100 Unsigned
320Ah 1 P2.11 – Seuil fréquence minimum
OFF = 79 integer
Unsigned
320Bh 1 P2.12 – Temps retard fréquence minimum 1…9000
integer
100…121 Unsigned
320Ch 1 P2.13 – Seuil fréquence maximum
OFF = 121 integer
Unsigned
320Dh 1 P2.14 – Temps retard fréquence maximum 1…9000
integer
P2.15 – Temps présence tension ligne principale Unsigned
320Eh 1 1…3600
(quand int. ligne secondaire ouvert) integer
P2.16 – Temps présence tension ligne Unsigned
320Fh 1 1…3600
principale (quand int. ligne secondaire fermé) integer

19
Y1959A FR 29-08-2006 16:06 Pagina 20

Menu ligne secondaire


Adresse Mots Paramètre Intervalle Format
Unsigned
3300h 1 P3.01 – Seuil tension minimum (décrochage) 70…98
integer
Unsigned
3301h 1 P3.02 – Seuil de tension minimum (rétablissement) 75…100
integer
Unsigned
3302h 1 P3.03 – Temps retard tension minimum 1…9000
integer
102…121 Unsigned
3303h 1 P3.04 – Seuil tension maximum (décrochage)
OFF = 121 integer
Unsigned
3304h 1 P3.05 – Seuil tension maximum (rétablissement) 100…115
integer
Unsigned
3305h 1 P3.06 – Temps retard tension maximum 1…9000
integer
59…85 Unsigned
3306h 1 P3.07 – Seuil absence phase
OFF = 59 integer
Unsigned
3307h 1 P3.08 – Temps retard absence phase 1…300
integer
1…21 Unsigned
3308h 1 P3.09 – Seuil asymétrie tensions
OFF = 21 integer
Unsigned
3309h 1 P3.10 – Temps retard asymétrie tensions 1…9000
integer
79…100 Unsigned
330Ah 1 P3.11 – Seuil fréquence minimum
OFF = 79 integer
Unsigned
330Bh 1 P3.12 – Temps retard fréquence minimum 1…9000
integer
100…121 Unsigned
330Ch 1 P3.13 – Seuil fréquence maximum
OFF = 121 integer
Unsigned
330Dh 1 P3.14 – Temps retard fréquence maximum 1…9000
integer
P3.15 – Temps présence tension ligne principale Unsigned
330Eh 1 1…3600
(quand int. ligne secondaire ouvert) integer

20
Y1959A FR 29-08-2006 16:06 Pagina 21

Menu Entrées programmables


Adresse Mots Paramètre Intervalle Format
0…8
0 = OFF
1 = Forçage ligne secondaire
2 = Inhib. retour sur ligne principale
P4.01 – Fonction entrée 3 = Démarrage générateur Unsigned
3400h 1
programmable 1 4 = Urgence integer
5 = Générateur prêt
6 = Blocage clavier
7 = Blocage configurations
8 = Blocage contrôle à distance
0…8
0 = OFF
1 = Forçage ligne secondaire
2 = Inhib. retour sur ligne principale
P4.02 – Fonction entrée 3 = Démarrage générateur Unsigned
3401h 1
programmable 2 4 = Urgence integer
5 = Générateur prêt
6 = Blocage clavier
7 = Blocage configurations
8 = Blocage contrôle à distance

Menu Sorties programmables


Adresse Mots Paramètre Intervalle Format
0…6
0 = OFF
1 = Marche/Arret générateur
P05.01 – Fonction sortie 2 = Centrale (26 194) prête Unsigned
3500h 1
programmable 1 3 = Alarme générale integer
4 = Bobine minimum ligne principale
5 = Bobine minimum ligne secondaire
6 = Load shed
0…6
0 = OFF
1 = Marche/Arret générateur
P05.02 – Fonction sortie 2 = Centrale (26 194) prête Unsigned
3501h 1
programmable 2 3 = Alarme générale integer
4 = Bobine minimum ligne principale
5 = Bobine minimum ligne secondaire
6 = Load shed
0…6
0 = OFF
1 = Marche/Arret générateur
P05.03 – Fonction sortie 2 = Centrale (26 194) prête Unsigned
3502h 1
programmable 3 3 = Alarme générale integer
4 = Bobine minimum ligne principale
5 = Bobine minimum ligne secondaire
6 = Load shed

21
Y1959A FR 29-08-2006 16:06 Pagina 22

Menu Interface Serie*


Adresse Mots Paramètre Intervalle Format
Adresse série Centrale (26 194) esclaves Unsigned
3600h 1 0…245
(RS-232) integer
0…4
0 = 2400 bauds
1 = 4800 bauds Unsigned
3601h 1 Vitesse port série (RS-232)
2 = 9600 bauds integer
3 = 19200 bauds
4 = 38400 bauds
0…1
Unsigned
3602h 1 Protocole (RS-232) 0 = Modbus RTU
integer
1 = Modbus ASCII
0…2
0 = Aucune Unsigned
3603h 1 Contrôle parité (RS-232)
1 = Impaire (Odd) integer
2 = Paire (Even)
Adresse série Centrale (26 194) Unsigned
3604h 1 0…245
des esclaves (RS-485) integer
0…4
0 = 2400 baud
1 = 4800 baud Unsigned
3605h 1 Vitesse port série (RS-485)
2 = 9600 baud integer
3 = 19200 baud
4 = 38400 baud
0…1
Unsigned
3606h 1 Protocole (RS-485) 0 = Modbus RTU
integer
1 = Modbus ASCII
0…2
0 = Aucune Unsigned
3607h 1 Contrôle parité (RS-485)
1 = Impaire (Odd) integer
2 = Paire (Even)

* Pour ces paramètres, la modification des configurations de l’interface Serie en utilisant cette même interface Serie peut
entraîner une perte d’alignement Maitre/esclave et le blocage de la ligne de communication. Il est, par conséquent,
recommandé d’utiliser uniquement la fonction 04 (en lecture).

22
Y1959A FR 29-08-2006 16:06 Pagina 23

Connexion PC-Centrale (26 194) via RS-232

Centrale (26194)

PC

Câble 51C2
RJ6/6

RS232

23
Y1959A FR 29-08-2006 16:06 Pagina 24

Connexion PC-Centrale (26 194) via RS-485

Centrale (26 194) n Centrale (26 194) 01 PC

RS232

SG SG Câble
B B
51C4
A A
TR TR

PX1
RS485 RS485
RS232/RS485 CONV.
EIA-232 EIA-485/422

SG

SG
TR

TR
A

A
B

B
Câble pair tressé Câble pair tressé

L MAX= 1200m

24
Y1959A GB 29-08-2006 16:08 Pagina 25

Modbus ®

Modbus® serial Communication protocol

September 06
Y1959B
Y1959A GB 29-08-2006 16:08 Pagina 26
Y1959A GB 29-08-2006 16:08 Pagina 27

Contents

Modbus® Protocol . . . . . . . . . . . . . . . . . . . . . 28
Setting communication parameters . . . . . . . . . . . . 28

RTU Modbus® Protocol . . . . . . . . . . . . . . . . . . 29


Applied Modbus® Functions . . . . . . . . . . . . . . . . . 29
Function 04 - Read input registerr . . . . . . . . . . . . . 30
Function 06 - Preset single register . . . . . . . . . . . . 31
Function 07 - Read exception status . . . . . . . . . . . 31
Function 17 - Report slave ID . . . . . . . . . . . . . . . . 32
Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Table 1 - Error ID . . . . . . . . . . . . . . . . . . . . . . . . 32

Modbus® ASCII Protocol . . . . . . . . . . . . . . . . . 33


Calculation of the CRC (CHECKSUM for RTU) . . . . 34
Calculation of the LRC (CHECKSUM for ASCII) . . . . 35

Address tables . . . . . . . . . . . . . . . . . . . . . . . 36
Table 2 - Measurements provided
by the communication protocol . . . . . . . . 36
Table 3 - General status Bit . . . . . . . . . . . . . . . . . 37
Table 4 - Remote controls . . . . . . . . . . . . . . . . . . 40
Table 5 - Setup parameters . . . . . . . . . . . . . . . . . 41

PC-UNIT connection via RS-232 . . . . . . . . . . . 47

PC-UNIT connection via RS-485 . . . . . . . . . . . 48

27
Y1959A GB 29-08-2006 16:08 Pagina 28

Modbus® Protocol

• The Unit supports the Modbus RTU® and Modbus • When working with the RS-485 interface, on the
ASCII® communication protocols on the RS-232 same bus (connecting cable), several slaves
and RS-485 serial ports. (apparatuses) can be connected which must
• Thanks to this function, it is possible to read the have a unique address, that is, different from all
status of the apparatuses and control them using the others.
specific software, standard supervision software • The Master communicates with one slave rather
provided by third parties (SCADA) or using appa- than another using the relative address.
ratuses equipped with a Modbus® interface such • The RTU protocol is of the binary type. This is the
as a PLC and intelligent terminals. most widespread and the quickest, with a message
• It is a Master-Slave protocol, where the Master length less than almost 50% compared to the ASCII
(usually a PC) is the only device that can take the protocol.
initiative to interrogate the slaves. • The ASCII protocol is used when one works with
• When they are interrogated, they reply to the mas- a modem or other apparatus that cannot guaran-
ter according to pre-set rules. They never create tee transmission/reception speed.
messages of their own initiative and normally • In order to communicate with each other, the mas-
remain passive as they wait to be interrogated. ter and all the slaves must have the same protocol
setting, speed, parity, etc.

Setting communication parameters


• The parameters regarding the serial communication protocol are grouped together in the P6 menu, shown
in the table below.

Serial Interface Menu


P6.01 B RS-232 Serial address 1…245 01
P6.02 B RS-232 Baudrate 240 = 2400 960
480 = 4800
960 = 9600
19.2 = 19200
38.4 = 38400
P6.03 B RS-232 Protocol Rtu = Modbus RTU RTU
ASC = Modbus ASCII
P6.04 B RS-232 Parity No = None No
EVE = Even
Odd = Odd
P6.05 RS-485 Serial address 1…245 01
P6.06 RS-485 Baudrate 240 = 2400 960
480 = 4800
960 = 9600
19.2 = 19200
38.4 = 38400
P6.07 RS-485 Protocol Rtu = Modbus RTU RTU
The highlighted
ASC = Modbus ASCII
parameters
are included P6.08 RS-485 Parity No = None No
only in version EVE = Even
26 194 Odd = Odd

28
Y1959A GB 29-08-2006 16:08 Pagina 29

RTU Modbus® Protocol

When using the RTU Modbus® protocol, the communication message structure is as follows:

T1 T1
Address Function Data CRC
T2 T2
(8 bit) (8 bit) (N x 8 bit) (16 bit)
T3 T3

• The address field contains the address of the slave • In the event of interference on the transmission
instrument to which the message is being sent. In line, this allows one to ignore the message sent in
theory, one can connect up to a maximum of 245 order to prevent problems both on the master and
apparatuses (slaves). slave side.
• The Function field contains the function ID that has • The T1 T2 T3 sequence corresponds to the time
to be carried out by the slave. during which data must not be exchanged on the
• The Data field contains the data sent to the slave communication bus in order to allow the connect-
or the data sent by the slave as a response to a ed instruments to identify the end of one message
question. and the beginning of the next one. This time
should be 3.5 characters.
• As for the unit, the maximum permitted length for
the data field is 32, 16 bit registers (64 bytes). • The unit measures the time between the reception
of one character and the next one and if it
• The CRC field permits both the master and slave
exceeds the time needed to transmit 3.5 charac-
to check whether there are transmission errors.
ters, referring to the set baud rate, the next char-
acter is read as the beginning of a new message.

Applied Modbus® Functions


The functions available on the electronic control box are:
04 = Read input register Allows one to read the measurements available in the Unit
06 = Preset single register Allows one to change the set-up parameters and send commands
07 = Read exception Allows one to read the state of the apparatus
17 = Report slave ID Allows one to read information regarding the version of the apparatus

For example, if one wishes to read the main line L3 voltage value found in location 6 (06 Hex) with address
1 from the unit, this is the message to send:
01 04 00 05 00 02 61 CA
Where:
01 = slave address
04 = location reading function
00 05 = location address reduced by one unit, containing the L3 main line voltage valuen
00 02 = number of registers to be read starting from the 06 address
61 CA = checksum CRC

The following is the response of the unit:


01 04 04 00 00 00 E7 BB CE
Where:
01 = unit address (Slave 01)
04 = function requested by the Master
04 = number of bytes sent from Unit
00 00 00 E7 = hexadecimal value of voltage on L3 main line = 231 VAC
BB CE = checksum CRC

29
Y1959A GB 29-08-2006 16:08 Pagina 30

Function 04 - Read input register


The 04 function allows one to read one or more consecutive sizes in the memory.
The address of each size is shown in the Tables shown in the last few pages of this manual.
According to the Modbus® standards, the address specified in the message should be reduced by 1 compared
to the one actually shown in the table.
If the address requested is not included in the table or if the number of registers requested is greater than 32,
the Unit will send back an error message (see error table).

Master Request Slave Response


Slave address 01h Slave address 01h
Function 04h Function 04h
MSB register address 00h Number of bytes 10h
LSB register address 0Fh MSB 10h Data 00h
MSB register number 00h LSB 10h Data 00h
LSB register number 08h -------------------------------- ----
MSB CRC C1h MSB 17h Data 00h
LSB CRC CFh LSB 17h Data 00h
MSB CRC ---
In the example, 8 consecutive registers are request-
LSB CRC ---
ed from slave number 1, starting from address 10h.
Thus the registers are read from 10h to 17h. The
The response is always made up of the slave
command always ends with the CRC checksum
address, the function requested by the Master and
value.
data from the requested registers. The response
always ends with the CRC checksum value.

30
Y1959A GB 29-08-2006 16:08 Pagina 31

Function 06 - Preset single register


This function allows one to write in the registers. This can only be used with address registers greater than
1000 Hex. It is, for example, possible to set the set-up parameters. If the set value does not falls within the
minimum and maximum value of the table, the Unit will send back an error message. If a parameter is request-
ed from a non-existent address, an error message will be sent back. The address and valid range for the var-
ious parameters can be found in Tables 5, 6 and 7.
With the 06 function, it is also possible to execute commands (such as changing from manual to automatic
and vice versa) using the addresses and values shown in Table 4.

Master Request Slave Answer


Slave address 01h The response is an echo of the question, that is, the
address of the data to be changed and the new
Function 06h
parameter value is sent to the master.
MSB register address 31h
LSB register address 01h
MSB Data 00h
LSB Data 32h
MSB CRC 57h
LSB CRC 23h

In the example, a request is made to change the


P1.03 parameter to the address 3102 Hex
(Interlocking Time) with a value of 50 (5.0 sec.).

Function 07 - Read exception status


This function allows one to read the status of the Unit.

Master Request Slave Answer


Slave address 01h Slave address 01h
Function 07h Function 07h
MSB CRC 41h Data Bytes 01h
LSB CRC E2h MSB CRC E3h
LSB CRC F0h

The following table shows the meaning of the byte


sent by the Unit as a response:
Bit Meaning
0 Reset/Off operating mode
1 Manual operating mode
2 Automatic operating mode
3 Alarm in progress

31
Y1959A GB 29-08-2006 16:08 Pagina 32

Function 17 - Report slave ID


This function allows one to identify the kind of apparatus and internal revisions.

Master Request Slave Answer


Slave address 01h Slave address 01h
Function 11h Function 11h
MSB CRC C0h Number of bytes 04h
LSB CRC 2Ch Data 1 (Type of Unit)* 01h
Data 2 (Software revision) 00h
Data 3 (Hardware revision) 00h
Data 4 (Parameter revision) 00h
MSB CRC F8h
LSB CRC BDh

* 00h = BASIC UNIT - 01h = COM UNIT

Errors
Should the slave receive an incorrect message, it will inform the master of this condition by replying with a
message made-up by the function requested in OR with 80 Hex, followed by an error ID.

Table 1 - Error ID
The following table contains the error codes sent to the master by the slave.

Code Error
01 Invalid function
02 Illegal register address
03 Parameter value off range
04 Unable to complete operation
06 Slave busy, function temporarily unavailable

32
Y1959A GB 29-08-2006 16:08 Pagina 33

Modbus® ASCII Protocol

The Modbus® ASCII protocol is normally used in applications that need to communicate via modem.
The functions and addresses available are the same as the RTU version, but the characters transmitted are in
ASCII and the termination of the message is not done via the time but with return characters.
If the Modbus® ASCII protocol is selected from the menu, the structure of the communication message on its
communication port is as follows:

Address Function Data LRC


: CR LF
2 chars 2 chars (N chars) 2 chars

• The beginning of the message is shown with the • The LRC field permits both the master and slave to
‘:’ character (ASCII 3Ah). check whether there are transmission errors.
• The address field contains the address of the slave • In the event of interference on the transmission
instrument to which the message is being sent. line, this allows one to ignore the message sent in
• The Function field contains the function ID that has order to prevent problems both on the master and
to be carried out by the slave. slave side.
• The Data field contains the data sent to the slave • The message always ends with the control charac-
or the data sent by the slave as an answer to a ters CRLF (0D 0A).
question. The maximum length allowed is 32 con-
secutive registers.

Example:
For example, if one wishes to read the equivalent line voltage value found in location 04 (04 Hex) with
address 8 from the Unit, this is the message to send:
: 0 8 0 4 0 0 0 3 0 0 0 2 E F CR LF
Where:
: =ASCII 3Ah - marker at beginning of the message
08 =ASCII 30h 38h - slave address
04 =ASCII 30h 34h - location reading function
00 03 = ASCII 30h 30h 30h 33h - location address reduced by one unit,
containing the voltage value
00 02 = ASCII 30h 30h 30h 32h - number of registers to be read starting from the 04 address
EF = ASCII 45h 46h - checksum LRC
CRLF = ASCII 0Dh 0Ah - marker at end of message

The following is the answer of the unit:


: 0 8 0 4 0 4 0 0 0 0 0 1 A 0 4 F CR LF
Where:
: = ASCII 3Ah - marker at beginning of the message
08 = ASCII 30h 38h - unit address (Slave 08)
04 = ASCII 30h 34h - function requested by Master
04 = ASCII 30h 34h - number of bytes sent by slave
00 00 01 A0 = ASCII 30h 30h 30h 30h 30h 31h 41h 30h - hexadecimal value of equivalent voltage
line = 416 V
4F = ASCII 34h 46h - checksum LRC
CRLF = ASCII 0Dh 0Ah - marker at end of message

33
Y1959A GB 29-08-2006 16:08 Pagina 34

Calculation of the CRC (CHECKSUM for RTU)


Calculation algorithm Calculation example:
of the CRC Message to be sent = 0207h

CRC Initialisation 1111 1111 1111 1111


Load first byte 0000 0010
Executes xor with the first 1111 1111 1111 1101
Byte of the frame
Hex FFFF = CRC
Executes first shift to the right 0111 1111 1111 1110 1
Carry = 1, polynomial load 1010 0000 0000 0001
Executes xor with the polynomial 1101 1111 1111 1111
CRC xor BYTE = CRC
Executes second shift to the right 0110 1111 1111 1111 1
Carry = 1, polynomial load 1010 0000 0000 0001
n=0
Executes xor with the polynomial 1100 1111 1111 1110
Executes the third shift 0110 0111 1111 1111 0
Executes the fourth shift 0011 0011 1111 1111 1
CRC right shift
Carry = 1, polynomial load 1010 0000 0000 0001
Executes xor with the polynomial 1001 0011 1111 1110
Executes fifth shift to the right 0100 1001 1111 1111 0
carry over
Executes sixth shift to the right 0010 0100 1111 1111 1
Carry = 1, polynomial load 1010 0000 0000 0001
Executes xor with the polynomial 1000 0100 1111 1110
CRC xor POLY = CRC
Executes seventh shift to the right 0100 0010 0111 1111 0
Executes eight shift to the right 0010 0001 0011 1111 1
Carry = 1, polynomial load 1010 0000 0000 0001
n=n+1
Load second byte of the frame 0000 0111
Executes xor with the 1000 0001 0011 1001
n>7
no yes Second byte of the frame
Executes first shift to the right 0100 0000 1001 1100 1
next BYTE Carry = 1, polynomial load 1010 0000 0000 0001
Executes xor with the polynominal 1110 0000 1001 1101
Executes second shift to the right 0111 0000 0100 1110 1
end message
no
Carry = 1, polynomial load 1010 0000 0000 0001
yes Executes xor with the polynominal 1101 0000 0100 1111
Executes third shift to the right 0110 1000 0010 0111 1
End
Carry = 1, polynomial load 1010 0000 0000 0001
Executes xor with the polynominal 1100 1000 0010 0110
Executes the fourth shift to the right 0110 0100 0001 0011 0
Executes fifth shift to the right 0010 0100 0000 1001 1
Carry = 1, polynomial load 1010 0000 0000 0001
Executes xor with the polynominal 1001 0010 0000 1000
Executes sixth shift to the right 0100 1001 0000 0100 0
Executes seventh shift to the right 0010 0100 1000 0010 0
Note: The 41h byte is sent Executes eight shift to the right 0001 0010 0100 0001 0
first (even though it is the LSB), CRC result 0001 0010 0100 0001
then the 12h is sent.
12h 41h

34
Y1959A GB 29-08-2006 16:08 Pagina 35

Calculation of the LRC (CHECKSUM for ASCII)


Calculation example:
Address 01 00000010
Function 04 00000100
Start address hi. 00 00000000
Start address lo. 00 00000000
Number of registers 08 00001000
Sum 00001100
Complement to 1 11110011
+1 00000001
Complement to 2 11110100
LRC result F4

35
Y1959A GB 29-08-2006 16:08 Pagina 36

Address tables

Table 2 - Measurements provided by the communication protocol


Addresses that can be used with functions 03 and 04.
Address Words Measurement Unit Format
02h 2 L1-N main line voltage VAC Unsigned long
04h 2 L2-N main line voltage VAC Unsigned long
06h 2 L3-N main line voltage VAC Unsigned long
08h 2 L1-L2 main line voltage VAC Unsigned long
0Ah 2 L2-L3 main line voltage VAC Unsigned long
0Ch 2 L3-L1 main line voltage VAC Unsigned long
0Eh 2 L1-N secondary line voltage VAC Unsigned long
10h 2 L2-N secondary line voltage VAC Unsigned long
12h 2 L3-N secondary line voltage VAC Unsigned long
14h 2 L1-L2 secondary line voltage VAC Unsigned long
16h 2 L2-L3 secondary line voltage VAC Unsigned long
18h 2 L3-L1 secondary line voltage VAC Unsigned long
1Ah 2 Main line frequency Hz / 10 Unsigned long
1Ch 2 Secondary line frequency Hz / 10 Unsigned long
1Eh 2 Battery voltage VDC / 10 Unsigned long
20h 2 Overall time of Unit functioning sec Unsigned long
22h 2 Overall time of main voltage within the limits sec Unsigned long
24h 2 Overall time of secondary voltage within the limits sec Unsigned long
26h 2 Overall time of main voltage outside the limits sec Unsigned long
28h 2 Overall time of secondary voltage outside the limits sec Unsigned long
2Ah 2 Overall time of main line circuit breaker closed sec Unsigned long
2Ch 2 Overall time of secondary line circuit breaker closed sec Unsigned long
2Eh 2 Meter for charging the apparatus meter Unsigned long
30h 2 Meter for number of closures on main circuit breaker meter Unsigned long
32h 2 Meter for number of closures on secondary circuit breaker meter Unsigned long
40h 2 Status of error bit* bits Unsigned long

* The words in the address 40h, 32 bits are sent back with meaning as shown in the table:

36
Y1959A GB 29-08-2006 16:08 Pagina 37

Bit Code Alarm


0 A01 Battery voltage too low
1 A02 Battery voltage too high
2 A03 Main line circuit breaker timeout
3 A04 Secondary line circuit breaker timeout
4 A05 Main line incorrect phase sequence
5 A06 Secondary line incorrect phase sequence
6 A07 Timeout load not powered
7 A08 Generator not ready
8 A09 Emergency
9 - (Free)
10 A11 Main line frequency outside limits
11 A12 Secondary line frequency outside limits
12 A13 Main line asymmetry
13 A14 Secondary line asymmetry
14 - Main circuit breaker tripped
15 - Secondary circuit breaker tripped
16 - Main circuit breaker withdrawn
17 - Secondary circuit breaker withdrawn
18…31 - (Free)

Table 3 - General status Bit


Addresses that can be used with functions 03 and 04.
Address Words Measurement Unit Format
2070h 1 Status of keys on keyboard  bits Unsigned integer
2071h 1 Status of digital inputs  bits Unsigned integer
2072h 1 Status of relay outputs  bits Unsigned integer
2074h 1 Status of main line voltage  bits Unsigned integer
2075h 1 Status of main line circuit breaker  bits Unsigned integer
2076h 1 Status of secondary line voltage  bits Unsigned integer
2077h 1 Status of secondary line circuit breaker  bits Unsigned integer
2078h 1 Status of input functions  bits Unsigned integer
2079h 1 Status of output functions  bits Unsigned integer

37
Y1959A GB 29-08-2006 16:08 Pagina 38

 Reading the words in address 2070h, 16 bits are sent back with meaning as shown in the table:

Bit Key Bit Key


0 On/Off secondary 5 On/Off main
1 Reset mode 6 Sel. secondary measurements
2 Man. mode 7 Sel. main measurements
3 Aut. mode 8…15 (Free)
4 Setup

 Reading the words in address 2071h, 16 bits are sent back with meaning as shown in the table:

Bit Input Bit Input


0 Main AUX contact 5 Secondary Withdrawn
1 Main Trip 6 Prog. 1
2 Main Withdrawn 7 Prog. 2
3 Secondary AUX contact 8…15 (Free)
4 Secondary Trip

 Reading the words in address 2072h, 16 bits are sent back with meaning as shown in the table:

Bit Relay output Bit Relay output


0 Open Main 4 Prog. 1
1 Open Secondary 5 Prog. 2
2 Close Main 6 Global alarm - Prog. 3
3 Close Secondary 7…15 (Free)

 Reading the words in address 2074h (main) or 2076h (sec.), 16 bits are sent back with meaning as
shown in the table:
Bit Line status Bit Line status
0 Line within the limits 7 Voltage > maximum
1 Line ok 8 Voltage outside asymmetry threshold
2 Voltage within the limits 9 Voltage < missed phase threshold
3 Voltage ok 10 Frequency < minimum
4 Frequency within the limits 11 Frequency > maximum
5 Frequency ok 12 Incorrect phase sequence
6 Voltage < minimum 13…15 (Free)

38
Y1959A GB 29-08-2006 16:08 Pagina 39

 Reading the words in address 2075h (main) or 2077h (sec.), 16 bits are sent back with meaning as
shown in the table:
Bit Circuit breaker status Bit Circuit breaker status
0 Circuit breaker closed 4 Output control closure
1 Trip alarm 5 Output control opening
2 Withdrawn Alarm 6…15 (Free)
3 Controlled status (1 = closed)

 Reading the word in address 2078h, 16 bits are sent back with meaning as shown in the table:

Bit Status of input functions Bit Status of input functions


0 Main circuit breaker closed 8 Emergency pushbutton
1 Main circuit breaker tripped 9 Start generator
2 Main circuit breaker withdrawn 10 Generator ready
3 Secondary circuit breaker closed 11 Lock keyboard
4 Secondary circuit breaker tripped 12 Lock programming
5 Secondary circuit breaker withdrawn 13 Lock remote control
6 Strain on secondary line 14…15 (Free)
7 Inhibition return on main

 Reading the word in address 2079h, 16 bits are sent back with meaning as shown in the table:

Bit Status of output functions Bit Status of output functions


0 Main opening 5 Start generato
1 Secondary opening 6 Unit read
2 Main closure 7 Load shed
3 Secondary closure 8…15 (Free)
4 Global alarm

39
Y1959A GB 29-08-2006 16:08 Pagina 40

Table 4 - Remote controls


Addresses that can be used with function 06.
Address Words Function Format
2F00h 1 Change operating mode  Unsigned integer
2F01h 1 Reset apparatus (warm boot)  Unsigned integer
2F02h 1 Reset all the setup parameters to default  Unsigned integer
2F03h 1 Saving of EEPROM memory parameters  Unsigned integer
2F04h 1 Resetting all the work time meters  Unsigned integer
2F05h 1 Resetting all the work manoeuvre meters  Unsigned integer

 The following table shows the values to be written in address 2F00h to obtain the corresponding functions:

Value Function
0 Move to reset mode
1 Move to manual mode
2 Move to automatic mode

 The function is executed by writing the value 0001h to the specified address.

 The function is executed by writing the value 00AAh to the specified address.

 The following table shows the values to be written in address 2F03h to obtain the corresponding functions:

Value Function
1 Only parameter recording in EERPOM
2 Recording in EEPROM and subsequent reset of apparatus
4 Recording in EEPROM and subsequent reset of apparatus

40
Y1959A GB 29-08-2006 16:08 Pagina 41

Table 5 - Setup parameters


Addresses that can be used with functions 04 and 06.
• The setting of the setup parameters can be read the bottom, then transmit minimum value of the
by the master using the 04 function or written in range, otherwise the maximum value).
the slave using the 06 function. • If the type of parameter is made up of a selection
• The address of each parameter can be calculat- of functions, then the first function on the list will
ed as follows: 3000h + 100h* number of correspond to the value 0, the second with the
group of parameters (menu) + number of param- value 1 and so on.
eter - 1. For example P3.07 will become 3000h • Change to the parameters should always be done
+ 3*100h + 7 – 1 = 3306h. by starting from the Unit in reset mode, even if the
• The numerical value that is transmitted is always a protocol accepts the commands even outside this
whole number. Parameters that are set with a dec- mode.
imal point, should be ignored. For example, if • After one or more parameters have been
P1.03 is set at 3.5, one needs to transmit 35. changed, to make the changes effective, one must
• If the type of parameter allows for a numerical set- apply the recording command in EEPROM and
ting + OFF, to set at OFF, transmit the value to one then the Reset apparatus (see previous table).
of the ends of the setting range (if OFF is towards

Menu of nominal data


Address Words Parameter Range Format
Unsigned
3000h 1 P0.01 – Nominal line voltage 100…690
integer
Unsigned
3001h 1 P0.02 – TV Report 100…999
integer
0…2
0 = Three stage Unsigned
3002h 1 P0.03 – Type of connection
1 = Double stage integer
2 = Single stage
0…1
Unsigned
3003h 1 P0.05 – Nominal frequency 0 = 50Hz
integer
1 = 60Hz
0…2
0 = OFF Unsigned
3004h 1 P0.06 – Nominal battery voltage
1 = 24 VDC integer
2 = 48 VDC

41
Y1959A GB 29-08-2006 16:08 Pagina 42

Menu of general data


Address Words Parameter Range Format
0…1
Unsigned
3100h 1 P1.01 – Type of application 0 = Utility-to-Generator
integer
1 = Utility-to-Utility
0…2
0 = OFF Unsigned
3101h 1 P1.02 – Control of sequence stage
1 = L1 L2 L3 integer
2 = L3 L2 L1
0…1
Unsigned
3102h 1 P1.05 – Circuit breaker control 0 = Normal
integer
1 = Feedback
Unsigned
3103h 1 P1.06 – Timeout time circuit breakeres 1…900
integer
0…1
Unsigned
3104h 1 P1.07 – Activation of withdrawn inputs 0 = OFF
integer
1 = Activated
Unsigned
3105h 1 P1.08 – Timeout time load not powered 1…900
integer
Unsigned
3106h 1 P1.09 – Delay in starting up the generator 0…900
integer
Unsigned
3107h 1 P1.10 – Generator cooling time 1…3600
integer
69…100 Unsigned
3108h 1 P1.11 – Minimum battery voltage
OFF = 69 integer
100…141 Unsigned
3109h 1 P1.12 – Maximum battery voltage
OFF = 141 integer
Unsigned
310Ah 1 P1.13 – Delay in battery alarm 0…60
integer

42
Y1959A GB 29-08-2006 16:08 Pagina 43

Menu of Main line


Address Words Parameter Range Format
Unsigned
3200h 1 P2.01 – Threshold of minimum voltage (release) 70…98
integer
Unsigned
3201h 1 P2.02 – Threshold of minimum voltage (reset) 75…100
integer
Unsigned
3202h 1 P2.03 – Delay time on minimum voltage 1…9000
integer
102…121 Unsigned
3203h 1 P2.04 – Threshold of maximum voltage (release)
OFF = 121 integer
Unsigned
3204h 1 P2.05 – Threshold of maximum voltage (reset) 100…115
integer
Unsigned
3205h 1 P2.06 – Delay time on maximum voltage 1…9000
integer
59…85 Unsigned
3206h 1 P2.07 – Threshold of missing stage
OFF = 59 integer
Unsigned
3207h 1 P2.08 – Time delay of missing stage 1…300
integer
1…21 Unsigned
3208h 1 P2.09 – Threshold of asymmetrical voltage
OFF = 21 integer
Unsigned
3209h 1 P2.10 – Time delay on asymmetrical voltage 1…9000
integer
79…100 Unsigned
320Ah 1 P2.11 – Threshold of minimum frequency
OFF = 79 integer
Unsigned
320Bh 1 P2.12 – Time delay on minimum frequency 1…9000
integer
100…121 Unsigned
320Ch 1 P2.13 – Threshold of maximum frequency
OFF = 121 integer
Unsigned
320Dh 1 P2.14 – Time delay on maximum frequency 1…9000
integer
P2.15 – Time of presence of voltage on main Unsigned
320Eh 1 1…3600
line (when int. Secondary open) integer
P2.16 – Time of presence of voltage on main Unsigned
320Fh 1 1…3600
line (when int. Secondary closed) integer

43
Y1959A GB 29-08-2006 16:08 Pagina 44

Secondary Menu line


Address Words Parameter Range Format
Unsigned
3300h 1 P3.01 – Threshold of minimum voltage (release) 70…98
integer
Unsigned
3301h 1 P3.02 – Threshold of minimum voltage (reset) 75…100
integer
Unsigned
3302h 1 P3.03 – Delay time on minimum voltage 1…9000
integer
102…121 Unsigned
3303h 1 P3.04 – Threshold of maximum voltage (release)
OFF = 121 integer
Unsigned
3304h 1 P3.05 – Threshold of maximum voltage (reset) 100…115
integer
Unsigned
3305h 1 P3.06 – Delay time on maximum voltage 1…9000
integer
59…85 Unsigned
3306h 1 P3.07 – Threshold of missing stage
OFF = 59 integer
Unsigned
3307h 1 P3.08 – Time delay of missing stage 1…300
integer
1…21 Unsigned
3308h 1 P3.09 – Threshold of asymmetrical voltage
OFF = 21 integer
Unsigned
3309h 1 P3.10 – Time delay on asymmetrical voltage 1…9000
integer
79…100 Unsigned
330Ah 1 P3.11 – Threshold of minimum frequency
OFF = 79 integer
Unsigned
330Bh 1 P3.12 – Time delay on minimum frequency 1…9000
integer
100…121 Unsigned
330Ch 1 P3.13 – Threshold of maximum frequency
OFF = 121 integer
Unsigned
330Dh 1 P3.14 – Time delay on maximum frequency 1…9000
integer
P3.15 – Time of presence of voltage on main Unsigned
330Eh 1 1…3600
line (when int. Secondary open) integer

44
Y1959A GB 29-08-2006 16:08 Pagina 45

Menu of programmable inputs


Address Words Parameter Range Format
0…8
0 = OFF
1 = Line strain sec.
2 = Inhib. return on main
P4.01 – Programmable input 3 = Start generator Unsigned
3400h 1
function 1 4 = Emergency integer
5 = Generator ready
6 = Lock keyboard
7 = Lock settings
8 = Lock remote control
0…8
0 = OFF
1 = Line strain sec.
2 = Inhib. return on main
P4.02 – Programmable 3 = Start generator Unsigned
3401h 1
input function 2 4 = Emergency integer
5 = Generator ready
6 = Lock keyboard
7 = Lock settings
8 = Lock remote control

Menu of Programmable outputs


Address Words Parameter Range Format
0…6
0 = OFF
1 = Start/Stop generator
P05.01 – Programmable 2 = Unit ready Unsigned
3500h 1
output function 1 3 = Global alarm integer
4 = Main line minimum coil
5 = Secondary line minimum coil
6 = Load shed
0…6
0 = OFF
1 = Start/Stop generator
P05.02 – Programmable 2 = Unit ready Unsigned
3501h 1
output function 2 3 = Global alarm integer
4 = Main line minimum coil
5 = Secondary line minimum coil
6 = Load shed
0…6
0 = OFF
1 = Start/Stop generator
P05.03 – Programmable 2 = Unit ready Unsigned
3502h 1
output function 3 3 = Global alarm integer
4 = Main line minimum coil
5 = Secondary line minimum coil
6 = Load shed

45
Y1959A GB 29-08-2006 16:08 Pagina 46

Serial interface menu*


Address Words Parameter Range Format
Unsigned
3600h 1 Unit slave serial address (RS-232) 0…245
integer
0…4
0 = 2400 baud
1 = 4800 baud Unsigned
3601h 1 Speed of serial port (RS-232)
2 = 9600 baud integer
3 = 19200 baud
4 = 38400 baud
0…1
Unsigned
3602h 1 Protocol (RS-232) 0 = Modbus RTU
integer
1 = Modbus ASCII
0…2
0 = None Unsigned
3603h 1 Parity control (RS-232)
1 = Odd integer
2 = Even
Unsigned
3604h 1 Unit slave serial address (RS-485) 0…245
integer
0…4
0 = 2400 baud
1 = 4800 baud Unsigned
3605h 1 Speed of serial port (RS-485)
2 = 9600 baud integer
3 = 19200 baud
4 = 38400 baud
0…1
Unsigned
3606h 1 Protocol (RS-485) 0 = Modbus RTU
integer
1 = Modbus ASCII
0…2
0 = None Unsigned
3607h 1 Parity control (RS-485)
1 = Odd integer
2 = Even

* For these parameters, when changing the settings of the serial interface using the serial interface itself, can cause the
Master-Slave to be thrown out of line as well as a subsequent blocking of the communication line. It is therefore advis-
able to only use the function 04 (in reading).

46
Y1959A GB 29-08-2006 16:08 Pagina 47

PC-UNIT connection via RS-232

Unit

PC

Cable 51C2
RJ6/6

RS232

47
Y1959A GB 29-08-2006 16:08 Pagina 48

PC-UNIT connection via RS-485

Unit n Unit 01 PC

RS232

SG SG Cable
B B
51C4
A A
TR TR

PX1
RS485 RS485
RS232/RS485 CONV.
EIA-232 EIA-485/422

SG

SG
TR

TR
A

A
B

B
Twisted-pair cable Twisted-pair cable

L MAX= 1200m

48
Y1959A GB 29-08-2006 16:08 Pagina 49
Y1959A GB 29-08-2006 16:08 Pagina 50

Vous aimerez peut-être aussi