Application of Java Platform in Open Control System Platform

Abstract: The existing open control system platform does not have a uniform development specification. For this reason, this paper has studied Java—an advanced and truly open architecture, applied to the advantages of open control system platform, and how to use Java. The openness of the platform establishes a unified open control system platform. At the same time, aiming at the shortcomings of the real-time control of the Java platform, a solution to convert the controlled real-time task into a non-real-time task was proposed.
Keywords: Java platform; open control system platform; real-time control
Classification number: TP273 Document code: A
Article ID: 1001-2265(2000) 02-0036-03

1 Introduction

Research on open control systems began in the 1980s. Following the NGC (Next Generation Controller) project in the United States, OSACA was launched in Europe, Japan conducted a research project called the OSEC project, and Canada also has an NRC program. Open control systems not only benefit machine tool manufacturers and CNC suppliers, but also give end users great flexibility. However, the technology adopted by each plan cannot yet truly achieve "openness." At the same time, each of the above plans is independent of each other. There is no uniform standard and agreement among them. Therefore, it cannot be considered as truly open to users. Java is a platform and a language developed for the network environment. Since it was introduced by Sun Microsystems in 1995, it has been widely used in the computer industry due to its many advantages such as cross-platform and security. This article discusses how to use the Java platform in an open control system to achieve the purpose of a unified platform.

2 Requirements for open control systems

The open control system includes a set of logically separated components. The interfaces between components and between the components and the application platform are well defined. Components from different vendors work together and run on multiple platforms to complete the control work. , And provide a good interface for users and other control systems.
The open control system has the following features:
(1) Interoperability Provides a unified standard communication system for data exchange.
(2) Portability Use the standard API provided by the platform, and applications can run on different platforms.
(3) Scalability: Each function module can be added or deleted arbitrarily.
(4) Interchangeability Functional modules can be freely interchanged.

3 Features of the Java Platform

Many features of Java meet the requirements of open control systems. The Java platform is shown in Figure 1.

1

Figure 1 Java platform structure

The Java platform consists of two layers:
(1) Java class and Java application program interface: Provides a standard access interface and some basic class library application program access and extension for applications.
(2) JVM Java Virtual Machine: It is the core of the Java platform and the key to implementing Java cross-platform. Covers all platform-related service functions, including user interface, file system operations, and network support.
Java, as a brand new open platform, has the following advantages in its transformation into language and structure:
(1) Language Strictly all programs are designed strictly according to the object-oriented method, otherwise errors will occur.
(2) Language inherits C++ simply, but it removes header files, pointer syntax and operations, structure union, operator overloading, and virtual base classes.
(3) Distributed languages ​​support multiple transport protocols such as TCP/IP, HTTP, and FTP. In addition, distributed computing is also supported.
(4) Dynamically allocate memory to ensure that the application program is safe and reliable in all aspects to ensure its security in two ways:
1 Prohibit pointer and memory access 2 Check legality before running Java code to prevent illegal access to data structures, classes, and memory.
(5) Structure-neutral byte code that is neutral due to the compiler's longevity structure can run on any platform, as long as the hardware and software platforms that support the Java system can run byte code. Java supports up to forty kinds of platforms, including OS/2, Sun Soloris, Linux, WinNT, Win95, Win98, and VxWorks.
(6) Portability Java's basic data type size is determined, its integer and floating-point type are 32-bit, to ensure the portability of the application.
(7) Multithreading Java multithreading can run on multiple processors, providing better interactive response and real-time features. The following table compares with Microsoft's products.

Table Java and Windows Product Comparison Table

Name Cross-hardware Platform Cross-software Platform Security Portability Java Any Any Good WinNT4 X86 PowerPC
MIPS Alpha Dos Windows3x
Win95 Better General Win95 X86 Dos Windows3x General Poor Win98 X86 Dos Windows3x
Win95 General Poor Win2000 X86 Alpha Dos Windows3x
Win9x WinNT is generally better seen in Table 1. As the basic requirement for an open control system, Java does win.
In the real-time control system, taking CNC machine tools as an example, interpolation and position control are real-time tasks. In high-precision and high-speed CNC systems, the interrupt response speed can reach microseconds. This real-time control is called hard real-time. That is, the task must be processed within a given time period, otherwise it will lead to unpredictable results. Therefore, it is necessary to obtain the CPU processing time and memory allocation of each real-time task so that the real-time tasks can be properly allocated and executed normally in the system load.
There is a gap between the characteristics of Java and the requirements of real-time control, reflected in the following two aspects:
(1) Dynamic management of memory is not the same as C++. Java automatically clears memory for users. It uses a technique called a garbage collector (GC) to automatically clear unused memory space in memory. This poses a problem: the user cannot predetermine the execution time of the GC algorithm, and all threads must execute the GC algorithm. Hangs. This uncertainty is inconsistent with real-time calculations because real-time calculations require precise determination of the execution time of each task.
(2) Access to the underlying hardware The Java program developed by the user should be independent of the specific hardware and operating system. Once the user directly accesses the underlying device, it is bound to undermine the cross-platform nature of Java.

4 Application in Open Control System Platform

In the numerical control system, the application program can be divided into man-machine interface management, three-dimensional simulation and diagnostics and other real-time programs and interpolation operations, position control and other real-time control programs. The real-time control requires that the interrupt response speed is fast and the amount of calculation is large. Generally, a separate CPU is required to process it, or a hardware card is used to implement the interrupt. Taking the OSACA application system as an example, the dual PC structure shown in Figure 2 is used:

1

Figure 2 Dual PC structure

In Figure 2, HMC (Human Machine Control) is a non-real-time task; AC-X, AC-Y, AC-Z (Axis Control) and MC (Motion Control) are real-time tasks. Axis control and motion control include interpolation and position control, so they are implemented on a single PC. Between the two PCs, the real-time and non-real-time TCP/IP protocols are adopted for communication.
In fact, the interpolation operation includes two parts of interpolation preparation and interpolation calculation. Interpolation operations as real-time tasks are mainly limited to the processing speed and memory capacity of the CPU in the past. With the advent of high-speed, high-performance CPU and large-capacity memory, the speed requirements and data volume of interpolation operations can be completely solved. The XYZ values ​​of the trajectory coordinates can be calculated in advance and stored in the data table and sent to the position control section by section. Current digital servo controllers can already include position control algorithms and can no longer develop position-controlled application modules. Therefore, the development of NC application software can be divided into non-real-time tasks.
In addition, the existing open control system platforms such as OSACA, NGC, and OSEC are open internally. Control applications developed on platforms that support the OSACA architecture are open to the OSACA platform. However, open systems cannot be implemented between open control system platforms because their architectures are not the same, and the protocols they support and the data structures used are not disclosed to each other. Therefore, the communication between them needs to design the gateway to realize the data transformation. See Figure 3.

1

Figure 3 Communication between open control systems

As an open architecture, Java is not only recognized by the world, but more importantly, it has advanced platform design methods and becomes a truly open platform. The problems facing the current open control system platform can be solved using the Java platform, as shown in Figure 4. Utilize the functions provided by the Java platform to realize the independence of the hardware and the operating system and realize a true open control platform. The development of numerical control software is all converted into non-real-time control. The application program gains support of the platform by accessing Java API. The portability of Java language is exploited. The application program developed by modularity has excellent portability and can run on Java. Above the platform. At present, many servo controller manufacturers have launched products based on the Java platform and have Java interfaces. In this way, applications built on the Java platform can directly access speed servo data, which can solve problems of real-time control and how to unify the platform.

1

Figure 4 Application of the Java platform

5 Conclusions and Outlook

This article proposes a solution that uses Java's truly open platform. Java developers are also adding real-time capabilities to the Java platform to adapt to industrial control requirements. With the advent of the age of networking, Java-based platforms can not only be called open control platforms, but also enable the use of its powerful network functions to achieve off-site manufacturing, which will greatly promote the development of agile manufacturing.

Screen Changer

Screen Changer,Extruder Screen Changer,Hydraulic Screen Exchanger,Plastic Machine Screen Filter

Zhejiang Kehao Plastic Machinery Co., Ltd. , https://www.khplasticmachinery.com