EasyManua.ls Logo

Advantech ADAM-6000 series - Page 71

Advantech ADAM-6000 series
156 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Instructions to Java Applet Customization
Introduction
In this section, we will tell you the way to create an applet web page to monitor the status of ADAM-6060
through the Web browser. To write an input processing applet, you need to know how to define a class
with multiple methods. To understand how an applet processes input data, you must learn what events
are and how events are handled in Java programs. We don’t intend to teach you how to write the applet
because it is beyond the scope of our discussion here. Instead, we will provide you with a
small-but-useful example as well as the relevant class, methods and suggested template. We refer the
interested user who is intended to know more details to the following web site
http://java.sun.com/docs/books/tutorial/.
To write an applet that is capable of processing ADAM-6060 input data in a very short time, we provide
you with a class which includes all necessary methods. The kernel functions/methods to communicate
with our product and display the current, updated status has been fine-tuned for any signal it can process.
Four major methods are developed for the purpose, listed in table 1.
Table 1. Useful Methods to Communicate ADAM-6000 I/O Series Modules for
Digital I/O and Analog I/O
boolean ForceCoil(int CoilAddr, boolean IsTrunOn)
This method is used for digital output of module channels. The parameter CoilAddr
is integer data type and the coil address of the channel. IsTrueOn is the parameter
used to indicate ON or OFF. If the method is successful, it will return true.
boolean ReadCoil(int StartingAddr, int NoOfPoint, byte ModBusRTU[])
This method is used for digital input of module channels. The parameter
StartingAddr is the starting address of desired channel. NoOfPoint is to indicate
how many desired channels to be monitored. Both of the parameters are of integer
data type. The third parameter, ModBusRTU is an array with data type of byte,
which is used to carry digital inputs of the desired channels. The default size is 128.
boolean ReadRegister(int StartingAddr, int NoOfPoint, byte ModBusRTU[])
This method is used for analog input of module channels. The parameter
StartingAddr is the starting address of desired channel. NoOfPoint is to indicate
how many desired channels to be monitored. Both of the parameters are of integer
data type. The third parameter, ModBusRTU is an array with data type of byte,
which is used to carry analog inputs of the desired channels. The default size is
128.

Related product manuals