02-07-2020 08:58 AM
Hey guys. I've only used labview for about 2 months so please bear with me if it is something simple I overlooked. I'm trying to get 8 Sensiron SHTW2 through a TCA9548A multiplexer using the I2C bus on a NI USB-8452. All the sensors have the same address (0x70) I'm just cycling through the multiplexer addresses (Decimal values: 112-119 to indicate sensor 0-7) I've attached the code for reading the sensor/multiplexer. The data screenshots are from my Main VI.
When I have a sensor isolated without the multiplexer and remove the section of code labeled "Address Multiplexer" the code works fine.
When I attach the multiplexer and try to address individual sensors I start getting the same data for each sensor repeated every second.
Thanks in advance! These forums have helped me a ton these last two months.
02-10-2020 12:48 AM
Hi Kevin,
Without seeing the Main VI, I'm tempted to guess at one of the following (numbered for reference, not importance or probability):
02-11-2020 10:12 AM
Thanks for the suggestions! The multiplexer has the same address as the other sensors 0x70. When I thought I was writing to the sensor to specify the temp/humidity reporting style I was actually writing to the multiplexer a second time and opening a bunch of channels. Then when I was reading from the sensor it was giving me junk data. I was able to add a dab of solder to the multiplexer board to change the address to 0x71 to prevent this issue. Then I added a run script after I addressed the multiplexer and wrote the command bit for which sensor I wanted to read. I can read all 8 sensors now and have no more issues.
Thanks for the help! If anyone is interested I can post the snippet of code. I saw there was a lot of confusion around these guy on the forums.
11-12-2021 02:18 AM
Hi Kevin1701
Could you please Share the snippet.
thanks,