Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting I2C data

Hi,

 

I m currently having a project that require me to get data from an I2c device (HMC5883L Magnetometer) using an I2C to Usb connection (http://www.robot-electronics.co.uk/htm/usb_i2c_tech.htm). Im pretty new to labview and wonder if anyone can help me with it! 

Thanks!

 

 

0 Kudos
Message 1 of 8
(4,682 Views)

You need to build or find a driver in LabVIEW.

This driver can use VISA to communicate with the I2C master chip and that one does the I2C handling for you. Essentially ou need a cmd to write to a chip and a read to get data from the chip

 

You also need a higher level driver for each type of I2C chip that you want to commnicate with.

You could skip this part but then you will be duplicating stuff for the next chip.

In this driver you decide what you write and what you expect from the chip. Handling of hese reads and writes does the higher level.

 

greetings from the Netherlands
0 Kudos
Message 2 of 8
(4,660 Views)

There is also a USB to I2C device from National Instruments that has it's own driver and API. Here is a link to a guide for it. 

https://www.ni.com/en/support/documentation/supplemental/21/using-i2c-with-labview-and-the-usb-8451....

 

Michael H

0 Kudos
Message 3 of 8
(4,625 Views)

Hello Michael

Great that retired NI people are really working on answers, but questions from 2016 are pretty useless after 8 years. The 8451 is not a real cheap solution and has speed problems but works mostly as expected if 8 bit values are sufficient.

greetings from the Netherlands
0 Kudos
Message 4 of 8
(986 Views)

@Albert.Geven wrote:

Hello Michael

Great that retired NI people are really working on answers, but questions from 2016 are pretty useless after 8 years. The 8451 is not a real cheap solution and has speed problems but works mostly as expected if 8 bit values are sufficient.


Not to mention the USB-8451 is no longer sold.  You will have to get a USB-8452, which does have a lot of improvements over the 8451.  But at the moment, I think I would just get a Raspberry Pi Pico for $5 and program it to do the I2C and pass the data back and forth.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 8
(972 Views)

completely agree

greetings from the Netherlands
0 Kudos
Message 6 of 8
(956 Views)

@Albert.Geven wrote:

Hello Michael

Great that retired NI people are really working on answers, but questions from 2016 are pretty useless after 8 years. The 8451 is not a real cheap solution and has speed problems but works mostly as expected if 8 bit values are sufficient.


I think you got spooked by the migration bot that updated the original message that was created within a day of the original post. My guess is that the migration bot is a tool that automatically goes through posts to update links to relocated Knowledge Base posts, which would be quite a useful tool, as I hate dangling links in posts because the Knowledge Base database got relocated.

Rolf Kalbermatter
My Blog
0 Kudos
Message 7 of 8
(932 Views)

Thanks Rolf, that explains the number of messages by migration bot

greetings from the Netherlands
0 Kudos
Message 8 of 8
(923 Views)