Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

Read EI1022 conn to AIN via low-level functions


  • Please log in to reply
2 replies to this topic

#1 RedSpanner

RedSpanner
  • Members
  • 37 posts

Posted 27 August 2012 - 06:03 PM

Hi Folks, I'm re-writing LabjackPython scripts to use low level codes to access an instrumentation cluster with a bunch of temp sensors on it, including an EI-1034. The EI-1034 device is connected for low-temp operation, as discussed in your datasheet, with +5 and Vm- for power. It's signal line is connected to AIN4. Given this is a bipolar configuration, I look at Table 2.7.2-1 in the UE9 user manual and assume gain = 1. I'm trying to capture this measurement, then tweak it via a "binaryToCalibratedAnalogVoltage()" method, to get a calibrated voltage I can convert to a temperature. I do call the "getCalibrationData()" method earlier in the script. For comparison purposes, I'm also using the Modbus "readRegister()" method to test this, and here is where the confusion ensues. My code follows below: [codebox] print(d.getCalibrationData()) print 'Initialization ...Done\n' print d.feedback() print "Now testing individual temp read from AIN4..." rawVolt = d.getAIN(4, BipGain = 0x01, Resolution = 17, SettlingTime = 5) print rawVolt calVolt = d.binaryToCalibratedAnalogVoltage(rawVolt, 0x01) print "The outside temp sensor AIN4, as det by low level functions, is %f" % calVolt #Alternative way to try to get calibrated reading to compare to d.feedback() AIN4_reg = 8 Vout = d.readRegister(AIN4_reg) print "The outside temp sensor AIN4 reads: %f from register read" % Vout [/codebox] Here are the results from running the script. [codebox] Now testing individual temp read from AIN4... 0.712454345798 The outside temp sensor AIN4, as det by low level functions, is -0.011635 The outside temp sensor AIN4 reads: 0.712729 from register read $ [/codebox] You'll see that rawVolt (supposedly uncalibrated voltage) closely matches the register-delivered (calibrated) data, while the corrected data, calVolt, is inaccurate. Clearly, I'm missing something here. Can you folks enlighten me? Cheers, Red

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 28 August 2012 - 01:01 PM

The getAIN method returns the calibrated voltage, so your getAIN and readRegister voltages should be similar values. binaryToCalibratedAnalogVoltage should not be used on a voltage from getAIN. It should be used on raw voltages (binary) from the singleIO and feedback methods.

#3 RedSpanner

RedSpanner
  • Members
  • 37 posts

Posted 29 August 2012 - 12:46 PM

OK -- After I saw the results, I thought it might be something like that. Thanks for the confirmation! Dean


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users