1 / 28

Using Modbus Protocol with OEMax Products Feb 26 ~ Mar 2, 2007

Using Modbus Protocol with OEMax Products Feb 26 ~ Mar 2, 2007. K.J Kim RAK OBB Strategic Marketing. What is Modbus ?. Introduced by Modicon ,1979 Modbus communication interface for a multidrop network based on a master/client architecture Connection Type: RS-232, RS-485, TCP/IP

tillie
Download Presentation

Using Modbus Protocol with OEMax Products Feb 26 ~ Mar 2, 2007

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Using Modbus Protocol with OEMax ProductsFeb 26 ~ Mar 2, 2007 K.J Kim RAK OBB Strategic Marketing

  2. What is Modbus ? • Introduced by Modicon ,1979 • Modbus communication interface for a multidrop network based on a master/client architecture • Connection Type: RS-232, RS-485, TCP/IP • Message based Communication • Coil : Discrete Output Value

  3. Modbus Communication Stack Only, explain Modbus RS-232C In this training

  4. Modbus Network Architecture

  5. Modbus Serial Transmission Modes • Two Modbus Serial Modes • Modbus/ASCII ASCII Code Format • Modbus/RTU (Remote Terminal Unit) Binary Format

  6. General Modbus Frame • General Modbus Frame PDU (ProtocolData Unit) Additional Address Function Code Data Error Check ADU (ApplicationData Unit)

  7. Modbus Addressing • Device and Modbus address ranges • All Registers will be assigned a number between 1 and 10000 • Modbus message addresses are used a number between 0 and 9999 • So, To access correctly, You must subtract -1 (or -10001 or -40001) • [Example] If you want to read Output coil 18, You must use value 17 in Modbus message  Maximum Value is device dependent.

  8. Modbus Function Code • Common Modbus Function Code NX Series PLC supports these kinds of Functions which are blue color.

  9. Function 01 : Read Coil Status Function 01 : Query Structure Function 01 : Answer Structure This sample is “Read Coils 20 (0x14) to 56 (0x38) from device 17 ((0x11)” The Address will be 0013H because 20-1=19=13H.

  10. Function 02 : Read Input Status Function 02 : Query Structure Function 02 : Answer Structure This sample is “Read Inputs 10197 ~ 10218 from device 17” The Address will be 00C4H because 10197-10001=196 =C4H .

  11. Function 03 : Read Holding Registers Function 03 : Query Structure Function 03 : Answer Structure This sample is “Read Register 40108 ~ 40110 from device 17” The Address will be 006BH because 40108-40001=107= 6BH.

  12. Function 04 : Read Input Registers Function 04 : Query Structure Function 04 : Answer Structure This sample is “Read Register 30009 from device 17” The Address will be 0008H because 30009-30001=8.

  13. Function 05 : Force Single Coil Function 05 : Query Structure Function 05 : Answer Structure This sample is “Request to Force Coil 173 ON in Slave Device 17” The Address will be 0xAC because 173-1=172=0xAC FF00  ON, 0000OFF

  14. Function 06 : Preset Single Register Function 06 : Query Structure Function 06 : Answer Structure This sample is “Request to preset register 40002 to 00 03 in Slave Device 17” The Address will be 0001H because 40002-40001=1.

  15. Function 07 : Read Exception Status Function 07 : Query Structure Function 07 : Answer Structure This sample is “Request to Read Exception Status in Slave Device 17”

  16. Function 15 : Force Multiple Coils Function 15 : Query Structure Function 15 : Answer Structure This sample is “Request to Force 10 Coils starting at coil 20 in Slave Device 17”

  17. Function 16 : Preset Multiple Registers Function 16 : Query Structure Function 16 : Answer Structure This sample is “Request to preset two registers starting at 40002 to 00 0A and 01 02 in Device 17

  18. Function 17 : Report Slave ID Function 11 : Query Structure Function 11 : Answer Structure This sample is “Request to Report ID and Status of Slave Device 17”

  19. Samples Master Query with ASCII/RTU Framing Slave Response with ASCII/RTU Framing

  20. Communicationwith NX Series PLC • To operate Modbus RTU, Must Enable F12.2 (Port1) or F12.9 (Port2) • Addresses Map for Modbus • NX7(S) : Port 1 – Slave , Port2 – Slave & Master

  21. Communication with NX Series PLC • Let’s see Modbus/RTU Communication Sample Program which is programmed by Visual Basic.Net 2005.

  22. Configuration Flag in NX Series PLC When F12.2 or F12.9 are set, Port1 or 2 of CPU will be configured to support Modbus RTU slave protocol.

  23. Communication System Register • Special Register (SR298 ~ SR373) is provided for holding the data transmitted and received

  24. Calculation CRC 2 Byte CRC CRC Calculation Scope CRC = 65535 For i = 0 To PL - 1 CRC = Int(CRC / 256) Xor CRCTable((CRC Xor DATABLOCK(i)) And 255) Next i CRC : Cyclic Redundancy Check

  25. Communication with NXIO-MNA/232

  26. Communication with AC Drive MSD

  27. TM SM Maximum Value for OEMs

More Related