0% found this document useful (0 votes)
14 views

Troubleshooting Modbus Protocol

Troubleshooting

Uploaded by

Charef
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
14 views

Troubleshooting Modbus Protocol

Troubleshooting

Uploaded by

Charef
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 37
Modbus Data communications co eit) etal td systems eee by Steve Mackay www. idc-online.com/slideshare Ta EIT Micro-Course Series * Every two weeks we present a 35 to 45 minute interactive course * Practical, useful with Q&A throughout * PID loop Tuning / Arc Flash Protection, Functional Safety, Troubleshooting conveyors presented so far * Upcoming: — Electrical Troubleshooting and much much mors * Goto http://www.eit.edu.au/free-courses * You get the recording and slides www.idc-online.com/slideshare Overall Presentation A review of the Modbus Protocol and related some troubleshooting issues. www. idc-online.com/slideshare Dear Ca EF Objectives * Give an introduction to Modbus * Review simple troubleshooting steps www. idc-online.com/slideshare PU * Introduction to Modbus protocol * Troubleshooting Modbus * Conclusion eet came www. idc-online.com/slideshare ae Ca fre! 1.0 Introduction to Modbus Objective The Modbus Messaging protocol The transportation of Modbus requests and responses on serial networks Modbus memory allocation Modbus Function Codes and their application The difference between Modbus RTU and ASCII Troubleshooting Modbus systems in terms of: -—— No response to requests '——* Exception responses www. idc-online.com/slideshare WOU may i Modbus messaging * Application layer (OSI layer 7) protocol that provides client/server communication between devices connected to different types of buses or networks ‘Request/Response’ type protocol and nota ‘master/slave’ type protocol www.idc-online.com/slideshare t aa i ll Master-slave interaction Request Indication MODBUS » | MoDBUS Client Confirmation Response << www. idc-online.com/slideshare TOTTI Ga Ne Te Modbus transaction www.idc-online.com/slideshare logy Training that works Modbus Serial communication stack MODBUS 7 | MESSAGING PROTOCOL MODBUS ‘SERIAL —_—_—_—= SF : www.idc-online.com/slideshare Wyre Lae) Modbus Serial ADU ADU I <-—_————)> POU www. idc-online.com/slideshare Oa ea Modbus.... * The Address field * The Function field * The Data field * The Error Check field Allocation of Modicon memory address blocks www.ide-online.com/slideshare Uae a » RTU mode * 8 data bits, even, odd or no parity, 1 or 2 stop bits * Gap of 3% character lengths used for header (3 % mS) * Same for trailer * Gap in transmission >1,5ms causes frame to be discarded * CRC error checking * 999810 transmitted as (2 bytes) ifie! coon Silence +3.5 Bytes 1 Byte 1 Byte ‘Variable 2Bytes «= > 9.5 Bytes RTU message frame www.ide-online.com/slideshare alagy Traini y ad ASCII Mode * 7 data bits, even, odd or no parity, 1 or 2 stop bits Header =: (colon) Trailer = Gaps of 1 second in frame acceptable LRC error checking (not CRC) * 999810 (0x270E) transmitted as the ASCII string 270E i.e. <0x32><0x37><0x30><0x45> (4 bytes) ee ‘start “Unit ——-Funetion End 0 ldentiter Code. BEE HRC MERLE, 12 2 eytes zeyes varabe = zeyten 2 Bytes ASCII message frame www.idc-online.com/slideshare Pat Function Code * FC01- reading coils-RTU mode : —————+ Response message Request message aS = 2 = * Read input discrete : ———+ . . oom m Response message www. idc-online.com/slideshare logy Training that works Function Codes.... Request message + Read multiple registers ; => = Seer = B Request message * FC04-reading input register = Ea ye) BB = . « we ane Response message im www. idc-online.com/slideshare te Taya Function Codes.... BEREE * Write coil : Response message BEEBE? mee aa2ee + Write single register : ——————+ Response message we www.idc-online.com/slideshare i logy Training that works Force multiple coils 2S Se Se Request message * Write multiple registers ;: —————~ Response message www. idc-online.com/slideshare en TUT aE www.idc-online.com/slideshare _ (OST Tee Typical problems * Hardware or software problems : Mis-wired communication cabling and faulty communication interfaces + Hardware problems Controller application tries to access non-existent target devices nodes or * Software (protocol) use invalid Function Codes, address related problems non-existent memory locations in the target devices, or specify illegal data format types www. idc-online.com/slideshare ] Tea Tools used RS-232 breakout boxes, RS-232 to RS-485 + Hardware tools : converters, continuity testers, voltmeters, screwdrivers, pliers, crimping tools and cabling tools. + Software tools ———— Protocol analyzer * Hardware troubleshooting * Software troubleshooting WOU ream) i www.idc-online.com/slideshare Overall Concept www. idc-online.com/slideshare TES Tools of the trade * Cable tester © TCP/IP (and other third party) Utilities * Protocol Analyzer (e.g. Wireshark) www. idc-online.com/slideshare Training that works Hardware and Physical Cabling * Check cable on both sides of connection * Switch lights * Incorrect wire type and components * Straight versus cross over cable * Excessive untwists * Damaged RJ-45 connector * Electrical noise and shielding www. idc-online.com/slideshare TCP/IP Utilities * Ping * Arp * Netstat * Nbtstat * Ipconfig * Tracert www.idc-online.com/slideshare rea ¢ Easiest ways to test connectivity across the network and confirm that an IP address is reachable C:\WINDOWS|\system3 2\cmd. exe Ta) Ue Ciba Ut mee Pinging 192.168. EE eee er ae es es re Urweetrer | Lestat) ers: Seer) Ue Lee pecs 1 re) ag 168 Poteet cae tty Maximum Cone eee oy www. idc-online.com/slideshare Arp -a * Displays hardware and IP address mapping www.idc-online.com/slideshare TT Wyre a) Netstat -e * Displays activities since last reboot ¢ Useful data on any problems www.idc-online.com/slideshare Nbtstat * Protocol Stats & TCP/IP connections www.idc-online.com/slideshare Wyre Lae eect Por ra aT UGB tec mrt osolt Corp. a mae IP Configurat ior oy a emote stry ree ries eee meriota! att ars: coat er ee www. idc-online.com/slideshare o Penrose i aa eC ees ered ee Sea Peer ee ry ae Aiea * Sette) Pe mereeroriscrinrtantt st rf ae a www. idc-online.com/slideshare: Packet Analysis www. idc-online.com/slideshare Technology Training that works OSI Model OSI Model Data Layer myers @ 4 a 2 I Packet Structure 13. 2.456800_ 10.0.0.138 Broadcast ane who has 40.0.0.50? eT) 10.0.0.138 TS S.T221L 102.168.0,7 ie ToMP echo (ping) reply 27 3.458269 10.0.0.128 amp iho has 20.0.0,50? Tel] 20,0,0,238 18 4.213607 193.468. 0.2 202.168.0.3 Tome echo

You might also like