Architecture of Network Function Block for Remote Monitoring over IP

4 downloads 1327 Views 237KB Size Report
IP networks in order to integrate devices that operate on the factory ... The use of FB (Function Block) in software automation ... for remote monitoring over IP.
Architecture of Network Function Block for Remote Monitoring over IP CESAR C. P. SERVIDONE UFABC – Universidade Federal do ABC [email protected]

Abstract- The enhanced network capabilities of modern PLCs can significantly simplify the classical OPC Server architecture based on PC gateways and reduce the cost incurred in the maintenance and technical support of data server for remote access over IP networks. This paper presents an architecture to design IEC 61499 Function Blocks embedded on a development board with the functions of PLC for monitoring purposes, which could be programmed using IEC 61131-3 languages. This paper also aims to explore a methodology to embed OPC data exchange functionalities on IEC 61499 function blocks.

I.

INTRODUCTION

Automation and control solutions developers of the industrial environment could use the communication over IP networks in order to integrate devices that operate on the factory floor to the office environment. Thus, the PLCs using Ethernet ports would be able to bring information to multiple gateways [1]. The use of FB (Function Block) in software automation and control is quite common, besides being supported by several programming tools. The definition of the IEC 61131-3 standard for PLC development is an advantage for programmers as far as simplicity of use is concerned, since it allows the code to be reused in other programs without needing any new implementation of the same algorithms. This solution could become modular and portable to other PLCs, reducing the development and testing time, ensuring that developers can use the FB more confidently. IEC 61131-3 program contents are generally more readable for PLC developers to understand than legacy tools, and the FB, outlined with pins that are connected to the input variables and output, can encapsulate various logics [2] pre configured not to changes the contents inside it. In industry, interoperability problems between network devices, such as PLCs, drives, servo motors with monitoring and management systems as SCADA, MES and ERP are common, because each manufacturer adopts its own communication protocol. Adopting open standard in industrial informatics can be defined as the ability to design software and services with a specially designed architecture which is able to foresee the integration with other technologies.

NUNZIO MARCO TORRISI UFABC – Universidade Federal do ABC [email protected]

In order to allow communication between these devices, a group of companies created the standard OPC (OLE for Process Control), defining a set of communication interface rules for developing systems [3] [4]. The growing acceptance of IEC 61131-3 rule by PLCs producers have made it possible to perform logically through FBs stored in the PLC functions library [5]. Due to the standardization of these blocks, they can be used in other PLCs despite its type or producer. In Section II, this paper reports related work about modeling and uses of advanced FBs in industrial networks. Section III describes the architectures of conventional PLC integration with management systems using gateways installed on external computer and FB embedded solutions. Section IV outlines the FB network architecture benefits for remote monitoring over IP. Finally, Section V proposes the sample code for developing and embedding the projected solution into the embedded PLC board. II.

RELATED WORKS

The use of FB in industrial networks applying AI (Artificial Intelligence) technologies has been performed in research work in order to reuse advanced technologies not bit oriented, providing advantages to the independent development of applications on PLCs and its portability to other devices. The flexibility in assembling the network architecture is great, since it is possible to connect multiple FBs to each other. The failure possibility decreases, because the FBs run inside the PLC software environment, so if it loses communication with other network devices, the logic will not be affected [6]. This specific case portrays a very common scenario in the industrial environment, which is the communication between the PLC and a management and supervision system of. In his paper about implemented FB for industrial networks, [6] the author describes blocks that contain algorithms of Artificial Neural Networks (ANN), whose goal is to maintain the interoperability between network devices, because according to the creators of the most sought-after solution in automation, is the indirect measurement of process variables using measures from

other sensors. In these sensors, the software is developed with ANNs, however, there was a standard solution in the industrial fieldbus networks. Some software was used for these sensors and they managed to maintain the interoperability between them. The problem was solved using the arithmetic blocks and characterization, connecting them and forming thus, an artificial neuron. The arithmetic block performed mathematical calculations, which soon after, required the activation function that was performed using the block that characterizes a mapping of its input output. The interconnection of neurons, coupled with their input and output, formed the ANN. The advantage of using the algorithm of ANN encapsulated in FB showed that the robustness to failure, since the PLC is designed to work in critical areas and depending on its configuration, it can also work in areas of safety. In his work, Hami Adbi [5] used the idea of ANNs applied in FB adding them to libraries of programming PLCs, whose implementation would be non-linear calculations after the ANN has been trained for such purposes. A development of an architecture using SIFB (Service Interface Function Block) for implementation of OPC server and OPC client [7] was implemented in a computer. The work was performed using the kit FBDK [8] following the IEC 61499 guidelines, besides being a freeware tool that works with the Java development platform. In this work, the authors explain the implementation step by step, demonstrating the principle of the organization chart SIFB, with events and data input and output, as well as the flowchart design software developed in Java using Eclipse. Then, the authors illustrate the complete system of communication devices with OPC. Basically, SIFBs are used for data entry, manipulation and data transmission. The maintenance of the IEC 61131-3 was the access to work on new possibilities through Object-Oriented (OO) extensions [9]. This paper discusses the advantages of integration between OO-IEC 61131-3 and Unified Modeling Language (UML). In the same work, the author mentions that CoDeSys V3 software could be a way to extend IEC 61131-3 with OO, because it is kept under review. Object-oriented FB is used to demonstrate the idea of application on CoDeSys V3, extending more versatility to IEC 61131-3. This extension to FB is called hybrid function block. According to the author, the use of objectoriented FB is a way that could improve the quality of software automation through the possibility of its reuse. The extension idea of existing FB by object-oriented features could become a good addendum to IEC 61131-3 thanks to flexibility, code reusing and better structured program code [10]. Today, although the PLCs are supported by IEC 611313, they are not by IEC 61499, because PLCs vendors aren´t friendly to make new investments in their software again. Inevitably, there are concepts and programming

means appended to software, which makes interoperability between automation projects very hard [11]. According to [12], the development of a solution that transforms IEC 61131-3 in IEC 61499 was motivated by low costs. The solution was the development through transformation of standards, in other words, a project done in IEC 61131-3 would be transformed in the IEC 61499 implementation. Extend language (Xtend) was used as a platform for modeling software development, thanks to its wide use. The transformation precondition is that IEC 61131-3 needs to be represented by file XML (eXtensible Markup Language). But, the author affirms that it’s common for inconsistent XML tags to restrict the use of PLC programs to do the transformation of standards. The use of Composite Function Blocks (CFB) was selected to encapsulate other FBs making the software easier to be used. However, there was a problem until that moment. There were some differences between the libraries of IEC 61131-3 and IEC 61499, so in some cases, it was necessary to connect events with data outputs. The proposal of semantic for correcting transformation was presented to minimize the differences between IEC 61131-3 and IEC 61499 [12] libraries. The auxiliary transformation was the way to resolve this interoperability, using a static transformation IEC 61131-3 FBs into Simple Function Blocks (SFB). III.

MOTIVATIONS

The network architecture in process control can be essentially summarized into three levels. The first level of the field includes communications between intelligent devices and instruments control; it uses communication patterns of industrial networks such as industrial Ethernet [4]. The second level is where field data are sent from the PLC to SCADA systems for monitoring the process. The third level is where the collected information is managed and used in database and spreadsheets to generate graphs and reports. PLCs with Ethernet interface can transport data info over IP even if remote peers support the required driver for communication as OPC (OLE for Process Control), ModBus TCP [13] or FOCAS [14] driver. The OPC specifications were defined by the OPC Foundation in order to simplify the communication between components of the plant floor to supervisory systems [15]. The OPC Foundation takes care of standardization of protocols beyond the basic specification for driver development, communication of alarms and events, specification of historical data access among other things [4]. In the network topology outlined in figure 1, the classical OPC server is configured on a computer and connected to SCADA. The disadvantage of this implementation lies in the fact that the licenses cost for

the operating system (OS), combined with the cost of deployment and maintenance of OPC server makes it impracticable for smaller companies [4] to adopt the solution. The possibility of failures in the communication services of computers OS is possible by not allowing the communication between OPC and the network to happen [20].

IV.

SYSTEM ARCHITECTURE

The IEC 61499 standardizes the basic structure that a FB must have and also sorts them into three classes: Basic Function Block (BFB), Service Interface Function Block (SIFB) and Composite Function Block (CFB). As the subject matter is related to communication, we use the SIFB to accomplish the project implementation. The selected software to make a SIFB prototype accepts the FBs generating a plug in, compiling the C # code. The C# project file output is a class library generated in CIL (Common Intermediate Language) that can be seen in figure 3. CIL is an assembly language and stack based. The CLR shown in figure 3 is responsible for interoperability between the languages supported by the platform .NET, then it´s possible to write the code in IEC 61131 languages and C#, therefore, OS of board, ProConOs, can be understood and run the program.

Fig. 1. Traditional architecture

Establishing OPC connections within a SIFB (Service Interface Function Block) provides more reliable communications, because the hardware and software embedded inside the PLC are designed to work in critical environments. The PLC program developer may insert SIFB pins and related variables of input and output in order to reduce developing time adding standardization value to the system, since it can keep the IEC 61499 rules introducing network functionalities. The implementation costs would also be reduced due to programming hours reduction, licenses purchasing and interruption of communication due to problems with the OS. In the architecture illustrated in figure 2, the hardware remains the same as proven before, whilst only the features of the software implementation are changed. The disadvantages of this system are that the OPC server will send information to the local network and can also be configured to external networks, and the dissemination of technical manuals, manufacturers of SCADA software, is public, creating an opportunity for hackers to prepare successful attacks against industrial system [16]. In order to minimize the cyber security risk, practical techniques to secure network in industrial control could be introduced [17].

Fig. 2. The proposed architecture

Fig. 3. Mixing IEC languages and C# a CIL is created and compiled, it is added to SO ProConOs.

The implemented SIFB, outlined in figure 4, was developed by using C # and exporting it to version 4.61 of the software Multiprog programming tool [18] as standard FB of IEC. Software schedule in C# has additional advantages because it can be used for complex algorithms development, providing new approaches, adding value to the PLC program. The libraries used to compile the code include Iec61131lib system with the types of classes and functions standardized by IEC 61131. After adding the file generated in CIL format to the library, the FB is called from within the firmware library that is created with C # compiler.

Fig. 4. Software Architecture

V.

IMPLEMENTATION

The platform chosen to implement a SIFB to verify connectivity between two hosts on an IP network card was the DBC2C20 Development Board [19]. This board is equipped with RS232, RS485, CAN and 24V I/O for connecting with industrial automation. There are two Ethernet channels and USB 2.0 to establish communication. The visualization tasks could be done by navigation key, LEDs and two digital segment displays. It has three core processors and the one with PLC function was the choice for this application. The use of microprocessor with the functions of a PLC could be scheduled by following the standard IEC 61131 premises using Multiprog v4.61. When the FB is inserted into the program, the PLC programmer only sees the macro logic, in other words, a block with input and output pins. Thus, there is no problem creating a new logic, gaining time and reducing the implementing costs of the software as well. In the developed algorithm, a command often used to test connectivity between devices was used, and it’s encapsulated in SIFB. It is the PING (Packet Internet Groper) algorithm that is shown in figure 5b. This command uses the Internet Control Message Protocol (ICMP) network layer, which is part of the IP protocol defined by Request For Comments - (RFC 792), a document that describes the patterns of each protocol on the Internet. PING sends packets on the network to a previously defined IP. If the device with that IP is an active response message, it is sent to the device that requested the response. Information PING are defendants in the packet size used, lifetime and latency. Also added to the code input variables and output pins SIFB referring to the following IEC 61499. When it is inserted, the file in the library of CIL Multiprog makes SIFB available for the use of the program, and is only visible to the programmer Multiprog input and output variables of SIFB in figure 6. [FUNCTION_BLOCK] public class PINGFunctionBlock1 { public Ping pingSender; public PingOptions options; [VAR_INPUT("BYTE")] public byte In1; // I byte IPAdress [VAR_INPUT("BYTE")] public byte In2; // II byte IPAdress [VAR_INPUT("BYTE")] public byte In3; // III byte IPAdress [VAR_INPUT("BYTE")] public byte In4; // IV byte IPAdress [VAR_INPUT("BOOL")] public bool In5; // DO PING [VAR_OUTPUT("BOOL")] public float Out1; // PING SUCCESS public PINGFunctionBlock1()

Fig. 5a. Format of SIFB in C# to be used in PING software

Fig. 5b. Algorithm PING encapsulate in SIFB publicof PINGFunctionBlock1() { pingSender = new Ping(); options = new PingOptions(); // Use the default Ttl value which is 128, // but change the fragmentation behavior. options.DontFragment = true; } public void __Process() { // Create a buffer of 32 bytes of data to be transmitted. string data = ufabcufabcufabc"; byte[] buffer = Encoding.ASCII.GetBytes(data); int timeout = 120; PingReply reply = pingSender.Send(BuildIP(byteArray), timeout, buffer, options); (reply.Status == IPStatus.Success) Fig. 5b.if Algorithm of PING encapsulate in SIFB { Out1 = true; }

Fig. 5b. Algorithm of PING encapsulate in SIFB.

Fig. 6. SIFB generated in Multiprog tool with algorithm embedded ping.

After completing the program in Multiprog, and executing the download, the firmware also formats the card CIL to DBC2C20 and test the application. The architecture of the implemented system is based on a DBC2C20 board computer, communicating with Ethernet shown in figure 7.

Fig. 7. Hardware configured to test the software

It was necessary to disable the firewall in OS, because the ping sent from DBC2C20 board to computer had to answer.

VI.

CONCLUSION AND FUTURE WORKS

It is not yet possible to develop this solution in most PLCs business, because their software has the ability to import a high-level code. However, with the cost reduction in programming, the possibility of using the same FB, due to its standardization together with its encapsulated code, can justify the interest of corporations in developing programming tools that incorporate highlevel language. Testing and implementation described in this paper pave the way for further research using the FBs in PLCs and other control devices used in industry. One can also see the industrial networks vulnerability to hackers, and how the devices that communicate over IP respond to a ping sent to the network, since there is no software to prevent these attacks, unless the firewall can be configured in the network office. However, if an industrial device is in an open network, attack could be successful. A forthcoming work will be about the development of an OPC Server within a FB, enabling interoperability among industrial equipment.

REFERENCES [1]

Liu, T.D. & Jiang, H. “The Design of Industrial Ethernet Adapter Based On Ethernet/IP*”, Computer Science Education, 2009. ICCSE '09. 4th International Conference on, 2009, 1239 -1242 [2] Dai, W & Shih, A. C. K.” Development of Distributed Industrial Automation Systems and Debugging Functionality Based on the Open Source OOONEIDA Workbench”, Australasian Conference on Robotics and Industrial Automation, 2006 [3] OPC Foundation, “OPC-UA Specifications”, http://www.opcfounfation.org, DLA: 05/18/2010. [4] Yao, Xiao´an & Li, Hongxin & Ding, Ronghua ”Remote Monitoring and Diagnosing of Fieldbus Systems – An Embedded Device Way”. Pervasive Computing (JCPC), 2009 Joint Conferences on, 2009, 539 -542 [5] Abdi, Hamid & Salami, Abolfazl ”Implementation of a New Neural Network Function Block to Programmable Logic Controllers Library Function”, Proceedings of world academy of science and technology, 2007, 23, 147- 150 [6] Silva, Diego & Guedes, Affonso “Implementation of Neural Networks in Foundation Fieldbus Environment Using Standard Function Blocks”, Emerging Technologies and Factory Automation, 2005. ETFA 2005. 10th IEEE Conference on, 2005, 2, 5 pp. -345 [7] F. Perez, D.& Orive, M. Marcos &E. Estevez, G. Moran, I. Calvo “Access Process Data with OPC-DA using IEC61499 Service Interface Function Blocks”, Emerging Technologies Factory Automation, 2009. ETFA 2009. IEEE Conference on, 2009, 1 -4 [8] http://www.holobloc.com/ Tutorials- Basic Concepts of IEC 61499 Tutorial FBDK (Function Block Development Kit), 2008 [9] Witsch, D. & Vogel-Heuser, B. “Close integration between UML and IEC 61131-3: New possibilities through object-oriented extensions” Emerging Technologies Factory Automation, 2009. ETFA 2009. IEEE Conference on, 2009, 1 -6 [10] Werner, B. “Object-oriented extensions for IEC 61131-3” Industrial Electronics Magazine, IEEE, 2009, 3, 36 -39 [11] Wenger, M.; Zoitl, A.; Sunder, C. & Steininger, H. “Transformation of IEC 61131-3 to IEC 61499 based on a model driven development approach” Industrial Informatics, 2009. INDIN 2009. 7th IEEE International Conference on, 2009, 715 -720

[12]

[13]

[14] [15]

[16]

[17] [18] [19] [20]

Wenger, M.; Zoitl, A.; Sunder, C. & Steininger, H. “Semantic correct transformation of IEC 61131-3 models into the IEC 61499 standard” Emerging Technologies Factory Automation, 2009. ETFA 2009. IEEE Conference on, 2009, 1 -7 Skendzic, V. & Guzma, A. Enhancing Power System Automation Through the Use of RealTime Ethernet Power Systems Conference: Advanced Metering, Protection, Control, Communication, and Distributed Resources, 2006. PS '06, 2006, 480 -495 GE Fanuc, Ethernet Communication with Ethernet Board, FOCAS1/2 Open CNC libraries documentation, Edition 2.4, 2002. Anwar, M.; Anwar, O.; Shamim, S. & Zahid, A. “Human Machine Interface Using OPC (OLE for Process Control)” Engineering, Sciences and Technology, Student Conference On, 2004, 35 - 40 Torrisi, Nunzio M, Oliveira, João F.G. “Remote Control of CNC machines using the CyberOPC communication system over public networks”, International Journal of Advanced Manufacturing Technology, v 39, n 5-6, p 570-577, November 2008 International Society for Automation, “ISA-99 Standard Security Technologies for Manufacturing and Control Systems”, 2007 KW-Software GmbH, “ProConOS embedded CLR”, http://www.kw-software.com/ DLA: 05/18/2010. EBV Elektronik “DBC2C20 Development Board” . www.ebv.com. DLA: 05/20/2010 Elipse Knowledgebase “OPC Server” . . http://kb.elipse.com.br/ DLA: 05/18/2010.

Suggest Documents