NI Home > Community > NI Discussion Forums

LabVIEW

Reply
Member
abon27
Posts: 1
0 Kudos

Any LabView Example code of using NI USB-8451 to write/read data from i2c device?

Looking for a quick Top level example Labview Code to be able to read/write to i2c SEEPROM devices using an NI USB-8451 as a controller.
Knight of NI
Posts: 18,064
0 Kudos

Re: Any LabView Example code of using NI USB-8451 to write/read data from i2c device?

I've never used that device, as we opted for the much cheaper U2C-12 made by Diolan. I would have thought that examples would have shipped with it. You can start by looking at this KB article: http://zone.ni.com/devzone/cda/tut/p/id/4692
Member
Meghan R
Posts: 140
0 Kudos

Re: Any LabView Example code of using NI USB-8451 to write/read data from i2c device?

[ Edited ]
Hello abon27,

There are some great examples in the Example Finder (LabVIEW Help Menu»Find Examples).  Select Hardware Input and Output, then I2C and SPI (see the picture below).

If you need futher help getting started programming, the NI 845x Software Users Manual has some very good information.  In particular for your needs, take a look at Chapter 5 in that manual, it details the LabVIEW API implementation of I2C. 



Let me know if you have any other questions,

Meghan R
Applications Engineer
National Instruments



Message Edited by Meghan R on 07-28-2008 02:10 PM
Member
ct loh
Posts: 3
0 Kudos

Re: Any LabView Example code of using NI USB-8451 to write/read data from i2c device?

i cannot found the I2C example in labview8.2. can anyone help? 

Active Participant
jcarmody
Posts: 1,925
0 Kudos

Re: Any LabView Example code of using NI USB-8451 to write/read data from i2c device?

This is a VI I wrote to program an Analog Devices digital potentiometer (AD5172).  It worked well until a wiring mishap damaged the I2C device...  I replaced it with an Aardvark controller.

 

jm

Jim

You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
Knight of NI
Posts: 18,064
0 Kudos

Re: Any LabView Example code of using NI USB-8451 to write/read data from i2c device?

jm: the VI you posted is in 8.5, and the new poster indicated they have 8.2, so they will not be able to open your example.

 

ct loh: those examples would only get installed if you installed the software for the USB-8451. You would need to indicate during the installation to include LabVIEW support and LabVIEW examples. Have you installed this software?

Active Participant
jcarmody
Posts: 1,925
0 Kudos

Re: Any LabView Example code of using NI USB-8451 to write/read data from i2c device?

smercurio...: abon27 is the poster; ct loh specified 8.2.

 

ct loh: here's the file in 8.2

 

jm

Jim

You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
Knight of NI
Posts: 18,064
0 Kudos

Re: Any LabView Example code of using NI USB-8451 to write/read data from i2c device?


jcarmody wrote:

smercurio...: abon27 is the poster; ct loh specified 8.2.


I know. That's why I said new poster. :smileywink:

Active Participant
jcarmody
Posts: 1,925
0 Kudos

Re: Any LabView Example code of using NI USB-8451 to write/read data from i2c device?

:smileymad:Arrrrgh...  You're right!  Thanks for the :smileywink:!  I deserved worse:smileysad:...

 

jm:smileyhappy:

 

Jim

You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
Member
ct loh
Posts: 3
0 Kudos

Re: Any LabView Example code of using NI USB-8451 to write/read data from i2c device?

Hi, smercurio - Thanks, i can find the examples after i installed the driver.

Hi JM - I can not open the file the given by you. There is an error - "Labview: End of file encountered.

The file 'I2C Adjust Resistance.vi' is not a valid Labview file."

Hope you can help. Thanks.