Jump to content

how to get variables from a java applet


btingu

Recommended Posts

Hello,

 

I have a data acquisition device (CMC-141 from simex) for process monitoring and control.

This device has a java applet stored in his memory and this applet is used to read measurements form a thermometer and other devices.

I managed to get the applet displayed on a web page of my own.

I installed wampserver, and with my page located on the server.

 

post-140604-0-60671300-1361366613_thumb.png

 

picture1.png shows my web page, and the temperature read is updated every second.

Now, what I want to do is to get that value (21.31) out of the applet and to do whatever i want with it: display it, store it.

I just started with thml, css, javascript, php and mysql, and I will learn to do that in the close future.

 

The script that I am using to display my page as it is seen in picture1.png is as follows:

 

 

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>Instalatie laborator</title>

 

</head>

 

<body>

<div id="content">

<p>Instalatia din laborator</p>

</div>

<div id="instalatia">

<img src="images/instalatie laborator 2.png" width="956" height="434" alt="instalatie Laborator">

<applet code="jmulticon.gauge.McGaugeApplet.class"

archive="http://192.168.1.4/c.../jmulticon.jar"

style="z-index: 1; position: absolute; top: 338px; left: 132px; width: 166px; height: 101px">

 

<param name="device.address" value="192.168.1.4" />

<param name="channel" value="536" />

<param name="channel.type" value="logchan_float" />

<param name="port" value="502" />

<param name="gauge.type" value="text" />

<param name="channel.name" value="Temp." />

<param name="channel.unit" value="°C" />

<param name="color" value="FF6600" />

<param name="range.min" value="0" />

<param name="range.max" value="120" />

 

</applet>

</div>

</body>

</html>

 

 

 

 

Also my next problem will be to make a button which sends a message to the java applet to control the device to start an engine, to open a valve, etc..

 

Thank you in advance,

cosmin

Link to comment
https://forums.phpfreaks.com/topic/274729-how-to-get-variables-from-a-java-applet/
Share on other sites

I have never used this personally before, but I have heard of the PHP/Java Bridge implementation being used to accomplish this.

Basically is connects the PHP script engine with a JVM and allows for communication between the two.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.