
B–61863E/15
5. FUNCTIONAL INSTRUCTIONSPMC SEQUENCE PROGRAM
185
When the count is up to a preset value, W1=1. The address of W1 can be
determined arbitrarily.
When the counter reaches the set value, W1 is set to 1.
When the counter reaches 0 or 1, W1 is set to 1.
[Example 1]
As a preset counter (See Fig.5.9.6 (a))
The number of workpieces to be machined is counted. When the number
reaches the preset count, a signal is output.
D L1 is a circuit to make logic 1.
D Since the count ranges from 0 to 9999, contact B of L1 is used for
making CN0=0.
D Since it is to be up counter, contract B of L1 is used make
UPDOWN=0.
D The reset signal of the counter uses input signal CRST.M from the
machine tool.
D The count signal is M30X, which was decoded from the CNC
output M code. M30X contains contact B of CUP to prevent
counting past the preset value, as long as reset is not enabled after
countup.
L1
R200.1
L1
CTR
(SUB 5)
CRST.M
X36.0
CUP
R200.1
Y6.1
0001
Count up output
L1
R200.1
CUP
Y6.1
L1
R200.1
L1
R200.1
(UPDOWN)
(CN0)
(RST)
(ACT)
M30X
R200.3
(3)
(2)
(1)
(0)
(1)
Fig. 5.9.6 (a) Ladder diagram for the counter, example 1
5.9.5
Countup Output (W1)
5.9.6
Examples of Using the
Counter