From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -363011 on I2C MyRIo

Hi,

 

I am brand new to labview so sorry if this is a stupid question, but I am attempting to use my rio to control a I2C device, but I am running into a problem. Using the code attached, I get error -363011 at error 3 onwards, which says:

"LabVIEW myRIO:  A No Acknowledge (NAK) bit was received from the slave device after the last address transmission."

 

I don't understand why I am not getting an acknowledgment signal, which I assume has something to do with the code but I do not understand labview enough to know what I have done wrong. I have included the I2C protocol I am trying to code 

 

Thanks

Andrew

Download All
0 Kudos
Message 1 of 4
(2,276 Views)

Hey Andrew,

Would you be so kind to attach you actual VI? It's easier to go from there to help you. Also, can you share a link to the documentation of your I2C device? Or, if it is not public, at least the name+model?

 

Looking at your screenshot, I had several ideas on what could go wrong (cannot verify any without your hardware, sorry):

  • Check the actual bytes you are sending. Your string will currently be "X:0.0", and your byte array will have 5 bytes. So no termination character or length information. Your device's manual should state what it expects.
  • The screenshot of the manual shows a read function - you are trying to write data. Did you attach the correct function?
  • If so, the multi-byte read of your device seems to expect a 1-byte register address written (instead of a 5-byte "X:0.0") to define the register to read. HAd you already tried that?

Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
Message 2 of 4
(2,243 Views)

Hi,

 

Thanks for the reply. The screen shot of the Vi wasn't the actual version I was running as I was trying to play around with the register address to get it to work and screenshotted a incorrect version. The one byte version in on the attached Vi. This should give a one byte register address, but when used still brings up the same issue at error 3.

 

I was attempting to use the write function as I thought that was the correct way to write the register address for the multi-byte read? I have attached the datasheet for the device. 

 

Thanks for your help,

Andrew

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

Sorry I don't think the Vi Attached

0 Kudos
Message 4 of 4
(2,231 Views)