haha

Thursday, April 3, 2008

ICT application in engineering education



ICT is a powerful tool for teaching and learning. The practices are dissiminated more widely and more quickly. Like what happend now, all universities have been standardise to use the same technologies in education such as in workshop, labarotary, and even in the class as well. So the students can apply their skills in factory although they are from different university. For example, for subject in engineering such as AutoCad (Computer Aided Drafting), we need to use the software to help to draft the more complicated drawing. It's help to draw more accurate, precise and exact structure and perfect drawing. The benefit can help student not to draw on the drawing paper, and just click and setting up the information.
In addition, we can store the file savely in the computer and can open it any time. The use of Autocad can save some time and the program have a lot of function which are can change the view section, 3D dimension and easy to adjust if there are some corrections.


On the other hand, the use of modern technologies also help in engineering education in Machining Workshop subject. We can see that the machine was invented with future information technology and the machine can process some milling, turning and either grinding or chamfering process. Its all about the cutting tools, the workpiece, the machine as well and the procedure of the process.We had learned all the process and the differences between all the machine and the uses of it. We noticed that different shapes need a different procedure which is the cutting tool and the cutting process. Sometimes, if there was an error, it will break the cutting tools or else the sounds of the cutting process seems a bit different from the actual one. Besides that, the advances of the machines makes the workshop practice that we done before have successfully makes the workpiece likes in order of the size, depths, diameter and the shapes.

Saturday, March 29, 2008

Description About Mechatronic


Engineering cybernetics deals with the question of control engineering of mechatronic systems. It is used to control or regulate such a system (see control theory). Through collaboration the mechatronic modules perform the production goals and inherit flexible and agile manufacturing properties in the production scheme. Modern production equipment consists of mechatronic modules that are integrated according to a control architecture. The most known architectures involve hierarchy, polyarchy, heterarchy and hybrid. The methods for achieving a technical effect are described by control algorithms, which may or may not utilize formal methods in their design. Hybrid-systems important to Mechatronics include production systems, synergy drives, planetary exploration rovers, automotive subsystems such as anti-lock braking systems, spin-assist and every day equipment such as autofocus cameras, video, hard disks, CD-players, washing machines.

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.

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.

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.

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 Ch. The network computing capability of Java can be enhanced with ChJava. Portable C/C++ scripts can be invoked through CGI. Using a Java applet, Ch scripts can be invoked either in a client side or in a Web server. In case of the client side invocation, the client machine needs to be installed with Ch and ChJava. Ch scripts can also be invoked in a Web server through java applets through either CGI or JSP. In case of JSP, the downloaded applet calls a JSP which in turn calls a Java class with a JNI function. This JNI function invokes a native function which runs the Ch script as described in the previous section. Ch scripts can also be directly accessed through Java applets using CGI. Both these methods are described in detail in the remaining section. Running a Ch script in a server through an applet can be performed using CGI toolkit [14]. One of the most important applications of CGI is handling fill-out forms and generates Web pages dynamically. The communication with the Web server can also be done through Java Server Page (JSP). When the GUI component in a Java applet is activated, the applet sends the corresponding values through the GUI to a Java Server Page. To utilize JSP, Tomcat Web server is used and it is connected to the Internet Information Server (IIS) using Tomcat connectors for better performance. A Java applet invokes the required native function in the library file to perform the required action. This native function invokes embedded Ch and sends the values to the Ch script. To securely access the local resources, signed applets are used. The syntax of ChJava is exactly the same as the C

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.

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.