Labjack Ei1050 T7 Ljm Example Code Anywhere


Recommended Posts

Just started connecting parts to a T7.  Basic channel stuff I have all figured out, but I'm looking for examples of the interface to the EI1050 temperature/humidity probe from LabJack, which on the U series was eput and eget.   I am also looking for the way to read the internal temperature on a T7.

Link to comment
Share on other sites

If you connect it in the default configuration and use FIO3 for the enable, you just need to read registers SBUS3_TEMP and SBUS3_RH:

 

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

 

There are 2 planned ways to allow this in DAQFactory, but AzeoTech will have to comment further on this:

 

1.  When you define a channel in the Channel Table View, for I/O Type you can type in any register name you want.

 

2.  In script you can use eReadName to read the register.

 

 

For the internal temperature sensor, you can just read AIN14 and do the math yourself, or you can read the registers TEMPERATURE_AIR_K and TEMPERATURE_DEVICE_K:

 

http://labjack.com/support/datasheets/t7/internal-temp-sensor

Link to comment
Share on other sites

Internal temp worked fine, thanks.

 

I connected the ei-1050 in the default setup FIO0-3, but in DAQFactory channel config table from the workspace, the IOType combo box limits selection to what is in the list and the list stops at POWER_AIN, so I can't just put the register name SBUS3_TEMP in there.  In a script, eReadName would come from a using or include file I'd guess like labjackud.dll or similar.  Any idea what that would be?

Link to comment
Share on other sites

Yes, the I/O type is limited based on the settings in one of the LabJack provided files.  Eventually we hope to allow you to enter a name directly, but that involves quite an internal change in how I/O types are stored, so its not going to happen real soon.  In the meantime, you can just use eReadName.  You DO NOT need an include file like you did with UD devices.  All you do is pass a string, the same way you would if you were calling the LJM's C function.  So something like:

 

private temp = eReadName("10.0.0.3", "SBUS3_TEMP")

 

assuming your device was at the IP 10.0.0.3

Link to comment
Share on other sites

The sensor is connected in the default config on a T7 with IP 10.1.1.80

GND    Ground (black)
FIO0    Data (green)
FIO1    Clock (white)
FIO2    Power (red)

FIO3               Enable ProbeA (brown)

 

doing  ?eReadName("10.1.1.80", "SBUS3_TEMP") from the command line does nothing, I don't get an error or a value.  I've tried the device serial number as well, with the same result.  Does the T7 automatically set the FIO2,3 to power and enable the probe?  I created those as channels with type FIO# on 2 and 3 and tried as well but no change.

Link to comment
Share on other sites

That's better, it is communicating with the T7, but now I get:  Read error with LabJack M: SHT1X_COMM_TIME_OUT or Read error with LabJack M: SHT1X_NO_ACK.

 

It was working just before I moved it off the U3 (where I ran into the using device.labjackUD issue), and I'm sure it's wired in right on the T7.  Does the T7 somehow know to set FIO2 and 3 high for this, or should I do that?

Link to comment
Share on other sites

In ljm_constants.json I see "fwmin":1.0056 for the SBUS constants.  Do you have firmware 1.0056 or higher?  I suggest you go ahead and use the latest beta version (1.0071 as of this writing):

 

http://labjack.com/support/firmware/t7/beta

 

If it still does not work try using LJLogM instead of DAQFactory.

 

 

Does the T7 somehow know to set FIO2 and 3 high for this ...?

 

 

The T7 will set FIO2 to output-high.  See the descriptions here:

 

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

 

In particular see SBUS#(0:22)_TEMP and SBUS_ALL_POWER_DIONUM.  The fact that you are using SBUS3_TEMP is telling the T7 to use DIO3 as the enable line.

Link to comment
Share on other sites

Firmware_Version reports: 1.001700043678.  So that's either pretty old or you dyslexed the 17 to 71.  ?

 

I'm using the FIO0-3 terminals on a CB37 board attached to the T7, so that should be the right DIO3.

 

I guess I could test with LJLogM for wiring and hardware but I have a giant DAQFactory application that must be made to work with this.

Link to comment
Share on other sites

Survey sez: Pretty old firmware was it.  I took it out of the box new a week ago, and firmware was as you said 1.0017.  It upgraded quickly and easily to 1.0071, and immediately worked after that with 

device.LabjackM.eReadName("10.1.1.80", "SBUS3_TEMP").

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.