OTE in middle of rung

realolman

Member
Join Date
Mar 2009
Location
here
Posts
584
I am not familiar with the practice of putting an OTE in the middle of a rung or how the logic works when this is done.

I've never seen it before but came across it in ladder logic today


Equal----OTE----XIC----timer


EQ-----OTE---| |----TON

Does the XIC need to be true for the OTE to be true?

If the XIC is true does the timer time only when the OTE is true?

How does the timer fit into the logic of making the OTE true?

thanks
 
This is a common practice in Controllogix programs.

It is equivalent to



-----+--EQU------+---------+-------------------( )----
| A| |
| B| |
+-----------+ +--] [---+-TON----------+-
| MYTIMER |
| PRE |
| ACC |
+-------------- +




but it takes three less instructions to program it.
 
Last edited:
How do people in general feel about this practice?

Personally, I think its an abomination. Is it just me?

I'm just used to seeing ladder logic like I would see relay logic.

Are the few instructions it saves really worth it?
 
How do people in general feel about this practice?

Personally, I think its an abomination. Is it just me?

I'm just used to seeing ladder logic like I would see relay logic.

Are the few instructions it saves really worth it?


I could not agree more. Maybe I'm just to old.
 
I agree. It isn't worth saving a few bytes if it decreases the readability of the code. But i have used it in a few cases as it solved some programming issues in a few less rungs. I sometime series together a few OTEs. But only at the end of the rung.
 
thank you

I don't like it

i have enough trouble . That logic doesn't seem logical amd I like the OTEs on the end
 
Last edited:
I wouldn't call it an abomination. There are many places where it can make the program much more readable.

Imagine a section of code that needs to perform 16 MOV instructions, if they are on 4 rungs of four each, they all fit on one screen nice and clean...if they are on 16 rungs or branches you can't convince me it is better if I have to scroll through two pages to see them all.

So there are good reasons for this feature in my opinion.

With that said, i don't want to see a spaghetti rung with forty branches without output scattered everywhere just because it's faster. It will happen though, some programmers seem enjoy writing code that will generate a reaction of shock and surprise. They get that twinkle in their eye when they do something really bizarre that actually works. It might be one guy twenty years later who receives the surprise, but I swear I still think that must be the motivation for some of the code I have picked apart.
 
Last edited:
I use it heavily. I almost hate using RSLogix500 now because it doesn't allow this and similar structure.

It all boils down to the fact that it IS a program, not an electrical diagram.

These are instructions, not devices.

The very act of insisting on thinking of ladder as a circuit diagram is precisely what causes so many to struggle with the simplest of problems. If you take the time to understand how the instructions are being executed, then this only adds to the readability of the code and allows you to fit much more logic in a much smaller footprint.

Paul's example with the MOV instructions is a good one that comes up often.

I like being able to see the whole picture. I hate having to endlessly scroll through reams of mundane logic. If I can fit 10 OTEs in series on one row as opposed to 10 rows then it is all the more information that is instantaneously available to your eyes.
 
It is absolutely fine. The logic is clear, certainly not an "Abomination". I guess, it is an "Abomination" that we use cars instead of horse drawn carriages as well?

And spreadsheets rather then an abacus?

Tech moves on. Grow with it, or pick a year and freeze yourself into it, never to advance, never to do anything differently.

How do people in general feel about this practice?

Personally, I think its an abomination. Is it just me?

I'm just used to seeing ladder logic like I would see relay logic.

Are the few instructions it saves really worth it?
 
A data move instruction is not an output, although some RLL programming packages have treated it as if it were. Resistance to change is not the issue here. The issue is maintaining standards. there is always a compromise involved in keeping balance between standards and innovation.
 
A data move instruction is not an output, although some RLL programming packages have treated it as if it were.

Not sure what you are getting at with this statement, but I disagree with any way I can find to interpret it.

There are only two types of instructions. There are those that "test" a memory/register values and those that "write" a memory/ register value. It is that simple. An OTE instruction either writes a 0 or a 1 into the boolean memory it was assigned to. A MOV instruction writes the value of one memory/register value into another. They are both write operations. They are fundamentally the same thing. Thinking an OTE behaves any differently is paramount to saying there are tiny little relays coils in the CPU being energized and de-energized.

So depending on how you want to define "output" either both an OTE and a MOV are output instructions or they both are not, because at the end of the day all either do is write values into memory/registers.


Resistance to change is not the issue here. The issue is maintaining standards. there is always a compromise involved in keeping balance between standards and innovation.

Resistance to change is the issue. Has nothing to do with standards. There was never any "standard" in the beginning that said "you must never have more than one energize coil instruction in series", because the capability was never there in the first place so nobody ever thought to think of it as being done any other way.

The two camps that give the most resistance to this change are the ones that insist their program is an electrical circuit model and the ones that spent so long not being able to do it that way in the beginning that they can't shake that internally programmed feeling they have developed over the years that it just looks wrong. And I get that. I've had to reprogram myself as well. It's just human nature. But it is not a good reason to shunt progress.

Standards are rarely kept up to date and are always heavily bias towards the stone ages because nobody ever wants to waste their own precious time on such boring and time consuming endeavors. That is why there will never be balance where that is concerned. I still see customers specs that emphatically demand that all IO wiring be a minimum of 14awg! Try getting that into the IO screw terminal of a 1769-L16ER-BB1D. Standards have their place but they are all too often taken far too overboard and go into far greater detail than necessary. When someone hands me a 600 page book of their standards now days to bid a job I am reluctant to quote it anymore because who wants to spend 3 days just reading somebodies spec?
 
For your information, Siemens S7 has exactly the same functionality.
Rather than --()-- in the middle of a rung it is a --(#)-- in the middle of a rung.
I use it many places and it would definitely be cumbersome if it is not there.

Anyone that knows electrical diagrams understands that this is simple akin to tapping the voltage in the middle of a circuit and use it to drive a relay. Nothing unnatural about it.

DamianInRochester said:
When someone hands me a 600 page book of their standards now days to bid a job I am reluctant to quote it anymore because who wants to spend 3 days just reading somebodies spec?
Hear hear.
Why cant they say the want the industry standard and regulations + 1 page of specific requirements that go beyond the industry standard and regulations.
When I finally get to have a meeting with the guys that matter, it usually turns out they really only have a few specific wishes. The standard specification I had to read was just company standard that noone actually really cared so much about.
 

Similar Topics

So I'm pretty new around here but I come looking for advice or suggestions to research. Im the plant electrician/SCADA guy for a warer department...
Replies
2
Views
35
See the screenshot of EIP tag list. We are trying to read in a digital input that is hard-wired. It is shown here as I31.1. I believe we cannot...
Replies
7
Views
281
Hello Dear users, I am writing about a problem that has been bothering me for a few days, i.e. I am trying to establish remote access to the Allen...
Replies
0
Views
87
Hello All, I need the ability to remotely reboot a Red Lion CR3000 HMI. Due to some graphics issues when the database is updated the HMI must be...
Replies
4
Views
218
I have to provide remote access and control to a touch screen. I was thinking about using Weintek and the Weincloud. Does anyone know if this is...
Replies
11
Views
594
Back
Top Bottom