Indicates that incorrect handling may cause hazardous conditions,
resulting in death or severe injury.
Indicates that incorrect handling may cause hazardous conditions,
resulting in minor or moderate injury or property damage.
(Read these precautions before using this product.)
Before using this product, please read this manual and the relevant manuals carefully and pay full attention
to safety to handle the product correctly.
The precautions given in this manual are concerned with this product only. For the safety precautions of the
programmable controller system, refer to the user's manual for the CPU module used.
In this manual, the safety precautions are classified into two levels: "WARNING" and "CAUTION".
Under some circumstances, failure to observe the precautions given under "CAUTION" may lead to
serious consequences.
Observe the precautions of both levels because they are important for personal and system safety.
Make sure that the end users read this manual and then keep the manual in a safe place for future
reference.
[Design Precautions]
WARNING
● In an output circuit, when a load current exceeding the rated current or an overcurrent caused by a
load short-circuit flows for a long time, it may cause smoke and fire. To prevent this, configure an
external safety circuit, such as a fuse.
● Do not write any data to the "system area" of the buffer memory in the intelligent function module.
Also, do not use any "use prohibited" signals as an input signal from the CPU module to the intelligent
function module.
Doing so may cause malfunction of the programmable controller system.
● Outputs may remain on or off due to a failure of a transistor for external output. Configure an external
circuit for monitoring output signals that could cause a serious accident.
[Design Precautions]
CAUTION
● Do not install the control lines or communication cables together with the main circuit lines or power
cables. Keep a distance of 150mm or more between them. Failure to do so may result in malfunction
due to noise.
1
[Installation Precautions]
WARNING
● Shut off the external power supply (all phases) used in the system before mounting or removing a
module. Failure to do so may result in electric shock or cause the module to fail or malfunction.
[Installation Precautions]
CAUTION
● Use the programmable controller in an environment that meets the general specifications in the Safety
Guidelines provided with the CPU module or head module. Failure to do so may result in electric
shock, fire, malfunction, or damage to or deterioration of the product.
● To interconnect modules, engage the respective connectors and securely lock the module joint levers
until they click. Incorrect interconnection may cause malfunction, failure, or drop of the module.
● Do not directly touch any conductive parts and electronic components of the module. Doing so can
cause malfunction or failure of the module.
[Wiring Precautions]
WARNING
● Shut off the external power supply (all phases) used in the system before wiring. Failure to do so may
result in electric shock or cause the module to fail or malfunction.
2
[Wiring Precautions]
CAUTION
● Individually ground the FG and LG terminals of the programmable controller with a ground resistance
of 100 or less. Failure to do so may result in electric shock or malfunction.
● Check the rated voltage and terminal layout before wiring to the module, and connect the cables
correctly. Connecting a power supply with a different voltage rating or incorrect wiring may cause a fire
or failure.
● Connectors for external devices must be crimped with the tool specified by the manufacturer or must
be correctly soldered.
Incomplete connections may cause short circuit, fire, or malfunction.
● Place the cables in a duct or clamp them. If not, dangling cable may swing or inadvertently be pulled,
resulting in damage to the module or cables or malfunction due to poor contact.
● Tighten the connector screws within the specified torque range.
Undertightening can cause drop of the screw, short circuit, fire, or malfunction.
Overtightening can damage the screw and/or module, resulting in drop, short circuit, fire, or
malfunction.
● When disconnecting the cable from the module, do not pull the cable by the cable part.
For the cable with connector, hold the connector part of the cable.
Pulling the cable connected to the module may result in malfunction or damage to the module or
cable.
● Prevent foreign matter such as dust or wire chips from entering the module. Such foreign matter can
cause a fire, failure, or malfunction.
● A protective film is attached to the top of the module to prevent foreign matter, such as wire chips,
from entering the module during wiring. Do not remove the film during wiring. Remove it for heat
dissipation before system operation.
● Ground the shield cable on the encoder side (relay box). Always ground the FG and LG terminals to
the protective ground conductor. Failure to do so may cause malfunction.
● Mitsubishi programmable controllers must be installed in control panels. Connect the main power
supply to the power supply module in the control panel through a relay terminal block. Wiring and
replacement of a power supply module must be performed by qualified maintenance personnel with
knowledge of protection against electric shock. For wiring methods, refer to the MELSEC-L CPU
Module User's Manual (Hardware Design, Maintenance and Inspection).
3
[Startup and Maintenance Precautions]
WARNING
● Do not touch any terminal while power is on. Doing so will cause electric shock or malfunction.
● Shut off the external power supply (all phases) used in the system before cleaning the module or
retightening the connector screws. Failure to do so may result in electric shock.
[Startup and Maintenance Precautions]
CAUTION
● Do not disassemble or modify the module. Doing so may cause failure, malfunction, injury, or a fire.
● Shut off the external power supply (all phases) used in the system before mounting or removing a
module. Failure to do so may cause the module to fail or malfunction.
● After the first use of the product (module and display unit), do not connect/disconnect the product
more than 50 times (in accordance with IEC 61131-2). Exceeding the limit may cause malfunction.
● Tighten the connector screws within the specified torque range. Undertightening can cause drop of
the component or wire, short circuit, or malfunction. Overtightening can damage the screw and/or
module, resulting in drop, short circuit, or malfunction.
● Before handling the module, touch a conducting object such as a grounded metal to discharge the
static electricity from the human body. Failure to do so may cause the module to fail or malfunction.
[Disposal Precautions]
CAUTION
● When disposing of this product, treat it as industrial waste.
4
CONDITIONS OF USE FOR THE PRODUCT
(1) Mitsubishi programmable controller ("the PRODUCT") shall be used in conditions;
i) where any problem, fault or failure occurring in the PRODUCT, if any, shall not lead to any major or serious accident;
and
ii) where the backup and fail-safe function are systematically or automatically provided outside of the PRODUCT for the
case of any problem, fault or failure occurring in the PRODUCT.
(2) The PRODUCT has been designed and manufactured for the purpose of being used in general industries.
MITSUBISHI SHALL HAVE NO RESPONSIBILITY OR LIABILITY (INCLUDING, BUT NOT LIMITED TO ANY AND ALL
RESPONSIBILITY OR LIABILITY BASED ON CONTRACT, WARRANTY, TORT, PRODUCT LIABILITY) FOR ANY
INJURY OR DEATH TO PERSONS OR LOSS OR DAMAGE TO PROPERTY CAUSED BY the PRODUCT THAT ARE
OPERATED OR USED IN APPLICATION NOT INTENDED OR EXCLUDED BY INSTRUCTIONS, PRECAUTIONS, OR
WARNING CONTAINED IN MITSUBISHI'S USER, INSTRUCTION AND/OR SAFETY MANUALS, TECHNICAL
BULLETINS AND GUIDELINES FOR the PRODUCT.
("Prohibited Application")
Prohibited Applications include, but not limited to, the use of the PRODUCT in;
• Nuclear Power Plants and any other power plants operated by Power companies, and/or any other cases in which the
public could be affected if any problem or fault occurs in the PRODUCT.
• Railway companies or Public service purposes, and/or any other cases in which establishment of a special quality
assurance system is required by the Purchaser or End User.
• Aircraft or Aerospace, Medical applications, Train equipment, transport equipment such as Elevator and Escalator,
Incineration and Fuel devices, Vehicles, Manned transportation, Equipment for Recreation and Amusement, and
Safety devices, handling of Nuclear or Hazardous Materials or Chemicals, Mining and Drilling, and/or other
applications where there is a significant risk of injury to the public or property.
Notwithstanding the above, restrictions Mitsubishi may in its sole discretion, authorize use of the PRODUCT in one or
more of the Prohibited Applications, provided that the usage of the PRODUCT is limited only for the specific
applications agreed to by Mitsubishi and provided further that no special quality assurance or fail-safe, redundant or
other safety features which exceed the general specifications of the PRODUCTs are required. For details, please
contact the Mitsubishi representative in your region.
5
INTRODUCTION
Remark
Thank you for purchasing the Mitsubishi MELSEC-L series programmable controllers.
This manual describes the functions and programming of a high-speed counter module.
Before using this product, please read this manual and the relevant manuals carefully and develop familiarity with the
functions and performance of the MELSEC-L series programmable controller to handle the product correctly.
When applying the program examples introduced in this manual to an actual system, ensure the applicability and
confirm that it will not cause system control problems.
Relevant modules: LD62, LD62D
Unless otherwise specified, this manual describes the program examples in which the I/O numbers of X/Y00 to X/Y0F are
assigned for a high-speed counter module.
For I/O number assignment, refer to the following.
MELSEC-L CPU Module User's Manual (Function Explanation, Program Fundamentals)
Operating procedures are explained using GX Works2. When using GX Developer or GX Configurator-CT, refer to the
following.
• When using GX Developer or GX Configurator-CT ( Page 120, Appendix 5)
6
COMPLIANCE WITH EMC AND LOW VOLTAGE
DIRECTIVES
(1) Method of ensuring compliance
To ensure that Mitsubishi programmable controllers maintain EMC and Low Voltage Directives when incorporated
into other machinery or equipment, certain measures may be necessary. Please refer to one of the following
manuals.
• MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection)
• MELSEC-L CC-Link IE Field Network Head Module User's Manual
• Safety Guidelines (This manual is included with the CPU module or head module.)
The CE mark on the side of the programmable controller indicates compliance with EMC and Low Voltage
Directives.
(2) Additional measures
To ensure that this product maintains EMC and Low Voltage Directives, please refer to Page 37, Section 6.2.1
(4).
7
RELEVANT MANUALS
(1) CPU module user's manual
Manual name
<manual number (model code)>
MELSEC-L CPU Module User's Manual (Hardware Design,
Maintenance and Inspection)
<SH-080890ENG, 13JZ36>
MELSEC-L CPU Module User's Manual (Function Explanation,
Program Fundamentals)
<SH-080889ENG, 13JZ35>
(2) Head module user's manual
Manual name
<manual number (model code)>
MELSEC-L CC-Link IE Field Network Head Module User's Manual
<SH-080919ENG, 13JZ48>
(3) Operating manual
Manual name
<manual number (model code)>
GX Works2 Version 1 Operating Manual (Common)
<SH-080779ENG, 13JU63>
GX Developer Version 8 Operating Manual
<SH-080373E, 13JU41>
Description
Specifications of the CPU modules, power supply modules, display
unit, branch module, extension module, SD memory cards, and
batteries, information on how to establish a system, maintenance
and inspection, and troubleshooting
Functions and devices of the CPU module, and programming
Description
Specifications, procedures before operation, system configuration,
installation, wiring, settings, and troubleshooting of the head module
Description
System configuration, parameter settings, and online operations of
GX Works2, which are common to Simple projects and Structured
projects
Operating methods of GX Developer, such as programming,
*1The value can be configured in intelligent function module switch setting.
tt
*2The counting speed is affected by the pulse rise/fall time.
The number of pulses that can be counted depending on the counting speed is as follows. Note that the count may be
incorrect when pulses with long rise/fall time are counted.
Counting speed switch
setting
200k100k10k
Rise/fall timeBoth 1- and 2-phase inputs
t = 1.25s or less200kPPS100kPPS10kPPS
t = 2.5s or less100kPPS100kPPS10kPPS
t = 25s or less10kPPS10kPPS
t = 500s500PPS
(2) LD62D (differential input sink output type)
ItemSpecifications
Counting speed switch setting
*1
500k (200k to
500kPPS)
Number of occupied I/O points16 points (I/O assignment: Intelligent, 16 points)
(AM26LS31 (manufactured by Texas Instruments Incorporated) or equivalent)
500kPPS200kPPS100kPPS10kPPS
Count input signal
Phase
Signal level
(A, B)
Counting speed
(maximum)
*2
Counting range32-bit signed binary (-2147483648 to 2147483647)
TypeUP/DOWN preset counter + Ring counter functions
200k (100k to
200kPPS)
CW/CCW input
EIA Standard RS-422-A
Differential line driver level
100k (10k to
100kPPS)
10k (10kPPS or less)
Counter
2
5
Minimum count pulse
width
(duty ratio 50%)
11
(Unit : s)
(Minimum phase
difference in 2-phase
input 0.5s)
2.5 2.5
(Unit : s)
(Minimum phase
difference in 2-phase
input 1.25s)
Comparison range32-bit signed binary
Coincidence
output
Comparison result
Setting value < Count value
Setting value = Count value
Setting value > Count value
External input
Preset
Function start
External outputCoincidence output
(EIA Standard RS-422-A differential line driver can be connected.)
Transistor (sink type) output, 2 points/channel
5/12/24VDC 2 to 5mA
12/24VDC 0.5A/point, 2A/common
Internal current consumption (5VDC)0.36A
Weight0.13kg
22
10
55
(Unit : s)
(Minimum phase
difference in 2-phase
input 2.5s)
100
50 50
(Unit : s)
(Minimum phase
difference in 2-phase
input 25s)
CHAPTER 3 SPECIFICATIONS
*1The value can be configured in intelligent function module switch setting.
*2The counting speed is affected by the pulse rise/fall time.
The number of pulses that can be counted depending on the counting speed is as follows. Note that the count may be
incorrect when pulses with long rise/fall time are counted.
Counting speed switch
setting
Rise/fall timeBoth 1- and 2-phase inputs
t = 0.5s or less500kPPS200kPPS100kPPS10kPPS
t = 1.25s or less200kPPS200kPPS100kPPS10kPPS
t = 2.5s or less100kPPS100kPPS10kPPS
t = 25s or less10kPPS10kPPS
t = 500s500PPS
500k200k100k10k
tt
3
3.2.1Number of parameters that can be set
Configure the parameters of the initial setting and the auto refresh of the high-speed counter module within the number
of parameters that can be set to the CPU module or head module, including the number of parameters set for other
intelligent function modules. For the number of parameters that can be set to the CPU module and head module, refer
to the following.
MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection)
MELSEC-L CC-Link IE Field Network Head Module User's Manual
(1) Number of high-speed counter module parameters
The following number of parameters can be set for one high-speed counter module.
ModelInitial settingAuto refresh
LD62814 (maximum number of parameters)
LD62D814 (maximum number of parameters)
3.2 Performance Specifications
3.2.1 Number of parameters that can be set
23
(2) Checking the number of parameters
The number of parameters set for the intelligent function module and the maximum number of parameters can be
checked by the following operation.
Project window [Intelligent Function Module] Right-click [Intelligent Function Module
Parameter List]
1)2)3)4)
No.Description
1)The total number of parameters that have been selected under "Initialization (Count)"
2)The maximum number of parameters for initial setting
3)The total number of parameters that have been selected under "Auto Refresh (Count)"
4)The maximum number of parameters for auto refresh setting
24
3.3Function List
The following table lists the functions of the high-speed counter module.
ItemDescriptionReference
Linear counter function
Ring counter function
Coincidence
output function
Preset function
Counter function
selection
Coincidence
detection
interrupt
function
Count disable
function
Latch counter
function
Sampling
counter function
Periodic pulse
counter function
This function counts pulses between -2147483648 and 2147483647 and detects an
overflow if the count value is outside the range.
This function repeatedly counts pulses between the ring counter upper limit value
and the ring counter lower limit value.
This function compares the present counter value with the preset coincidence output
point setting value and outputs on or off signal when they match.
This function outputs an interrupt signal to the CPU module and starts an interrupt
program when the present counter value matches with the preset coincidence output
point setting value.
This function overwrites the present counter value with the preset value.
This function is performed by a program or an external control signal (preset input).
This function stops counting pulses while CH Count enable command (Y4, YC) is
on.
This function stores the present counter value to the buffer memory when the
counter function selection start command signal is input.
This function is performed by a program or an external control signal (function input).
This function counts pulses input during the specified sampling period after the
counter function selection start command is input and stores the counter value to the
buffer memory.
This function is performed by a program or an external control signal (function input).
This function stores the present and previous counter values to the corresponding
buffer memory areas at the preset cycle while the counter function selection start
command signal is input.
CHAPTER 3 SPECIFICATIONS
Page 64,
Section 8.2.1
Page 65,
Section 8.2.2
Page 68,
Section 8.3
Page 73,
Section 8.4
Page 78,
Section 8.6
Page 79,
Section 8.7
Page 80,
Section 8.8
Page 81,
Section 8.9
3
3.3 Function List
● These functions can be used together.
However, select either the linear counter function or the ring counter function and any one of the counter functions from
counter function selection.
● The preset function and the function selected from counter function selection can also be performed by the following
external inputs.
• To use the preset function, apply a voltage to the preset input terminal.
• To use any function of the counter function selection, apply a voltage to the function start input terminal.
25
3.4List of I/O Signals
The following table lists the I/O signals of the high-speed counter module.
For details on the I/O signals, refer to the following.
• Details of I/O signals ( Page 112, Appendix 1)
Input signalOutput signal
Device No.Signal nameDevice No.Signal name
X0Module READYY0
X1CH1 Counter value large (point No.1)Y1CH1 Preset command
X2CH1 Counter value coincidence (point No.1)Y2CH1 Coincidence signal enable command
X3CH1 Counter value small (point No.1)Y3CH1 Down count command
X9CH2 Counter value coincidence (point No.1)Y9CH2 Preset command
XACH2 Counter value small (point No.1)YACH2 Coincidence signal enable command
XBCH2 External preset request detectionYBCH2 Down count command
XCCH2 Counter value large (point No.2)YCCH2 Count enable command
XDCH2 Counter value coincidence (point No.2)YD
XECH2 Counter value small (point No.2)YE
XFUse prohibitedYF
CH1 Coincidence signal No.1 reset
command
CH1 External preset detection reset
command
CH1 Counter function selection start
command
CH1 Coincidence signal No.2 reset
command
CH2 Coincidence signal No.1 reset
command
CH2 External preset detection reset
command
CH2 Counter function selection start
command
CH2 Coincidence signal No.2 reset
command
26
● The I/O numbers (X/Y) above apply when the start I/O number of the high-speed counter module is set to "0".
● The use prohibited signal above is used by the system and is not available for users. If used (turned on) by a user, the
performance of the high-speed counter module is not guaranteed.
3.5List of Buffer Memory Areas
The following table lists the buffer memory areas of the high-speed counter module.
For details on the buffer memory areas, refer to the following.
• Details of Buffer Memory Areas ( Page 116, Appendix 2)
Address
(decimal)
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
31
32
33
34
35
36
37
38
39
Address
(hexadecimal)
0
H
1
H
2
H
3
H
4
H
5
H
6
H
7
H
8
H
9
H
A
H
B
H
C
H
D
H
E
H
F
H
10
H
11
H
12
H
13
H
14
H
15
H
16
H
17
H
18
H
1F
H
20
H
21
H
22
H
23
H
24
H
25
H
26
H
27
H
Name
CH1 Preset value (L)
CH1 Preset value (H)
CH1 Present value (L)
CH1 Present value (H)
CH1 Coincidence output point No.1 (L)
CH1 Coincidence output point No.1 (H)
CH1 Coincidence output point No.2 (L)
CH1 Coincidence output point No.2 (H)
CH1 Overflow detection0R
CH1 Counter function selection0R/W
CH1 Sampling/periodic time setting0R/W
CH1 Sampling/periodic counter flag0R
CH1 Latch count value (L)
CH1 Latch count value (H)
CH1 Sampling count value (L)
CH1 Sampling count value (H)
CH1 Periodic pulse count previous value (L)
CH1 Periodic pulse count previous value (H)
CH1 Periodic pulse count present value (L)
CH1 Periodic pulse count present value (H)
CH1 Ring counter lower limit (L)
CH1 Ring counter lower limit (H)
CH1 Ring counter upper limit (L)
CH1 Ring counter upper limit (H)
System areatoto
CH2 Preset value (L)
CH2 Preset value (H)
CH2 Present value (L)
CH2 Present value (H)
CH2 Coincidence output point No.1 (L)
CH2 Coincidence output point No.1 (H)
CH2 Coincidence output point No.2 (L)
CH2 Coincidence output point No.2 (H)
*3
*3
*3
*3
*3
*3
*3
*3
*3
*3
*3
*3
*3
*3
*3
*3
CHAPTER 3 SPECIFICATIONS
Initial value
*1
Read/write
*2
3
0R/W
0R/W
0R
0R
*3
*3
*3
*3
0R/W
0R/W
0R/W
0R/W
0R
0R
0R
3.5 List of Buffer Memory Areas
0R
*3
*3
*3
*3
0R
0R
0R
0R
0R/W
0R/W
0R/W
0R/W
0R/W
0R/W
0R
0R
*3
*3
*3
*3
0R/W
0R/W
0R/W
0R/W
27
Address
(decimal)
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
63
*1This value is set when the high-speed counter module is powered on or the CPU module is reset.
*2Whether a value can be read from/written to a program or not is indicated.
*3Read or write values in 32-bit signed binary. (Be sure to use two words at a time.)
Address
(hexadecimal)
28
29
2A
2B
2C
2D
2E
2F
30
31
32
33
34
35
36
37
38
3F
R: Readable
W: Writable
Name
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
CH2 Overflow detection0R
CH2 Counter function selection0R/W
CH2 Sampling/periodic time setting0R/W
CH2 Sampling/periodic counter flag0R
CH2 Latch count value (L)
CH2 Latch count value (H)
CH2 Sampling count value (L)
CH2 Sampling count value (H)
CH2 Periodic pulse count previous value (L)
CH2 Periodic pulse count previous value (H)
CH2 Periodic pulse count present value (L)
CH2 Periodic pulse count present value (H)
CH2 Ring counter lower limit (L)
CH2 Ring counter lower limit (H)
CH2 Ring counter upper limit (L)
CH2 Ring counter upper limit (H)
*3
*3
*3
*3
*3
*3
*3
*3
*3
*3
*3
*3
Initial value
*1
Read/write
0R
0R
0R
0R
0R
0R
0R
0R
0R/W
0R/W
0R/W
0R/W
*2
System areatoto
H
● The system areas listed above and the areas not listed above are used by the system and are not available for users. If
data are written by a user, the performance of the high-speed counter module is not guaranteed.
● Buffer memory data in the high-speed counter module are initialized when the high-speed counter module is powered on
or the CPU module is reset. To save the necessary data, read/write the data by executing the FROM/DFRO/TO/DTO
instructions in the program or performing auto refresh to the device data.
28
CHAPTER 4 PROCEDURES BEFORE OPERATION
Start
Module installation
Connect the high-speed counter module.
Wiring
Connect an external device to the high-speed counter module.
Add the model name of the high-speed counter module.
Adding the model name of the intelligent function module
Switch setting
Set a pulse input mode, counting speed, and counter type.
Set an output mode if a CPU stop error occurs and CPU module
operation mode if a high-speed counter module error is detected.
Intelligent function module detailed setting
NO
YES
Use intelligent function module parameters?
Configure the parameter and auto refresh settings.
Parameter setting and auto refresh setting
Programming and debugging
Create and check a program.
CHAPTER 4PROCEDURES BEFORE OPERATION
This chapter lists the procedures before operation.
This chapter describes the overall configuration, number of connectable modules, and compatible software versions of
the high-speed counter module.
5.1Overall Configuration
The following figures show examples of system configuration using the high-speed counter module.
(1) When connected to the CPU module
5
5.1 Overall Configuration
31
(2) When connected to the head module
Power supply moduleEND cover
Connector
Head moduleHigh-speed counter module
32
CHAPTER 5 SYSTEM CONFIGURATION
5.2Applicable System
(1) Number of connectable modules
For the number of connectable modules, refer to the following.
MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection)
MELSEC-L CC-Link IE Field Network Head Module User's Manual
(2) Compatible software versions
For compatible software versions, refer to the following.
MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection)
MELSEC-L CC-Link IE Field Network Head Module User's Manual
5.2.1Restrictions when the high-speed counter module is
connected to the head module
5
The restrictions are as follows:
• The coincidence detection interrupt function cannot be used.
• Due to the link scan time, a delay occurs. This delay causes variations if the processing is carried out with
counter values that are input using a program. Thoroughly examine the system to make sure that it will not
cause controllability problem.
5.2.1 Restrictions when the high-speed counter module is connected to the head module
5.2 Applicable System
33
CHAPTER 6INSTALLATION AND WIRING
This chapter describes installation and wiring of the high-speed counter module.
6.1Installation Environment and Installation Position
For precautions for installation environment and installation position, refer to the following.
MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection)
MELSEC-L CC-Link IE Field Network Head Module User's Manual
34
CHAPTER 6 INSTALLATION AND WIRING
6.2Wiring
This section describes wiring of encoders and controllers to the high-speed counter module.
6.2.1Wiring precautions
To obtain the maximum performance from the functions of the high-speed counter module and improve the system
reliability, an external wiring with high durability against noise is required.
Here are some precautions when wiring encoders and controllers.
(1) Wiring
• Different terminals are prepared depending on the voltage of the signal to be input. Connecting to a terminal
with a different voltage may cause malfunction of the module or failure of the connected devices.
• In 1-phase input, always connect a pulse input cable on the A-phase side.
• Install a fuse for each external terminal to prevent the external devices or module from being burnt out or
damaged if a load shorts in an output circuit. The following fuses have been tested by Mitsubishi.
Fuse model nameRated currentContact
312.7500.75A
216.8000.8A
Littlefuse KK
www.littelfuse.com
6
(2) Connectors for external devices
• Connectors for external devices must be soldered or crimped properly. A poor soldering or crimping may
result in malfunction.
• Securely connect the connectors for external devices to the connectors of the high-speed counter module,
and securely tighten the two screws.
• When removing a cable from the high-speed counter module, do not pull the cable by the cable part.
Remove a cable supporting the connector part of the cable by hand. Pulling the cable being connected to the
high-speed counter module can cause malfunction. In addition, a damage of the high-speed counter module
or cables can result.
6.2.1 Wiring precautions
6.2 Wiring
35
(3) Measures against noise
Measure 1
Measure 2
Use shielded twisted pair cables.
Use the shortest possible shielded twisted pair cables, placing them not parallel with
noise-generating power cables or I/O cables and at a distance of 150mm or more.
Measure3
Ground the shield cable on the encoder side (relay box). Always ground the FG and LG terminals
to the protective ground conductor.
To A
To B
To the high-speed
counter module
Current for encoder
A
B
24V
E
+24V
0V
E
To the encoder
Connect the shielded cable of the encoder to the shielded
cable of the shielded twisted pair cable in the relay box.
If the shielded wire of the encoder is not grounded,
ground it to the relay box as shown by the dotted lines.
• The high-speed counter module may count pulses incorrectly if pulse-like noise is input.
• For the input of high-speed pulses, take the following measures against noise:
• The following figure shows a wiring example for noise reduction.
High-speed counter module
Inverter
Programmable
controller
Install I/O cables at least
150mm away from
high voltage equipment
such as a relay or
inverter.
(Pay attention to wiring in
the control panel as well.)
Terminal
block
AC motor
Terminal
block
Avoid using a solenoid valve or inductive load together with the cable in a metallic pipe.
If a sufficient distance from the power line cannot be ensured due to duct wiring,
use shielded cables such as CVVS for the power line.
Relay box
Provide the shortest possible distance between the encoder and
relay box.
If the distance from the high-speed counter to the encoder is long,
Cart
Encoder
a voltage drop may occur. Using a measuring instrument such as
a tester on the terminal block of the relay box, check if the voltages
in the encoder operation and stop status are within the rated
voltage range. If a voltage drop is too large, increase the cable size
or use a 24VDC encoder that will consume less current.
• Ground the shielded twisted pair cable on the encoder side (relay box). (Shown here is an example of
wiring to an open collector output type encoder (24VDC).)
36
CHAPTER 6 INSTALLATION AND WIRING
(4) Requirements for compliance with the EMC and Low Voltage Directives
Take the following measures for compliance with the EMC and Low Voltage Directives.
• Install a DC power inside the control panel.
• Use a shielded cable for the DC power when the cable is extended out of the control panel.
• Keep the length of the cables between the high-speed counter module and the external devices to 30m or
less.
• Use a shielded twisted pair cable and ground the shielded part of the cable to the control panel with the
AD75CK-type cable clamping (Mitsubishi).
Inside of control panel
counter module
High-speed
20 to 30cm
AD75CK
For details on the AD75CK, refer to the following.
AD75CK-type Cable Clamping Instruction Manual
6
6.2.1 Wiring precautions
6.2 Wiring
37
• Take the following noise reduction measures when wiring a connector for external devices.
Take off the jacket of each shield and connect
the shields of the cables with conductive tapes.
Cover the wires with
an insulating tape.
Take a shield out from any of the shielded cables,
and solder it to the FG wire.
Coat the connector pins with heatshrinkable insulation
tubes to protect signal lines.
(Exposure of signal lines may cause malfunction
due to static electricity.)
Cover the wires and conductive tape
with a heatshrinkable tube.
[Example of wiring using a shielded cable]
The following figure shows an example of wiring for noise reduction using the A6CON1.
Connector
(A6CON1)
From the controller
Shielded
cable
From the encoder
To the external device
To the high-speed counter module
[Example of noise reduction measures taken to shielded cables]
Assembling the A6CON1
The length between the connector
and shielded cables should be the
shortest possible.
2
Ground the shortest possible FG wire of 2mm
or more.
(Ground it to the panel on the high-speed counter module
side.)
38
6.2.2Connectors for external devices
(1) Precautions
• Tighten the connector screws within the specified torque range.
ScrewTightening torque range
Connector screw (M2.6)0.20 to 0.29Nm
• Use copper wires having temperature rating of 75 or more for the connectors.
• Use UL listed connectors if necessary for UL compliance.
(2) Applicable connectors
Connectors for external devices that are applicable to the high-speed counter module need to be obtained by a
user.
The following tables list the applicable connectors, and the reference product of a crimping tool.
CHAPTER 6 INSTALLATION AND WIRING
(a) 40-pin connectors
TypeModelApplicable wire size
Soldering type connector
(straight out type)
Crimping type connector
(straight type)
Soldering type connector
(dual purpose (straight/oblique) type)
The A6CON3 (IDC type connector (straight type)) cannot be used.
A6CON10.3 (22 AWG) (Stranded)
A6CON20.088 to 0.24 (28 to 24 AWG) (stranded wire)
A6CON40.3 (22 AWG) (Stranded)
(b) 40-pin connector crimping tool
TypeModelContact
Crimping toolFCN-363T-T005/H
For how to wire the connector and how to use the crimping tool, contact the manufacturer.
FUJITSU COMPONENT LIMITED
www.fcl.fujitsu.com/en
6
6.2 Wiring
6.2.2 Connectors for external devices
39
(3) Wiring method
Connector screw
For wiring method, refer to the following.
MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection)
(4) Connection procedure
1. Plugging the connector
Plug the connector into the slot on the high-speed
This section lists the interface of the high-speed counter module with external devices.
(1) Terminal layout and terminal numbers of the connector for external devices
The following figure shows the terminal layout and numbers on the connector for external devices.
6
6.2 Wiring
6.2.3 Interface with external devices
41
(2) LD62 (DC input sink output type)
6.8kΩ
A20,A13
B20,B13
A19,A12
B19,B12
A18,A11
B18,B11
A17,A10
1/3W
3.9kΩ
1/4W
330Ω
1/4W
6.8kΩ
1/3W
3.9kΩ
1/4W
330Ω
1/4W
10kΩ
1/3W
5.6kΩ
1/10W
2kΩ
1/8W
10kΩ
1/3W
5.6kΩ
1/10W
2kΩ
1/8W
1kΩ
1/10W
1kΩ
1/10W
B17,B10
A16,A09
B16,B09
A15,A08
B15,B08
A14,A07
B14,B07
I/O
classification
Internal circuit
Terminal
*1
number
Signal nameOperation
CH1 CH2
A20 A13
B20 B13
Phase A pulse input
24V
Phase A pulse input
12V
A19 A12 Phase A pulse input 5V
On21.6 to 26.4V2 to 5mA
Off5V or less0.1mA or less
On10.8 to 13.2V2 to 5mA
Off4V or less0.1mA or less
On4.5 to 5.5V2 to 5mA
Off2V or less0.1mA or less
Input voltage
(guaranteed
value)
B19 B12 ABCOM
Operating
current
(guaranteed
value)
Input
A18 A11
B18 B11
Phase B pulse input
24V
Phase B pulse input
12V
A17 A10 Phase B pulse input 5V
B17 B10 Preset input 24V
A16 A09 Preset input 12V
B16 B09 Preset input 5V
A15 A08 CTRLCOM
B15 B08 Function start input 24V
A14 A07 Function start input 12V
B14 B07 Function start input 5V
On21.6 to 26.4V2 to 5mA
Off5V or less0.1mA or less
On10.8 to 13.2V2 to 5mA
Off4V or less0.1mA or less
On4.5 to 5.5V2 to 5mA
Off2V or less0.1mA or less
On21.6 to 26.4V2 to 5mA
Off5V or less0.1mA or less
On10.8 to 13.2V2 to 5mA
Off4V or less0.1mA or less
On4.5 to 5.5V2 to 5mA
Off2V or less0.1mA or less
Response
time
Off to on
0.5ms or less
On to off
1ms or less
On21.6 to 26.4V2 to 5mA
Off5V or less0.1mA or less
On10.8 to 13.2V2 to 5mA
Off4V or less0.1mA or less
On4.5 to 5.5V2 to 5mA
Off2V or less0.1mA or less
Response
time
Off to on
0.5ms or less
On to off
1ms or less
42
CHAPTER 6 INSTALLATION AND WIRING
I/O
classification
Output
Terminal
*1
Internal circuit
A06,A05
B06,B05
B02,B01
A02,A01
*1The terminals A03, A04, B03, and B04 are not assigned.
*2Coincidence output derating (on ratio) is as follows.
number
CH1 CH2
A06 A05
B06 B05
B02, B0112/24V• Input voltage: 10.2 to 30V
A02, A010V
100
90
80
70
60
50
ON ratio (%)
40
30
0105550403020
Ambient temperature ( )
Signal nameOperation
EQU1
(coincidence output
point No.1)
EQU2
(coincidence output
point No.2)
Input voltage
(guaranteed
value)
• Operating voltage: 10.2 to 30V
• Maximum load current: 0.5A/point,
2A/common
• Maximum voltage drop at on: 1.5V
• Response time
Off to on: 0.1ms or less
On to off: 0.1ms or less (rated load, resistive
load)
• Current consumption: 43mA
(TYP., 24VDC and all points on/common)
• Common to all channels
*2
Operating
current
(guaranteed
value)
6
6.2 Wiring
6.2.3 Interface with external devices
43
(3) LD62D (differential input sink output type)
+5V+5V
27kΩ
1/10W
4.7kΩ
1/10W
100Ω
1/2W
4.7kΩ
1/10W
27kΩ
1/10W
A20,A14
B20,B14
Line
receiver
Digital
isolator
+5V+5V
27kΩ
1/10W
4.7kΩ
1/10W
100Ω
1/2W
4.7kΩ
1/10W
27kΩ
1/10W
A19,A13
B19,B13
Line
receiver
Digital
isolator
1kΩ
1/10W
10kΩ
1/3W
5.6kΩ
1/10W
680Ω
1/10W
A16,A10
B16,B10
A15,A09
B15,B09
Terminal
I/O
classification
Internal circuit
CH1 CH2
number
*1
Signal nameOperation
Input voltage
(guaranteed
value)
Operating
current
(guaranteed
value)
Input
1kΩ
1/10W
10kΩ
1/3W
5.6kΩ
1/10W
680Ω
1/10W
A18,A12
B18,B12
A17,A11
B17,B11
A20A14Phase A pulse input
B20B14Phase A
pulse input
A19A13Phase B pulse input
B19B13Phase B pulse input
A18A12Preset input 24V
B18B12Preset input 12V
A17A11Preset input 5V
B17B11PRSTCOM
A16A10Function start input 24V
B16B10Function start input 12V
A15A09Function start input 5V
B15B09FUNCCOM
EIA Standard RS-422-A Line receiver
(AM26C32 (manufactured by Texas
Instruments Incorporated) or equivalent)
The line receiver specifications are as follows:
• VIT + Differential input on voltage
(H level threshold voltage) 0.2V
• VIT - Differential input off voltage
(L level threshold voltage) - 0.2V
• Vhys hysteresis voltage (VIT +- VIT -) 60mV
(Current type line driver cannot be used.)
On21.6 to 26.4V2 to 5mA
Off5V or less0.1mA or less
On10.8 to 13.2V2 to 5mA
Off4V or less0.1mA or less
On2.5 to 5.5V2 to 5mA
Off1V or less0.1mA or less
Response
time
Off to on
0.5ms or less
On to off
1ms or less
On21.6 to 26.4V2 to 5mA
Off5V or less0.1mA or less
On10.8 to 13.2V2 to 5mA
Off4V or less0.1mA or less
On2.5 to 5.5V2 to 5mA
Off1V or less0.1mA or less
Response
time
Off to on
0.5ms or less
On to off
1ms or less
44
CHAPTER 6 INSTALLATION AND WIRING
A06,A05
B06,B05
B02,B01
A02,A01
I/O
classification
Output
Terminal
*1
Internal circuit
*1The terminals A03, A04, A07, A08, B03, B04, B07, and B08 are not assigned.
*2Coincidence output derating (on ratio) is as follows.
number
CH1 CH2
A06A05
B06B05
B02, B0112/24V• Input voltage: 10.2 to 30V
A02, A010V
100
90
80
70
60
50
ON ratio (%)
40
30
0105550403020
Ambient temperature ( )
Signal nameOperation
EQU1
(coincidence output
point No.1)
EQU2
(coincidence output
point No.2)
• Operating voltage: 10.2 to 30V
• Maximum load current: 0.5A/point,
2A/common
• Maximum voltage drop at on: 1.5V
• Response time
Off to on: 0.1ms or less
On to off: 0.1ms or less (rated load, resistive
load)
• Current consumption: 43mA
(TYP., 24VDC and all points on/common)
• Common to all channels
Input voltage
(guaranteed
value)
*2
Operating
current
(guaranteed
value)
6
6.2 Wiring
6.2.3 Interface with external devices
45
6.2.4Connectable encoders
Encoders that can be connected to the high-speed counter module are as follows.
(1) To the LD62
• Open collector output type encoder
• CMOS level voltage output type encoder
(Check that the encoder output voltage meets the specifications of the LD62.)
(2) To the LD62D
• Line driver output type encoder
(Check that the encoder output voltage meets the specifications of the LD62D.)
The following encoder cannot be used with the high-speed counter module.
● TTL level voltage output type encoder
46
CHAPTER 6 INSTALLATION AND WIRING
A20(A13)
24V
B20(B13)
12V
A19(A12)
5V
B19(B12)
ABCOM
Phase A
Shield
OUT
E
+24V
LD62
A18(A11)
24V
B18(B11)
12V
A17(A10)
5V
Phase B
Shield
OUT
E
+24V
0V
+24V
0V
24VDC
External power supply
Shielded twisted pair cable
Shielded twisted pair cable
Encoder
In parentheses, terminal numbers of channel 2 are shown.
24V
ABCOM
LD62
0V
24VDC
External
power supply
OUT
Encoder
+24V
0V
E
Shielded twisted pair cable
Shield
Phase A
24V
ABCOM
LD62
OUT
0V
24VDC
External
power supply
Encoder
+24V
0V
E
Shielded twisted pair cable
Shield
Phase A
Because currents flow in
the same direction in the
shielded twisted pair cable,
canceling effect will be lost
and electromagnetic
induction may occur.
6.3Examples of Wiring Between the High-Speed Counter
Module and an Encoder
(1) Example of wiring with an open collector output type encoder (24VDC)
6
For the wiring between the RD62 and an encoder, separate the power supply cables and the signal cables. The following
figures show its examples:
● Example of correct wiring
● Example of inappropriate wiring
6.3 Examples of Wiring Between the High-Speed Counter Module and an Encoder
47
(2) Example of wiring with a voltage output type encoder (5VDC)
A20(A13)
24V
B20(B13)
12V
A19(A12)
5V
B19(B12)
ABCOM
Phase A
E
LD62
A18(A11)
24V
B18(B11)
12V
A17(A10)
5V
Phase B
0V
0V
External power supply
E
GND
OUT
+5V
5VDC
GND
OUT
Shielded twisted pair cable
Shielded twisted pair cable
Encoder
Shield
Shield
In parentheses, terminal numbers of channel 2 are shown.
(3) Example of wiring with a line driver (equivalent to AM26LS31) encoder
Encoder
A
A
E
B
B
E
VCCVCC
0V
Phase
A
Phase
B
Digital
isolator
Digital
isolator
LD62D
External power supply
A
A20(A14)
A
B20(B14)
B
A19(A13)
B
B19(B13)
0V
Shielded twisted pair cable
Shield
Shielded twisted pair cable
Shield
In parentheses, terminal numbers of channel 2 are shown.
48
CHAPTER 6 INSTALLATION AND WIRING
A18(A12)
24V
B18(B12)
12V
A17(A11)
5V
B17(B11)
PRSTCOM
Preset
Shield
OUT
E
+12V
ControllerLD62D
Shield
OUT
E
+12V
12VDC
A16(A10)
24V
B16(B10)
12V
A15(A09)
5V
B15(B09)
FUNCCOM
Function start
Shielded twisted pair cable
Shielded twisted pair cable
B17(B10)
24V
A16(A09)
12V
B16(B09)
5V
A15(A08)
CTRLCOM
Preset
Shield
OUT
E
+12V
ControllerLD62
Shield
OUT
E
+12V
12VDC
B15(B08)
24V
A14(A07)
12V
B14(B07)
5V
Function start
Shielded twisted pair cable
Shielded twisted pair cable
In parentheses, terminal numbers of channel 2 are shown.
In parentheses, terminal numbers of channel 2 are shown.
6.4Examples of Wiring Between a Controller and External
Input Terminals
(1) When the controller (sync load type) has a voltage of 12VDC
6
6.4 Examples of Wiring Between a Controller and External Input Terminals
49
(2) When the controller (source load type) has a voltage of 5VDC
Preset
Function start
24V
B17(B10)
12V
A16(A09)
5V
B16(B09)
CTRLCOM
A15(A08)
24V
B15(B08)
12V
A14(A07)
5V
B14(B07)
ControllerLD62
Shielded twisted pair cable
OUT
GND
Shield
Shielded twisted pair cable
E
OUT
GND
Shield
E
In parentheses, terminal numbers of channel 2 are shown.
5VDC
Preset
Function start
24V
A18(A12)
12V
B18(B12)
5V
A17(A11)
PRSTCOM
B17(B11)
24V
A16(A10)
12V
B16(B10)
5V
A15(A09)
FUNCCOM
B15(B09)
ControllerLD62D
Shielded twisted pair cable
OUT
GND
Shield
Shielded twisted pair cable
E
OUT
GND
Shield
E
In parentheses, terminal numbers of channel 2 are shown.
5VDC
50
(3) When the controller is a line driver type
A18(A12)
24V
B18(B12)
12V
A17(A11)
5V
B17(B11)
PRSTCOM
Preset
Shield
OUT
E
Controller
A16(A10)
24V
B16(B10)
12V
A15(A09)
5V
B15(B09)
FUNCCOM
Function start
Shield
OUT
E
OUT
OUT
Shielded twisted pair cable
Shielded twisted pair cable
LD62D
In parentheses, terminal numbers of channel 2 are shown.
CHAPTER 6 INSTALLATION AND WIRING
6
6.4 Examples of Wiring Between a Controller and External Input Terminals
51
6.5Examples of Wiring with External Output Terminals
Load
Load
A06(A05)
B06(B05)
A02, A01
B02, B01
EQU1
EQU2
0V
12/24V
10.2 to
30VDC
Fuse*
1
Fuse*
1
LD62, LD62D
In parentheses, terminal numbers of channel 2 are shown.
To use the coincidence output terminal (EQU), an external power supply of 10.2 to 30VDC is required to drive the
internal photocoupler. The following figure shows the wiring example:
(1) For the high-speed counter module (sink output type)
*1Install a fuse for each external terminal to prevent the external devices or module from being burnt out or damaged if a
load shorts in an output circuit.
52
CHAPTER 7SETTINGS
This chapter describes how to configure settings of the high-speed counter module.
● After writing the contents of the new module, parameter settings, and auto refresh settings into the CPU module, reset
the CPU module and switch its status as STOP RUN STOP RUN, or turn off and on the power supply to activate
the settings.
● After writing the contents of the switch settings, reset the CPU module or turn off and on the power supply to activate the
settings.
7.1Adding a Module
Add the model name of the high-speed counter module used for the project.
CHAPTER 7 SETTINGS
(1) How to add a module
Open "New Module".
Project window [Intelligent Function Module] Right-click [New Module...]
ItemDescription
Module Selection
Mount Position
Title SettingTitleEnter a title.
Module TypeSelect "Counter Module".
Module NameSelect the model name of the module to be connected.
Mounted Slot No.Select the number of the slot where the module is mounted.
Specify start XY
address
7
7.1 Adding a Module
The start I/O number (hexadecimal) of the module mounted on the slot set to
"Mounted Slot No." is displayed. This item can be set by user.
53
7.2Switch Setting
Set a pulse input mode, counting speed, and counter type for each channel.
(1) Setting method
Open "Switch Setting".
Project window [Intelligent Function Module] Model name [Switch Setting]
ItemDescriptionSetting value
Pulse input modeSelect a pulse input mode for each channel.
Select a counting speed for each channel.
Counting speed setting
Counter formatSelect a counter type for each channel.
500kpps can be selected for the LD62D
only.
• 1-Phase Multiple of 1 (default)
• 1-Phase Multiple of 2
• CW/CCW
• 2-Phase Multiple of 1
• 2-Phase Multiple of 2
• 2-Phase Multiple of 4
• 10kpps (default)
• 100kpps
• 200kpps
• 500kpps
• Linear Counter (default)
• Ring Counter
54
7.3Intelligent Function Module Detailed Setting
Perform an output mode setting for an error and CPU module operation mode setting for a hardware error.
(1) Setting method
Open the "I/O Assignment" tab.
1. Open "I/O Assignment" of the PLC parameter.
Project window [Parameter] [PLC
Parameter] [I/O Assignment]
2. Click the button.
CHAPTER 7 SETTINGS
3. Select "Clear" or "Hold" for "Error Time Output
Mode".
4. Select "Stop" or "Continue" for "PLC Operation
Mode at H/W Error".
5. Click the button to complete the settings
of "Error Time Output Mode" and "PLC Operation
Mode at H/W Error".
ItemDescriptionSetting valueRemarks
• Clear: If a CPU stop error occurs, all
external outputs of coincidence
Error Time Output
Mode
PLC Operation Mode
at H/W Error
Select whether to clear or hold module
output if a CPU stop error occurs.
• Select whether to stop or continue the
CPU module operation if a high-speed
counter module error (SP.UNIT DOWN)
is detected.
• The error (SP.UNIT DOWN) is detected
if the module READY flag is not in ready
due to module hardware failure.
• Clear (default)
•Hold
• Stop (default)
• Continue
signals turn off.
• Hold: If a CPU stop error occurs,
external outputs of coincidence
signals are held in the status before
the CPU module stops.
• Stop: If a high-speed counter module
error is detected, the CPU module
stops.
• Continue: Even if a high-speed
counter module error is detected, the
CPU module continues running a
program for modules other than the
faulty one.
7
7.3 Intelligent Function Module Detailed Setting
55
7.4Parameter Settings
Item to be selected
from the pull-down list
Item to be input in a text box
Set parameters for each channel.
Setting parameters here eliminates the need to program them.
(1) Setting method
Open the "Parameter" window.
1. Open the "Parameter" window from the project window.
Project window [Intelligent Function Module] Model name [Parameter]
Basic setting
Counter function
2. Double-click the text box of the setting-target item and select or enter a value.
• Items to be set by selecting a value from a pull-down list
Double-click the text box and select an option from the displayed pull-down list.
• Items to be set by entering a value in a text box
Double-click the text box and enter a value.
3. When using CH2, perform the procedure 2.
ItemSetting valueReference
Preset value-2147483648 to 2147483647 (default: 0)Page 73, Section 8.4
Coincidence output point
No.1
Coincidence output point
No.2
Ring counter upper limit-2147483648 to 2147483647 (default: 0)
Ring counter lower limit-2147483648 to 2147483647 (default: 0)
Counter function selection
Sampling/periodic time
setting
-2147483648 to 2147483647 (default: 0)
-2147483648 to 2147483647 (default: 0)
0: Count Disable Function (default)
1: Latch Counter Function
2: Sampling Counter Function
3: Periodic Pulse Counter Function
1 to 65535 (unit: 10ms) (default: 0)
Page 68, Section 8.3
Page 65, Section 8.2.2
Page 75, Section 8.5
56
7.5Auto Refresh
The function of auto refresh is to transfer buffer memory data to a specified device.
This setting eliminates the need to read data with a program.
(1) Setting method
Open the "Auto_Refresh" window.
1. Open the "Auto_Refresh" window from the project window.
Project window [Intelligent Function Module] Model name [Auto_Refresh]
2. Click the text box of the setting-target item and enter the auto refresh target device.
CHAPTER 7 SETTINGS
7
7.5 Auto Refresh
57
CHAPTER 8FUNCTIONS
This chapter describes the details of the functions that can be achieved through the high-speed counter module and
their setting methods.
For details on I/O signals and buffer memory, refer to the following.
• Details of I/O signals ( Page 112, Appendix 1)
• Details of Buffer Memory Areas ( Page 116, Appendix 2)
58
CHAPTER 8 FUNCTIONS
A
B or
CH Down
count command
(Y3, YB)
A
B or
CH Down
count command
(Y3, YB)
A
B
8.1Pulse Input Modes and Counting Methods
This section describes the pulse input modes and the counting methods.
8.1.1Types of pulse input modes
The following six pulse input modes are prepared: 1-phase pulse input (1 multiple/2 multiples), CW/CCW pulse input,
and 2-phase pulse input (1 multiple/2 multiples/4 multiples).
(1) Pulse input modes and count timing
Pulse input modeCount timing
1-phase multiple of 1
1-phase multiple of 2
At up count
At down count
At up count
At down count
B and
CH Down
count command
(Y3, YB)
B and
CH Down
count command
(Y3, YB)
A
A
Counts on the rising edge () of A.
B and CH Down count command (Y3, YB) are off.
Counts on the falling edge () of A.
B or CH Down count command (Y3, YB) is on.
Counts on the rising edge () and the falling edge ()
of A.
B and CH Down count command (Y3, YB) are off.
Counts on the rising edge () and the falling edge ()
of A.
B or CH Down count command (Y3, YB) is on.
8
8.1 Pulse Input Modes and Counting Methods
8.1.1 Types of pulse input modes
CW/CCW
2-phase multiple of 1
At up count
At down count
At up countCounts on the rising edge () of A while B is off.
At down countCounts on the falling edge () of A while B is off.
A
B
A
B
A
B
Counts on the rising edge () of A.
B is off.
A is off.
Counts on the rising edge () of B.
59
Pulse input modeCount timing
A
B
A
B
A
B
A
B
2-phase multiple of 2
2-phase multiple of 4
For the 1-phase pulse input, check that for up count, the phase B pulse input and CH Down count command (Y3, YB) are
off before performing the phase A pulse input.
If at least one of the B phase pulse input and CH Down count command (Y3, YB) is on, pulses are counted down in the A
phase pulse input.
At up count
At down count
At up count
At down count
Counts on the rising edge () of A while B is off.
Counts on the falling edge () of A while B is on.
Counts on the rising edge () of A while B is on.
Counts on the falling edge () of A while B is off.
Counts on the rising edge () of A while B is off.
Counts on the falling edge () of A while B is on.
Counts on the rising edge () of B while A is on.
Counts on the falling edge () of B while A is off.
Counts on the rising edge () of A while B is on.
Counts on the falling edge () of A while B is off.
Counts on the rising edge () of B while A is off.
Counts on the falling edge () of B while A is on.
60
CHAPTER 8 FUNCTIONS
Phase A pulse input
Phase B pulse input
A
B
Encoder
High-speed counter module
(a) 1-phase pulse input
The count method can be selected from 1 multiple and 2 multiples.
The following figure shows the relationship between phase A pulse input and phase B pulse input or CH
Down count command (Y3, YB).
High-speed counter module
Encoder
B or CH Down count command
(Y3, YB)
Pulse input
A
B
(b) CW/CCW pulse input
Pulses can be counted up with the A phase pulse input and counted down with the B phase pulse input.
The following figure shows the relationship between A phase pulse input and B phase pulse input.
High-speed counter module
Encoder
Encoder
Count-up pulse input
Count-down pulse input
A
B
(c) 2-phase pulse input
The count method can be selected from 1 multiple, 2 multiples, and 4 multiples.
The phase difference between the A phase pulse and B phase pulse determines whether the pulses are
counted up or down.
The following figure shows the relationship between A phase pulse input and B phase pulse input.
8
8.1 Pulse Input Modes and Counting Methods
8.1.1 Types of pulse input modes
61
8.1.2Setting a counting method
Set a counting method by switch setting.
For details on the setting method, refer to the following.
• Switch Setting ( Page 54, Section 7.2)
8.1.3Reading the present value
This section describes the details on the present value stored in the buffer memory and the count values selected from
the counter function selection, and their reading method.
(1) Storage location of the count value
The present value is always stored in CH Present value (Un\G2, Un\G3, Un\G34, Un\G35) regardless of the
counter function used.
When the latch counter, sampling counter, or periodic pulse counter function is performed, the count value is
stored in the corresponding buffer memory areas listed in the table below.
Counter function selection count value
DescriptionPresent value
Buffer memory address
CH1
CH2
Un\G2,
Un\G3
Un\G34,
Un\G35
Latch count
value
Un\G12,
Un\G13
Un\G44,
Un\G45
Sampling
count value
Un\G14,
Un\G15
Un\G46,
Un\G47
Periodic pulse
count
previous value
Un\G16,
Un\G17
Un\G48,
Un\G49
Periodic pulse
count current
value
Un\G18,
Un\G19
Un\G50,
Un\G51
(2) Stored data
The present value and the counter function selection count values are stored in the buffer memory areas in 32-bit
signed binary.
The buffer memory data is automatically updated by counting operation. The latest count value can be read from
the buffer memory.
Read the present value and counter function selection count values by two words at a time.
If the values are read by one word at a time, the lower word data and the higher word data will be inconsistent when the
count value is updated during reading, and an incorrect count value may be read.
● Program example
● Inappropriate program example
The present value may change while CH1 Present value (L) (Un\G2) and CH1 Present value (H) (Un\G3) are read.
62
8.2Selecting Counter Type
Select a counting method in the switch setting.
(1) Setting method
1. Set "Counter format" to "Linear Counter" or "Ring Counter".
Project window [Intelligent Function Module] Model name [Switch Setting]
CHAPTER 8 FUNCTIONS
Linear counter
Ring Counter
ItemDescriptionReference
Pulses are counted between -2147483648 (lower limit value) and
2147483647 (upper limit value).
Pulses are repeatedly counted between the values stored in CH
Ring counter lower limit (Un\G20, Un\G21, Un\G52, Un\G53) and
CH Ring counter upper limit (Un\G22, Un\G23, Un\G54, Un\G55).
Page 64, Section 8.2.1
Page 65, Section 8.2.2
8
8.2 Selecting Counter Type
63
8.2.1Linear counter function
+2147483647
-2147483648
Present counter value
Overflow
Overflow
Counting upCounting down
0
(1) Operation of the linear counter
• This function counts pulses between -2147483648 (lower limit value) and 2147483647 (upper limit value).
• The preset function and the coincidence output function can be used together.
(2) Overflow error
• In linear counter, an overflow error occurs if the present counter value falls below -2147483648 (lower limit
value) in counting down or exceeds 2147483647 (upper limit value) in counting up.
• If an overflow error occurs, "1" is stored in CH Overflow detection (Un\G8, Un\G40), the counting operation
stops, and the present value does not change from -2147483648 or 2147483647 even if pulses are input.
• An overflow error can be cleared by performing the preset function.
• When the preset function is performed, "0" is stored in CH Overflow detection (Un\G8, Un\G40) and the
counting operation can be restarted.
• Overflow error status can be checked in the system monitor window. ( Page 108, Section 11.1 (1))
64
8.2.2Ring counter function
(1) Operation of the ring counter
This function repeatedly counts pulses between the values stored in CH Ring counter lower limit (Un\G20,
Un\G21, Un\G52, Un\G53) and CH Ring counter upper limit (Un\G22, Un\G23, Un\G54, Un\G55).
In ring counter, an overflow error does not occur.
The preset function and the coincidence output function can be used together.
Present counter value
+2147483647
CH
0
Counting down
Counting up
CH
-2147483648
CHAPTER 8 FUNCTIONS
Ring counter upper limit (Un\G22, Un\G23, Un\G54, Un\G55)
Ring counter lower limit (Un\G20, Un\G21, Un\G52, Un\G53)
8.2.2 Ring counter function
8
8.2 Selecting Counter Type
65
(2) Count range of the ring counter
-2147483648
Ring counter
lower limit value
Present value
Ring counter
upper limit value
0
500
2000
2147483647
Ring counter
lower limit value
(2000)
Present value
5005011998 1999to012to498499
Counting range
Ring counter
upper limit value
The ring counter upper limit value,
2000, is not stored in CH Present
value (Un\G2, Un\G3, Un\G34,
Un\G35).
The count range is determined by the relationship between CH Present value (Un\G2, Un\G3, Un\G34,
Un\G35) and the ring counter lower limit/upper limit values when CH Count enable command (Y4, YC) is turned
on or when the preset function is performed.
Normally, the count range is "Ring counter lower limit value Present value Ring counter upper limit value".
(a) When the count range is Ring counter lower limit value Present value Ring
counter upper limit value (normally used)
• For up count
When the present value reaches the ring counter upper limit value, the ring counter lower limit value is
automatically stored in CH Present value (Un\G2, Un\G3, Un\G34, Un\G35).
• For down count
Even when the present value reaches the ring counter lower limit value, the ring counter lower limit value
is held as the lower limit, and "Ring counter upper limit value - 1" is stored in CH Present value (Un\G2,
Un\G3, Un\G34, Un\G35) at the next count-down pulse input.
Both in up count and in down count, the ring counter upper limit value is not stored in CH Present value
(Un\G2, Un\G3, Un\G34, Un\G35).
For example, when the count enable command is valid while the ring counter lower limit value is 0, the ring
counter upper limit value is 2000, and the present value is 500, the count range and the present value will
change as follows.
66
CHAPTER 8 FUNCTIONS
(b) When the count range is "Present value < Ring counter lower limit value or ring
counter upper limit value < Present value"
• For up count
Even when the present value reaches the ring counter lower limit value, the ring counter lower limit value
is held as the lower limit, and "Ring counter upper limit value + 1" is stored in CH Present value (Un\G2,
Un\G3, Un\G34, Un\G35) at the next count-up pulse input.
• For down count
When the present value reaches the ring counter upper limit value, the ring counter lower limit value is
automatically stored in CH Present value (Un\G2, Un\G3, Un\G34, Un\G35).
Both in up count and in down count, the ring counter upper limit value is not stored in CH Present value
(Un\G2, Un\G3, Un\G34, Un\G35).
For example, when the count enable command is valid while the ring counter lower limit value is 0, the ring
counter upper limit value is 2000, and the present value is 3000, the count range and the present value will
change as follows.
Ring counter
lower limit value
0
-2147483648
Counting range
Ring counter
Present value
3000 30012001to-2-10to20022998
2147483647 -2147483648
upper limit value
to2999
Ring counter
upper limit value
2000
Counting range
lower limit value
(2000)
The ring counter upper limit value,
2000, is not stored in CH
Present value (Un\G2, Un\G3,
Un\G34, Un\G35).
Present value
3000
2147483647
Ring counter
(c) When the count range is "Ring counter lower limit value = Ring counter upper limit
value"
When this condition is established, the count range will be the full range (-2147483648 to 2147483647) which
can be expressed in 32-bit signed binary regardless of the present value.
8.2.2 Ring counter function
8
8.2 Selecting Counter Type
● While CH Count enable command (Y4, YC) is on, even if a value is written to CH Ring counter lower limit (Un\G20,
Un\G21, Un\G52, Un\G53) or CH Ring counter upper limit (Un\G22, Un\G23, Un\G54, Un\G55), the stored value does
not change.
Turn off CH Count enable command (Y4, YC) before changing the ring counter upper/lower limit value.
● Turn off CH Count enable command (Y4, YC) before changing the count range by the preset function.
67
8.3Coincidence Output Function
OFF
ON
OFF
ON
OFF
ON
OFF
ON
OFF
ON
OFF
ON
1) 100
2)
3)
4)
1031021011009998to210
Counter input pulse
CH Count enable command
(Y4, YC)
CH Coincidence signal enable
command (Y2, YA)
CH Coincidence output point No.1
(Un\G4, Un\G5, Un\G36, Un\37)
CH Counter value small
(point No.1) (X3, XA)
CH Counter value coincidence
(point No.1) (X2, X9)
CH Coincidence signal No.1 reset
command (Y0, Y8)
CH Counter value large (point No.1)
(X1, X8)
CH Present value
(Un\G2, Un\G3, Un\G34, Un\35)
This function compares the present counter value with the preset coincidence output point setting value and outputs a
signal when they match.
Up to two coincidence outputs can be set for each channel.
When using external output of the coincidence signal, turn on CH Coincidence signal enable command (Y2, YA)
beforehand.
(1) Operation of the coincidence output
The I/O numbers (X/Y) and the buffer memory addresses in (1) are for coincidence output point No.1.
For those of coincidence output point No.2, refer to the following.
• List of I/O Signals (Page 26, Section 3.4)
• List of Buffer Memory Areas (Page 27, Section 3.5)
No.Description
1)
2)
3)
4)
Write a coincidence output point setting value to CH Coincidence output point No.1 (Un\G4, Un\G5, Un\G36,
Un\G37) of the high-speed counter module in 32-bit signed binary.
When the count value matches with the coincidence output point setting value, CH Counter value small (point
No.1) (X3, XA) turns off and CH Counter value coincidence (point No.1) (X2, X9) turns on.
Turn on CH Coincidence signal No.1 reset command (Y0, Y8) to reset CH Counter value coincidence (point
No.1) (X2, X9).
If CH Counter value coincidence (point No.1) (X2, X9) remains on, the next coincidence signal cannot be output.
When the counter value exceeds the coincidence output point setting value, CH Counter value large (point No.1)
(X1, X8) turns on.
68
Perform the following before turning on CH Coincidence signal enable command (Y2, YA).
● Set different values between CH Coincidence output point No.1 (Un\G4, Un\G5, Un\G36, Un\G37) and CH Present
value (Un\G2, Un\G3, Un\G34, Un\G35) by any of the following ways:
• Changing the coincidence output point setting
• Changing the present value using the preset function
• Changing the present value by inputting a pulse
● Turn off, on, and then off CH Coincidence signal No.1 reset command (Y0, Y8).
When CH Coincidence signal enable command (Y2, YA) is turned on before counting operation or while the
coincidence output point setting value matches with the present value, coincidence output is performed.
● CH Counter value coincidence (point No.1) (X2, X9) is on immediately after the CPU module is powered on or is reset
because both CH Present value (Un\G2, Un\G3, Un\G34, Un\G35) and CH Coincidence output point No.1 (Un\G4,
Un\G5, Un\G36, Un\G37) are set to "0".
(2) Setting method
Set values for "Coincidence output point No.1" and "Coincidence output point No.2".
Project window [Intelligent Function Module] Model name [Parameter]
CHAPTER 8 FUNCTIONS
ItemSetting range
Coincidence output point No.1
Coincidence output point No.2
-2147483648 to 2147483647
(3) Output status setting at a CPU stop error
If a CPU stop error occurs, the output status (clear/hold) of external output signals can be set.
The output status setting can be set in the intelligent function module detailed setting.
(a) Setting method
Set "Clear" or "Hold" for "Error Time Output Mode".
A coincidence detection interrupt occurs on the rising edge of the counter value coincidence signal (off to on).
Therefore, the next interrupt will not be requested unless the coincidence signal is reset and the counter value coincidence
signal is turned off.
72
8.4Preset Function
This function overwrites the present counter value with the set value.
The set value is referred to as a preset value.
This function can be used to start counting pulses from the preset value.
The function can be performed using a program or an external control signal.
(1) Performing the preset function using a program
Perform the preset function by turning on CH Preset command (Y1, Y9).
CHAPTER 8 FUNCTIONS
CH Count enable command
(Y4, YC)
Counter input pulse
CH Preset value
(Un\G0, Un\G1, Un\G32, Un\G33)
CH Preset command
(Y1, Y9)
CH Present value
(Un\G2, Un\G3, Un\G34, Un\G35)
ON
OFF
ON
OFF
1)
1000
2)
to
101100676665210
102 103 104 105
No.Description
1)Write a value to CH Preset value (Un\G0, Un\G1, Un\G32, Un\G33) in 32-bit signed binary.
On the rising edge (off to on) of CH Preset command (Y1, Y9), the value stored in CH Present value (Un\G2,
2)
Un\G3, Un\G34, Un\G35) is replaced with the value stored in CH Preset value (Un\G0, Un\G1, Un\G32, Un\G33).
The preset function is performed regardless of the on/off status of CH Count enable command (Y4, YC).
8
8.4 Preset Function
73
(2) Performing the preset function using an external control signal
Perform the preset function by applying an ON voltage to the preset input terminal for external input.
1)Write a value to CH Preset value (Un\G0, Un\G1, Un\G32, Un\G33) in 32-bit signed binary.
On the rising edge (off to on) of the preset command (A voltage is applied to the preset input terminal.), the value
stored in CH Present value (Un\G2, Un\G3, Un\G34, Un\G35) is replaced with the value stored in CH Preset
2)
value (Un\G0, Un\G1, Un\G32, Un\G33).
The preset function is performed regardless of the on/off status of CH Count enable command (Y4, YC).
While CH External preset request detection (X4, XB) is on (3)), the preset function cannot be performed even if a voltage
is applied to the preset input terminal or CH Preset command (Y1, Y9) is turned on.
The preset function can be performed when CH External preset request detection (X4, XB) is turned off by turning on CH
External preset detection reset command (Y5, YD) (4)).
74
CHAPTER 8 FUNCTIONS
Ex.
8.5Counter Function Selection
The count disable function, the latch counter function, the sampling counter function, or the periodic pulse counter
function can be used by selecting each item in "Counter function selection". The selected counter function is performed
by the counter function selection start command (A voltage is applied to the function start input terminal or CH
Counter function selection start command (Y6, YE) is turned on by a program).
The counter function selection permits using only one function of the four counter functions.
(1) Setting method
Select a counter function in "Counter function selection".
Project window [Intelligent Function Module] Model name [Parameter]
ItemDescriptionReference
Count Disabling FunctionStops counting while CH Count enable command (Y4, YC) is on.Page 78, Section 8.6
Latch Counter FunctionLatches the present counter value when a signal is input.Page 79, Section 8.7
Sampling Counter FunctionCounts pulses input during the specified sampling period (T).Page 80, Section 8.8
Stores the present and previous counter values to CH Periodic
Periodic Pulse Counter Function
pulse count present value (Un\G18, Un\G19, Un\G50, Un\G51) and
CH Periodic pulse count previous value (Un\G16, Un\G17,
Un\G48, Un\G49), respectively, at the preset cycle (T).
Page 81, Section 8.9
8
● When changing the counter function, change the function with the off state of CH Counter function selection start
command (Y6, YE).
● The selected counter function can be performed by turning on CH Counter function selection start command (Y6, YE)
or applying a voltage to the function start input terminal. A signal that is input first takes priority.
● Time for the sampling counter function or the periodic pulse counter function can be set by writing a value of 1 to 65535
to CH Sampling/periodic time setting (Un\G10, Un\G42). The unit of time is 10ms.
Setting "420" for CH Sampling/periodic time setting (Un\G10, Un\G42)
420 10 = 4200(ms)
8.5 Counter Function Selection
75
8.5.1Reading the counter function selection count value
The counter function selection count value refers to the count value that is stored when the counter function selection
is performed.
When the latch counter, sampling counter, or periodic pulse counter function is performed, the count value is stored in
the corresponding buffer memory areas listed in the table below.
Counter function selection count value
DescriptionPresent value
Buffer memory address
CH1
CH2
Un\G2,
Un\G3
Un\G34,
Un\G35
Latch count
value
Un\G12,
Un\G13
Un\G44,
Un\G45
Sampling
count value
Un\G14,
Un\G15
Un\G46,
Un\G47
Periodic pulse
count
previous value
Un\G16,
Un\G17
Un\G48,
Un\G49
The present value and the counter function selection count values are stored in the buffer memory areas in 32-bit
signed binary.
The buffer memory data is automatically updated by counting operation. The latest count value can be read from the
buffer memory.
Periodic pulse
Un\G18,
Un\G19
Un\G50,
Un\G51
count current
value
● Read the present value and counter function selection count values by two words at a time. If the values are read by one
word at a time, the lower word data and the higher word data will be inconsistent when the count value is updated during
reading, and an incorrect count value may be read.
• Program example
• Inappropriate program example
The present value may change while CH1 Present value (L) (Un\G2) and CH1 Present value (H) (Un\G3) are
read.
● Although the storage addresses differ between the latch count value and periodic pulse count current value, the stored
values are always the same (updated simultaneously). Therefore, when the latch counter function or periodic pulse
counter function is executed, the latch count value and periodic pulse count current value do not hold their previous
values.
A count error may occur when the selected counter function is performed by external input (A voltage is applied to the
function start input terminal.) or by a program (CH Counter function selection start command (Y6, YE) is turned on).
The following describes how to calculate the count error.
(1) Count error (maximum) due to a delay of response to an external input
(2) Count error (maximum) when the selected counter function is performed by a
program
(3) Count error (maximum) due to an internal clock delay when the sampling
counter function or the periodic pulse counter function is performed
Sampling/periodic time setting value 10 [ms]
1000
Pulse input speed [PPS] Multiplication [count]
(Sampling/periodic time setting value
(unit: 10ms))
=
[s]
Pulse input speed [PPS] Multiplication [count]
1000000
Error in design, 100 [ppm]
1000000
8
8.5.2 Count error
8.5 Counter Function Selection
77
8.6Count Disable Function
0
ON
OFF
2)7)3)
ON
OFF
1)8)6)
9)
ON
OFF
4)5)
CH Count enable command
(Y4, YC)
CH Counter function selection
start command (Y6, YE)
Counter function selection start
command (function start input)
CH Present value
(Un\G2, Un\G3, Un\G34, Un\G35)
Count stop
Count
stop
Count
stop
Count
stop
Count value stored in
CH Present value
(Un\G2, Un\G3, Un\G34, Un\G35)
Pulses actually input
This function stops counting pulses while CH Count enable command (Y4, YC) is on.
The following figure shows the relationship among CH Count enable command (Y4, YC), the counter function
selection start command, and the present counter value.
78
No.Description
1)Counting starts when CH Count enable command (Y4, YC) is turned on.
2)Counting stops when CH Counter function selection start command (Y6, YE) is turned on.
3)Counting restarts when CH Counter function selection start command (Y6, YE) is turned off.
4)Counting stops when the counter function selection start command (function start input) is turned on.
5)Counting restarts when the counter function selection start command (function start input) is turned off.
6)Counting stops when CH Count enable command (Y4, YC) is turned off.
Counting stops regardless of the on/off status of CH Counter function selection start command (Y6, YE) because
7)
CH Count enable command (Y4, YC) is off.
Even though CH Count enable command (Y4, YC) is turned on, counting remains stopped because CH Counter
8)
function selection start command (Y6, YE) is on.
9)Counting restarts when CH Counter function selection start command (Y6, YE) is turned off.
CHAPTER 8 FUNCTIONS
1)2)3)4)
0
50
100
150
ON
OFF
ON
OFF
0
50
100
130
0
50
100
150
0
50
100
130
CH Count enable command
(Y4, YC)
CH Present value
(Un\G2, Un\G3, Un\G34, Un\G35)
CH Counter function selection start
command (Y6, YE)
Counter function selection start command
(function start input)
CH Latch count value
(Un\G12, Un\G13, Un\G44, Un\G45)
8.7Latch Counter Function
The function latches the present counter value when a signal is input.
The following figure shows the relationship among the present counter value, the counter function selection start
command, and CH Latch count value (Un\G12, Un\G13, Un\G44, Un\G45).
On the rising edge of CH Counter function selection start command (Y6, YE) or the counter function selection start
command (function start input) of 1) to 4), the present counter value is stored in CH Latch count value (Un\G12,
Un\G13, Un\G44, Un\G45).
The latch counter function is performed regardless the on/off status of CH Count enable command (Y4, YC).
8
8.7 Latch Counter Function
79
8.8Sampling Counter Function
This function counts pulses input during the specified sampling period (T).
The following figure shows the relationship between the signals and the buffer memory areas.
CH Count enable command
(Y4, YC)
CH Present value
(Un\G2, Un\G3, Un\G34, Un\G35)
ON
OFF
200
100
0
5)
CH Counter function selection start
command (Y6, YE)
Counter function selection start command
(function start input)
CH Sampling count value
(Un\G14, Un\G15, Un\G46, Un\G47)
CH Sampling/periodic counter flag
(Un\G11, Un\G43)
ON
OFF
200
100
0
-100
1
0
1)
TTT
2)3)4)
No.Description
Input pulses are counted from 0 on the rising edge of CH Counter function selection start command (Y6, YE) or the
1)
counter function selection start command (function start input).
2)Counting stops when the specified sampling period has elapsed.
While the sampling counter function is performed, "1" is stored in CH Sampling/periodic counter flag (Un\G11,
3)
Un\G43).
Even after the sampling counter function is performed, the value stored in CH Sampling count value (Un\G14,
4)
Un\G15, Un\G46, Un\G47) is held.
5)The sampling counter function is performed regardless the on/off status of CH Count enable command (Y4, YC).
80
CHAPTER 8 FUNCTIONS
0
100
200
ON
OFF
ON
OFF
0
100
200
1)
0
2)
200
3)
20
4)
100
5)
80
6)
TTTTT
1)
0
2)
200
3)
20
4)
100
5)
80
0
100
200
2)
0
3)
200
4)
20
5)
100
1
0
7)
CH Count enable command
(Y4, YC)
CH Present value
(Un\G2, Un\G3, Un\G34, Un\G35)
CH Counter function selection start
command (Y6, YE)
Counter function selection start command
(function start input)
CH Periodic pulse count, present value
(Un\G18, Un\G19, Un\G50, Un\G51)
CH Periodic pulse count, previous value
(Un\G16, Un\G17, Un\G48, Un\G49)
CH Sampling/periodic counter flag
(Un\G11, Un\G43)
8.9Periodic Pulse Counter Function
This function stores the present and previous counter values to CH Periodic pulse count present value (Un\G18,
Un\G19, Un\G50, Un\G51) and CH Periodic pulse count previous value (Un\G16, Un\G17, Un\G48, Un\G49),
respectively, at the preset cycle (T).
The following figure shows the relationship between the signals and the buffer memory areas.
8
8.9 Periodic Pulse Counter Function
81
No.Description
Ex.
The present counter value, 0, is stored in CH Periodic pulse count, present value (Un\G18, Un\G19, Un\G50,
1)
Un\G51).
The present counter value, 200, is stored in CH Periodic pulse count, present value (Un\G18, Un\G19, Un\G50,
Un\G51).
2)
The value 0, which has been stored in CH Periodic pulse count, present value (Un\G18, Un\G19, Un\G50,
Un\G51), is then stored in CH Periodic pulse count, previous value (Un\G16, Un\G17, Un\G48, Un\G49).
The present counter value, 20, is stored in CH Periodic pulse count, present value (Un\G18, Un\G19, Un\G50,
Un\G51).
3)
The value 200, which has been stored in CH Periodic pulse count, present value (Un\G18, Un\G19, Un\G50,
Un\G51), is then stored in CH Periodic pulse count, previous value (Un\G16, Un\G17, Un\G48, Un\G49).
The present counter value, 100, is stored in CH Periodic pulse count, present value (Un\G18, Un\G19, Un\G50,
Un\G51).
4)
The value 20, which has been stored in CH Periodic pulse count, present value (Un\G18, Un\G19, Un\G50,
Un\G51), is then stored in CH Periodic pulse count, previous value (Un\G16, Un\G17, Un\G48, Un\G49).
The present counter value, 80, is stored in CH Periodic pulse count, present value (Un\G18, Un\G19, Un\G50,
Un\G51).
5)
The value 100, which has been stored in CH Periodic pulse count, present value (Un\G18, Un\G19, Un\G50,
Un\G51), is then stored in CH Periodic pulse count, previous value (Un\G16, Un\G17, Un\G48, Un\G49).
The periodic pulse counter function is performed regardless the on/off status of CH Count enable command (Y4,
6)
YC).
While the periodic pulse counter function is performed, "1" is stored in CH Sampling/periodic counter flag (Un\G11,
7)
Un\G43).
Read CH Periodic pulse count, previous value (Un\G16, Un\G17, Un\G48, Un\G49) and CH Periodic pulse count,
present value (Un\G18, Un\G19, Un\G50, Un\G51) by two words at a time.
Program example
Depending on the relationship between the update timing of the previous value or present value in the module and its read
timing in the program, the previous value and present value may match.
If the previous value and present value match, read the values again. ( Page 95, Section 10.1 (7) (b))
82
CHAPTER 9 DISPLAY UNIT
CPU MON/TEST
CPU SETTINGS
MOD MON/TEST
MOD SETTINGS
USER MESSAGE
OPTIONS
SPECIFY I/O No.
MODULE LIST
SPECIFY I/O No.
MODULE LIST
BUF MEM MON/TES
INIT CHANGE
CH1
CH2
PRESET VALUE
COINCIDENCE NO1
COINCIDENCE NO2
RING COUNT MAX
COUNTER FUNC
RING COUNT MIN
SAMPLING/PERIOD
CHAPTER 9DISPLAY UNIT
This chapter describes display unit functions that can be used for the high-speed counter module.
For details on operations, functions, and menu structure of the display unit, refer to the following.
MELSEC-L CPU Module User's Manual (Function Explanation, Program Fundamentals)
9.1Features
The display unit is a liquid crystal display that can be connected to the CPU module. Connecting it to the CPU module
allows checking the system status and changing the system setting value even without using software packages.
9.2Menu Transition
(1) Menu structure
The following diagram shows the "MOD MON/TEST" menu and the "MOD SETTINGS" menu structures.
9
9.1 Features
83
(2) Screen transition to the initial setting change screen
Module setting_module
specification screen
Initial setting change screen
Change item selection menu screen
Parameter-valid drive
confirmation screen
Channel selection screen
Module setting_module
selection screen
Module setting_start I/O No.
specification screen
Standby screen
Function selection screen
Initial setting change screen
Preset value setting screen
Coincidence output point
No.1 setting screen
Ring counter upper limit
setting screen
Ring counter lower limit
setting screen
Counter function
selection screen
Sampling/periodic time
setting screen
Coincidence output point
No.2 setting screen
The following figure shows screen transition to the initial setting change screen.
84
CHAPTER 9 DISPLAY UNIT
9.3List of Setting Value Change Screens
The following table lists setting value change screens.
(1) User interface language is English
Name
Setting itemScreen display
Preset valuePRESET VALUE
Coincidence output point No.1COINCIDENCE NO1
Coincidence output point No.2COINCIDENCE NO2
Ring counter upper limitRING COUNT MAX
Ring counter lower limitRING COUNT MIN
Counter function selectionCOUNTER FUNC
Sampling/periodic time settingSAMPLING/PERIOD
Format
Numeric
value
Numeric
value
Numeric
value
Numeric
value
Numeric
value
Set by
user
Numeric
value
Setting range
Upper limit
value
2147483647-2147483648
2147483647-2147483648
2147483647-2147483648
2147483647-2147483648
2147483647-2147483648
655351
Lower limit
value
9
9.3 List of Setting Value Change Screens
85
(2) Preset value
OK
OK
OK
"PRESET VALUE" screen
Input item
Input item
PRESET VALUE2147483647-2147483648
1. Move the cursor using the and buttons,
increase or decrease the cursor position value
using the and buttons, and press the
button.
Setting range
Upper limit valueLower limit value
(3) Coincidence output point No.1
"COINCIDENCE NO1" screen
1. Move the cursor using the and buttons,
increase or decrease the cursor position value
using the and buttons, and press the
button.
Input item
Input item
COINCIDENCE NO12147483647-2147483648
Upper limit valueLower limit value
Setting range
(4) Coincidence output point No.2
"COINCIDENCE NO2" screen
Input item
Input item
COINCIDENCE NO22147483647-2147483648
1. Move the cursor using the and buttons,
increase or decrease the cursor position value
using the and buttons, and press the
button.
Setting range
Upper limit valueLower limit value
86
CHAPTER 9 DISPLAY UNIT
OK
OK
(5) Ring counter upper limit value
"RING COUNT MAX" screen
Input item
Input item
Ring counter upper limit value2147483647-2147483648
1. Move the cursor using the and buttons,
increase or decrease the cursor position value
using the and buttons, and press the
button.
Setting range
Upper limit valueLower limit value
(6) Ring counter lower limit value
"RING COUNT MIN" screen
1. Move the cursor using the and buttons,
increase or decrease the cursor position value
using the and buttons, and press the
button.
9
OK
Input item
Input item
RING COUNT MIN2147483647-2147483648
Upper limit valueLower limit value
Setting range
(7) Counter function selection
"COUNTER FUNC" screen
1. Use the and buttons to select "COUNT
DISABLE", "LATCH", "SAMPLING", or "PERIODIC
PULSE" and press the button.
(8) Sampling/periodic time setting
"SAMPLING/PERIOD" screen
1. Move the cursor using the and buttons,
increase or decrease the cursor position value
using the and buttons, and press the
button.
9.3 List of Setting Value Change Screens
OK
Input item
Input item
SAMPLING/PERIOD655351
Upper limit valueLower limit value
Setting range
87
CHAPTER 10 PROGRAMMING
This chapter describes basic programs of the high-speed counter module.
10.1Using the Module in Standard System Configuration
This section describes the system configuration and program examples based on conditions.
(1) System configuration
The following figure shows an example using the high-speed counter module in standard system configuration.
High-speed counter module (LD62)
CPU module (L26CPU-BT)
Input module (LX40C6)
Output module (LY41NT1P)
Power supply module (L61P)
When using the L02CPU, assign X/Y30 to X/Y3F for the high-speed counter module to set the same assignment as the
system above. For the LX40C6, assign X/Y40 to X/Y4F and for the LY41NT1P, assign X/Y50 to X/Y6F.
X/Y00
to
X/Y0F
X/Y10
to
X/Y2F
X/Y30
to
X/Y3F
X/Y40
to
X/Y4F
X/Y50
to
X/Y6F
(2) Programming condition
The program counts pulses input to CH1 of the high-speed counter module.
END cover (L6EC)
88
(3) Switch setting
Set a pulse input mode, counting speed, and counter type as follows:
CHAPTER 10 PROGRAMMING
Project window [Intelligent Function Module] [LD62] [Switch Setting]
Description
Item
Pulse input mode2-Phase Multiple of 11-Phase Multiple of 1
Counting speed setting200kpps10kpps
Counter formatUser definedLinear Counter
*1Leave unused channels with the default values.
CH1
(4) Initial setting
Item
Preset value25000
Coincidence output point No.110000
Coincidence output point No.200
Ring counter upper limit
Ring counter lower limit
Counter function selectionUser definedCount Disabling Function
Sampling time setting
Periodic time setting
*2
*2
*3
*4
50000
-50000
10000ms0
5000ms0
CH1
Contents
CH2
CH2
10
*1
*1
10.1 Using the Module in Standard System Configuration
*1Leave unused channels with the default values.
*2Set these items when using the ring counter function.
*3Set this item when using the sampling counter function.
*4Set this item when using the periodic pulse counter function.
89
(5) User devices
DeviceDescription
D0 and D1Present value
D2 and D3Latch count value
D4 and D5Sampling count value
D6 and D7Periodic pulse count previous value
D8 and D9Periodic pulse count present value
D10Overflow status storage
M10Initial setting completion signal
X40Count start signal
X41Present value read signal
X42Coincidence output data setting signal
X43Preset command signal
X44Count stop signal
X45Coincidence LED clear signal
X46Counter function start signal
X47Counter function stop signal
X48Latch count data read signal
X49Latch execution signal
X4ASampling count data read signal
X4BSampling count start signal
X4CPeriodic pulse count data read signal
X4DPeriodic pulse count start signal
Y50Coincidence confirmation LED signal
Y51Overflow occurrence confirmation LED signal
X30Module READY
X31CH1 Counter value large (point No.1)
X32CH1 Counter value coincidence (point No.1)
X33CH1 Counter value small (point No.1)
X34CH1 External preset request detection
X35CH1 Counter value large (point No.2)
X36CH1 Counter value coincidence (point No.2)
X37CH1 Counter value small (point No.2)
Y30CH1 Coincidence signal No.1 reset command
Y31CH1 Preset command
Y32CH1 Coincidence signal enable command
Y33CH1 Down count command
Y34CH1 Count enable command
Y35CH1 External preset detection reset command
Y36
Y37CH1 Coincidence signal No.2 reset command
CH1 Counter function selection start
command
LX40C6 (X40 to X4F)
LY41NT1P (Y50 to Y6F)
LD62 (X/Y30 to X/Y3F)
90
The input signal X3F is used by the system and is not available for users. If a user uses this signal (turning off and on), the
performance of the high-speed counter module is not guaranteed.
CHAPTER 10 PROGRAMMING
(6) Program example when intelligent function module parameters are used
(a) Setting parameters
Configure initial settings on the parameters.
Project window [Intelligent Function Module] [LD62] [Parameter]
10
ItemDescriptionSetting value
Preset valueEnter a preset value.2500
Coincidence output point
No.1
Coincidence output point
No.2
Ring counter upper limit
Ring counter lower limit-5000
Counter function selection
Sampling/periodic time
setting
(unit: 10ms)
Enter a value for the coincidence output point No.1.1000
Not used
Enter these values when using the ring counter function.
Select the counter function to be used.
Select any function when a counter function is not used.
Enter a value when using the sampling counter function.1000
Enter a value when using the periodic pulse counter function.500
5000
Depends on the function
used.
10.1 Using the Module in Standard System Configuration
91
(b) Auto refresh
Set auto refresh destination devices.
Project window [Intelligent Function Module] [LD62] [Auto_Refresh]
ItemDescriptionSetting value
Present valueEnter the device where the present value is stored.D0
Latch count valueEnter the device where the latch count value is stored.D2
Sampling count value
Periodic pulse count previous
value
Periodic pulse count present
value
Sampling/periodic counter
flag
Overflow detection
Enter the device where the sampling count value is stored when using the
sampling counter function.
Enter the device where the previous periodic pulse count value is stored
when using the periodic pulse counter function.
Enter the device where the present periodic pulse count value is stored
when using the periodic pulse counter function.
Not used
Enter the device where the overflow detection result is stored when using
the linear counter function.
D4
D6
D8
D10
92
(c) Writing intelligent function module parameters
Write the set parameters to the CPU module, and reset the CPU module or power off and then on the
programmable controller.
[Online] [Write to PLC...]
Or powering off on the programmble controller
(d) Program example
CH1 Coincidence signal No.1 reset
command (Y30) is set or reset.
<Start of counting>
The LED indicating a match is turned on.
CH1 Coincidence signal No.1 reset
command (Y30) is set.
CH1 Coincidence signal No.1 reset
command (Y30) is reset.
CH1 Preset command (Y31) is set
or reset.
This program is set only when linear
counter is used.
<Stop of counting>
<Setting for external output of the counter value coincidence signal>
<Processing for counter value coincidence>
<Preset execution (by program)>
<Overflow detection>
A
CHAPTER 10 PROGRAMMING
10
To use each function, insert the following program into the position "A" in the program above.
• Using the count disable function
• Using the latch counter function
• Using the sampling counter function
• Using the periodic pulse counter function
10.1 Using the Module in Standard System Configuration
93
(7) Program example when intelligent function module parameters are not used
CH1 Preset value is set.
CH1 Coincidence output point No.1 is
set to 1000.
*1
*2
CH1 Ring counter lower limit is set.
CH1 Ring counter upper limit is set.
Initial setting completion flag is set.
The present value is stored in D0 and D1.
CH1 Coincidence signal No.1 reset
command (Y30) is set or reset.
The LED indicating a match is turned on.
CH1 Coincidence signal No.1 reset
command (Y30) is set.
CH1 Coincidence signal No.1 reset
command (Y30) is reset.
CH1 Preset command (Y31) is set or
reset.
Overflow status data is stored in
D10.
<Initial setting>
B
A
<Start of counting>
<Stop of counting>
<Storing the present value>
<Setting for external output of the counter value coincidence signal>
<Processing for counter value coincidence>
<Preset execution (by program)>
<Overflow detection>
Sampling time is set to 10000ms.
Periodic pulse time is set to 5000ms.
*1Set these values when using the ring counter.
*2Set this value when using the linear counter.
(a) Using the sampling counter function or the periodic pulse counter function
To use the sampling counter function or the periodic pulse counter function, insert the following program into
the position "A" in the program above.
• Using the sampling counter function
• Using the periodic pulse counter function
94
(b) Using each function
The count disable function is selected.
The latch count value is read.
The latch counter function is
selected.
The sampling count value is read.
The sampling counter function is
selected.
The periodic pulse counter function is
selected.
When the present value =
previous value,
data are read again.
The present and previous periodic
pulse count values are read.
To use each function, insert the following program into the position "B" in the program above.
• Using the count disable function
• Using the latch counter function
• Using the sampling counter function
CHAPTER 10 PROGRAMMING
10
• Using the periodic pulse counter function
10.1 Using the Module in Standard System Configuration
95
10.2Connecting the Module to the Head Module
Network No.1
Ethernet cable (1000BASE-T)
CPU module (Q10UDHCPU)
Master/local module (QJ71GF11-T2)
Input module (QX10)
Output module (QY10)
X/Y1000
to
X/Y100F
X/Y1010
to
X/Y101F
X/Y1020
to
X/Y102F
Master station (station No.0)
Intelligent device station (station No.1)
Head module (LJ72GF15-T2)
High-speed counter module (LD62)
Input module (LX40C6)
Output module (LY10R2)
END cover (L6EC)
Power supply module (Q62P)Power supply module (L61P)
X/Y00
to
X/Y1F
X/Y20
to
X/Y2F
X/Y30
to
X/Y3F
This section describes the system configuration and program examples based on conditions.
(1) System configuration
The following figure shows a system configuration where the high-speed counter module is connected to the
head module.
(2) Programming condition
The program counts pulses input to CH1 of the high-speed counter module connected to a head module.
(3) Initial setting
Item
Preset value25000
Coincidence output point No.110000
Coincidence output point No.200
Ring counter upper limit
Ring counter lower limit
Counter function selectionUser definedCount Disabling Function
Sampling time setting
Periodic time setting
*1Leave unused channels with the default values.
*2Set these items when using the ring counter function.
*3Set this item when using the sampling counter function.
*4Set this item when using the periodic pulse counter function.
*2
*2
*3
*4
50000
-50000
10000ms0
5000ms0
CH1
Contents
CH2
*1
96
CHAPTER 10 PROGRAMMING
(4) User devices
DeviceDescription
W1000 and W1001Device to which the present value is to be written at auto refresh
W1002 and W1003Device to which the latch count value is to be written at auto refresh
W1004 to W1005Device to which the sampling count value is to be written at auto refresh
W1006 and W1007Device to which the periodic pulse count previous value is to be written at auto refresh
W1008 and W1009Device to which the periodic pulse count present value is to be written at auto refresh
W1010Device to which the overflow status storage is to be written at auto refresh
X20Count start signal
X22Coincidence output data setting signal
X23Preset command signal
X24Count stop signal
X25Coincidence LED clear signal
X26Counter function start signal
X27Counter function stop signal
X29Latch execution signal
X2BSampling count start signal
X2DPeriodic pulse count start signal
Y30Coincidence confirmation LED signal
Y31
X1000Module READY
X1002
Y1000
Y1001CH1 Preset command
Y1002CH1 Coincidence signal enable command
Y1004CH1 Count enable command
Y1006
SB49Data link status of the own station
SWB0.0Data link status of each station (station No.1)
N0Nesting (station No.1)
M0Communication ready flag (station No.1)
T1 to T5Interlock between the own and other stations
Overflow occurrence confirmation LED
signal
CH1 Counter value coincidence (point
No.1)
CH1 Coincidence signal No.1 reset
command
CH1 Counter function selection start
command
QX10 (X20 to X2F)
QY10 (Y30 to Y3F)
LD62 (X/Y1000 to X/Y100F)
10
10.2 Connecting the Module to the Head Module
97
(5) Setting parameters for the master station
1. Create a project on GX Works2.
Select "QCPU(Q mode)" for "PLC Series" and "Q10UDH" for "PLC Type".
[Project] [New...]
2. Open the network parameter setting window and set parameters as shown below.
Project window [Parameter] [Network Parameter]
[Ethernet/CC IE/MELSECNET]
98
3. Open the Network Configuration Setting window and set parameters as shown below.
Project window [Parameter] [Network Parameter]
[Ethernet/CC IE/MELSECNET] button
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.