Having an output repeat the same amount of input presses

LennyBuffalo

Member
Join Date
Sep 2017
Location
Buffalo
Posts
4
Hey guys,

Thanks for everyone's help with my last question regarding .ACC on timers.

What I'm playing with today is getting a light (output) to flash the same amount of times as the button presses (input).

Ex. I press the input 4 times, the output light would then flash 4 times.

My current ladder logic is getting pretty convoluted and its getting harder and harder to wrap my head around so I figured I'd ask you guys again on how you would approach it.

Once again I'm using Rslogix 500 with Emulate 500.

Thanks again for anyway help that you guys can provide.
 
Maintain a count of button presses. "XIC ONS ADD" comes to mind.

At the end of the current flash cycle, decrement the count, if it's greater than zero. "XIC ONS SUB" also comes to mind.
 
Last edited:
Why not parallel a light into the plc input?
you press the button for the input, the light turns on.


if your logic is becoming massive or hard to understand, break it into sections
and use page comments to denote different sections of the program.
james
 
Well, you would also need a signal to tell the PLC when you're done counting button pushes and ready to start flashing. That could be done with a second button or bit you toggle in the program, or it could be timer based. Also, you could increment and decrement with a ons, but you'd need the output light to stay on for an apparent amount of time (more than one scan). So you'll also need a timer to keep your output on for 500ms or so and THEN decrement the counter.

Is this homework you're asking for help on? Or truthfully just messing around to try and learn stuff.
 
Well, you would also need a signal to tell the PLC when you're done counting button pushes and ready to start flashing. That could be done with a second button or bit you toggle in the program, or it could be timer based. Also, you could increment and decrement with a ons, but you'd need the output light to stay on for an apparent amount of time (more than one scan). So you'll also need a timer to keep your output on for 500ms or so and THEN decrement the counter.

Is this homework you're asking for help on? Or truthfully just messing around to try and learn stuff.

I'm just playing around with it to try to get a better understanding of writing logic and how to tackle problems. I'm a construction electrician and I've been wanting to jump into Industrial electrical for awhile now. I'm planning to take a course in entry level PLC's in the near future but for now I'm just dabbling in it.
 
I had a few minutes before leaving work so I threw this together really fast. This is how I would do what you want to do. It SHOULD work, but as I said I only had a few minutes and was trying to hurry. It's friday, I wanna leave at 5:00:01 lol
 
I'm just playing around with it to try to get a better understanding of writing logic and how to tackle problems. I'm a construction electrician and I've been wanting to jump into Industrial electrical for awhile now. I'm planning to take a course in entry level PLC's in the near future but for now I'm just dabbling in it.

Having spent more years as a pipe and wire guy than I have in maintenance, I highly recommend making the switch if you have the opportunity.

This was originally posted by another member, but I copied it for situations just like this...

Let's begin.
1 write down your scope of work, what is it that you need.
2. write a sequence of events in general terms.
3. review your notes.
4. rewrite your sequence and this time add sensors, motors.
5. review your notes.
6. write down your I/o.
7. rewrite your sequence and this time add the sensors and motors.
in this step, you are the operator and also the plc looking for the I/o to be made. This is the starting point for all projects.

No matter what you are programming, break it down into small steps. Think each step through, write it all down, then move on to the next step. Once you have everything written down and properly sorted, the program will virtually write itself.


Good luck on making the jump to industrial!
Bubba.
 

Similar Topics

Hi all, To make a long and annoying story short, a client has two flowmeters in their water plant and the flowmeter that controls the CL2 dosage...
Replies
6
Views
2,331
Hi all Expert, I need to flash a lamp indicator at a preset frequency. It could be 1Hz, 5Hz or 10Hz I am using Siemens PLC S7-300...
Replies
13
Views
5,634
I have an Allen Bradley temperature switch that I am trying to use in studio 5000. I am getting the message "Unable to interpret the IODD file"...
Replies
0
Views
52
I copied a panel in factory talk HMI for an identical system. The label names are still the same as the original panel but I am trying to change...
Replies
1
Views
126
Hi All, Firstly… Merry Christmas to all of you! Secondly, as some of you may have noticed I made some modifications to our backend to address...
Replies
29
Views
7,076
Back
Top Bottom