ni / semi-test-library-dotnet

Semiconductor Test Library
https://ni.github.io/semi-test-library-dotnet/
MIT License
3 stars 2 forks source link

[BUG] SetupNIDCPowerInstrumentation Returns Run-Time Error With Certain Instruments In Offline Mode #154

Closed Mattjet27 closed 3 weeks ago

Mattjet27 commented 3 weeks ago

Description When attempting to run a test program in offline mode, which uses a PXI-4110 programmable power supply defined in the pin map, an error will occur at run-time when invoking the SetupNIDCPowerInstrumentation TestStandStep method.

This occurs only in Offline Mode when selecting PowerLineCycles as Aperture Time Units for the input parameter to the SetupNIDCPowerInstrumentation method, and there is a niDCPower instrument which does not support the PowerLineFrequency property such as the PXI-4110 programmable power supply.

Screenshots image

Expected behavior The SetupNIDCPowerInstrumentation method should be usable regardless of running in Offline Mode or not.

System Setup(please complete the following information):

Resolution As of the Semiconductor Test Library 24.5.1 release, the Utilities.TryDeterminePowerLineFrequency method has been updated to support being used in OfflineMode. Note that the Utilities.TryDeterminePowerLineFrequency method is the underlying method used by the SetupNIDCPowerInstrumentation TestStandStep method. Upgrading to STS Software 24.5.1 provides users with the updated SetupNIDCPowerInstrumentation method implementation out-of-the-box. In lieu of being able to upgrade, please refer to the workaround below.

Workaround This issue can be worked around by ensuring that the value passed into the PowerLineFrequncy input of the SetupNIDCPowerInstrumentation and SetupNIDMMInstrumentation TestStandSteps in ProcessSetup of the test program sequence file are passed a numeric TestStand local that can be set via a proceeding TestStand statement step to be either: -1 when not in OfflineMode, or 60Hz (or 50Hz) value when in OfflineMode. Note that the OfflineMode Boolean flag can be retrieved by the TSM Get Test Information Step; note that this step should already be present in the ProcessSetup sequence if the project sequence was created from STS Project Creation Tool using STS Software 24.5.0 or later.