Which Version of the Modular Instrument Driver Is Compatible With the Python API?

Updated Aug 7, 2023

Reported In

Driver

  • NI-DCPower

Issue Details

  • I keep getting a device error saying that the function I am trying to use does not exist.
  • DriverTooOldError: A function was not found in the NI-DCPower runtime.
  • DriverError: -1074135023: IVI: (Hex 0xBFFA0011) Function or method not supported.
  • I have a code that worked with an older version of the API but when I updated to the latest one I got errors.

Solution

New driver versions maintain API compatibility to work with old Python API versions. Python APIs should work with old versions of the driver as long as you don't use new features of the driver. The behavior of certain API versions may be modified to take advantage of the latest driver features which may alter the functionality of your code if you do not have the latest version of the driver installed. For example, creating a nidcpower.Session with independent channels requires NI-DCPower driver runtime 20.6.0 or later. In order to use with older runtime or to maintain old behavior, pass independent_channels=False to nidcpower.Session constructor, otherwise you will encounter an error.

Additional Information

Find more information about the recent API changes in the CHANGELOG file in the nimi-python repository.