Adapting code from U3/U6 to T7 | LabJack
 

Adapting code from U3/U6 to T7

7 posts / 0 new
Last post
User79
marc.legree's picture
Adapting code from U3/U6 to T7

Hello,

I have attached a LabView code that works fine with U6/U3 and SHT75 sensirion temperature/humidity sensor.

I would like to be able to use this sensor with my new U7 module.

I am not quite sure which example code I should use. Do you have any advice?

Thanks.

User

File Attachment: 
LabJack Support
labjack support's picture
Start with "EI-1050 probes

Start with "EI-1050 probes using default configuration:" under Examples here:

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

Connect your probe as described there, and you don't have to do any configuration:

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

Now all you have to do is read the registers SBUS3_TEMP and SBUS3_RH.  An easy way to do that is "LJM_eReadNames Example.vi".

 

User79
marc.legree's picture
Thank you for your quick and

Thank you for your quick and detailed answer. It worked immidiately.

I should've mentionned I need to connect ten SHT 75 sensors (same I2C adress) just I like I did with the U6 and U3 using the DIO.

Is that possible with the LJM_eReadNames Example.vi ? I can't figure out where I can change FIO0/FIO1 to FIO2/FIO3 to add another SHT75 sensor.

User

LabJack Support
labjack support's picture
You want to see "EI-1050 with

You want to see "EI-1050 with custom configuration (separate Data/Clock):" under Examples:

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

You will need to do some writes.  For initial testing just use "LJM_eWriteNames Example.vi" to do your config, then use "LJM_eReadName Example" to read from 1 sensor.  Moving beyond that, "LJM_eNames Example.vi" will let you write and read in a single call:

https://labjack.com/support/software/api/ljm/function-reference/ljmenames

 

User79
marc.legree's picture
I have followed your advice

I have followed your advice and everything works fine. Many thanks!

I have a last question regarding the follow up of my future bench tests that use U3/U6/U7 modules and the fact that Sensirion has stopped producing the SHT75 and has replaced it by the SHT85 that has gone full I2C. Is there is any Labjack example (ideally in Labview) compatible with this SHT85 sensor?

Regards,

User

LabJack Support
labjack support's picture
There are LabVIEW examples to

There are LabVIEW examples to read data from the LJTick-DAC I2C based EEPROM for the U3/U6/T4/T7 devices in the respective Example Code/Wrappers section of our website that should help you get started with I2C communication. 

User79
marc.legree's picture
Thank you very much for all

Thank you very much for all your help.

Best regards,

User