Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Modbus communication Port COM du PC PC network board ? =S= communication architecture Host B PSIN, ISDN, ADSL Ethernet PSIN, ISDN, ADSL @ Internet RS232 gateways RS232 RS 485 RS485 Modbus RS485 Modbus Schneider Electric - PMC – C.Alépéé – 2009/01/05 RS485 Modbus 2 Communication = exchange of several types of information Sepam Sepam Sepam SCADA Logical, digital information (O/C) for alarms and testing ● circuit breaker status ● alarms Analog information ● protection unit status ● measurements ● earthing switch status ● counters for power monitoring/management Schneider Electric - PMC – C.Alépéé – 2009/01/05 ● remote readings and settings ● disturbance readings 3 Sepam data exchanged ● The measurements presented in a Sepam depend on the type of Sepam. ● Measurement readout ● phase currents, ● line to line voltages, frequency, ● real and reactive power, and power factor, ● accumulated real and reactive energy, ● peak demand phase current, ● peak demand real and reactive power, ● tripping currents, ● temperatures, thermal capacity used, ● number of starts and inhibit time, ● running hours counter. Schneider Electric - PMC – C.Alépéé – 2009/01/05 ● Readout of program logic resource status ● event counter values, ● logical input status, ● status of the remote annunciation bits (TS). ● Remote control ● writing of remote control orders (TC) ● Other functions ● time tagging, ● remote reading of Sepam settings (remote reading), ● remote setting of protections and control logic time delays (remote setting); ● transfer of disturbance recording data. 4 - OSI: 7-layer architecture OSI = Open Systems Interconnection APPLICATION 7 LAYER Example: Modbus PRESENTATION 6 LAYER SESSION LAYER 5 TRANSPORT 4 LAYER NETWORK LAYER 3 DATA LINK LAYER 2 PHYSICAL LAYER 1 Schneider Electric - PMC – C.Alépéé – 2009/01/05 Data processing Network concept e.g. TCP/IP End-to-end management Network interconnection Bus concept: Ethernet Data transmission RS 485 & 232 5 - topology between components Bus Point to point Meshed Ring Star Schneider Electric - PMC – C.Alépéé – 2009/01/05 6 - type of transmission Simplex transmission: one-way Half duplex transmission: alternating two-way Full duplex transmission: simultaneous two-way Schneider Electric - PMC – C.Alépéé – 2009/01/05 7 - transmission mode Number of bits sent simultaneously Parallel bus 0 1 0 Serial bus 1 0 0 1 – Synchronous: clock = continuous transmission – Asynchronous: irregular transmission 1 character 0 1 1 0 0 0 1 1 Start Schneider Electric - PMC – C.Alépéé – 2009/01/05 Data Stop 8 Asynchronous transmission mode (cont'd) Need for a communication format communication frame 0 1 start useful data bits error check stop ● start the message. = initializes the communication frame, indicates the start of ● useful data bits = useful data bits of the message. ● error check = to check for transmission errors. ● stop = indicates the end of the message. Schneider Electric - PMC – C.Alépéé – 2009/01/05 9 - medium Distance: maximum length, line losses Rate = cable capacity Type of communication chosen: RS 485 or Ethernet Environment (EMC, Temperature, etc.) Price Twisted pair cable Simple to implement Low cost Schneider Electric - PMC – C.Alépéé – 2009/01/05 10 APPLICATION LAYER 7 PRESENTATION LAYER 6 SESSION LAYER TRANSPORT LAYER 5 4 NETWORK LAYER 3 DATA LINK LAYER 2 PHYSICAL LAYER 1 - physical layer standards: RS232 and RS485 RS232 Electrical levels 0 1 +5 -5 PC +15V - 15V RS485 devices 1.5 - 1.5 + 5V - 5V PC COM Port Max. rate RS 485 Modbus Link Length Control lines (flows) Schneider Electric - PMC – C.Alépéé – 2009/01/05 19200 Bauds 1Mbauds Point to Point Multipoint bus Half duplex Asynchronous 30 m m 1200 RTS/CTS No 11 2-wire bus topology Schneider Electric - PMC – C.Alépéé – 2009/01/05 12 4-wire bus topology Schneider Electric - PMC – C.Alépéé – 2009/01/05 13 RS485 signal Schneider Electric - PMC – C.Alépéé – 2009/01/05 14 Communication Settings ● Sepam address ● Speed ● Parity Schneider Electric - PMC – C.Alépéé – 2009/01/05 15 Sepam series 20 40 80 communication Interfaces Module ACE 949-2 Sepam connection to a Modbus 2 wires network Module ACE 959 Sepam connection to a Modbus 4 wires network Module ACE 937 Sepam connection to a Modbus optical fiber network Schneider Electric - PMC – C.Alépéé – 2009/01/05 16 ACE 969 interface Sepam series 20 40 80 double port plus DNP3 and IEC 870 5 103protocol ACE969-2TP Schneider Electric - PMC – C.Alépéé – 2009/01/05 ACE969-2FO 17 ACE 909-2 Convertor Installation and Quick Start RS485 / RS232 converter - ACE909-2 RS485 connection RS232 link Speed SW2/1 SW2/2 SW2/3 1200 2400 4800 9600 19200 38400 1 0 1 0 1 0 1 1 0 0 1 1 1 1 1 1 0 0 strap position function SW2/4 0 1 1 0 ON ON ON SW2/5 Selector 12 or 24vdc Ph/N power Fuse RS485 2 wire SW1/1 SW1/2 SW1/3 with parity without parity 2 stop 1 stop polarization at 0 V via Rp - 470 Ω polarization at 5 V via Rp +470 Ώ 150 Ώ impedance matching resistor at end of RS485 Bus Remote power source: the ACE909-2 converter supplies 12 V - 24 V ( ACE949 -959 / SEPAM 1000+ ) Division - Na me - Date - L angu age Schneider Electric - PMC – C.Alépéé – 2009/01/05 50 18 ACE 919 Convertor Installation and Quick Start RS485 / RS485 converter - ACE919 RS485 2 wire ACE 919 CC ACE 919 CA 24 - 48 V DC 110 - 220 V AC Strap pos ition func tion SW1/1 ON pola riza tion at 0V via Rp-470 Ώ SW1/2 ON pola riza tion at 5V via Rp+4 70Ώ SW1/3 ON 150 Ώ impedance matching resistor at e nd of RS485 bus Remote power source: the ACE919 converter supplies 12 V - 24 V (ACE949 - 959 / SEPAM 1000+ ) Division - Name - Date - Lan guag e Schneider Electric - PMC – C.Alépéé – 2009/01/05 supply voltage selection switch 110 V AC or 220V AC 51 19 Architecture of the RS485 network ●Pear to pear ● bus Schneider Electric - PMC – C.Alépéé – 2009/01/05 20 Optical network architecture ● pear to pear ● star ● daisy chain Schneider Electric - PMC – C.Alépéé – 2009/01/05 21 Modbus protocol master request master broadcasting reply slave slave slave Characterization of exchanges Modbus protocol may be used to read or write one or more bits, one or more words, the content of the event counter or the contents of the diagnosis counters. functions available: ● reading of n output or internal bits, ● reading of n input bits, ● reading of n output or internal words, Schneider Electric - PMC – C.Alépéé – 2009/01/05 slave slave slave ● reading of n input words, ● writing of 1 bit, ● writing of 1 word, ● fast reading of 8 bits, ● diagnosis of exchanges, ● reading of event counter, ● writing of n bits, ● writing of n words. 22 APPLICATION LAYER 7 PRESENTATION LAYER 6 SESSION LAYER TRANSPORT LAYER 5 4 NETWORK LAYER 3 DATA LINK LAYER 2 PHYSICAL LAYER 1 - for PLC communication ● For RS 485 or RS 232, and other links… ● Created in 1979 by Modicon ● Half-duplex protocol: one "speaker" at a time ● Master-slaves ● query / reply ● broadcasting with no feedback Maximum number of slaves: 31 Schneider Electric - PMC – C.Alépéé – 2009/01/05 23 - structure of a Modbus frame Address Data LRC Check CR LF ● ASCII (American:Standard Code ofFunction Information Interchange) Modbus 0D Hex 0A Hex 3A Hex Tolerance of one second silence between characters RTU (Remote Terminal Unit) Modbus silence Address Function Data CRC Check silence Silence >= 3.5 characters Used more since faster Schneider Electric - PMC – C.Alépéé – 2009/01/05 24 Presentation of request and reply frames data required for the request, Request bit or word The code is used to addresses, select the available bit or word values, requests number of bits or words 0 to FFh 1 byte function code 1 byte data N bytes when the message is received by the slave, the slave reads the check word and accepts or refuses the message CRC 16 2 bytes question Tr < 10 ms Reply 0 to FFh 1 byte Schneider Electric - PMC – C.Alépéé – 2009/01/05 addresses of bits or words read, value of bits or words read, number of bits or words function code 1 byte data N bytes reply The time is given with the following parameters: ● 9600 bauds, ● 8-bit format, odd parity, 1 stop bit. CRC 16 2 bytes 25 Modbus protocol: transmission medium occupancy diagram analyse and next exchange wait master wait broadcasting request to slave 1 slave 1 wait request to slave N answer Analyse and answer slave N answer simultaneous execution of the order by all the slaves physical medium time exchange i-1 Schneider Electric - PMC – C.Alépéé – 2009/01/05 exchange i exchange i+1 26 Diagnosis counters Sepam manages the following diagnosis counters: ● CPT1, first word: number of correct frames received, whether or not the slave is concerned, ● CPT2, second word: number of frames received with CRC errors, or frames received that are greater than 255 bytes and not interpreted, or frames received with at least one character that has a parity error, “overrun”, “framing”, “break” on the line. An incorrect rate causes incrementation of CPT2, ● CPT3, third word: number of exception replies generated (even if not sent, as result of a broadcast request), ● CPT4, fourth word: number of frames specifically addressed to the station (excluding broadcasting), ● CPT5, fifth word: number of broadcast frames received with no errors, ● CPT6, sixth word: not significant, ● CPT7, seventh word: number of “Sepam 2000 not ready” replies generated, ● CPT8, eighth word: number of frames received with at least one character that has a parity error, “overrun”, “framing”, “break” on the line, ● CPT9, ninth word: number of correct requests received and correctly executed. The counters may be accessed via the dedicated reading function (see Modbus protocol function 11 in appendix). Schneider Electric - PMC – C.Alépéé – 2009/01/05 27 Read function Schneider Electric - PMC – C.Alépéé – 2009/01/05 28 Modbus address table in Sepam series 20 Schneider Electric - PMC – C.Alépéé – 2009/01/05 29 Modbus address table in Sepam series 20 Schneider Electric - PMC – C.Alépéé – 2009/01/05 30 Modbus address table in Sepam series 20 Schneider Electric - PMC – C.Alépéé – 2009/01/05 31 Format 16NS and 16S Schneider Electric - PMC – C.Alépéé – 2009/01/05 32 Format B Schneider Electric - PMC – C.Alépéé – 2009/01/05 33 Format X Schneider Electric - PMC – C.Alépéé – 2009/01/05 34 TS remote annunciation list Schneider Electric - PMC – C.Alépéé – 2009/01/05 35 Write function Schneider Electric - PMC – C.Alépéé – 2009/01/05 36 Remote control order Schneider Electric - PMC – C.Alépéé – 2009/01/05 37 Time-sequencing A date is associated to each event: ● change of status of logic inputs ● change of status of automation data TS ● Internal data necessary for time-sequencing, time-setting, synchronization… Internal clock in Sepam: year, month, day, hour, minute and milliseconds (0 to 59999). Schneider Electric - PMC – C.Alépéé – 2009/01/05 38 Time-sequencing, synchronization Scada scada clock Sepam Sepam time-setting 4 words Modbus network Modbus network Synchronization link Sepam Sepam “Internal synchronization via the comunication network” architecture “External synchronization” via a logic input architecture 10 s 20 s 30 s Input I21, 10 to 60 s synchronization signal. message Schneider Electric - PMC – C.Alépéé – 2009/01/05 ∆=±4s 39 Exchange Principle Storage zone 64 events Status Change Master Request Zone 1-Request 3-Acknowledgement 2-Reading Schneider Electric - PMC – C.Alépéé – 2009/01/05 Reply Zone 4 events 40 Exchange principle 4 0 Exchange word Inside Sepam 64 event zone Master 1 Reading Acknowledgment 8 0 Master 2 Exchange word Inside Sepam 64 event zone Reading Acknowledgment Schneider Electric - PMC – C.Alépéé – 2009/01/05 41 Time-sequencing Exchange table 1/reading if ≠ 0 in the event table 2/writing to 0 for the following exchange incremented 0 = empty table upon each x = x events exchange 4 maximum polling word exchange number number of events type of channel: 0 for input/800 for others modbus data address event 2 reserved: Ø event 3 event 4 Max. stock: 64 events. 8 mots event 1 data status 0/1 not used year month day hour minutes milliseconds 0 to 59999 Schneider Electric - PMC – C.Alépéé – 2009/01/05 42 Remote reading and remote setting Protection and parameter settings available • Setting of protection functions • Sepam general characteristics Schneider Electric - PMC – C.Alépéé – 2009/01/05 43 Reading of the settings Exchange principle Protection setting zone Master 50/51 overccurrent Request Zone 50N/51N eath fault 27 under volltage 1-Request Reply Zone 2-Reading Schneider Electric - PMC – C.Alépéé – 2009/01/05 44 Remote parameter reading function Request frame The request is made by the supervisor, by means of a modbus "write words" command (code 6 or 16) at the address D080h of a 1-word frame which consists of the following: D080h B15 B14 B13 B12 B11 B10 B09 B08 function code B07 B06 B05 B04 B03 B02 B01 B00 unit number Reply frame The reply sent back by Sepam is contained in a zone with a maximum length of 125 words at the address D000h, which consists of the following: D00h B15 B14 B13 B12 B11 B10 B09 B08 B07 B06 B05 B04 B03 B02 B01 B00 function code unit number settings ………… (specific fields for each function) ………… Schneider Electric - PMC – C.Alépéé – 2009/01/05 45 Protection function parameters Schneider Electric - PMC – C.Alépéé – 2009/01/05 46 Data Format Schneider Electric - PMC – C.Alépéé – 2009/01/05 47 Remote settings ExchangePrinciple Writing zone Master Protection setting zone 50/51 overccurrent 50N/51N eath fault 27 under volltage 1-Writing request 2- reading request Reply zone 3-check Schneider Electric - PMC – C.Alépéé – 2009/01/05 48 Remote reading of settings B15 B14 B13 B12 B11 B10 B09 B08 B07 B06 B05 B04 B03 B02 B01 B00 function code = 01 unit number = 01 type of curve = 00 00 (most significant) type of curve = 00 00 (constant itme) set point = 00 00 (most significant) set point = 00 64 (set point at 100 A) time delay = 00 00 (most significant) time delay = 00 0A (time delay set to 10 x 10 = 100 ms) 00 00 (most significant) 00 00 (following values not significant, initalized to 0) Data format All the settings are transmitted in the form of signed 32-bit integers (encoded, as a complement of 2). Particular setting values A value equal to 7FFF FFFFh means that the setting is out of its validity range. To inhibit a protection function, simply set the inhibition parameter to 8000 0000h, the other parameters stay the same. If all the setting values are read as 8000 0000h, it means that the protection function concerned is inhibited. Schneider Electric - PMC – C.Alépéé – 2009/01/05 49 Disturbance recording Presentation Disturbance recording is used to store analog and logical values. Sepam records a maximum of two disturbance records. Each record contains two files: configuration file with suffix .CFG, data file with suffix .DAT. The files are read by the supervision system via the Jbus link. A record may be transferred until it is overwritten by a new record. Schneider Electric - PMC – C.Alépéé – 2009/01/05 50 Disturbance records Record zone Exchange principle Events Master Identification zone 1-reading of available OPG Request zone 2-request Disturbance 19 files max. *.cfg *.dat Aswer zone 125 words 3-reading 4-Acknoledgement Schneider Electric - PMC – C.Alépéé – 2009/01/05 51 Communication diagnostics help (Modbus) Check list 3) Asynchronous link (RS485) - Is the 2-wire/4-wire configuration correctly taken into account? - Are the L+ and L- connections OK (not inverted)? - Is the line polarised at the interface level (470 )? - Does the line have terminating resistors at each end (120 )? - Is the network length within the prescribed limit (EMC requirements)? 4) Connected products - Are the frames received and sent compatible with the functions supported by the supervision system and the products? - Are parameters correctly set (Baud rate, address, 2-wire/4-wire, etc.)? - Check on frame transmission and reception (control LED on modules). - Consistency of module addressing? Schneider Electric - PMC – C.Alépéé – 2009/01/05 52