adamreeve / npTDMS

NumPy based Python module for reading TDMS files produced by LabView

Home Page:http://nptdms.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support half-bridge type I (10188) strain gauge configuration

BockiBock opened this issue · comments

Hey community,

thanks for creating such a helpful library. I use this often to work on tdms-files for voltage measurements.
To read the files, I use this kind of code:


from nptdms import TdmsFile
tdms_file = TdmsFile.read("C:/Users/Desktop/DDMS.tdms")
group = tdms_file.groups() 
channel = group[0].channels()

Q1 = channel[0][:]

When I try to read strain gauge files I get the following error:

Exception: Strain gauge configuration 10188 is not supported

Unfortunately, I could not find any solution so far. Did anyone else had a similar problem before?
Thanks for your help in advance.

Linking related discussion: #266

Currently only full bridge type I is implemented, support for half-bridge type I (10188) requires implementing the computation of strain from the measured voltage.

Awesome, thanks Tom, I'll make sure to integrate this into the library.

Hi @BockiBock, I've now merged this to master and added the other strain gauge configurations as well. The equation I ended up with is slightly different to yours and more closely matches the output from LabView. The gain_adjustment only multiplies the whole strain value, and I've included the extra 2 (Vo / Vex) (1 - ν) term that makes the equation non-linear.

npTDMS/nptdms/scaling.py

Lines 243 to 249 in b4396c7

# In the half bridge type I configuration:
# R1 = R2 = R0
# R3 = R0 (1 + ε ν G)
# R4 = R0 (1 + ε G)
# Which gives Vo = [(1 - ε ν G) / (2 + ε G - ε ν G) - 1/2] Vex
# Rearranging for strain:
# ε = -4 (Vo / Vex) / [G (1 + ν + 2 (Vo / Vex) (1 - ν))]