Está en la página 1de 31

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!

E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

INDICE
INDICE............................................................................................................................2 Prctica 1: LogixPro........................................................................................................3 Prctica 2: LogixPro........................................................................................................8 Prctica 3: LogixPro......................................................................................................10 Prctica 4: LogixPro......................................................................................................11 Prctica 5: LogixPro......................................................................................................13 Prctica 6: LogixPro......................................................................................................14 Prctica 7: LogixPro......................................................................................................15 Prctica 8: LogixPro......................................................................................................16 Prctica 9: LogixPro......................................................................................................17 Prctica 10: LogixPro....................................................................................................18 An xo 1. ! "#ori$a%or &..............................................................................................19 An xo 2. 'or% Co"#ari&on (E) rcicio 1. A%iciona*+...................................................25 An xo 3. ,o%-*o& (E) rcicio 2. ,-*ti .*oor E* /ator 0t-% nt Ex rci& +.....................27

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

Prctica 1: LogixPro
Nombre: ________________________________________________________ Grupo: _____________ Laboratorio Introductorio a Lgica de Rel.
Instrucciones Lgicas de Rel RSLogix. Este ejercicio se dise para familiarizarlo con la operacin de Logix ro ! conducirlo paso a paso en el proceso de creacin" edicin ! prueba de programas sencillos de L# utilizando las instrucciones lgicas de rel$ soportadas por %&Logix'

Fecha: ____________________

(el men) &imulations presente en la parte superior de la pantalla" seleccione el *+, &imulation ! aseg)rese -ue la barra de instrucciones del usuario" similar a la mostrada arriba" est$ .isible'

La .entana de edicin del programa debe mostrar un solo escaln /rung0" similar al de arriba' Este es el escaln Fin de rograma / End of rogram0 ! es el )ltimo escaln en cual-uier programa' &i este es el )nico escaln .isible entonces su programa est1 .ac2o' &i su programa no est1 .ac2o" entonces haga clic3 en la entrada File del men) en la parte superior de la pantalla ! seleccione 4Ne54 de la lista presente' 6na caja de di1logo aparecer1 conmin1ndole a seleccionar un tipo de procesador /&elect rocessor 7!pe0' 8aga clic en 4,94 para aceptar la opcin 7L Logix ro por descarte'

:hora ;aximize la .entana ro&im<** &imulation

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

El Si ulador de Entrada!Salida "I!# Si ulator$ La pantalla del simulador" similar a la mostrada arriba" debe estar a la .ista' ara este ejercicio usaremos la seccin de simulacin de Entrada+&alida" la cual consiste de => interruptores ! luces' &e muestran dos grupos de ?@ interruptores conmutadores conectados a > tarjetas de entrada de nuestro L# simulado' &imilarmente dos grupos de ?@ luces se conectan a dos tarjetas de salida de nuestro L#' Las dos tarjetas de entrada tienen direcciones 4*:?4 e 4*:=4" mientras las tarjetas de salida est1n direccionadas como 4,:>4 ! 4,:A4' #on el ratn /mouse0 haga clic3 en .arios interruptores ! note -ue el estatus del terminal al cual el interruptor est1 conectado cambia de color' ;ue.a despacio el ratn sobre un interruptor ! obser.e -ue el cursor del ratn cambia a una mano" lo -ue indica -ue el estado de un interruptor puede ser alterado al hacer clic3 en esta localidad' #uando se pasa el ratn aparece una .entana tipo texto con una Ba!udaC /BtipC0 inform1ndole B%ight #lic3 to 7oggle &5itch 7!pe4 /haga clic3 con el botn derecho del ratn para cambiar el tipo de interruptor conmutador0' roceda a hacer clic3 con el botn derecho del ratn sobre un interruptor" ! note como el tipo de interruptor cambia' Creacin de Progra as con RSLogix %eduzca el tamao de la pantalla del simulador *+, a su tamao normal al hacer clic de nue.o en el botn del medio -ue usted us anteriormente para engrandecer la pantalla de simulacin' :l hacer esto las dos .entanas de programacin ! la de simulacin deben .erse de nue.o en la pantalla' &i usted lo desea puede ajustar el tamao relati.o de estas .entanas mo.iendo con el ratn la barra -ue di.ide a ambas' :hora introduzca el siguiente programa de un solo escaln /rung0" el cual consiste de una sola instruccin de entrada D*# /D*# < Examine Entrada #errada0 ! una sola instruccin de salida ,7E /,7E E energizar la salida0' 8a! mas de una forma de hacer $sto" pero por ahora se mostrar1 la forma -ue considero la mas com)nmente usada'

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

rimero haga clic3 en el botn 4Ne5 %ung4 presente en la barra de instrucciones del usuario' Este corresponde al primer botn en el lado iz-uierdo de la barra' &i usted mantiene el apuntador del ratn fijo sobre cual-uiera de estos botones por uno o dos segundos" aparecer1 una a!uda pe-uea -ue describe la funcin o nombre de la instruccin -ue el botn representa'

:hora deber1 .er un nue.o escaln agregado a su programa como se muestra arriba" ! el n)mero del escaln al lado iz-uierdo deber1 estar resaltado' Es de notar -ue el nue.o escaln se agreg sobre el !a existente escaln Fin de rograma /EN(0' (e una manera alternati.a usted puede marcar el s2mbolo del escaln con el botn iz-uierdo del ratn ! arrastrarlo a uno cual-uiera de los cuadrados pe-ueos -ue aparecen en el programa" lo -ue generar1 un nue.o escaln en ese punto' :hora haga clic en la instruccin D*# con el botn iz-uierdo del ratn ! ella ser1 agregada a la derecha de la seleccin resaltada' Ntese -ue la nue.a instruccin D*# agregada ahora est1 resaltada' (e nue.o" alternati.amente usted pudo arrastrar la instruccin desde la barra de instrucciones al escaln deseado del programa' Si usted accidental ente agrega una instruccin % desea re o&erla' (aga clic) con el botn i*+uierdo del ratn en la instruccin a re o&er % luego ,resione la tecla -Del- .Su,/ en su teclado no nu rico. 0lternati&a ente' usted ,uede (acer clic) con el botn derec(o del ratn en la instruccin % luego seleccionar -Cut- del en1 +ue se des,liega. 8aga clic con el botn iz-uierdo del ratn en la instruccin de salida ,7E ! esta ser1 agregada a la derecha de su actual seleccin'

8aga r1pidamente dos .eces clic3 con el botn iz-uierdo del ratn en el signo de interrogacin BFC presente en la parte superior de la instruccin D*# ' 6na caja de texto -ue comienza con BFC aparecer1 en la cual usted deber1 introducir la direccin /*:?+G0 del conmutador -ue deseamos monitorear' 6se la tecla Hac3space para eliminar la BF4 presente en el cuadro de texto' 6na .ez -ue introduzca la direccin" haga clic3 en cual-uier parte de la instruccin" exceptuando el cuadro de texto" o presione la tecla enter ! el cuadro se cerrar1' 8aga clic3 con el botn derecho del ratn en la instruccin D*# ! seleccione 4Edit &!mbol4 del men) -ue se muestra' :parece otro cuadro de di1logo donde usted puede escribir un nombre /por ejemplo &uiche G 0 para asociarlo con esta direccin' 6n clic fuera del cuadro lo cerrar1'

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

*ntroduzca la direccin ! el s2mbolo para la instruccin ,7E ! su primer programa %&Logix estar1 completo' :ntes de continuar" .erifi-ue -ue las direcciones de las instrucciones sean correctas'

2eri3icacin del Progra a (ebemos bajar el programa al L# /4(o5nload40' 8aga clic en el botn 47oggle4 en la es-uina superior iz-uierda del panel de edicin" como se muestra en la gr1fica -ue sigue" para traer el panel del L# a la .ista'

8aga clic3 en el botn 4(o5nLoad4 para comenzar la bajada del programa al L#' 6na .ez completada" haga clic3 dentro del c2rculo con la opcin B%6NC para comenzar con la corrida del programa por el L#' Engrandezca la .entana de &imulacin" de forma -ue pueda obser.ar los interruptores ! las l1mparas" arrastrando hacia la derecha con el ratn la barra -ue separa las .entanas de &imulacin ! del rograma' :hora haga clic3 en el *nterruptor *:?+GG en el simulador ! si todo est1 correcto" la l1mpara debe iluminarse' #onmuta el interruptor entre ,n /Encendido0 ! ,ff /:pagado0 .arias .eces ! obser.e el cambio de .alor indicado por los cuadros de status del L# los cuales est1n constantemente actualizado a medida -ue el L# barre las instrucciones del programa' 7rate de colocar el L# de regreso en el modo B G;4 ! luego conmute el interruptor del simulador .arias .eces ! note el resultado' #olo-ue el L# de nue.o en el modo B%6NC ! la barrida /scan0 del programa se reasume' Nosotros pensamos de la instruccin D*# como un contacto el$ctrico -ue permite el flujo de corriente cuando se cierra un interruptor externo' Esperamos -ue la salida ,7E se energiza si se permite -ue el flujo de corriente llegue a $lla' En la pr1ctica la instruccin D*# es una instruccin condicional -ue .erifica si el bit direccionado est1 en ? /Ierdadero0' &i es .erdadero" la corriente flu!e hacia ,7E en nuestro caso' Edicin del Progra a. 8aga clic3 en el botn 47oggle4 en el panel del permitir1 .er el p1nel de edicin' L#" lo -ue pondr1 al L# en el modo B G;C !

:hora agregue un segundo escaln al programa como se muestra abajo' :hora en .ez de introducir las direcciones como hicimos anteriormente" trate arrastrando la direccin apropiada -ue se muestra en la simulacin *+," lle.1ndola hacia la instruccin'

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

Note -ue la instruccin D*# -ue prueba por la condicin G Falso tiene su direccin resaltada en amarillo' Esto indica -ue la instruccin est1 e.aluada como Ierdadera" -ue en el caso de una D*# significa -ue el bit direccionado es actualmente cero Falso'

Este es un buen momento para practicar sus habilidades de arrastrar ! dejar caer /dragNdrop0' 7rate de mo.er instrucciones de escaln a escaln al hacer clic3 con el botn iz-uierdo del ratn sobre una instruccin ! manteniendo el botn presionado arrastre la instruccin a una nue.a localidad' 7rate de hacer lo mismo con eslabones completos al arrastrar el cuadro al lado iz-uierdo del escaln ! dejarlo caer en una nue.a localidad' 6na .ez -ue se sienta cmodo con el arrastre ! dejar caer" aseg)rese -ue el programa luzca como el mostrado arriba' :hora baje su programa al L# ! colo-ue al L# en el modo %un' #onmute ambos interruptores G ! ? entre las posiciones ,n ! ,ff .arias .eces ! obser.e el efecto -ue tiene sobre las l1mparas' :segure -ue est1 conforme con el comportamiento de su programa antes de proceder'

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

Prctica 4: LogixPro
Nombre: ________________________________________________________ Grupo: _____________
Parada!0rran+ue "Sto,!Start$ usando #5L % #56P. ara este ejercicio necesitamos dos interruptores Normalmente :bierto' 6sando el botn derecho del ratn haga clic3 en los interruptores 4*:?+>4 ! 4*:?+=4" lo -ue los cambia a pulsadores normalmente abiertos / N',' push buttons0' :hora agregue los dos siguientes escalones a su programa' 6na .ez -ue introduzca los escalones correctamente" b1jelo ! corra su programa modificado'

Fecha: ____________________

:cti.e los interruptores &tart ! &top ! asegure -ue las instrucciones de salida ,7L ! ,76 responden como se estipula en su texto' 6na .ez -ue tengas la l1mpara encendida" Jpuede usted apagarlo si la potencia se pierde en el circuito del interruptor &topF' :hora modifi-ue su programa de forma -ue opere correctamente cuando usted sustitu!a el interruptor normalmente abierto /*:?+G=0 con un interruptor normalmente cerrado' &i ahora perdemos potencia en el circuito del interruptor normalmente cerrado" J-ue pasar2a con el estado de la l1mpara /,:>+G>0F

E ulacin del Control Standard Parada!0rran+ue "Sto,!Start$. Horre su programa al seleccionar 4Ne54 desde el men) 4File4 en la parte superior de la pantalla' #uando el cuadro de di1logo aparece haga clic3 en B,9C para seleccionar el tipo L# por descarte /default L# t!pe0' :hora introduzca el siguiente programa' ara introducir una bifurcacin" solo arrastre el botn de bifurcacin en el escaln ! luego inserte o arrastre instrucciones en la ramificacin'

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

:ntes -ue baje ! corra este programa" echemos un cuidadoso .istazo al uso de la instruccin D*, para .erificar el estado de un interruptores normalmente cerrado de parada' #uando alguien presiona el interruptor de parada /&top &5itch0" Jir1 el bit *:?+GA a Ierdadero o FalsoF J*r1 la instruccin D*# al .alor Ierdadero o Falso cuando el interruptor se presionaF JEs esta la lgica deseadaF '''' #orra el programa ! .erifi-ue si es correcta''''' &i pierde potencia en el circuito de parada /&top &5itch0" J a -ue estado la l1mpara ir1F '''' J or-u$ piensa usted -ue la ma!or2a prefiere este m$todo en .ez del m$todo ,7L+,76 para implementar el circuito de arada+:rran-ueF' Ra i3icacin de Salida con RSLogix ;odifi-ue su programa para -ue sea igual a este:

Haje el programa al L# ! crralo' ,pere los interruptores &top ! &tart .arias .eces con el *nterruptor<G abierto" ! de Nue.o con el interruptor<G cerrado' %emue.a la instruccin D*# de la rama de salida ! obser.e a la l1mpara = cuando usted arranca ! para al circuito' 7rate de mo.er la instruccin ,7E de la l1mpara<= de forma -ue est$ en serie con la instruccin ,7E de la l1mpara >' Haje el programa al L# ! crralo' ,bser.e como ambas l1mparas encienden con la rama .ac2a en su sitio' Ello puede aparecer como un circuito el$ctrico pero sabemos -ue en efecto no lo es ! por lo tanto obedece un conjunto distinto de reglas' %emue.a la ramificacin .ac2a' Haje el programa ! crralo' Iea si esto tiene alg)n efecto en la lgica o en la operacin del escaln'

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

Prctica 7: LogixPro
Nombre: ________________________________________________________ Grupo: _____________ Fecha: ____________________

Control de una Lu* desde dos Localidades. Genere" introduzca ! pruebe un programa -ue realice la funcin com)n de controlar una luz desde dos localidades diferentes' 6tilice los interruptores conmutadores /*:?+GG0 ! /*:?+G?0 para controlar la l1mpara /,:>+GG0''' /:!uda: &i ambos interruptores est1n Encendidos o si ambos interruptores est1n apagados" la l1mpara debe estar encendida' Este es una forma de enfocar al problema'0

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

Prctica 8: LogixPro
Nombre: ________________________________________________________ Grupo: _____________
Si ulacin de ProSi 9II de una Puerta de :ara;e. (el menu &imulations en la parte superior de la pantalla elija la opcin (oor &imulation' 7ome su tiempo para familiarizarse con los componentes presentes en el sistema uerta de Garaje ! f2jese en particular en el estado actual de los interruptores limitadores' #uando la puerta est1 en la posicin cerrada" ambos interruptores est1n en su estado acti.ado /anormal0' #olo-ue el ratn sobre cada uno de los interruptores interruptores ! podr1 .er -ue una caja de texto de a!uda aparece" la cual indica -ue el interruptor seleccionado se cable usando contactos normalmente abiertos' #on la puerta completamente cerrada" J-ue ni.el de seal espera usted .er a las entradas *:?+G= e *:?+GA" correspondientes a las conexiones de los interruptores al L#F' ara confirmar su entendimiento del estatus actual de los interruptores limitadores" colo-ue al L# en el modo B%6NC" lo -ue inicia el barrido' :hora abra la pantalla (ata 7able /7abla de (ata0 haciendo clic3 en el 2cono (ata 7abla localizado en la barra de herramientas en la parte superior de la pantalla /tercer 2cono desde la derecha 0' #uando usted tenga a su .ista el cuadro de (ata 7able" .a!a al subcuadro con lista titulado 7able ! seleccione *?:*nput' :hora podr1 obser.ar el estado actual de cada bit asociado con la tarjeta de entrada *?' (ebe notarse -ue el bit *:?+G> est1 tambi$n en el estado :lto o Ierdadero' 6tilizando el ratn" presione el interruptor &top .arias .eces en el 1nel de #ontrol ! obser.e lo -ue ocurre' Kuegue con los interruptores &tart" &top ! #lose" .ea como se reflejan en esta tabla' 8asta -ue no entienda bien esta tabla ! por-ue cambian los .alores en ella" no contin)e con el ejercicio'

Fecha: ____________________

E;ercicio de Progra acin Para el Estudiante. En este ejercicio -ueremos -ue apli-ue sus conocimientos en instrucciones de lgica de rel$ al diseo de un programa -ue controle la puerta ro&im<**' El sistema de la puerta consiste de un

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

motor re.ersible" un par de interruptores limitadores ! un panel de control" todo conectado a su L#' El programa monitorear1 ! controlar1 este e-uipo adhiri$ndose a las siguientes premisas: El mo.imiento de la puerta se detendr1 inmediatamente cuando se presione el interruptor &top ! permanecer1 detenida cuando se deje de presionar el interruptor' :l presionar el interruptor ,pen" la puerta se abrir1 siempre ! cuando la puerta no est$ completamente abierta' &i el interruptor es dejado de presionar la puerta continuar1 abri$ndose hasta abrirse por completo' :l presionar el interruptor #lose har1 -ue la puerta se cierre a menos -ue est$ completamente cerrada' El cierre de la puerta se mantendr1 hasta completarse aun cuando deje de presionar el interruptor de cierre' &i la puerta est1 completamente abierta" el presionar el interruptor de :pertura de uerta no energizar1 el motor' &i la puerta est1 completamente cerrada" el presionar el interruptor de #ierre de uerta no debe energizar el motor' Hajo ninguna circunstancia los dos embobinados /motor up ! motor do5n0 del motor deben energizarse simult1neamente' La luz :jar deber1 iluminarse si la puerta no est1 completamente cerrada o completamente abierta' La luz ,pen se encender1 cuando la puerta est$ completamente abierta' La luz &hut se encender1 cuando la puerta est$ completamente cerrada'

&er1 de su responsabilidad el disear" documentar" depurar ! probar su programa' 7rate de e.itar el uso de instrucciones de anclaje ,7L u ,76 ! trate de minimizar el n)mero de escalones -ue usa' :seg)rese de usar apropiadamente comentarios en las instrucciones ! escalones para documentar su programa' 7odos los componentes de Entrada+&alida /*+,0 referenciados dentro de su programa deben estar claramente eti-uetados" ! los comentarios en los escalones deben clarificar los pasos -ue su programa ejecuta'

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

Prctica <: LogixPro


Nombre: ________________________________________________________ Grupo: _____________
E;ercicio Su,le entario de Progra acin. En este ejercicio -ueremos -ue modifi-ue su programa para -ue se adhiera a los siguientes criterios: &i la puerta se est1 abriendo ! se presiona el interruptor #lose" se detendr1 el mo.imiento de la puerta" ! la puerta permanecer1 detenida cuando el interruptor #lose se deje de presionar' &i la puerta se est1 cerrando ! se presiona el interruptor ,pen" la puerta detendr1 su mo.imiento' #uando se suelte el interruptor ,pen" la puerta comenzar1 a abrirse' 6na .ez -ue el mo.imiento de la puerta sea detenido por una de las dos causas anteriormente mencionadas" el criterio de operacin de la primera seccin debe seguirse de nue.o'

Fecha: ____________________

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

Prctica =: LogixPro
Nombre: ________________________________________________________ Grupo: _____________
La Si ulacin de un Silo en ProSi II. (el men) &imulations en la parte superior de la pantalla seleccione &ilo &imulation' 6na imagen similar a la imagen de arriba se abrir1 en la .entana de simulacin' La imagen siguiente muestra con detalle donde est1n los sensores de ni.el /le.el sensor0 ! de proximidad /prox' sensor0" interruptores /&7:%7 ! &7, 0" luces /%6N" F*LL ! F6LL0" .1l.ula solenoide /solenoid .al.e0 ! motor del sistema con las correspondientes entradas ! salidas al L#' 6sted usar1 estos componentes en los ejercicios'

Fecha: ____________________

#,eracin Continua. (isee ! depure completamente un circuito de control usando lenguaje escalera -ue autom1ticamente posicione ! llene las cajas" las cuales aparecen secuencialmente en la correa transportadora' :seg)rese -ue los siguientes detalles se satisfagan: La secuencia puede ser detenida ! comenzada de Nue.o en cual-uier momento usando los interruptores &top ! &tart montados en el panel a la iz-uierda del simulador' La luz %6N permanecer1 energizada siempre -ue el sistema est$ operando en modo autom1tico' La luz %6N" el motor de la cinta transportadora ! la .1l.ula solenoide se desenergizar1n siempre -ue el sistema sea detenido con el interruptor &7, ' La luz F*LL debe energizarse cuando la caja se est$ llenando' La luz F6LL se energizar1 cuando la caja est$ llena ! permanecer1 as2 hasta -ue la caja sea mo.ida fuera del fotosensor'

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

Prctica >: LogixPro


Nombre: ________________________________________________________ Grupo: _____________
Llenado de Ca;as con Co ien*o de Nue&o ?anual. :ltere su programa o escriba uno nue.o de forma -ue incorpore los siguientes criterios: (etenga el mo.imiento de la cinta transportadora cuando el lado derecho de la caja sea detectado por el fotosensor' #on la caja posicionada ! la cinta transportadora detenida" abra la .1l.ula solenoide ! permita -ue la caja sea llenada' El proceso de llenado debe concluir cuando el sensor de ni.el asuma el .alor Ierdadero' La luz F*LL debe energizarse mientras se est1 llenando la caja' La luz F6LL debe energizarse cuando la caja est$ llena ! permanecer1 energizada mientras la caja llena no sea mo.ida fuera del fotosensor' 6na .ez -ue la caja est$ llena" deber1 presionar moment1neamente el interruptor &tart para mo.er la cinta transportadora ! mo.er la caja llena fuera del 1rea de llenado" lo -ue al mismo tiempo traer1 una nue.a caja .ac2a a la posicin de llenado' No se acepta como solucin a esta situacin el -ue el interruptor &tart sea continuamente presionado por el operador mientras la caja llena salga de la zona de llenado'

Fecha: ____________________

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

Prctica @: LogixPro
Nombre: ________________________________________________________ Grupo: _____________
Control de 5r3ico usando 7 Luces. (el men) de &imulations en la parte superior de la pantalla" seleccione la simulacin titulada como 7raffic Light &imulation' En la .entana de simulacin aparecer1 una imagen como la imagen superior al lado del t2tulo de la simulacin' (ebemos prestar atencin a la seccin de la imagen correspondiente a la luz de tr1fico" detallada en la siguiente imagen" donde notamos cada luz ! la salida del L# -ue la controla'

Fecha: ____________________

6sando su conocimiento de temporizadores en cascada /Ier :nexo ?0" desarrolle un programa en lenguaje escalera -ue realice la secuencia de luces .erde" amarilla / 1mbar0 ! roja de la manera siguiente: Secuencia de #,eracin:

1. Luz %oja controlada por salida ,:>+GG encendida por ?> segundos' 2. Luz Ierde controlada por salida ,:>+G> encendida por L segundos'
=' Luz :marilla / 1mbar0 controlada por salida ,:>+G? encendida por A segundos' A' La secuencia se repite otra .ez comenzando con la luz roja' M<<<<<<<<<<<<<<<<< 7iempo en &egundos <<<<<<<<<<<<<<<<<<N %,K: ?> &ec' IE%(E L &ec' :;H:% A &ec'

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

Prctica A: LogixPro
Nombre: ________________________________________________________ Grupo: _____________ Fecha: ____________________

Control de 5r3ico usando = Luces. ;odifi-ue su programa de forma -ue las otras = luces representantes del flujo de tr1fico en la otra direccin tambi$n puedan ser controladas' 6sted est1 tentado a usar seis temporizadores para lle.ar a cabo esta tarea" pero el trabajo puede realizarse con solo cuatro" ! al mismo tiempo tendr1 un programa mas claro' %oja O ,:>+GG Ierde O ,:>+G@ L &ec' :mbar O ,:>+GP A &ec' L &ec' Ierde O ,:>+G> :mbar O ,:>+G?

%oja O ,:>+GA A &ec'

J#omo -ue se producen colisiones por-ue es mu! r1pido el cambio de amarillo / 1mbar0 en una direccin a .erde en la otra direccin'F arece -ue los conductores no le prestan atencin a la funcin de la luz amarilla / 1mbar0" en .ez de reducir su .elocidad al presentarse la luz amarilla" lo -ue hacen es acelerar" mientras -ue los conductores en la otra direccin tan pronto .en la luz .erde arrancan desesperados' No necesitamos realizar un nue.o cableado para corregir esto' La solucin a esta situacin lle.ar1 un poco mas de programacin

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

Prctica 1B: LogixPro


Nombre: ________________________________________________________ Grupo: _____________ Fecha: ____________________

E;ercicio 7CControl de 5r3ico 6sando Retraso Para la Lu* 2erde. ;odifi-ue su programa de forma -ue exista un per2odo de un segundo de retardo donde las dos luces rojas est$n encendidas antes de pasar a la secuencia .erde" amarilla / 1mbar0" roja' El diagrama de tiempo mostrado abajo presenta solo uno de estos inter.alos de un segundo" pero se necesitan dos de ellos' 7rabaje el problema ! trate de no usar mas de seis temporizadores' %oja O ,:>+GG Ierde O ,:>+G@ L &ec' :mbar O ,:>+GP A &ec' 1 Ierde O ,:>+G> :mbar O ,:>+G?

%oja O ,:>+GA L &ec' A &ec'

Q&i el inter.alo de un segundo no es suficiente para controlar a estos conductores" proceda a aumentar ese inter.alo a dos segundosR

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

0nexo 1. 5e ,ori*adores.
5(e 5#N 5i er .... "5i er #N Dela%$ From the Logix ro &imulations ;enu" select the *+, &imulation' #lear out an! existing program b! selecting the 4Ne54 entr! in the File menu" and then select the 4#lear (ata 7able4 entr! in the &imulations menu' No5 enter the follo5ing program being careful to enter the addresses exactl! as sho5n' #onfirm that !ou ha.e entered the number ?GG as the timerSs preset .alue' 7his .alue represents a ?G second timing inter.al /?GxG'?0 as the timebase is fixed at G'? seconds:

,nce !ou ha.e !our program entered" and ha.e ensured that it is correct" do5nload it to the L#' Ensure that &5itch *:?+G is ,pen" and then place the L# into the %un mode' %ight clic3 on the 7imer instruction" and select 4Go7o (ata7able4 from the drop<do5n menu' Note the initial .alue of timer 7A:?Ss accumulator and preset in the spaces belo5' :lso indicate the state of each of the timerSs control bits in the spaces pro.ided: *nitial &tate /&5itch *:?+GO,pen0: 7A:?':## O _____ 7A:?' %E O ______ 7A:?+EN O ____ 7A:?+77 O ____ 7A:?+(N O ____

#lose s5itch *:?+G" and carefull! obser.e the incrementing of the timerSs accumulator" and the state of each of itSs control bits' ,nce the 7imer stops incrementing" note the final .alue of timer 7A:?Ss accumulator" preset" and the state of itSs control bits belo5: Final &tate /&5itch *:?+GO#losed0:

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

7A:?':## O _____ 7A:?' %E O ______ 7A:?+EN O ____ 7A:?+77 O ____ 7A:?+(N O ____ 7oggle the state of s5itch *:?+G a number of times" and obser.e the operation of the 7imer in both the (ata7able displa! and in the Ladder %ung program displa!' #onfirm that 5hen the rung is ta3en false" the accumulator and all = control bits are reset to zero' 7his t!pe of timer is a non<retenti.e instruction" in that the truth of the rung can cause the accumulator and control bits to be reset /OG0' Conclusions: 6se the 7,N instruction to turn an output on or off after the timer has been on for a preset time inter.al' 7his output instruction begins timing 5hen its rung goes 4true4' *t 5aits the specified amount of time /as set in the %Eset0" 3eeps trac3 of the accumulated inter.als 5hich ha.e occurred /:##umulator0" and sets the (N /done0 bit 5hen the :## /accumulated0 time e-uals the %E&E7 time' :s long as rung conditions remain true" the timer adjusts its accumulated .alue /:##0 each e.aluation until it reaches the preset .alue / %E0' 7he accumulated .alue is reset 5hen rung conditions go false" regardless of 5hether the timer has timed out'

Cascaded 5#N 5i ers *nsert a ne5 rung containing a second timer just belo5 the first rung as sho5n belo5' 7his second timer 7A:> 5ill be enabled 5hen the first timerSs (one bit 7A:?+(N goes true or high /?0'

,nce !ou ha.e completed this addition to !our program" do5nload !our program to the L# and select %6N' 7oggle the state of s5itch *:?+G to ,N and obser.e the operation of the timers in !our program' Hring the (ata7able displa! into .ie5" and pa! particular attention to the 5a! in 5hich the timers are cascaded /one timer starts the next0' 7r! changing the .alue of one of the timer presets b! double clic3ing on the preset .alue in the (ata7able displa!" and then entering a ne5 .alue' %un the timers through their timing se-uence a number of times' (onSt mo.e on until !ou are satisfied that the timers are 5or3ing as !ou 5ould expect

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

*n this exercise 5e ha.e utilized just t5o timers" but there is nothing stopping us from se-uencing as man! timers as 5e 5ish' 7he onl! thing to remember isT to use the (N /done0 bit of the pre.ious timer to enable the next timer in the se-uence' ,b.iousl! locating the timers on consecuti.e rungs" and emplo!ing consecuti.e numbering 5ill ma3e such a program much easier to read and trouble<shoot'

Sel3 Resetting 5i ers lace the L# into the G; mode" and modif! the first rung of !our program as depicted belo5'

,nce !ou ha.e modified !our program" do5nload it to the L# and place the L# into the %6N mode' #lose s5itch *:?+G and obser.e the operation of the timers' 7he timers should no5 be operating in a continuous loop 5ith 7imer? starting 7imer>" and then 5hen 7imer> is done" 7imer? is reset b! 7imer>Ss done bit' :s before" 5hen 7imer? is reset" it in turn resets 7imer> 5hich causes 7imer>Ss done to go lo5 /7A:>+(NOG0' ,nce 7imer>Ss done bit is lo5" the se-uence is bac3 to 5here it originall! began" and the timing se-uence 5ill start o.er once again on the .er! next scan' %emo.e the first instruction /s5itch D*# *:?+G0 from rung zero of !our program' (o5nload and %6N this modified .ersion of !our program (oes the timing operation continuousl! se-uence as beforeF *t shouldQ #an !ou stop the timing se-uenceF Not 5ithout ta3ing the L# out of the %6N modeQ *n man! applications there ma! ne.er be a need to stop such a timing se-uence" so a s5itch might not be used or needed' *n this exercise 5e cascaded t5o timers" but as before there is nothing to stop us from cascading as man! timers as 5e 5ish' 7he thing to remember here isT utilize the (N /D*# or 4N,74done0 bit of the last timer in the se-uence to reset the first timer in the se-uence' ,nce again" consecuti.e rungs" and numbering 5ill ma3e a program much easier to read and trouble<shoot'

5(e 5#D 5i er .... "5i er #DD Dela%$ *n :llen Hradle! L# programming" the 7,N timer is b! far the most commonl! used t!pe of timer' ;ost people consider 7,N timers to be simple to use and understand' *n comparison" man! people find the operation of the :llen Hradle! 7,F /7imer ,FF dela!0 timer to be less intuiti.e" but *Sm going to let !ou decide for !ourself' ;a3e sure that s5itch *:?+G is #losed" and then enter or modif! !our existing program to match the one sho5n belo5'

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

,nce !ou ha.e !our program entered" and ha.e ensured that it is correct" do5nload it to the L#' Ensure that &5itch *:?+G is #losed" and then place the L# into the %un mode' %ight clic3 on the 7imer instruction" and select 4Go7o (ata7able4 from the drop<do5n menu' Note the initial .alue of timer 7A:?Ss accumulator and preset in the spaces belo5' :lso indicate the state of each of the timerSs control bits in the spaces pro.ided: *nitial &tate /&5itch *:?+GO#losed0: 7A:?':## O _____ 7A:?' %E O ______ 7A:?+EN O ____ 7A:?+77 O ____ 7A:?+(N O ____

,pen s5itch *:?+G" and carefull! obser.e the incrementing of the timerSs accumulator" and the state of each of itSs control bits' ,nce the 7imer stops incrementing" note the final .alue of timer 7A:?Ss accumulator" preset" and the state of itSs control bits belo5: Final &tate /&5itch *:?+GO,pen0: 7A:?':## O _____ 7A:?' %E O ______ 7A:?+EN O ____ 7A:?+77 O ____ 7A:?+(N O ____

7oggle the state of s5itch *:?+G a number of times" and obser.e the operation of the 7imer in both the (ata7able displa! and in the Ladder %ung program displa!' #onfirm that 5hen the rung is ta3en true" the accumulator and all = control bits are reset to zero' 7he 7,F timer li3e the 7,N timer is also a non<retenti.e instruction and can be reset b! changing the truth of the rung' Conclusions: 6se the 7,F instruction to turn an output on or off after its rung has been off for a preset time inter.al' 7his output instruction begins timing 5hen its rung goes 4false'4 *t 5aits the specified amount of time /as set in the %E&E70" 3eeps trac3 of the accumulated inter.als 5hich ha.e occurred /:##6;0" and resets the (N /done0 bit 5hen the :##6; /accumulated0 time e-uals the %E&E7 time'

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

7he :ccumulated .alue is reset 5hen rung conditions go true regardless of 5hether the timer has timed out' 5(e R5# 5i er .... "Retenti&e 5i er #N$ ;a3e sure that s5itch *:?+G is ,pen" and then replace the 7,F timer in !our program 5ith a %7, retenti.e timer' No5 insert a ne5 rung belo5 the timer" and add the D*#"*:?+? and %E&"7A:? instructions' Uour program should no5 match the one sho5n belo5:

,nce !ou ha.e !our program entered" and ha.e ensured that it is correct" do5nload it to the L#' Ensure that both &5itches are ,pen" and then place the L# into the %un mode' %ight clic3 on the 7imer instruction" and select 4Go7o (ata7able4 from the drop<do5n menu' Note the initial .alue of timer 7A:?Ss accumulator" preset and control bits' :re 5e starting off 5ith the same .alues 5e had in the 7,N exerciseF Uou should be ans5ering Ues'Q #lose s5itch *:?+G for > or = seconds and then ,pen it again' Note that the timer stopped timing 5hen the rung 5ent false" but the accumulator 5as not reset to zero' #lose the s5itch again and lea.e it closed 5hich 5ill allo5 the timer to time<out /:##O %E0' ,nce timed out" note the state of the control bits ,pen the s5itch" and once again note the state of the control bits' No5 close &5itch *:?+? and lea.e it closed' 7his 5ill cause the %eset instruction to go true'

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

#lose s5itch *:?+G momentaril! to see if the timer 5ill start timing again' *t should notQ ,pen &5itch *:?+? 5hich 5ill cause the %eset instruction return to false' No5 toggle s5itch *:?+G se.eral times and note that the timer should again start timing as expected' %epeat the foregoing steps" until !ou are satisfied that !ou clearl! understand the operation of both the %7, timer" and the %eset instruction' Conclusions: :n %7, timer functions the same as a 7,N 5ith the exception that once it has begun timing" it holds its count of time e.en if the rung goes false" a fault occurs" the mode changes from %6N to G;" or po5er is lost' Vhen rung continuit! returns /rung goes true again0" the %7, begins timing from the accumulated time 5hich 5as held 5hen rung continuit! 5as lost' H! retaining its accumulated .alue" retenti.e timers measure the cumulati.e period during 5hich rung conditions are true'

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

0nexo 4. Eord Co ,arison "E;ercicio 1. 0dicional$.


Exercise F1 99 5ra33ic Control utili*ing 1 5i er From the &imulations ;enu at the top of the Logix ro screen" &elect the 7raffic Light &imulation

6tilizing a single timer" emplo! the use of Vord #omparison instructions to control our simulated traffic light' 7he se-uence of operation and timing durations are set out in follo5ing timing diagram' Uour program should incorporate a ? second period /dela!ed green0 5hen both directions 5ill ha.e onl! their %E( lights illuminated' Note that the timing diagram belo5 onl! sho5s one of these ? second inter.als" but t5o are actuall! re-uired' %ed O ,:>+GG Green O ,:>+G@ L &ec' :mber O ,:>+GP A &ec' 1 Green O ,:>+G> :mber O ,:>+G?

%ed O ,:>+GA L &ec' A &ec'

*f a one second dela! pro.es insufficient to get these dri.ers under control then just go ahead and jac3 the dela! up to t5oQ

Exercise F4 99 Dealing Git( Pedestrians ;odif! !our program so that the cross5al3s are also controlled' 7his is not necessaril! a 5ord comparison exercise" but itSs a tas3 that needs doing" and !ou should no5 ha.e sufficient expertise to accomplish it' *t might not be all that eas! ho5e.erQ

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

Uour program should operate as follo5s: Vhen depressed" the cross5al3 pushbutton 5ill cause the appropriate Val3 &ign to be illuminated at the next occurrence of a %ed to Green transition for the appropriate direction' *f the Green light is alread! illuminated 5hen the button is pressed then the Val3 signal se-uence 5ill be dela!ed until the next %ed to Green transition occurs' ,nce the Val3 &ign is illuminated" it 5ill remain so for the duration of the Green signal' Vhen the :mber light appears" the Val3 &ign 5ill commence to flash ,n and ,ff and continue to do so until the %ed signal appears'

Uou might consider using a bit from the free<running timer located in &>:A to create the cautionar! flashing effect'

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

0nexo 7. ?odulos "E;ercicio 4. ?ulti Dloor Ele&ator Student Exercise$.


:etting Started :s 5eS.e seen pre.iousl!" modularizing portions of a program and placing the re-uired logic into subroutines often results in a program 5hich is both easier to read and understand' *n extreme cases" a programmer ma! e.en elect to modularize the total program' *f this approach is ta3en" then the resultant core or main program 5ill often be nothing more then a list of calls to subroutines 5here the details are dealt 5ith' Ier! much li3e the *ndex for a boo3' 7he index pro.ides an o.er.ie5 from 5hich the reader can readil! discern 5here particular topics are located" and then readil! mo.e to that location for further details' *n the case of the Ele.ator simulation" it isnSt too hard to .isualize ho5 5e might modularize man!" if not all the tas3s that are going to be re-uired' 7he tas3s of closing and opening the door are ob.ious candidates for modularization' :lmost all programs re-uire an initialization section" and e.en tas3s that re-uire continual execution" such as catching a button press 5hich denotes a re-uest for the ele.ator to arri.e" can often be grouped into a subroutine" and then simpl! called unconditionall! on e.er! scan' :dd a module to trac3 the ele.atorSs motion" and 5e should alread! ha.e a fairl! good topical outline for our programSs *ndex' :nother factor 5hich is some5hat uni-ue to this exercise" is that 5e are going to need a fair number of flags to 3eep trac3 of 5hat 5e are doing" and 5hat must be done next' Fortunatel!" the s5itch closures 5hich denote a re-uest to ha.e the ele.ator arri.e" 5ill lead us to latching the built<in lamp of the s5itch so as to .isuall! confirm the re-uest has been recognized' 7he lamp for this s5itch should remain energized until the ele.ator car arri.es" and hence that lamp can ser.e the dual purpose of flagging that pending re-uests exists" itSs floor" and indirectl! the re-uired direction of tra.el' Emplo!ing *+, in this dual purpose manner should not be ne5" but utilizing latch /L0 and unlatch /60 instructions has until no5 been generall! discouraged' Uou should be 5ell a5are of the reasoning behind this b! no5" but there are situations 5here the latching instructions are ideall! suited to the tas3" and this happens to be one of them' Exercise F1 99 Pre,aring Hour Progra Is Index. ,pen a ne5 program" and enter the rungs sho5n belo5 into the main or L:(> section of this program' ,nce this is accomplished" all further logic that !ou add to !our program should be placed into the appropriate subroutine 5hich has been allocated for the particular tas3 at hand'

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

Uou 5ill note that a number of flags ha.e alread! been pre<defined" and these are to be emplo!ed to control the logic flo5 of !our final program' Kust to ma3e life a little easier on !our instructor" !ou are as3ed to utilize unused bits in 5ord H=:G if and 5hen an! additional flags are re-uired'

Exercise F4 99 5a)ing t(e Ele&ator to t(e 5o,. *n this exercise !ou 5ill add all the appropriate logic to detect 5hen the 5all mounted Ath floor s5itch /*:?+??0 is pressed' Vhen this occurs" the ele.ator is to be put into motion and proceed up5ards until it arri.es at the Ath floor 5here it 5ill halt' 7his of course assumes that the ele.ator starts out in itSs default location at the first floor'

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

*tSs imperati.e that !ou accomplish this tas3 5hile maintaining compatibilit! 5ith the current program structure' 7o this end" all @ subroutines 5ill be utilized" and therefore each must first be programmed 5ith the appropriate logic to accomplish this initial tas3' 6=" *nitialization &ubroutine: Each time !ou test !our program" !ou should first reset the simulation using the selection in the simulations menu' 7his 5ill ensure that ele.ator is bac3 at the first floor and all the hard5are is in itSs initial state' Vhen !ou place !our program into the run mode" 6= 5ill be executed" and it is here 5here !ou should ensure that all flags etc are in their correct initial state' *n particular" the 4(oNext or Vait4 flag should be latched true 5hich 5ill ensure that subroutine 6W /Next %e-uest or Vait0 5ill be acti.el! scanned at this time' 6A" #atch Floor %e-uests: 7his subroutine is 5here the logic that 5ill detect" and react to the closure of the Ath floor 5all s5itch should be placed' 7he lamp for this s5itch should be latched on" but this should onl! occur if the ele.ator is not alread! at the Ath floor' *n later exercises" additional logic 5ill be added for the other s5itches that can initiate a change in the ele.atorSs location' 6P" Next %e-uest or Vait: 7his subroutine is 5here the decision to mo.e the ele.ator 5ill be made' 7he built<in lamps of the 5all mounted s5itches ma! be used as a flag to initiate a mo.e of the ele.ator car' For no5 it 5ill onl! be necessar! to monitor flag /lamp0 ,:>+?? and set the 4#lose and Go4 flag in response' 7his 5ill in<turn in.o3e the 4#lose (oor and ;o.e4 subroutine /6W0 5hich 5ill ta3e care of getting the ele.ator under5a!' 6@" #lose (oor and ;o.e: *n this subroutine" locate the logic to close the door" and then energize the motor to get the ele.ator under5a!' 7he desired direction is ob.ious in this case" but later !ou 5ill most certainl! re-uire flags to indicate 5hich direction to proceed in' Hefore exiting this subroutine ma3e sure that both the 4(oNext or Vait4 and the 4#lose and Go4 flags are cleared /unlatched0" and set the 4#ar is ;o.ing4 flag so that positioning of the car 5ill be controlled' 6W" 7rac3 #ar ;o.ement: ,nce the car is mo.ing" this subroutine ta3es control" and is responsible for deciding 5here to stop the car' *n this exercise the direction and destination are fixed /up" Ath floor0" so !ou 5ill onl! be re-uired to determine 5hen the car has reached the fourth floor' ,nce there" the carSs location should be flagged b! updating the appropriate floor indicator lamps" and the 4&top and ,pen4 flag should be set /latched0 5hich 5ill in<turn in.o3e the 4&top and ,pen (oor4 subroutine' 7he carSs .ertical position can be determined b! reading the motorSs shaft encoder /*:P0" and e-uating this reading to those !ou ha.e gathered for the indi.idual floors' *t ma! ta3e a little trial and error to initiall! gather these .alues" but the tas3 can be made easier if !ou temporaril! slo5 Logix roSs scan rate do5n some5hat' 6L" &top and ,pen (oor: 7he first thing to do here is to stop the motor and reset /unlatch0 the 4#ar is ;o.ing4 flag' Uou should also extinguish the built<in lamp of the 5all mounted re-uest s5itch' 7he floor indicator

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

lamps abo.e the door can be utilized to determine 5hich lamp is to be extinguished' Lastl! a small > second settling dela! should be allo5ed for" follo5ed b! opening the door' ,nce !ou ha.e !our program to the point 5here the ele.ator can be mo.ed from itSs initial location to the Ath floor as outlined" !ou should then be read! to deal 5ith returning it to the ?st floor'

Exercise F7 99 0 Co ,lete 4 Dloor Ele&ator Control. *n this exercise" !ou are as3ed to add the re-uired logic to implement a complete > floor ele.ator control s!stem' Floors ? and A 5ill be used for this purpose" and all s5itches and lamps associated 5ith these floors are to be made full! operational' :ll added logic should be placed into the subroutine deemed appropriate for the particular tas3" and additional flags ma! be added as re-uired'

Vhen not acti.el! mo.ing" the ele.ator 5ill be located at one of the > ser.iced floors" sitting at rest 5ith the ele.ator car door opened' Vhen at rest" the onl! lamps illuminated 5ill be the appropriate floor indicator lamp located directl! abo.e the ele.ator door' :dditionall!" !our program should not respond to a s5itch press associated 5ith the ele.atorSs current location ,n arri.al at a floor" the built<in s5itch lamp for that floor should be extinguished" and the appropriate floor indicator lamp abo.e the door should be illuminated' 7he door should then be made to open > seconds later' :dditionall!" the door must remain open for a minimum of P seconds before being allo5ed to process another floor re-uest' Floor re-uests occurring during this dela! period should not be ignored" but onl! dela!ed in processing' Vhile 5or3ing on a solution for this exercise" 3eep in mind that !ou 5ill soon ha.e to extend this control to all A floors' Flags to indicate in 5hich direction the ele.ator is tra.eling 5ill be a must' Fortunatel! 5ith just > floors" determining 5hich direction to go is a tri.ial tas3" but one that 5ill become -uite complex 5hen additional floors are added' ,nce !ou ha.e assured that !ou can full! control the operation of this > floor ele.ator" !ou should be 5ell prepared to mo.e onto the multi<floor exercise'

Exercise F8 99 ?ulti Dloor Ele&ator Control. Extending !our program to accommodate multiple floors" 5ould appear to be a relati.el! simple matter of just adding the logic to deal 5ith the additional s5itches and lamps' 7his must be done

COLEGIO DE EST!DIOS CIENT$%ICOS & TECNOLGICOS DEL ESTADO DE '!E"(TA"O

SISTEMA DE GESTIN DE LA CALIDAD ISO 9001: 000

Cuadernillo de Practicas

C!ADE"NILLO DE P"#CTICAS

of course" but a ne5 issue arises in a multi<floor s!stem 5hich can pro.e to be -uite a challenge to sol.e for' Vith a > floor ele.ator" !ou reall! ha.e onl! one choice 5hen deciding in 5hich direction the ele.ator should mo.e' *n a multi<floor s!stem ho5e.er" !ou can be faced 5ith > choices of tra.el 5hene.er the ele.ator is at an intermediate floor' *n addition" !ou must also ta3e into account 5hether the ele.ator is at rest 5ith no re-uests for ser.ice pending" or has stopped temporaril! at the intermediate floor 5hile proceeding to a floor further be!ond in that same direction'

*n our multi floor s!stem" the ele.ator should continue in itSs initial direction of tra.el" stopping at each intermediate floor 5hich has a re-uest pending for that particular direction" and continue in this same direction until the farthest re-uest for ser.ice is reached' :t this point the direction of tra.el should then be re.ersed if further re-uests are pending' :n! re-uests associated 5ith this ne5 direction of tra.el should then be ser.iced' ,nce mo.ing to5ards the farthest re-uested floor" the ele.ator should not stop at an intermediate floor if the re-uest at that floor is for the opposite directionT unless this is the farthest re-uest' ,ther5ise the floor should be b!passed and ser.iced 5hen the ele.ator later approaches the floor from the opposite direction of tra.el' 9eeping trac3 of the direction of tra.el 5ill be critical in this control scheme' *tSs therefore suggested that !ou emplo! both 4Going 6p4 and 4Going (o5n4 flags to help in the decision ma3ing process' ,nl! 5hen there are no re-uests pending 5ould the ele.ator be deemed to be at rest /Vaiting0" and both direction flags 5ould be set false /unlatched0' 7he first ne5 re-uest detected can then be used to determine the initial direction of tra.el" and the appropriate flag set /latched0' ,nce a direction has been flagged" then motion and ser.icing 5ill continue until all pending re-uests are ser.iced' *f re-uired" the direction ma! be changed" but not until all re-uests are ser.iced 5ill both direction flags once again become false' 7he logic associated 5ith determining the initial direction" change in direction" and achie.ing a state of rest" ideall! belongs in the 4Next %e-uest or Vait4 subroutine' 7his logic 5ill definitel! not be tri.ial to de.elop" and !ou are strongl! ad.ised to utilize 5hate.er tools !ou ha.e at !our disposal" including pen and paper to attain a suitable solution'

También podría gustarte