Support for Multiple Sessions Using IVIDCPwr API with NI-DC Power

Updated Oct 31, 2022

Reported In

Driver

  • NI-DCPower

Issue Details

I am trying to communicate with a PXIe-4112 and use each channel in an independent session using the NI IVIDCPwr drivers, but when I open a session for the second channel it seems to be closing the first session. 

Solution

When using the IVIDCPwr API, NI-DCPower only supports opening a single session to the entire device. NI has worked around this limitation by creating the NI-DCPower Initialize with Channels, and more recently NI-DCPower Initialize with Independent Channels.

The general NI recommendation is to use NI-DCPower Initialize with Independent Channels, as it allows many features that the IVI specification does not cover (e.g. channel-based sessions and Advanced Sequences). If using the IVIDCPwr API is a requirement, then only a single session can be opened to the entire instrument.

NI's implementation of the IVI drivers have strict resource management rules. This is not meant to be a limitation, but rather to enable the programming model to have greate control over performance and removes ordering dependencies. This allows for reducing glitches and better performance among other benefits.