Top Back Contact Us
Setting of multi-level output with
VOL. 4 high-speed counter
Example Cutting a sheet of cloth to specified length
Outline
By using pulses fed from the encoder, the KV controls winding speed of a sheet of cloth to cut the cloth to the
specified length.
High speed pulses from the encoder are entered to the high-speed counter of the KV. Output signals are issued
respectively to decrease winding speed, to stop winding and for overrunning alarm, the preset values (the number
of pulses) are previously input into the data memory of the KV.
Cutter
Rotary encoder
Winding process
Cutting
Decrease in Stop of
Start of winding
winding speed winding
Overrunning Alarm
Input the preset value for each point.
■ Programming Technique
For this control, 3 values (the number of pulses) must be preset respectively to decrease winding speed, stop
winding, and alarm overrunning. Preset the number of pulses of the high-speed counter to 3 levels using the CMP
instruction.
2002 CTH0 DM0000 2009 0500
LDA CMP Signal for decreasing winding speed
DM0001 2009 0501
CMP Signal for stopping winding
DM0002 2009 0502
CMP Alarm for overrunning
➮ For details on the instructions, refer to the KV Users Manual.
Top Back Contact Us
VOL. 4 Setting of multi-level output with high-speed counter
Programming Example
2008 #01000 #01500 #02000 When the power is turned ON, preset the initial values for decelera-
0001 DW DW DW tion point, stop point, and overrunning point respectively to 1000,
DM0000 DM0001 DM0002 1500, and 2000.
2113 2114
0002 SET RES CTH0 is set to the double multiplication mode.
2002 HSP
0003 0004
The input time constants of inputs 0004 and 0006 are changed to
10 µs.
HSP
0004 0006
0001 CTH0 The pulses from the encoder are received with high-speed counter
0005 0004
CTH0 through inputs 0004 and 0006.
2002 CTH0 DM0000 2009 0500 When the number of pulses from the encoder exceeds the preset
0006 LDA CMP
value for the deceleration point in DM0000, output is sent through
output relay 0500.
DM0001 2009 0501
0007 CMP When the number of pulses from the encoder exceeds the preset value
for stop point in DM0001, output is sent through output relay 0501.
DM0002 2009 0502
0008 CMP When the number of pulses from the encoder exceeds the preset
value for overrunning point in DM0002, output is sent through output
relay 0502.
Tips CMP instruction
1. To obtain comparator output using the CMP instruction, create an expanded ladder
diagram program. This makes it easier to understand sequential processing flow.
Conventional ladder diagram Expanded ladder diagram
2002 CTH0 2002 CTH0 DM0000 2009 0500
LDA LDA CMP
DM0000 From
CMP
2009 0500 encoder DM0001 2009 0501
CMP
2002 DM0000
CMP
2009 0501 DM0002 2009 0502
CMP
2002 DM0002
CMP
2009 0502
There are a large number of lines, There are few lines, making it easier to
making it difficult to understand the flow. understand the flow.
2. When ≥ or ≤ is used as comparison condition:
When the value in the internal register is smaller than the operand value, internal relay
2009
2009 2009 turns ON. By applying this, program as , the desired condition
(value in the internal register ≥ operand value) can be set.
* The same process can be used for comparison condition .