Newbie. Creating a push-ON, push-OFF while alternating between two outputs

Brandon_K

Member
Join Date
Mar 2016
Location
Pittsburgh, PA
Posts
150
A quick bit about me;

Electronics, circuit and design engineering I'm very knowledgeable in. Amusement Industry show controllers and programming, I'm very good. Ladder logic? Not so much. I took a 101 class on ladder logic back in November taught by Doug Bell at Automation Direct to get myself more comfortable with ladder logic. Fantastic class! Unfortunately, the programming software was DirectSoft and works a lot differently than what I'm using. Speaking of which, I'm using Productivity 2000 PLC's with Productivity Suite software. In addition, that was 4 months ago and truth be told, I've let a lot of it slip. Some of it is coming back now that I'm actively working with the PLC, but it's still all a bit fuzzy.

Right now I have some input simulators in my rack to test various functions and devices out in the field (this is an amusement-type of install, not machinery). I've run out of physical switches to map to outputs, so I figured I should learn some new logic.

What I would like to do is have X4 turn on Y4 for 6000ms. Then on the next activation of X4, I want Y5 to turn on for 11000ms. The third press of X4 would revert baxck to Y4 for 6000ms.

I tried to teach myself how to do it via this link; http://*************************.com/2012/04/push-to-on-push-to-off-plc-program.html but unfortunately some of it is Greek to me. I don't know how to do memory bits on the Productivity software (which examples 1 and 3 use). For example 2, I don't know what the symbol on the second rung is, to the left of the C0 counter (maybe that's part of the counter?). The counters do not "program" in Productivity like they do in DirectSoft.

Any help for a newbie would be much appreciated.

I've attached a screen shot of what my "CNT" function looks like. I'm a bit lost on the equal, greater than, less than portions as I don't remember those being in the DirectSoft version?

Productivity.jpg
 
Last edited:
I believe that symbol is an "equal to" on the 2nd rung of the 2nd example.

There are many different ways to skin this cat.

Productivity suite software gives you a handy dandy toggle coil instruction. Not all PLCs have this available. That instruction would allow you to use one input instruction to cause the output bit to change states on each false to true transition without any other clutter.

The Counters in PSuite are set up with a lot of different tags that you may not need 90% of the time. If you use the structure type of address and give it a name, they will be created for you. Afterward, you can go back and uncheck the "use structure" check box and change some of those tags to constants or other tags if necessary.

As for creating a "memory bit", since it is tag based addressing, you can just write an instruction that calls for a bit type of address and for the tag, just give it a name, and the software will prompt you to create a tag if it doesn't already exist.

When the "Define Tag" dialog appears, just look over the details and make sure it picked what you want. Look carefully at the data type, retentive, etc. Some of the details won't appear there but can be edited in the Database editor later (like initial value).

What you are doing is often called a flip flop and there are dozens of threads in this forum in which they're discussed.

Since you are using PSuite, I would not necessarily say you should try to do it the old fashioned way...use the best tools in the pallette.

Also, this software has what is called a debounce coil which is basically a fixed pair of timers (on delay and off delay) that can do the timing of the output for you. It may not be the best fit in this particular case but they are quite handy in the real world for many other situations.

As for the counters, I had to play round with the different flag bits and conditions to get the behaviour I wanted and I am still pretty new with this software, don't have my work available to me at home to lean on.
 

Similar Topics

Hello all, I'm a new member here. I've joined as I want to learn about PLC programming. I've got a few questions to begin with. To get me...
Replies
37
Views
4,559
Howdy folks. Been doing PLC programming for like 15 years now in LD and ST, but I'm trying to learn SFC now and have a kind of dumb question... I...
Replies
4
Views
1,398
Hello. New to Unity and had a couple quick questions. Can a Modicon M340 output to a small multiline LCD screen and not a full HMI?
Replies
4
Views
964
Hi. I'm learning AOI programming in RSLogix 5000. I created an AOI with several input and output parameters but when I choose the AOI in the main...
Replies
17
Views
3,210
Good morning, I've had an inverter fail with firmware revision 5.002, the only spare is Rev 7.001, when updating the project with the new...
Replies
2
Views
1,260
Back
Top Bottom