07-28-2022 10:08 PM
When I set MeasureWhen (1150057) to AutomaticallyAfterSourceComplete (1025) using AdvancedPropertyAccessService.SetAttributeInt32 I get the error.
Ivi.Driver.SelectorNameException: ModularInstruments.NIDCPower: ModularInstruments.NIDCPower: IVI: (Hex 0xBFFA0045) The channel or repeated capability name is not allowed.
Attribute: NIDCPOWER_ATTR_MEASURE_WHEN, Channel: 0
Error code: -1074134971
--- End of inner exception stack trace ---
at NationalInstruments.ModularInstruments.NIDCPower.Internal.DCPowerImpl.CheckErrorStatus(UInt32 handle, Int32 status)
at NationalInstruments.ModularInstruments.NIDCPower.Internal.DCPowerImpl.TestForGeneralErrorAndWarning(Int32 status)
at NationalInstruments.ModularInstruments.NIDCPower.Internal.DCPowerImpl.TestForErrorAndWarning(Int32 status)
at NationalInstruments.ModularInstruments.NIDCPower.Internal.DCPowerAdvancedPropertyAccessServiceImpl.SetAttributeInt32(Int64 attributeIdentifier, String repeatedCapability, Int32 value)
at NationalInstruments.ModularInstruments.AdvancedPropertyAccessService.SetAttributeInt32(Int64 attributeIdentifier, String repeatedCapability, Int32 value)
Note: I am also seeing the error: Could not find assembly: Ivi.Driver.resources.dll
I have not been able to find that dll
07-28-2022 10:12 PM
I also tried setting dcPowerSession.Outputs["0"].Measurement.MeasureWhen and got the same error.
07-28-2022 10:19 PM
Looking at the NI example code, I found it was setting Session.Measurement.Configuration.MeasureWhen
This is not consistent with the documentation that says MeasureWhen is channel-based; but, it works!
08-01-2022 05:34 PM
> This is not consistent with the documentation that says MeasureWhen is channel-based; but, it works!
New documentation probably assumes you are using "independent channels" which is a different and now default usage model introduced in newer NI-DCPower releases.