Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NiDaqmx + Python. Perform Bridge Offset Nulling Calibration.

I am working on a research project with multiple devices that require python, so I am trying to set a Load Cell to finally sync everything, but "Perform Bridge Offset Nulling Calibration" has been a headache. This is the script that is running without the bridge calibration:

 

import nidaqmx
import matplotlib.pyplot as plt

plt.ion()
i = 0
with nidaqmx.Task() as task:
task.ai_channels.add_ai_force_bridge_two_point_lin_chan('cDAQ1Mod1/ai0','LoadCell50kips',min_val=-5000,max_val=5000,voltage_excit_val=10,nominal_bridge_resistance=350,first_electrical_val=0,second_electrical_val=3,first_physical_val=0,second_physical_val=50000)
task.timing.cfg_samp_clk_timing(1000,sample_mode=nidaqmx.constants.AcquisitionType.CONTINUOUS) # Hz
while i < 10:
try:
data = task.read(number_of_samples_per_channel=1)
plt.scatter(i,data[0])
plt.pause(0.1)
i+=1
print(data)
except:
continue

 

Any suggestions or examples will help!

 

Daniel 

0 Kudos
Message 1 of 1
(55 Views)