LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview-Arduino Uno I2C close Error 5004

We are trying to get our data from our Adafruit BNO055 IMU connected to an Arduino Uno board into our LabView code using Linx, we are getting a 5004 error message saying that the Uno does not support the I2C close function. We believe it may be a communication error as we had the same code working yesterday. We have tried using the Linx firmware wizard to reconnect but it has not been working.

 

In this code we are trying to pull acceleration data into a graph on the front panel. We are able to get a premade "blink" VI to work using the same hardware.

 

Any help would be great

Malachy4_0-1616708816615.png

 

Message 1 of 5
(2,239 Views)

I've also encountered a similar problem but haven't been able to figure it out. An solution would be appreciated

0 Kudos
Message 2 of 5
(2,230 Views)

Are you getting errors on all 3 of your close VIs or just 1? It doesn't seem a good idea to try and close the same reference 3 times.

 

Also, you are setting up your I2C VIs to run in parallel, however they are communicating with the same address and I'm guessing Linx works by transmitting UART data over the USB cable? If so, you could be causing problems by not calling them one after the other, plus they might need waits in between. Chances are the VIs are non-reentrant, but you never know.

 

Unfortunately, I can't check any of the VIs you are using at the moment.

 

When you say that it hasn't been working using the Linx Firmware wizard, does that mean you can't upload your sketch to your Arduino?

0 Kudos
Message 3 of 5
(2,174 Views)

We are getting the error on all three close VI's. I will try to condense them into one close. 

 

We have them in parallel so that we get the X, Y, and Z data at the same time but will look into changing that also to get results. 

 

As for the Linx Firmware, we have been able to upload our sketch to the Arduino, what we have been trying to do is re connect our Arduino to LabView under the Makerhub tab in tools. 

 

Thank you for the response I will try some of your suggestions now

 
0 Kudos
Message 4 of 5
(2,167 Views)

I2C is a serial bus, you will not be able to execute commands in parallel while using it.

 

My LV just finished re-installing and if you read the documentation for the I2C Close.vi, it says that it closes the specified I2C channel and most Arduino devices do not support this feature. It's meant for myRIO and similar, that have multiple I2C channels.

 

So just remove both instances of that VI as you don't need it.

0 Kudos
Message 5 of 5
(2,155 Views)