577 RGAM RGAM I171 I.GB.02 05 PROTOCOLLO DI COMUNICAZIONE COMMUNICATION PROTOCOL MODBUS RTU MODBUS RTU ADDENDUM ADDENDUM Doc: AD2005B1.doc 22/02/2005 p. 1 / 13
PROTOCOLLO MODBUS A partire dalla revisione software 24, gli RGAM supportano il protocollo Modbus RTU sulla porta seriale RS-232 (serie) e RS485 (opzionale). Grazie a questa funzione e possibile comunicare con l RGAM tramite software di supervisione standard forniti da terze parti oppure tramite apparecchiature dotate di interfaccia Modbus quali PLC e terminali intelligenti. IMPOSTAZIONE DEI PARAMETRI Per configurare il protocollo Modbus, accedere ai Menu base e Menu custom (vedere manuale addendum parametri custom) ed agire sui parametri riportati nella seguente tabella: TABELLA PARAMETRI PAR Range Default P.14 Indirizzo seriale 1..32 1 C.22 Velocità seriale 1200..19200 9600 C.27 Protocollo Proprietario ASCII Modbus RTU Prop. ASCII MODBUS PROTOCOL Starting from software revision 24, RGAM series support the Modbus protocol on their serial ports, both RS-232 (standard) and RS485 (optional). Using this feature it is possible to communicate with the device using a standard third-party supervision software or from other intelligent devices with standard Modbus interface, such as PLCs and intelligent terminals. PARAMETER SETTING To configure the Modbus protocol, enter Base and Custom menu (see Addendum manual for custom parameters) and set the parameters listed in the following table: PARAMETERS TABLE PAR Range Default P.14 Serial address 1..32 1 C.22 Serial speed 1200..19200 9600 C.27 Protocol Proprietary ASCII Modbus RTU Prop. ASCII PROTOCOLLO MODBUS RTU Se si imposta il parametro C.27 come protocollo Modbus RTU, la struttura del messaggio di comunicazione è così costituita: MODBUS RTU PROTOCOL If one sets the parameter C.27 as Modbus RTU protocol, the communication message has the following structure: T1 T2 T3 Indirizzo ( 8 bit) (8 bit) Dati (N x 8 bit) CRC (16 bit) T1 T2 T3 T1 T2 T3 Address ( 8 bit) (8 bit) Data (N x 8 bit) CRC (16 bit) T1 T2 T3 il campo Indirizzo contiene l indirizzo dello strumento slave cui il messaggio viene inviato. il campo contiene il codice della funzione che deve essere eseguita dallo slave. il campo Dati contiene i dati inviati allo slave o quelli inviati dallo slave come risposta ad una domanda. il campo CRC consente sia al master che allo slave di verificare se ci sono errori di trasmissione. Questo consente, in caso di disturbo sulla linea di trasmissione, di ignorare il messaggio inviato per evitare problemi sia dal lato master che slave. la sequenza T1 T2 T3 corrisponde al tempo durante il quale non devono essere scambiati dati sul bus di comunicazione, per consentire agli strumenti collegati di riconoscere la fine di un messaggio e l inizio del successivo. Questo tempo deve essere pari a 3.5 caratteri. L RGAM misura il tempo trascorso tra la ricezione di un carattere e il successivo e se questo tempo supera quello necessario per trasmettere 3.5 caratteri, riferiti al baud-rate impostato, il prossimo carattere viene considerato l inizio di un nuovo messaggio. The Address field holds the serial address of the slave destination device. The field holds the code of the function that must be executed by the slave. The Data field contains data sent to the slave or data received from the slave in response to a query The CRC field allows the master and slave devices to check the message integrity. If a message has been corrupted by electrical noise or interference, the CRC field allows the devices to recognize the error and thereby to ignore the message. The T1 T2 T3 sequence corresponds to a time in which data must not be exchanged on the communication bus to allow the connected devices to recognize the end of one message and the beginning of another. This time must be at least 3.5 times the time required to send one character. The RGAM measures the time that elapse from the reception of one character and the following. If this time exceeds the time necessary to send 3.5 characters at the selected baud-rate, then the next character will be considered as the first of a new message. Doc: AD2005B1.doc 22/02/2005 p. 2 / 13
FUNZIONI MODBUS Le funzioni disponibili sono: 04 = Read input register 06 = Preset single register 07 = Read exception 17 = Report slave ID Consente la lettura delle misure disponibili nell RGAM. Permette di modificare i parametri del setup Permette di leggere lo stato dell RGAM Permette di leggere informazioni relative all RGAM Per esempio, se si vuole leggere dall RGAM con indirizzo 8 il valore della tensione di linea che si trova alla locazione 2 (02 Hex), il messaggio da spedire è il seguente: 08 04 00 01 00 02 20 92 Dove: 08 = indirizzo slave. 04 = funzione di lettura locazione. 00 01 = indirizzo della locazione diminuito di un unità, contenete il valore di tensione media di linea 00 02 = numero di registri da leggere a partire dall indirizzo 01. 2092 = checksum CRC. La risposta dell RGAM è la seguente: 08 04 04 00 00 00 64 63 6A Dove: 08 = indirizzo dell RGAM (Slave 08). 04 = funzione richiesta dal Master. 04 = numero di byte inviati dall RGAM. 00 00 00 64 = valore esadecimale della tensione di linea = 100 V. 63 6A = checksum CRC. FUNZIONE 04: READ INPUT REGISTER La funzione 04 permette di leggere una o più grandezze consecutive in memoria. L indirizzo di ciascuna grandezza e indicato nelle Tabelle 2..7 riportate nelle ultime pagine del presente manuale. Come da standard Modbus, l indirizzo specificato nel messaggio va diminuito di 1 rispetto a quello effettivo riportato nella tabella. Se l indirizzo richiesto non è compreso nella tabella o il numero di registri richiesti è maggiore di 20 l RGAM ritorna un messaggio di errore ( vedi tabella errori). Richiesta Master: Indirizzo slave 04h MSB Indirizzo registro LSB Indirizzo registro 0Fh MSB Numero registri LSB Numero registri 21h 57h Nell esempio vengono richiesti allo slave numero 8 n. 8 registri consecutivi a partire dall indirizzo 10h. Quindi vengono letti i registri dall 10h al 17h.Il comando termina sempre con il valore di checksum CRC. MODBUS FUNCTIONS The available functions are: 04 = Read input register Allows to read the RGAM measures. 06 = Preset single Allows to set the setup register parameters 07 = Read exception Allows to read the device status Allows to read information 17 = Report slave ID about the RGAM. For instance, to read the value of the line voltage, which resides at location 2 (02 Hex) from the RGAM with serial address 08, the message to send is the following: 08 04 00 01 00 02 20 92 Whereas: 08 = slave address 04 = Modbus function Read input register 00 01 = Address of the required register (line voltage) decreased by one 00 02 = Number of registers to be read beginning from address 0001 2092 = CRC Checksum The RGAM answer is the following: 08 04 04 00 00 00 64 63 6A Where: 08 = RGAM address (Slave 08) 04 = requested by the master 04 = Number of bytes sent by the RGAM 00 00 00 64 = Hex value of the equivalent phase-tophase voltage (100 V) 63 6A = CRC checksum FUNCTION 04: READ INPUT REGISTER The Modbus function 04 allows to read one or more consecutive registers from the slave memory. The address of each measure is given in the tables 2..7 reported in the final pages of this manual. As for Modbus standard, the address in the query message must be decreased by one from the effective address reported in the table. If the measure address is not included in the table or the number of requested registers exceeds 20 the RGAM will return an error code (see error table). Master query: Slave address 04h MSB address LSB address 0Fh MSB register number LSB register number 21h 57h In the above example slave 08 is requested for 8 consecutive registers beginning with address 10h. Thus, registers from 10h to 17h will be returned. As usual, the message ends with the CRC checksum. Doc: AD2005B1.doc 22/02/2005 p. 3 / 13
Risposta Slave: Indirizzo slave 04h Numero di byte 10h MSB Dato 10h LSB Dato 10h --------------------------------------------------- ---- MSB Dato 17h LSB Dato 17h 5Eh 83h La risposta è composta sempre dall indirizzo dello slave, dalla funzione richiesta dal Master e dai dati dei registri richiesti. La risposta termina sempre con il valore di checksum CRC. FUNZIONE 06: PRESET SINGLE REGISTER Questa funzione permette di scrivere nei registri. Essa può essere utilizzata solo con i registri di indirizzo superiore a 1000 Hex, e solo quando l RGAM e in modalita OFF (altrimenti viene restituito un messaggio di errore).. E possibile ad esempio impostare i parametri del setup. I parametri di setup modificati vengono automaticamente salvati nella memoria ritenitiva (eeprom). Qualora il valore impostato non rientri nel valore minimo e massimo della tabella l RGAM risponderà con un messaggio di errore. Se viene richiesto un parametro ad un indirizzo inesistente verrà risposto con un messaggio di errore. L indirizzo ed il range valido per i vari parametri può essere trovato nelle Tabelle 5, 6 e 7. Con la funzione 06 e inoltre possibile eseguire dei comandi utilizzando gli indirizzi ed i valori riportati nella Tabella 4. Slave response: Slave address 04h Byte number 10h MSB register 10h LSB register 10h --------------------------------------------------- ---- MSB register 17h LSB register 17h 5Eh 83h The response is always composed of the slave address, the function code requested by the master and the contents of the requested registers. The answer ends with the CRC. FUNCTION 06: PRESET SINGLE REGISTER This function allows to write in the registers. It can be used only with registers with address higher than 1000 Hex, and only when the unit is in OFF mode. For instance it is possible to change setup parameters. Modified parameters are automatically saved in the non-volatile eeprom memory. If the value is not in the correct range, the RGAM will answer with an error message. In the same way, if the parameter address is not recognised, the RGAM will send an error response. The address and the valid range for each parameter are indicated in Tables 5, 6 and 7. With function 06, some commands can be possibly executed sending the addresses and the values reported in Table 4. Richiesta Master: Indirizzo slave MSB Indirizzo registro LSB Indirizzo registro MSB Dato LSB Dato 01h 06h 21h 02h 01h 90h 23h CAh Master message: Slave address MSB register address LSB register address MSB data LSB data 01h 06h 21h 02h 01h 90h 23h CAh Nell esempio viene richiesto di modificare il parametro P.21 all indirizzo 2102 Hex ( tensione nominale ) con il valore 400. Risposta Slave: La risposta è un eco della domanda, cioè viene inviato al master l indirizzo del dato da modificare e il nuovo valore del parametro. In the above message, the master wants to set parameter P.21 at address 2102 Hex (Nominal Voltage) with value 400. Slave response: The slave response is an echo to the query, that is the slave sends back to the master the address and the new value of the variable. Doc: AD2005B1.doc 22/02/2005 p. 4 / 13
FUNZIONE 07: READ EXCEPTION STATUS Tale funzione permette di leggere lo stato in cui si trova l RGAM. FUNCTION 07: READ EXCEPTION STATUS This function allows to read the status of the RGAM. Richiesta Master: Indirizzo slave 07h 47h B2h Master query: Slave address 07h 47h B2h La tabella seguente riporta il significato del byte inviato dall RGAM come risposta: BIT SIGNIFICATO 0 Reset/OFF mode 1 Man mode 2 Aut mode 3 Test mode 4 Presenza Rete 5 Presenza generatore 6 Motore in moto 7 Status Allarme The following table gives the meaning of the status byte sent by the RGAM as answer: BIT MEANING 0 Reset/OFF mode 1 Man mode 2 Aut mode 3 Test mode 4 Mains status 5 Generator status 6 Engine running 7 Alarm status FUNZIONE 17: REPORT SLAVE ID Questa funzione permette di identificare il tipo di RGAM. FUNZIONE 17: REPORT SLAVE ID This function allows to identify the RGAM type. Richiesta Master. Indirizzo slave 11h C6h 7Ch Master query. Slave address 11h C6h 7Ch Risposta Slave: Indirizzo slave Numero byte Dato 1 (Alimentazione VDC) Dato 2 (Rev. software) Dato 3 (MSB checksum firmware) Dato 4 (LSB checksum firmware) 11h 04h 0Ch 18h 0Bh 59h BDh 1Ch Slave response: Slave address Byte number Data 1 (DC supply) Data 2 (Software revision) Data 3 (MSB checksum firmware) Data 4 (LSB checksum firmware) 11h 04h 0Ch 18h 0Bh 59h BDh 1Ch ERRORI Nel caso lo slave riceva un messaggio errato, segnala la condizione al master rispondendo con un messaggio composto dalla funzione richiesta in OR con 80 Hex, seguita da un codice di errore. Nella seguente tabella vengono riportati i codici di errore inviati dallo slave al master TABELLA 1: CODICI ERRORE COD ERRORE 01 non valida 02 Indirizzo registro illegale 03 Valore del parametro fuori range 04 Impossibile effettuare operazione Slave occupato, funzione 06 momentaneamente non disponibile (es. unita non in OFF) ERRORS In case the slave receives an incorrect message, it answers with a massage composed by the queried function ORed with 80 Hex, followed by an error code byte. In the following table are reported the error codes sent by the slave to the master: TABLE 1: ERROR CODES CODE ERROR 01 Invalid function 02 Invalid address 03 Parameter out of range 04 execution impossible Slave busy, function momentarily not 06 available (e.g. unit is not in OFF mode) Doc: AD2005B1.doc 22/02/2005 p. 5 / 13
no CRC xor BYTE = CRC n = 0 CRC right shift carry over CRC xor POLY = CRC no Hex FFFF = CRC n = n + 1 n > 7 next BYTE end message End yes yes Algoritmo di calcolo del CRC CRC calculation algorithm CALCOLO DEL CRC (CHECKSUM) Esempio di calcolo: Frame = 0207h Inizializzazione CRC 1111 1111 1111 1111 Carica primo byte 0000 0010 Esegue xor con il primo 1111 1111 1111 1101 Byte della frame Esegue primo shift a dx 0111 1111 1111 1110 1 Carry=1,carica polinomio 1010 0000 0000 0001 Esegue xor con il 1101 1111 1111 1111 polinomio Esegue secondo shift dx 0110 1111 1111 1111 1 Carry=1,carica polinomio 1010 0000 0000 0001 Esegue xor con il 1100 1111 1111 1110 polinomio Esegue terzo shift 0110 0111 1111 1111 0 Esegue quarto shift 0011 0011 1111 1111 1 Esegue xor con il 1001 0011 1111 1110 Polinomio Eseque quinto shift dx 0100 1001 1111 1111 0 Eseque sesto shift dx 0010 0100 1111 1111 1 Esegue xor con polinomio 1000 0100 1111 1110 Esegue settimo shift dx 0100 0010 0111 1111 0 Esegue ottavo shift dx 0010 0001 0011 1111 1 Carica secondo byte 0000 0111 della frame Esegue xor con il 1000 0001 0011 1001 Secondo byte della frame Esegue primo shift dx 0100 0000 1001 1100 1 Esegue xor con il 1110 0000 1001 1101 polinomio Esegue secondo shift dx 0111 0000 0100 1110 1 Esegue xor con il 1101 0000 0100 1111 polinomio Esegue terzo shift dx 0110 1000 0010 0111 1 Esegue xor con il 1100 1000 0010 0110 polinomio Esegue quarto shift dx 0110 0100 0001 0011 0 Esegue quinto shift dx 0010 0100 0000 1001 1 Esegue xor con il 1001 0010 0000 1000 polinomio Esegue sesto shift dx 0100 1001 0000 0100 0 Esegue settimo shift dx 0010 0100 1000 0010 0 Esegue ottavo shift dx 0001 0010 0100 0001 0 Risultato CRC 0001 0010 0100 0001 12h 41h Nota: Il byte 41h viene spedito per primo (anche se e il LSB), poi viene trasmesso 12h. CRC CALCULATION (CHECKSUM) Example of CRC calculation: Frame = 0207h CRC initialization 1111 1111 1111 1111 Load the first byte 0000 0010 Execute xor with the first 1111 1111 1111 1101 Byte of the frame Execute 1st right shift 0111 1111 1111 1110 1 Execute xor with the 1101 1111 1111 1111 Execute 2 nd right shift 0110 1111 1111 1111 1 Execute xor with the 1100 1111 1111 1110 Execute 3 rd right shift 0110 0111 1111 1111 0 Execute 4 th right shift 0011 0011 1111 1111 1 Execute xor with the 1001 0011 1111 1110 Execute 5 th right shift 0100 1001 1111 1111 0 Execute 6 th right shift 0010 0100 1111 1111 1 Execute xor with the 1000 0100 1111 1110 Execute 7 th right shift 0100 0010 0111 1111 0 Execute 8 th right shift 0010 0001 0011 1111 1 Load the second byte 0000 0111 of the frame Execute xor with the 1000 0001 0011 1001 Second byte of the frame Execute 1st right shift 0100 0000 1001 1100 1 Execute xor with the 1110 0000 1001 1101 Execute 2 nd right shift 0111 0000 0100 1110 1 Execute xor with the 1101 0000 0100 1111 Execute 3 rd right shift 0110 1000 0010 0111 1 Execute xor with the 1100 1000 0010 0110 Execute 4 th right shift 0110 0100 0001 0011 0 Execute 5 th right shift 0010 0100 0000 1001 1 Execute xor with the 1001 0010 0000 1000 Execute 6 th right shift 0100 1001 0000 0100 0 Execute 7 th right shift 0010 0100 1000 0010 0 Execute 8 th right shift 0001 0010 0100 0001 0 CRC Result 0001 0010 0100 0001 12h 41h Note: The byte 41h is sent first(even if it is the LSB), then12h is sent. Doc: AD2005B1.doc 22/02/2005 p. 6 / 13
TABELLA 2: TABLE 2: MISURE FORNITE DAL PROTOCOLLO DI COMUNICAZIONE MEASURES SUPPLIED BY SERIAL COMMUNICATION PROTOCOL (Utilizzabili con funzione 04) (To be used with function 04) INDIRIZZO WORDS MISURA MEASURE UNITA FORMATO UNIT FORMAT 02h 2 Tensione di linea rete L1-L2 Mains phase to phase voltage L1-L2 VAC Unsigned long 04h 2 Tensione di linea rete L2-L3 Mains phase to phase voltage L2-L3 VAC Unsigned long 06h 2 Tensione di linea rete L3-L1 Mains phase to phase voltage L3-L1 VAC Unsigned long 2 Tensione di linea generatore L1-L2 Generator phase to phase voltage L1-L2 VAC Unsigned long 0Ah 2 Frequenza di generatore Generator frequency Hz / 10 Unsigned long 0Ch 2 Tensione batteria Battery voltage VDC / 10 Unsigned long 0Eh 2 Tensione ingresso alt. C.b. B. ch. Alternator voltage VDC / 10 Unsigned long 10h 2 Ore di lavoro motore Engine working hours H Unsigned long 12h 2 Ore mancanti a manutenzione Time to maintenance H Unsigned long 14h 2 Tempo di lavoro motore Engine working time Min Unsigned long 16h 2 Tempo da ultima manutenzione Time since last maintenance Min Unsigned long TABELLA 3: TABLE 3: BIT DI STATO STATUS BITS (Utilizzabili con funzione 04) (To be used with function 04) INDIRIZZO WORDS MISURA MEASURE UNITA UNIT FORMATO FORMAT 20h 2 Stato bits di errore Error bits status (bit) Unsigned long 22h 2 Stato ingressi / uscite Input / Output status (bit) Unsigned long 24h 2 Bit di stato generale General status bits (bit) Unsigned long Leggendo la word all indirizzo 20h vengono restituiti 32 bit con significato come da tabella: Reading the word at address 20h will return 32 bits with the following meaning: Bit Codice Allarme Code Alarm 0 A01 Pressione olio bassa A01 Low oil pressure 1 A02 Alta temperatura motore A02 High engine temperature 2 A03 Basso livello carburante A03 Low fuel level 3 A04 Mancato avviamento A04 Starting failure 4 A05 Tensione batteria bassa A05 Low battery voltage 5 A06 Tensione batteria alta A06 High battery voltage 6 A07 Avaria alternatore carica batteria A07 Charger alternator failure 7 A08 Avaria tensione generatore A08 Generator voltage failure 8 A09 Alta frequenza generatore A09 High generator frequency 9 A10 Bassa frequenza generatore A10 Low generator frequency 10 A11 Sovraccarico generatore A11 Generator overload 11 A12 Mancato arresto A12 Engine stop failure 12 A13 Arresto di emergenza A13 Emergency stop 13 A14 Arresto inaspettato A14 Unexpected stop 14 A15 Richiesta manutenzione A15 Maintenance requested 15 A16 Anomalia contattore rete A16 Mains contactor failure 16 A17 Anomalia contattore generatore A17 Generator contactor failure 17-19 - (Bit liberi) - (free bits) 20 UA1 Allarme utente 1 UA1 User alarm 1 21 UA2 Allarme utente 2 UA2 User alarm 2 22 UA3 Allarme utente 3 UA3 User alarm 3 23 UA4 Allarme utente 4 UA4 User alarm 4 24-31 - (Bit liberi) - (free bits) Doc: AD2005B1.doc 22/02/2005 p. 7 / 13
Leggendo la word all indirizzo 22h vengono restituiti 32 bit con significato come da tabella: Reading the word at address 22h will return 32 bits with the following meaning: Bit Significato Meaning 0 Ingresso allarme pressione olio Oil pressure alarm input 1 Ingresso allarme alta temperatura High temperature alarm input 2 Ingresso allarme livello carburante Fuel level alarm input 3 Ingresso allarme emergenza Emergency stop input 4 Ingresso programmabile mors. 10 Prog. Input terminal 10 5 Ingresso programmabile mors. 11 Prog. Input terminal 11 6 Ingresso programmabile mors. 12 Prog. Input terminal 12 7 Ingresso programmabile mors. 13 Prog. Input terminal 13 8 Uscita teleruttore rete Mains contactor output 9 Uscita teleruttore generatore Gen. Contactor output 10 Uscita EV carburante Fuel valve output 11 Uscita start Start output 12 Uscita programmabile mors. 18 Prog. Output terminal 18 13 Uscita programmabile mors. 16 Prog. Output terminal 16 14 Uscita programmabile mors. 20-22 Prog. Output terminal 20-22 15-31 (Bit liberi) (Free bits) Leggendo la word all indirizzo 24h vengono restituiti 32 bit con significato come da tabella: Reading the word starting at address 24h will return 32 bits with the following meaning: Bit Significato Meaning 0 Modo Off Off mode 1 Modo Man Man mode 2 Modo Aut Aut mode 3 Modo Test Test mode 4 Motore in moto Engine running 5 Allarmi inseriti Alarms enabled 6 Tensione rete presente (rit) Mains voltage presence (delayed) 7 Tensione generatore presente (rit) Generator voltage presence (delayed) 8 Tensione rete nei limiti Mains voltage ok 9 Tensione generatore nei limiti Generator voltage ok 10 Teleruttore rete Mains contactor 11 Teleruttore generatore Generator contactor 12 Test automatico abilitato Automatic test enabled 13 Test automatico in corso Automatic test in progress 14 Raffreddamento in corso Cooling 15 Allarme attivo Alarm 16-31 (Bit liberi) (Free bits) Doc: AD2005B1.doc 22/02/2005 p. 8 / 13
TABELLA 4: TABLE 4: COMANDI COMMANDS (Utilizzabili con funzione 06) (To be used with function 06) INDIRIZZO WORDS FUNZIONE FUNCTION FORMATO FORMAT 10 1 Tasto Modalità OFF Keystroke OFF Unsigned integer 1001h 1 Tasto Modalità MAN Keystroke MAN Unsigned integer 1002h 1 Tasto Modalità AUT Keystroke AUT Unsigned integer 1003h 1 Tasto Modalità TEST Keystroke TEST Unsigned integer 1004h 1 Tasto MAINS Keystroke MAINS Unsigned integer 1005h 1 Tasto GEN Keystroke GEN Unsigned integer 1006h 1 Tasto START Keystroke START Unsigned integer 1007h 1 Tasto STOP Keystroke STOP Unsigned integer 10 1 Tasto SELECT-RESET Keystroke SELECT / RESET Unsigned integer 11 1 Scrittura tutta memoria eeprom Write all eeprom memory Unsigned integer 12 1 Reset RGAM RGAM reset Unsigned integer Per eseguire il comando e necessario usare la funzione 06 Preset single register e scrivere il valore 0001 hex all indirizzo specificato. To execute the command the user must use the function 06 Preset single register, writing value 0001Hex to the address specified.. Per eseguire una delle funzioni disponibili nel menu comandi e necessario scrivere il valore 00xx Hex all indirizzo 1200, dove xx rappresenta il numero della voce del menu comandi. Ad esempio per eseguire il comando C02 Reset ore manutenzione sara necessario scrivere il valore 0002 Hex all indirizzo 1200 Hex utilizzando la funzione Modbus 06. Per la lista delle funzioni disponibili nel menu comandi fare riferimento al manuale operativo. To execute one of the functions available in the Command menu it is necessary to write value 00xxHex to address 1200 Hex, where xx represents the number of the command menu item. For instance, to execute the command C.02 Maintenance hour reset, the user must write value 0002 hex to the address 1200 hex using Modbus function 06. See the operating manual for the complete list of the command menu functions. IMPOSTAZIONE PARAMETRI Tramite il protocollo Modbus e possibile accedere ai parametri dei menu base, esteso e funzioni. Nelle seguenti tabelle e riportato il range di impostazione in formato numerico. Per interpretare correttamente la corrispondenza fra valore numerico e funzione selezionata e/o unita di misura, fare riferimento al manuale operativo dell RGAM. Note: 1- I seguenti parametri sono sempre disponibili in lettura, mentre possono essere modificati solo quando lo strumento è in modalità OFF. 2 -Dopo aver modificato uno o piu parametri, eseguire un reset dell RGAM (vedere tabella 4). PARAMETER SETTING Using the Modbus protocol it is possible to access the base, advanced and function menu parameters. In the following tables it is reported the numerical range for each parameter. To correctly understand the correspondence between the numeric value and the selected function and/or the unit of measure, please see the RGAM operating manual. Notes: 1 -The following parameters can be read at any time, while the writeaccess is possible only when the RGAM is OFF mode. 2- After having changed one or more parameters, execute a unit reset (see table 4). PARAMETRI MENU BASE BASE MENU PARAMETERS (Utilizzabili con funzioni 04 e 06) (To be used with functions 04 and 06) INDIRIZZO WORDS PARAMETRO RANGE PARAMETER FORMATO FORMAT 2002h 1 P.00 Soglia intervento minima tensione rete 0..30 P.00 Minimum mains voltage trip threshold Unsigned integer 2003h 1 P.01 Soglia intervento massima tensione rete 0..21 P.01 Maximum mains voltage trip threshold Unsigned integer 2004h 1 P.02 Massima asimmetria rete (solo trifase) 5..20 P.02 Maximum mains asymmetry (only threephase) Unsigned integer 2005h 1 P.03 Ritardo assenza tensione rete 1..60 P.03 Mains voltage absence delay Unsigned integer 2006h 1 P.04 Ritardo presenza tensione rete 1..600 P.04 Mains voltage presence delay Unsigned integer 2007h 1 P.05 Soglia intervento minima tensione 0..30 P.05 Minimum generator voltage trip threshold Unsigned integer generatore 20 1 P.06 Soglia intervento massima tensione 0..21 P.06 Maximum generator voltage trip Unsigned integer generatore threshold 2009h 1 P.07 Ritardo assenza tensione generatore 1..180 P.07 Generator voltage absence delay Unsigned integer 200Ah 1 P.08 Ritardo presenza tensione generatore 1..180 P.08 Generator voltage presence delay Unsigned integer (ritardo chiusura teleruttore generatore) (generator contactor closing delay) 200Bh 1 P.09 Ritardo avviamento a distanza 0..90 P.09 Remote starting delay Unsigned integer 200Ch 1 P.10 Tempo di suono sirena 0..60 P.10 Audible alarm time Unsigned integer 200Dh 1 P.11 Disabilitazione sirena di avviso prima di 0..1 P.11 Audible alarm disable before starting Unsigned integer avviamento 200Eh 1 P.12 Tempo intervallo test automatico 1..30 P.12 Automatic test interval Unsigned integer 200Fh 1 P.13 Durata test automatico 1..15 P.13 Automatic test duration 2010h 1 P.14 Indirizzo per comunicazione seriale 1..32 P.14 Serial communication address Doc: AD2005B1.doc 22/02/2005 p. 9 / 13
PARAMETRI MENU ESTESO ADVANCED MENU PARAMETERS (Utilizzabili con funzioni 04 e 06) (To be used with functions 04 and 06) INDIRIZZO WORDS PARAMETRO RANGE PARAMETER FORMATO FORMAT 2102h 1 P.20 Controllo tensione rete trifase/monofase 0..1 P.20 Three/Single-phase mains voltage control Unsigned integer 2103h 1 P.21 Tensione nominale Ue rete/generatore 100..480 P.21 Rated Ue mains/generator voltage Unsigned integer 2104h 1 P.22 Frequenza nominale 0..1 P.22 Rated frequency Unsigned integer 2105h 1 P.23 Soglia allarme minima frequenza 0..20 P.23 Minimum frequency alarm trip threshold Unsigned integer 2106h 1 P.24 Soglia allarme massima frequenza 0..21 P.24 Maximum frequency alarm trip threshold Unsigned integer 2107h 1 P.25 Ritardo intervento allarme massima 0..10 P.25 Maximum frequency (overspeed) alarm trip Unsigned integer frequenza (fuorigiri) delay 21 1 P.26 Sorgente segnale motore avviato 0..1 P.26 Started engine signal source Unsigned integer 2109h 1 P.27 Soglia tensione motore avviato 30..480 P.27 Started engine voltage threshold Unsigned integer 210Ah 1 P.28 Arresto motore per intervento allarme 0..1 P.28 Engine stopping for A07 alarm trip Unsigned integer A07 (Avaria alternatore carica-batteria) (battery-charger alternator fault) 210Bh 1 P.29 Soglia frequenza motore avviato 0..60 P.29 Engine started frequency threshold Unsigned integer 210Ch 1 P.30 Tempo preriscaldo candelette 1..60 P.30 Glow-plugs preheat time Unsigned integer 210Dh 1 P.31 Numero tentativi di avviamento 1..10 P.31 Number of starting attempts Unsigned integer 210Eh 1 P.32 Durata tentativo avviamento 1..30 P.32 Starting attempt duration Unsigned integer 210Fh 1 P.33 Pausa fra tentativi avviamento 1..30 P.32 Interval between starting attempts Unsigned integer 2110h 1 P.34 Ritardo fra avviamento interrotto e 1..21 P.34 Delay between interrupted and subsequent Unsigned integer successivo startings 2111h 1 P.35 Ritardo abilitazione allarmi 1..30 P.35 Alarm enable delay at engine starting Unsigned integer all avviamento motore 2112h 1 P.36 Tempo di funzionamento decelerato 1..180 P.36 Slow running time Unsigned integer 2113h 1 P.37 Tempo di raffreddamento 1..300 P.37 Cooling time Unsigned integer 2114h 1 P.38 Tempo di eccitazione magnete di arresto 1..60 P.38 Stop magnet energising time Unsigned integer 2115h 1 P.39 Tempo interblocco Rete/Generatore 0..20 P.39 Mains/Generator interlock time Unsigned integer 2116h 1 P.40 Soglia allarme minima tensione batteria 70..240 P.40 Low battery voltage alarm threshold Unsigned integer 2117h 1 P.41 Soglia allarme massima tensione 130..340 P.41 Maximum battery voltage alarm threshold Unsigned integer batteria 2118h 1 P.42 Intervallo manutenzione 10..250 P.42 Maintenance interval Unsigned integer 2119h 1 P.43 Esclusione controlli di tensione (solo per 0..3 P.43 Voltage control exclusion (only with close Unsigned integer motopompa) coupled pump) 211Ah 1 P.44 Abilitazione attivazione allarme 0..1 P.44 Common alarm trip when in MAN or OFF Unsigned integer cumulativo in MAN e OFF mode 211Bh 1 P.45 Livello di priorità per attivazione allarme 0..3 P.45 Priority level for common alarm enable Unsigned integer globale 211Ch 1 P.46 Uscita funzione programmabile morsetto 0..2 P.46 Programmable function output terminal 18 Unsigned integer N 18 211Dh 1 P.47 Uscita funzione programmabile morsetto 0..2 P.47 Programmable function output terminal 16 Unsigned integer N 16 211Eh 1 P.48 Uscita funzione programmabile morsetto 0..1 P.48 Programmable function output terminals Unsigned integer N 20/22 e 21/22 20/22 and 21/22 211Fh 1 P.49 Ingresso funzione programmabile 0..2 P.49 Programmable function input terminal 10 Unsigned integer morsetto N 10 2120h 1 P.50 Ingresso funzione programmabile 0..2 P.50 Programmable function input terminal 11 Unsigned integer morsetto N 11 2121h 1 P.51 Ingresso funzione programmabile 0..2 P.51 Programmable function input terminal 12 Unsigned integer morsetto N 12 2122h 1 P.52 Ingresso funzione programmabile 0..2 P.52 Programmable function input terminal 13 Unsigned integer morsetto N 13 Doc: AD2005B1.doc 22/02/2005 p. 10 / 13
PARAMETRI MENU ALLARMI UTENTE USER ALARM MENU PARAMETERS (Utilizzabili con funzioni 04 e 06) (To be used with functions 04 and 06) INDIRIZZO WORDS PARAMETRO RANGE PARAMETER FORMATO FORMAT 2202h 1 P.60 Ingresso UA1 NA/NC 0..1 P.60 NO/NC Input UA1 Unsigned integer 2203h 1 P.61 Allarme ritenitivo 0..1 P.61 Retenitive alarm Unsigned integer 2204h 1 P.62 Stop motore 0..2 P.62 Engine stop Unsigned integer 2205h 1 P.63 Apertura teleruttore 0..1 P.63 Contactor opening Unsigned integer 2206h 1 P.64 Abilitazione a motore in moto 0..1 P.64 Enabled with engine running Unsigned integer 2207h 1 P.65 Ritardo abilitazione 0..180 P.65 Enable delay Unsigned integer 22 1 P.66 Modo ritardo ingresso 0..3 P.66 Input delay mode Unsigned integer 2209h 1 P.67 Tempo ritardo ingresso 0..180 P.67 Input delay time Unsigned integer 2212h 1 P.70 Ingresso UA2 NA/NC 0..1 P.70 NO/NC Input UA2 Unsigned integer 2213h 1 P.71 Allarme ritenitivo 0..1 P.71 Retenitive alarm Unsigned integer 2214h 1 P.72 Stop motore 0..2 P.72 Engine stop Unsigned integer 2215h 1 P.73 Apertura teleruttore 0..1 P.73 Contactor opening Unsigned integer 2216h 1 P.74 Abilitazione a motore in moto 0..1 P.74 Enabled with engine running Unsigned integer 2217h 1 P.75 Ritardo abilitazione 0..180 P.75 Enable delay Unsigned integer 2218h 1 P.76 Modo ritardo ingresso 0..3 P.76 Input delay mode Unsigned integer 2219h 1 P.77 Tempo ritardo ingresso 0..180 P.77 Input delay time Unsigned integer 2222h 1 P.80 Ingresso UA3 NA/NC 0..1 P.80 NO/NC Input UA3 Unsigned integer 2223h 1 P.81 Allarme ritenitivo 0..1 P.81 Retenitive alarm Unsigned integer 2224h 1 P.82 Stop motore 0..2 P.82 Engine stop Unsigned integer 2225h 1 P.83 Apertura teleruttore 0..1 P.83 Contactor opening Unsigned integer 2226h 1 P.84 Abilitazione a motore in moto 0..1 P.84 Enabled with engine running Unsigned integer 2227h 1 P.85 Ritardo abilitazione 0..180 P.85 Enable delay Unsigned integer 2228h 1 P.86 Modo ritardo ingresso 0..3 P.86 Input delay mode Unsigned integer 2229h 1 P.87 Tempo ritardo ingresso 0..180 P.87 Input delay time Unsigned integer 2232h 1 P.90 Ingresso UA4 NA/NC 0..1 P.90 NO/NC Input UA4 Unsigned integer 2233h 1 P.91 Allarme ritenitivo 0..1 P.91 Retenitive alarm Unsigned integer 2234h 1 P.92 Stop motore 0..2 P.92 Engine stop Unsigned integer 2235h 1 P.93 Apertura teleruttore 0..1 P.93 Contactor opening Unsigned integer 2236h 1 P.94 Abilitazione a motore in moto 0..1 P.94 Enabled with engine running Unsigned integer 2237h 1 P.95 Ritardo abilitazione 0..180 P.95 Enable delay Unsigned integer 2238h 1 P.96 Modo ritardo ingresso 0..3 P.96 Input delay mode Unsigned integer 2239h 1 P.97 Tempo ritardo ingresso 0..180 P.97 Input delay time Unsigned integer Doc: AD2005B1.doc 22/02/2005 p. 11 / 13
TABELLA 9: TABLE 9: LISTA EVENTI EVENT LOG (Utilizzabili con funzione 04) (To be used with function 04) INDIRIZZO WORDS PARAMETRO PARAMETER RANGE FORMATO FORMAT 30 1 Contatore eventi disponibili Available events counter 0..255 Unsigned integer 3002h 1 Codice ultimo evento (piu recente) Code of last event (most recent) 0..162 Unsigned integer 3003h 1 Giorni ultimo evento Days of last event 0..65535 Unsigned integer 3004h 1 Ore ultimo evento Hours of last event 0..23 Unsigned integer 3005h 1 Minuti ultimo evento Minutes of l ast event 0..59 Unsigned integer 3006h 1 Secondi ultimo evento Seconds of last event 0..59 Unsigned integer 3007h 1 Codice evento 1 (penultimo) Code of event -1 (next-to-last) 0..162 Unsigned integer 30 1 Giorni evento 1 Days of event 1 0..65535 Unsigned integer 3009h 1 Ore evento -1 Hours of event 1 0..23 Unsigned integer 300Ah 1 Minuti evento 1 Minutes of event 1 0..59 Unsigned integer 300Bh 1 Secondi evento 1 Seconds of event 1 0..59 Unsigned integer 300Ch 1 Codice evento 2 Code of event -2 0..162 Unsigned integer 300Dh 1 Giorni evento 2 Days of event 2 0..65535 Unsigned integer 300Eh 1 Ore evento -2 Hours of event 2 0..23 Unsigned integer 300Fh 1 Minuti evento 2 Minutes of event 2 0..59 Unsigned integer 3010h 1 Secondi evento 2 Seconds of event 2 0..59 Unsigned integer...... 34FDh 1 Codice evento 255 (piu vecchio) Code of event -255 (oldest) 0..162 Unsigned integer 34FEh 1 Giorni evento 255 Days of event 255 0..65535 Unsigned integer 34FFh 1 Ore evento -255 Hours of event 255 0..23 Unsigned integer 35 1 Minuti evento 255 Minutes of event 255 0..59 Unsigned integer 3501h 1 Secondi evento 255 Seconds of event 255 0..59 Unsigned integer Il significato del codice dell evento puo essere determinato nella tabella alla pagina seguente. In caso non siano registrati eventi viene ritornato il codice 0. The meaning of the event code can be found in the table in the following page. In case there is no recorded event code 0 will be returned Dato che l RGAM non e fornito di orologio datario, per determinare una collocazione temporale agli eventi vengono forniti numero di giorni, di ore, di minuti e di secondi trascorsi dal momento della messa in tensione dell RGAM al momento dell evento (vedere pagina seguente). E poi possibile interrogare l RGAM per sapere, in ogni momento, quanto tempo e trascorso dalla messa in tensione. Incrociando questi due dati e relazionandoli ad un orologio datario (ad esempio quello di un PC) e possibile risalire alla data/ora dell evento. Esempio: Data/ora evento = Data/Ora attuale Tempo trascorso da accensione + Tempo evento Nota: Quando l RGAM viene disalimentato, la storia degli eventi viene azzerata. Since the RGAM is not equipped with an internal Real-time-clock, to find the time-stamp for each event it is possible to get how many days, hours, minutes and seconds have elapsed from the moment of power-on to the moment of the selected event. It is also possible to query the RGAM to have the time elapsed from its power-on (see next table). Using those data and a real-time-clock reference (for instance the RTC of a PC) it is possible to calculate the time-stamp for each event. Example: Event time stamp = Actual Date/time Time elapsed from power-on + Time of the event. Note: when the RGAM is powered off, the event history is cleared. TABELLA 10: TABLE 10: RIFERIMENTI PER DATA/ORA EVENTI REFERENCE FOR EVENTS TIME-STAMP INDIRIZZO WORDS PARAMETRO PARAMETER RANGE FORMATO FORMAT 4002h 1 Giorni trascorsi dal power-on Days since power-on 0..65535 Unsigned integer 4003h 1 Ore dal power-on Hours since power-on 0..23 Unsigned integer 4004h 1 Minuti dal power-on Minutes since power-on 0..59 Unsigned integer 4005h 1 Secondi dal power-on Seconds since power-on 0..59 Unsigned integer Doc: AD2005B1.doc 22/02/2005 p. 12 / 13
Tabella codici Eventi Cod. Evento 001 Inizio allarme A01 002 Inizio allarme A02 024 Inizio allarme UA4 031 Fine allarme A01 032 Fine allarme A02 054 Fine allarme UA4 061 RGAM in modalita' OFF 062 RGAM in modalita' MAN 063 RGAM in modalita' AUT 064 RGAM in modalita' TEST 071 Teleruttore RETE chiuso 072 Teleruttore RETE aperto 073 Teleruttore GENERATORE chiuso 074 Teleruttore GENERATORE aperto 075 Motore in moto 076 Arresto motore 077 Tensione di RETE presente 078 Tensione di RETE assente 079 Tensione di GENERATORE presente 080 Tensione di GENERATORE assente 081 Tentativo di avviamento 082 Motore in moto (segnale frequenza) 083 Motore in moto (segnale tensione generatore) 084 RGAM sotto controllo remoto 085 Fine del controllo remoto 086 Comando manuale di START 087 Comando manuale di STOP 088 Commutazione manuale teleruttore RETE 089 Commutazione manuale teleruttore GENERATORE 090 Accesso al menu base (dal pannello frontale) 091 Accesso al menu esteso (dal pannello frontale) 092 Accesso al menu allarmi utente (dal pannello frontale) 093 Accesso al menu base (da controllo remoto) 094 Accesso al menu esteso (da controllo remoto) 095 Accesso al menu allarmi utente (da controllo remoto) 096 Accesso ai parametri di Adjust (dal pannello frontale) 097 Reset software (warm boot) 098 Chiamata entrante da modem 099 Linea telefonica chiusa 100 Tentativo di connessione a PC 101 Connessione a PC OK 102 Connessione a PC fallita 103 Tentativo di invio messaggio SMS1 104 Invio messaggio SMS1 OK 105 Invio messaggio SMS1 fallito 106 Tentativo di invio e-mail 107 Invio messaggio e-mail OK 108 Invio messaggio e-mail fallito 109 Parametri modem modificati (da controllo remoto) 110 Tentativo di invio messaggio SMS2 111 Invio messaggio SMS2 OK 112 Invio messaggio SMS2 fallito 113 Tentativo di invio messaggio SMS3 114 Invio messaggio SMS3 OK 115 Invio messaggio SMS3 fallito 116 Ricezione comandi da SMS Event codes table Cod. Event 001 Begin of alarm A01 002 Begin of alarm A02 024 Begin of alarm UA4 031 End of alarm A01 032 End of alarm A02 054 End of alarm UA4 061 RGAM in OFF mode 062 RGAM in MAN mode 063 RGAM in AUT mode 064 RGAM in TEST mode 071 MAINS contactor closed 072 MAINS contactor opened 073 GEN contactor closed 074 GEN contactor opened 075 Engine running 076 Engine not running 077 MAINS voltage present 078 MAINS voltage absent 079 GEN voltage present 080 GEN voltage absent 081 Starting attempt 082 Engine running (from frequency) 083 Engine running (from generator voltage) 084 RGAM is under remote control 085 End of remote control 086 Manual START command 087 Manual STOP command 088 Manual MAINS contactor changeover 089 Manual GEN contactor changeover 090 Access to base setup parameters (from front panel) 091 Access to Advanced setup parameters (from front panel) 092 Access to user alarms setup parameters (from front panel) 093 Access to base setup parameters (from remote control) 094 Access to Advanced setup parameters (from remote control) 095 Access to user alarms setup parameters (from remote control) 096 Access to Adjust parameters (from front panel) 097 System reset (warm boot) 098 Incoming call from modem 099 Phone line closed 100 Trying modem connection to PC 101 Modem connection to PC OK 102 Modem connection to PC failed 103 Trying to send SMS1 message 104 SMS1 message sent OK 105 SMS1 message sending failed 106 Trying to send Email message 107 Email message sent OK 108 Email message sending failed 109 Access to modem parameters (from remote control) 110 Trying to send SMS2 message 111 SMS2 message sent OK 112 SMS2 message sending failed 113 Trying to send SMS3 message 114 SMS3 message sent OK 115 SMS3 message sending failed 116 Receiving commands from SMS Doc: AD2005B1.doc 22/02/2005 p. 13 / 13