a few questions about ladder logic programming

david90

Member
Join Date
Apr 2010
Location
ca
Posts
202
1. Is there a scenario where it's ok for multiple XIC or XIO coil instruction to reference the same physical output channel memory location?

2. What do you call a PLC program that is generated solely from boolean expressions and is not state based? For example, a plc program is sequential if ladder logic instructions are used to implement states.
 
Last edited:
common practice

It is common practice to program coils in one place only.
You can OR several bits to drive the coil, and have those bits set elsewhere in the program.
Coils can be duplicated in seperate subroutines, sometimes with unexpected results.
Newer PLC's can do function block and structured text programming.
Ladder logic is usually considered parallel, not sequential. But you can program a sequencer in ladder logic.
 
1. XIC or XIO are not coil instructions.
If the question is about XIC or XIO indicating a physical output coil state, than the answer is yes.
This is the way a program knows the output coil state, if necessary, and it may need it in more than one place.
However, the coil status may be different before and after the coil instruction, if the coil status changes in this scan.

2. This is known as combinational logic.
Not to be mixed with combinatory logic from computer science.
 
assumptions...

I assumed you knew 'eXamine If Closed' and eXamine If Open' were input instructions. AB uses OTE, OTL and OTU output instructions.
If you have a double solenoid valve it is common to use XIC's to prevent both coils from being energized at the same time.
And there is also sequential function chart programming.
 
1. XIC or XIO are not coil instructions.
If the question is about XIC or XIO indicating a physical output coil state, than the answer is yes.
This is the way a program knows the output coil state, if necessary, and it may need it in more than one place.
However, the coil status may be different before and after the coil instruction, if the coil status changes in this scan.

2. This is known as combinational logic.
Not to be mixed with combinatory logic from computer science.

Oops my mistake. I didn't mean XIC or XIO. I meant output coil.

Anyway, would you say that combinational logic is used to implement simple machine logic while sequential logic is used to implement more complex machine/process logic where the steps are well defined?
 
Last edited:
1. Is there a scenario where it's ok for multiple XIC or XIO coil instruction to reference the same physical output channel memory location?
You will find that if you have the same OTE address on different rungs, you turn it on on one rung and then a few rungs later where its in logic and not enabled it will get turned back off. Basically it was never turned on when the scan reaches the end of your Main ladder.
Now your getting into OTL/OTU.
I would you would have a need reason to start doing that.
 
Oops my mistake. I didn't mean XIC or XIO. I meant output coil.
Then clarify your question. Did you mean so called "duplicated coil" scenario?

Anyway, would you say that combinational logic is used to implement simple machine logic while sequential logic is used to implement more complex machine/process logic where the steps are well defined?
Typically this is the case, but by definition the difference has nothing with complexity of the logic. A flip-flop has very simple logic, but it is a sequential device.
Combinational logic produces result based only on the actual status of the input data. Previous data is not involved in neither form (previous state memory, timing, counting, etc). That is, there are no sequences by definition.
 
Last edited:
Then clarify your question. Did you mean so called "duplicated coil" scenario?


Typically this is the case, but by definition the difference has nothing with complexity of the logic. A flip-flop has very simple logic, but it is a sequential device.
Combinational logic produces result based only on the actual status of the input data. Previous data is not involved in neither form (previous state memory, timing, counting, etc). That is, there are no sequences by definition.

I see.

The duplicated coil scenario is when a memory location is referenced by multiple coil instructions that are on different rungs.
 
I see.
The duplicated coil scenario is when a memory location is referenced by multiple coil instructions that are on different rungs.
Yes, multiple coil instructions driving the same bit, not necessarily a physical output.
However, a question comes up immediately, whether OTU and OTL should be considered coils for this definition.
Nevertheless, even duplicated OTE may be a valid technique.
Duplicates located in non-executed fragments of program (e.g. subroutine) is a typical example.
 
Last edited:
regarding OTU and OTL instruction, I can see a scenario where multiple OTU instructions references a single boolean memory location.

What if the duplicate OTE instruction causes a conflict where one OTE turns on and the other, in a different location, turns off? I guess it's ok if the two OTE instructions are never executed at the same time.
 
An OTE is always 'executed' if the rung it is part of is scanned. If the rung is TRUE up to the OTE it turns the output location ON. If the rung is FALSE it turns the output location OFF.

This is different from OTL or OTU instructions. If the logic in their rung is FALSE they do NOTHING to the output location, it remains as it was (true or false).
 

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
Good Afternoon , I'm having my first experience with a Guardmaster Configurable Safety Relay 440C-CR30. So far , I really like the...
Replies
1
Views
1,626
I was just curious as to how the .csv file was going to come out when using DataStore plus on a PVP 7. When the "Trigger" transitions from a 0 to...
Replies
5
Views
2,171
Hello all Life long electrician, and been playing with a Mitsubishi FX3U-64M + FX3U-4LC PID controller. Its installed and programmed in a piece...
Replies
12
Views
4,536
Dear Users, First and foremost I would like to greet every single one of you, for this is my first post on this forum :) What I have is a system...
Replies
7
Views
3,621
Back
Top Bottom