multiple outputs

Just to add another "it depends" answer to the original question..

I would say in the example you posted then having two outputs on the one line is fine. It means you are not repeating X1 on another line, therefore you are saving memory and it is also perfectly clear what the rung is doing.

However.. if the rungs were likely to get bigger or they had a lot more conditions involved in bringing on the outputs I think I'd tend to split them into individual networks.. this would make it clearer to understand and more scaleable in the future...

Just my tuppence worth...

JT ;-)
 
Been a few years since I programmed AB, in Siemens we just have parallel and thats it, no cost to scan time, just whatever the instructions in the branches use.
 
I don't see any problem with using multiple outputs on the same rung as long as the logic of execution is clear. For example, you may want a 24 VDC local alarm light to come on at the same time as a relay with a 120 VAC coil that is used for remote alarm indication. You couldn't use a single output, the logic is clear, and you would always want the two to come on together.

On the other hand, if you start putting contacts between the branch and a coil, as shown in Geniousintraining's post the practice becomes questionable. It isn't as obvious at a quick glance what is going on. In that case I would break it into two separate rungs. This is simply personal preference, though.
 
As I have indicated in previous posts like this one, My Engineering Manager and Software designer did not like branched rungs, and usually referred the code as Spaghetti logic.

It all had to do with documentation though, not PLC logic.

In my history as a basic programmer, it never caused any problems to enable a bit, and on the next rung, use that bit to enable or disable whatever outs that you intend on enabling. PLC's today have lots of memory, and we design so that the basic maintenance worker can troubleshoot.

I was taught State Logic programming. This is the basic concept...enter a state, change the state, leave the state.

I however, never enable outputs within the structured logic. I call additional subroutines in my logic with the bits to enable final outputs. That way, addresses can be substituted easily down the road.

That spoken, I still see in my programs a latch, and below it an unlatch...etc. Look at a single button toggle control. How would you do it with seperate outputs?
 
To genius: Once I got the block wired properly, the motor started and stopped perfectly and has been fine ever since. Thanks for the help.


The rung that I had the argument about is very similar to what genius posted. My cohort was very adament about multiple outputs being BAD PROGRAMMING!!! I have worked with some very old PLC's that would not allow multiple outputs, but I have never heard or seen anyone mention that this was bad practice. From the responses, I can pretty much assume he is in error in his thinking.
Is that right?
 
stvsas said:
To genius: Once I got the block wired properly, the motor started and stopped perfectly and has been fine ever since. Thanks for the help.


The rung that I had the argument about is very similar to what genius posted. My cohort was very adament about multiple outputs being BAD PROGRAMMING!!! I have worked with some very old PLC's that would not allow multiple outputs, but I have never heard or seen anyone mention that this was bad practice. From the responses, I can pretty much assume he is in error in his thinking.
Is that right?

Not necessarily in error, just not efficient. GIT's example is very common for stack lights:
Lad.gif

X0 (and any other contacts) is the accumulation of any and all faults
YO is a internal bit designated as the FAULTED bit
X1 is a heartbeat, say every 1 second
Y1 is a output to drive a RED stack light to let others know the machine is faulted; X1 flashes it
 
There might be some "never does" and some "always does" that always give the best code, but I'm not aware of them. Not PLC related, but I once programed some code that modified itself...to the horror of the Computer Science degreed types. I did it because it was the ONLY way I could figure out to accomplish the goal. None of the CS guys could offer an alternative.

In your case, if the two outputs have connected function, then I prefer to see them on the same rung.

One project I am currently working on is a machine which refills ink-jet printer cartridges. For the color cartridges, you want to run the pumps for the three colors at the same time. Putting the three outputs on a seperate rungs would just be silly. (These are small pumps so the PLC can drive one pump directly from the output, but not three.)

On the power surge thing: Most PLCs update the outputs at the end of a scan, so putting them on different rungs still switches the loads on at the same (or nearly the same) time.
 
Kevbo referred to "self-modifying" code...

I LOVE IT!!!

I do it often! It's easy! Of course, only under the most carefully designed conditions.

Think about it... it's most basic form is something like timer values.

That is an operator interface issue.

What if... what if the operator could modify reactions based on operator-selected input conditions? These could be analog or digital input conditions.

Hmmm... I've done it... can you?

I've even had the process itself modify the operational considerations of the process based on real-time, operational conditions. (HINT: It's all a matter of History! It's all a matter of running the process as if YOU were the manual-operator/process-controller!)

In terms of multiple outputs... all that matters is that the individual output is properly controlled.

This goes back to the question that Peter and I have never resolved over several years... what is the name of that particular style/relationship?

Re-entrant?
Back-tracking?
Partial?
Parallel, or Partial, with additional conditions?

What is it? What is it called???

There's gotta be a name for that!

I suspect that there is a name available, somewhere, in the fundamental aspects of logic... as opposed to any conveniently created name by any particular manufacturer that has no problem re-defining the basic concepts of logic. Duh... guess who?

Yeah... it's a dig, but not unfounded!
 
Terry Woods said:
It's all a matter of running the process as if YOU were the manual-operator/process-controller!
And to think, all these years I've been following Terry's "Be the computer" mantra. Now I have to "Be the manual-operator/process-controller"... :rolleyes:

Terry Woods said:
This goes back to the question that Peter and I have never resolved over several years... what is the name of that particular style/relationship?

Re-entrant?
Back-tracking?
Partial?
Parallel, or Partial, with additional conditions?

What is it? What is it called???

There's gotta be a name for that!
Um, maybe "terr(y)ifying"?... ;)

🍻

-Eric
 
IMHO, it does not "depend".
The ONLY criteria is that it "works" and that it does not make the program too difficult to follow.
My bet is that multiple outputs will almost always make the program easier to follow.
But, I am only 'right' 34.8% of the time, according to my wife.
 
I may be off base on this one but I use multiple outputs on a single rung all the time. Perhaps your co-worker misunderstood the common output no-no which is to address the same output more than once in a program? (ie double coil) I have only heard the multiple ouput=bad from people who may have not had much experiance with PLC programming. A little info can be a bad thing (someone who has just taken a single PLC class etc.) Some times the terminology can be confusing to newcommers, but like I said, I could be totally off base.

IMHO there is no problem with adressing multiple outputs on a rung per se
Marc
 
I concur. Multiple outputs in PARALLEL is not bad practice. Recently I have seen multiple outputs in series on rungs also. I consider this bad practice because of personal preference. My thinking is that my logic is a computer re-creation of relay logic as it would be hard wired. Since I'd never wire two coils in series with one another, I consider this programming practice to be poor. Now, that being said, does it actually mean that it's bad programming practice completely? No, probably not. It's just my preference. Rather than putting them in series, I'd just put them in parallel and consider it a job well done. :)
 
Once again, the difference between parallel and series coils, is efficiency. A branch adds three instructions to a simple parallel branch (on AB).
XIC Test OTE Output1 OTE Output2
vs
XIC Test BST OTE Output1 NXB OTE Output2 BND

And, just personally, I dislike equating PLC Code / Ladder logic to an actual relay control system. They are similar, but absolutely not the same things :)


russrmartin said:
I concur. Multiple outputs in PARALLEL is not bad practice. Recently I have seen multiple outputs in series on rungs also. I consider this bad practice because of personal preference. My thinking is that my logic is a computer re-creation of relay logic as it would be hard wired. Since I'd never wire two coils in series with one another, I consider this programming practice to be poor. Now, that being said, does it actually mean that it's bad programming practice completely? No, probably not. It's just my preference. Rather than putting them in series, I'd just put them in parallel and consider it a job well done. :)
 

Similar Topics

I have the control system that should control two blowers by one common input flow set point. I painted the simple picture, see the attachment...
Replies
7
Views
2,362
hey, I used the same output tag for two different rungs in the same routine & realised the output failed to energise.I have also tried using the...
Replies
5
Views
1,541
Hi, Does GX IEC Developer 7.04 have a option to enable multiple outputs using 1 input? Thanks
Replies
1
Views
1,344
hello.. I use S-315 to run plastic Extruder. There is heating zone with cooling fan to stabilize the temperature I have not found PID SIMO...
Replies
5
Views
5,704
Hey there, I have a PLC 5 in which I have outputs 1,5,6,and 11 stuck high. The LEDs on the card do not indicate the output is one, but there is...
Replies
4
Views
4,792
Back
Top Bottom