Reading EI-1050 Sensor with T7 | LabJack
 

Reading EI-1050 Sensor with T7

3 posts / 0 new
Last post
Martin Towers
Martin Towers's picture
Reading EI-1050 Sensor with T7

Are there any examples of Python code to read the EI-1050 temperature/humidity sensor?

LabJack Support
labjack support's picture
Currently no.

Currently no.

To get you started, take a look at the Python examples:

https://labjack.com/support/software/examples/ljm/python

They will demonstrate using the LJM library through Python, and generally how to write and read Modbus registers (eWriteName and eReadName to easily start with) on the T7.

Take a look here for the Modbus registers to use for the EI-1050, included general examples which are language independent:

https://labjack.com/support/datasheets/t7/digital-io/sbus

If you run into issues, describe your EI-1050 to T7 connections and show us the code you are using, and we can help further.

Martin Towers
Martin Towers's picture
Thank you,

Thank you,

and thanks to

http://forums.labjack.com/index.php?showtopic=7067

This works for me:

# To read the EI-1050 probe with T7
# Probe is wired BK-GND, GN-F100, WT-F101, RD+BN-F102
# Python 2.7.11

from labjack import ljm

# Open first found LabJack
handle = ljm.openS("T7", "ANY", "ANY")

# Call eReadName to read the serial number from the LabJack.
name = "SERIAL_NUMBER"
result = ljm.eReadName(handle, name)

print("\neReadName result: ")
print("    %s = %f" % (name, result))

temperature = ljm.eReadName(handle,"SBUS22_TEMP")-273.15
humidity = ljm.eReadName(handle,"SBUS22_RH")

print(temperature)
print(humidity)