Manual Modbus
Manual Modbus
Modbus Communication
User's manual
Contents
GENERAL 3
Functionality 3
Characteristics 3
Specific Modbus TCP features for GPRS solar version 3
COMMUNICATION MODULE 4
Communication module configuration 4
Flite communication parameters 5
Parameters Flite x to y 6
Alarm and storage parameters 6
Alarm parameters: Overall 7
Alarm Parameters: Flite information 7
Alarm Parameters: G200 information 8
Relay parameters 9
Communication parameters 10
Modbus TCP/IP parameters 13
Display events 14
Display analog 14
Flite counters 15
Equipment state 16
MODBUS analyser 17
Time setup 18
Radio analyser 18
MODBUS DATA ADDRESSES AND ENCODING 19
General 19
Identification / configuration zone 21
Time synchronisation zone 21
Test zone 22
Event zone 22
TCD / TSS zone 24
Parameters zone 27
Diagnostic counter reading 34
Report by exception without any modem 35
Report by exception with GSM 35
Report by exception with GPRS 36
APPENDIX 37
MODBUS protocol (non GPRS version) 37
MODBUS TCP protocol (GPRS version only) 39
Read N bits: functions n°1 and 2 40
Read N words: functions n°3 and 4 40
Write a bit: function n°5 41
Write a word: function n°6 41
Read diagnostic counters: function n°8 42
Write N consecutive words: function n°16 43
Report Slave ID: function n°17 43
CRC 16 calculation algorithm 44
Write CRC 16 calculation in C language 44
Functionality
Monitoring
Network faults (di/dt or IMAX)
Voltage losses/ returns
Flite Low battery and communication failures
Measurements
Phase currents(I_min, I_max, I_mean and I_inst)
MV presence statistics
Remote control
Flite parameters
G200 parameters
Long range communication
Storage and alarm information
Characteristics
type of transmission asynchronous serial
protocol Standard Modbus slave or Modbus TCP
speed 300, 600, 1200, 2400, 4800,
9600, 19200 baud
data format 1 start bit, 8 data bits with no parity, 1
stop bit
electrical interface RS232, GSM or GPRS
Consequently, a non-permanent mode has been developed. In this mode, Scada system and G200 can be both TCP client
and server. It means that the G200 is establishing a connection on alarm. The SCADA system can also establish a
connection on demand but in both case TCP link is never maintained.
For dynamic IP, each time the G200 is changing its IP address, an alarm can be activated and the G200 is establishing a
connection to provide its new IP address to the SCADA..
Communication module
configuration
Equipment Name:
Local name only used to access a hidden GSM version
menu (reserved to the manufacturer). ╔═════════ MERLIN GERIN - Configuration and Diagnostic - ALT+F4=Exit ══════════╗
║ Easergy G200 Modbus ║
Flite Identification: ║ PROM v2.00 ║
║ ║
When selected, G200 searches for all ║ ║
nearby FLITE units and records their ║ EQUIPMENT NAME: G200Modb ║
║ ║
unique physical address. ║ FLITE SETUP : ║
The process takes 2 minutes approx. ║
║
Flite Identification
Parameters Flite 1 to 6
Flite Communication Parameters
Parameters Flite 7 to 9
║
║
║ ║
Flite Communication parameters: ║ MODBUS Address: 1 ║
║ Alarm and Storage Parameters Relay Parameters ║
Gives access to the short range radio ║ ║
G200-FLITE communication parameters ║ COMMUNICATION SETUP : ║
║ Modem Slot 1 : GSM Modem Slot 2 : Short Range Radio ║
║ Communication Parameters ║
Parameters Flite x to y: ║ ║
║ SAVE CONFIGURATION : OK Export ║
Gives access to fault parameters of each ║ Cancel Import ║
FLITE unit (referred to with a logical ║ DIAGNOSIS ║
║ Display events Erase events Setup Time ║
address 1 to 9) ║ Display analog Equipment states ║
║ Flite counters Modbus analyser RADIO analyser ║
╚══════════════════════════════════════════════════════════════════════════════╝
Modbus Address:
Source address used by the remote
GPRS version
SCADA to identify this G200 through the
protocol. ╔═════════ MERLIN GERIN - Configuration and Diagnostic - ALT+F4=Exit ══════════╗
║ Easergy G200 Modbus GPRS ║
Adjustable from 1 to 255 in GSM and ║ PROM v1.00 ║
RS232 version. ║ ║
║ EQUIPMENT NAME: G2MGPRS ║
1 is the default modbus address value in ║ ║
GSM and RS232 version. In GPRS ║ FLITE SETUP : ║
║ Flite Identification Flite Communication Parameters ║
version, the value is fixed to 255 ║ Parameters Flite 1 to 6 Parameters Flite 7 to 9 ║
║ ║
║ MODBUS Address: 255 ║
Alarm and storage parameters: ║ Alarm and Storage Parameters Relay Parameters ║
Gives access to alarm & storage menu ║ ║
║ COMMUNICATION SETUP : ║
║ Modem Slot 1 : GPRS Modem Slot 2 : Short Range Radio ║
Note: for RS232, the link is permanent so ║ GPRS parameters ║
║ Modbus TCP/IP parameters ║
alarms have no use. ║ ║
║ SAVE CONFIGURATION : OK Export ║
║ Cancel Import ║
Relay parameters: ║ DIAGNOSIS ║
menu used to configure Relay parameters. ║ Display events Erase events Setup Time ║
║ Display analog Equipment states ║
║ Flite counters Modbus analyser RADIO analyser ║
Modem Slot 1: ╚══════════════════════════════════════════════════════════════════════════════╝
Direct RS232:
Direct RS232 : permanent link. Communications Parameters
Modem Hayes (dial-up): (Direct RS232 and Data Modem only):
Hayes : for Hayes compatible modems. Gives access to long range communication parameter settings
GSM: for AT commands compatible GSM
modems. GPRS Parameters (GPRS Modem only):
Gives access to GPRS menu
Modem GPRS:
GPRS: for WAVECOM GPRS/ GSM Modbus TCP/IP Parameters (GPRS Modem only):
modems with embedded IP stack Gives access to Modbus TCP/ IP menu
Flite communication
parameters
╔═════════ MERLIN GERIN - Configuration and Diagnostic - ALT+F4=Exit ═════════╗
This menu is used to set the short range ║ Flite Communication Parameters ║
communication parameters between G200 and ║ ║
║ Serial Number Wink RSSI Level logical Address ║
FLITE units. ║ ║
║ 012B043002C0 WINK RSSI 1 ║
║ 012B043002D5 WINK RSSI 2 ║
IMPORTANT : during the first installation, it ║ 012B04300315 WINK RSSI 3 ║
is vital to activate a FLITE identification ║ 012B0430000B WINK RSSI 4 ║
║ 012B04300317 WINK RSSI 5 ║
command (main menu) to update this menu. ║ 012B043002C3 WINK RSSI 6 ║
║ 012B043002CA WINK RSSI 7 ║
║ 012B043002CB WINK RSSI 8 ║
Serial Number: this is the physical address (in ║ 012B0430031C WINK RSSI 9 ║
║ ║
hexadecimals, on 6 bytes) of the FLITE units ║ ║
identified by the G200. This list is updated by ║ ║
║ Get Flite Current ║
the "FLITE identification" command in the main ║ Get Flite Info ║
menu. This field cannot be modified by the ║ Nota : an indicator is considered as missing if its logical address is 0 ║
║ ║
operator. ║ Measuring period : 1 h ║
N.B.: The value FFFFFFFFFFFF means that ║ ║
║ Escape=Exit ║
there is no corresponding FLITE unit. ╚═════════════════════════════════════════════════════════════════════════════╝
Wink: the WINK command (signal) is used to For example, say that 3 FLITEs have been detected
flash a FLITE unit. FLITE on phase A => select 1 as its logical address
FLITE on phase B => select 2 as its logical address
RSSI Level: the RSSI command (Received FLITE on phase C => select 3 as its logical address
Signal Strength Indication) is used to get
information on the signal level received by Measuring period: this is the period used by FLITE for current
FLITE. In good conditions, the indication measurement . It is either set to 2 mn (for test purpose only) or to 1 hour
should be greater than 30 %. (standard operation).
Logical Address: Configurable from 0 to 9, Get Flite Current: when selected, this command retrieves the latest current
this is the logical address that is used by the value measured from all FLITE units (data available in “display analog”
G200 to address FLITE. An indicator is menu).
considered as not present if its logical address
is 0. Get Flite Info: when selected, this command retrieves the latest value of
communication counters from all FLITE units (data available in “Flite counters”
IMPORTANT : All FLITE units must have a menu).
different logical address from 1 to 9
Communication module
Parameters Flite x to y
╔═════════ MERLIN GERIN - Configuration and Diagnostic - ALT+F4=Exit ═════════╗
These two menus are used to configure FLITE ║ Parameters Flite 1 to 6 ║
fault detection parameters. ║ ║
║ ║
║ ║
For each FLITE unit, following parameters are ║ Flite Flite Flite Flite Flite Flite ║
adjustable: ║ n°1 n°2 n°3 n°4 n°5 n°6 ║
║ ║
║ FAULT DETECTION ║
DI/DT level: ║ DI/DT level : 60 A 60 A 60 A 60 A 60 A 60 A ║
║ I max level : 250 A 500 A 500 A 500 A 500 A 500 A ║
Minimum phase current variation threshold ║ auto. Reset : 3 s 3 s 3 s 3 s 3 s 3 s ║
above which a fault is detected. ║ Flash time : 2 h 2 h 2 h 2 h 2 h 2h ║
║ Inrush : 3 s 3 s 3 s 3s 3 s 3 s ║
Adjustable from 6 to 80A, or disabled. ║ Validation : On On On On On On ║
DT is automatically set to 30ms (50Hz) or ║ MV level(1) : A A A A A A ║
║ ║
25ms (60HZ) for FLITE116-SA ║ ║
║ (1): A = single circuit , B = multi-circuit ║
Note: the selected threshold may be set at any ║ ║
║ ║
value, whatever the load current is. This is why ║ ║
using a DI/DT algorithm is preferred to a IMAX ║ ║
║ Escape=Exit ║
algorithm, for one may apply the same value for ╚══════════════════════════════════════════════════════════════════════════════
the whole feeder since the feeding substation. ╝
Flash time:
Imax level: time-out after which flash is reset.
Minimum absolute phase current threshold Adjustable from 2 to 16 hours.
above which a fault is detected.
Adjustable from 100 to 800A Inrush:
Used to filter inrush currents due to MV/LV transformers magnetising
Note: the selected threshold must be greater currents upon line energising.
than the maximum load current in use on the Adjustable to 3/ 30/ 60s or to OFF (“without”).
conductor at the location where it is installed. Setting it to OFF means to de-activate the inrush filter (not recommended)
Alarm parameters:
Overall
Alarm Parameters:
Flite information
Imax Fault:
Alarm of all IMAX faults detected by any
FLITE unit.
Voltage presence :
Alarm of voltage presence/absence
Config fault:
Alarm activation when a FLITE configuration
fails.
Alarm Parameters:
G200 information
Equipment Start:
Alarm of all G200 starts/ restarts GSM version
╔═════════ MERLIN GERIN - Configuration and Diagnostic - ALT+F4=Exit ═════════╗
║ Alarm Parameters : G200 information ║
Conf: ║ ║
Alarm on local/ remote configuration ║ ║
║ Alarm ║
It is set to “0” for a local configuration ║ ║
and to “1” for a remote one ║ Equipment Start : Not alarmed ║
║ Conf (local or remote) : Not alarmed ║
║ ║
Modbus event stack 80%: ║ Modbus event stack 80% : Alarmed on bit set ║
║ ║
Alarm on modbus event stack 80% ║ ║
overflow occurrences ║ Digital Input 1 : Not alarmed ║
║ Digital Input 2 : Not alarmed ║
When the modbus event stack has ║ Digital Input 3 : Not alarmed ║
reached 80% of its capacity, it may send ║ Digital Input 4 : Not alarmed ║
║ Digital Input 5 : Not alarmed ║
an alarm to the SCADA so that it ║ Digital Input 6 : Not alarmed ║
downloads the stack before event loss ║ ║
║ ║
occurs ║ ║
║ ║
║ ║
Digital Input x: ║ Escape=Exit ║
Alarm on digital input status change ╚═════════════════════════════════════════════════════════════════════════════╝
Relay parameters
Each digital output relay may be assigned to ╔═════════ MERLIN GERIN - Configuration and Diagnostic - ALT+F4=Exit ═════════╗
║ Relay Parameters ║
one of the following actions: ║ ║
║ ║
Fault: ║ Relay activation : no (Not recommended with solar panel power supply) ║
when a line fault occurs on any FLITE, the ║ Relay 1 : Fault ║
║ Relay 2 : Com.Fault ║
digital output (DO) closes. When all line ║ Relay 3 : Bat.Fault ║
faults are cleared, the DO opens. ║ ║
║ ║
Com fault: ║ ║
when a short range communication failure ║ ║
║ ║
occurs on any FLITE, the DO closes. When ║ ║
all communication failures are cleared, the ║ ║
║ ║
DO opens. ║ ║
Bat Fault: ║
║
║
║
when a battery failure occurs on any FLITE, ║ ║
the DO closes. When all battery failures are ║ ║
║ ║
cleared, the DO opens. ║ ║
║ Escape=Exit ║
Fault x: ╚═════════════════════════════════════════════════════════════════════════════╝
if a line fault occurred on FLITE number x
(x=1,2 or 3), the DO closes . When the fault
is cleared, the DO opens.
Communication parameters
RS232 version
The following menu are used to set the long ╔═════════ MERLIN GERIN - Configuration and Diagnostic - ALT+F4=Exit ═════════╗
║ Communication Parameters ║
range communication parameters (between ║ ║
the G200 and the remote control system) ║ ║
║ ║
║ Modem : Direct RS 232 ║
Host baud rate: ║ ║
Data communication speed between ║
║
Host baud rate : 9600 bauds ║
║
SCADA and G200. ║ Handle DSR : no ║
Adjustable from 200 to 9,600 bps. ║
║
Handle CTS : no ║
║
Default value: 9,600 bps. ║ RTS delay (Only if Handle CTS = no): 10ms ║
║ ║
Note : for test purpose, it is better to select a ║ ║
║ ║
low speed so that it is easier to see exchanged ║ ║
messages between SCADA and G200 (see ║ ║
║ ║
Modbus analyser below) ║ ║
║ ║
Handle DSR: ║ ║
║ ║
Select yes if you want G200 to detect ║ Escape=Exit ║
connection using DSR signal. ╚═════════════════════════════════════════════════════════════════════════════╝
Default value: no
Host tel number (main): Note: it is possible to have both an alarm sent to the SCADA and a SMS to a
SCADA main phone number, used to send cell phone. The short message is sent first.
the alarms to SCADA.
15 digits maximum. SMS service center phone number:
Phone number of the SMS server
Host tel number (standby): Please refer to the SIM card user’s guide in which this phone number is
SCADA backup phone number, in case of given.
no access using the main phone number. Note: you may set the phone number in international format (for example
15 digits maximum. “+336….” for a French cell phone number.
GPRS version
PIN code:
GPRS version only
Setting of the PIN into the SIM card (default
╔═════════ MERLIN GERIN - Configuration and Diagnostic - ALT+F4=Exit ═════════╗
value is 0000). ║ GPRS parameters ║
In case a wrong PIN is entered, "SIM card ║ ║
║ SIM CARD PARAMETERS ║
failure" appears in the screen "Equipment ║ PIN code : 0000 ║
states". ║ ║
║ GPRS COMMUNICATION PARAMETERS ║
║ APN Server (Max 30 Digits) : ║
Beware: after 3 unsuccessful PIN operations, ║ APN Login (Max 30 Digits) : ║
the SIM card is locked. To unlock it, a mobile ║ APN Password (Max 30 Digits) : ║
║ ║
phone set is needed (G200 cannot do it). ║ Time between connection attempts : 30mn ║
Please also refer to the SIM card user’s guide ║ ║
║ Time of daily modem reset : 0 h 0 mn ║
to unlock it. ║ ║
║ ║
APN Server: ║ ║
║ ║
Enter the APN (Access Point Name) given ║ ║
║ ║
by your GPRS network provider ║ ║
║ ║
APN Login and Password: ║ ║
║ Escape=Exit ║
Enter the login and the password provided ╚═════════════════════════════════════════════════════════════════════════════╝
with your GPRS account.
G200 performs a daily modem reset.
Note: in most cases, login and password are If the IP address is dynamic, at the new network connection, the IP
not required for GPRS access. address will be changed. To avoid having too many connection attempts to
Time between connection attempts: the SCADA at the same time due to alarm on IP address change, daily
modem reset time is configurable
If a GPRS connection loss occurs, G200
will wait before establishing a new GPRS Time of daily modem reset:
connection. Set hour and minutes of the daily modem reset time
G200 parameters
Display events
The "Display events" menu is used to review ╔═════════ MERLIN GERIN - Configuration and Diagnostic - ALT+F4=Exit ═════════╗
stored time-stamped events locally. ║ Display events ║
║ ║
When all events have been displayed, their ║ 82 - 11/04/07 10:22:37.19 - Local configuration ║
║ 83 - 11/04/07 10:22:37.23 - Flite config start Fl1 ║
total number is indicated on the same line as ║ 84 - 11/04/07 10:22:41.30 - Flite config stop Fl1 ║
the message 'End of xx events'. ║ 85 - 11/04/07 10:22:41.87 - Flite presence Fl1 ║
║ 86 - 11/04/07 14:35:00.02 – Remote configuration ║
It is then possible to move around the list ║ 87 - 11/04/07 14:35:01.25 - Digital Input 1 on ║
using the arrow keys. ║ 88 - 11/04/07 14:35:01.25 - Digital Input 2 on ║
║ 89 - 11/04/07 14:35:01.26 - Digital Input 6 on ║
║ 90 - 11/04/07 14:40:28.28 - Digital Input 1 off ║
100 time-stamped events may be recorded. ║ 91 - 11/04/07 14:40:28.29 - Digital Input 2 off ║
When this number is exceeded, the first event ║ 92 - 11/04/07 14:40:37.68 – Digital Input 6 off ║
║ 93 - 11/04/07 14:40:52.27 - Local configuration ║
in the list is "Events loss". ║ 94 - 11/04/07 14:40:52.43 - Equipment start ║
║ 95 - 11/04/07 14:40:52.98 - End of Flite presence Fl1 ║
Events may be erased by selecting "Erase ║ 96 - 11/04/07 14:40:53.49 - Digital Input 1 on ║
║ 97 - 11/04/07 14:40:53.49 - Digital Input 2 on ║
events" in main menu. ║ 98 - 11/04/07 14:40:53.50 - Digital Input 6 on ║
Confirmation is requested by "Confirm (Y/N)". ║ 99 - 11/04/07 14:41:43.11 - Digital Input 6 off ║
║ 100 - 11/04/07 14:41:43.81 - Digital Input 1 off ║
Pressing the "Y" key permanently erases the ║ End of the 100 events ║
time-stamped events. ║ ESCAPE=Exit ║
╚═════════════════════════════════════════════════════════════════════════════╝
Display analog
The "Display analog" menu is used to display ╔═════════ MERLIN GERIN - Configuration and Diagnostic - ALT+F4=Exit ═════════╗
the instant measurements from the FLITES. ║ Display analog ║
║ Instant Value ║
To refresh these values, press “Get pic data” ║ ║
║ ║
command in the “Flite communication ║ Adr date I ║
parameters” menu. ║ ║
║ 1 00/00 00:00:00 0 A ║
║ 2 00/00 00:00:00 0 A ║
║ 3 00/00 00:00:00 0 A ║
║ 4 00/00 00:00:00 0 A ║
║ 5 00/00 00:00:00 0 A ║
║ 6 00/00 00:00:00 0 A ║
║ 7 00/00 00:00:00 0 A ║
║ 8 00/00 00:00:00 0 A ║
║ 9 00/00 00:00:00 0 A ║
║ ║
║ ║
║ ║
║ ║
║ ║
║ ║
║ ║
║ ESCAPE=Exit ║
╚═════════════════════════════════════════════════════════════════════════════╝
Flite counters
The "Flite counters" menu is used to display the ╔═════════ MERLIN GERIN - Configuration and Diagnostic - ALT+F4=Exit ═════════╗
statistics counters from the FLITES. Refresh ║ Flite counters ║
║ ║
these values with “Get Flite info” command in ║Communication Diagnose: ║
“Flite communication parameters” menu. ║ ║
║ FLITE 1 2 3 4 5 6 7 8 9 ║
║ ║
Counters are listed here below : ║ Trs232 0% 0% 0% 0% 0% 0% 0% 0% 0% ║
║ Tradio 0% 0% 0% 0% 0% 0% 0% 0% 0% ║
Trs232: ║ Tapp 0% 0% 0% 0% 0% 0% 0% 0% 0% ║
Acknowledge rate of message sending on ║ ║
║ ║
the serial port between the radio ║ ║
component and the PIC. ║ ║
║ ║
It should be more than 80%. ║ ║
Tradio: ║ ║
║ ║
Sending rate of message previously ║ ║
acknowledged. ║ ║
║ ║
It should be 100% ║ ║
Tapp: ║ ║
║ ESCAPE=Exit ║
Application acknowledge rate. ╚═════════════════════════════════════════════════════════════════════════════╝
It should be more than 80 %.
Note : if the resulting rate is lower than the one
expected, It could be due to a hardware
problem on the FLITE unit. Replace the FLITE
with another one and do the test again.
If the problem is still there, it could be due to a
disturbed radio environment or a wrong
installation.
Equipment state The equipment states menu is used to display the information linked to the
state of the G200 and the FLITES.
Equipment fault: The equipment encounters a
configuration fault. Hayes and RS232 Version
╔═════════ MERLIN GERIN - Configuration and Diagnostic - ALT+F4=Exit ═════════╗
Modem not identified: G200 was unable to ║ Equipment states ║
║ Equipment Fault : no Modem not identified no ║
communicate with the modem used. ║ Alarm processing : no SIM card failure no ║
║ ║
║ Modem state : ║
Alarm processing: an alarm is under process. ║ GSM signal quality:(must be > 16) ║
║ received signal: 0 ░░░░░░░░░░░░░░░░ Max(31) - Not detectable(99) ║
║ ║
SIM card failure: G200 has detected the ║ Fault Pres Bat.Fault I ave I min I max MV Comm.Qual Conf.Fault║
embedded GSM modem card, but cannot read ║ 1 no no 0 A 0 A 0 A 0% 0% no ║
║ 2 no no 0 A 0 A 0 A 0% 0% no ║
the SIM card. ║ 3 no no 0 A 0 A 0 A 0% 0% no ║
║ 4 no no 0 A 0 A 0 A 0% 0% no ║
║ 5 no no 0 A 0 A 0 A 0% 0% no ║
Received signal: indicates the Received Signal ║ 6 no no 0 A 0 A 0 A 0% 0% no ║
Strength Indication of the modem. Should be ║ 7 no no 0 A 0 A 0 A 0% 0% no ║
║ 8 no no 0 A 0 A 0 A 0% 0% no ║
above 16. ║ 9 no no 0 A 0 A 0 A 0% 0% no ║
║ ║
║ ║
IP address (only GPRS): Indicates the current ║ ║
║ ║
IP address of the G200. ║ ESCAPE=Exit ║
╚═════════════════════════════════════════════════════════════════════════════╝
The FLITE states are as follows:
Fault Pres.: GPRS version
fault detected on FLITE no. x ╔═════════ MERLIN GERIN - Configuration and Diagnostic - ALT+F4=Exit ═════════╗
Battery fault: ║ Equipment states ║
║ Equipment Fault : no Modem not identified no ║
battery fault of FLITE no. x ║ Alarm processing : no SIM card failure no ║
Iav: ║ ║
║ Modem state : TCP Listened ! IP address : 80.10.21.121 ║
last received average load ║ GSM signal quality:(must be > 16) ║
Imin: ║ received signal: 22 ░░░░░░░░░░░░░░░░ Max(31) - Not detectable(99) ║
║ ║
last received minimum current ║ Fault MV Com. Batt. Conf. I ave I min I max MV Comm. ║
Imax: ║ Pres. Pres. Fault Fault Fault (A) (A) (A) (kV/m) Qual(%) ║
║ 1 no no 0 A 0 A 0 A 0% 0% no ║
last received average load ║ 2 no no 0 A 0 A 0 A 0% 0% no ║
MV: ║ 3 no no 0 A 0 A 0 A 0% 0% no ║
║ 4 no no 0 A 0 A 0 A 0% 0% no ║
last received MV availability ║ 5 no no 0 A 0 A 0 A 0% 0% no ║
║ 6 no no 0 A 0 A 0 A 0% 0% no ║
║ 7 no no 0 A 0 A 0 A 0% 0% no ║
Comm Qual.: indicates (in %) the quality of the ║ 8 no no 0 A 0 A 0 A 0% 0% no ║
║ 9 no no 0 A 0 A 0 A 0% 0% no ║
radio communication between the G200 and the ║ ║
FLITE no. x. This indicator must be 100 %. (The ║ ║
indicator is regularly refreshed according to the ║ ║
║ ESCAPE=Exit ║
period of measurement of the FLITE). ╚═════════════════════════════════════════════════════════════════════════════╝
GPRS version:
Note: the counter is initially set to 100% at each
configuration loading, then it is reduced Modem state comments
gradually when measurements are not updated
within the time given (with an additional delay of Modem Init... G200 is configuring the modem
2 minutes to take repeats into account ). Entering code pin... -
Code pin error ! Wrong PIN code
Conf fault: configuration of the FLITE no. x is Network registration... IMSI registration
not complete. GPRS registration...
PDP Init... Open a PDP session
Modem state: PDP Closing... Close the PDP session
indicates the current state of the modem PDP Status... Check the PDP status
Hayes version: PDP Connected ! Standby state before listen mode is activated.
MODBUS analyser G200 provides a protocol analyser (with a Modbus frame specific decoder).
This feature is accessible from the MODBUS analyser menu on the PC
connected to the configuration plug.
Use: Display:
The "SPACE" key is used to stop scrolling, The first column gives the time of the message in minutes, seconds and
thereby facilitating analysis of the frames 100ths of seconds.
received.
The second column indicates the type of frame. Upper case characters are
The "C" key clears the screen. used for frames transmitted by the G200. This is confirmed by the double
chevron '>>' in column 3. On the other hand, all the lower case characters
The "S" key activates the storage of the pertain to frames received by the remote control station (confirmed by a single
exchanges (only when the modbus analyser is chevron '<' in column 3).
opened).
The last column displays the frame in hexadecimal form. The "+" and ' * '
The ‘’F’’ key changes the filtering method. signs may precede the display of the frame:
Display all received frames The '+' sign indicates frames not intended for the equipment,
Display only frames addressed to this The ' * ' sign indicates an erroneous frame (incomplete frame, faulty
G200. construction,...).
Time setup
The equipment clock may be set by the ╔═════════ MERLIN GERIN - Configuration and Diagnostic - ALT+F4=Exit ═════════╗
configuration computer: ║ Setup Time ║
║ ║
║ ║
Automatic setup time: ║ ║
║ automatic Time setup (from laptop) ║
G200 automatically adjusts its date & time ║ ║
to the PC date & time ║ Date : 10/04/07 ║
║ Time : 08:54:53 ║
║ ║
Manual setup time: ║ Clock stop (for an extended storage) ║
║ ║
G200 clock is manually set by the user ║ ║
║ ║
Stop clock: ║ ║
║ ║
When the equipment is stored for a long ║ ║
period of time, it is recommended to stop ║ ║
║ ║
the clock to increase the service lifetime of ║ ║
the lithium battery associated with the ║ ║
║ ║
component that manages the clock. ║ ║
║ Escape=Exit ║
╚═════════════════════════════════════════════════════════════════════════════╝
Notes:
(1) the G200 is delivered with the clock
stopped.
(2) Date and time are only used for dating
time-stamped events and by the protocol
analyser
Radio analyser
This menu is used to analyse the data ╔═════════ MERLIN GERIN - Configuration and Diagnostic - ALT+F4=Exit ═════════╗
exchange on the short range radio link to each ║ RADIO analyser ║
║ ║
FLITE unit. ║ ║
║ESCAPE=Exit, SPACE=Pause, C=Clear, S=Save Trace ║
Main causes of use are: ║ ║
║00:00.17 REQ_SEND_MESSAGE >> FF 02 0B 22 01 2A 04 30 02 A4 06 1A 5E 03║
Absence of FLITE - G 200 dialogue ║00:00.27 ACK
║00:00.35 RES_SEND_FRAME
< FF 02 04 06 56 02
< FF 02 05 21 00 56 03
║
║
Check: ║00:00.42 ACK >> FF 02 04 06 56 02 03 ║
║00:03.64 RECEIVED_FRAME < FF 02 0D 30 01 2A 04 30 02 A4 14 06 00 8C║
equipment power supply ║C8 ║
state of transmission interface (aerial, ║00:03.71 ACK >> FF 02 04 06 56 02 03 ║
║ ║
FLITE position, etc.) ║ ║
FLITE power supply (FLITE battery, …), ║ ║
║ ║
start-up procedure, ║ ║
Functional faults report (Remote controls ║
║
║
║
not executed, remote indications not ║ ║
║ ║
received) ║ ║
Check: ║ ║
╚═════════════════════════════════════════════════════════════════════════════╝
FLITE power supply,
Communication with the FLITE (possible
short range radio disturbances)
General
Addressing with RS232 and GSM version
A MODBUS master can access 255 storage spaces of 64K words (255 MODBUS
addresses).
To increase the addressing capability, the MODBUS master may use the test
zone to identify more accurately the equipment.
- report by exception
- events
- alarms
- parameters
- test zone
To identify a RTU, a scada may use its IP address (if the network provided fix IP
address for the G200) or its Slave ID if the IP address is dynamic..
In the case there is no fix IP address for the equipment on the network, the scada
must be listening on an opened port on which the RTU can open a TCP connection.
To identify the RTU, the scada automatically sends an identification frame on
connection. In case of IP address change, the equipment can be set to call the Scada
so that it can call back afterwards.
Reply messages
Upon receipt of a request recognised by the equipment (read or write),
transmission of the data corresponding to the MODBUS specifications.
Read zone
The number of words read may not exceed the size of the checked zone.
Notes
The bit by bit write and read functions are not used in the G200 application.
Values followed by the letter "h" are in hexadecimal form (e.g. 0003h).
In the charts describing the data exchanged between the master and the
G200, the hatched strips in the "authorised function" columns indicate the zones
that are accessible as a whole.
Terminology
TCD: remote control (digital output encoded in 2 bits)
Identification /
configuration zone
word address access mode authorised
0000h to 0001h function
Software version 0000h read 3,4
Status 0001h read 3,4
0 = No events loss
1 = Loss of events
This bit is set when the modbus event file is full. The event ‘’event loss’’ is then
placed in the file. As long as this event is in the file, no other event can be
memorised. This bit is reset when the file is half empty. This change of state
doesn’t generate an event.
This zone contains the internal date The zone may only be read or written
Time synchronisation and time of the equipment for time as a whole.
zone stamping of events.
0 Year (0 to 99)
b15 b8 b7 b0
millisecond (0 to 59999)
b15 b8 b7 b0
Each event is encoded with 4 words related to the event, followed by 4 words
containing the event time-stamping data:
Acknowledgement of events
To inform the G200 that it has correctly received the frame it has read, the
master must :
write the number of the last exchange it has received in the "exchange
number" byte
After acknowledgement, the G200 erases the events that have already been
transmitted and replaces them by new ones when applicable.
Note: until the exchange word written by the master becomes "X,0" (with X =
number of the previous exchange that the master wishes to acknowledge), the
exchange word in the table remains at "X, number of previous events".
Writing a TCD word performs remote bit 2: Serious fault detected during
control orders. Only one remote internal check.
control order at a time may be
requested.
bit 3: not used.
The control order zone (TCD) may be
bit 4: not used.
read with bit and word read function
code. As it contains no information the
bit 5: Failure to execute for an
data is 0.
unknown reason.
TSS16 TSS15 TSS14 TSS13 TSS12 TSS11 TSS10 TSS9 TSS8 TSS7 TSS6 TSS5 TSS4 TSS3 TSS2 TSS1
b15 b8 b7 b0
TSS Single remote indications Word bit TSS Single remote indications Word bit TSS Single remote indications Word bit
1 Equipment start 32h 0 49 Fault dI/dt - ind. 5 35h 0 97 Reserved 38h 0
2 Configuration 32h 1 50 Fault Imax - ind. 5 35h 1 98 Reserved 38h 1
3 Modbus event stack 80% 32h 2 51 Battery fault - ind. 5 35h 2 99 Reserved 38h 2
4 Reserved 32h 3 52 Volt. Presence - ind. 5 35h 3 100 Reserved 38h 3
5 Reserved 32h 4 53 Comm. Fault - ind. 5 35h 4 101 Reserved 38h 4
6 Reserved 32h 5 54 Flite presence - ind. 5 35h 5 102 Reserved 38h 5
7 Reserved 32h 6 55 Config in progress - ind. 5 35h 6 103 Reserved 38h 6
8 Reserved 32h 7 56 Config fault - ind. 5 35h 7 104 Reserved 38h 7
9 DI 1 Digital input 1 32h 8 57 Fault dI/dt - ind. 6 35h 8 105 Reserved 38h 8
10 DI 2 Digital input 2 32h 9 58 Fault Imax - ind. 6 35h 9 106 Reserved 38h 9
11 DI 3 Digital input 3 32h 10 59 Battery fault - ind. 6 35h 10 107 Reserved 38h 10
12 DI 4 Digital input 4 32h 11 60 Volt. Presence - ind. 6 35h 11 108 Reserved 38h 11
13 DI 5 Digital input 5 32h 12 61 Comm. Fault - ind. 6 35h 12 109 Reserved 38h 12
14 DI 6 Digital input 6 32h 13 62 Flite presence - ind. 6 35h 13 110 Reserved 38h 13
15 Reserved 32h 14 63 Config in progress - ind. 6 35h 14 111 Reserved 38h 14
16 Reserved 32h 15 64 Config fault - ind. 6 35h 15 112 Reserved 38h 15
17 Fault dI/dt - ind. 1 33h 0 65 Fault dI/dt - ind. 7 36h 0
18 Fault Imax - ind. 1 33h 1 66 Fault Imax - ind. 7 36h 1
19 Battery fault - ind. 1 33h 2 67 Battery fault - ind. 7 36h 2
20 Volt. Presence - ind. 1 33h 3 68 Volt. Presence - ind. 7 36h 3
21 Comm. Fault - ind. 1 33h 4 69 Comm. Fault - ind. 7 36h 4
22 Flite presence - ind. 1 33h 5 70 Flite presence - ind. 7 36h 5
23 Config in progress - ind. 1 33h 6 71 Config in progress - ind. 7 36h 6
24 Config fault - ind. 1 33h 7 72 Config fault - ind. 7 36h 7
25 Fault dI/dt - ind. 2 33h 8 73 Fault dI/dt - ind. 8 36h 8 Status Flite n°7
26 Fault Imax - ind. 2 33h 9 74 Fault Imax - ind. 8 36h 9
27 Battery fault - ind. 2 33h 10 75 Battery fault - ind. 8 36h 10
28 Volt. Presence - ind. 2 33h 11 76 Volt. Presence - ind. 8 36h 11
29 Comm. Fault - ind. 2 33h 12 77 Comm. Fault - ind. 8 36h 12
30 Flite presence - ind. 2 33h 13 78 Flite presence - ind. 8 36h 13
31 Config in progress - ind. 2 33h 14 79 Config in progress - ind. 8 36h 14
32 Config fault - ind. 2 33h 15 80 Config fault - ind. 8 36h 15
33 Fault dI/dt - ind. 3 34h 0 81 Fault dI/dt - ind. 9 37h 0 Status Flite n°8
34 Fault Imax - ind. 3 34h 1 82 Fault Imax - ind. 9 37h 1
35 Battery fault - ind. 3 34h 2 83 Battery fault - ind. 9 37h 2
36 Volt. Presence - ind. 3 34h 3 84 Volt. Presence - ind. 9 37h 3
37 Comm. Fault - ind. 3 34h 4 85 Comm. Fault - ind. 9 37h 4
38 Flite presence - ind. 3 34h 5 86 Flite presence - ind. 9 37h 5
39 Config in progress - ind. 3 34h 6 87 Config in progress - ind. 9 37h 6
40 Config fault - ind. 3 34h 7 88 Config fault - ind. 9 37h 7
41 Fault dI/dt - ind. 4 34h 8 89 Reserved 37h 8 Status Flite n°9
42 Fault Imax - ind. 4 34h 9 90 Reserved 37h 9
43 Battery fault - ind. 4 34h 10 91 Reserved 37h 10
44 Volt. Presence - ind. 4 34h 11 92 Reserved 37h 11
45 Comm. Fault - ind. 4 34h 12 93 Reserved 37h 12
46 Flite presence - ind. 4 34h 13 94 Reserved 37h 13
47 Config in progress - ind. 4 34h 14 95 Reserved 37h 14
48 Config fault - ind. 4 34h 15 96 Reserved 37h 15
Each TM (or Analog Input) value is a signed value encoded in 2's complement
16-bit word.
0x8000 stands for non valid value.
Parameters zone
Word address access function
Parameters Hex. Decimal mode authorised
Storage information 0090h to 144 to 145 Read/write 1,2,3,4,5,6
0091h
Alarm information 0092h to 146 to 148 Read/write 1,2,3,4,5,6
0094h
Primary Host phone number 0095h to 149 to 152 Read/write 1,2,3,4,5,6
0098h
Standby host phone number 0099h to 153 to 156 Read/write 1,2,3,4,5,6
(standby) 009Ch
SMS service center phone 009Dh to 157 to 160 Read/write 1,2,3,4,5,6
number 00A0h
SMS user phone number 00A1h to 161 to 164 Read/write 1,2,3,4,5,6
00A4h
Cyclic dial up period 00A5h to 165 to 166 Read/write 1,2,3,4,5,6
00A6h
G200 IP address 00A7h to 167 to 168 Read 1,2,3,4,5,6
00A8h
SCADA IP address 00A9h to 169 to 170 Read/write 1,2,3,4,5,6
00AA.h
G200 local port 00ABh 171 Read/write 1,2,3,4,5,6
SCADA remote port 00ACh 172 Read/write 1,2,3,4,5,6
Reserved 00ACh to 173 to 175
00AFh
Measurement period 00B0h 176 Read/write 1,2,3,4,5,6
Current deadband (%) 00B1h 177 Read/write 1,2,3,4,5,6
Minimum current variation 00B2h 178 Read/write 1,2,3,4,5,6
Voltage deadband 00B3h 179 Read/write 1,2,3,4,5,6
Communication fault 00B4h 180 Read/write 1,2,3,4,5,6
counter threshold
Config. Indicator F1 00B5h to 181 to 182 Read/write 1,2,3,4,5,6
00B6h
Config. Indicator F2 00B7h to 183 to 184 Read/write 1,2,3,4,5,6
00B8h
Config. Indicator F3 00B9h to 185 to 186 Read/write 1,2,3,4,5,6
00BAh
Config. Indicator F4 00BBh to 187 to 188 Read/write 1,2,3,4,5,6
00BCh
Config. Indicator F5 00BDh to 189 to 190 Read/write 1,2,3,4,5,6
00BEh
Config. Indicator F6 00BFh to 191 to 192 Read/write 1,2,3,4,5,6
00C0h
Config. Indicator F7 00C1h to 193 to 194 Read/write 1,2,3,4,5,6
00C2h
Config. Indicator F8 00C3h to 195 to 196 Read/write 1,2,3,4,5,6
00C4h
Config. Indicator F9 00C5h to 197 to 198 Read/write 1,2,3,4,5,6
00C6h
Reserved 00C7h to 199 to 207 Read/write 1,2,3,4,5,6
CFh
b15 b8 b7 b0
This control Word is used to configure following parameters : inrush time-out, fault
Ctl
confirmation per voltage absence, automatic voltage reset and flash time-out
di_threshold di/dt value (for IMAX_Threshold IMAX value Ctl Description HT voltage
50Hz networks) presence
1xxx0000 6 A / 30 ms XXXX0000 800 A 00XXXXXX No Inrush XXXX0XXX A
1xxx0001 12 A / 30 ms XXXX0001 100 A 01XXXXXX Inrush : 3s XXXX1XXX B
1xxx0010 24 A / 30 ms XXXX0010 150 A 10XXXXXX Inrush : 30 s
1xxx0011 30 A / 30 ms XXXX0011 200 A 11XXXXXX Inrush : 60 s
1xxx0100 40 A / 30 ms XXXX0100 250 A XX00XXXX No validation
1xxx0101 60 A / 30 ms XXXX0101 300 A XX01XXXX Validation
1xxx0110 80 A / 30 ms XXXX0110 400 A XX10XXXX Not used
1xxx0111 OFF XXXX0111 500 A XX11XXXX Not used
XXXX1000 600 A XXXX00XX No auto. Reset
XXXX01XX auto. reset 3s
XXXX10XX auto. reset 30s
XXXX11XX auto. reset 60s
XXXXXX00 2 h flash time
XXXXXX01 4 h flash time
XXXXXX10 8 h flash time
XXXXXX11 16 h flash time
When modbus event stack overflows, no more event is stored in the stack until it
reaches half emptiness.
Except for Alarm 13, 14,15,16 , when bits are set to 00, the information is not
alarmed. When set to 01, it is alarmed on bit set. When set to 10, it is alarmed on
bit reset. When set to 11, it is alarmed on both bit set and bit reset.
For 13, 14 and 15 and 16, values are restricted to 00(not alarmed) and
11(alarmed) values.
Test alarm : A bit is used to test the alarm mechanism : if bits is written with "11"
by the master MODBUS, an alarm signal will set off one minute later. The bit will
then be set to "00" by the G200 if the alarm is acquitted.
Alarm message set up : bits are used to set up the alarm mechanism: if bits are
written with "11" by the master MODBUS, The alarm mechanism is set up. If bits
are written with "00" by the master MODBUS, no alarm neither cyclic dialup will be
do by the equipment
Short message system enabled : bits are used to set up the SMS mechanism :
if bits are written with "11" by the master MODBUS, an alarm will send a SMS.
Each time when data is written in this zone(A5-A6h) automatic call is Re-initialise.
Phone number of the host computer system or SMS, used to send the alarms.
15 figures maximum encoded.
Only this figures are accepted : <0 to 9>, '+'=<A>
Zone initialised with <F..F> : Flair 200C doesn't send alarms.
i.e. :+330476606599 encoded value :
IP address Word
C1FB A7h
0944 A8h
IP port (for GPRS only)
Possible values: 0 to 20
Possible values: 1 to 4
Measurement period
Period of time for current measurement recording
The most significant bit of the sub-function code should be assigned with the
sub-address of the G200 to be accessed.
sub-function code = 0B
CRC16
Reading: 01 08 00 0B 00 00 91 8D
Reply: 01 08 00 0B 00 04 90 4E
G200 address = 1
Function code = 8
The master then must read tables and events from the G200 which
transmits spontaneously an exception.
G200 dial-up again the ‘’main’’ phone number after the ‘’dial-up delay time / second
attempt’’ and eventually try again after the ‘’dial-up delay time / third attempt’’.
The control center system send a broadcast message (Slave address = 0) and the
function code = 0.
G200 sends back an exception message with its address, function code 0 with most
significant bit set to 1 and the exception code = 0.
The control center system can then initiate a standard MODBUS Master/Slave
communication.
G200 again tries to make connection with the scada after the ‘TCP/IP connect.
delay / second attempt’’ and eventually tries again after the ‘TCP/IP connect. delay/
third attempt’’.
2 – Connection is successful:
The control center system sends a broadcast message (Slave address = 0) with the
function code = 17 (identification frame)
G200 answers this frame providing the control center with its own modbus address
and its slave ID.
The control center system can then initiate a standard Modbus Master/Slave TCP
communication.
To avoid having the G200 not reachable, it can be configured to call at each change
of IP address.
MODBUS protocol
(non GPRS version)
MODBUS is a master - slave protocol.
It is used to read or write one or more words (16 bits), as well as diagnostic
counters.
Functions available:
5: write a bit.
6: write a word.
Exchanges are carried out at the master's initiative and comprise a request from
the master followed by the reply from the slave. The master's requests are
addressed to a slave identified by its number in the first byte of the frame or else
addressed to all the slaves (broadcast).
Synchronisation of exchanges
Any character that is received after a silence of more than 3 characters is
considered as the beginning of a frame. A silence in the line equal to at least 3
characters should be respected between two frames.
If the CRC16 or the slave number are incorrect, the slave does not reply.
If the CRC16 and the slave number are correct, but the function code or
parameters are not valid, the slave transmits an exception reply.
If the CRC16, slave number, function code and parameters are correct, the
slave replies to the master's request.
5: write a bit.
6: write a word.
Plus:
Transaction identifier: in the reply frame, the RTU sets the transaction
identifier to the same value as the one in the request frame.
Protocol identifier value is 0x0000.
Length: it is the length of all the following data of the frame (including unit
identifier and the function code)
Unit identifier is the modbus address field of main menu of the communication
module. Should be let to default value.
Except from the check zone that is suppressed in modbus TCP, the following of
the field Length is treated the same way as in standard modbus.
In the following, the function codes will be described as used in standard
modbus. To use them in modbus TCP, one only need to add transaction
identifier, protocol identifier and length at the beginning of the frame and to cut
the CRC at the end of it.
Read N bits:
functions n°1 and 2
Function 1: read output bits.
Function 2: read input bits.
Request
Slave 1 or 2 address of 1st bit number of bits CRC16
number (MSB+LSB)
1 byte 1 byte 2 bytes 2 bytes 2 bytes
Reply
Slave 1 or 2 number of 1st byte read last byte CRC16
number bytes read read
1 byte 1 byte 1 byte 1 byte N bytes 1 byte 2 bytes
Example
Reading of 16 bits, bit address 300h of slave n°1
Request:01 01 03 00 00 10 36 42
Reply:01 01 02 00 00 B9 FC
Read N words:
functions n°3 and 4
The number of words to be read should be less than or equal to 125.
Request
Slave 3 or 4 address of 1st word number of words CRC16
number (MSB+LSB) (MSB+LSB)
1 byte 1 byte 2 bytes 2 bytes 2 bytes
Reply
Slave 3 or 4 number of 1st word read last word CRC16
number bytes read (MSB+LSB) read
(MSB+LSB)
1 byte 1 byte 2 bytes 1 byte 1 byte 2 bytes
Example
Reading of words 40h to 43h of slave n°1,
Request:01 03 00 40 00 04 45 DD
Reply:01 03 08 00 00 80 00 80 00 80 00 C2 17
Write a bit:
function n°5
Request
Slave 5 address of bit bit value 0 CRC16
number (MSB+LSB)
1 byte 1 byte 2 bytes 1 byte 1 byte 2 bytes
Reply
The reply is an echo of the request indicating that the slave has acknowledged the
value contained in the request.
Example
Writing of bit to 1, bit address 301h of slave n°1,
Request:01 05 03 01 FF 00 D6 7E
Reply:01 05 03 01 FF 00 D6 7E
Write a word:
function n°6
Request
Slave 6 address of word value of word CRC16
number (MSB+LSB) (MSB+LSB)
1 byte 1 byte 2 bytes 2 bytes 2 bytes
Reply
The reply is an echo of the request indicating that the slave has acknowledged the
value contained in the request.
Example
Writing of word 30h of slave n°1, at the value 0001h
Request:01 06 00 30 00 01 48 05
Reply:01 06 00 30 00 01 48 05
Read diagnostic
counters:
function n°8
Each slave is assigned diagnostic counters. There are 5 counters in all per slave. The
counters are 16-bit words. When they reach FFFFh, they go back to 0000h.
When a request is sent by the master, the most significant byte in the sub-function
code is assigned by the G200 equipment offset to access and the data are at 0000h.
When the slave sends a reply, the data contain the value of the counter concerned.
Request / reply
Slave 8 sub-function code data (MSB+LSB) CRC16
number (MSB+LSB)
1 byte 1 byte 2 bytes 2 bytes 2 bytes
sub-function data
code
the slave should send the echo of the request xx00 XXXX
resetting of diagnostic counters xx0A 0000
reading of total number:
of frames received with no CRC errors (CPT1) xx0B XXXX
of frames received with CRC errors (CPT2) xx0C XXXX
of the number of exception replies (CPT3) xx0D XXXX
of frames addressed to the station (CPT4) xx0E XXXX
(excluding broadcast)
of broadcast requests received and correctly executed xx0F XXXX
(CPT5)
Sub-function n°0 is used to test transmission. The slave sends back the echo of the
data received.
Examples
Resetting of counters for slave n°1,
Request:01 08 00 0A 00 00 C0 09
Reply:01 08 00 0A 00 00 C0 09
Write N consecutive
words:
function n°16
The number of words to be written is between 1 and 123 and the number of bytes is
between 2 and 246.
Words are written in increasing order of addresses.
Request
Reply
Slave 10h address of 1st word number of words written CRC16
number written (MSB+LSB) (MSB+LSB)
1 byte 1 byte 2 bytes 2 bytes 2 bytes
Example
Writing of words 0302h to 0305h of slave n°1, (addresses 02h to 05h) with the values
0060h, 0A10h, 0B33h, 1662h
Request: 01 10 03 02 00 04 08 00 60 0A 10 0B 33 16 62 96 B3
Reply: 01 10 03 02 00 04 60 4E
Request
Reply
Transaction Protocol Length Unit 11h 0x02 Slave Id OxFF
identifier identifier identifier (Byte (MSB+LSB) (Status à
count) ON)
2 bytes 2 bytes 2 bytes 1 byte 1 byte 1 byte 2 bytes 1 byte
Example
The request is addressed to all equipment connected (Unit identifier = 0x00) which
corresponds to the only G200 that has created TCP connection. The G200 answers
with modbus address to 255 and slave ID to 1.
CRC 16 calculation
algorithm
Hex FFFF CRC 16
n=0
no carry yes
n=n+1
no n>7 yes
Next byte
End
Write CRC 16
calculation in C
language
Calculates and gives the CRC16 in the "buf" zone with length "len" *buf:
pointer of buffer on which the calculations are performed.
len: length of buffer.
unsigned crc16(char *buf, int len)
{
#define POLY 0xA001
char i;
unsigned crc;