Sie sind auf Seite 1von 23

Instituto Tecnolgico Superior de

Lerdo

INGENIERA ELECTRNICA.

Reporte de proyecto integrador.

Control de brazo robtico mediante interfaz GUIDE Matlab

Integrantes:

Jos Eduardo Limn Martnez. N Control 13231262.


Mario Alberto Lozano Martnez. N Control 13231122.
Jess Manuel Silva Hernndez. N Control 13231641.
Ixchel Hayme Vielmas Garca. N Control 13231055.
Carlos de Jess Martnez Romo N Control 13231179.
Jorge Alberto Rivera Jurez N Control 13231176.
Gustavo Moreno Reyes N Control 13231167.
Jess Eduardo Salazar Rocha N Control 13231328.

Profesor: Dr. No Alvarado Tovar.

Lerdo, Dgo. 3 de Junio del 2017


Contenido
ndice de Figuras ........................................................................................................................... 3
Introduccin.................................................................................................................................. 4
Resumen........................................................................................................................................ 5
Abstract ..................................................................................................................................... 5
Objetivo ......................................................................................................................................... 6
Marco Terico ............................................................................................................................... 7
GUIDE Matlab ......................................................................................................................... 7
Creacin de una GUI de MATLAB de forma interactiva ........................................................ 7
Creacin de una GUI de MATLAB de forma programtica .................................................... 7
Interfaz grfica de usuario ........................................................................................................ 8
Brazo robtico ........................................................................................................................... 9
Mano robtica ....................................................................................................................... 9
Tipos ...................................................................................................................................... 9
Metodologa ............................................................................................................................ 11
Desarrollo de interfaz GUIDE en Matlab. ............................................................................ 11
Resultados ................................................................................................................................... 20
Desarrollo de interfaz GUIDE en Matlab. .................................................................................... 20
Torre de estacionamiento ....................................................................................................... 21
Conclusiones ............................................................................................................................... 22
Bibliografa .................................................................................................................................. 23
ndice de Figuras
1. Diagrama de flujo para la elaboracin de una interfaz de usuario ... 8
2. Ventana de GUIDE 11
3. Herramienta de panel 12
4. Herramienta de Texto Esttico 13
5. Herramienta de Axes .. 14
6. Interfaz GUIDE finalizada . 20
7. Interfaz GUiDE en funcionamiento .. 20
Introduccin
En este proyecto se elaborar un sistema de estacionamiento mediante la ayuda
de un brazo robtico el cual ser el que tome el vehculo y lo dirija haca una
banda transportadora la cual trasladar el vehculo hasta un punto en concreto
el cual lo estar esperando un pisto hidrulico el cual se encargar de mover el
vehculo hasta un cajn donde se preparar para su destino final.

Para realizar este trabajo como anteriormente se mencion se utilizaron como


herramienta principal un brazo robtico el cual cuenta con 6 grados de libertad y
estar siendo manipulado mediante la ayuda de una tarjeta adquisitoria y
controlado por el software Matlab, este brazo ser el encargado de seleccionar
el vehculo anteriormente colocado en el estacionamiento para su traspaso haca
la banda transportadora, la cual ser manipulada con la ayuda de un
PLC(Controlador Lgico Programable) en el cual sern colocado un par de
sensores de proximidad los cuales sern lo que detecten si el vehculo ya fue
colocado en la banda para que esta misma sea activada y empiece a transportar
a el vehculo hasta el punto final donde estar colocado el ultimo sensor que
detectara si ya paso el vehculo y empezara un conteo de 5 segundos para
activar el pisto y colocar el vehculo a su destino final.
Resumen
En este proyecto se elaborar un sistema de estacionamiento mediante la ayuda
de un brazo robtico el cual ser manipulado mediante una interfaz en el
software Matlab y este mismo brazo ser el que tome el vehculo y lo dirija haca
una banda transportadora la cual, ser manipulada mediante la ayuda de un
PLC(Controlador Lgico Programable) y este mismo trasladar el vehculo hasta
un punto en concreto todo esto siendo detectados por unos sensores de
proximidad, y al final de su trayectoria lo estar esperando un pisto hidrulico el
cual se encargar de mover el vehculo hasta un cajn donde se preparar para
su destino final.

Abstract
In this project a parking system will be developed with the help of a robotic arm
which will be manipulated through an interface in Matlab software and this same
arm will be the one that takes the vehicle and directs it to a conveyor belt which
will be manipulated through The help of a PLC (Programmable Logic Controller)
and it will move the vehicle to a point in particular this being detected by proximity
sensors, and at the end of its path will be waiting for a hydraulic piston which will
be responsible for moving the Vehicle to a drawer where it will be prepared for its
final destination.
Objetivo
En este proyecto se realizara un sistema de estacionamiento autnomo el cual
tendr el objetivo de dirigir los vehculos estacionados haca una banda
transportadora la cual mover el auto del punto A al punto B donde un pistn se
accionar para colocar el vehculo en un cajn donde llegar a su destino final.

Para poder realizar este proyecto se elaborar un brazo robtico el cual ser el
encargado de sacar el vehculo del estacionamiento, en esta ocasin ya se
contaba con un brazo robtico por lo cual se omiti este paso, este brazo deber
ser controlado por una interfaz la cual deber ser elaborar con el software
Matlab en la cual se presentar cada uno de los cajones que contiene el
estacionamiento y si este est ocupado o est vaco de esta forma se podr
sacar el vehculo deseado, todo esta informacin ser precargada a una tarjeta
adquisitoria Arduino, todo este proceso se llevar para colar el vehculo en una
banda transportadora la cual ser controlada por un par de sensores en el punto
de inicio se tendr un sensor de proximidad el cual detectar cuando el vehculo
sea colocado para que de esta forma la banda empiece a funcionar, cuando el
vehculo llegue a su destino ser detectado por el ultimo sensor de proximidad y
segundos despus la banda transportadora se detendr para dar la ltima seal
al pistn el cual arrojar el vehculo a su cajn de destino, toda esta operacin
ser controlada por un PLC de marca Siemens en el cual utilizamos contactores
y temporizadores para el funcionamiento de cada dispositivo antes
mencionados, y con todas esta herramientas desarrollar el estacionamiento
autnomo.
Marco Terico
GUIDE Matlab
Las GUI (tambin conocidas como interfaces grficas de usuario o interfaces de
usuario) permiten un control sencillo (con uso de ratn) de las aplicaciones de
software, lo cual elimina la necesidad de aprender un lenguaje y escribir
comandos a fin de ejecutar una aplicacin.

Las apps de MATLAB son programas autnomos de MATLAB con un frontal


grfico de usuario GUI que automatizan una tarea o un clculo. Por lo general,
la GUI incluye controles tales como mens, barras de herramientas, botones y
controles deslizantes. Muchos productos de MATLAB, como Curve Fitting
Toolbox, Signal Processing Toolbox y Control System Toolbox, incluyen apps
con interfaces de usuario personalizadas. Tambin es posible crear apps
personalizadas propias, incluidas las interfaces de usuario correspondientes,
para que otras personas las utilicen.

Creacin de una GUI de MATLAB de forma interactiva


GUIDE (entorno de desarrollo de GUI) proporciona herramientas para disear
interfaces de usuario para Apps personalizadas. Mediante el editor de diseo de
GUIDE, es posible disear grficamente la interfaz de usuario. GUIDE genera
entonces de manera automtica el cdigo de MATLAB para construir la interfaz,
el cual se puede modificar para programar el comportamiento de la app.

Creacin de una GUI de MATLAB de forma programtica


A fin de ejercer un mayor control sobre el diseo y el desarrollo, tambin se
puede crear cdigo de MATLAB que defina las propiedades y los
comportamientos de todos los componentes. MATLAB contiene funcionalidad
integrada que le ayudar a crear la GUI para su app de forma programtica.
Cabe la posibilidad de agregar cuadros de dilogo, controles de interfaz de
usuario (como botones y controles deslizantes) y contenedores (como paneles y
grupos de botones).
Interfaz grfica de usuario
La interfaz grfica de usuario, conocida tambin como GUI (del ingls graphical
user interface), es un
programa informtico que
acta de interfaz de usuario,
utilizando un conjunto de
imgenes y objetos grficos
para representar la
informacin y acciones
disponibles en la interfaz. Su
principal uso, consiste en
proporcionar un entorno
visual sencillo para permitir
la comunicacin con el
sistema operativo de una mquina o computador.

Habitualmente las acciones se realizan mediante manipulacin directa, para


facilitar la interaccin del usuario con la computadora. Surge como evolucin de
las interfaces de lnea de comandos que se usaban para operar los primeros
sistemas operativos y es pieza fundamental en un entorno grfico. Como
ejemplos de interfaz grfica de usuario, cabe citar los entornos de escritorio
Windows, el X-Window de GNU/Linux o el de Mac OS X, Aqua.

En el contexto del proceso de interaccin persona-computadora, la interfaz


grfica de usuario es el artefacto tecnolgico de un sistema interactivo que
posibilita, a travs del uso y la representacin del lenguaje visual, una interaccin
amigable con un sistema informtico.
Brazo robtico
Un brazo robtico es un tipo de brazo mecnico, normalmente programable, con
funciones parecidas a las de un brazo humano; este puede ser la suma total del
mecanismo o puede ser parte de un robot ms complejo. Las partes de estos
manipuladores o brazos son interconectadas a travs de articulaciones que
permiten, tanto un movimiento rotacional (tales como los de un robot articulado),
como un movimiento traslacional o desplazamiento lineal.

Mano robtica
El efector final, o mano robtica, se cre para realizar cualquier tarea que se
desee como puede ser soldar, sujetar, girar, etc., dependiendo de la aplicacin.
Por ejemplo los brazos robticos en las lneas de ensamblado de la industria
automovilstica realizan una variedad de tareas tales como soldar y colocar las
distintas partes durante el ensamblaje. En algunas circunstancias, lo que se
busca es una simulacin de la mano humana, como en los robots usados en
tareas de desactivacin de explosivos.

Tipos
Robot cartesiano: Usado para trabajos de pick and place (tomar y
colocar), aplicacin de impermeabilizantes, operaciones de ensamblado,
manipulacin de mquinas herramientas y soldadura por arco. Es un robot
cuyo brazo tiene tres articulaciones prismticas, cuyos ejes son
coincidentes con los ejes cartesianos.
Robot cilndrico: Usado para operaciones de ensamblaje, manipulacin
de mquinas herramientas, soldadura por punto, y manipulacin en
mquinas de fundicin a presin. Es un robot cuyos ejes forman un
sistema de coordenadas cilndricas.
Robot esfrico / Robot polar, tal como el Unimate: Usados en la
manipulacin en mquinas herramientas, soldadura por punto, fundicin
a presin, mquinas de desbarbado, soldadura por gas y por arco. Es un
robot cuyos ejes forman un sistema polar de coordenadas.
Robot SCARA: Usado para trabajos de pick and place (tomar y colocar),
aplicacin de impermeabilizantes, operaciones de ensamblado y
manipulacin de mquinas herramientas. Es un robot que tiene dos
articulaciones rotatorias paralelas para proporcionar elasticidad en un
plano.
Robot articulado: Usado para operaciones de ensamblaje, fundicin a
presin, mquinas de desbarbado, soldadura a gas, soldadura por arco,
y pintado en spray. Es un robot cuyo brazo tiene como mnimo tres
articulaciones rotatorias.
Robot paralelo: Uno de los usos es la plataforma mvil que manipula las
cabinas de los simuladores de vuelo. Es un robot cuyos brazos tienen
articulaciones prismticas o rotatorias concurrentes.
Robot Antropomrfico: Similar a la mano robtica de Luke Skywalker que
se le coloca al final de The Empire Strikes Back. Se le da forma para que
pueda sustituir a una mano humana, p.e. con dedos independientes
incluido el pulgar.
Metodologa
Desarrollo de interfaz GUIDE en Matlab.
1.- Ingresamos al software de Matlab, dentro del software pasamos a escribir la
palabra GUIDE en el cuadro de comandos, de esta forma llamamos a la
herramienta GUIDE.

Ilustracin 2 Ventana de GUIDE.


2.- Como herramienta principal utilizamos la de panel de esta forma le podemos
dar un aspecto ms formal a nuestra interfaz y no dejarlo con un aspecto menos
cutre y tambin esta herramienta nos da muchas opciones ya que podemos
modificarla a nuestro gusto, como puede ser el color.

Ilustracin 3 Herramienta de panel.


3.- Como segunda herramienta utilizamos las de texto esttico y de esta forma
dar a entender al usuario cual es el propsito de esa interfaz y de esta forma
hacerla entendible para el usuario.

Ilustracin 4 Herramienta de Texto Esttico.


4.- Como ultima herramienta utilizamos la Axes ya que con esta herramienta
podemos agregar imgenes y de esta forma hacer la interfaz ms intuitiva.

Ilustracin 5 Herramienta de Axes.


5. Ya con la interfaz elaborada se pas a darle la funcionalidad mediante cdigo
el cual es programado en la interfaz de Matlab para que esto funcionara se tuvo
que instalar una libreras de Arduino para que la comunicacin fuera exitosa.
function varargout = integrador(varargin) % Choose default command line output for
% INTEGRADOR MATLAB code for integrador.fig integrador
% INTEGRADOR, by itself, creates a new handles.output = hObject;
INTEGRADOR or raises the existing % Update handles structure
% singleton*. guidata(hObject, handles);
% % UIWAIT makes integrador wait for user
% H = INTEGRADOR returns the handle to a response (see UIRESUME)
new INTEGRADOR or the handle to % uiwait(handles.figure1);
% the existing singleton*. % --- Outputs from this function are returned
% to the command line.
% function varargout =
INTEGRADOR('CALLBACK',hObject,eventData,handle integrador_OutputFcn(hObject, eventdata,
s,...) calls the local handles)
% function named CALLBACK in INTEGRADOR.M % varargout cell array for returning output
with the given input arguments. args (see VARARGOUT);
% % hObject handle to figure
% INTEGRADOR('Property','Value',...) % eventdata reserved - to be defined in a
creates a new INTEGRADOR or raises the future version of MATLAB
% existing singleton*. Starting from the % handles structure with handles and user
left, property value pairs are data (see GUIDATA)
% applied to the GUI before % Get default command line output from handles
integrador_OpeningFcn gets called. An structure
% unrecognized property name or invalid varargout{1} = handles.output;
value makes property application axes(handles.axes1);
% stop. All inputs are passed to imshow('tecportada.jpg');
integrador_OpeningFcn via varargin. axes(handles.axes2);
% imshow('robot.jpg');
% *See GUI Options on GUIDE's Tools menu. axes(handles.axes3);
Choose "GUI allows only one imshow('iniciales.JPG');
% instance to run (singleton)". axes(handles.axes4);
% imshow('flecha.JPG');
% See also: GUIDE, GUIDATA, GUIHANDLES c1=imread('carro1.JPG');
set(handles.pushbutton1,'CData',c1)
% Edit the above text to modify the response c2=imread('carro2.JPG');
to help integrador set(handles.pushbutton2,'CData',c2)
c3=imread('carro3.JPG');
set(handles.pushbutton3,'CData',c3)
% Last Modified by GUIDE v2.5 26-May-2017
c4=imread('carro4.JPG');
03:12:36
set(handles.pushbutton4,'CData',c4)
c5=imread('espera.PNG');
% Begin initialization code - DO NOT EDIT set(handles.pushbutton5,'CData',c5)
gui_Singleton = 1; global a
gui_State = struct('gui_Name', a=arduino('COM8');
mfilename, ... % --- Executes during object creation, after
'gui_Singleton', setting all properties.
gui_Singleton, ... function axes1_CreateFcn(hObject, eventdata,
'gui_OpeningFcn', handles)
@integrador_OpeningFcn, ... % hObject handle to axes1 (see GCBO)
'gui_OutputFcn', % eventdata reserved - to be defined in a
@integrador_OutputFcn, ... future version of MATLAB
'gui_LayoutFcn', [] , ... % handles empty - handles not created until
'gui_Callback', []); after all CreateFcns called
if nargin && ischar(varargin{1}) % Hint: place code in OpeningFcn to populate
gui_State.gui_Callback = axes1
str2func(varargin{1}); % --- Executes during object creation, after
end setting all properties.
if nargout function axes2_CreateFcn(hObject, eventdata,
[varargout{1:nargout}] = handles)
gui_mainfcn(gui_State, varargin{:}); % hObject handle to axes2 (see GCBO)
else % eventdata reserved - to be defined in a
gui_mainfcn(gui_State, varargin{:}); future version of MATLAB
end % handles empty - handles not created until
% End initialization code - DO NOT EDIT after all CreateFcns called
% Hint: place code in OpeningFcn to populate
axes2
% --- Executes just before integrador is made % --- Executes on button press in pushbutton1.
visible. function pushbutton1_Callback(hObject,
function integrador_OpeningFcn(hObject, eventdata, handles)
eventdata, handles, varargin) global a;
% This function has no output args, see motor6 = servo(a,'D11');
OutputFcn.
% hObject handle to figure for angulo=0.5:-0.01:.46
% eventdata reserved - to be defined in a writePosition(motor6,angulo);
future version of MATLAB
% handles structure with handles and user set(handles.text10,'String',(readPosition(moto
data (see GUIDATA) r6)*180));
% varargin command line arguments to pause(0.01);
integrador (see VARARGIN) end
pause(1);
motor3=servo(a,'D6');
for angulo=0.5:0.01: 1 set(handles.text8,'String',(readPosition(motor
writePosition(motor3,angulo); 4)*180));
pause(0.01);
set(handles.text7,'String',(readPosition(motor end
3)*180)); pause(1);
pause(0.01); for angulo=0.41:0.01: 0.53
end writePosition(motor5,angulo);
pause(1);
motor4 = servo(a,'D9'); set(handles.text9,'String',(readPosition(motor
for angulo=0.5:-0.01: 0.27 5)*180));
writePosition(motor4,angulo); pause(0.01);
end
set(handles.text8,'String',(readPosition(motor pause(1);
4)*180)); for angulo=0.94:-0.01:.71
pause(0.01); writePosition(motor3,angulo);
end
pause(1); set(handles.text7,'String',(readPosition(motor
motor5 = servo(a,'D10'); 3)*180));
for angulo=0.5:0.01:.69 pause(0.01);
writePosition(motor5,angulo); end
pause(1);
set(handles.text9,'String',(readPosition(motor for angulo=0.09:-0.01:.0
5)*180)); writePosition(motor4,angulo);
pause(0.01);
end set(handles.text8,'String',(readPosition(motor
pause(1); 4)*180));
for angulo=0.27:0.01: 0.39 pause(0.01);
writePosition(motor4,angulo); end
pause(3);
set(handles.text8,'String',(readPosition(motor %reposo---------------------------------------
4)*180)); ----------------------
pause(0.01); writePosition(motor1,.18);
end set(handles.text5,'String',(readPosition(motor
pause(1); 1)*180));
for angulo=0.69:0.01:.76 motor2 = servo(a,'D5');
writePosition(motor5,angulo); writePosition(motor2,.79);
set(handles.text6,'String',(readPosition(motor
set(handles.text9,'String',(readPosition(motor 2)*180));
5)*180)); writePosition(motor3,.5);
pause(0.01); set(handles.text7,'String',(readPosition(motor
end 3)*180));
pause(1); writePosition(motor4,.5);
for angulo=1:-0.01: 0.94 set(handles.text8,'String',(readPosition(motor
writePosition(motor3,angulo); 4)*180));
writePosition(motor5,.5);
set(handles.text7,'String',(readPosition(motor set(handles.text9,'String',(readPosition(motor
3)*180)); 5)*180));
pause(0.01); writePosition(motor6,.5);
end set(handles.text10,'String',(readPosition(moto
pause(1); r6)*180));
motor1 = servo(a,'D3'); pause(3);
writePosition(motor1,1); c2=imread('carro1.JPG');
set(handles.text5,'String',(readPosition(motor set(handles.pushbutton1,'CData',c2)
1)*180)); % hObject handle to pushbutton1 (see GCBO)
c1=imread('azul.JPG'); % eventdata reserved - to be defined in a
set(handles.pushbutton1,'CData',c1) future version of MATLAB
% handles structure with handles and user
pause(3); data (see GUIDATA)
%salida--------------------------------------- % --- Executes on button press in pushbutton2.
----------------------- function pushbutton2_Callback(hObject,
for angulo=0.76:-0.01:.67 eventdata, handles)
writePosition(motor5,angulo); global a;
motor6 = servo(a,'D11');
set(handles.text9,'String',(readPosition(motor for angulo=0.5:-0.01:.34
5)*180)); writePosition(motor6,angulo);
pause(0.01);
end set(handles.text10,'String',(readPosition(moto
pause(1); r6)*180));
for angulo=0.46:0.01: 0.93 pause(0.01);
writePosition(motor6,angulo); end
pause(1);
set(handles.text10,'String',(readPosition(moto motor3=servo(a,'D6');
r6)*180)); for angulo=0.5:0.01: 1
pause(0.01); writePosition(motor3,angulo);
end
pause(1); set(handles.text7,'String',(readPosition(motor
for angulo=0.67:-0.01: 0.41 3)*180));
writePosition(motor5,angulo); pause(0.01);
end
set(handles.text9,'String',(readPosition(motor pause(1);
5)*180)); motor4 = servo(a,'D9');
pause(0.01);
end for angulo=0.5:-0.01: 0.27
pause(1); writePosition(motor4,angulo);
for angulo=0.39:-0.01:.09
writePosition(motor4,angulo); set(handles.text8,'String',(readPosition(motor
4)*180));
pause(0.01);
end set(handles.text7,'String',(readPosition(motor
pause(1); 3)*180));
motor5 = servo(a,'D10'); pause(0.01);
for angulo=0.5:0.01:.69 end
writePosition(motor5,angulo); pause(1);
for angulo=0.09:-0.01:.0
set(handles.text9,'String',(readPosition(motor writePosition(motor4,angulo);
5)*180));
pause(0.01); set(handles.text8,'String',(readPosition(motor
end 4)*180));
pause(1); pause(0.01);
for angulo=0.27:0.01: 0.39 end
writePosition(motor4,angulo); pause(1);
writePosition(motor1,0);
set(handles.text8,'String',(readPosition(motor set(handles.text5,'String',(readPosition(motor
4)*180)); 1)*180));
pause(0.01); pause(3);
end %reposo---------------------------------------
pause(1); ----------------------
for angulo=0.69:0.01:.75 writePosition(motor1,.18);
writePosition(motor5,angulo); set(handles.text5,'String',(readPosition(motor
1)*180));
set(handles.text9,'String',(readPosition(motor motor2 = servo(a,'D5');
5)*180)); writePosition(motor2,.79);
pause(0.01); set(handles.text6,'String',(readPosition(motor
end 2)*180));
pause(1); writePosition(motor3,.5);
set(handles.text7,'String',(readPosition(motor
for angulo=1:-0.01: 0.92 3)*180));
writePosition(motor3,angulo); writePosition(motor4,.5);
set(handles.text8,'String',(readPosition(motor
set(handles.text7,'String',(readPosition(motor 4)*180));
3)*180)); writePosition(motor5,.5);
pause(0.01); set(handles.text9,'String',(readPosition(motor
end 5)*180));
pause(1); writePosition(motor6,.5);
motor1 = servo(a,'D3'); set(handles.text10,'String',(readPosition(moto
writePosition(motor1,1); r6)*180));
set(handles.text5,'String',(readPosition(motor pause(3);
1)*180)); c2=imread('carro2.JPG');
c1=imread('azul.JPG'); set(handles.pushbutton2,'CData',c2)
set(handles.pushbutton2,'CData',c1) % hObject handle to pushbutton2 (see GCBO)
pause(3); % eventdata reserved - to be defined in a
%salida--------------------------------------- future version of MATLAB
----------------------- % handles structure with handles and user
for angulo=0.78:-0.01:.67 data (see GUIDATA)
writePosition(motor5,angulo); % --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject,
set(handles.text9,'String',(readPosition(motor eventdata, handles)
5)*180)); global a;
pause(0.01); motor6 = servo(a,'D11');
end for angulo=0.5:-0.01:.455
pause(1); writePosition(motor6,angulo);
for angulo=0.34:0.01: 0.93
writePosition(motor6,angulo); set(handles.text10,'String',(readPosition(moto
r6)*180));
set(handles.text10,'String',(readPosition(moto pause(0.01);
r6)*180)); end
pause(0.01); pause(1);
end motor3=servo(a,'D6');
pause(1); for angulo=0.5:0.01: 1
for angulo=0.67:-0.01: 0.41 writePosition(motor3,angulo);
writePosition(motor5,angulo);
set(handles.text7,'String',(readPosition(motor
set(handles.text9,'String',(readPosition(motor 3)*180));
5)*180)); pause(0.01);
pause(0.01); end
end pause(1);
pause(1); motor5 = servo(a,'D10');
for angulo=0.39:-0.01:.09 for angulo=0.5:0.01:.67
writePosition(motor4,angulo); writePosition(motor5,angulo);

set(handles.text8,'String',(readPosition(motor set(handles.text9,'String',(readPosition(motor
4)*180)); 5)*180));
pause(0.01); pause(0.01);
end end
pause(1); pause(1);
for angulo=0.41:0.01: 0.53 motor4 = servo(a,'D9');
writePosition(motor5,angulo); for angulo=0.5:-0.01: 0.11
writePosition(motor4,angulo);
set(handles.text9,'String',(readPosition(motor
5)*180)); set(handles.text8,'String',(readPosition(motor
pause(0.01); 4)*180));
end pause(0.01);
pause(1); end
for angulo=0.92:-0.01:.71 pause(1);
writePosition(motor3,angulo); for angulo=0.67:0.01:.76
writePosition(motor5,angulo); pause(1);
writePosition(motor1,0);
set(handles.text9,'String',(readPosition(motor set(handles.text5,'String',(readPosition(motor
5)*180)); 1)*180));
pause(0.01); pause(3);
end %reposo---------------------------------------
pause(1); ----------------------
motor1 = servo(a,'D3'); writePosition(motor1,.18);
writePosition(motor1,1); set(handles.text5,'String',(readPosition(motor
set(handles.text5,'String',(readPosition(motor 1)*180));
1)*180)) motor2 = servo(a,'D5');
c1=imread('azul.JPG'); writePosition(motor2,.79);
set(handles.pushbutton3,'CData',c1) set(handles.text6,'String',(readPosition(motor
pause(3); 2)*180));
%salida--------------------------------------- writePosition(motor3,.5);
--------------------- set(handles.text7,'String',(readPosition(motor
for angulo=0.76:-0.01:.62 3)*180));
writePosition(motor5,angulo); writePosition(motor4,.5);
set(handles.text8,'String',(readPosition(motor
set(handles.text9,'String',(readPosition(motor 4)*180));
5)*180)); writePosition(motor5,.5);
pause(0.01); set(handles.text9,'String',(readPosition(motor
end 5)*180));
pause(1); writePosition(motor6,.5);
for angulo=1:-0.01:0.85 set(handles.text10,'String',(readPosition(moto
writePosition(motor3,angulo); r6)*180));
pause(3);
set(handles.text7,'String',(readPosition(motor c2=imread('carro3.JPG');
3)*180)); set(handles.pushbutton3,'CData',c2)
pause(0.01); % hObject handle to pushbutton3 (see GCBO)
end % eventdata reserved - to be defined in a
pause(1); future version of MATLAB
for angulo=0.62:-0.01:.42 % handles structure with handles and user
writePosition(motor5,angulo); data (see GUIDATA)
% --- Executes on button press in pushbutton4.
set(handles.text9,'String',(readPosition(motor function pushbutton4_Callback(hObject,
5)*180)); eventdata, handles)
pause(0.01); global a;
end motor6 = servo(a,'D11');
pause(1); for angulo=0.5:-0.01:.34
for angulo=0.46:0.01: 0.93 writePosition(motor6,angulo);
writePosition(motor6,angulo);
set(handles.text10,'String',(readPosition(moto
set(handles.text10,'String',(readPosition(moto r6)*180));
r6)*180)); pause(0.01);
pause(0.01); end
end pause(1);
motor3=servo(a,'D6');
pause(1); for angulo=0.5:0.01: 1
for angulo=0.42:-0.01: 0.41 writePosition(motor3,angulo);
writePosition(motor5,angulo);
set(handles.text7,'String',(readPosition(motor
set(handles.text9,'String',(readPosition(motor 3)*180));
5)*180)); pause(0.01);
pause(0.01); end
end pause(1);
pause(1); motor5 = servo(a,'D10');
for angulo=0.11:-0.01:.09 for angulo=0.5:0.01:.67
writePosition(motor4,angulo); writePosition(motor5,angulo);

set(handles.text8,'String',(readPosition(motor set(handles.text9,'String',(readPosition(motor
4)*180)); 5)*180));
pause(0.01); pause(0.01);
end end
pause(1); pause(1);
for angulo=0.41:0.01: 0.53 motor4 = servo(a,'D9');
writePosition(motor5,angulo); for angulo=0.5:-0.01: 0.11
writePosition(motor4,angulo);
set(handles.text9,'String',(readPosition(motor
5)*180)); set(handles.text8,'String',(readPosition(motor
pause(0.01); 4)*180));
end pause(0.01);
pause(1); end
for angulo=0.85:-0.01:.71 pause(1);
writePosition(motor3,angulo); for angulo=0.67:0.01:.76
writePosition(motor5,angulo);
set(handles.text7,'String',(readPosition(motor
3)*180)); set(handles.text9,'String',(readPosition(motor
pause(0.01); 5)*180));
end pause(0.01);
pause(1); end
for angulo=0.09:-0.01:.0 pause(1);
writePosition(motor4,angulo); motor1 = servo(a,'D3');
writePosition(motor1,1);
set(handles.text8,'String',(readPosition(motor set(handles.text5,'String',(readPosition(motor
4)*180)); 1)*180));
pause(0.01); c1=imread('azul.JPG');
end set(handles.pushbutton4,'CData',c1)
pause(3); pause(0.01);
%salida--------------------------------------- end
-------------- pause(1);
for angulo=0.76:-0.01:.62 writePosition(motor1,0);
writePosition(motor5,angulo); set(handles.text5,'String',(readPosition(motor
1)*180));
set(handles.text9,'String',(readPosition(motor pause(3);
5)*180)); %reposo---------------------------------------
pause(0.01); ----------------------
end writePosition(motor1,.18);
pause(1); set(handles.text5,'String',(readPosition(motor
for angulo=1:-0.01:0.85 1)*180));
writePosition(motor3,angulo); motor2 = servo(a,'D5');
writePosition(motor2,.79);
set(handles.text7,'String',(readPosition(motor set(handles.text6,'String',(readPosition(motor
3)*180)); 2)*180));
pause(0.01); writePosition(motor3,.5);
end set(handles.text7,'String',(readPosition(motor
pause(1); 3)*180));
for angulo=0.62:-0.01:.42 writePosition(motor4,.5);
writePosition(motor5,angulo); set(handles.text8,'String',(readPosition(motor
4)*180));
set(handles.text9,'String',(readPosition(motor writePosition(motor5,.5);
5)*180)); set(handles.text9,'String',(readPosition(motor
pause(0.01); 5)*180));
end writePosition(motor6,.5);
pause(1); set(handles.text10,'String',(readPosition(moto
for angulo=0.34:0.01: 0.93 r6)*180));
writePosition(motor6,angulo); pause(3);
c2=imread('carro4.JPG');
set(handles.text10,'String',(readPosition(moto set(handles.pushbutton4,'CData',c2)
r6)*180)); % hObject handle to pushbutton4 (see GCBO)
pause(0.01); % eventdata reserved - to be defined in a
end future version of MATLAB
% handles structure with handles and user
pause(1); data (see GUIDATA)
for angulo=0.42:-0.01: 0.41 % --- Executes on button press in pushbutton5.
writePosition(motor5,angulo); function pushbutton5_Callback(hObject,
eventdata, handles)
set(handles.text9,'String',(readPosition(motor global a;
5)*180)); motor1 = servo(a,'D3');
pause(0.01); writePosition(motor1,.18);
end set(handles.text5,'String',(readPosition(motor
pause(1); 1)*180));
for angulo=0.11:-0.01:.09
writePosition(motor4,angulo); motor2 = servo(a,'D5');
writePosition(motor2,.79);
set(handles.text8,'String',(readPosition(motor set(handles.text6,'String',(readPosition(motor
4)*180)); 2)*180));
pause(0.01); motor3 = servo(a,'D6');
end writePosition(motor3,.5);
pause(1); set(handles.text7,'String',(readPosition(motor
for angulo=0.41:0.01: 0.53 3)*180));
writePosition(motor5,angulo); motor4 = servo(a,'D9');
writePosition(motor4,.5);
set(handles.text9,'String',(readPosition(motor set(handles.text8,'String',(readPosition(motor
5)*180)); 4)*180));
pause(0.01); motor5 = servo(a,'D10');
end writePosition(motor5,.5);
pause(1); set(handles.text9,'String',(readPosition(motor
for angulo=0.85:-0.01:.71 5)*180));
writePosition(motor3,angulo); motor6 = servo(a,'D11');
writePosition(motor6,.5);
set(handles.text7,'String',(readPosition(motor set(handles.text10,'String',(readPosition(moto
3)*180)); r6)*180));
pause(0.01); % hObject handle to pushbutton5 (see GCBO)
end % eventdata reserved - to be defined in a
pause(1); future version of MATLAB
for angulo=0.09:-0.01:.0 % handles structure with handles and user
writePosition(motor4,angulo); data (see GUIDATA)

set(handles.text8,'String',(readPosition(motor
4)*180));
Resultados
Desarrollo de interfaz GUIDE en Matlab.
1.- Interfaz finalizada con la ayuda de herramientas de Panel, texto esttico y el
de Axel.

Ilustracin 6 Interfaz GUIDE finalizada.

2.- Interfaz de usuario finalizada y en funcionamiento.

Ilustracin 7 Interfaz GUiDE en funcionamiento.


Torre de estacionamiento
Conclusiones
Para realizacin de este proyecto integrador se tiene como punto principal el
utilizar el conocimiento adquirido de cada una de las materias, las cuales se
cursaron en este semestre, por ende dependiendo de las materias cursadas es
el proyecto que se realizar, en esta ocasin se pas a realizar una torre de
estacionamiento donde los elementos que se utilizaran ser un brazo robtico,
una banda transportadora, sensores de proximidad y un pisto hidrulico.

El utilizar primordialmente un brazo robtico es por el hecho de que este


semestre llevamos la materia de control de brazos manipuladores, el principal
objetivo era crear el brazo nosotros mismo pero por falta de dinero y tiempo por
lo cual se opt por adquirir uno, este brazo fue manipulado por una interfaz de
GUIDE elaborada en el software Matlab mediante la ayuda de una tarjeta
adquisitoria Arduino, y de esta forma manipular el brazo de una forma intuitiva,
como paso siguiente el brazo mover el vehculo haca una banda transportadora
la cual cuenta con dos sensores de proximidad y un pistn todos estos elementos
siendo manipulados mediante la ayuda de un PLC de la marca Siemens
utilizando el software Tia Portal, utilizamos este dispositivo ya que en el curso
del semestre llevamos la materia controladores lgicos programables por lo cual
era indispensable utilizar este dispositivo, este mismo iba a ser el encargado de
encender la banda transportadora cuando el primero sensor detectara que el
vehculo fuera colocado por el brazo, el vehculo iba a ser trasladado hasta el
ltimo sensor el cual al detectar el vehculo realizara una cuenta de 5 segundo
en lo que el vehculo se dirigiera hasta el pisto el cual se accionara para empujar
el auto a su destino final.

De esta forma pudimos abarcar muchas de las materias que llevamos en este
semestre ya sea en control del brazo robtico como en la programacin del PLC
y de esta forma poder realizar el proyecto integrados con xito.
Bibliografa
Brazo Robtico.

https://es.wikipedia.org/wiki/Brazo_rob%C3%B3tico

Interfaz de Usuario.

https://es.wikipedia.org/wiki/Interfaz_gr%C3%A1fica_de_usuario

GUIDE de Matlab.

https://es.mathworks.com/discovery/matlab-gui.html

Das könnte Ihnen auch gefallen