Digital Multimeters (DMMs) and Precision DC Sources

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Input Resistance on the PXI-4071 using nimi-Python for niDMM

Solved!
Go to solution

The LabVIEW NIDMM Property Node will set the input resistance on the NI 4071 to >10GOhms.

Using the following, does NOT 

 

import pyvisa
import nidmm
import time

NI4071 = nidmm.Session("NI4071")
NI4071.configure_measurement_digits(nidmm.Function.DC_VOLTS, 10, 7.5)
NI4071.input_resistance = 1000000000.0
NI4071.adc_calibration.ON
NI4071.auto_zero.ON
NI4071.settle_time = 2
NI4071.dc_noise_rejection.HIGH_ORDER

NI4071.initiate()
for i in range(1, 10001):
t = (str(NI4071.get_dev_temp()))
print(str(i) +', ' + t + ', ' + str(NI4071.read()))
NI4071.close()

 

Using SFP, I can set the input resistance as needed. {see photo}

0 Kudos
Message 1 of 10
(426 Views)

NI I/O Trace of Python script.

6. niDMM_SetAttributeViReal64 (NI4071 (0x00000002), "", NIDMM_ATTR_INPUT_RESISTANCE (0x00118C4D), 1E+10)
Process ID: 0x00002914 Thread ID: 0x00001E84
Start Time: 13:51:27.0502 Call Duration 00:00:00.0000
Status: 0 (VI_SUCCESS)

 

Sure looks like it set the attribute . . .

Now I wonder why SFP gives different readings between 10Meg and >10G?

 

27. niDMM_Read (NI4071 (0x00000002), -1 (0xFFFFFFFF), 9.922156 (9.922156E+00))
On >10G 9.925564

Hmmmm . . .

 

0 Kudos
Message 2 of 10
(407 Views)

Please share NI IO Trace capture to ensure your python configurations are reflected.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 3 of 10
(403 Views)

So, it does look like the 10G input resistance is indeed configured, please compare the SFP's IO Trace and replicate to obtain the same results.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 4 of 10
(401 Views)

TEST program

NI4071.initiate()
NI4071.input_resistance = 10000000000.0
for i in range(1, 11):
t = (str(NI4071.get_dev_temp()))
print(str(i) +', ' + t + ', ' + str(NI4071.read()))
NI4071.input_resistance = 1000000.0
for i in range(1, 11):
t = (str(NI4071.get_dev_temp()))
print(str(i) +', ' + t + ', ' + str(NI4071.read()))
NI4071.close()

 

TRACE calls

Hi Ohms niDMM_SetAttributeViReal64 (NI4071 (0x00000002), "", NIDMM_ATTR_INPUT_RESISTANCE (0x00118C4D), 1E+10)
Lo Ohms niDMM_SetAttributeViReal64 (NI4071 (0x00000002), "", NIDMM_ATTR_INPUT_RESISTANCE (0x00118C4D), 1E+10)

Same call gave same readings, from quite different code instructions. Looks like a bug; walks like . . .

0 Kudos
Message 5 of 10
(395 Views)

"So, it does look like the 10G input resistance is indeed configured, please compare the SFP's IO Trace and replicate to obtain the same results. "

NOPE, they are not the same:

Choose 10Meg and DMM SFP calls for "1E+07"

Choose >10GOhms and DMM SFP calls for "1E+10"

And there is a difference in the measurements.

 

Hello Marcos . . .

0 Kudos
Message 6 of 10
(388 Views)

The attached text file shows 3 calls to configure NIDMM_ATTR_INPUT_RESISTANCE:

 

6. niDMM_SetAttributeViReal64 (NI4071 (0x00000002), "", NIDMM_ATTR_INPUT_RESISTANCE (0x00118C4D), 1E+10)

24. niDMM_SetAttributeViReal64 (NI4071 (0x00000002), "", NIDMM_ATTR_INPUT_RESISTANCE (0x00118C4D), 1E+10)

87. niDMM_SetAttributeViReal64 (NI4071 (0x00000002), "", NIDMM_ATTR_INPUT_RESISTANCE (0x00118C4D), 1000000.000000 (1.000000E+06))

 

Your test program only shows two. There are other inconsistencies. I don't think the attached text files corresponds exactly with the test program.

 

Would you mind attaching a full Python test program that reproduces the issue, and the exact I/O Trace calls emerging from that?

 

My guess given the information provided is that you are running into a reconfiguration bug in the 4072 driver and can be worked around simply, but I am not sure yet.

Marcos Kirsch
Chief Software Engineer
NI Driver Software
0 Kudos
Message 7 of 10
(303 Views)
Solution
Accepted by Sparks!
Hi Marcos and thread,
Well, the only difference between the code {below 09.40.07} that ‘worked’ and the prior submission was the use of ‘1e+10’ instead of 10000000000.0
Then I tested using ‘10000000000.0’ and that worked (of course it would. {trace: 09.40.42) so perhaps removing code unrelated to this test?? I’ll check.
AND, the code {10.08.43} that combined the VDC reading and the thermistor did not set the input_resistance to >10GOhms.
That is a new can of worms, so I’ll post the code that worked and the trace with a ‘caution’ that there is work-in-progress . . . .
 
Thanks to all for your support,
Donal
Donal
 

 

0 Kudos
Message 8 of 10
(279 Views)
Solution
Accepted by Sparks!

Put in YOUR for-loop:

NI4071.input_resistance = 1e+10

Volts71 = str(4071.read())

 

That works for me in a script that accesses two meters: one for DC_VOLTS and the other for TEMPERATURE. Use the 'Volt71' as needed, change the name etc.

 

WHEW . . .

0 Kudos
Message 9 of 10
(274 Views)

I looked at one of the screenshots (!) of your code. The forum supports codeblocks, much better.

 

import pyvisa
import nidmm
import time

## (Marcos) It's best practice to use the context manager (`with` statement)
## so that your session is automatically closed.
NI4071 = nidmm.Session("NI4071")
NI4071.configure_measurement_digits(nidmm.Function.DC_VOLTS, 10, 7.5)

## (Marcos) After calling configure_measurement_digits, the driver will handle
## all the low level settings in order to accomplish 7.5 digits. Don't set those
## yourself you are unlikely to get the desired results.

# (Marcos) This is non sensical. You aren't setting the value of the property.
NI4071.adc_calibration.ON

# (Marcos) This is non sensical. You aren't setting the value of the property.
NI4071.auto_zero.ON

NI4071.settle_time = 2

# (Marcos) This is non sensical. You aren't setting the value of the property.
NI4071.dc_noise_rejection.HIGH_ORDER

# (Marcos) If you use read(), then don't initiate(). Just call read().
# initiate() is typically used with triggering and/or multi-point or waveform 
# modes.
NI4071.initiate()

NI4071 input_resistance = 1e+07
print (NI4071.input_resistance)

for i in range(1, 2):
   print(str(i) +', ' + str(NI4071.read()))

NI4071.input_resistance = 1e+10
print (NI4071 input_resistance)
for i in range(1, 2):
   print(str(i) +', ' + str(NI4071.read()))

NI4071.close()

  

Marcos Kirsch
Chief Software Engineer
NI Driver Software
0 Kudos
Message 10 of 10
(251 Views)