Anda di halaman 1dari 27

LADDER SYMBOLS

&
X L-IB~rF>LJOT X DIMS
if
The purpose of this section is to remove some of the mystery that
surrounds PLC or PC sequence (ladder) programs. All of us have run into
this situation at least once in our short service irelated life; using
normal trouble-shooting techniques and the electrical diagrams we chase
a problem until we end up in the ladder diagram and eventually a little
"MAGIC" instruction box appears out of the blue. These ladder
instructions normally trigger our feeble little minds that we are at the I
end of the line and the only way out is to find a telephone. After the
phone call we end up with two very confused people instead of one and
quite often this results in yet another phone call. This cycle is
counter-productive and is very harmful to a cost-effective service
organ i 2 at i on.
The "MAGIC" part of the above mentioned ladder instructions can
be eliminated if you will only read this section. Granted, i f you are
reading for the sake of reading, you will end up educated. On the other
hand, if you are reading with the objective of understanding the written
information, you stand a good chance of getting smart!
For those of you who question the reason for learning this type
of information, I have a statement to make. BULL-SHIT! Granted, you can
probably fix a machine quickly without over-taxing your mind power.
That's great, the machine is back in production and the customer is
happy. What happens when the customer wants to know what you did to fix
the machine? Better yet, how are you going to respond when the customer
wants to know why you did what you did and why couldn't his maintenance
people do the same thing without waitinq for a service call?1
REMEMBER THIS? THE PERSON WHO KNOWS "HOW WILL PROBABLY HAVE A
JOB. THE PERSON WHO KNOWS "WHY" WILL PROBABLY BE HIS BOSS!

O'

PAGE 45

Pi O
ADDER
i SYMBOLS
I MSTRUCTI QMS
$
TABLE OF CONTENTS
SUBJECT/FUNCTION PAGECS)
WAND: "AND" INSTRUCTION CIS BITS) 47,48,57
DAND: "AND" INSTRUCTION C32 BITS) 49
WOR "OR" INSTRUCTION CIS BITS) 50,51
DOR "OR" INSTRUCTION C32 BITS) 50
MOV "MOVE" INSTRUCTION CIS BITS) 52,53,56,57,SO,S 1
DMO V: "MOVE" INSTRUCTION C32 BITS) 54,SS
FMOV: FORCE MOVE INSTRUCTION 55
BMOVs BIT MOVE INSTRUCTION 55
SET ADDRESS SET INSTRUCTION 49,50,65
RST ADDRESS RESET INSTRUCTION 65,66
>,< COMPARE INSTRUCTION CIS BITS) 49,62
D > , D<: COMPARE INSTRUCTION C32 BITS) 49
=S S COMPARE INSTRUCTION CIS BITS) 59,61,69
D=: COMPARE INSTRUCTION C32 BITS)
BCD: BINARY TO BCD CONVERSION INSTRUCTION 56
BIN: BCD TO BINARY CONVERSION INSTRUCTION 57
+ BINARY ADDITION INSTRUCTION 58
BINARY SUBTRACTION INSTRUCTION 58
/ BINARY DIVISION INSTRUCTION 59,60
* BINARY MULTIPLICATION INSTRUCTION 59,60
PLS: "ON" PULSE INSTRUCTION 63
PLF: "OFF" PULSE INSTRUCTION S3
CALL: SUB-PROGRAM CALL INSTRUCTION 64
RET RETURN TO MAIN SEQUENCE PROGRAM 64
INC INCREMENT CADD 1) INSTRUCTION 67
DEC DECREMENT CSUBTRACT 1) INSTRUCTION 67
XCH DATA EXCHANGE INSTRUCTION 68
BIT BIT "ON" INSTRUCTION 69
BI I BIT "OFF" INSTRUCTION 70
T
PLC TIMER 71

-S'

PAGE 46
_
HAND; 16 BIT "AND" INSTRUCTION.

XSC K2
MTP.M
3 C [ WAND X82
MAG
HIF D27 3
T-MAG
F'OSI. DATA
M206
NCRDY
3 C

PULSE
WAND: F'LC PROGRAM INSTRUCTION. n
K s A DECIMAL CONSTANT? NUMBER OF BITS TO USE..,.
K1 = 4 BITS K5 = 20 BITS
K2 = 8 BITS KS = 24 BITS
K3 = 12 BITS K7 = 28 BITS
K4 = 16 BITS KS = 32 BITS
X82: BEGINNING ADDRESS FOR OBTAINING DATA TO BE " AND'ed" ,...
X82: MG1.M XS6: MG16.M
XB3: MG2.M X87: MG32.M
X84: MG4.M X88: MG64.M
X85 i MG8.M X89: M1/=PRS
H : HEX I-DECIMAL CONSTANT TO BE " AND'ed " WITH XS2 THRU X89...
IN BINARY H1F = 0001 1111 I
1 F
D27: DATA REGISTER FOR STORING THE RESULT OF THE INSTRUCTION.

For a simplified explanation of what is going on when this


instruction is executed, please refer to the following page. Remember
i
that this is my version of what is going on and if you don't agree with
it.
? so be it, prove me wrong! I love learning. ;

tA

PERSONAL NQTESs

S'.

PAGE 47
;
WAND: "AND" INSTRUCTION CTont'd).
i
The simplified example shown below shows how the "AND"
instruction would be handled by using .logic symbols. The true status of
the inputs at X82 thru X8& will be gated into data register D-27 while
the signals at X87, 88, 89 will be blocked by the instruction constant
i H1F (OOOlll H .

1
. )

2
MG1 M
D27
1

MG2.M
1
21

MG4. M -
V -22
1

1
23
MG8. M

1
/

MG16.M-1 2*

0
0

MG32.M r> 2=
1

2s

--
MG64.M-

M/aPRS
_l : 2'r

PERSONAL NOTES;

tf

PAGE 48
DAND: 32 BIT 11 AND 11 INSTRUCTION
D>- D<: 32 BIT DATA COMPARE INSTRUCTION
SET: 1 BIT ADDRESS SET INSTRUCTION
F2B
i C DAND D662 , DS22 1
IMPROP i IMPROP D602

----
M CODE , M CODE AUX.


i C D< KO DS22 3
DS02
AUX.
1
l
[ SET F2S 1
IMPROP
M CODE
L- C D> KO 0622 3 1
DS02
AUX.
The "DAND" instruction shown above will be executed once each PLC
scan cycle. If an illegal (improper) "M" code is detected, some value I
will be stored in data register DS22/&23. The data compare instructions j
are used to check the contents of D622/623. If D&22/S23 is not equal to
0, a 1 will be set at PLC address F28.
A "1" at F2S will result in alarm 228 being displayed on the CRT. \
Naturally, an alarm message will also be displayed. 1
:
; 3

PERSONAL NOTES;

PAGE 49
WORs IS BIT -OR" INSTRUCTION
DOR; 32 BIT "OR1' INSTRUCTION
I
i
M763


:z
MISC
CALL
r
I
Z WOR R497 H40 R497 1
PLC
MISC
PLC
MISC
>

PULSE REQ. REQ.


I
L. Z SET M764 D
MISC
CALL
M7&3; MISCELLANEOUS CALL PULSE.
M7&4; MISCELLANEOUS CALL COMMAND.
R497: PLC REGISTER FILE," PLC MISCELLANEOUS REQUEST'.
H40: A HEX I-DECIMAL CONSTANT TO BE "OR'ed" WITH R497.
40(hex) = 01000000(binary)

In effect, what is being done in the "OR" instruction shown above


is to force bit S of address R497 to a "1". At this point in time I have
no idea as to what this will result in. (See example on the next page.)

Another example of an "OR" instruction is shown below. This type


of "DR" instruction is nothing more than another method of moving data
from point A to point B. When the PLC ON signal at address M200 goes to
a "1", execute the "OR" instruction to move the decoded "M" Code data
from data register D600/S01 to data register D620/621

M200
1 Z
ON
Z DOR D600
M CODE
D&20 1
D600
DECODE AUX.
REG. 1
M200: PLC POWER ON.
DS00/S01: DECODED "M" CODES MOO THRU M31 DATA REGISTER.
II II
D&20/S21 s AUXILIARY DATA REGISTER.
i-

PERSONAL NOTES:

PAGE 50
!

WQR; OR INSTRUCTION (Contyd from previous page)

M763 & !
:z Z WOR R497 H40 R497 1
MISC PLC PLC
CALL MISC MISC
PULSE REQ. REQ.

I
R497.0
2

-- --
0
R497 I
R497.1

2i
0

R497.2

0
N
2s

R497.3

0 23

R497.4

0
2-

R497.5

0
23

R497.6
2s

--
1

R497.7

0
2r

if PERSONAL NOTES:

PAGE 51
MOV: IS BIT DATA MOVE INSTRUCTION
l DMOVg 32 BIT DATA MOVE INSTRUCTION
In the following example a "MOV" instruction is used to move *12
bits of BCD data from a data register to machine side output addresses.
At the machine side, this data will be used to generate the three digit
magazine position digital read-out.

XSC K3
j L
MTP. M
~T Z MOV D98
MAG.
YBO 1
T CODE
F'OS I. OUTPUT
I

M206 I BCD
3 C
NCRDY
PULSE
1 \

X8C: MAGAZINE TIMING PULSE.


M206: NC READY PULSE.
MOV: 16 BIT DATA MOVE INSTRUCTION.
D98: MEMORY ADDRESS FOR OBTAINING DATA TO BE OUTPUT.
YSO THRU YBB: OUTPUT ADDRESSES FOR SETTING THE BCD DATA.
K3: A CONSTANT; NUMBER OF BITS TQ MOVE....
K1 = 4 BITS K5 = 20 BITS
K2 = 8 BITS KS = 24 BITS
K3 = 12 BITS K7 = 28 BITS
K4 = 16 BITS K8 = 32 BITS

In the example shown above the "K" constant indicated how many
bits of data to move. The next example is another form of a move
i nstr uct i on that does not use a "K" value. In this case, all 16 bits of
data will be moved.

X8C
MTP.M
:z T
I
Z MOV D27
T-MAG
R2000 1
MAG.
DATA F'OS I.
M206 1

1 Z
NCRDY
J

PULSE
In this
example, if XBC or M206 goes to a "1", move the binary
magazine position data
from data register D-27 to PLC register file
R2000. Later, this data at R2000 will be used for comparisons when a new
magazine pocket number is commanded.

PERSONAL NOTES:

PAGE 52
MOV: DATA MOVE (Cont'd)
The datato be moved by these instructions can come from}' any I-
memory source. The data can also be constant values, either decimal "K"

----
or hexi-decimal "H". The following examples show how this is done.

M223 X1E9 K1
3 C
M02/30 i
PULSE
1
i 3 E-
TAPL.N
C MOV H3 Y220 3
RST 1. N
i
i
XI08 I r
RST. B
'

3 C 1

M223: END OF PROGRAM PULSE.


X 108: OPERATING PANEL RESET PUSH-BUTTON INPUT.
X 1E9: TAPE MODE INPUT FROM THE NC.
H3: HEX I -DECIMAL CONSTANT TO BE MOVED? IN BINARY 0011.
Kl: DECIMAL CONSTANT? NUMBER OF BITS TO MOVE CK1 = 4 BITS).
Y220: BEGINNING ADDRESS FOR SETTING THE RESULT. OF INSTRUCTION.

SUMMARY....
When the conditions to the left are satisfied, move hex 3 <00113
to output addresses Y220 thru Y223.
Y220: RESET i TO NC.
Y221: RESET 2 TO NC. "
Y222: RESET & REWIND TO NC.

---
Y223: NOT USED.

X1F5 X 108 Kl
3 C
RST. N
3/C
RST. B C MOV KO Y220 3
RST 1.N
X 1 F5: RESET INPUT FROM THE NC.
X 108: OPERATING PANEL RESET PUSH-BUTTON INPUT.
KO: CONSTANT VALUE TO BE SET AT THE SPECIFIED ADDRESSES.
Kl: CONSTANT? NUMBER OF BITS TO MOVE CK1 = 4 BITS).
Y220: BEGINNING ADDRESS FOR SETTING THE RESULT OF INSTRUCTION.
s
SUMMARY....
When X1F5 = 1 and X108 = 0, set 0 at Y220, Y221, Y222, & Y223.

PERSONAL NOTES:

!
PAGE 53
DMOVs 32 BIT DATA MOVE INSTRUCTION
When more than 16 bits of data must be moved, the DMOV
instruction is used instead of the MOV instruction. The only difference
is the amount of data bits being manipulated.

M229 KS
Jf-ALARM
:/c C DMOV KO F74 3
*SP.ST
RESET NOT
T-CLMP
M229: ALARM RESET; Normally a "1" but will go to a "0"
when the operating panel RESET or
MACHINE FAIL CLEAR push-button is
act i vated.
DMOV 3 DATA MOVE INSTRUCTION? 32 Bits maximum.
KO: A CONSTANT; Data to be set at the specified addresses.
KS: A CONSTANT; Number of addresses to set (KS = 24 bits).
F74: Beginning address for setting the specified data.

SUMMARY....
When the Alarm Reset signal goes to a "0", set "0" at alarm
addresses F74 thru F97. These addresses correspond to alarm numbers 274
thru 297. Setting "0" at an alarm address turns that signal OFF. If the
reason for the alarm has been removed, the alarm will remain OFF.
Although there are 24 alarm addresses included in the above
instruction, the hard copy printer can print out the signal name for the
first address used, F74 (Alarm 274). The message that accompanies alarm
number 274 should read: Spindle Start Without Tool Clamped Mis-
Oper at i on.

PERSONAL NOTES s

PAGE 54
i

The following two PLC instructions can be used to MOVE data from
a source to multiple addresses instantaneously. The "F" move instruction
forces all designated addresses to either 1 or 0 while the "B'L move
instruction moves true data from point A to point B.
FMOV: FORCED MOVE
M912 M740

:c
MB12 Ii
PALLET
~i 3:
FTP
PULSE
[ FMOV KO D 1 006 K14 1
FTP
BLOCK
NO. 2 NO. 2-3
M911 l

: c
M911
_J

PALLET
NO. 1

M911: PALLET NUMBER 1 "M" CODE COMMAND.


MS12: PALLET NUMBER 2 "M" CODE COMMAND.
M740: POINT-TO-POINT PULSE.
FMOV: FORCED MOVE INSTRUCTION.
KO: A CONSTANT; Data to be moved to. the. assigned addresses.
D 1006: BEGINNING ADDRESS FOR MOVING THE DATA'TO.
K14: A CONSTANT; Total number of affected addresses.

SUMMARY....
If a pallet change is commanded and the Point-to-Point Pulse goes
to a " 1 * , force move "0" into data registers D100S thru D1019.

--
BMOV; BIT DATA MOVE
M37S
][ [ BMOV R2782 D1006 K14 1
TOOL RTF*
CHANGE BLOCK
RTF- NO. 2-3

M378: AUTO TOOL CHANGE POINT-TO-POINT COMMAND.


R2782: BEGINNING ADDRESS FOR OBTAINING DATA TO BE MOVED.
D 1006; BEGINNING ADDRESS FOR MOVING THE DATA TO.
K14: A CONSTANT; Total number of affected addresses.
I
SUMMARY....
When address M37S goes to a "1", move the data from PLC registers
F.I27S2 thru R2795 into data registers D1006 thru D1019.

a? PERSONAL NOTES;

i
PAGE 55
--
BCD a BINARY TO BI NARY-CODED-DECIMAi (BCD) CONVERSION
X8C
3 C
MTP. M
i
C BCD D27
T-MAG
D98 3
MAG,

I DATA POSI.
M20G I BCD
3 c
NCRDY
PULSE
1

X8C: MAGAZINE TIMING PULSE? "1" At each magazine pocket position,


M20S: NC READY PULSE; Momentary "1" at NC power ON,
BCD: PLC INSTRUCTION; Binary to BCD conversion.
D27 s Data register for storing the binary magazine position data,
D98 s Data register for storing the BCD magazine position data.

SUMMARY....
When the Magazine Timing Pulse <:X8C) or the NC Ready Pulse CM2063
turns ON, convert the binary magazine position data in data register D27
to BCD and set the result in data register D98.
Normal ly when binary data is converted to BCD it means that the
BCD data is going to be output to an external device. As seen in the
next example, that statement holds true in this case too.
X8C K3
3 C T C MOV D98 Y80 3

--
MTP. M I MAG. T CODE
POSI. OUTPUT
M206 l BCD
3 C 1
NCRDY
PULSE
l

In this instruction the three digit BCD data will be moved from
data register D98 to output addresses Y80 thru Y8B. The signal numonics
for these outputs probably look like this....
BCD: UNITS BCD: TENS BCD: HUNDREDS i
Y80 T 1 1. M Y84 T21.M Y88 T31.M
Y81 T12.M Y85 T22.M Y89 T32.M
Y82 T14.M Y88 T24. M Y8A T34.M
Y83 T18.M Y87 T28.M Y8B T38.M
(

PERSONAL NOTES:

PAGE 56
MOV: IS BIT DATA MOVE INSTRUCTION.
WAND: 16 BIT "AND" INSTRUCTION-

---
BIN; BCD TO BINARY CONVERSION INSTRUCTION. i4>
XA5 K3
1 C C MOV XA6 DSC 3
ITTP.M IT.POS IT.F'OS
CODE (BCD)
M20S
NCRDY
:: i
i
n WAND D90 H3FF
IT.POS
D91 3
IT.POS
PULSE I (BCD) (BCD)

L. i BIN D91 R 1995 3


XA5: Index Table Timing Pulse; A "1" at table clamp.
M20&: NC Ready Pulse; A momentary "1" at NC power ON.
MOV: Data move instruction.
K3: A constant; number of bits to be moved (K3 = 12 bits).
XA6 thru XB1: Three digit BCD index table position data. I
D90: Index table position data reqister (BCD).
WAND: PLC "AND" Instruction
H3FF: A constant to be "AND'ed", with the contents of D90.
Hexi-decimal 3FF = Binary 0011 1111 1111
D91: Index table position data register (BCD).
BIN: BCD To binary conversion instruction.
R1995: PLC Register file address. i

SUMMARY....
When the NC Ready Pulse or the Index Table Timing Pulse turn ON:
). Move Index Table BCD inputs from XA& thru XB1 into D90. i

). In the "AND" instruction, trash the hundreds 4 8 bits and


store the Index Table BCD in data register D91.
). Convert the BCD data in data register D91 to binary and store
the binary number at PLC register R1995.

f PERSONAL NOTES:

PAGE 57
+ ; BINARY ADDITION
M470
MAG.
]/[- r C + D2B K1
T-OBJ
D29 ]
MG.DEC
$

cw DATA PDSI.
i DATA
L C + D25 K1 D25 1
MAX. MAX.
TOOL TOOL
M470: Magazine CW Rotation Command.
+ s PLC Instruction.
D28s Tool Number Objective (Pocket Number Command).
D29; Magazine Deceleration Position Command.
D25s Magazine Maximum Tool Number (Set by PLC PRM R2100).
Kl: A constant; value to be added to D28 and D25.

SUMMARY....
If the Magazine CW Rotation Command signal is OFF (M470 = 0), add
1 to the pocket number command in data register D28 and put the result
in data register D29. In the next branch of the sequence; add 1 to the
maximum tool number data stored in data register D25.
The data that ends up in D29 D25 will be used by the PLC to
generate the necessary signals to cause the magazine to start
decelerating one pocket position before the actual pocket number
c ommand.

-
M473
MGCCMD
3 C
BINARY SUBTRACTION

C D28 D27 D26 3


T-OBJ T-MAG T-MAG
DATA DATA --T-CMD
M473 s Magazine Position Less Than Tool Number Command.
- : PLC Instruction.
D28s Magazine Pocket Number Command data register.
D27s Actual Magazine Pocket Number data register.
D2Ss Result of D28 <.'-) D27 data register.

SUMMARY....
If the current magazine pocket number is less than the commanded
pocket number (M473 = 13, subtract D27 from D2S and store the difference
in data register D2S. The end result of the calculations based upon
magazine position and "T" number commands is,to determine the shortest
direction of rotation to get to the tool that is to be used next. The
same would apply for a tool that is to be returned to the magazine.

PERSONAL NOTESs

PAGE 58
/ ; BINARY DIVISION
f
M200
ON
3 [- T'
I
i
Z / Dll KIO
MNL.SF'
D50 3
MNLSP.
I RPM. SPEED
l *1/100
i
i_.
c / Dll K100 D52 ]
MNL. SP MNLSP.
RPM. 1 / 1000
M200: NC/PLC On signal .
/ s Binary division instruction.
Dlls Data register for manual spindle RPM command.

KIO: A constant; instruction divisor.


KlOOs A constant; instruction divisor.
D50: Data register for storing the result of Dll / KIO.
D52: Data register for storing the result of Dll / K100.
!
SUMMARY....
If M200 = 1, divide the manual spindle RPM command by 10 and
store the result in data register D50. Next, divide the manual spindle
RPM command by 100 and store the result in data register D52.
The contents of data register Dll depends on thee manual RPM as
set by the operating panel Spindle Up/Down push-buttons.
r

--

C

C
;

=
BINARY MULTIPLICATION
K1

K2
JF
DIG 3
JF
COUNT.
AUX.
DIG 1
COUNT.
C
Z * D12
JF
RING
CTR.

* D12 K100 D18


JF
RING
K10 D18 3
JF
INCH/M

JF
INCH/M
3
.

AUX. CTR. [ i

Z = K3 DIG 3
JF
Z * D 1 2 K1000
JF
D18 3
JF
t

COUNT. RING INCH/M


AUX. CTR.
= : Equal compare instruction.
* s Binary multiplication instruction.
K : A constant (decimal) value.
DIG: Jog feed-rate data register.
D12: Jog feed-rate ring counter.
D18: Jog feed-rate IPM data register.

SUMMARY.... ;
If DIG = 1, multiply D12 by 10 and store the result in D18.
If D1S = 2, multiply D12 by 100 and store the result in D18.
If DIG = 3, multiply D12 by 1000 and store the result in D18.
PAGE 59
i

D* : 32 BIT BINARY MULTIPLICATION INSTRUCTION.


D/ : 32 BIT BINARY DIVISION INSTRUCTION.

M200 $
3 C-
ON
T
[
C D* D1S
JF
K254 D8& ]
JF I
INCH/M INCH
MM/M I N
l

l~ C D/ D86 K100 D86 ]


l JF JF
INCH- INCH-
MM/MIN MM/MI N

L.
C MOV D8
JF
I NCH-
D14 1
JF/MIN
(

MM/MIN
lv
M2GO: NC PLC On signal.
D8: Jog feedrate data register; inch or mm per minute.
D18: Jog feed -rate data register; inch per minute.
D14: Jog feed-rate per minute data register. t

SUMMARY.... i

The PLC instructions shown above will be executed once each PLC [
scan cycle. That's because the ON signal at address M200 goes to a "l"
during the power on sequence and remains that way until something very
terrible happens.
In the above sequence, three things happen....
1. The jog feed-rate data in D18 S< D19 is multiplied by 254 and
the result is put into data registers D86 2< D87.
2. The new data in D86 ?< D87 is divided by 100.
3. The 1 bits of data in D8 is moved to data register D14.

PERSONAL NOTES;

a?

PAGE 0
= : EQUAL COMPARE INSTRUCTION.
MOV; IS BIT DATA MOVE INSTRUCTION.
(4*
M470
C = D25
MAX.
TOOL
D29 3-
MQ.DEC
PDSI.
3/C
MAG.
cw
C MOV K1 D29 3
MG.DEC
POSI.
!

DATA DA TA
f
D25: Magazine maximum tool number; Set at 30? 0, 90, or 120 by
PLC sequence parameter R2100, bits 8, 9, and 10.
D29s Magazine deceleration position; This register will always be
one greater, or one less, than the new magazine pocket
number command.
M470: Magazine CW rotation command.
K1 : A constant; value to be moved into D29 when the conditions :
to the left are satisfied.
SUMMARY....
If the magazine maximum tool number in D25 is equal to the
magazine deceleration position in D29 and the magazine CW rotation
command is OFF CM470 =
0), move "1" into D29 as the magazine
deceleration pocket number.
This sequence will allow the magazine to go into deceleration at
pocket number one when CCW rotation is commanded and the commanded tool
pocket number is 30.

.i

PERSONAL NOTES;

1
PAGE 61
< ; LESS THAN COMPARE INSTRUCTION.
> ; GREATER THAN COMPARE INSTRUCTION.
M454 M473 if
C < D27
T-MAG
D28 3
T OBJ
3 C
TOOL
<
MGCCMD
)

DATA DATA SELECT


PULSE

D27; Current magazine pocket number position data register.


D2S s Magazine pocket number command data register.
M454: A momentary "1" at magazine tool number select.
SUMMARY....
If the Tool Select Pulse turns ON, compare the numbers in data
registers D27 S< D2S and if D27 < D28, turn ON the Magazine Position Less
than Pocket Number Command signal CMG<CMD3 .
The MG<CMD signal at address M473 will be used in the following
sequence to enable the Magazine Forward 1 command signal.

M473 M472
C > D24
MAX.
TOOL
D26 3
T-MAG
-T-CMD

] c
MG<CMD C .1
MAG.
FWD. 1
*1/2

D24; One-half magazine capacity data register; Set 15 for 30


tools, 30 for SO tools, 45 for 90 tools, SO for 120 tools.
D2S: Magazine position minus pocket number command data register.
M473; See sequence at top of this page.

SUMMARY;
If the number in D24 is greater than the number in D2S and the
magazine position is less than the commanded pocket number <MG<CMD = 13,
generate the Magazine Forward 1 rotation command signal.

PERSONAL NOTES;

PAGE 62
When we activate one of the operating panel push-buttons we are
creating a momentary "1" level input to the F'LC. Quite often it is
necessary for the control to generate the same type momentary signal.
This is done by using the Pulse instructions shown below.
PLS; ON PULSE. i
PLFz OFF PULSE.
X1E8 M202
1 C 1 C
MEML. N i AUTO
X1E9
TAPL. N
: c- 4
i
L PLS M204 1
AUTO
PULSE
X1EB l
c
:MDIL.N
X 1EB: MEMORY MODE INPUT FROM THE NC.
X.IE9: TAPE MODE INPUT FROM THE NC.
X 1EB: MANUAL DATA INPUT CMDI) MODE INPUT FROM THE NC.
SUMMARY....
When an Auto mode is selected one of the inputs shown above will
go t o a "l". As a result of this, the Auto signal at address M202 will
also go to a " 1". The Auto signal will remain ON as long as any of the
three inputs is ON.
On the other hand, the Auto Pulse will go to "1" when one of the
inputs turns ON but will remain at a "1" for one PLC scan cycle only.

X1ES

M202
M204 F

As opposed to the PLS signal, the F'LF signal will turn ON when
its input goes from a "1" to a "0".

Y21D
DRN.c N
3 C PLF M607 ]
DRN
OFF
PULSE

!
Y21D
Y
M607
When the Dry Run signal to the NC (Y21D) turns ON, M607 does
nothing. However, when Y21D turns OFF, MS07 will turn ON for one PLC
scan cycle.
PAGE 63
CALL; PLC OR "C" LANGUAGE SUB-PROGRAM CALL INSTRUCTION.
RET; RETURN TO MAIN PLC SEQUENCE PROGRAM.

Machine functions such as auto tool changes, pallet changes, 16'b 1


length measure, tool breakage check, are controlled by these sub-
programs. Some of these sub-programs are written into the PLC ladder and
some are written in "C" language and stored somewhere in memory.
PLC Sequence sub-programs can be searched to and deciphered on
the ladder screen of the Maintenance display. Of course this takes some
basic knowledge, a little time, and a great deal of imagination! To this
point in time I have not figured how to find a "C" language program on
the Maintenance display. Even if I find out, it would be the same as a
doq chasinq a car, and catchinq it! What the hell is he qoing to do with
it?

M385
1 C
TOOL
"T
I
C CALL P304 1
TLM/
LENGTH TDK

----
MEASURE I
M39 1
1 C- J
TOOL
BREAK
M385: Auto or Semi -Auto tool length measure command.
M391 ; Tool Breakage Check command.
F'304; Tool Length Measure/Tool Breakage Check sub-program.

SUMMARY....
If M3B5 or M391 turns ON, call and execute the TLM/TBK sub-
progr am. At the end of the sub-program there will be a return C RET 1
instructi on that allows the PLC to return to the main PLC sequence
program. In the ladder it will look like the following....

C RET 1

There will also be a return C RET 1 instruction at the end of the


ladder sequence to tell the PLC to return back to the beginning of the
ladder at sequence step number 0.

PERSONAL NOTES;

if

PAGE 64
I

SET: ADDRESS SET INSTRUCTION.


RST: ADDRESS RESET INSTRUCTION. f
$ I
As shown in the following example, any single bit F'LC address can
be turned ON, or OFF, by using these two F'LC instructions

M30S M290
AUTO
1 C- 1 C
TF
: SET M 3
M06

---
TLM PULSE ATC
MODE
I M373
I 3 c C RST MS 1
FIN. MOS
ATC: ATC
M38S: Auto Tool Length Measure Mode.
M290: "T" Function Pulse Ctool change).
M373: Auto Tool Change Finish.
MS: "M" Code MOS; Auto tool change command.
SUMMARY....
). If M38S and M290 are both ON, set "1" at MS.
). If M386 and M373 are both ON, reset MS to a "0".

M30S >'
1
M290
M373

MS

As shown above, the SET and RST instructions can be used to


establish the status CO or 1) of a specified F'LC address. On the
following page you will see how multiple addresses can be set/reset by
using the a data move CMOV/DMOV) instructioii.

PERSONAL NOTES; I
O'

PAGE 65
DMOV: 32 BIT MOVE INSTRUCTION.
RST; ADDRESS RESET INSTRUCTION.
M229 KS
ALARM
]/C , L DMOV KO F74 1
*SP.ST
|
RESET | NOT
T-CLMP
C RST F9S 1
*OR.ST
I NO
I GEAR
I
L C RST F99 ]

M229: Alarm Reset; Normally a "1" but will go to a "0" if the


Reset or Machine Fail Clear push-button is activated.
KO: A constant to be set at the designated addresses.
K7: A constant; Total number of addresses affected CK6 = 24).
F74s Beginning address to move the constant, KO, to.

SUMMARY....
If the Alarm Reset signal turns ON CM229 = 0), move "0" to alarm
addresses F74 thru F97. Next, reset alarm addresses F9S S< F99 to "0" via
the RST instructions. A total of 26 alarm addresses would have been
reset by the above sequence.

PERSONAL NOTES s

PAGE 66
INC.- INCREMENT (INCREASE) INSTRUCTION.
PECs DECREMENT (DECREASE) INSTRUCTION.

When it is required to increment (add up) a given value1 &by a


factor of 1, the INC instruction is used. In the example shown below,,
each time the conditions to the left are satisfied, 1 will be added to
the value already stored in data register D4.

M203 M274
MNL.
3 C~ 3 C
RT UP
C INC D4 3
MNL.RT
OVRIDE
REG I.
M203: Manual Mode.
M274: Rapid Traverse Up (increase).
D4; Manual Rapid Traverse Over-Ride data register .

SUMMARY....
When a manual mode is active and the rapid traverse up signal
turns ON, add 1 to the contents of data register D4. *
When it is required to decrement (count down) a given value by a
factor of 1, the DEC instruction is used. Each time the conditions at
the left are satisfied, 1 will be subtracted from the number already
stored in data register D4

M203 M275
MNL.
1 C- 3 C
RT DWN
I DEC D4 3
MNL. RT
OVRIDE
REG I.
...
The Manual Mode signal at M203 will be a " 1" i f any of the
following modes are selected on the operating panel:
ZERO RETURN (No. 1 or No. 2)
). RAPID TRAVERSE
). JOG
). HANDLE/STEP Cxi, xlO 1 x 100)

The Rapid Traverse Over-Ride Up/Down signals at addresses M274


and M275 are a result of the Rapid Over-Ride push-buttons on the
operating panel being activated. As a result of the selected Over-Ride,
the contents of D4 will be:
). R0 = 0 (67.). I REMEMBER, D4 IS FOR MANUAL MODE ONLY 3
). R1 = 1 (127.).
). R2 = 2 (257.).
). 507. = 3.
> . 1007. = 4.
The percentages that are used when R0, Rl, or R2 are selected
depends on the setting of PLC sequence parameters R2110, R2111, and
R2112. The standard settings are 67., 12X, and 257..

PAGE 67
XCH: DATA EXCHANGE INSTRUCTION.

This handy-dandy little instruction does just what the name


implies, it exchanges, or swaps, data between two locations. PI else
refer to the following example.

M5 1 2 M491
ATC ARM
3 C 3 C
TOOL
C XCH R 1999
SP.
R1994 3
ATC ARM
TURN CHANGE TOOL GRIP
PULSE START NO. TOOL
M512: ATC Arm Rotation Pulse.
M491: Tool Change Start signal.
R 1999 s PLC Register files Spindle Tool Number.
R1994: PLC Register file; ATC Arm Tool Number.

SUMMARY....
It should be obvious to the most casual observer that when a tool
change is commanded the Tool Change Start signal (M4913 should turn ON.
A short time later the ATC Arm Rotation Pulse should turn ON, indicating
that it is time to take the old tool out of the spindle and replace it
with te new tool from the ATC arm.
The XCH instruction shown above allows the PLC to keep track of
which tool is where! When the instruction is executed the two tool
numbers are exchanged and the PLC knows where to position the magazine
for the tool unload sequence and it also knows the current spindle tool
number .

PERSONAL NOTESs

PAGE 68
BIT; BIT "ON" INSTRUCTION.

This instruction is used to the status of a specific bit 4bf a


specific address. If the bit of data is a "1" then something is allowed
to happen. If the bit happens to be a "0", that something will not be
allowed to happen or an alternate sequence will have to be used.
In the example shown below the pycle Start Enable signal will
always be a "1" if bit F (15) of PLC sequence parameter R2.10S is a "1".
If the bit is a "0", the status of this signal will depend upon control
operating conditions.

MS50
C BIT R2109 HF 1 I :>

--
PLC BIT ENABLE
PRM CYCLE
I START
[ = HI DSS ] 1
CRT I
NO. I
CODE

C = H2 DSS 1 1
H5 D9S 3 i

=
[

X1E9
K45

X1EB
DSS ] 1

1/C
TAPL. N
i/c
MEML.N
I

X 1F2
1 C-

DSSs CRT Display Select code. (See note 1)


X1ES: Tape Mode from the NC.
XlESs Memory Mode from the NC.
X1F2; Optional Stop from the NC.
M650: Cycle Start Enable? If this signal is not ON and cycle
start is attempted all you will get is a mi s-oper at i on
alarm.

NOTE 1 a Normally, Cycle Start is allowed only when a normal


operating screen is being displayed. These screens include:
!> . Position display.
1 Command display.
'). Trace di spl ay =
!> . Tool Measuring display.

PAGE 69
BII; BIT INVERSE (OFF) INSTRUCTION.

If you understood the last page you should have no problem with
this on e. The BII instruction is used to check the status of a specific
bit of a specific address. In this case the specified bit must be a "0"
to satisfy the sequence step in which the instruction appears.
In the following example the Cycle Start Interlock Alarm signal
at address M22S will go to a "1" if PLC sequence parameter R2109 bit 1

---
is a "0" and other conditions are satisfied.

Ml034 M664 M226


C BII R2109
PLC
H1 2 i
M/C
3 E
M/CDR I ALARM
C
I

--
BIT DOOR INT. STINT.
PARA.9 INT. SBK
F2S
2 c__. J
BREAK
TOOL
R2109.1: PLC Sequence Parameter; Door interlock specification.
>. Set "1" for export machines.
. Set "0" for Japan only.
M1034: Machine Door Interlock Neglect; Set "0" or "1" by R2102.2.
M664: Machine Door Interlock Single Block.
F2S; Tool Breakage Alarm; Alarm number 226.
M226; Cycle Start Interlock Alarm.

If the information presented on this page is correct the only


time that M226 will go to a "1" is when the Tool Breakage Alarm signal
t ur ns ON. That's because R2109.1 would be set at a "1" and that means
that the BII instruction can not be satisfied. If you live in Japan,
that'5 another story!

PERSONAL NOTESs

PAGE 70
T
: PLC TIMER INSTRUCTION.

Although the PLC timers do not appear as PLC instruction symbols,


A)

they are. The timing increment for TO thru T15 is .01 seconds. For

------
timers T16 and up, the timing increment is .1 second.

Y93 T15 Y93


] c , -3/C <: :>
TOOL i
TLM TOOL r
I i
LENGTH I SKIP LENGTH !
M-BZZR| TIMER I M-BZZR
MSGS t i

3 c
MMS
SKIP
1 L C T15 K10)
TLM
SKIP
PULSE TIMER
MSGS; Measure Skip (touch) signal; By tool measure or probe.
Measure Buzzer On output to machine side.
Y93;
T15: Measure Skip timer; Set at .1 second CIO x .01).

SUMMARY....
When the Measure Skip Pulse at M606 turns ON, the Measure Buzzer I
On output at Y93 will turn ON and latch. At the same time T15 will start
timing out. When T15 times out C.l sec.), it will turn itself and Y93
OFF. The end result will be a short, but very loud, "beep" at the
machine side when the Measure Skip signal turns ON.

Several of the machine failure alarm sequences use PLC timers.


This is done to keep the alarm from turning on when the condition is a
momentary thing and presents no real danger to the machine or control.
The following example shows how this is done.

Y5D X25
SERVO
:c 1 C
WLAL.M
(T52
WAY
KSOO)

READY LUBE
TIMER 1
Y5Ds Servo Ready output to machine.
X25s Way Lube Alarm warning from machine.
T52: Way Lube Timer 1; Set at SO seconds <600 x .1).

SUMMARY....
If Y5D , i s ON and the input at X25 also turns ON, timer T52 will
star t to time out. If the'input at X25 does not turn OFF within 1 minute
the timer will time out. If that happens, alarm 207 will come ON and a
jingle block condition will exist if the operating mode is Auto.
The input at X25 comes from a relay that is controlled by a
pressure switch in the way lube system.

L.
PAGE 71

Anda mungkin juga menyukai