You are on page 1of 2

Relays cascade:

A B = A + B

A + B = A B

Algorithm rules:
1. Split sequence into groups
2. The groups are to be executed one by one, where each time only
a single group is active.
3. Within the group, a cylinder may have a + command (A+) or "-"
command (A-), but not both.
4. Each group requires a unique memory element (Flip-Flop), so
saving money requires minimal number of groups. In other words,
groups must be as large as possible, as long as they con't conflict
with previous rule
Starting condition is and AND operation for all CR's, except for CR1 and
CR2.

Control valves with return springs: if any cylinder is kept in the same
position for several groups, add it to the group. However, if the last
group contain only returning commands, it could be eliminated. In such
a case, don't forget to AND its termination state with START and change
unset cond. for the last group.
On-Delay timers: add branch for actuating a timer. If grouped in the
end, add it to set condition of next CR. If grouped in the beginning, add
it to actuation condition of process.

PLC (Programmable Logic Controller):


PLC is working in cycles, Xi could not be changed during one cycle.
CR- inside memory, Y- memory and output.
Commands for PLC:
OUT = save in memory address. Leaves current value in memory, so that
it could be used more.
LOAD = Delete previous result and load new operand
STORE =Store in memory stack and LOAD new value
AND = AND current result with new operand
TMR = Define timer timeout
CTR = Define counter overflow
Algorithm for working:
1. Give all input, output variables PLC's names (x0,x1)
2. Redraw ladder diagram with PLC's variables, pay attention for
switches (normally open/closed).
3. If the same result is to be saved to CR and Y, CR may be
eliminated. If doing so, all CR's should be changed in diagram to
corresponding Y.
4. If functions differ from any point, the "equal" result could be
saved in memory (stack) and used then.
5. Change order of calculations to avoid using memory or stack.
LIFO: Last In First Out memory stack. Use only if the data would be
needed it reverse order. Programming: STORE result, when needed use
'store' as a variable name to get data from stack.
Newer split output function into two or more sub-functions.
TIMER: TMR# (needed time in 0.1 sec)
X2=0: timer is reset and count is disabled
X2=1: timer is enabled; X1=1 timer runs, X1=0- timer stops.
Leave empty command for internal use.
COUNTER: CTR# (#of cycles)
X2=0: counter is reset and count is disabled
X2=1: counter is enabled. Each time X1 changes from 0 1 counter is
incremented by one.
Pneumatic control
- Limitations: valves do not have return springs and are operated
pneumatically (without solenoids)
- Theres always an active group, even when not operating (START is
also included within a group).
- Last group may be merged with first group, provided that groups do
not conflict.
If cylinder performs two cycles, it requires two sets of limit valves and
two OR gates.

0+ A= A
A 1 = A

A + AB = A
A + A' B = A + B

A A = A

( A + B )( A + C ) = A + BC

A A = 0
.
1+ A =1

AND

AB + A ' B + BC = AB + A ' C

A B

OR

A+ B

A
0
0
1
1

NOT

A
0
1

A B

A
0
0
1
1

B
0
1
0
1

F
1
1
1
0

A+ B

A
0
0
1
1

B
0
1
0
1

F
1
0
0
0

XOR

A B

A
0
0
1
1

B
0
1
0
1

F
0
1
1
0

XNOR

A B
A B

A
0
0
1
1

B
0
1
0
1

F
1
0
0
1

A+ A= A
A + A =1
A B + A C = A (B + C )
Karnaugh map
A maximal cell is a cell that could not be increased.
Essential cell: by the task, the option than is not covered by other
options
Cells Select Recommendation
1. Identify and mark all basic squares that are contained in a single max
cell
2. Mark those maximal cells in the map.
3. If exist the appropriate max cells will be considered as ESSENTIAL.
4. Select all the appropriate cells as ESSENTIAL (if exist).
5. Check if there exist more function 1s that were not covered by
ESSENTIAL cells.
6. If exist select minimal cells group that completes the function (with
minimum literals)
Note : In some cases there exist several minimal solution, with same
number of literals
7. Write the function in a format of sum of products
Examples for PLC:

LOAD x3
AND cr1
OR cr2
AND NOT cr3
OUT cr8
AND x5
OUT y12
LOAD cr8
AND x4
OUT y13
LOAD cr3
AND x6
OR y4
STORE NOT x3
OR x5
AND store
LOAD x1
STORE x2
TMR1
200
------OUT cr1

Industrial
Automation 035008

:
:
A
B
F
0
0
0
0
1
0
1
0
0
1
1
1

NAND

NOR

B
0
1
0
1

F
0
1
1
1

F
1
0

Random signals (Hoffman):


Static hazard: change of two or more input simultaneously. May be
eliminated by choosing non-maximal cells (in Karnaugh map).
Hoffman steps:
1. System definition, primitive flow
diagram/table
- stable step has two outputs
2. Merging:
- decreasing number of rows doesnt
change number of steady
states and outputs.
- merging diagram helps to
eliminate selection of nonminimal merge options.
3. State assignment, excitation functions:
- each line (internal state) of the merged flow table must be assigned
by a unique FF (CR flip-flop) combination code. Simultaneous change
of two or more FFs is prohibited.
- in 2 row tables set/reset expressions dont depend on CR variables.
Initial state will be assigned with CR=0
- usually a1a2=a1, a1a2=a2 simplifications are possible
a. if importance of transient outputs is unknown:
i. if outputs of two steady states is the same, the output of the
transition between them must be equal to the SS output
ii. if outputs of two SS are different, the output of the transition
may be defined as dont care
4. multi-line flow tables:
- each row is assigned with a FF, complexity doesnt depend on table
size
- each transition requires change of two FF: 1. Set next state FF. 2.
Reset current state FF. (001-011-010)
- when system is reset, all CRs are 0. S1 must be activated when
input is 10 unless system is in another state (CR2, CR3). START could
be added to the above expression.
- when a row in output table contain only ones and dont cares, no
matter of row width, function depends on CRs only
- within a column that contains a single stable state, transitions
dont depend on CRs.
Attention: when converting to relays cascade reset

System Analysis:
Target- eliminate unused states, transitions and modify rows merging
Method:
- parse existing merged table into primitive form
- draw primitive flow diagram
- modify rows merging
- check if all states are reachable, if not- eliminate unused states
and its transitions
- draw merge diagram and select best merge
Double cycle cylinder:
Multiple group valves replacement

Hardware programmers: programmable counters


!! For 6 step process 7 cells are needed to ensure fulfillment of the
process.
1/n counter notes:
- If one action is to be actuated by different cells (A+ by 1 and 6), then
the actuation signal should be ORed
- Works with all types of cylinders
2/n counter notes:
- Perfect for cylinders with no return springs (same circuit as for 1/n)
- Module 1/n output depends on module state only. Therefore its
output remains steady as long as module is set.
Module 2/n output depends also on Xi input, meaning that even
though the module is set, output may be " 0 ". this means that for
cylinders with return springs FF module must be added when there is
a stability problem.

1/n counter examples

2/n design steps:


a. Mark output commands (including A-, etc) on module outputs
A+ : Move cylinder
(A+) : Hold cylinder
(A-) : Return cylinder (stop activation)
b. Check all possible pulsed outputs, and write a pulse-list table
c. Perform all required modification according to table list
Module N
Caused by
Affected cylinder
1
Start
A+,B+
3
a1
B+
4
a2
None
7
a1, b1
C+
Stability problems (2/n):
Short input: usually caused by START
Oscillations: if activating condition (a1) changes after execution (A+).
Note, if cond. Is a2 and action is only - the short impulse does not
affect the system performance.

Simplifications:

2/n counter examples

You might also like