W&T Interfaces
 for TCP/IP, Ethernet, RS-232, RS-485, USB, 20mA
 Glass and plastic fiber optic, http, SNMP, OPC, I/O digital, I/O analog, ISA, PCI, ...?
      Products & Shop
Home Contact   Distributors worldwide
Languages:
DE

US

ES

IT

RU
Web-IO Digital Web-IO Universal


Web-IO Digital

Web-IO application-ready
Data Server Data Server
Com-Server TCP/IP-Ethernet <> serial:
Com-Server
Serial interfaces USB, RS232, RS485, 20mA:
Serial interfaces
Fiber optics, isolators and line drivers Fiber optics, isolators and line drivers
PC cards PCI Express, PCI and
ISA bus: PC cards
Printer interfaces Printer interfaces
Accessories Accessories
Downloads
Old
Shopping basket Your shopping basket

 
      Technical knowledge
Books, articles, glossaries...
Technical background info
Applications for Com-Server,
USB Server
, Web-IO,
Web Thermometer and
Motherbox
 

Application for Web-Thermograph:

Mercury thermometer




 Additional links: Product overview Application overview Print version


The value measured by the Web-Thermograph / Web-Thermo-Hygrograph can be easily visualized on a Web page using JavaScript and a few images. By incorporating the Web-Thermograph applet you ensure continuous updating of the measured value display.

Using the following copy & paste example you can display a temperature value measured by your Web-Thermograph on a Web page in the form of a mercury thermometer.


Preparations
You have already supplied your Web-Thermograph
  • with power,
  • connected it to your network,
  • assigned it an IP address - which with WuTility is no problem.
1. Incorporate JavaScript into the Web page
  • Copy the JavaScript (shown in gray) from the following example
    into the <head> area of your Web page.
<html>
<head>
<title>Zeiger</title>
<script language="JavaScript" type="text/javascript">
<!--
document.write("<a href='javascript:showgrad();'><img border='0' src='Thermometer.gif' style='position:absolute; top:10px; left:10px'>");


var thermometer = new multipic(301,"Thermometer","gif",91,100,50,"showgrad");
var grad;

function multipic(id, img_name, img_ext, img_count, ypos, xpos, link)
{
img_count++;
this.multipics = new Array( img_count );
this.multipic_count = img_count;
this.multipic_id = id; // class variables
for (i=0; i<img_count; i++)
{
this.multipics[i] = new Image();
this.multipics[i].src = img_name+i+'.'+img_ext;
}
this.Set = picSet; // class method
if (link == "nolink")
{
document.write("<img id='"+this.multipic_id+"' style=position:absolute;top:"+ypos+"px;left:"+xpos+"px src="+this.multipics[0].src+" border=0>");
}
else
{
document.write("<a href='javascript:" + link + "(" + id + ");'><img id='"+this.multipic_id+"' style=position:absolute;top:"+ypos+"px;left:"+xpos+"px src="+this.multipics[0].src+" border=0></a>");
}
}

function showgrad()
{
alert("Aktueller Wert: "+grad+"°");
}


function picSet(iCount)
{
for (i=0; i<this.multipic_count; i++)
{
if(iCount==i)
{
document.getElementById(this.multipic_id).src = this.multipics[i].src;
}
}
}

function sensorChanged( iDevice, iSensor, iVal )
{
if (iSensor==0)
{
grad = iVal;
if(iVal!=0)
{
thermometer.Set(Math.round(iVal)+20);
}
else
{
thermometer.Set(0);
}
}
}
</script>
</head>

2. Incorporate applet into Web page
  • Copy the applet data (shown in gray) into the <body> area of your Web page.
  • Insert the IP address of your Web-Thermograph.

<body>
<applet name="Analog" archive="A.jar" code="A.class" codebase="http://10.40.23.16" height="0" width="0" mayscript>
<param name="device" value="0">
<param name="showerrors" value="off">
<param name="sensorpolling" value="on">
<param name="pollingrate" value="1000">
</applet>
</body>
</html>


3. Download and save images
  • Now all you need is the images associated with the display object, which we have provided here for downloading: .zip (approx. 232 kB). Please place the images in the directory in which the Web page with the JavaScript and applet data are located.

Previous application
Previous application
Next application
Next application
 
  • Mister Wong
  • Google Bookmarks
  • Twitter
  • Facebook
  • Digg
   Imprint
We are here for you personally! Wiesemann & Theis GmbH Tel.: +49 202/2680-110 (M-F 8:00 - 5:00)
Porschestr. 12 fax: +49 202/2680-265
42279 Wuppertal Individual e-mail

© Wiesemann & Theis GmbH, subject to error and alteration: Since we can make errors, none of our statements should be used without verification. Please report any mistakes or misunderstandings so that we can be aware of them and respond appropriately as quickly as possible.