A typical mechatronic engineering degree would involve classes in engineering mathematics, mechanics, machine component design, mechanical design, thermodynamics, circuits and systems, electronics and communications, control theory, programming, digital signal processing, power engineering, robotics and usually a final year thesis.
Saturday, March 29, 2008
Description About Mechatronic
Posted by othman hafizzudin at 6:58 PM 0 comments
Wednesday, March 26, 2008
Mixed Language Programming in C/C++ and Java
ABSTRACT
Mixed language programming is very useful for many applications which can take advantage of the salient features of different programming languages. In this paper, design and implementation of ChJava which supports portable mixed language programming in C/C++ and Java will be presented. ChJava integrates portable C/C++ interpreter Ch and Java virtual machine. Using ChJava, Java classes can be executed from a C/C++ program interpretively, and C/C++ programs can be executed from a Java program. ChJava contains the salient features of both C/C++ and Java. The application of ChJava in interactive control of a mechatronic system is presented. The mechatronic system can be controlled in a standalone environment. It can also be controlled across internet through a Web browser with the program running either in a client side or in a Web server. In this application, the control of C/C++ scripts can be generated and modified dynamically. It is expected that ChJava will find applications in many different fields.
Keyword : programming in c/c++,java application,mechatronic systems.
Posted by othman hafizzudin at 10:14 AM 0 comments
INTRODUCTION
ONE of the biggest challenges of software engineering is to deal with the complexity involved in programming. There is a great need for good design that can lead to simpler way to solve the problems. This could be done using mixed languages, where the advantages of each constituent language can be used. There is an increasing research interest in the field of mixed language programming. Java offers several advantages over other languages, especially, the absence of pointer, explicit memory management, garbage collection, applet for graphical user interface through web browsers, etc. Due to its built in security mechanisms such as sand box for applets, it is especially suited for web-based network computing.
However, there are limitations for Java. To take advantage of the capabilities of other languages, Java has been integrated with some other languages. Java program itself has difficulty in accessing the hardware and lower level components of a computer. JNI allows Java classes to communicate with applications and libraries written in other languages such as C, C++ and assembly. However, there are limitations using JNI. We have developed ChJava for communicating between Java classes and C/C++ scripts. ChJava allows mixed language programming in both C/C++ and Java. So that applications can take advantage of salient features of both C/C++ and Java. As a superset of C, Ch can easily interface with hardware for
motion control. The application of ChJava for control of mechatronic systems is also illustrated in this article.
Posted by othman hafizzudin at 10:03 AM 0 comments
JAVA APPLICATION IN CONTROLLING ROBOTICS MACHINE
One of the salient features for Ch is its capability in importing existing binary static and dynamic C libraries using Ch SDK. Ch and C in binary library have their own name space by which a function in the C space cannot directly communicate with a Ch space function. The binary libraries can be integrated in Ch without recompilation. A Java program can also execute C/C++ scripts through JNI and Embedded
interface to Java and there is no need for the developer to learn any new syntax. In case of invoking a Ch script from Java, the native function has to accommodate a set of APIs by which communication to Ch script is created, maintained and destroyed. To illustrate application of ChJava for control of mechatronic system, a Barret robot manipulator hand is controlled using ChJava. The ideas and concepts can be applied to control the other mechatronic systems. To control a Barret hand, a Ch package ChBhand is used to interface with the hardware in Ch scripts. The mechatronic system under consideration has three fingers which can be manipulated through a serial port. This manipulation is done using a Ch script but controlled from Java. We developed a GUI in Java that has three buttons Start, Reset, and Stop to start, reset and stop the system, respectively and four slides, one for rotating fingers 1 and 2, the other three for control of three individual fingers. A Web page with an applet having the same GUI can also be used to access the Ch script to manipulate the mechatronic system in a remote location through CGI.
Posted by othman hafizzudin at 10:02 AM 0 comments
CONCLUSION
The design, implementation, and application of ChJava which supports portable mixed language programming in C/C++ and Java have been presented in this paper. Using ChJava, Java bytecode can be executed from a C/C++ program interpretively in Ch. C/C++ programs can also be executed interpretively without compilation from a Java program. Applications can take advantage of the salient features of both C/C++ and Java. For example, C/C++ is ideal for interface with hardware whereas Java is more suitable for network computing and Java applet for graphical user interface through Web browsers. Applications can execute C/C++ scripts or Java bytecode interpretively. Application of ChJava for manipulation of mechatronic systems has been illustrated by control of a Barret robot manipulator hand. In this application, interface to hardware is accomplished using C/C++ scripts. The graphical interface is programmed in Java in different methods. In the first method, a standalone Java program is used. In the second method, a Java applet is used for interface through Web browsers. A mechatronic system can be either connected in a
client machine or in a Web server. When a mechatronic system is connected to a Web server, C/C++ scripts can be invoked through either CGI or JSP. JSP will be able to connect the server and a browser for continuous communication. It is expected that mixed language programming in C/C++ and Java with interpretive execution of C/C++ scripts and Java bytecode will find many applications in different fields of engineering and science.
Posted by othman hafizzudin at 9:58 AM 0 comments