More driver info

This section contains different information that is good to know for a user of this driver.

 

Configuration channels

The channel attribute PI40IV_ATTR_IS_CONFIGURATION_CHANNEL specifies if the channel is available for external connections or if the channel is internally used for path creation.

 

If this attribute is set to VI_FALSE (which is default), then the channel is considered a standard channel and can be explicitly connected to another channel. If the value is set to VI_TRUE, then the channel is no longer accessible to the user and has been turned over to the driver for its use.

 

The purpose of this attribute is to tell the driver what channels are available for path creation.  For example, if the user specifies a column-to-column connection in a matrix, it typically must use at least one row channel to make the connection.  Specifying a channel as a configuration channel allows the instrument driver to use it to create the path.

 

Notice that once a channel has been configured as a configuration channel, then no operation can accept this channel name except for pi40iv_GetAttribute and pi40iv_SetAttribute for this attribute only.

 

Note:

If you connect a path from x1 to y1 to x2 with the pi40iv_SetPath function you need to set y1 as a configuration channel.

 

Example:

viCheckErr(pi40iv_SetAttributeViBoolean (vi, "y1", PI40IV_ATTR_IS_CONFIGURATION_CHANNEL,VI_TRUE));

viCheckErr(pi40iv_SetPath(vi, "x1->y1,y1->x2"));

 

Otherwise the SetPath function will fail.

 

Prefix info - IviSwtch or pi40iv

All IVI driver attributes and functions have a prefix. When the prefix is pi40iv it means that the driver is called directly from the test program. If IviSwtch is used as a prefix then the driver is called through the switch class driver. This is necessary for the testprogram to optain interchangeability. To use the switch class driver, a virtual instrument need to be created, see more below under "Created IVI samples in NI MAX".

 

Created IVI samples in NI MAX

When running the installer program a Pickering sample device is created in National Instruments MAX. Under IVI Instruments in NI MAX an entry in Instrument Drivers, Logical Names and Virtual Instruments is created. To use your switch configured here you need to also add an entry for Devices (under IVI Instruments). You then need to choose the created device for your virtual instrument entry. Also the correct driver optionstring need to be added for the virtual instrument.

 

The virtual instrument is given a logical name, this is the name you call when using the switch class driver. The switch class driver uses this to determine which driver dll to call. In our case this is pi40iv32.dll which is the Pickering PXI IVI driver dll.