Home

I1103909

image

Contents

1. 232C compatible serial interface that defines the different parameters like connector pin outs cabling signal levels trans mission baud rates and parity checking The Controller transit using a technique that is called master slave technique in which only one device the master can initiate any transactions called queries The other devices the slaves respond by supplying the requested data to the master or by taking the action requested in the query 2 A The Query Response Cycle Quer Message fron _ m Device Address Maste Device Address Function Code Eight Bit Data Bytes Error Check Eight Bit Data Bytes Fig 1 Master Slave Query Response Cycle National Conference on Emerging Trends in Computer Electrical amp Electronics ETCEE 2015 International Journal of Advance Engineering and Research Development IJAERD e ISSN 2348 4470 print ISSN 2348 6406 Impact Factor 3 134 The Query The function code in the query informs the addressed slave device what kind of action to be performed For example if the 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 2 The Response If the slave responds normally the functi
2. IEW It allows the exchange of data between PLCs and co mputers So for the interfacing the programming cable is required A Embedded Serial Port Wiring The embedded serial port is a non isolated RS232 RS485 serial port which is targeted to be used for short distances lt 3m to devices such as HMIs For the interfacing 1761 CBL PMO2 cable is typically used to connect the embedded serial port to Panel View Component of Scada using RS232 One end of DB 8 PIN is connected in PLC as slave and another end is connected in computer Master or HMI 1 1761 CBL PM02 Series B Cable al eE Fig 10 Developed block diagram for MODBUS Read and Write Fig 12 Embedded Serial Port Wiring VI TESTING RESULT A Digital On Off National Conference on Emerging Trends in Computer Electrical amp Electronics ETCEE 2015 International Journal of Advance Engineering and Research Development IJAERD e ISSN 2348 4470 print ISSN 2348 6406 Impact Factor 3 134 In the Allen Bradley PLC there are 20 digital inputs and 28 digital outputs as shown in Fig 13 For the digital inputs and outputs assigned in PLC we separate them with different addresses which is given in MODBUS Addressing Frame For the digital Input the address starts with 10000 and for digital output the address starts with 00001 Analog Input Digital Inputs 1O_P2_AI 00 IO EM DI _00 Digital Outputs Analog Ouput IO EM DO 00 IO P3_ AO 00 Fig 13 Allen Br
3. National Conference on Emerging Trends in Computer Electrical amp Electronics ETCEE 2015 International Journal of Advance Engineering and Research Development IJAERD e ISSN 2348 4470 print ISSN 2348 6406 Impact Factor 3 134 Interfacing of PLC with NI LabVIEW using Modbus Protocol Pooja Panchal Prof Alpesh Patel Instrumentation and control section Institute of technology Nirma University Abstract This paper focuses on interfacing of high end Programmable Logic Controller with NI LabVIEW using Modbus RTU protocol The aim behind doing this is to develop a platform to enable real time process control data logging analysis etc As on today PLC is the most widely used controller in automation process control etc In industries there is a demand of supervisory control and data acquisition along with the PLC based process control The paper focuses on developing communication between PLC and NI LabVIEW evaluation version so that a low cost SCADA platform can be de veloped In order to implement the idea AB micro 830 PLC is used Keywords NI Lab VIEW PLC Modbus RTU Protocol SCADA I INTRODUCTION Automation or automatic control refers to an area where different control system components are used to operate machines with minimum or reduced human intervention Automation is applicable and popular in most of the manufacturing production industries and is growing rapidly To automate any process programmable l
4. adley PLC 1 Discrete Input and Output Coils In the discrete input it is of single bit with only read type and in the coil it is same as Input but both read write type which is shown in Fig 14 Here is one examples for on off The Ladder logic programming is done in the PLC and according to that when we apply some input the output will glow and when we remove it the output is zero or off as shown in Fig S and Fig 16 Controller Modbus Mapping Variable Name a Data Type Address Addresses Used 10001 10001 00001 00001 Fig 14 Modbus mapping of discrete input andoutput in PLC When we apply some input the teriminal goes The Output or the coil glow as PLC shown by arrow in Fig 15 Result of digital on When the input is released the terminal turns to blue as shown by arrow Fig 16 Result of digital off B Continuous Data Read and Write In the Allen Bradley PLC there are 4 analog input and 2 analog output as shown in Fig 13 The analog mput is called as Input register of 16 Bit Word and only Read type and the analog output is called as Holding Register of 16 Bit Word and both read and write type 1 Input Register and Holding Register The Address assign for Analog Input and output are shown in Fig 17 Controller Modbus Mapping a Variable Name Data Type Address Addresses Used 10 P2 Al 00 Unt 30001 30001 JO P3 AO 00 Ulnt 40001 40001 Fig 17 Modbus mapping of analog input and output
5. b eecs umich edu modbus documents PI_MBUS_300 pdf 3 Wei Zhan Jay R Porter and Joseph A Morgan Experiential Learning Of Digital Communication Using LabVIEW IEEE Transactions on Education vol 57 no 1 February 2014 4 P Pillay and Z Xu LabVIEW implementation of speed detection for mains fed motors using motor current signature analysis IEEE Power Eng Rev vol 18 no 6 pp 47 48 Jun 1998 5 C Salzmann D Gillet and P Huguenin Introduction to real time control using LabVIEW with an application to distance learning Int J Eng Educ vol 16 pp 255 272 2000 6 Introduction to Modbus Available http www ni com white paper 675 en 7 Modbus Library for LabVIEW Available htt p www ni com example 29756 en
6. ess time Lab VIEW is the ideal development environment for innovation dis covery and accelerated results Combine the power of Lab VIEW software with modular reconfigurable hardware to overcome the ever increasing complexity involved in delivering measurement and control systems on time and under budget Modbus RTU protocol is used for the communication of AB PLC and NI Lab VIEW Both support Modbus RTU protocol Modbus is typically used for Supervisory Control and Data Acquisition SCA DA style network communication between devices For example a large server may be used to master a programmable logic controller PLC or programmable automation controller PAC while that PLC PAC may in turn master a sensor valve motor or any other embedded device I MODBUS PROTOCOL Modbus is a serialcommunications protocol originally published by Modicon in 1979 for use with its programmable logic controllers PLCs The common language used by all Modicon controllers is the Modbus protocol 2 The Modbus protocolis used to exchange the data between the PLC and the computers or HMI This protocol built a message frame that controllers will visualize and use regardless of the type of networks over which they need to communicate It describes the process a controller uses to request access to another device how it will respond to requests from the other devices and how errors will be detected and reported 2 The Modicon controllers use an RS
7. g Workbench is a system design platform and development environment for a visual programming language from National Instruments Lab VIEW was extensively used in the laboratory sessions which better prepared students for the course projects 3 Many researchers and engineers use Lab VIEW for testing and rapid prototyping in the product development process 4 Lab VIEW has been used to teach dynamic systems and controls 5 We have used two function blocks from NI LA BVIEW namely MB Serial INT and MB Serial Master Query for establishing communication between PLC and NI LA BVIEW In MB Serial INT block specify the visa resource name baud rate parity flow control timeout mode as shown in Fig 8 Fig 8 MB Serial Initialization In MB Serial Master Query block the follo wing parameters are shown in Fig 9 A GUI designed in Lab VIEW makes the real time monitoring as well as data logging possible In Fig National Conference on Emerging Trends in Computer Electrical amp Electronics ETCEE 2015 International Journal of Advance Engineering and Research Development IJAERD e ISSN 2348 4470 print ISSN 2348 6406 Impact Factor 3 134 10 the NI LabVIEW based SCADA is developed for MODBUS READ and WRITE i ECE 3 bad bad fad a Fig 11 Developed front panel diagram V INTERFACING OF PLC WITH NI LABVIEW MODBUS defined as the communication protocol for establishing communication between PLC and Lab V
8. in PLC For the data to be read and write the NI LA BVIEW based Scada is developed in such a way that when the condition is false it starts read the data in Register output and when the condition is true its starts write the data in Register output as shown in Fig 18 and Fig 19 Here is one example for the data Read and write In this the programming is done in CCW Component Connected workbench software in Structure text and Scada is developed using two blocks of Modbus available in NI LABVIEW that is Shown in Fig 10 National Conference on Emerging Trends in Computer Electrical amp Electronics ETCEE 2015 International Journal of Advance Engineering and Research Development IJAERD e ISSN 2348 4470 print ISSN 2348 6406 Impact Factor 3 134 PO e300 NA Re a a OO Eee ee O Fig 20 PLC data status in CCW Fig 18 PLC data satus in CCW Software In figure 19 shows the different data s are Read from PLC to NI LAB VIEW E EA BEE ea Fig 2 1 PLC data Write in LabVIEW Fig 19 Data read from PLC to NI LABVIEW 2 In fig 20 the data of setpoint in yellow circle is zero initially in the variable monitoring of PLC After giving command from LABVIEW the Data are write in PLC as shown in Fig 21 and Fig 22 il I INTEGRALI deva levd poop e o ac OO Lat te sevar kea a EEE Le SCAER2 as owt TONI TONDO autotune TORT auto inital IPIDCONTROLLEF gains epee
9. ion address should be left at default settings 5 Click Advanced Settings and set advanced parameters as shown in Fig 5 C ASCII ASCII provides connection to other ASCII devices such as bar code readers weigh scales serial printers and other intelligent devices You can use ASCII by configuring the embedded or any plug in serial RS232 RS485 port for the ASCII driver 1 1 Configure ASCII 1 Open the Connected Components Workbench project On the device configuration tree click on Controller properties and then Click Serial Port 2 Select ASCII on the Driver field Controller Serial Port Driver Baud Rate Parity Advanced Settings Protocol Control Append Chars Ox0D 0x04 Ox0D 0x04 No Handshake ow Ignore Control Line Deletion Mode Term Chars j Data Bits Stop Bits XON XOFF i amp G lt Echo Mode Fig 6 Configuration of ASCII 3 Specify baud rate and parity by default baud rate is 19200 and parity is none 4 Click Advanced Settings to configure advanced parameters as shown in Fig 7 Advanced Settings Protocol Control Append Chars Ox0D 0x04 Term Chars 0x00 0 04 Control Line No Handshake ka Deletion Mode Ignore Data Bits oo Stop Bits 1 My k SONIXOFF k Echo Mode Fig 7 Advanced configuration setting IV MODBUS IN NI LABVIEW Lab VIEW Laboratory Virtual Instrument Engineerin
10. lers are setup to communicate on a Modbus network using RTU Remote Terminal Unit mode each 8 bit byte in a message contains two 4 bit hexadecimal characters The main advantage of this mode is that it s greater Character density allows better data throughput than ASCII for the same baud rate Each message must be transmitted in a continuous stream 2 TABLE IT The format for each byte in RTU mode Bits Per Byte parity no bit for no parity 1 stop bit if parity is used 2 bits no parity C Function code used in MODBUS Protocol TABLE III Function Code of Modbus eS ee Read Holding Registers ae ae en Read Input Registers 05 Write Single Coil 06 Write Single Register D MODBUS Data model TABLE IV Modbus data model Holding Register 16 Bit Word MI MODBUS IN PLC Micro830 controllers support the following communication protocols through the embedded RS 232 RS National Conference on Emerging Trends in Computer Electrical amp Electronics ETCEE 2015 International Journal of Advance Engineering and Research Development IJAERD e ISSN 2348 4470 print ISSN 2348 6406 Impact Factor 3 134 485 serial port as well as any installed serial port plug in modules A Modbus RTU Master and Slave Modbus is a half duplex master slave communications protocol The Modbus network master reads and writes bits and registers Modbus protocol allows a single master to communicate with a
11. maximum of 247 slave devices Micro800 controllers support Modbus RTU Master and Modbus RTU Slave protocol 1 1 Configure Modbus RTU 1 Open the Connected Components Workbench project On the device configuration tree click on Controller properties and then Click Serial Port as shown in Fig 2 Controller General Phe Conor Serial Pork OSE Pore Ebene rnet Internet Prokocal Park Settings Pork Diagnostics Dake and Time Interrupts SkarkuprFaullks Modbus Mapping Embedded If S Phog In Modules lt Empky lt Empks gt lt Empky gt Gl Expansion Modules lt Empk lt Empk lt Empkw lt Empk YYY Fig 2 Serial Port Configuration 2 Select Modbus RTU on the Driver field Controller Serial Port Driver Modbus RTU Baud Rate 192000 w Parity None Si Modbus Role Modbus RTU Master Advanced Settings Protocol Control Media R5232 V RTSPre Delay lO Data Bits RTS Post Delay 0 fi Stop Bits 1 v Response Timer 200 Broadcast Pause 200 Inter Char Timeout io Fig 3 Serial Port Configuration on the Driver Field 3 Select the Baud rate by default 19200 parity is none Modbus role master slave 4 Click Advanced Settings to set advanced parameters as shown in Fig 3 B CIP Symbolic Client Server This protocol allows HMIs to easily connect to the Micro830 Micro 850 controller 1 1 Configure CIP Serial Driver 1 Open the Connected Componen
12. ogic controllers are widely used As of date lots of advancement has taken place in the PLC One of the important is the support of industrial communication standards The paper focuses on interfacing of high end Programmable Logic Controller with NI Lab VIEW using Modbus RTU protocol In order to implement this idea Allen Bradley PLC is used AB Miicro830 controllers are economical brick style controllers with the number of digital and analog inputs and outputs Depending on the controller type it is accommodate from two to five plug in modules It support the following communication protocols through the embedded RS 232 RS 485 serial port as well as any installed serial port plug in modules such as Modbus RTU Master and Slave CIP Serial Client Server RS 232 only and ASCII 1 The programming of the PLC is done in Connected Component Workbench CCW Software which is freely available provided by Rockwell automation The IEC 6113 standard supports 6 languages CCW supports Ladder logic Functional block diagram and Structure text out of which we are using Structure Text Lab VIEW Laboratory Virtual Instrument Engineering Workbench is a system design platform and development environment for a visual programming language from National Instruments NI Lab VIEW system design software is at the centre of the National Instruments platform providing comprehensive tools that need to build any measurement or control application in dramatically l
13. on code in the response is an echo of the function code in the query The data bytes contain the data that is collected by the slave such as register values If any error occurs the function code is modified and also indicates 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 2 B The Serial Transmission Modes Modbus networks using either of two transmission modes ASCII or RTU Users select the desired mode along with the serial port communication parameters baud rate parity mode etc during configuration of each controller The mode and serial parameters must be the same for all devices on a Modbus network 2 1 ASCII When controllers are setup to communicate on a Modbus network using ASCII A merican Standard Code for Information Interchange mode each 8 bit byte in a message is sent as two ASCII characters The main advantage of this mode is that it allows time intervals of up to one second to occur between characters without causing an error 2 TABLE I The format for each byte in ASCII mode Hexadecimal ASCII characters 0 9 A F hexadecimal character contained in each ASCII character of the message 1 start bit 7 data bits least significant bit sent first 1 Bits Per Byte parity no bit for no parity 1 stop bit if parity is used 2 bits f no parity 2 RTU When control
14. outgains E aer a vat va A aA 8 neo E m ECEE E ec nceececeececeee PPFPPFP P P PP PPPPPPPPPPPP Fig 21 Write data from LabVIEW to PLC National Conference on Emerging Trends in Computer Electrical amp Electronics ETCEE 2015 International Journal of Advance Engineering and Research Development IJAERD e ISSN 2348 4470 print ISSN 2348 6406 Impact Factor 3 134 VIL CONCLUSIONS This paper discusses the effectiveness of using LabVIEW to learn the Modbus Rs 232 communication protocol We have successfully implemented the different modes of Modbus and also develop a low cost Scada in NI LABVIEW platform After the implementation we gather the data from PLC and LABVIEW using MODBUS RTU Communication Protocol Using the low cost SCADA we practically visualize different graphs as shown in different figures ACKNOWLEDGMENT The success of any project depends largely on the encouragement and guidelines of many others We would like to convey our deepest gratitude to Dr Jayesh Barve for their invaluable guidance constant encouragement and continuous support in all our endeavours and showing faith in us We would also like to thank Rockwell Automation private limited for their support REFERENCES 1 Micro830 and Micro850 Programmable Controllers user manual Available htt p www Rock wellaut omation com 2 Modicon Modbus Protocol Reference Guide PI MBUS 300 Rev J June 1996 Available https www we
15. ts Workbench project On the device configuration tree click on Controller properties and then Click Serial Port as shown in Fig 4 Controller General he nor 5 Serial Pork OUSE Port Ekh hermnmekt Internet Prokoceal Fort Settings Port Diagnostics Dake and Time Interrupts SkarbkupfFaulks Modbus Mapping Embedded If G Plog In Modales Empeky gt Empey Empey Expansion Modules Empky Empey Empey Empky Fig 4 Serial Port Configuration of CIP Serial Driver 2 Select CIP Serial fromthe Driver field Controller Serial Port Common Settings Driver CIP Serial Baud Rate 38400 Md Parity None z Station Address ee Protocol Control DF1 Mode DFI Full Duplex Control Line No Handshake Error Detection CRC X Embedded Responses After One Received 4 Duplicate Packet Detection ACK Timeout x20ms 50 ENQ Retries 3 NAK Retries 3 Transmit Retries 3 Fig 5 CIP Serial Driver National Conference on Emerging Trends in Computer Electrical amp Electronics ETCEE 2015 International Journal of Advance Engineering and Research Development IJAERD e ISSN 2348 4470 print ISSN 2348 6406 Impact Factor 3 134 3 Specify a baud rate Select a communication rate that the devices in the system will support Configure all devices in the system for the same communication rate The Default baud rate is set at 38400 bps 4 In most cases parity and stat

Download Pdf Manuals

image

Related Search

Related Contents

Lightolier Task Lighting UCA User's Manual  Protégé Masterdock – Manual (Português)  536350 -Libretto F.Inc 32 Etna (mod).FH11  TRENDnet TK-802R Computer Hardware User Manual  

Copyright © All rights reserved.
Failed to retrieve file