Hello all, for a college project im interfacing an Arduino Mega 2560 with Labview (using a serial connection and the VISA toolkit).
The sketch i have running on the arduino will simply respond with a line of information whenever it sees a byte at the port, but I've been having an intermittant problem that i thought had solved itself!
The problem is that sometimes the Arduino will not respond to the byte (in this case "a") being sent from labview. The rx light on the arduino will always blink when the message is sent but it never sends anything back. Sometimes the LED on pin 13 will be lit up when this is happening (would this indicate that the board is being reset?). I cant find anything wrong in my labview code as it has worked flawlessly in the past and the weird thing is that i can open up a serial terminal straight after trying labview and the arduino will respond to commands no problem.
Anyone got any ideas?
If you open the serial port in LABview the Arduino could be resetting.
Try to search the (old) forum for something like "Arduino reset serial port" or similar, that shold give you a solution.
It would also be a good idea to post your code.
well disabling reset with a resistor between 5v and reset fixed it, thanks for the help :)
Very interesting and handy to know; what value did you use and is there a reference on this method somewhere? Thanks.
After some thinking I've come to the conclusion that LabView's serial drivers must have been doing something weird with the flow control lines (even though I had flow control turned off) causing the arduino to reset.
I may look into manipulating the flow control lines in labview in the future (its definitely possible) but for now im happy having something that just works!
in LabVIEWInterface.h set “DEFAULTBAUDRATE 57600”
and so in your VI.