Server side Javascript procedure that displays a range of Parameter Database values within an ASP file. Similar to aspPDBTab except that the data is output in a simplified format for subsequent processing.
<% aspPDBTbn(); %>
Prerequisites
Must be contained within a file with a .ASP (Active Server Page) extension.
Parameters
None
URL Query String Parameters
PIDl
A required numeric value that defines the lowest integer identification code of the Database Parameters to be displayed. For example, the DB Parameter for reading the "Controller name" is 109.
PIDh
A required numeric value that defines the highest integer identification code of the Database Parameters to be displayed.
PIX1
A required numeric value that specifies an integer unit number for the Database Parameters to be accessed. For many parameters, e.g. the Controller, only a single unit exists. For parameters that refer to devices with multiple possible units, e.g. multiple robots driven by a single controller, PIX1 ranges from 1 to n.
As a special case, if PIX1 is set to -1, the unit number is extracted from the "Default webserver structure index" (DataID 423) parameter. This permits a single web page to display the information for different units (e.g. robots) depending upon the setting of DataID 423.
PIX2
A required numeric value that specifies an integer sub unit number for the Database Parameters to be accessed. The use of the sub unit number is not very common and PIX2 is normally set to 0 or 1.
Remarks
When this procedure is encountered in an ASP file, the values for a range of Parameter Database entries are extracted and converted into a series of HTML table rows. The PDB entries whose identification codes range from PIDl to PIDh and that apply to unit PIX1 and subunit PIX2 are displayed.
This Javascript procedure is similar to aspPDBTab in that it outputs the values for a range of Parameter Database entry values. However, unlike aspPDBTab, this procedure does not include extra HTML tags in the output for special formatting or to permit the values to be edited or resubmitted. So, the output of this procedure is much easier to subsequently process.
While this procedure can be used to directly display information, in the controller's standard web pages it is often executed in a background thread and client side Javascripts are used to process this data before it is displayed on the foreground web page.
Each accessed PDB entry generates a separate row in a HTML table using tags in the following manner.
<tr>
<td><div align="center">PDB_dataid_number</div></td>
<td>PDB_label</td>
<td>PDB_value</td>
</tr>For flexibility, the PIDl, PIDh, PIX1 and PIX2 values are specified within the Query String portion of the URL specification that retrieves the ASP file that contains the aspPDBTbn procedure call. The easiest way to specify these values is to use <input> tags within the <form> tags that retrieves the ASP file. See the example below for an illustration of this process.
Because this procedure's argument values are specified in the URL Query String, it is not very useful to include more than one instance of aspPDBTbn in a file.
Examples
The following is a minimal ASP sample file that illustrates how to execute the aspPDBTbn procedure. Save this sequence in a file as /flash/appweb/test2.asp.
<html>
<body>
<table border="1" cellpadding="0" cellspacing="0">
<% aspPDBTbn(); %>
</table>
</body>
</html>
The following is a minimal HTML sample file that implements a button that retrieves the "test2.asp" file. In addition, it specifies that the Parameter Database values with ID's between 120 and 129 should be displayed. Save this sequence in a file as /flash/appweb/test.html.
<html>
<body>
<p><form action="/flash/appweb/test2.asp" method="get" class="center">
<input name="PIDl" type="hidden" value="120">
<input name="PIDh" type="hidden" value="129">
<input name="PIX1" type="hidden" value="1">
<input name="PIX2" type="hidden" value="0">
<input type="submit" value="Show DataID's 120-129">
</form></p>
</body>
</html>
Directly display test.html by specifying its address in a browser. When it is displayed, press the button to retrieve test2.asp and obtain the range of PDB values. The following should be displayed although your specific data will be different.
|
120 |
Controller-up time in sec |
101413.2 |
|
121 |
Date and time |
08-15-2007 23:17:11 |
|
122 |
Time zone and DST flag |
0, 0 |
|
123 |
Flash partition size, Kbytes |
256, 640, 1600, 1536, 64 |
|
124 |
DIP switch |
0 |
|
125 |
Serial console enable |
1 |
|
126 |
CPU temperature |
0 |
|
128 |
Power supply type |
-1 |
See Also