本文介绍了使用NI-845x将I2C设备连接至Labview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过质量传感器将SFM-3000质量流量传感器连接到使用USB设备NI-8452的PC上的Labview,该设备提供I2C接口.

I'm trying to connect a mass flow sensor, SFM-3000 by sensorion, to labview on PC using USB device, NI-8452, which provide I2C interface.

我遵循了传感器的用户手册,并通过labview使用了I2C示例,但是我无法在它们之间建立通信

I followed the user manual of the sensor and used I2C example by labview but I cannot establish communication between them

我收到错误消息:

我正在使用包含上拉电阻的NI-8452,并确保通过启用填写在"NI-845x设备"属性节点中的使用内部I2C上拉电阻"来启用它们.我将I/O电压电平设置为3.3,

I'm using NI-8452 that include pull up resistor and I make sure to enable them by enabling 'Use Internal I2C Pullup Resistor' filled in 'NI-845x Device' property node.I set I/O voltage level to 3.3,

我仔细检查了地址,我的设备的用户手册中定义了7位地址,即64 dec或1000000二进制.

I double check the address, I have 7 bit address defined in user manual of my device, 64 dec or 1000000 binary.

按照设备用户手册中的规定,我从NI-8452的第40引脚提供了5v的Vdd,在第7引脚提供了GND.引脚5的走外SDA和引脚9的SCL.

As specified in my device user manual, I provide it Vdd of 5v from NI-8452 pin 40 and also GND in pin 7.Off-course SDA in pin 5 and SCL in pin 9.

我认为上拉参考电压可能会出现问题,因为传感器指定该电压必须为5v,但NI-8452的最高使用电压为3.3V.

I think I might have a problem with pull up reference voltage because the sensor specified it need to be 5v but NI-8452 use up to 3.3V.

但是高信号的下限是2.5v,所以应该可以工作

but the low limit for high signal is 2.5v so it should work

我的图:

我尝试的另一个选项是使用I2c脚本块

another option i tried is using I2c script blocks

我也对First-Sensor的压力传感器hdi0611arz8p5尝试了类似的解决方案,但也遇到了相同的错误.

I tried similar solution also for pressure sensor, hdi0611arz8p5 by First-Sensor, but also got the same error.

推荐答案

重新布线后,它开始工作,可能是电线和端口之间的连接不良.我希望该线程可以为希望使用Labview连接sfm3000的人们提供帮助.

After re-wiring it's started working, maybe some bad connectivity between wire and port. i hope this thread could help people that wish to connect sfm3000 using labview.

这篇关于使用NI-845x将I2C设备连接至Labview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 17:41