Controller.PDb Property

Sets and gets any accessible value in the configuration parameter database.

Controller.PDb(dataid, unit, unit2, array_index, key) = <new_string_value>
-or-
... Controller.PDb(dataid, unit, unit2, array_index)

Prerequisites

None

Parameters

dataid

A required numeric expression that specifies an Integer identification code for the parameter to be accessed. For example, the parameter for setting the system “test speed” is 601.

unit

An optional numeric expression that specifies an Integer unit number for the parameter 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, this parameter ranges from 1 to n. If not specified, this value defaults to 1.

unit2

An optional numeric expression that specifies an Integer sub unit number for the parameter to be accessed. The use of the sub unit number is not very common and this parameter is normally just defaulted to 1.

array_index

An optional numeric expression that specifies an Integer array index for parameters that have multiple values. For example, for a robot with multiple axes, the “joint maximum soft stop limits” (dataid 16077) is an array with one value for each joint. If not specified, this value defaults to 0, which reads all possible array values.

key

An optional numeric expression that specifies an Integer key code to override robot configuration protection and set a protected DataID value.

Remarks

As described in the Controller Software Introduction, all of the key variables for configuring and monitoring the operation of the system are stored in a unified parameter database. Controller.PDb can be used to read or write all accessible values in the parameter database.

Controller.PDb reads parameters and returns the results in a String or writes parameters by accepting a String expression.  If the parameter contains numeric values, the values are represented as text numbers separated by commas (in the case of numeric arrays).  If the parameter contains a single string value, the value is read into or read from a GPL String without delimiting quotation marks.  If the parameter contains an array of strings, each string is delimited by double quotes and sequential values are separated by commas.

As a convenient for developing custom web pages, the parameter database contains a series of "GPL program strings" (DataID's 1800-1819) and "GPL program variable's" (DataID's 1850-1869).  Custom web pages can read and write these values via ASP operations. Once the controller is restarted, the operating system does not alter any of these variable values.

 

               

While database values can be freely read, care should be taken when writing to general database parameters. Unintentionally altering some values may cause the system to not operate properly..

Examples

Dim stg As String
Controller.PDb(541) = """Label1"",""Label2""" ' Sets first two DOUT labels
stg = Controller.PDb(100) ' stg set to "Brooks Automation"

See Also

Controller Class | Controller.PDbNum