240 likes | 563 Views
MOBI. MODBUS Interface for Smart Meters. MOBI. What is Modbus?. Application layer messaging protocol Client/server communication between devices connected on different types of buses or networks. MOBI. Modbus network. MOBI. RS485 – two wire network. D0 = A D1 = B
E N D
MOBI MODBUS Interface for Smart Meters
MOBI What is Modbus? • Application layer messaging protocol • Client/server communication between devices connected on different types of buses or networks
MOBI Modbus network
MOBI RS485 – two wire network D0 = A D1 = B LT = line terminator (150 ohm)
MOBI Modbus model Modbus consist of three layers Application layer Data Link Physical layer
MOBI Physical layer • The physical layer is concerned with the transmission and reception of the unstructured raw bit stream over a physical medium • Physical medium include: • RS232 • RS422 • RS485 Physical layer
+V -V MOBI Physical layer – RS232 RS232 • Communication mode : Full duplex • Cabling : Single ended • Maximum cable length : 15m at 19.2 Kbps • Maximum number of devices : 1 Signal example:
MOBI Physical layer – RS485 RS485 • Communication mode : Half duplex • Cabling : Single ended, multi drop • Maximum cable length : 1200m at 100 Kbps • Maximum number of devices : 255 V+ A Signal example: V+ B 1 0 1 0 1 0 1 0 1 0 1 0 1
Data Link MOBI Data Link • The data link layer provides error-free transfer of data frames from one node to another over the physical layer, allowing layers above it to assume virtually error-free transmission over the link • To do this, the data link layer provides: • Frame sequencing: transmits/receives frames sequentially • Detects and recovers from errors that occur in the physical layer by retransmitting non-answered frames (server) • Frame error checking: checks received frames for integrity using CRC (Cyclical Redundancy Checking) • Storing received data if ID’s match (client) • Statistics Physical layer
MOBI Data Link - Frame General Modbus frame (from server) Modbus frame • Address (ID code) • Address of client the data is intended for (range: 1 – 247) • Function • The function code field tells the client what kind of action to perform. Sub-function codes are added to some function codes to define multiple actions (read/write registers etc.) • Data • Contains additional information that the client uses to take the action defined by the function code. This can include items like discrete and register addresses, the quantity of items to be handled, and the count of actual data bytes in the field • CRC • The CRC is used to check the integrity of the frame
MOBI Data link – Frame timing • Each frame is separated by a silence of at least 3.5 characters. If the silence is shorter then the received frame is discarded • The minimum response time of a Modbus device is 3.5 characters • The time of a character is linked to the baud rate • If a silent interval of more than 1.5 character times occurs between two • characters, the message frame is declared incomplete and discarded
MOBI Data link – character Each character consists of 11 bits and is send from left to right
MOBI Data Link - Interaction Server Client Initiate request Perform the request Initiate response Function code Data request Receive the response Function code Data response
Data Link MOBI Application layer The application layer serves as the window for application processes to access the Modbus network. This layer contains a variety of commonly needed functions: • Analyze the requested function and process the data • Convert the data to different types when needed • Maintain a central database Application layer Physical layer
Structure of MODBUS MOBI MODBUS data is based on four primary tables that have distinguishing characteristics:
MOBI Structure of MODBUS For each of the primary tables, the protocol allows: • Individual selection of 65536 data items • Span multiple consecutive data items • Read and/or write to data items
MOBI Example data structure The example below shows data organization in a device having digital and analog, inputs and outputs. Each block is separate from each other, because data from different block have no correlation. Each block is thus accessible with different MODBUS functions. Device memory Modbus access Input Discrete Modbus request Coils Input Registers Holding Registers Modbus device
MOBI Modbus registers • Each block is accessible through registers ranging from 1 – 65536 • The contents of a register is determined by the application • Each register contains 16 bits also called a word • Combining registers makes it possible to represent all sorts of data types • Supported data types include: • Byte • Word • Double word (combine two registers) • 32 bit floating point • 64 bit floating point • Any data type could be represented if the server and client understand • each other (strings for instance)
MOBI Modbus registers
MOBI Modbus registers example
OPC & DDE servers • Communication with MODBUS devices over an RS485 network • Storing retrieved data from devices in a cache memory • OPC = OLE for Process and Control • DDE = Dynamic Data Exchange • NETDDE = DDE over a network MOBI Run a dedicated server on a PC using a standard interface (RS232/RS485) A server takes care of: Data can be retrieved from the server using:
OPC & DDE structure MOBI PC MODBUS NETDDE OPC/DDE server RS485 TCP/IP OPC, DDE Application
Viewing data MOBI Any application capable of using OPC or DDE can process the data • SCADA (Supervisory Control And Data Acquisition) • HMI (Human Machine Interface) • Excel
Question round For technical information contact: Evaristo Westplate Call: +31 72 50 71 400 Email: evaristo@sierra-instruments.nl