aspPDBTab ASP Javascript Procedure

Server side Javascript procedure that is utilized by the standard web interface Setup tab to display a range of Parameter Database values within an ASP file and permit their modification.

<% aspPDBTab(); %>

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 and modified.  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 and modified.

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

This Javascript procedure was created primary for use in the standard Setup web page to display and edit groups of values stored in the Parameter Database.  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.

In its simplest format, for a read-only PDB value, the following is output into the ASP file at the point where the procedure is encountered:

<tr>
   <td><div align="center">PDB_dataid_number</div></td>
   <td>PDB_label</td>
   <td>PDB_value</td>
</tr>

Each displayed PDB entry generates a separate row in the HTML table.  The generated HTML code is automatically adjusted depending upon the attributes of the PDB entry, e.g. read-only, read-write, Boolean, etc.  Consequently, special tags are included to display the data in special formats and/or to allow the values to be edited and resubmitted in a HTML form.

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 aspPDBTab 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 aspPDBTab in a file.

Examples

The following is a minimal ASP sample file that illustrates how to execute the aspPDBTab procedure.  Save this sequence in a file as /flash/appweb/test2.asp.

<html>
<body>
<table border="1" cellpadding="0" cellspacing="0">
<% aspPDBTab(); %>
</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

101717.1

121

Date and time

122

Time zone and DST flag

123

Flash partition size, Kbytes

256, 640, 1600, 1536, 64

124

DIP switch

0

125

Serial console enable

On Off

126

CPU temperature

0

128

Power supply type

See Also

Web Dictionary Summary | aspPDBTbn