09-23-2024 03:28 PM
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}
Solved! Go to Solution.
09-23-2024 04:11 PM
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 . . .
09-23-2024 04:17 PM
Please share NI IO Trace capture to ensure your python configurations are reflected.
09-23-2024 04:19 PM
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.
09-23-2024 04:35 PM
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 . . .
09-23-2024 05:02 PM
"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 . . .
09-24-2024 05:18 PM
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.
09-25-2024 01:39 PM
09-25-2024 02:05 PM
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 . . .
09-25-2024 05:24 PM
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()