The main goal of this example is to show how to use the InterWidgetCommunication method setUpdateRate(). This example uses a line plot (Plot1) and a couple of radio buttons. Upon loading, Plot1 is requesting InternalRAM byte variable number five every 50ms. One of the radio buttons sets Plot1's update rate to 50ms, the other one sets Plot1's update rate to 500ms. There is a slider included which changes InternalRAM variable number 5, so you can change the input value used by Plot1. Here is a snapshot of what the html page looks like in a "WYSIWYG" tool:

Figure 1.
To create Plot1, use the following:
<APPLET CODE="LinePlot.class" WIDTH="102" HEIGHT="77"
NAME="Plot1">
<PARAM NAME="href" VALUE="Amulet:InternalRAM.byte(5).value()">
<PARAM NAME="yMin" VALUE="0">
<PARAM
NAME="yMax" VALUE="255">
<PARAM NAME="xSamples"
VALUE="16">
<PARAM NAME="lineWeight" VALUE="5">
<PARAM
NAME="updateRate" VALUE=".05,.01">
< /APPLET>
To create the two radio buttons, use the following:
<APPLET CODE="RadioButton.class" WIDTH="100"
HEIGHT="21" ALIGN="BOTTOM">
<PARAM NAME="href"
VALUE="Amulet:document.Plot1.setUpdateRate(0.05)">
<PARAM
NAME="fontSize" VALUE="3">
<PARAM NAME="fontStyle"
VALUE="bold">
<PARAM
NAME="label" VALUE="50 ms">
<PARAM NAME="initialCondition"
VALUE="on">
<PARAM NAME="groupName" VALUE="radioGroup1">
<PARAM
NAME="buttonAlignment" VALUE="left">
</APPLET>
<APPLET CODE="RadioButton.class" WIDTH="100"
HEIGHT="21" ALIGN="BOTTOM">
<PARAM NAME="href"
VALUE="Amulet:document.Plot1.setUpdateRate(0.5)">
<PARAM
NAME="fontSize" VALUE="3">
<PARAM NAME="fontStyle"
VALUE="bold">
<PARAM
NAME="label" VALUE="500 ms">
<PARAM NAME="initialCondition"
VALUE="off">
<PARAM NAME="groupName" VALUE="radioGroup1">
<PARAM
NAME="buttonAlignment" VALUE="left">
</APPLET>
When one of the radio buttons is selected, Plot1's setUpdateRate() method is invoked, which sets the Plot1 updateRate to the intrinsic value of the radio button selected. Note that when calling the setUpdateRate() method, the intrinsic values should be a floating point number as opposed to an 8-bit number. This is only true when calling the setUpdateRate() method. Using a floating point number as an intrinsic value for any other function call will result in a compiler error.
If the second radio button is selected, Plot1 will start requesting InternalRAM byte 5 with an update rate of 500 ms. If the first radio button is selected, Plot1 will change the update rate to 50ms.
NOTES: