Digital Multimeters (DMMs) and Precision DC Sources

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting MeasureWhen causes an error

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

 

 

0 Kudos
Message 1 of 4
(1,761 Views)

I also tried setting dcPowerSession.Outputs["0"].Measurement.MeasureWhen and got the same error.

0 Kudos
Message 2 of 4
(1,758 Views)

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!

markshancock_0-1659064638854.png

0 Kudos
Message 3 of 4
(1,752 Views)

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.

Marcos Kirsch
Chief Software Engineer
NI Driver Software
0 Kudos
Message 4 of 4
(1,710 Views)