LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 5001

Hello,

My LABVIEW code is quite Simple. The basic idea of my project is to power 120 LED's (4 rows and 30 Columns) I use arduino to control 34 switches (each swicth controls a single row or a column).
Ive written a LABVIEW code (using a boolean function) which allows arduino to give out 5V or 0V (this powers the switch) which inturn lights the rows/columns. (circuit attached)

I am using an Arduino Mega 2560. Pins 13 through 6 on the arduino powers the rows (each row has 2 swicthes, hence the 2 respectively for each switch). Pins 22 through 51 power the columns.
When I connecte arduino with just pins 13 to 6 and pin 22 (for a single column) the code works, the LED's turn on and off, but when I connected all the pins (23-51) I get an error

Error 5001 occurred at LabVIEW Interface for Arduino.lvlib:Check For Pin Out Of Range.vi.  The digital pin selected does not exist on the specified board or is in use (pin 0 and 1 are reserved for communication with LabVIEW)

After I stop the "Adruino Close" function flashes once. (The code in itself does not show any error (no broken arrows).

What am I doing Wrong and how do I back track my steps to find my mistake?

I did attach portions of my code. I hope it helps

. Fullscreen capture 11-Feb-14 81901 PM.bmp.jpg

photo 1 (3).JPGphoto 2 (3).JPG

P.S I am completely new to LABVIEW.

Thanks.

0 Kudos
Message 1 of 9
(11,309 Views)

I remember that there once was a bug in LIFA for Arduino Mega 2560 where it didn't recognize all of the digital pins.  This has since been fixed so I would recommend that you check to see if you have the latest version of LIFA.

0 Kudos
Message 2 of 9
(7,203 Views)

Great. Thanks. I will check for that.

0 Kudos
Message 3 of 9
(7,203 Views)

Also, I had a question, if LIFA for Arduino 2560 doesnt recognize all the digital pins, then why does the LABVIEW code that usually works when just pin 13 to 6 are connected suddenly stops working altogether? Do all the pins have to be recognized for the code to work? Is there any way to figure out which pin is not being recognized??

0 Kudos
Message 4 of 9
(7,203 Views)

Everytime that you use a digital/analog read or write, LIFA checks to see if that pin exists (as defined in the LIFA code for that particular board).  If it doesn't think it exists then it outputs an error.  If you have your LIFA VIs properly wired together, then all subsequent VIs will not execute because they are designed to only execute if there is no error.  If you enable highlight execution, you can follow the error wire values as the functions execute.  You'll notice that once you get an error, that same error just propagates through subsequent LIFA VIs.

If you dig into the code of the digital write VI you'll see how it all works (it should be pretty straight forward).  If you dig further and go into the pin check VI, you can see what pin numbers are considered valid.  Verify that it shows 54 (I think that's the number of pins) in that VI for the Mega.

0 Kudos
Message 5 of 9
(7,203 Views)

Nathan,

I checked the LIFA version. It's 2.2.0.79. I am not sure as to where I can check for the latest version for LIFA.

Help?

Thank You.

0 Kudos
Message 6 of 9
(7,203 Views)

You use VIPM to check for the different versions of LIFA.  The version that you have is the last version.

The only thing that I can recommend that this point, if you are still receiving this error, is to verify that the pins are properly being checked.  I describe this in the second paragraph of post #4.

CheckPins.PNG

0 Kudos
Message 7 of 9
(7,203 Views)

Thank you for your help

It did do what you recommended and figured it out. It seemes to be working now.

0 Kudos
Message 8 of 9
(7,203 Views)

Hello Someone solved the problem with Erro-5001 e Erro-5005 am with this problem and installed all Arduino Interface LabView drivers but I can not connect.

I am using Arduino Duemilanove and LabView 2013

LabView01.jpg

LabView.jpg

0 Kudos
Message 9 of 9
(7,203 Views)