MODBUS Network Guide Merlin Gerin Technical Guide 2000 No-one in the world does more with electricity
Introduction Overview Local Area Networks Warning Schneider Electric 3 4 5 1
2 Schneider Electric
Overview Introduction E52410 Networks can be classified according to the area they cover: E52409 b WAN: Wide Area Network. E52407 b MAN: Metropolitan Area Network. b LAN: Local Area Network.
Local Area Networks Introduction Local Area Networks have been standardized according to the OSI model. Definition: OSI, Open Systems Interconnection.
Introduction Warning If the recommendations in this manual are incompatible with instructions for a given device, the device instructions should be followed. As regards EMC, safety rules take precedence. Because of rapid changes in industrial electronics, problems with Electromagnetic Compatibility (EMC) can no longer be ignored. Care must be taken when connecting devices (equipment in a network, automatic control devices, remote inputs/outputs, etc.
6 Schneider Electric
Cabling Guidelines Review Schneider Electric 9 Definitions and limitations Protective earthing vs.
8 Schneider Electric
Cabling Guidelines This document defines minimum requirements that in no way supersede specific instructions or standards that may be applicable to a given installation. Although regulatory in Europe, CE marking does not guarantee the actual EMC performance of a system.
Review (continued) Cabling Guidelines Protective earthing vs. grounding (equipotential bonding) Definition: An earthing network has the following purposes: b Divert equipment earth-fault and earthleakage currents to earth b Divert common-mode currents of outside cables (mainly power and telecommunications cables) to earth b Divert lightning currents to earth b Meet requirements concerning the protection of persons (25 V AC or 50 VDC).
Review (continued) Cabling Guidelines Protective earthing Protection of persons E52273 To ensure trouble-free operation of equipment and the safety of persons, all exposed conductive parts must be interconnected and earthed to ensure equipotentiality. The earthing network provides: b Protection of persons. b Protection against electrostatic discharges. b Protection against lightning currents.
Cabling Guidelines Review (continued) Grounding Definition: An exposed conductive part is an accessible metal part that is isolated with respect to the live parts of the equipment but which may accidentally become live. Exposed conductive parts ensure proper operation of systems by providing immunity to various types of disturbances. For high-frequencies, the best way to guarantee trouble-free operation is to ensure equipotentiality between the equipment.
Review (continued) Cabling Guidelines To be effective, an underground network must be in the form of a grid: b For small premises (less than about 10 m2), a simple buried perimeter ring is sufficient. b For new buildings of large surface area, the installation of buried conductors in the form of a grid with a 10 m mesh size is recommended. b For areas housing equipment that is highly sensitive to electromagnetic disturbances, the mesh size should be no more than 2 m.
Review (continued) Cabling Guidelines Example of a grounding system for a building An effective solution is the interconnection of the metal structures with a mesh size of 2 m x 2 m. The metal frames of cabinets and bays must be connected to the neighbouring metal parts (cableways, machines, frames, etc.).
Review (continued) Cabling Guidelines Protection against penetration For data links between buildings, fibre optic media are strongly recommended to totally eliminate ground loop problems between buildings. Common mode currents coming from the outside must be evacuated by the earthing network at the entrance to the site to limit potential differences between items of equipment. All conducting conduits (cables, conducting pipes, insulated pipes carrying conducting fluids, etc.
Review (continued) Cabling Guidelines Example of a grounding system for an island In industrial environments, electronic devices are generally located in specific areas. Cableway E52280 This makes it possible to avoid implementation of a ground mesh for the whole building: b Islands can be defined for installation of electronic equipment. b The cables extending outside the island to sensors and actuators must be carefully shielded.
Review (continued) Cabling Guidelines Power system earthing arrangements TT system E52281 The various power system earthing arrangements are equivalent for the safety of persons and have little effect in relation to EMC. Certain features of the different arrangements must nevertheless be taken into account. Loop capable of capturing radiated fields Shielding connected at both ends Note that overvoltages may be caused by separate earth electrodes for which the potentials vary differently.
Review (continued) Cabling Guidelines TN-S system E52283 This is the best system from an EMC viewpoint: b Low risk of ground loop (radiated fields). b The neutral current is not carried by the protective conductor (conducted disturbances).
Review (continued) Cabling Guidelines EMC phenomena The main EMC problems are conducted common-mode disturbances. E52285 Common-mode voltages are caused by: b Antenna effect coupling. b Common impedance coupling. b Cable-to-cable coupling, for instance by capacitive crosstalk (for electrical fields) or inductive crosstalk (for magnetic fields).
Choice of the Physical Communication Medium Cabling Guidelines Various Types of Physical Media Two types of shielding: Three types of conductors can be used: b Metal pairs. E52286 Type E52289 Foil shield Advantages Disadvantages Easy to install. Fragile. High-frequency protection provided by the metal foil is diminished by cable handling (tension, torsion, etc.) Foil tape E52287 b Coaxial cable. Drain wire E52288 E52290 Single braid b Optical fiber.
Choice of the Physical Communication Medium (continued) Cabling Guidelines E52291 Equivalent diagram: I R L E G C E = Transmitter L = Series inductance R = Series resistance C = Capacitance between wires G = Conductance (easier to calculate than parallel resistance) – represents loss in insulation Definition: The characteristic impedance (Zo) in Ω is the simplified model of the representation of the cable.
Choice of the Physical Communication Medium (continued) Cabling Guidelines Attenuation in dB/km: b This is the loss of signal quality in terms of amplitude. b It depends on cable geometry. b It varies according to frequency and length. Resistance per unit length in Ω/m: b This is the resistance to the passage of a direct current (or a low frequency). b It depends on the cross-section of the wire and the material from which it is made. b It varies according to length and temperature.
Cabling Guidelines Choice of the Physical Communication Medium (continued) Example of a choice of medium b Characteristic impedance: 120 Ω. b Attenuation: a minimum voltage of 0.2 V on the receiver is required for a minimum voltage of 1.5 V at the transmitter output: v Thus attenuation will be: - Att = 20 Log (Vout/Vin); Max. att. = 17 dB over 1200 m.
Cabling Guidelines Implementation guidelines Sensitivity of various types of cable Cable Type of signal 1 Type Analogue 2 Digital and telecommunications 3 Relay 4 Power supply Power supply and Sensitive signals measurement circuits for analogue sensors Digital circuits and data These signals are buses sensitive.
Implementation guidelines (continued) Cabling Guidelines How should the shielding be connected? A secure connection of the shielding to a cable gland in the enclosure wall is the best solution, as long as the paint is scratched on the enclosure to guarantee good electrical contact. A U-shaped clamp can also be used to guarantee at least 180° contact. Fair Poor E52294 High frequency protection depends directly on how cable shields are connected.
Implementation guidelines (continued) Cabling Guidelines Using filters The effectiveness of a mains filter for high frequencies depends on how well it is installed. E52297 Three rules must be followed when installing a filter: b Reference the filter sheetmetal to sheetmetal. b Connect the upstream and downstream cables on each side of the filter to reduce parasitic coupling between the input and the output.
Implementation guidelines (continued) Cabling Guidelines Principal cabling rules b Work with pairs for digital or analogue signals. Rule no. 1: The outgoing and incoming conductors should always remain together. Inside cabinets, be careful with cabling that uses separate conductors. Identify wires by type of signal and by pair. Special case: Emergency Off and alarm connections should never be cabled using point-to-point single wires; always use pairs. b Use shielded cables or double-shielded strands.
Implementation guidelines (continued) Cabling Guidelines b Separate analogue and digital signals with a row of 0 V pins if they use the same connector. Rule no. 4: The same connector should not be used for different types of connections (except for relay and power circuits). b Protection with a factor of approximately 5 with high frequencies can be obtained if rule number 5 is followed. Rule no.
Implementation guidelines (continued) Cabling Guidelines Protection inside a cabinet or small machine The presence of many equipotentially bonded structures in machines and cabinets provides maximum protection. b b v v Clamp all cables against equipotential structures. Plastic trunking can be used in cabinets if they are installed on: the back grid, or the DIN rails connected to the cabinet ground. Cabinets are made of various parts assembled with screws or hinges, or welded.
Implementation guidelines (continued) Cabling Guidelines Cabling between two cabinets Most on-site problems are related to conduction. E52304 The potential reference plane can be one of the metal sides of the cabinet or its DIN grid. The potential reference plane is always connected to the equipotential grid of the cabinet or machine as well as to that of the equipotential island. For plastic cabinets (not recommended) use a DIN rail or ground terminal.
Implementation guidelines (continued) Cabling Guidelines Placing cabinets together Equipotentiality must be guaranteed for cabinets placed side by side. E52305 When equipment is placed in a number of side-by-side cabinets the following rules must be followed: b Attach the cabinets to form islands. b Ensure equipotential bonding of the cabinets with at least two contacts at the top and bottom. b The bonding should be made up of: v copper bars v or wide, short leaf metal, v or tinned braid.
Implementation guidelines (continued) Cabling Guidelines E52307 b Attach unshielded cables in corners of chutes. Power or variable speed drive circuit Unshielded analogue circuit Relay circuit Unshielded digital circuit Shielded digital circuit Shielded analogue circuit b Use a vertical separation in the trunking to avoid mixing incompatible cables. b Place a metal cover on the signal half of the trunking. Note: a metal cover over the complete trunking does not improve EMC.
Implementation guidelines (continued) Cabling Guidelines Whenever one of the three conditions is not completely met, the physical length of the trunking should be associated with a coefficient to respect EMC. Such coefficients reflect the decrease in the protection. The resulting permissible length of the trunking will be less than the TLC. Examples of other interference reduction systems A raceway increases protection by a factor of approximately 50 between 1 MHz and 100 MHz.
Implementation guidelines (continued) Cabling Guidelines Error rate for a slow link: Transmission of 41222 bytes at 4800 Bds. IEC test 1000-4-4. 15-pair shielded cable. E52311 Transmission impossible Stops Length 13 110 1352 s 8 86 1225 s 0 0 160 s 0 0 160 s E52315 E52314 E52313 E52312 Errors Raceway with cover: E52317 E52316 Raceway without cover: Error rate for a fast link: Transmission at 2 Mbits/s. Length of IEC test 1000-4-4: 3 minutes.
Cabling Guidelines Summary Essential rules b Make sure all exposed conductive parts have the same potential.. b Choose equipment that complies with standards. b Follow manufacturers’ instructions. b Protect your installations from outside disturbances (careful grounding of shielding). b Eliminate ground loops. b Shield both sensitive and interfering cables.
36 Schneider Electric
Guide to Integration Schneider Electric Review 40 Networks Systems Bauds and bits per second Architectures The 20 mA current loop The RS232 link RS485 link Standards EIA 485A (March 98 update) and TSB89 (application guidelines for TIA/EIA-485-A) 40 40 40 41 42 43 47 48 48 Interfaces 50 RS232/RS485 Modems 50 51 The Modbus Protocol 56 Difference between ASCII and RTU frames Differences between Modbus and Modbus+ protocols Modbus / Jbus Description of exchanges Principles used Addressing Functions
38 Schneider Electric
Guide to Integration Modbus / Jbus This chapter describes layer 2 of the OSI model in detail. This layer is composed of two separate parts for data transmission: b A "hardware" part (interfaces, addressing, parameters, etc.). b A "software" part (medium access control, error management, logical level control, etc.).
Review Guide to Integration Modbus / Jbus Networks Definition : The purpose of a communications network is to link at least two devices in order to exchange data (ex.: Ethernet network). A network is defined by its: b Topology (bus, ring, star, tree, mesh, etc.) b Physical limits (length, speed, number of subscribers, etc.) b Type of physical medium used (cable, optical fibre, radio waves, etc.) b Type of network access (random, master-slave, token ring, with or without error management, etc.
20 mA CL – RS232 – RS422 – RS485 links Guide to Integration Modbus / Jbus Architectures Definition: A 20mA current loop is a multi-point link (the number of points depends on the types of transmitters/receivers) via a 4-wire cable. (Connection on SubD9 recommended, maximum length 3000 m at 1200 Bds, and 300 m at 9600 Bds, bus topology.) Definition: An RS232 link is a point-to-point link via a cable with at least three wires. (Connection on a SubD9 or 25 pts, maximum length 15 m at 19200 Bds.
20 mA CL – RS232 – RS422 – RS485 links (continued) Guide to Integration Modbus / Jbus The 20 mA current loop This transmission mode, used on some equipment, provides better performance than RS232C mode. Although this mode provides good immunity to parasites, it is not always the best solution because the current loop is not standardised.
20 mA CL – RS232 – RS422 – RS485 links (continued) Guide to Integration Modbus / Jbus The RS232 link The physical DB25-DB25 connection 13 E52326 General characteristics: b Electrical levels ± 15 V. b Control lines: possible (RTS, CTS, DCD, etc.) but not systematic depending on the software and/or interface. b Charge and polarisation of the line: no. b Minimum connection (in DB9): v pin 2 (Transmitted Data), v pin 3 (Received Data), v pin 7 (Signal Ground).
20 mA CL – RS232 – RS422 – RS485 links (continued) Guide to Integration Modbus / Jbus The DB9-DB25 physical connection 13 E70511 DB25 Female RS-232-C 25 1 14 DB9 to DB25 serial cable Computer Interface DTE DCE 5 DB9 Male 9 1 6 Some terminals and computers may have a DB9 type RS-232-C serial connector. In the figure above, the RS-232-C serial connection uses a DB9 to DB25 cable. Correspondence between a DB9 and a DB25 connector.
20 mA CL – RS232 – RS422 – RS485 links (continued) Guide to Integration Modbus / Jbus E52329 Standard cabling Protective ground 1 2 3 4 5 6 7 8 20 22 Transmitted data Received data RTS CTS DSR Signal ground DCD (RLSD) DTR RI 1 2 3 4 5 6 7 8 20 22 DIRECT DB25-DB25 DCE DTE E52330 Nul-modem cable Protective ground 1 2 3 4 5 6 7 8 20 22 GRND Transmitted data Received data RTS CTS DSR Signal ground DCD (RLSD) DTR RI 1 2 3 4 5 6 7 8 20 22 GRND Transmitted data Received data RTS CTS DSR Signal gro
Guide to Integration Modbus / Jbus 20 mA CL – RS232 – RS422 – RS485 links (continued) RTS/CTS or XON/XOFF flow control Definition : Flow control allows the receiver to order the terminal to stop transmission when its buffer memory has reached 90% of its capacity. There are two types of control: hardware and software. Regardless of the method used, flow control makes it possible to increase the transmission speed of the terminal (DTE) to a speed greater than that of modem throughput on the line.
Guide to Integration Modbus / Jbus An RS485 link has the following general characteristics: b Maximum number of loads on the bus: 32 (for Zc = 120 W and Ucm = -7 V to 12 V). b Standard topology: chaining of connection points. b Possible topologies: v point-to-point, v Bus type multipoints (2 or 4 wires), v Multidrop (1 transmitter and several receivers), v 1 receiver and several transmitters. b Topology not recommended: star. b Minimum distance between 2 points: 27 cm.
20 mA CL – RS232 – RS422 – RS485 links (continued) Guide to Integration Modbus / Jbus Standards EIA 485A (March 98 update) and TSB89 (application guidelines for TIA/ EIA-485-A) E52332 Connection and identification: A/A' A' A Lr B B' B/B' T R R G C' C G C/C' Key: b G = Generator b A & B = Generator connection points b C = Common point for the generator b R = Receiver b A’ & B’ = Receiver connection points b C’ = Common point for the receiver b T = Transmitter b A/A’ & B/B’ = Transmitter connec
20 mA CL – RS232 – RS422 – RS485 links (continued) Binary 1 (OFF) E52334 Guide to Integration Modbus / Jbus Binary 0 (ON) Vob VOH Voa VOL OV (Diff) Voa – Vob Signal transition time: E52335 A 50 pF G + 20% 50 Ω Vt + 1% B C E52336 1.1 Vss 0.9 Vss Vss OV (Diff) 0.1 Vss tui tr tf Vss = | Vt - Vt* | Constraints concerning signal form: b tr & tf < 0.3 x tui. b Between two transitions (after tr and before tf) the value of Vt or Vt* should not exceed Vss + 10%.
Guide to Integration Modbus / Jbus All personal computers used in offices are equipped with at least one serial port (COM1) that is specified by standard RS232C. An adapter (interface RS232/ RS485) for electrical levels is required. In some cases, such as for "industrial" PCs, an adapter is not required if a card supporting standard RS485 can be installed.
Interfaces (continued) Guide to Integration Modbus / Jbus Modems For long-distance communication, the easiest solution is to use the existing telephone network. This requires a MODEM. Bits cannot be transmitted directly over a telephone line (except for an ISDN line). A telephone conversation between two people is analogue because it varies in amplitude and phase over time.
Interfaces (continued) Guide to Integration Modbus / Jbus E52340 Telephone companies dispatch pairs of cables to their clients; each pair represents a different telephone number. Each of these telephone lines is linked to a special computer called a "switching exchange or PABX" at the central telephone station. The purpose of this computer is to set up the communications link between the caller and the number being called. Computers only process information in binary form, i.e., 1 or 0.
Guide to Integration Modbus / Jbus General characteristics: b Industrial or office modem (depending on use). b Analogue/Digital (depending on connection to the telephone network). b Adaptable transmission speed (on the telephone network). b AT commands accepted for use and parameter setting. b RS232 input available (speed compatible with MODBUS). b Dry contact input available to initiate a call. b Conformity with EMC directives.
Guide to Integration Modbus / Jbus For some applications it is useful to know the modem parameters and how to set them. Commands beginning with AT (Hayes compatible) differ according to the modem. Modems that use Rockwell chips all have the same commands. Thus it is best to describe functions rather than specific commands. Modem parameters are: b Error correction, b Data compression, b Flow control.
Interfaces (continued) Guide to Integration Modbus / Jbus Most cables linking the modem to the telephone jack comply with the international connection standard. This standard is not the same as the standard used in Switzerland.
Guide to Integration Modbus / Jbus The Modbus Protocol Difference between ASCII and RTU frames Definition : ASCII, American Standard Code for Information Interchange. Definition : RTU, Remote Terminal Unit. Both of these frame formats can be used in the Modbus protocol, but they are incompatible with each other. About 95% of modules that communicate over Modbus use RTU frames.
Guide to Integration Modbus / Jbus The Modbus protocol can be used to read or write one or more bits, one or more words, the contents of the event counter or the contents of the diagnostic counters.
The Modbus Protocol (continued) Guide to Integration Modbus / Jbus Description of exchanges E52348 Exchanges take place at the initiative of the master. They include a query from the master and a response from the slave. Master Query Response Slave n° Function code Data zone Slave 2 Slave 3 Broadcast commands are always write commands. Slaves do not answer such commands. All frames exchanged have the same structure.
The Modbus Protocol (continued) Guide to Integration Modbus / Jbus Each frame includes four types of information: b Slave number (1 byte): v the slave number specifies the destination slave (1 to 255). If this number is zero, the query is addressed to all slaves and there is no response message. b Function code (1 byte): v can be used to select a command (read, write, bit, word) and to verify if the response is correct.
The Modbus Protocol (continued) Guide to Integration Modbus / Jbus Principles used Synchronisation of exchanges Any character received after a silence of more than 3 characters is considered the beginning of a frame. End of stop bit E52352 Beginning start bit 3-character silence Character Character Note: Be sure to leave a silence of at least three character between frames. Presentation of frames The contents of the following frames is given in hexadecimal.
Guide to Integration Modbus / Jbus Each module has a single address on the network. This address is between 1 and 255 (1 and FF in hexadecimal). The value of this address is coded in one byte. The value "0" is prohibited because it is used only for broadcasting. The Modbus Protocol (continued) Addressing The addressing mode differs according to the module: b With a code wheel: v wheel no. 1 gives the most significant bit in addresses, v wheel no. 2 gives the least significant bit. b With a keyboard.
The Modbus Protocol (continued) Guide to Integration Modbus / Jbus Control of messages received by the slave Contents of an exception response E52357 The master transmits a query indicating: b Slave number. b Function code. b Parameters of the function. It calculates and transmits the contents of the control word (CRC 16). When the slave receives the query message, it stores the message in memory, calculates the CRC and compares it with the CRC 16 received. Slave no.
The Modbus Protocol (continued) Guide to Integration Modbus / Jbus Definition: A bit is a basic unit of information that can only equal 1 or 0. Bits are the "language" used by computers.
Guide to Integration Modbus / Jbus The Modbus Protocol (continued) b Function 3: read output words or internal bits. b Function 4: read input words. b The number of words to read should be y 125. Note: In this case the "word" represents 2 bytes or 16 bits.. Read n words: function 3 or 4 E52364 b Query. Slave no. Address of the first word to read: 3 or 4 MSB* 1 byte 1 byte LSB* Number of words CRC 16 to read: n 125 : MSB* LSB* LSB* MSB* 2 bytes 2 bytes 2 bytes E52365 b Response. Slave no.
The Modbus Protocol (continued) Guide to Integration Modbus / Jbus Write a bit: function 5 The response frame is identical to the query frame. E52368 b Query. Slave no. 5 Address of the bit MSB* 1 byte 1 byte Value of the bit CRC 16 0 LSB* LSB* MSB* 2 bytes 1 byte 1 byte bit forced to 0_ bit forced to 1_ 2 bytes write 0 write FF E52368 b Response. Slave no.
The Modbus Protocol (continued) Guide to Integration Modbus / Jbus Fast read 8 bits: function 7 The addresses of the 8 bits are set by the slave. E52372 b Query. Slave no. 7 CRC 16 LSB* MSB* 1 byte 1 byte 2 bytes Slave no. 7 XXXXXXXX 1 byte 1 byte E52373 b Response.
The Modbus Protocol (continued) Guide to Integration Modbus / Jbus Read diagnostic counters: function 8 b Query/response. E52489 Each slave has a number of event counters (or diagnostic counters): b There are a total of 9 counters per slave. b These counters are 16-bit words. Slave No. 8 1 byte 1 byte Function The slave should echo the query (transmission control). Reset diagnostic counters to zero, cancel disconnected mode and reconfigure coupler. No response transmitted.
The Modbus Protocol (continued) Guide to Integration Modbus / Jbus Read event counters: function 11 This counter tells the master: b If the slave has correctly interpreted the command (event counter incremented). b If the slave has not interpreted the command (counter not incremented). Each slave has an event counter. The master also has an event counter.
The Modbus Protocol (continued) Guide to Integration Modbus / Jbus Read trace buffer: function 12 The user can access a 64-byte memory containing the history of the last 64 transactions. Note: Functions 12, 13 and 14 are not implemented in all Modicon controllers and are given only for information because they are on the list of Jbus functions. The master can request a read operation on this memory. The slave responds, and sends the contents of the event counters and message counter as well.
Guide to Integration Modbus / Jbus The Modbus Protocol (continued) Program commands: Function 13 Program commands can be used to perform the following functions: b Connect to slave memory. b Disconnect from slave memory. b Stop slave (STOP). b Run slave (RUN). b Unload program from slave (read contents of the memory). b Load program in slave (write memory). The functions used to load and unload the memory can also be used to read and write the data memory in excess of the 16-bit addressing limit.
The Modbus Protocol (continued) Guide to Integration Modbus / Jbus Diagnostic of program commands: Function 14 This command is used to indicate the diagnostic associated with exception response 7 (no acknowledgement) received when a program command is executed (function 13). It provides the diagnostic of the last program command executed. Command not authorised for broadcast. Syntax: E52382 b Query. Slave no. OE 1 byte 1 byte CRC 16 2 bytes E52383 b Response. Function code Slave no.
The Modbus Protocol (continued) Guide to Integration Modbus / Jbus Write n consecutive bits: function 15 If the slave number is 0, all slaves perform the write operation but do not return a response. E52384 b Query. Slave no. 1 byte OF Address of the 1st bit to force No. of bits to force 1 byte 2 bytes 2 bytes X 1 No.
The Modbus Protocol (continued) Guide to Integration Modbus / Jbus Write n consecutive words: function 16 If the slave number is 0, all slaves perform the write operation but do not return a response. E52388 b Query. Slave no. 1 byte 10 Address of the 1st word to force No. of words to force No.
The Modbus Protocol (continued) Guide to Integration Modbus / Jbus Identification of a slave: function 17 (specific to PM 6xx/ CM2xxx). b Query. E52392 Returns the description of the type of controller at this address, the status of the "run indicator" and information specific to each type of slave. Broadcast not supported. Slave no. 11 1 byte 1 byte CRC 16 2 bytes E52393 b Response. Slave no.
The Modbus Protocol (continued) Guide to Integration Modbus / Jbus E52396 Algorithm for generating CRC16 FFFF CRC 16 CRC 16 byte CRC 16 n=0 shift CRC 16 right no carry CRC 16 poly yes CRC 16 n=n+1 no n>7 yes next byte no message finished yes end + exclusive OR n = number of data bits POLY = polynomial for generating CRC 16 = 1010 0000 0000 0001 (generating polynomial = 1 + x2 + x15 + x16 ) In CRC 16, the LSB is transmitted first.
Guide to Integration Modbus / Jbus The Modbus Protocol (continued) Example of CRC calculation: frame 020B = read event counter (function 11) of the slave at 02h.
The Modbus Protocol (continued) Guide to Integration Modbus / Jbus Electrical interpretation of the CRC on a RS485 network: E52397 v In our example, the query from the master is: 02 0B 41 17 E52398 v In this case, the response would be: 02 0B counter contents (00 00 in this A4 38 case)”.
The Modbus Protocol (continued) Guide to Integration Modbus / Jbus "Physical" example of a frame: b "Master" frames are transmitted by a specific software program. b "Slave" frames are transmitted by a module of the Digipact range. b 2-wire cabling with load and polarisation is used for the RS485. b Measurements are made with an oscilloscope across terminals 8/9 (hot point on the probe) and terminals 4/5 (cold point) on the module’s 9-pin subD. The Modbus function 11 "read event counter" is used.
Guide to Integration Modbus / Jbus Schneider Specifications Overview Minimum configuration required: b Functions on bits (read/write): 1 and 2; 5 and 15 or/and functions on words (read/write): 3 and 4; 6 and 16. b Diagnostic functions: 8 (sub-codes 10 to 18), 11. In addition, all devices must accept broadcast frames for write functions. . The transmission format must include the following data: b 1 start bit. b 8 data bits. b 1 stop bit. b No parity. The transmission speed must integrate 9600 bds.
Guide to Integration Modbus / Jbus Schneider Specifications (continued) b The time between two characters in a frame must always be less than three characters (1 character = start bit, data bits, parity and stop bits). b The time between two frames (master or slave) must always be greater than or equal to three characters. b If the device is programmed with parity, verify the parity of all bytes in a frame received. b If the device is programmed with no parity, refuse frames that have bytes with parity.
Schneider Specifications (continued) Guide to Integration Modbus / Jbus Counter management algorithm E52405 3 Idle Reception Reception 255 characters max.
Schneider Specifications (continued) Guide to Integration Modbus / Jbus Counter management algorithm (continued) E52404 1 3 YES Unknown function code YES NO Function code not authorised for broadcasting YES NO Incorrect length YES NO Incorrect address YES NO Incorrect data NO CTP3 = CTP3 + 1 2 2 Application processing 3 YES Processing error NO YES Function 8 reset counters to zero or function 11 CTP3 = CTP3 + 1 YES Broadcast CTP9 = CTP9 + 1 NO YES Exception no.
Schneider Specifications (continued) Guide to Integration Modbus / Jbus Connection 4-wire slave without polarisation or adaptation E52401 Note: New Schneider EMC recommendations (equipotential grids) indicate that shielding should be grounded at both ends. The means used to connect to ground should limit leakage inductance. 1 1 0V Use a subD 9-pin female connector for connection.
Schneider Specifications (continued) See PCR implementation document. Components available See reference document: b In French: PCRED 399074FR, art 28992. b In English: PCRED 3990774EN, art 28993. Internet link: http://139.160.28.99/sitemt/sep1000.nsf.
Summary RS232C: b Limit length to 15 m. b Take into account the specific requirements of each interface and software program with regards to management of control lines (RTS/CTS) when connecting the line. RS232/RS485 interface: b Use converters recommended by Schneider Electric whenever possible; they have been tested and validated for proper operation regardless of the configuration of the installation. RS485 link: b Choose a 2-wire connection over a 4-wire link whenever possible.
Specific Characteristics of Products Product Functions supported 86 Time stamping DC 150 1, 2, 3, 4, 5, 6, Yes 8, 11, 15, 16. PM 300 1, 2, 3, 4, 5, 6, No 8, 11, 15, 16. ET 44 1, 2, 3, 4, 5, 8, No 11. XLI/XTU 300 1, 2, 3, 4, 5, 6, Yes 7, 8, 11, 15, 16. Digibloc D200 1, 2, 3, 4, 5, 8, Yes 11. Micrologic 3, 4, 6, 8, 11, 16, 17. SEPAM 1000+ 1, 2, 3, 4, 5, 6, Yes 7, 8, 11, 15, 16. SEPAM 2000 1, 2, 3, 4, 5, 6, Yes 7, 8, 11, 15, 16. CM 2XXX 3, 4, 6, 8, 11, 16, 17.
Implementation in Products Schneider Electric Diagnostic tools 89 List of diagnostic tests 89 87
88 Schneider Electric
Implementation in Products Diagnostic tools List of diagnostic tests Control: b Are the frames received/sent compatible with the functions supported by the control system / products? b Is the frame format the same for all the products connected? b Is the maximum number of slaves respected? b Does each product have a single and correct address? b etc.
Bibliography b UTE – C 15-900: "Mise en œuvre et cohabitation des réseaux de puissance et des réseaux de communication dans les installations des locaux d'habitation, du tertiaire et analogues". b IEC 439.1 : Low-voltage switchgear and controlgear assemblies. b Schneider Electric CT publication no. 149: "EMC: electromagnetic compatibility". b Schneider Electric CT publication no. 187: Cohabitation of high and low currents". b Documentation concerning installation of the PCR surge arrester.
Index Numerics 20mA current loop 41 A A/D 52 Address 61 ASCII 56 Attenuation 22 B Baud 40 Bits per second 40 Broadcast 59 C Caller 52 Capacitance 22 Characteristic impedance 21 Common-mode currents 12 Common-mode voltages 19 Communications network 40 Conduction 30 Control word 62 CPU 52 D D/A 52 Data Communication Equipment 43 Data compression 54 Data Terminal Equipment 43 Diaphonie 22 G Ground 13 E Earthing network 10 Electrical continuity 25 EMC 9 EMC (ElectroMagnetic Compatibility) 9 Equipotential
Index (continued) M Master 58 Maximum theoretical length for electromagnetic compatibility 32 Modbus protocol 56 Modbus+ protocol 56 Modem 51 O One-end connection 24 P PABX 52 Parallel communication 43 Person called 52 Protection 11, 25, 29 Protocol 40 Q Query from the master 59 R Resistance per unit length 22 Response from the slave 59 RPC 33 RS232 link 41 RS422 link 41 RS485 link 41 RTU 56 S Segment length 32 Serial communication 43 Shielding 20 Slave 58 Speed of the COM port 53 Speed of the modem 5
Schneider Electric SA DBTP 542 en Merlin Gerin F-38050 Grenoble cedex 9 tel. +33 (0)4 76 57 60 60 telex : merge 320 842 F As standards, specifications and designs develop from time to time, always ask for confirmation of the information given in this publication. Ce produit doit être installé, raccordé et utilisé en respectant les normes et/ou les réglements d'installation en vigueur.