Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-DCPwr ignores IVI DriverSetup String set in NI MAX

Hi everyone,

I want to specify the simulated instrument Model in the "Driver Setup" field in NI MAX. In NI MAX I gave the Driver Setup as follows:

Model:4137

I then create an instance by calling the `IviDCPwr_init` function. However if  I then query the `IVIDCPWR_ATTR_INSTRUMENT_MODEL` attribute, I see that the option was ignored and only a 'NI PXI-4110' was created instead of the 4137.

 

What am I doing wrong?

 

(The only workaround I found is to I use the `IviDCPwr_InitWithOptions` function and pass the option string as a parameter. But I want to be able to configure the options in NI MAX.)

0 Kudos
Message 1 of 5
(3,137 Views)

Just create the simulated device in devices and interfaces


"Should be" isn't "Is" -Jay
Message 2 of 5
(3,097 Views)

Although this is a workaround, I see several drawbacks to the method of creating a simulated device and assigning it as a hardware asset in the IVI Driver session:

 

1. It is only needed for the NI-DCPwr driver, hence different from other drivers and confusing. (So far I tested one other NI driver (NI-DMM) and a couple of drivers of other vendors. All others behaved as expected when giving a DriverSetup string in NI MAX.)

 

2. The configuration happens outside of the IVI Configuration Store, which kind of breaks the "have only one source to manage your instruments" that the IVI Configuration Store provides.

 

3. The workaround only works for devices for which NI MAX provides the possibility to create simulated devices. This is only a very small subset of devices usually encountered in the lab.

 

4. It only works if NI MAX is used as tool to manage the IVI configuration store.

0 Kudos
Message 3 of 5
(3,088 Views)

I’ve attached a NI-DMM Simulated Devices article below that offers another solution of initializing the instrument in LabVIEW.

 

NI-DMM Simulated Devices: http://digital.ni.com/public.nsf/allkb/3C7A39FCA065E46D862572C900712938

 

Does this seem like it would be a more suitable workaround for your application?

 

ShaneK

Applications Engineering

0 Kudos
Message 4 of 5
(3,075 Views)

Hi Shane,

thanks for the tip, but both solutions given in the article have the issue that they potentially break interchangeability:

 

The first method given in the article is the same like Jeff mentioned earlier.

 

The second method also is problematic if you switch to another instrument because the syntax of the Driver Setup is not standardized. For example to simulate a certain model, NI instruments expect something like "Model:4130", while a Keithley driver expects "Model=MODEL 2450".

 

I will file a bug report about the issue because to me it clearly looks like unintended behavior that the DriverSetup string from the IVI Configuration store is ignored (especially since the issue only occurs with the NI-DCPower driver, and not to other drivers like NI-DMM, or other vendor's drivers.)

0 Kudos
Message 5 of 5
(3,068 Views)