Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Specifying Driver Options for IVI Instrument at Initialization

Primary Software: Instrument Drivers/IVI
Primary Software Version: N/A
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I am developing an instrument driver for my instrument.  I open the session using a logical name and I want to be able to change the driver's behavior based on the Driver Options specified in the Virtual Instrument settings, but I don't know how to access that value from within the instrument driver. How can I do this?

Solution:


The IVI engine stores the Driver Options in the Driver Setup attribute (IVI_ATTR_DRIVER_SETUP). Use Ivi_GetAttributeViString to retrieve the options and use them in your driver.

The functionality for the IVI_ATTR_DRIVER_SETUP attribute is described below:

Data Type: ViString 
Restrictions: Read-only, hidden from user

Some cases exist where the user must specify instrument driver options at initialization time. An example is when a user specifies a particular instrument model from among a family of instruments that the driver supports. Specification of driver options at initialization time is useful when using simulation. The user can specify driver-specific options through the DriverSetup keyword in the optionsString parameter to the Prefix_InitWithOptions function. If the user opens an instrument session by passing a logical name, the user also can specify the options in MAX.

The default value is an empty string.

This information, along with information on other attributes, can also be found in Chapter 2 of the document linked below.  More information on IVI Drivers can be found in the linked On-Demand training modules below.



Related Links:
Product Reference: Measurement Studio LabWindows/CVI Instrument Driver Developers Guide
On-Demand Training: IVI Fundamentals I - What Are IVI Drivers? (SSP required)
On-Demand Training: IVI Fundamentals II - Why Use IVI Drivers? (SSP required)

Attachments:





Report Date: 12/06/2002
Last Updated: 05/01/2009
Document ID: 2S5D2FPG

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit