• No results found

RT Database for Visualization of Windows PLC RT Process Control by the REX Control System

N/A
N/A
Protected

Academic year: 2021

Share "RT Database for Visualization of Windows PLC RT Process Control by the REX Control System"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

RT Database for Visualization of Windows PLC RT Process Control by the

REX Control System

ONDREJ KREJCAR

1

, JINDRICH CERNOHORSKY

1

, PETR KONARIK

2

, ROBERT FRISCHER

3 1

Department of Measurement and Control,

2

Department of Control System and Instrumentation,

3

Department

Automation and Computing in Metallurgy

VSB Technical University of Ostrava

17. listopadu 15, Ostrava Poruba 70833

CZECH REPUBLIC

Abstract: - Paper deals with industrial realization of feedback control of demanding applications on their control,

control algorithms and visualization via RT database together with design, implementation and real time control from MATLAB/Simulink Environment. Paper shows direct connection and implementation way of designed control schemas of prepared applications to an industrial WinPLC. Described is a way to produce a permanent solution in control applications that are fully prepared, designed and implemented directly from MATLAB/Simulink to the target control platform. As a part, the mentioned solution is using a multiplatform control system REX as a bridge between MATLAB and target platforms. These methods allow minimizing costs of development of control of applications, because it produces target permanent realizations in comparison to classical development methods that usually need expensive real time measurement cards and produce only one purpose development solution. As next benefit the application is created for visualization the data from RT database during the measurement and control process. This last benefit produce an interesting data from real control process to give a next reason to use of WinCon solution.

Key-Words: -Real Time, RT Database, WinPLC, MATLAB Simulink, REX Control

1 Introduction

The development of present applications focused on real time control of a technological process must usually go through whole range of development steps, each of which demands human resources as well as software and hardware implementation and testing requirements, which is very often connected with high cost for development and longer time.

If we come from an assumption of requirements for present systems, it is obvious that they further aim at more sophisticated and more demanding solutions, namely regarding control quality, energetic consumption, knowledge of system behavior and the entire process control as it is.

An example can be hydraulic systems with clear tendency and a requirement for so called “smart iron system”, a system, which is perfectly controlled with demanding control algorithms and which enables compensating of a whole range of nonlinearities and behavior of mechanical parts and at the same time brings energetic efficiency and other operability options.

To solve this problem it is possible to use entirely new multiplatform control system REX, which deals with research and development of advanced algorithms, supporting and diagnostic tools and complete programming solutions for direct control of real time

dynamic systems and which enables connecting and compatibility with MATLAB/Simulink environment.

Fig. 1. Architecture of a process control by classical way and by the help of REX Controls

Another interesting advantage is in very low cost of described solution opposite to classical solutions with RT Measurement Card (like dSPACE).

(2)

RT Card solution REX Control solution

Matlab toolbox for RT 180 EUR REX control SW 390 EUR dSPACE (no.1104) 9800 EUR WinPAC Wincon 1600 EUR

10000 EUR 2000 EUR

Third advantage is in possibility of remote or standalone run of WinPAC. In that case is not necessary to have an own control PC with RT card attached to controlled system, but only existing robust WinPAC system.

2 Architecture Description

Program MATLAB represents at the present time a complex tool for technical calculations and its own design for an entire range of technical problems from different areas, namely by MATLAB/Simulink and its problem oriented toolboxes, block sets and libraries in which it is possible easily and quickly simulate system behavior and design their suitable control and control algorithms [6].

Problems however start if we want to transfer the designed system solution on the target system. MATLAB enables and supports direct feedback control by RT control and data acquisition cards and also supports several target platforms and microprocessors, into which it enables automatic code generation and ends with high performance embedded systems dSPACE [5]. All of these system solutions usually represent either intermediate stage before the target and permanent solutions themselves and or it is necessary to purchase other hardware and software tools, which are financially very costly.

During System REX Controls use it is possible to design permanent target solutions, perform direct measurements and real time control, its visualization and tune applications according to needs, every time the MATLAB program is connected. And after it is disconnected the automatically generated solution remains on the end platform serving the entire technological process.

2.1

Program REX Control

Program REX consists of several supporting parts RexDraw, RexComp, RexCore, RexView and OPC servers RexAutSv and RexOPCsv [1], where:

• RexDraw – Graphic designer of REX algorithms and applications.

• RexComp – Application compiler to binary format files .rex.

• RexCore – Real-time

control system core,

• RexOPCsv – OPC Data Access server 2.0 of the system REX.

• RexAutSv – External server of the REX system.

Graphical designer RexDraw enables its own drawing, proposal and also adapting already designed block schema directly from *.mdl files in MATLAB/Simulink environment.

It uses its own large library blocks, namely various types of regulation and controllers, which are problem oriented especially on real process control, as well as the fundamental library blocks, which are similar to the MATLAB/Simulink program, and which are automatically recognized after reading the mdl file and sent to RexDraw environment in form of a new block schema, which is very similar to the Simulink one. Most of the fundamental blocks in Simulink have their equivalent in REX Control block library.

The REX Control libraries are also supported and displayed directly in MATLAB/Simulink as another Simulink library toolbox, therefore the schema design and tuning can be done in Simulink directly, even before the RexDraw environment run.

Substraction Multiplication Square Booleean Constant Addition Integer Constant Real Constant Divide Trigonometric and Other Functions exp, floor etc. Absolut Value Gain SQRT sin Trigonometric Function u1 u2 y SUB u yE SQRT_ u y SQR Product sqrt Math Function2 eu Math Function1 u2 Math Function u1 u2 y MUL 1 Gain u y GAIN u1 u2yE FNXY u yE FNX Divide u1 u2yE DIV 1 Constant y CNR y CNI Y CNB Add1 Add |u| Abs u1 u2 y ADD usgny ABS_

Fig. 2. Some of the fundamental blocks taken from about 170 library blocks of REX Control program in MATLAB environment

A part of this stage of block schema design is the definition of target platform, required inputs and outputs and their properties, as well as the definition of application run watch, served especially by libraries and blocks INOUT, EXEC and others.

Furthermore, the libraries REX are divided into the mathematical part with MATH blocks, the part ANAL, which consists of supporting blocks used for analog

(3)

signal processing, the part GEN, supporting signal generating of various types, the part REG, which is an extensive library part focused on different types of industrial control, the part LOGIC, intermediating logic operations, the part ARC, implementing data archive and the part SPEC, devoted to specialized blocks.

In this way prepared and ready schema is then compiled with RexComp into *.rex file, which is for example with intranet transferred into target equipment, where is compiled by RexCore and linked to the target equipment.

2.2 Target

Platforms

As the target platform it is possible to select a whole range of supported platforms, or write your own supported drivers. The presently supported standard platforms are:

• PC and IPC (industrial PC) with OS Windows 95/98/ME/NT4/2000/XP, Phar Lap ETS and VenturCom RTX, National Instruments and Advantech boards, Ethernet based Terminator I/O

• WinPLC equipped with DL205 series modules and Windows CE OS

• TECOMAT TC700 with Windows CE OS The RT WinPLC - WinCon 8000 Compact Embedded Controller was used as the universal target equipment in our case, which represents a new generation of programmable controllers, combining the classical PC and PLC and creating so called PAC - Programmable Automation Controller, whose advantages are obvious from the first sight in Figure 3.

Fig. 3. Advantage of the PAC usage (left) and WinPLC (PAC) WinCon 8000 machinery used for real application control (right)

The fundamental properties of target equipment PAC used are:

• CPU Intel Strong ARM • OS Windows CE .NET

• Interface for: VGA, Ethernet, USB, keyboard, mouse and Compact Flash Card

• LCD Touch screen support

• OPC server

• protocol Modus/TCP, RTU

• Extended line of I/O expansion cards: DI, DO, AI, AO, counters, drive controllers etc.

Used PAC WinCon W-8739 was equipped with plug in analog and digital I/O modules [2], in concrete with two analog input measurement modules I-8017H (8x 14-bits, 100kHz), an analog output module I-87024 (4 voltage and 4 current outputs -14bit) and digital I/O module I-8054 (8 digital input and outputs). The possibilities of a network connection, connecting other peripheries and touch display for WinCon can be seen in Figure 4.

Fig. 4. Possibilities of connection and extension of peripheries and communication

3 Measurement and Control on Real

System

The controlled system is dynamically demanding system of a hydraulic drive, Figure 6, which is controlled by four-way flow servo valve, which implements discharging and shifting piston, which is during the stroke loaded with pressure and tension force implementing disturbance on a system and which requires design of more sophisticated control algorithms and control quality that are able to compensate effects related to hydraulic drive control, as for example hydrodynamic forces acting inside of valves, system nonlinearities, leakages, friction, cavitations effects, etc.

(4)

Fig. 5. Block schema of feedback control in MATLAB/Simulink (left and top) and a case with inputs reading and outputs generating options directly in MATLAB (right)

INPUTS:

OUTPUTS: Substraction P-regulator Range change

Required Values Range Changes error A B C u1 u2 y SUB_1 HALT u0 u1 u2 u3 u4 u5 u6 u7 u8 u9 u10 u11 u12 u13 u14 u15 err f resh y 0 y 1 y 2 y 3 y 4 y 5 y 6 y 7 y 8 y 9 y 10 y 11 y 12 y 13 y 14 y 15 RDC_1 u1 u2 y MUL_3 u1 u2 y MUL_2 [WCN__SA5I24V0] [WCN__S2I17X0] u1 u2yE DIV_2 y CNR_6 y CNR_5 yCNR_4 Y CNB_1 RUN yis ANLS_1

Fig. 6. Block schema in Figure 5 in RexDraw with connected inputs and outputs for autonomous process control from WinCon and forwarding measurement variables to Simulink (signals A and B) at the same time For the design of control schemas the fundamental feedback circuit was tested first, whose schema in Simulink can be seen in Figure 5 and it’s automatically generated equivalent in REX environment in Figure 6. From the figures, it is obvious that blocks used in both cases are very similar and the design of control schema using REX libraries and automatic loading of mdl files and their schemas is not too difficult.

4 Wireless Network Measuring and

Communication

Used PAC equipment enables connecting to higher control levels with UDP/IP protocol. This protocol is used as often as the well – known TCP/IP and functions on all LAN and Internet as well.

One of the specialized blocks of REX library, the RDC (Remote Data Copy) block is used for communication between two blocks on different computers, or two Simulinks on the same PC and/or Simulink and REX system, Figure 5 and Figure 6. In this case we used it for communication between REX program in WinCon and Simulink on the second PC. Set parameters are always the IP address of the second equipment, a remote port – rport, a local port – lport, the id and the sampling period, which must be the same for both communicating blocks.

Block SLEEP is then used for synchronization of sent and received data with WInCon, since the communication would not work without it, and it contain a parameter “SleepTime”, which needs to be set the same as a parameter “tick” in block EXEC, which determines the shortest sampling period, with which the target equipment WinCon will work and in which the data will be transferred. The smallest possible setting is 0.001s. In our case and also from the security reasons the sampling period 0.005s was used.

The whole control process was tested and controlled from MATLAB/Simulink environment, which run on a notebook connected to a network through WiFi, while WinCon was connected directly to Ethernet. Each sample of a signal connected to RDC block was transferred about every two milliseconds, which was sufficient for our required sampling period 0.005s.

5 Visualization from RT Database

All input and output variables of all the blocks can be monitored and changed and set with RexView Program. The important property of the REX problem solution is the implementation of a standard OPC interface, enabling connecting to all significant systems for visualization and operator supervision of controlled processes (SCADA and HMI).

This OPC interface (called Automation) enables to create an interconnection to another application for visualizing measured data. Such application can be created in Microsoft Visual Studio 2008 in C# language. This solution is free of cost and easy to create. For data storage the RT database Microsoft SQL Server CE can be used.

We create such solution based on Microsoft RT solutions. First test of complete measurement and control network are sufficient. The measurements with Matlab visualization are delayed by 20 % in mean value. RT WinCon solution with our own application for visualization is always in time. As test bed we used VRDB testbed [8] and [9].

(5)

Fig. 7. Visualization of real fluid motor control. The graph of required and real values.

6 Conclusion

This contribution brought a design and implementation for permanent problem solution for a control of dynamically demanding process with multiplatform control system REX Control compatible with MATLAB/Simulink. Real time measurements and control via network and Wifi connections were performed directly from Simulink and compared to autonomous control at WinCon and furthermore with a classical method using measurements implemented on PC RT data acquisition cards AD614 and dSPACE system.

Acknowledgement

The support for this research work has been provided by the project 102/06/1742: Experimental real-time database testing system, provided by Czech Science Foundation.

This work was also supported by the Ministry of Education of the Czech Republic under Project 1M0567.

References:

[1] Official pages of multiplatform control system

REX [online]. Available on

http://www.rexcontrols.cz

[2] Official pages of PAC WinCon8000 . Available on

http://www.elcomgroup.cz/ipc/en/default.asp

[3] Official pages for web and wireless applications \ INDUSOFT - tool for automation [online].Available on http://www.indusoft.com

[4] Official pages of ICP DAS [online]. Available on http://www.icpdas.com

[5] Official pages of dSPACE Systems [online]. Available on

http://www.dspace.com/ww/en/inc/home.cfm

[6] Krejcar, O.: User Localization for Intelligent Crisis

Management. In AIAI 2006, 3rd IFIP Conference on

Artificial Intelligence Applications and Innovation, pp. 221-227, Athens, Greece, (2006).

[7] Krejcar, O., Cernohorsky, J.: Database Prebuffering as a Way to Create a Mobile Control and

Information System with Better Response Time. In

Lecture Notes in Computer Science, Computational Science – ICCS 2008, Volume 5101/2008, The International Conference on Computational Science 2008, pp. 489-498, Cracow, Poland, (2008).

[8] Krol, V., Pokorny, J.: The V4DB testbed - Evaluating of real-time database transaction processing

strategies, In Proceeding of the 11th WSEAS

International Conference on Computers: Computer Science and Technology, Vol 4, Crete, GREECE, JUL 26-28, 2007, pp. 20-25, (2007)

[9] Krol, V., Pokorny, J.: Design of V4DB -

Experimental real-time database system, In IECON

2006 - 32nd Annual Conference on IEEE Industrial Electronics, Vols 1-11, Paris, FRANCE, NOV 07-10, 2006, pp. 3170-3175, (2006)

[10] Slanina, Z.: Embedded linux scheduler monitoring, In ETFA 2007: 12th IEEE International Conference on Emerging Technologies and Factory Automation, Vols 1-3, SEP 25-28, 2007 Univ Patras, Patras, Greece, pp. 760-763, (2007)

[11] Krejcar, O.: Prebuffering as a way to exceed the

data transfer speed limits in mobile control systems,

In ICINCO 2008, 5th International Conference on Informatics in Control, Automation and Robotics, MAY 11-15, 2008 Funchal, Portugal, pp. 111-114, (2008)

References

Related documents

The static Web service discovery uses coarse-grained semantic Web service descriptions to find services that potentially match the user’s goal, and the dynamic offer discovery uses

oryzae, neem cake extract showed the maximum inhibition percent to mycelial growth (80.18%) and spore germination (81.13%) of the pathogen followed by mahua cake extract, castor

There are four main findings to emerge from the study: (i) the pattern of age change in BMI through childhood differs between China and the West; (ii) within China this pattern

Some of the required readings might be handed out in hard copies, but most of the required material will be distributed electronically, either via email or through the

Once the binary resources are created, they need to be linked to the Palm Tcl runtime system to create an executable Palm OS application, which is itself a resource database

Organizations can benefit from the application of the model-driven approach to the existing activities of the software development life cycle, such as requirements

1.5 dimension spectrum can eliminate background noise and provide more information than classical methods such as envelope spectrum analysis [19]. , , and are rolling

The im- plementation of programmes and actions towards oral health promotion and dental caries prevention, started at nation- al level, should lead to changes and demonstrate