Sunday, September 14, 2014

PLC Lights and Switches

The next challenge will use the board on the image below. There are several options with this one. You can use the lights on the right or the traffic lights.

This board has 2 push-buttons (normally open) and two switches with two positions (two outputs per switch) for a maximum of six inputs. The third generation of this board has 5 different switches for a maximum of 9 inputs. There are six LED lights on the right and the wiring for the traffic light also was designed for also controlling 6 outputs (2 green lights, 2 red, lights and 2 yellow lights).


El siguiente desafio usará la tarjeta de la imagen de abajo. Hay varias opciones con esta tarjeta: puedes usar las luces de la derecha o las del semáforo.

Esta tarjeta tiene dos pulsadores (normalmente abiertos) y dos interruptores de doble posición (dos salidas por interruptor) para un máximo de 6 salidas. La tercera generación de esta tarjeta tiene 5 interruptores diferentes para un máximo de 9 salidas. Hay 6 luces LED en la derecha y el cableado del semáforo está diseñado para controlar también 6 luces (2 rojas, 2 verdes y 2 amarillas).


The board will be used for two tasks:
  • Lights and Switches Challenge
  • Traffic Light Coding

La tarjeta será usada para dos tareas:
  • El Desafío de las Luces e Interruptores
  • Programación del Semáforo

The Lights & Switches board / La tarjeta de Luces e Interruptores


1st part of the challenge (warming up):
  • First push button will turn on the yellow light (and turn off the 2nd light if it's on)
  • Second push button will turn on the 2nd LED light (blue color) and off the yellow LED if it is on.
  • The third switch will control the green LED in one position and the red LED in the other position.
  • The last switch will control the last two LED lights (yellow and red).

2nd part of the challenge (still warming up):
  • When pressing the two push-buttons at the same time the LEDs will perform the running pulsating lights, a.k.a. as the Knight Rider car lights or the Cylon lights from Battlestar Galactica.


3rd part "The Challenge":
The program should be able to make the 1st part and the 2nd part of the challenge but on the same code: without the coding for the switches of the first part affecting the running lights code. The should run as if they were individual.

Primera parte del desafío (calentamiento):
  • El primer pulsador activa el LED amarillo (y apaga el 2do LED si está encendido)
  • El segundo pulsador enciende la 2da luz (de color azul) y apaga la amarilla si está encendida.
  • El tercer interruptor conotrolará el LED verde en una posición y la roja en la otra.
  • El último interruptor  controla las últimas dos luces.

2da parte del desafío (aun calentando):
  • Cuando se presionan los dos pulsadores a la vez, los LEDs empezaran la secuencia de luces pulsantes, mejor conocida como las luces del auto de Knight Rider (El auto/coche fantastico/increíble según el país) o las luces Cylon de Battlestar Galactica.

3ra parte "El Desafío":
El programa ahora debe de correr la 1a y 2da parte del desafío en el mismo código sin que el código de la primera parte afecte al de las luces. Deben de correr como si fueran codigos independientes.



After "The Challenge", you can start planning about the traffics light programming.


Después de "El Desafío", puedes planificar acerca de la programación de las luces del semáforo.

If you design your own board, you may improvise as you see fit. My first board (photo below) was not a elegant an clean as the second generation. Si diseñas tu propia tarjeta, tendrás que improvisar según sea necesario. Mi primera tarjeta (foto de arriba) no es tan elegante ni tan limpia como la de la segunda generación.
First prototype board / Primer prototipo de tarjeta

No comments:

Post a Comment