Sequencing one light with one push button S7

So I was able to figure it out using a bunch of timers and counters. It's poorly done but I didn't quite understand the state machine so I will look into it more since it seems like a powerful way to program. Again, I'm extremely new to this so I tried with what I knew. I figure you guys will probably rip me apart on this but this is what I was able to get done but I appreciate the help.

Thanks!

Sequencer 1.png Sequencer 2.png Sequencer 3.png Sequencer 4.png
 
How did you test this?


The original spec had one button and one light - you are using two buttons and two outputs/lights.


You have two networks controlling the same coil (n/w 2 and n/w 5) - the last one will "win" so n/w 2 does nothing.


Consider your code well and truly ripped apart :)
 
For future reference, select Options/Customise from the ladder editor and select the option to generate source code automatically. Each time you save a block the source code will be written in the sources folder. Double click on the relevant source container and you can copy the source text and paste it into your post - that way we can generate your code typo free without having to enter it manually from your screen shots.

src.jpg
 
I did notice something funny about the original task. The way it is presented, makes every fourth push of the button seem to do nothing. It just advances in the sequence of events, no output changes.
 
I did notice something funny about the original task. The way it is presented, makes every fourth push of the button seem to do nothing. It just advances in the sequence of events, no output changes.

I noticed that too, but let it pass because so many people don't know how to formulate questions correctly. In my mind the sequence has already "stopped" after the 3 flashes from the third press, so you don't need to "stop" a "stopped" sequence....

Or, you could consider the fourth press to be a "reset" action, making the fifth press the start of the sequence again, flashing the light once.
 

Similar Topics

I need to make a sequence of lights flash on and off in automation studios using AB PLC. I have to use timers and counters. The required sequence...
Replies
51
Views
13,510
Does anyone have sample logic with conveyors that start and stop according to product on the line?
Replies
1
Views
99
Hello, I am struggling to figure out some logic. I have an analog pressure sensor coming into the PLC and would like to have multiple timing...
Replies
4
Views
150
One of my customers builds equipment with a MicroLogix 1100 using a program I wrote some years ago. Now he wants to transition to a Micro 820...
Replies
1
Views
1,857
Well Gentlemen, once again, I am trying to figure out how to do something in Logix, and I cannot seem to get it to work like all the YouTube...
Replies
13
Views
2,931
Back
Top Bottom