Hello,
I am french and I work in a lab. I need to do a turbidostat and I need to use an arduino uno for it. I learn how to use is in few weeks and I am a big fan of it now...
But I have a problem I need to use it in Matlab I instaled ArduinoIO and it works find, but 6 hours and I need to run the machine for 3 days. After 4 or 6 hours Arduino is still connected but it doesn't obey, I tell him to run the pump a.analogWrite(3,255), and matlab says that it is busy and then nothing moves. I am pretty sure that Arduino UNO is fine. I disconect and reconect the Arduino it works after.
So what is the problem? Something strange is that the computer always thinks that the arduino is connected to the COM5 even if is is connected to the COM3 2 or 1. Is it a problem of the USB driver the Arduino driver?
I use windows xp. I dont have this problem on my mac, but it is MY mac and it wont stay alone in the lab.
Thank you very much Arduino community,
Not heart of it before but if it is repeatable and every time it takes 5-6 hours it looks like a memory leak.
Can you post the Arduino (and optional matlab) code ? [please use code tags it is the # button]
Hello,
same problem this night, after few hours disconnect...
The script is very long and I dont use a lot the Arduino. Just for some machines...
Before the script I tap a=arduino('COM5'); to initialize the Arduino whatever COM it put the arduino I tap COM5 Matlab recognize the arduino... The the code, (I show only the part of the Arduino)
#a.analogWrite(10, 255);
a.analogWrite(3,255);
%Leave the pumps on for one pulse
pause(60*ControlParams.TimeOfaPulse - Timetoset);
%Turn off the pumps
a.analogWrite(10, 0);
a.analogWrite(3,0);#
after few hours it stop like I said and if I order something to the Arduino like a.analogWrite(10, 255) it doesent do it and it shoes me this error message
Error in arduino/analogWrite (line 670)
fwrite(a.aser,[52 97+pin val],'uchar');
I personally think that it is problem of the installation of ArduinoIO on Matlab but I am not sure and I don't know how to check it... In informatic I am just level 5 or 6 I need more xp... XD
It can be a problem of the memory but how can I be sure? And how to solve it?
Thanks again
Another thing when this problem happens, I try to reconnect it and Matlab gives me this message:
I tap "clear a" to disconect the Arduino then I try to reconect and that doesn't work...
a=arduino('COM5');
The port COM5 is already used by MATLAB
If you are sure that Arduino is connected to COM5
then delete the object, execute:
delete(instrfind({'Port'},{'COM5'}))
to delete the port, disconnect the cable, reconnect it,
and then create a new arduino object
Error using arduino (line 54)
Port COM5 already used by MATLAB
I have no idea what the problem is...
I'm meeting the same problem. If I figure out, I'd let you know.
....your post was March 29. 2013... sorry.
and have you figured out?
Yes I figured out by myself, I Uninstal windows and reinstall it after... It was a program that blocked it.
It worked fine after, You can also find the program that makes this problem but you might loose a lot of time.