Parameters Property (ADriver)

modified v8

Returns or sets the driver parameter as specified by the sName parameter.

Syntax

[ vValue = ] Object.Parameters ( [sName] )

Object.Parameters ( sName ) [ = vValue ]

The Parameters property syntax has the following parts:

 

Name

Type

Description

Object

ADriver

ADriver object

sName

[Val] BString

Optional. The parameter name which specifies the program parameter. If the sName is omitted or empty the function return all the parameters names and values

vValue

Variant

The value of the program parameter specified by sName. The value can be either a number or a string.
v8.0:
If sName is omitted or empty the vValue vValue contains a array of variants each contains an array with two elements name and value of the parameter

Comments

The parameters name and type are defined in the Driver Properties Window. Their value can be initially set in the Driver Shortcut Properties Window and then change at run time using this property. Parameters can be used to configure the driver, set the instrument address, etc.

Example

The following example first sets the parameter named "AdapterName" for the current driver, then it prints in the log the parameter and loop on all parameters to print their names and value:

Driver.Parameters("AdapterName")="XYZ"

print Driver.Parameters("AdapterName") ! will print: XYZ

vParameters=Driver.Parameters()        ! store all parameters and names to a variant

for i=0 to VarDimSize(vParameters, 0)-1

print "Parameter Name="; vParameters[i][0]; ", Value="; vParameters[i][1]

next

Applies to

ADriver, AProgram

See Also

AProgram.Parameters, InterfaceInfo