Demo for fstoperand Java applet

Until now when dynamic (FST operand values) need to be displayed on a webpage following needs to be done:

Now the page will be completely reloaded which costs time and does not look nice. Additionally it also takes some time in the PLC to handle the page etc. etc.

The fstoperand Applet was especially created to change this !
Once the Applet is loaded it will communicate directly with the PLC and display the actual value, no need to reload the webpage anymore. This is how it looks when this page is loaded from a PLC:
Value of flagword 0 =

All that needs to be done is include the applet into your page, set parameters for operand, font etc.. Like this

  <applet code="fstoperand.class" codetype="application/java" height="16" width="60" align="top">
    <param name="operand" value="MW0">
    <param name="delay"   value="1000">
    <param name="mode"    value="signed">
    <param name="font"    value="Arial">
    <param name="size"    value="12">
    <param name="style"   value="bold">
  </applet>

The parameter for display mode can have several values: Some samples:
FW1 binary:
FW2 scaled:

Another possible option is graph which can be combined with the display of the value like this:

  <applet code="fstoperand.class" codetype="application/java" height="16" width="60" align="top">
    <param name="operand"  value="MW0">
    <param name="delay"    value="1000">
    <param name="mode"     value="percent">
    <param name="postfix"  value="%">
    <param name="font"     value="Arial">
    <param name="size"     value="12">
    <param name="style"    value="bold">
    <param name="minValue" value="0">
    <param name="maxValue" value="999">
  </applet>

Value of flagword 0 with bargraph:
Possible values for graph are: left, right, top and bottom

Some other text formatting options are: prefix, postfix, align and valign.

If you also load ModifyDialog.class onto the PLC and include a parameter <param name="modify" value="yes">, it is possible to change the value of the operand directly. Right click on the applet and a dialog will appear where the value can be modified.
Value of flagword 0 =
The code fragment:

  <applet code="fstoperand.class" codetype="application/java" height="16" width="60" align="top">
    <param name="operand" value="MW0">
    <param name="delay"   value="1000">
    <param name="mode"    value="signed">
    <param name="font"    value="Arial">
    <param name="size"    value="12">
    <param name="modify"  value="yes">
  </applet>

The applet can display images. Up to 3 images can be displayed, the values are split into 3 ranges using minValue and maxValue parameters. Please note that the value is used as an unsigned value (0 .. 65535).
Here is a traffic light that will be Green if Flagword 0 is smaller than 10, Yellow if between 10 and 20, Red if greater than 20.

The code fragment:

  <applet code="fstoperand.class" codetype="application/java" height="100" width="100">
    <param name="operand" value="MW0">
    <param name="delay"   value="1000">
    <param name="mode"    value="signed">
    <param name="font"    value="Arial">
    <param name="size"    value="12">
    <param name="modify"  value="yes">
    <param name="showImage"  value="yes">
    <param name="minValue"   value="10">
    <param name="maxValue"   value="20">
    <param name="imageLow"   value="images/trf_gr.gif">
    <param name="imageOK"    value="images/trf_ye.gif">
    <param name="imageHigh"  value="images/trf_rd.gif">
  </applet>


The applet can also be used to change values. Flagword 10 =

For this to work the applet must have a unique name (in this case simply MW10), then modifications are possible by using some form / javascript magic.
The code fragment:
  <applet code="fstoperand.class" name="MW10" height="16" width="60" align="top">
    <param name="operand" value="MW10">
    <param name="delay"   value="1000">
    <param name="mode"    value="signed">
    <param name="font"    value="Arial">
    <param name="size"    value="12">
    <param name="style"   value="bold">
    <param name="modify"  value="yes">
  </applet>
  <form method="post" action="">
    <input type="button" value="set to 1" onclick="document.MW10.setValue('1')">
    <input type="button" value="set to 2" onclick="document.MW10.setValue('2')">
    <input type="button" value="set to 3" onclick="document.MW10.setValue('3')">
  </form>


Some notes:

Planned enhancements are:


last modified: 2004-06-16