Initialize with Options
- Updated2024-11-26
- 2 minute(s) read
Initialize with Options
An option string configures the IVI driver features of state caching, range checking, simulation, status checking, and record value coercions. For instrument drivers that support a family of instruments, you can use the DriverSetup option string to set the particular model of instrument you want the driver to emulate. The IVI Engine then uses the option string settings when it runs the test application.
To enable an IVI feature, set the value to 1 in the option string. To disable a feature, set the value to 0. You do not have to specify all the properties. If you do not specify one of the properties, the session uses the default value. If you pass NULL or an empty string for the options parameter, the session uses the default values for the properties.
The following table lists IVI driver features, the corresponding strings for the option string, and the default value setting for each feature. The IVI Engine uses these default values when you do not name a feature in the option string. A comma separates each option you specify.
Feature Option | String | Default Value | Default State |
---|---|---|---|
State Caching | Cache | 1 | Enabled |
Range Checking | RangeCheck | 1 | Enabled |
Simulation | Simulate | 0 | Disabled |
Status Checking | QueryInstrStatus | 1 | Enabled |
Record Value Coercions | RecordCoercions | 0 | Disabled |
NI I/O TraceNI I/O Trace is an application that monitors, records, and displays National Instruments API calls made by applications. | Spy | 0 | Disabled |
Interchangeability CheckingInterchangeability checking verifies that the program produces the same behavior when you use it with a different instrument. | InterchangeCheck | 0 | Disabled |
Specific Instrument ControlUse the DriverSetup option to specify a specific model of an instrument you want to control. | DriverSetup | "" | "" |
For example, the option string: "Simulate=0, RangeCheck=1, QueryInstrStatus=1, Cache=1, Spy=1, InterchangeCheck=0, DriverSetup = Model:6652A" results in the following configuration:
- Instrument simulation is disabled
- Range checking is enabled
- Status checking is enabled
- State caching is enabled
- Recording of coercions of values is disabled
- NI I/O Trace is enabled
- InterchangeCheck is disabled
- Control of the HP 6652A model
Refer to the IVI Driver Help for more information about IVI driver feature options.