• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
40120140505003
 

40120140505003

on

  • 76 views

 

Statistics

Views

Total Views
76
Views on SlideShare
76
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    40120140505003 40120140505003 Document Transcript

    • International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN 0976 – 6464(Print), ISSN 0976 – 6472(Online), Volume 5, Issue 5, May (2014), pp. 19-26 © IAEME 19 A DESIGN OF PROFIBUS DP SLAVE STATION INTERFACE CARD FOR MODBUS BASED INTELLIGENT FIELD NETWORK INSTRUMENTS Apurva Patel1 , Vijay Savani2 Institute of Technology, Nirma University, Ahmadabad, India ABSTRACT The Fieldbus is combination of technology of the modern computer and communication and the control. Recently in the field most intelligent devices are work on the Modbus field protocol. Now a days Profibus DP technique is widely applied in the field of industrial control. We focus on the design of profibus DP interface card through which the automation intelligent devices, which lack of profibus interfaces, can communicate and monitor with the profibus DP protocol instead of Modbus protocol. This interfacing card is based upon microprocessor chip and several interfacing integrated circuits. This paper shows data acquisition and sequence of the data transfer in the profibus DP interface card. As the result of sequence of experiments, we can read and write data on the field devices and accomplish the communication under the direction of related protocols. Keywords: Profibus-DP, Data Acquisition, Modbus RTU, Interface Card. 1. INTRODUCTION Profibus is the German national standards DlNl9245 and European standard EN50170's Fieldbus; it is one of the most popular Fieldbus technologies. Its products are widely used in industry, electricity, energy, transportation, and other automated fields. According to the characteristics of its applications, Profibus is divided into three types: Profibus-DP, Profibus-FMS and Profibus-PA. Profibus-DP is suitable for high-speed communication between decentralized peripherals, which is more and more popular between automation devices and smart instrumentation industries.[1] Modbus is a serial communications protocol originally published by Modicon (now Schneider Electric) in 1979 for use with its programmable logic controllers (PLCs). Simple and robust, it has since become a de facto standard communication protocol, and it is now a commonly available means of connecting industrial electronic devices. The main reasons for the use of Modbus in the industrial environment are developed with industrial applications in mind, openly published INTERNATIONAL JOURNAL OF ELECTRONICS AND COMMUNICATION ENGINEERING & TECHNOLOGY (IJECET) ISSN 0976 – 6464(Print) ISSN 0976 – 6472(Online) Volume 5, Issue 5, May (2014), pp. 19-26 © IAEME: www.iaeme.com/ijecet.asp Journal Impact Factor (2014): 7.2836 (Calculated by GISI) www.jifactor.com IJECET © I A E M E
    • International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN 0976 – 6464(Print), ISSN 0976 – 6472(Online), Volume 5, Issue 5, May (2014), pp. 19-26 © IAEME 20 and royalty-free, easy to deploy and maintain, moves raw bits or words without placing many restrictions on vendors.[2] 2. STRUCTURE OF PROFIBUS DP PROTOCOL Profibus DP protocol adopts the reference model of ISO OSI, includes only first, second and the user interface (application); it doesn’t have the third to seven layer for the purpose of high-speed data communication. DP master is the initiative node in the Profibus-DP network and it sends control orders through request messages; DP slave is the passive node in the Profibus-DP network and it answers the request message from the DP master through response messages.[3] The basic sequence of message communication between Master and Slave is shown in Fig.1. Fig. 1: master slave communication frame structure A good understanding of the Profibus-DP system state machine will contribute a lot to the process of the programming. The state machine is described as following: After power on, the slaves first wait for WAIT_PRM messages from the masters. After the slaves are parameterized, the master should send a WAIT_CFG message. During this process, if the slaves’ configuration phase is consist with the configure information from the master, the slaves will enter into a new phase and are ready for data exchange. However, if errors occur during this process, the salves will return to the first step of WAIT_PRM phase and execute the same process cyclically until all errors are gone. These measures assure the stability of the communication process between the DP master and DP slaves. The state machine module of the whole process is shown as Fig.2[3]
    • International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN 0976 – 6464(Print), ISSN 0976 – 6472(Online), Volume 5, Issue 5, May (2014), pp. 19-26 © IAEME 21 Fig. 2: profibus communication flow 3. STRUCTURE OF MODBUS PROTOCOL Modbus protocol applies the master slave principle. When a controller originates a message, it does expect a response message from a slave device. And similarly, when controller receives a message it constructs a slave device. The query: The function code in the query tells the addressed slave device what kind of action to perform. The data bytes contain any additional information that the slave will need to perform the function. For example, function code 03 will query the slave to read holding registers and respond with their contents. The data field must contain the information telling the slave which register to start at and how many registers to read. The error check field provides a method for the slave to validate the integrity of the message contents. The Response: If the slave makes a normal response, the function code in the response is an echo of the function code in the query. The data bytes contain the data collected by the slave, such as register values or status. If an error occurs, the unction code is modified to indicate that the response is an error response, and the data bytes contain a code that describes the error. The error check field allows the master to confirm that the message contents are valid.[4] Fig. 3: modbus communication process
    • International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN 0976 – 6464(Print), ISSN 0976 – 6472(Online), Volume 5, Issue 5, May (2014), pp. 19-26 © IAEME 22 MODBUS RTU Memory Map Table 1: modbus RTU memory map Modbus RTU Data Type Common name Starting address Modbus Coils Bits, binary values, flags 00001 Digital Inputs Binary inputs 10001 Analog Inputs Binary inputs 30001 Modbus Registers Analog values, variables 40001 Basic Function codes are as under. 01 Read Coil Status (read coil value) 02 Read Input Status (read coil status) 03 Read Holding Registers (read holding register 16 bit value) 04 Read Input Registers ( read read-only input register 16 bit value) 05 Force Single Coils (write data to single coil) 06 Preset Single Register (write 16 bit data to the single holding register) 15 (0F Hex) Force Multiple Coils (write multiple coil write at same time) 16 (10 Hex) Preset Multiple Registers (write multiple holding register at same time) 4. PHYSICAL STRUCTURE DESIGN Profibus physical network is shown in following figure. This shows a Modbus based devices can connect with the interface slave card and creates a combination of a profibus slave. Here single intelligent device in connected. But multiple Modbus devices can also connect. With multiple devices, memory management could be different. Fig. 4: physical structure design
    • International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN 0976 6464(Print), ISSN 0976 – 6472(Online), Volume 5, Issue 5, May (2014), pp. 5. SOFTWARE FLOW BLOCK DIAGRAM This process is done in two parallel communications profibus slave and Modbus master respectively. The Modbus master is configured internally or externally for sending its queries to the field Modbus slave devices. Modbus master sends queries for read and upon the profibus master instructions weather it wants to read or write data from the Modbus slave on field devices. This figure shows the software process of the interfacing card. Here profibus us works on the port 0 and Modbus works on port 1. Profibus slave is initialised based on weather we are using ASIC or the Profibus slave dedicated integrated circuits. After initialise and starting both protocols, memory blocks and data transfer can be done in specified ram communication 6. COMMUNICATION BLOCK Fig. 6: memory related communication process block International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN 0976 6472(Online), Volume 5, Issue 5, May (2014), pp. 19-26 © IAEME 23 SOFTWARE FLOW BLOCK DIAGRAM Fig. 5: programming flow This process is done in two parallel communications profibus slave and Modbus master respectively. The Modbus master is configured internally or externally for sending its queries to the field Modbus slave devices. Modbus master sends queries for read and write to the slave depends upon the profibus master instructions weather it wants to read or write data from the Modbus slave on field devices. This figure shows the software process of the interfacing card. Here profibus us works on port 1. Profibus slave is initialised based on weather we are using ASIC or the Profibus slave dedicated integrated circuits. After initialise and starting both protocols, memory blocks and data transfer can be done in specified ram communication COMMUNICATION BLOCK memory related communication process block International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN 0976 – © IAEME This process is done in two parallel communications profibus slave and Modbus master respectively. The Modbus master is configured internally or externally for sending its queries to the write to the slave depends upon the profibus master instructions weather it wants to read or write data from the Modbus slave on field devices. This figure shows the software process of the interfacing card. Here profibus us works on port 1. Profibus slave is initialised based on weather we are using ASIC or the Profibus slave dedicated integrated circuits. After initialise and starting both protocols, memory blocks and data transfer can be done in specified ram communication block.
    • International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN 0976 – 6464(Print), ISSN 0976 – 6472(Online), Volume 5, Issue 5, May (2014), pp. 19-26 © IAEME 24 Communication interface card have a memory region as shown in fig. 6, which stores data from profibus and Modbus communication. Profibus protocol communicates data in the individual byte format. For this data-out from profibus master stores in the data and that data is to be used for create Modbus write query. If multiple write query is to be sending to the Modbus slave, interfacing card manages proper query with proper length. And read query response data to proper profibus address. Data formation for write data queries Modbus protocol is as under. Function code 5: write single coil Single coil contains single address for one bit data in Modbus slave. Profibus data are in byte format. So assigning every coil to every byte can generate lake of bytes for other functions. So, counting each single coil write queries and modulo with count of this queries byte assignment is consider. For communication each bit change of assigned byte is observed. Function code 15: write multiple coil Similar to the single coil data, multiple coil write should contain number of register are modulo of length to 8.this value can be generate during configuration. Function code 6 and 16: register write Holding register contains two bytes of data for single address. So two byte assigned for each holding register. For multiple register same logic is applied. Here lower profibus byte is assigned for most significant byte for holding register. This is same for read coil query. in read section ,single data byte can describe minimum of 8 coil status as per the configuration and can describe one higher or lower byte of register. 7. TEST RESULTS Fig. 7: modbus data capture
    • International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN 0976 – 6464(Print), ISSN 0976 – 6472(Online), Volume 5, Issue 5, May (2014), pp. 19-26 © IAEME 25 Fig. 8: profibus communicator out and in data Modbus queries for read and write coils, read and write holding registers are shown in following table. Table 2: Configuration Table Slave id Function code Starting adder length Profibus (byte)address 1 1 1 8 1(input) 1 3 1 8 2 to 17(input) 1 15 1 8 1(output) 1 16 1 8 2 to 17(output) Configuration of profibus parameters is 1-bytes in, 1-bytes out,16-bytes in and 16-bytes out, written value in output data section all 17 byte can be observe as same in input data section and Modbus slave as well. As per the table we can write data for mod bus coil in byte no 1. And same result response from the Modbus slave coil can be observed in Modsim2 window in fig.7 circled with red colour. Same data can seen in profibus simulator, where read data are at byte no 1. Same for holding registers which are in count of 8, so they are read and write from 2 to 17 bytes in profibus simulator (fig. 8). Here, lower byte is higher byte for holding register. Byte 2 in profibus is higher
    • International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN 0976 – 6464(Print), ISSN 0976 – 6472(Online), Volume 5, Issue 5, May (2014), pp. 19-26 © IAEME 26 byte of register in Modbus holding register 40001. This is shown in dark green polygon. And byte 3 is lower byte for register 40001. 8. CONCLUSION Form the results, we can observe that changing value in profibus coiled assigned section bits of byte can be observe in Modbus slave with each coil address. And change in each value of holding register in profibus write section, can be observe as combination of two bytes in Modbus slave address as a word. Thus, communication using interfacing card with proper data management is successfully implemented in to observe profibus data monitoring on the desktop. REFERENCES [1] Zhao Jue and Yang Shun, Design of Modbus-Profibus Fieldbus Bridge Based on The STM32 and VPC3 + C , 3rd International Conference on Software Engineering and Service Science (ICSESS), Jun. 2012,session 11, paper 2, pp411 - 414 . [2] Modbus [Online], Available: http://en.wikipedia.org/wiki/Modbus, Feb. 13, 2014, [Mar. 2014] [3] Jun Xu and Yan-Jun Fang, Profibus Automation Technology and Its Application in DP Slave Development, International Conference on Information Acquisition,, Jun. 2004, sensors and instruments, paper 8, pp 155-159. [4] Modicon Modbus Protocol Reference Guide, [Online] Available: http://modbus.org/docs/PI_MBUS_300.pd f, [Mar. 2014] [5] Ramesh Kamath, Siddhesh Nadkarni, Kundan Srivastav and Dr. Deepak Vishnu Bhoir, “Data Acquisition System and Telemetry System for Unmanned Aerial Vehicles for Sae Aero Design Series”, International Journal of Electronics and Communication Engineering & Technology (IJECET), Volume 4, Issue 5, 2013, pp. 90 - 100, ISSN Print: 0976- 6464, ISSN Online: 0976 –6472. [6] Seema Vora, Prof.Mukesh Tiwari and Prof.Jaikaran Singh, “GSM Based Remote Monitoring of Waste Gas at Locally Monitored GUI with the Implementation of Modbus Protocol and Location Identification Through GPS”, International Journal of Advanced Research in Engineering & Technology (IJARET), Volume 3, Issue 2, 2012, pp. 52 - 59, ISSN Print: 0976-6480, ISSN Online: 0976-6499.