Trouble reading multiple EI-1050's with one T4 | LabJack
 

Trouble reading multiple EI-1050's with one T4

6 posts / 0 new
Last post
Kevin Sekeres
Kevin Sekeres's picture
Trouble reading multiple EI-1050's with one T4

Hello,

I wrote some code in C# (see attachment) to read 2, EI-1050 probes following the instructions for hardware connections and register commands per 13.5 SBUS [T-Series Datasheet]. 

Black wires - GND

Green wires - FIO4

White wires - FIO5

Red wires - FIO6

Right probe brown wire - FIO7

Left probe brown wire - EIO0

The function returns the initialized 0.0 for both rH and temp values which tells me it never read the probes and it throws an exception. What am I missing? Thanks for the help

Kevin

LabJack Support
labjack support's picture
Hello Kevin,

Hello Kevin,

Maybe it is just not in the code chunk you sent, but it does not look like you set your clock(white wire), data(green wire), or power(red wire) line dio numbers. Since you are sharing data, clock, and power lines you could write the SBUS_ALL_DIONUM registers or you could also set these individually for each SBUS#.  please look at the register listing section of the SBUS datasheet page: https://labjack.com/support/datasheets/t-series/digital-io/sbus .

You will also want to toggle the enable (brown wire) lines depending on which sensor you want to read since this determines which sensor can write data to the data line. Set the enable line you are not going to read to 0, set the enable line of the sensor you are going to use to 1.

I would also move your code to open and close the device out of your ReadSensor function, just open once at the start of the program and close at the end.

 

Kevin Sekeres
Kevin Sekeres's picture
Hi,

Hi,

Thanks for the advice, will make sure to keep the LJ's connection open and pass the handle around by value once this problem is resolved.

I added the SBUS register configuration function calls and probe enable set lines to my code per your reccomendations but it's still not working. Based on the documentation in pages 4 and 5 of 13.5 SBUS data sheet, it sounds like they don't need to be managed when using the default settings?

The wires are still in the same positions mentioned before.

I need to resolve this quickly, could you please make the necessary corrections to my code or provide an example of your own C# syntax to make this work with 2 probes?

Thanks again!

~Kevin 

LabJack Support
labjack support's picture
The enable lines do need

The enable lines do need toggled when there are multiple sensors using the same data line, otherwise the probes could try using the data line at the same time, which could cause a jumbled data line reading on the T4.

What errors are you seeing? is it just not changing the output value from your 0 initialization or is there an actual error being thrown?

Your syntax looks ok to me. I would recommend checking all of your wiring and maybe try running our EI-1050 lua example with the kipling built in lua editor for each of your sensors to make sure everything looks like it is working correctly. I have not tried reproducing the error in C# yet, I need to do some setup to get C# going, but I have a lua example working with two sensors in your setup, so I attached that script below.

File Attachment: 
Kevin Sekeres
Kevin Sekeres's picture
Makes sense, thanks for

Makes sense, thanks for clarifying this.

I removed the try catch statements and that revealed an SBUS_COMM_TIME_OUT error, so the EI-1050 isn't responding. My function was returning the initialized value of 0, confirmed the connections were good.

I checked the probes and tested each one individually which revealed one of 2 is broken but it's been in use for almost 2 years and resides in a humidity chamber where the rH levels reach supersaturation i.e. > 100%. Pulled the probe apart, it's pcb is oxidized with water deposits.

We just placed an order for replacements from you guys, can we conformal coat these new boards to extend their life assuming we'd have to use masking tape to protect the Sensirion rH sensor? 

Thanks again for all your help!

LabJack Support
labjack support's picture
I believe we have used

I believe we have used conformal coating on some temperature sensors before and I know that the Sensirion SHT3x probe I was fiddling with had a coating around it, so I would expect a conformal coating to be fine around this sensor.

This is one of the coatings we have used before:

 
It may also be worthwhile to contact Sensirion for suggestions on protecting the sensor itself.