Showing results for 
Search instead for 
Did you mean: 

NI 8451 error -301742

Ok so the problem was hardware my I2C connector was not working properly so I don't receive the error anymore. Now when I do run the VI with the correct parameters. All values I read are 0.. when I use the original TI Software all EEPROM registers have non 0 values.


Any idea as to why this is happening?

Download All
0 Kudos
Message 11 of 23

Have you tried to read another register than 0x00 ?


Your screenshot doesn't show the relevant part of the array because the index selector is set to 10. As expected, this part of the array is empty. Could you show the first elements of the array, starting from 0 ?

0 Kudos
Message 12 of 23

I have figured out that you have to keep the index value at 0 in order to read the EEPROM Values. 

The BQ7710A device with which I am communicating has 10 EEPROM registers. In my VI, I only can input the starting EEPROM address and I am able to read only its contents. What would be the best way to read EEPROM values from 1 to 10 without manually changing them? 


I have attempted to change the width of my table for the single EEPROM address but I just get an array filled with the same values. 


Copying and pasting the same functions is working out but I don't want to do it 10 times. I also want data to be collated in one single table. 


What are your recommendations?

0 Kudos
Message 13 of 23

You could use a loop to read the registers one by one or use the "num bytes to read" to read them all at once.


What do you want to do exactly ? Write AND read each of the ten registers ?

In your example, you only set the starting address but don't write any data.

0 Kudos
Message 14 of 23

Yes ideally I would like to make a VI which can handle both writing and reading. The one I uploaded is just a starting point and there are still lot of things I want to add on including script addressing. 


I tried changing the num bytes to read but sadly it is the value of one register which is displayed several times.


What is the best solution to write and read in 10 EEPROM registers? Is a loop the best solution or anything better exists?

0 Kudos
Message 15 of 23

Do you get the expected data from registers 1 to 10 if you run the attached VI ?

Message 16 of 23

Yes absolutely! This is great, thanks so much. 

Would this work for writing also?


I still have to familiarize myself with the flowchart of the BQ77910A and the steps needed before writing. 

0 Kudos
Message 17 of 23

I encourage you to have a look at the I2C examples which install with LabVIEW.

Doing so, I have just learned some points. There are richly documented and instructive.


You have to write 2 VIs, on to write the registers and one to read them. The examples how this can be done.

0 Kudos
Message 18 of 23

This VI should read the registers without using a loop. Let me know if it works.

0 Kudos
Message 19 of 23

The for loop is needed to read all the register otherwise I just see an array filled with one byte value. 

Download All
0 Kudos
Message 20 of 23