Web-based Hardware-Neutral Sequential Controller

4 downloads 319 Views 118KB Size Report
and simulation, physical system control and Web-based remote control. ... Windows or Linux system. ... real-time simulation and monitor functions becomes an.
Web-based Hardware-Neutral Sequential Controller Chiaming Yen, Wujeng Li and Jui Cheng Lin Department of Mechanical Design Engineering National Hu-wei Institute of Technology Yu-lin, Taiwan 632 E-mail: [email protected], [email protected], [email protected]

Abstract built electronically [1]. This trend results in the This research creates a web-based hardware

integration

of

mechanical

actuators

and

neutral sequential controller system to assist user on

micro-controlled devices. In these systems, flexibilities

design of the general-purpose sequential controller. The

can be further achieved using the powerful and

functions of the system include control circuit setup

configurable control units. In view of the quick advance on the new

and simulation, physical system control and Web-based remote control. The main objective of these systems is to provide

technology, control system product inevitably has to apply

new

devices

and

components

to

gain

a hardware neutral environment for integration of

considerably competitiveness.

Therefore, legacy

different types of data acquisition units from different

systems surrounded by state-of-the-art components are

manufacturing companies. This controller environment

usually the case to challenge engineers on almost every

allows one to add or remove corresponding modules

industrial application. Under these circumstances, for

without further modification of the original control

industrial on-line field monitor and control system

software.

design, to integrate various new, old, closed, and open

This system is written in Java, thus can be either

products to work together has become a very important

executed as a unique program or embedded in an html

task. In this study, a hardware neutral controller system

page. The hardware neutral capability is achieved

design methodology has been implemented to solve

through the applications of Java dynamic linkage and

these problems.

object reflection. Due to the nature of being a Java

The development of the sequential controller

program, this system can be used in a Microsoft

today is not only reaching a PC-based controller era,

Windows or Linux system.

but also entering into a networked age. Sequential

(Keywords: Object-Oriented Programming, Pneumatic

controllers

may include

Circuit Design, Sequential Controller, Programmable

hand-held

PC and

Logic Controller)

electronic. To integrate all these devices of different

mobile

others

phones,

embedded

PDA,

consumer

brand, a hardware neutral controller scheme with 1. Introduction

real-time simulation and monitor functions becomes an important issue to address.

In recent years, due to the fast development of the microprocessors, most sequential controllers are

2. Motivation and Literature Review

To communicate hardware controller of different

As a sequential controller deployed on a network,

brand with network functions, DCOM from Microsoft

it may involve a lot of devices and personnel. To take

[2], RMI from SUN [3] and CORBA [4] are some

this situation into consideration, the WebLadderCAD

major techniques to follow. Among these, OPC (OLE

has collaborative functions to allow multi-user to work

for Process Control) [5] is proposed to solve the

on a set of design simultaneously. In order to connect

industrial process control problem under DCOM

the web browser and server, data communication is

methodology from Microsoft.

established through Java applet and servlet techniques

Recently, the network connecting speed has

[9]. Technically, the Java servlet works like the

improved to allow high volume data storage to separate

application layer of multi-tier model to incorporate

from the computing unit. Therefore, in the future,

with the Apache web server [10] through the Tomcat

PC-based control system design also treat network as a

servlet engine [11]. All the data acquire/retrieve

major component to allow more legacy hardware to

functions were implemented by Java servlets. One of the data acquisition components used in

work with new devices. In this study, Java technology [6] [7] is used to

this paper is called NAP7000 [12]. This device has a

develop a hardware neutral sequential controller to

RS232 interface to connect with a computer. On the

allow different control hardware to work together. This

ethernet side, an Adam6000 [13] is used. These two

software

data

remote data acquisition hardware with different data

acquisition modules, allows a designer to efficiently

transfer functions were used to test the feasibility of the

integrate different sequential control devices to achieve

system proposed in this paper.

package

combined

with

remote

designated job.

The procedures to use the sequential controller system developed in this paper were listed as follows:

3. Controller Architecture 1. Define controlled system: The architecture of the implemented sequential controller is shown as Figure 1. This includes the main controller software called WebLadderCAD that is a

Select controlled device icons and place it on the virtual pneumatic lab area. 2. Design control circuit:

web-based sequential controller package written in

Select electrical device icons and fulfill the

Java. This WebLadderCAD can also embed into a web

corresponding circuit design.

page to become part of a remote control courseware

3. Simulate controlled system: Upon the designed electrical circuit, the

[8].

computer software can be asked to simulate the corresponding results. 4. Perform PC-based control: To execute the local site PC-based sequential control, one should select server mode and let the system automatically scanning available data acquisition modules. After the input and output signals of the hardware connection were set, the control privilege can be claimed Figure 1. Sequential Controller Architecture

to activate the associated control sequence.

8. Data storage:

5. Remote monitoring and control: As the remote system performing PC-based

All the design results were saved on a remote

sequential control, any local computer can

database system.

either use the sequential control software in

9. Collaborative Design:

the applet mode or application mode to start

For multi-user design purpose, the software can be

and monitor the control.

activated on a collaborative mode. 10. User defined component extension: Users can extend the software functions by adding

3.1 Sequential Controller Design Software

custom-built control devices in specially formatted The WebLadderCAD [8] software is designed to

ASCII file.

perform web-based computer aided sequential control system design. This system has the following functions: 1. Visualized control system process: The system allows users to perform control system design by assembly of the visualized device icons. 2. Visualized pneumatic and electrical devices: System provides complete set of general pneumatic and electrical device icons. 3. Computer aided pneumatic and electrical circuit design: The software can assist users to complete required

Figure 2. Sequential Controller Design Software

sequential control system designs. An example of using the sequential control

4. Design automation of pneumatic and electrical circuit design:

design software was shown on Figure 2. The user

Users can ask software to automatically complete

combined valve controlled pneumatic devices with

sequential control system designs by giving the

limit switches and electrical devices to complete the

designated

definition of the system. Consequently, a motion

input

sequence

requirements

and

parameters.

sequence window is open to add the required motion sequences. Automatic design function can then be used

5. Diagnosis and analysis on pneumatic and electrical circuit:

to perform the corresponding design.

The software can automatically check the design errors, such as the incorrect wiring and overloading,

3.2 Remote Data Acquisition System

etc. 6. Dynamic simulation:

After the computer aided design and simulation

Design results can be simulated through the

processes , the simulated results can be transmitted

animation

through the digital I/O module to activate the physical

of

the

corresponding

actions

of

pneumatic and electrical devices. 7. PLC control commands:

control components. As shown in Figure 3., the NAP7000 is a set of

The software can transfer the design circuit into the

remote data acquisition system communicated with PC

specific brand PLC commands.

through a RS232 interface. There is unique address for

each module. The modules are treated as passive units

setup.

In

this

study,

the

controller

system

to response commands from the computer. On the other

communicates with the ADAM6000 module through a

hand, transmit baud rate can be set for each module,

simple ModBus protocol [15] Java class libraries.

checksum method was used to ensure the rightness of each set of transmitted data.

3.3 Controller Software Design

The software architecture was shown in Figure 5. The

processes

include

control

system

design,

simulation and physical system control. The control system

design

involves

control

circuit

design

interactively or automatically. The simulation can be used to check the rightness of the design. Before the simulation starts, the control circuit is translated into PLC codes. During the simulation process, a PLC code interpreter is used to execute the PLC codes repeatedly. Figure 3. NAP 7000 Remote Data Acquisition System

The final procedure is to activate the physical devices by sending the component status to the respective data

In this study, Java Communications API [14] was

acquisition modules.

used to support the serial port communication. Since the hardware related driver was packed inside a high level Java class, this API preserved Java’s cross platform advantage. As the codes ported into a different platform, no changes on the Java codes were necessary.

Figure 5. Controller Software Architecture

The hardware neutral function of the system is to allow the addition and removal of data acquisition Figure 4. ADAM6000 Remote Data Acquisition System

modules (hardware) without any modification of the controller core codes. Hardware neutral can be

The ADAM6000 is another set of remote data

achieved by defining these functions into abstract

acquisition system used in this paper. The module is

classes or interfaces. These will allow the system

shown as Figure 4. The system is connected with a PC

driver and module driver program to inherit these

through an Ethernet connection. There is one IP for

abstract classes and implement the required functions.

each module to embed associated web page server.

Due to the dynamic linkage property of Java,

Users can use the web browser to connect to its web

Java codes are loaded only when they are about to be

page and execute specific applet to show the module’s

executed. This attribute allows us to expand a Java

program without recompilation on the source codes. This also let us add drivers to our controller without any change on original codes. In this study, the sequential controller comprises the local PC-based control and remote control modes. The remote controller function is achieved through client-server architecture, as shown in Figure 6. In the remote control mode, users connect to server program through a web browser to activate the program as an applet. The applet will download the mirror of data acquisition module from the hardware server program. Hence, the program will allow user to enter monitor mode. The user can also enter into the administration mode to claim the control privilege. In

Figure 7. Hardware Auto-Search

this case, the user can upload design data into server and start the control action to monitor the control

As shown in Figure 8., the NAP7000 and ADAM6000

results.

modules were used to control two sequential pneumatic pistons. Figure 9 shows the application of remote monitor and control for system developed in this paper. In this case, the lower computer executes the program in a client mode and connects to the upper server computer to claim for control token. Once it takes the control privilege, the client computer can control the hardware devices and monitor their control results.

Figure 6. Remote Controller and Monitor Design: Client/Server Based.

4. Results

Figure 7 shows two data acquisition systems linked with the sequential controller developed in this paper. As the program entering into the hardware mode, it scans in certain directories and subdirectories until all the hardware driver classes were found. Once the classes were found, the codes were loaded and instanced to show the graphic module images as shown in Figure 7.

Figure 8. PC-based Sequential Control

6. References

[1] W. Li and S. Jen, Pneumatics and Hydraulics. Taipei: Gou-Li Publishing Co., 1998. [2] Thuan L. Thai, Thuuan L. Thai, Andy Oram (Editor),”Learning DCOM”, O'Reilly & Associates; ISBN: 1565925815. [3] JavaTM Remote Method Invocation (RMI), Figure 9. Remote Sequential Control

http://java.sun.com/products/jdk/rmi/index.html. [4] Michi Henning, Steve Vinoski,” Advanced CORBA

5. Concluding Remarks

Programming with C++”, Addison-Wesley Pub Co; ISBN: 0201379279.

As the potential for linking many advanced

[5] OPC (OLE for Process Control),

network-ready hardware devices into a powerful

http://www.opcfoundation.org/.

controller increases, we need to create more software packages that can “grow” with the hardware setup. In this paper, a web-based hardware neutral sequential controller system was created to deal with these problems. This hardware neutral system can be used to

[6] The JavaTM 2 Platform, Standard Edition v1.3.1, http://java.sun.com/j2se/1.3/. [7] Bruce Eckel,”Thinking in Java”, 2nd edition,http://www.mindview.net/Books/TIJ/. [8] C.Yen, W. Li, and R. Lin,”A Web-based,

assist user on implementing the design of the

Collaborative, Computer-Aided Sequential Control

general-purpose pneumatic sequential controller. The

Design Tool, to appear in IEEE Control System

functions of the system include control circuit setup

Magazine, 2003.

and simulation, physical system control and web-based remote control. The main objective of these systems is to provide a hardware neutral environment for integration of different type of data acquisition units from different manufacturing companies. This controller environment allows one to add or remove corresponding modules without further modification of the original control software. This system is written in Java, thus can be either

[9] Jason Hunter and William Crawford,”Java Servlet Programming”, 2nd edition, 2001, http://www.amazon.com/. [10] The Apache Software Foundation,”Apache Server”, http://www.apache.org/. [11] The Apache Software Foundation,”Servlet Engine”

Tomcat, http://jakarta.apache.org/.

[12] NAP7000 Remote Data Acquisition Module, ICPDAS Co., Ltd. htp://www.icpdas.com.tw/. [13] Adam6000 Remote Data Acquisition

executed as a unique program or embedded in an html

Module,Advantech Co., Ltd.,

page. The hardware neutral capability is achieved

http://www.advantech.com.tw/

through the applications of Java dynamic linkage and

[14] Sun Microsystems, Inc” JavaTM Communications

object reflection. The system can be used in any

API”,

environment with Java virtual machine and therefore

http://java.sun.com/products/javacomm/index.html

can be used as a software component to develop cross-platform computer aided control system design coursewares.

[15] MODBUS Protocol, http://www.modbus.org/.

Suggest Documents