Posts

Showing posts with the label PLC Programming

Garage Door Opener for ProLogix

Image
Here is the garage door opener example in ProLogix.  This is a fairly simple program.  I'm not going to explain too much here since the code comments explain everything.  In the real world this should have a 5th input for detecting if something is in the way of the door. *Note: Some of you may be wondering how to know when the door is ajar when their is no door ajar switch.  Just think about it for a bit.  A door ajar is really when door open switch is still closed but closed door switch is still open. :) Inputs: Open Button Close Button Door Open Switch Door Closed Switch Outputs: Motor Up Motor Down Door Opening Light Door Closing Light Door Ajar Light This is a good practice in PLC programming  to assign I/O to internal program variables The logic for the controls in a Controller Finally in Main call the subroutines 

Traffic Intersection Simulation for ProLogix

Image
Here is my implementation of the traffic intersection exercise for ProLogix.  Some people use SQO's but when you have to alter how the program runs due to random inputs like a pedestrian push button that can occur at anytime it has it's limits. My program uses a single timer and each light has a designated time interval in which it is lit.  The random inputs like pedestrians pushing the button or a car entering a loop while the light is red simply alters the timing.  There is one functionality that I still need to implement in the program and that is when you push the pedestrian button it needs to "hold" over until the next cycle if you press it too late.  What I have here should be sufficient for you guys to get some ideas though that doesn't involve SQO's or multiple timers.  Though I will admit multiple timers would probably be more versatile. Inputs: North West Crossing Button North East Crossing Button North West Loop North East Loop Outputs: ...