Optimized means for setting and getting a numeric value in the configuration parameter database.
Controller.PDbNum(dataid, unit, unit2, array_index, key) = <new_value>
-or-
... Controller.PDbNum(dataid, unit, unit2, array_index)
Prerequisites
Can only access numeric parameter database values.
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 for 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, value defaults to 1.
unit2
An optional numeric expression that specifies an Integer sub unit number for the parameter to be accessed. Using the sub unit number is not common and this parameter is usually 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 1, the first array element.
key
Optional numeric expression specifying an Integer key code to override robot configuration protection and set a protected DataID value.
Remarks
All key variables for configuring and monitoring the operation of the system are stored in a unified parameter database. Controller.PDbNum is a variation of Controller.PDb, optimized to efficiently read and write numeric values stored in this database. Controller.PDbNum operates quickly when reading and writing the "GPL program variable's" (DataID's 1850-1869). These database elements have been created to allow GPL projects to interface to custom web pages. 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 limit As Single
limit = Controller.PDbNum(16077,,,2) ' Sets limit equal to the maximum
' allowable range of travel for jt 2
See Also