LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Mega 2560 - 5002 error

Hi,

This is probably not the correct thread for your question but since it is already here....

I just learnt all these thing last year and wouldnt have gotten far without the help of the people on this forum so I thought I would tell you. If anyone in the forum knows this is incorrect or needs to be added to please do so. I am guessing as you read the post by KSouza and are posting further questions that you need the steps involved. Both KSouza and Kevin F are right use a relay it is much easier than using a transistor or darlington circuit. It does depend on what you mean connect a wire together however these wires are connected to somthing and this will determine what relay you use or whether it is suitable to use a relay at all.

To interrface the arduino to a relay:

connect your wire through the relay.

Connect the input of the relay to a digital output pin.

Set the the digital pin as an output in LIFA

To either disconnect or connect the wire set the output of this pin to high or low

Things to check:

If the ground of the circuit you are making is not grounded to the arduino you will get nothing.

The arduino digital pin puts out 25mA so you need to make sure your relay can be driven by this current, obviously also check it is the right voltage and amps for whatever your wires are connected to.

Relays can induce EMF so you may need a protection diode across the coils of the relay to protect the arduino.

If you are using it for logic you may find that a relay might not be the best option because of switch bounce causing it to disconnect and reconnect for a short period of time creating adding problems. In this instance a darlington circuit which is just multiple transistors connected together would be a better option.

Message 41 of 61
(1,787 Views)

Thank you so much!

I will try again and I hope success.

0 Kudos
Message 42 of 61
(1,787 Views)

Hey Guys,

I'm using the Mega 2560 R3 board and am struggling to make communication with labview and the arduino.

I am getting the 5002 error message.

I have tried setting the wait time in the INT.vi to 10 seconds, syncing baud rates, confirming with MAX that the com put is "working", using driect controls for the VISA inputs.

Everything on this forum I have tried, its seems everyone is having inconsistant results with respect to a resolution.

Can anybody throw out anymore idea, I'm pulling my hair out lol.

Additionally, back to the basics my device manager recognizes that the Arduino drivers are installed (COM5). Also, right before I recieved the 5002 error the RX light on the arduino board is blinking fast.

Thanks,

Mike

0 Kudos
Message 43 of 61
(1,787 Views)

Hi,

I have a Adruino Mega 2560 R3

I installed driver for it and embeded some programs, it runs so well.

Nextly, I try to install LIFA but there are some problems need you solve with me.

They are:

andCai LIFA.PNGLIFA.PNG

I use Labview 2009SP1, with VISA.

Would you like to help me?

Have a great day!

0 Kudos
Message 44 of 61
(1,787 Views)

Regarding the relay. Why don't you use these http://www.emartee.com/product/41894/ i got them up and running in my project.

0 Kudos
Message 45 of 61
(1,787 Views)

Off topic from my issue that im having but I have to say that I have used the relay module krillin has suggested and they work great... you can also find them on amazon.

0 Kudos
Message 46 of 61
(1,787 Views)

Thank you Sammy_K, I'm so glad to find this discussion. I didn't use the LIFA, but simply try to bridge communication with ardunio through VISA. I had success in MAX, but not with the LV example "Basic Serial Writed and Read.vi", and my problem indeed was the delay time. From various reading, it seems like every time labview configure the VISA port, the arduino need quite some time (900 ms to be precise in my case) before ready to receive any commands. So by adding a delay right after VISA configure solved my problem.

0 Kudos
Message 47 of 61
(1,787 Views)

New update works flawlessy for the Mega!


Good work guys!

0 Kudos
Message 48 of 61
(1,787 Views)

All,

We (Mostly Just Kevin) just released an update to the toolkit that should resolve the dreaded error 5002 on the MEGA 2560. 

Huge thanks to RyanNaz for shipping us his board that reproduced the error (for some reason ours didn't).

-Sam K

LIFA Developer

0 Kudos
Message 49 of 61
(1,787 Views)

Thank YOU!

I installed on my desktop yesterday and I hade the same problem 5002. Got it running on my laptop today and it worked.

The weird thing is that I have the same toolkit version on both.

I will re-install on the deskop and update.

0 Kudos
Message 50 of 61
(1,787 Views)