Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

NI USB-8451 I2C: Error -301700: Insufficient memory to complete the requested operation.

Solved!
Go to solution

Hi,

 

I’m pretty new to Labview. I’m trying to develop a vi that can send a customized I2C sequence. I bought a USB-8451. The examples that come with the device are working fine. To be able to test another application (a I2C system build in a FPGA) I would like to have a Labview GIU where the user can compose his/her own I2C sequence to meet the requirements of the device that needs to be addressed.

I used the advanced examples as a base and got the writing part working with a random nr of bytes and random content to write correctly. The read part doesn’t work in any possible way and I’m getting a bit confused about why. I’m struggling for a few days and now I need the help of an expert ;-).

When I press the send button the I2C sequence is supposed to be executed once. But instead I get the error message: “Error -301700 occurred at NI-845x I2C Script Issue Stop.vi:4 Insufficient memory to complete requested operation”. I tried to replace the I2C components in different parts of the diagram but it keeps giving me errors (and a headache). I searched the forum but couldn’t find anything about the error that helped. Can somebody give me a hand with this problem? If further info is needed feel free to ask and get back to you a.s.a.p.

 

Thanks in advance!

Jan-Willem.

 

PS:I’m sorry if the diagram looks like a mess, it’s still in (early) debugging mode.

Download All
0 Kudos
Message 1 of 4
(5,792 Views)

Hello Jan Willem,

 

thank you for your post on our webforum. I'm sorry to say that I'm not a I2C expert, but there are some examples available with the example finder. I looked to some examples from I2C, and the one thing that caught my attention was the fact that there is a delay after writing. Please review the example in the example finder under; hardware in and output => I2C => I2C basic write. There is also a note in the block diagram; Note2:  For multiple page writes if Error -301742 occurs increase the delay time to allow the EEPROM to transfer the data.

 

I hope this will help you further, if not, please try to run the examples and see if this works. Try to work from the examples.

 

Have a great weekend, best regards,

Martijn S
Applications Engineer
NI Netherlands
0 Kudos
Message 2 of 4
(5,736 Views)
Solution
Accepted by J-Weetje

Hi Martijn,

 

Thanks for your reply. I think I need to apologize for the fact that I found the mistake myself in 5 minutes when I had a look at my VI the day after I posted this question. I've completely forgotten to write a bit of feedback to the forum for other people who are facing this problem in the future. I had a good look on all the examples provided with the USB-8451 before I asked my question on this forum.

 The mistake I made lies in the part where I assign a variable amount of bytes to "num bytes to read" from the "NI-845x I2C Script Read.vi". I was trying to create an element from an array which was an array of just 1 element long/big. The result of this is always zero when the number fed into the "Index Array" index pin is >0 since there's no element 1 or higher in this array. The "NI-845x I2C Script Read.vi" generates the error mentioned and the vi doesn't work when “num of bytes to read” is zero. See the attached picture with the mistake highlighted. Thanks for your time.

 

Regards,

Jan-Willem.

 

 

Message Edited by J-Weetje on 04-20-2009 02:28 AM
0 Kudos
Message 3 of 4
(5,703 Views)

Dear Jan Willem,

 

thank you for your feedback.

 

Best regards,

Martijn S
Applications Engineer
NI Netherlands
0 Kudos
Message 4 of 4
(5,685 Views)