multiple outputs

Terry Woods wrote:

"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?"

Recursion. All those years as a kid on Logo added up to something after all.
 
Recursion is when a routine, to arrive at an answer, may have to call itself with a slightly modified set of its input conditions. An example would be a factorial calculation:

Factorial(X) =

If X equal 1 then
1
else
X times Factorial(X-1)

The 'self-modifying' code could also be called 'adaptive code'
 
So.... I had to think about this one for a little bit... Then do some digging around on google and Wikipedia. Here's what I came up with..

Von Nueman programming?
First thought... Rejected it though. Although the computers/plcs are done with Von Nueman architecture, Von Nueman programming would most likely cover self-replicating programs, not-self correcting. Von Nueman had his fingers in too many pies to be able to pigeon hole one aspect like this.

Homeostatic programming?
Hmmmm.. Good possibilities here... I like it....
Homeostasis is the property of an open system, especially living organisms, to regulate its internal environment to maintain a stable, constant condition, by means of multiple dynamic equilibrium adjustments, controlled by interrelated regulation mechanisms.

Closed-loop programming?
Well....
A closed-loop controller uses feedback to control states or outputs of a dynamical system. Its name comes from the information path in the system: process inputs (e.g. voltage applied to a motor) have an effect on the process outputs (e.g. velocity or position of the motor), which is measured with sensors and processed by the controller; the result (the control signal) is used as input to the process, closing the loop.
Too generic.... Not really specific enough to pin down to programming techniques....

Adaptive Programming?
Adaptive control involves modifying the control law used by a controller to cope with the fact that the parameters of the system being controlled are slowly time-varying or uncertain.
I like it, but it's still used to refer to more generic control systems....



So I'm voting for Homeostatic programming!
 
Jeez, I only wanted to know about multiple outputs on one rung! I didn't think I was starting a homeopathic open loop recusive (or is it recursive) debate. In that case, my vote is with Tom's and I already forgot what that was!
 
I'm late into this thread but my vote goes to "yes it is OK to have multiple outputs in the same rung". No "depends".

I do so all the time.

Why in the world should it be bad for documentation or bad practice or anything ?
It is definitely not "spaghetti", on the contrary. Ask the person who play the "spaghetti" word what he means with it.
 
JesperMP said:
It is definitely not "spaghetti", on the contrary. Ask the person who play the "spaghetti" word what he means with it.


I've used the term spaghetti code, but not for multiple outputs.

Spaghetti code to me a code that is very 'bity' and goes around in circles, usually with excessive parallel branches and one shots.

I've had to re-write more than one machine because maintenance could never fauly find properly (I know the maintenance guy should not have to go into code that often if your messaging is correct).
 
It was SNK who mentioned that someone else referred to multiple outputs as "spaghetti".

I also consider "spaghetti" to be code that is difficult to follow.
Either because it is overly complex or because the logic jumps back and forth between many places in the program.
I just dont see the relation between "spaghetti" code and the use of multiple outputs within the same rung.
 
JesperMP said:
Why in the world should it be bad for documentation or bad practice or anything ?
It is definitely not "spaghetti", on the contrary. Ask the person who play the "spaghetti" word what he means with it.

I am the writer that put in the word Spaghetti, into the forum. The reason I say this is because I have multiple instances that the rung is branched many times over, in the same rung. In the olden days when descriptions and symbols were restricted to 25 characters, there just was not enough room to describe the actions of the rung.

This is why I have been taught (by one of the best programmers out there IMO) that each rung should restrict the parallel branches on outputs to 1 level, therefore each output can be commented accurately. People may disagree, but this is good practice. Sure, there are instances that you may find it quicker to parallel some outputs. In reality, for good programming and documentation practices, it should be limited. (Especially in this age that memory is now available)

How many of you out there have had to troubleshoot a rung that has 25 branched outputs?
 
hi SNK.

I can accept 25 parallel outputs in the same rung if they are "simple" and "similar" so to speak.

Look at it the other way, if you have to add one more condition to all 25 outputs, then you can do it only once in stead of 25 times over.

Just want to argue that multiple outputs in the same rung may have its reason.
I dont see the connection with spaghetti code, it is a different topic.
 
I don't understand serial outputs.
Please explain how they work.
I take it that it is allowed with CLX, but what is the purpose?
Serial.jpg

Thanks
 
In ControlLogix outputs in series on a rung work the same as outputs in parallel. The only difference is in appearance. I prefer the parallel method as it is more comfortable to me and I think the readability of it for others makes it easier to understand.
 

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