Application on the webnet or on the pc, Application on the pc, 2 application on the webnet or on the pc – Addtron Technology Electronic Device WebNet User Manual

Page 35: 3 application on the pc

Advertising
background image

The Terminal emulator is opened, and it is set up to connect directly to COM2. (check

that serial line settings correspond with those of the WebNet).

The “Device Sharing” settings (on the WebNet home page) is setup to “serial port

sp0”, “telnet port 1010”.

A telnet session with the WebNet port 1010 is started, e.g. with the command telnet

192.168.4.10 1010 .

Now, keystrokes entered in the terminal emulator should appear in the telnet appli-

cation and vice versa.

Thus, the data entered “into” the RS232 interface is routed through the WebNet and out
to TCP/IP port 1010. Conversely, data sent to port 1010 of the WebNet are routed to the
RS232 interface.

8.2

Application on the WebNet or on the PC?

The system’s intelligence can be implemented either on the WebNet or on the PC connected
to it.

When the intelligence of the system is placed on the WebNet, some WebScript code runs
and interacts with the device continuously. The user can, at any time, connect to the
WebNet thus asking this code to generate a web page telling the device’s status. This may
be useful whenever continuous interacting with the device is desirable (e.g. if data logging
is needed) without a client being connected.

When the intelligence of the system is placed on the PC, a Java applet [7] is put on the
WebNet, which is then automatically uploaded to the browser upon connection. The Java
applet can connect directly to the RS232 device and implement all protocol handling, data
processing and presentation. The user can view the status of the device and control it,
according to the capabilities of the protocol.

The PC can also run some dedicated application that communicates with the WebNet and
interprets and presents the data from the device.

8.3

Application on the PC

The advantage of having the application run on the PC as a Java applet is that more
complex things can be done with a fairly small amount of code on the WebNet. For instance,
graphical representations of data are easily coded in Java. Even though the Java applet is
kept small, its functionality can be complex because it “links” with objects from the PC’s
class library at runtime.

An applet is excecuted “inside” an HTML page. The browser fetches the HTML page from
the server, and the HTML page contains a reference to the applet. The browser then fetches
the applet from the server and runs it, sending its output to a specific part of the browser
screen.

WebNet User’s Guide

35

Advertising