how to connect and run stepper motor using Matlab GUI
Ältere Kommentare anzeigen
good day everyone,
i was wondering if anyone could help me out here..
i was trying to run my matlab GUI to connect to my driver motor and to my stepper motor but this error always comes out when i press the button connect:
??? Error using ==> serial.fopen at 72 Port: COM1 is not available. Available ports: COM3. Use INSTRFIND to determine if other instrument objects are connected to the requested device.
Error in ==> GUI_xyplotter>connect_m1_Callback at 83 fopen(obj1);
Error in ==> gui_mainfcn at 96 feval(varargin{:});
Error in ==> GUI_xyplotter at 16 gui_mainfcn(gui_State, varargin{:});
Error in ==> @(hObject,eventdata)GUI_xyplotter('connect_m1_Callback',hObject,eventdata,guidata(hObject))
??? Error while evaluating uicontrol Callback
does anybody knows what's wrong with the code and the solution to it?..ur help will be greatly appreciated..thanks a lot
Akzeptierte Antwort
Weitere Antworten (1)
fremond khoo
am 6 Mär. 2011
0 Stimmen
12 Kommentare
Walter Roberson
am 6 Mär. 2011
instrfind is a matlab routine, documented here: http://www.mathworks.com/help/techdoc/ref/instrfind.html
just type
instrfind
at the matlab prompt to get a list of the serial ports and the status of each. If COM1 shows up as 'open' then it is already in use by your program.
fremond khoo
am 8 Mär. 2011
Walter Roberson
am 8 Mär. 2011
Odd, especially considering it told you COM3 was available. But perhaps it just doesn't have a COM3 object created.
fopen() is what is used to change the status of a com object to open.
fremond khoo
am 8 Mär. 2011
fremond khoo
am 8 Mär. 2011
Walter Roberson
am 8 Mär. 2011
Sorry, your message either did not arrive yet or it did not have a Subject that distinguished it; I may have accidentally flushed it as spam. Please be sure to use a clear Subject on any email sent to me.
Walter Roberson
am 8 Mär. 2011
Hint: "hi" is not a clear Subject. I get numerous spam messages a day with a subject of "hi" or "hello".
fremond khoo
am 8 Mär. 2011
Walter Roberson
am 8 Mär. 2011
It reached me this time.
fremond khoo
am 8 Mär. 2011
fremond khoo
am 10 Mär. 2011
vishal Verma
am 2 Apr. 2014
Could you plz tell me how you ran your motor using MATLAB GUI? Is there a sample code I can look at? Thanks!
Communitys
Weitere Antworten in Power Electronics Control
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!