LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I2C interface (Sensor Data Acquisition) LabVIEW

Hi all! Hope you are doing great! Well I have a question which is more about asking all you for an idea! The Situation: I have a circuit board which has an On-Off Valve, Digital pressure sensors (manufacturer AMD) and Humidity/Temperature Sensors (make- IST Hygrosens). On the board all the sensors communicate as I2C slave devices and all the data from the sensors is read into an I2C --> USB adapter chip which further connects to the PC via normal USB cable. Additional to this board, There is a Relay circuit with a simple 1-pole relay which controls an on-off valve on the above Circuit board. This valve is controlled totally separate via a coaxial cable from the relay directly to the Valve. But the relay board has a I2C interface and it also acts as a slave device. The relay board has the same I2C --> USB adapter chip. Both the Relay board and Sensor board connect via USB to the PC which I suppose is the Master device. The software code written for this arrangement and Sensor data acquisition is too old and there are a lot of problems coming. I have almost given up troubleshooting.. :( I now want to translate this automation system onto LabVIEW. I searched the NI website where there is a DAC card called - USB8451 which supports I2C interface... I am a beginner in LabVIEW and cant really make sense out of how should I go about implementing this system on LabVIEW.. If you guys can please help me out to atleast start (like what all hardware I would need etc..), to have a clear picture, it would be great help!! :) Looking forward to your inputs and Thank you so much in advance! Cheers! Pramit
0 Kudos
Message 1 of 4
(3,835 Views)

Hello Pramit!

 

From my interpretation, it sounds like the I2C --> USB adapter chip that you are referring to is an on-board device, and that you connect PC USB to board USB.  If this is the case, then you could potentially develop a solution without requiring additional hardware by writing a LabVIEW program that communicate with the device over USB.

 

I am not experienced with the USB8451, but looking at it, it is a device for connecting PC USB directly to the device's I2C bus itself.

 



0 Kudos
Message 2 of 4
(3,826 Views)

Hi Vitan!

 

That is definitely great help to start! 🙂

But I believe that we need specific drivers for specific devices for communication LabVIEW.. is that true? If yes, can you guide me how can I look for device drivers of my choice in LabVIEW?

 

Warmest Regards

 

Pramit

0 Kudos
Message 3 of 4
(3,802 Views)

NI provides a LabVIEW API for the USB8451.  If you use the USB8451, you would use the provided API to write a program that controls the USB8451 and you would do all of the I2C communication in your program.  This would mean using functions / SubVI's to connect to the USB8451 and then perform I2C operations through it.

 

If you use USB already on your device, then you would probably use NI-VISA as the driver and have to get / write your own API to talk to the specific device.  The manufacturer may have a LabVIEW (or other) API available for talking to the device that you could get.  If not, then you would have to understand the details of how to communicate with the device and then write an API using NI-VISA serial functions.  This would mean making NI-VISA be the assigned driver for the device and then using VISA Serial functions / SubVI's to send the messages and receive the responses.



Message 4 of 4
(3,790 Views)