Hi, everybody.
Well, I know traffic lights are a very "hot" subject (especially when students are posting, but I have tried to find some way to make traffic lights for the program we're using at school (Sucosoft S40), so I was wondering if someone could paste the program code for a sample traffic light (it doesn't need to be anything advanced. It could just be 1 single light going green for 10 secs, then yellow for 5, then red.
I just need to understand how I will have to deal with the timers.
I've tried for a couple of hours, read a few websites, but I didn't get much out of them..
(what I mean by program code is such as
Hope anyone of you have experience with Sucosoft S40 (and are willing to help me out (o: )
And by the way; the PLC I'm using is a PS4-151-MM1
Well, I know traffic lights are a very "hot" subject (especially when students are posting, but I have tried to find some way to make traffic lights for the program we're using at school (Sucosoft S40), so I was wondering if someone could paste the program code for a sample traffic light (it doesn't need to be anything advanced. It could just be 1 single light going green for 10 secs, then yellow for 5, then red.
I just need to understand how I will have to deal with the timers.
I've tried for a couple of hours, read a few websites, but I didn't get much out of them..
(what I mean by program code is such as
Code:
PROGRAM test
VAR
Button1 AT %I0.0.0.0.0: bool;
Button2 AT %I0.0.0.0.1: bool;
Output AT %Q0.0.0.0.0: bool;
END_VAR
LD Button1
OR Output
ANDN Button2
ST Output
END PROGRAM
Hope anyone of you have experience with Sucosoft S40 (and are willing to help me out (o: )
And by the way; the PLC I'm using is a PS4-151-MM1
Last edited: