simple traffic light for zebra crossing please

razali

Member
Join Date
Jan 2003
Location
malaysia
Posts
7
Hello guys… First at all, thanks to everybody in this forum who give me much supports and encourages, since my first visit to this forum last month. This site is very great, and you all is very supportive friends.
Well, today I tried programming my OMRON CPM1A PLC at the faculty. I programmed a simple traffic light, specific for use at Zebra Crossing. From this forum, I slowly learn about PLC, and now interest comes. Like this, I want to build a traffic light systems that when we supply power supply to the PLC, the GREEN light at 010.00 ON. Then , 20 seconds after we push ON the N/O push button at 000.00, the GREEN light will ON (1s) and OFF (1s) repeatedly for 10 seconds. Then , after that, the YELLOW light at 010.01 will light ON, at the same time the GREEN light OFF. Then, after 10s ON, YELLOW light will OFF, and at the same time the RED light at 010.02 will ON for 15s. Then after 20s ON, the RED light will OFF and the GREEN will again ON until somebody come and PUSH the push button at 000.00.

This is the program that I have done.

LD 000.00
OR 200.00
AND NOT 000.01
OUT 200.00
LD 200.00
OUT 010.00
LD 000.00
TIM 000 # 0200
LD TIM 000
SET 210.00
LD 210.00
RSET 010.00
LD 210.00
TIM 001 # 0100
LD 210.00
TIM 002 # 010
LD TIM 002
AND NOT TIM 001
OUT 220.00
LD 220.00
SET 01000
LD 220.00
SET 210.00
LD TIM 001
SET 230.00
LD 230.00
OUT 010.01
LD 010.01
TIM 003 # 0100
LD TIM 003
OUT 240.00
LD 240.00
SET 010.02
LD 010.02
TIM 004 # 0200
LD TIM 004
RSET 010.02

END ( 01)

When the above program is run , a few problems occur. First, after 20 seconds ON, the GREEN light only ON and OFF for once only. The rest 8s it OFF. This is what I hope you guys can help me. Then when, RED light OFF, the systems straight away stops. The green light did not ON. I have to OFF the PLC ( switch it to PROGRAM MODE) and then again turn to RUN mode to up the system. I do not know how to make the system works in loop or circle. I found one example which use 253.13 instruction bit, but I can not understand it>
So, could any one please give a hand to me?

Best regards
Razali
 
Thank goodness its OMRON, which I do not know, and a traffic light, which I hope never to know again.

I made this to keep the thread high because you have made a strong effort and I hope those that do know OMRON will offer suggestions.
 
Please, if you use CX-programmer, use ladder programming and symbolic addresses as 010.00 'GREEN' so I (and many other hwo not ever seen OMRON-code) can easyly follow the code. Anyhow here are many people who can comment your statment list.
 
OK Guys, this is what it looks like in CX Programmer. Took me several minutes to cut and paste it together. I'll come back later and analyze it. Feel free to go ahead.

trafficlight.jpg
 

Similar Topics

How would I use structured text in TwinCat 3 to make a simple simulation of a stoplight/intersection? Red light, green light, yellow light...etc...
Replies
5
Views
2,062
Hi all, Writng a FB in ST on Beckhoff TC for a pulser which turns on and off on a cycle, is paused by turning bControlInput to FALSE, but resumes...
Replies
6
Views
245
I'm trying to build my Classic Step 7 programming skills this weekend. I get stuck on little things that are not covered in YouTube tutorials. I'm...
Replies
7
Views
311
I have a program that does a 7 second "scan" sensor calibration routine whenever a setting (setting is called assistance level or "AL" and ranges...
Replies
3
Views
207
Hi all, I have a simple question that I have overcomplicated and gotten stuck on. I have a variable, we can call it "light" that I need to stay...
Replies
4
Views
298
Back
Top Bottom