OPERATION MANUAL CP1L CPU Unit

OPERATION MANUAL CP1L CPU Unit
Cat. No. W471-E1-07
SYSMAC CP Series
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
CP1L CPU Unit
OPERATION MANUAL
Industrial automation
Elincom Group
European Union: www.elinco.eu
Russia: www.elinc.ru
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
CP1L CPU Unit
Operation Manual
Revised October 2014
Notice:
OMRON products are manufactured for use according to proper procedures
by a qualified operator and only for the purposes described in this manual.
The following conventions are used to indicate and classify precautions in this
manual. Always heed the information provided with them. Failure to heed precautions can result in injury to people or damage to property.
!DANGER
Indicates an imminently hazardous situation which, if not avoided, will result in death or
serious injury. Additionally, there may be severe property damage.
!WARNING
Indicates a potentially hazardous situation which, if not avoided, could result in death or
serious injury. Additionally, there may be severe property damage.
!Caution
Indicates a potentially hazardous situation which, if not avoided, may result in minor or
moderate injury, or property damage.
OMRON Product References
All OMRON products are capitalized in this manual. The word “Unit” is also
capitalized when it refers to an OMRON product, regardless of whether or not
it appears in the proper name of the product.
The abbreviation “Ch,” which appears in some displays and on some OMRON
products, often means “word” and is abbreviated “Wd” in documentation in
this sense.
The abbreviation “PLC” means Programmable Controller. “PC” is used, however, in some CX-Programmer displays to mean Programmable Controller.
Visual Aids
The following headings appear in the left column of the manual to help you
locate different types of information.
Note Indicates information of particular interest for efficient and convenient operation of the product.
1,2,3...
1. Indicates lists of one sort or another, such as procedures, checklists, etc.
 OMRON, 2007
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or
by any means, mechanical, electronic, photocopying, recording, or otherwise, without the prior written permission of
OMRON.
No patent liability is assumed with respect to the use of the information contained herein. Moreover, because OMRON is constantly striving to improve its high-quality products, the information contained in this manual is subject to change without
notice. Every precaution has been taken in the preparation of this manual. Nevertheless, OMRON assumes no responsibility
for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained in
this publication.
v
Unit Versions of CP-series CPU Units
Unit Versions
A “unit version” has been introduced to manage CPU Units in the CP Series
according to differences in functionality accompanying Unit upgrades.
Notation of Unit Versions
on Products
The unit version is given to the right of the lot number on the nameplate of the
products for which unit versions are being managed, as shown below.
CP-series CPU Unit
Product nameplate
CP1L-M40DR-A
CPU UNIT
Lot No. 28705 0000
OMRON Corporation
Ver.1.0
MADE IN CHINA
Unit version (Example for Unit version 1.0)
Lot No.
Confirming Unit Versions
with Support Software
CX-Programmer version 7.3 or higher can be used to confirm the unit version
of the CP1L-L CPU Unit with 10 I/O points.
CX-Programmer version 7.22 or higher can be used to confirm the unit version of the CP1L-J CPU Unit.
CX-Programmer version 7.1 or higher can be used to confirm the unit version
of the CP1L-L and CP1L-M CPU Unit with 14, 20, 30, 40 or 60 I/O points.
Note CX-Programmer version 7.2 or lower cannot be used to confirm unit versions
for CP1L-L CPU Units with 10 I/O points.
CX-Programmer version 7.21 or lower can be used to confirm the unit version
of the CP1L-J CPU Unit.
CX-Programmer version 7.0 or lower cannot be used to confirm unit versions
for CP1L-L and CP1L-M CPU Units with 14, 20, 30, 40 or 60 I/O points.
vi
■ Confirmation Procedure
Procedure When the Device Type and CPU Type Are Known
1,2,3...
1. Set the Device Type Field in the Change PLC Dialog Box to CP1L.
2. Click the Settings Button by the Device Type Field and, when the Device
Type Settings Dialog Box is displayed, set the CPU Type Field to J, L, L10
or M.
vii
3. Go online and select PLC - Edit - Information
▲
The PLC Information Dialog Box will be displayed.
Unit version
Use the above display to confirm the unit version of the CPU Unit.
viii
Procedure When the Device Type and CPU Type Are Not Known
This procedure is possible only when connected directly to the CPU Unit with
a serial connection.
If you don't know the device type and CPU type that are connected directly to
the CPU Unit on a serial line, select PLC - Auto Online to go online, and then
select PLC - Edit - Information from the menus.
▲
The PLC Information Dialog Box will be displayed and can be used to confirm
the unit version of the CPU Unit.
Unit version
ix
Using the Unit Version
Labels
The following unit version labels are provided with the CPU Unit.
Ver.
1.0
Ver.
Ver.
1.0
Ver.
These Labels can be used
t o ma n a g e d i f f e r e n c e s
in the available
f u n c t i o n s a mo n g t h e U n i t s .
Place the appropriate label
on the front of the Unit to
show what Unit
v e r s i o n i s a c tu a l l y b e i n g
used.
These labels can be attached to the front of previous CPU Units to differentiate between CPU Units of different unit versions.
Functions Supported by Unit Version for CP-series CPU Units
Functions Supported by Unit Version 1.0 and 1.1
Functionality is the same as that for CS/CJ-series CPU Units with unit version
3.0. The functionality added for CS/CJ-series CPU Unit unit version 4.0 is not
supported.
CP1H CPU Units
• CX-Programmer version 6.11 or higher is required to use [email protected]@@@@/[email protected]@@@[email protected] with unit version 1.1 or 1.0.
• CX-Programmer version 6.20 or higher is required to use [email protected]@@@@ with unit version 1.1.
CPU Unit
Model
CP1H CPU Unit
[email protected]@@@[email protected]
[email protected]@@@[email protected]
(See note 1.)
Unit version Ver. 1.1 or later
Ver. 1.0
Function
Pulse
Allocated builtoutputs in I/O terminals
[email protected]@@@@
(See note 2.)
Ver. 1.1
4 axes at 100 kHz 2 axes at 100 kHz 2 axes at 100 kHz
2 axes at 30 kHz
Special pulse
None
output terminals
2 axes at 1 MHz
Note 1. The unit version for the [email protected]@@@[email protected]/[email protected]@@@[email protected] begins at 1.0.
2. The unit version for the [email protected]@@@[email protected] begins at 1.1.
3. CX-Programmer version 7.11 or higher is required to use CP1L CPU Units
with unit version 1.0.
4. CX-Programmer version 7.3 or higher is required to use CP1L CPU Units
with 10 I/O points.
x
TABLE OF CONTENTS
PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
1
Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xxiv
2
General Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xxiv
3
Safety Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xxiv
4
Operating Environment Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xxvi
5
Application Precautions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xxvii
6
Conformance to EC Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xxx
SECTION 1
Features and System Configuration . . . . . . . . . . . . . . . . . . .
1
1-1
Features and Main Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
1-2
System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
1-3
Connecting the CX-Programmer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23
1-4
Function Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
33
1-5
Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
SECTION 2
Nomenclature and Specifications . . . . . . . . . . . . . . . . . . . . .
37
2-1
Part Names and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
2-2
Specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
43
2-3
CP1L CPU Unit Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
73
2-4
CPU Unit Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
81
2-5
CPU Unit Operating Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
85
2-6
Power OFF Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
88
2-7
Computing the Cycle Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
90
SECTION 3
Installation and Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
3-1
Fail-safe Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
102
3-2
Installation Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
103
3-3
Mounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
105
3-4
Wiring CP1L CPU Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
112
3-5
Wiring CPU Unit I/O. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
119
3-6
CP-series Expansion I/O Unit Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
130
SECTION 4
I/O Memory Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
4-1
Overview of I/O Memory Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
138
4-2
I/O Area and I/O Allocations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
145
4-3
1:1 Link Area. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
152
4-4
Serial PLC Link Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
153
xi
TABLE OF CONTENTS
4-5
Internal Work Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
153
4-6
Holding Area (H). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
154
4-7
Auxiliary Area (A). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
155
4-8
TR (Temporary Relay) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
155
4-9
Timers and Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
156
4-10 Data Memory Area (D) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
160
4-11 Index Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
161
4-12 Data Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
170
4-13 Task Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
171
4-14 Condition Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
171
4-15 Clock Pulses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
174
SECTION 5
Pulse and Counter Functions. . . . . . . . . . . . . . . . . . . . . . . . . 175
5-1
High-speed Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
176
5-2
Pulse Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
198
5-3
Inverter Positioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
279
SECTION 6
Advanced Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
6-1
Interrupt Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
336
6-2
Quick-response Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
361
6-3
Serial Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
365
6-4
Analog Adjuster and External Analog Setting Input. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
393
6-5
Battery-free Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
394
6-6
Memory Cassette Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
396
6-7
Program Protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
404
6-8
Failure Diagnosis Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
413
6-9
Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
417
SECTION 7
Using Expansion Units and Expansion I/O Units . . . . . . . . 419
xii
7-1
Connecting Expansion Units and Expansion I/O Units. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
420
7-2
Analog Input Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
421
7-3
Analog Output Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
434
7-4
Analog I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
445
7-5
Temperature Sensor Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
475
7-6
CompoBus/S I/O Link Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
508
TABLE OF CONTENTS
SECTION 8
LCD Option Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
8-1
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
514
8-2
Specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
515
8-3
Part Names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
516
8-4
Installation and Removing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
517
8-5
Basic Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
518
8-6
LCD Option Board Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
523
8-7
Trouble Shooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
572
SECTION 9
Ethernet Option Board. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575
9-1
Ethernet Option Board Function Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
576
9-2
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
579
9-3
System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
580
9-4
Specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
581
9-5
FINS Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
582
9-6
Part Names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
584
9-7
Comparison with Previous Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
585
9-8
Installation and Initial Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
587
9-9
Memory Allocations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
595
9-10 Web Browser Setup and Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
601
9-11 Trouble Shooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
612
9-12 Sample Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
616
9-13 Buffer Configuration (CP1W-CIF41) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
620
SECTION 10
Program Transfer, Trial Operation, and Debugging . . . . . 621
10-1 Program Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
622
10-2 Trial Operation and Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
622
SECTION 11
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629
11-1 Error Classification and Confirmation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
630
11-2 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
632
11-3 Error Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
641
11-4 Troubleshooting Unit Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
642
xiii
TABLE OF CONTENTS
SECTION 12
Inspection and Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . 645
12-1 Inspections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
646
12-2 Replacing User-serviceable Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
649
Appendices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653
A
Standard Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
653
B
Dimensions Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
659
C
Auxiliary Area Allocations by Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
667
D
Auxiliary Area Allocations by Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
687
E
Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
735
F
Connections to Serial Communications Option Boards . . . . . . . . . . . . . . . . . . . . . . . . . . . .
737
G
PLC Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
763
H
Specifications for External Power Supply Expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
787
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789
Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795
xiv
About this Manual:
This manual describes installation and operation of the CP-series Programmable Controllers (PLCs)
and includes the sections described below. The CP Series provides advanced package-type PLCs
based on OMRON’s advanced control technologies and vast experience in automated control.
Please read this manual carefully and be sure you understand the information provided before
attempting to install or operate a CP-series PLC. Be sure to read the precautions provided in the following section.
Definition of the CP Series
The CP Series is centered around the CP1H and CP1L CPU Units and is designed with the same
basic architecture as the CS and CJ Series. Always use CP-series Expansion Units and CP-series
Expansion I/O Units when expanding I/O capacity.
I/O words are allocated in the same way as the CPM1A/CPM2A PLCs, i.e., using fixed areas for inputs
and outputs.
CS/CJ/CP Series
CS Series
CS1-H CPU Units
CJ Series
CJ1-H CPU Units
CP Series
CP1H CPU Unit
[email protected]@H
[email protected]@H
[email protected]@
[email protected]@H
[email protected]@H
[email protected]@
[email protected]@P
(Loop CPU Unit)
CP1H-Y20DT-D
CS1 CPU Units
[email protected]@ (-V1)
[email protected]@ (-V1)
CJ1M CPU Unit
[email protected]@
CS1D CPU Units
CS1D CPU Units for
Duplex-CPU System
[email protected]@H
CP-series Expansion I/O Units
CP-series Expansion Units
CJ-series Special I/O Units
CJ1 CPU Unit
CJ-series CPU Bus Units
[email protected]@
CS1D CPU Units for
Single-CPU System
CS1D-CPUS @@
CS1D Process CPU Units
CP1L CPU Unit
[email protected]@P
CS-series Basic I/O Units
CJ-series Basic I/O Units
CS-series Special I/O Units
CJ-series Special I/O Units
CS-series CPU Bus Units
CJ-series CPU Bus Units
CS-series Power Supply Units
CJ-series Power Supply Units
Note: Products specifically for the CS1D
Series are required to use CS1D
CPU Units.
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
CP-series Expansion I/O Units
CP-series Expansion Units
xv
Precautions provides general precautions for using the Programmable Controller and related devices.
Section 1 introduces the features of the CP1L and describes its configuration. It also describes the
Units that are available and connection methods for Programming Devices and other peripheral
devices.
Section 2 describes the names and functions of CP1L parts and provides CP1L specifications.
Section 3 describes how to install and wire the CP1L.
Section 4 describes the structure and functions of the I/O Memory Areas and Parameter Areas.
Section 5 describes the CP1L’s interrupt and high-speed counter functions.
Section 6 describes all of the advanced functions of the CP1L that can be used to achieve specific
application needs.
Section 7 describes how to use CP-series Expansion Units and Expansion I/O Units.
Section 8 gives an outline of the LCD Option Board, explains how to install and remove the LCD
Option Board, and describes the functions including how to monitor and make settings for the PLC. It
also lists the errors during operation and provides probable causes and countermeasures for troubleshooting.
Section 9 gives an outline of the Ethernet Option Board, explains how to install and remove the Ethernet Option Board, and how to monitor and make settings required for operation. It also lists the errors
during operation and provides countermeasures for troubleshooting.
Section 10 describes the processes used to transfer the program to the CPU Unit and the functions
that can be used to test and debug the program.
Section 11 provides information on hardware and software errors that occur during CP1L operation.
Section 12 provides inspection and maintenance information.
Appendices provide product lists, dimensions, tables of Auxiliary Area allocations, and a memory
map.
xvi
Related Manuals
The following manuals are used for the CP1L CPU Units. Refer to these manuals as required.
Cat. No.
Model numbers
W462
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
W451
W446
[email protected]@
[email protected]@
CP1H-Y20DT-D
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
[email protected]@
WS02-CXPC1-E-V73
W447
W463
W461
W464
Manual name
Description
SYSMAC CP Series Provides the following information on the CP Series:
CP1L CPU Unit Oper- • Overview, design, installation, maintenance, and
ation Manual
other basic specifications
• Features
• System configuration
• Mounting and wiring
• I/O memory allocation
• Troubleshooting
Use this manual together with the CP1L Programmable Controllers Programming Manual (W451).
SYSMAC CP Series Provides the following information on programming
CP1H /CP1L CPU
the CP Series:
Unit Programming
• Programming methods
Manual
• Tasks
• Programming instructions
SYSMAC CP Series Describes basic setup methods of CP1L PLCs:
CP1L CPU Unit Intro- • Basic configuration and component names
duction Manual
• Mounting and wiring
• Programming, data transfer, and debugging using
the CX-Programmer
• Application program examples
SYSMAC CX-Programmer
Ver. 7.2 Operation
Manual
Provides information on installing and operating the
CX-Programmer for all functions except for function
blocks.
WS02-CXPC1-E-V73
SYSMAC CX-Programmer Ver. 7.1
Operation Manual
Function Blocks
[email protected]@C-EV2
[email protected]@D-EV2
CX-One Setup Manual
CX-Integrator Operation Manual
Provides specifications and operating procedures
for function blocks. Function blocks can be used
with CX-Programmer Ver. 7.1 or higher and a CP1L
CPU Unit. Refer to W446 for operating procedures
for functions other than function blocks.
Provides an overview of and describes how to
install the CX-One FA Integrated Tool Package.
Describes operating the CX-Integrator, including
operations to build networks (e.g., setting data links,
routing tables, and Communications Units.
xvii
xviii
Cat. No.
Model numbers
W344
WS02-PSTC1-E
Manual name
CX-Protocol Operation Manual
Description
Provides operating procedures for creating protocol
macros (i.e., communications sequences) with the
CX-Protocol and other information on protocol macros.
The CX-Protocol is required to create protocol macros for user-specific serial communications or to
customize the standard system protocols.
W342
SYSMAC CS/CJ/CP/
NSJ-series Communications Commands
Reference Manual
Describes commands addressed to CS-series, CJseries, and CP-series CPU Units, including C-mode
commands and FINS commands.
CS1G/[email protected]@H
CS1G/[email protected]@-V1
[email protected]@H
[email protected]@S
[email protected]@-V1
[email protected]@-V1
CJ1G/[email protected]@H
[email protected]@P
[email protected]@
[email protected]@
[email protected]@-V1
Note This manual describes on commands
address to CPU Units regardless of the communications path. (CPU Unit serial ports,
Serial Communications Unit/Board ports, and
Communications Unit ports can be used.)
Refer to the relevant operation manuals for
information on commands addresses to Special I/O Units and CPU Bus Units.
Read and Understand this Manual
Please read and understand this manual before using the product. Please consult your OMRON
representative if you have any questions or comments.
Warranty and Limitations of Liability
WARRANTY
OMRON's exclusive warranty is that the products are free from defects in materials and workmanship for a
period of one year (or other period if specified) from date of sale by OMRON.
OMRON MAKES NO WARRANTY OR REPRESENTATION, EXPRESS OR IMPLIED, REGARDING NONINFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR PARTICULAR PURPOSE OF THE
PRODUCTS. ANY BUYER OR USER ACKNOWLEDGES THAT THE BUYER OR USER ALONE HAS
DETERMINED THAT THE PRODUCTS WILL SUITABLY MEET THE REQUIREMENTS OF THEIR
INTENDED USE. OMRON DISCLAIMS ALL OTHER WARRANTIES, EXPRESS OR IMPLIED.
LIMITATIONS OF LIABILITY
OMRON SHALL NOT BE RESPONSIBLE FOR SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES,
LOSS OF PROFITS OR COMMERCIAL LOSS IN ANY WAY CONNECTED WITH THE PRODUCTS,
WHETHER SUCH CLAIM IS BASED ON CONTRACT, WARRANTY, NEGLIGENCE, OR STRICT
LIABILITY.
In no event shall the responsibility of OMRON for any act exceed the individual price of the product on which
liability is asserted.
IN NO EVENT SHALL OMRON BE RESPONSIBLE FOR WARRANTY, REPAIR, OR OTHER CLAIMS
REGARDING THE PRODUCTS UNLESS OMRON'S ANALYSIS CONFIRMS THAT THE PRODUCTS
WERE PROPERLY HANDLED, STORED, INSTALLED, AND MAINTAINED AND NOT SUBJECT TO
CONTAMINATION, ABUSE, MISUSE, OR INAPPROPRIATE MODIFICATION OR REPAIR.
xix
Application Considerations
SUITABILITY FOR USE
OMRON shall not be responsible for conformity with any standards, codes, or regulations that apply to the
combination of products in the customer's application or use of the products.
At the customer's request, OMRON will provide applicable third party certification documents identifying
ratings and limitations of use that apply to the products. This information by itself is not sufficient for a
complete determination of the suitability of the products in combination with the end product, machine,
system, or other application or use.
The following are some examples of applications for which particular attention must be given. This is not
intended to be an exhaustive list of all possible uses of the products, nor is it intended to imply that the uses
listed may be suitable for the products:
• Outdoor use, uses involving potential chemical contamination or electrical interference, or conditions or
uses not described in this manual.
• Nuclear energy control systems, combustion systems, railroad systems, aviation systems, medical
equipment, amusement machines, vehicles, safety equipment, and installations subject to separate
industry or government regulations.
• Systems, machines, and equipment that could present a risk to life or property.
Please know and observe all prohibitions of use applicable to the products.
NEVER USE THE PRODUCTS FOR AN APPLICATION INVOLVING SERIOUS RISK TO LIFE OR
PROPERTY WITHOUT ENSURING THAT THE SYSTEM AS A WHOLE HAS BEEN DESIGNED TO
ADDRESS THE RISKS, AND THAT THE OMRON PRODUCTS ARE PROPERLY RATED AND INSTALLED
FOR THE INTENDED USE WITHIN THE OVERALL EQUIPMENT OR SYSTEM.
PROGRAMMABLE PRODUCTS
OMRON shall not be responsible for the user's programming of a programmable product, or any
consequence thereof.
xx
Disclaimers
CHANGE IN SPECIFICATIONS
Product specifications and accessories may be changed at any time based on improvements and other
reasons.
It is our practice to change model numbers when published ratings or features are changed, or when
significant construction changes are made. However, some specifications of the products may be changed
without any notice. When in doubt, special model numbers may be assigned to fix or establish key
specifications for your application on your request. Please consult with your OMRON representative at any
time to confirm actual specifications of purchased products.
DIMENSIONS AND WEIGHTS
Dimensions and weights are nominal and are not to be used for manufacturing purposes, even when
tolerances are shown.
PERFORMANCE DATA
Performance data given in this manual is provided as a guide for the user in determining suitability and does
not constitute a warranty. It may represent the result of OMRON's test conditions, and the users must
correlate it to actual application requirements. Actual performance is subject to the OMRON Warranty and
Limitations of Liability.
ERRORS AND OMISSIONS
The information in this manual has been carefully checked and is believed to be accurate; however, no
responsibility is assumed for clerical, typographical, or proofreading errors, or omissions.
xxi
PRECAUTIONS
This section provides general precautions for using the CP-series Programmable Controllers (PLCs) and related devices.
The information contained in this section is important for the safe and reliable application of Programmable Controllers.
You must read this section and understand the information contained before attempting to set up or operate a PLC system.
1
2
3
4
5
6
Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
General Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Safety Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Operating Environment Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Application Precautions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Conformance to EC Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-1
Applicable Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-2
Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-3
Conformance to EC Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-4
Relay Output Noise Reduction Methods. . . . . . . . . . . . . . . . . . . . . .
6-5
Conditions for Meeting EMC Directives
when Using CP-series Relay Expansion I/O Units . . . . . . . . . . . . . .
xxiv
xxiv
xxiv
xxvi
xxvii
xxx
xxx
xxx
xxx
xxxi
xxxii
xxiii
1
Intended Audience
1
Intended Audience
This manual is intended for the following personnel, who must also have
knowledge of electrical systems (an electrical engineer or the equivalent).
• Personnel in charge of installing FA systems.
• Personnel in charge of designing FA systems.
• Personnel in charge of managing FA systems and facilities.
2
General Precautions
The user must operate the product according to the performance specifications described in the operation manuals.
Before using the product under conditions which are not described in the
manual or applying the product to nuclear control systems, railroad systems,
aviation systems, vehicles, combustion systems, medical equipment, amusement machines, safety equipment, and other systems, machines, and equipment that may have a serious influence on lives and property if used
improperly, consult your OMRON representative.
Make sure that the ratings and performance characteristics of the product are
sufficient for the systems, machines, and equipment, and be sure to provide
the systems, machines, and equipment with double safety mechanisms.
This manual provides information for programming and operating the Unit. Be
sure to read this manual before attempting to use the Unit and keep this manual close at hand for reference during operation.
!WARNING It is extremely important that a PLC and all PLC Units be used for the specified purpose and under the specified conditions, especially in applications that
can directly or indirectly affect human life. You must consult with your OMRON
representative before applying a PLC System to the above-mentioned applications.
3
Safety Precautions
!WARNING Do not attempt to take any Unit apart while the power is being supplied. Doing
so may result in electric shock.
!WARNING Do not touch any of the terminals or terminal blocks while the power is being
supplied. Doing so may result in electric shock.
!WARNING Do not attempt to disassemble, repair, or modify any Units. Any attempt to do
so may result in malfunction, fire, or electric shock.
!WARNING Provide safety measures in external circuits (i.e., not in the Programmable
Controller), including the following items, to ensure safety in the system if an
abnormality occurs due to malfunction of the PLC or another external factor
affecting the PLC operation. Not doing so may result in serious accidents.
• Emergency stop circuits, interlock circuits, limit circuits, and similar safety
measures must be provided in external control circuits.
xxiv
3
Safety Precautions
• The PLC will turn OFF all outputs when its self-diagnosis function detects
any error or when a severe failure alarm (FALS) instruction is executed.
Unexpected operation, however, may still occur for errors in the I/O control
section, errors in I/O memory, and errors that cannot be detected by the
self-diagnosis function. As a countermeasure for all these errors, external
safety measures must be provided to ensure safety in the system.
• The PLC or outputs may remain ON or OFF due to deposits on or burning
of the output relays, or destruction of the output transistors. As a countermeasure for such problems, external safety measures must be provided
to ensure safety in the system.
• When the 24-V DC output (service power supply to the PLC) is overloaded or short-circuited, the voltage may drop and result in the outputs
being turned OFF. As a countermeasure for such problems, external
safety measures must be provided to ensure safety in the system.
!WARNING Fail-safe measures must be taken by the customer to ensure safety in the
event of incorrect, missing, or abnormal signals caused by broken signal lines,
momentary power interruptions, or other causes. Not doing so may result in
serious accidents.
!WARNING Do not apply the voltage/current outside the specified range to this unit. It may
cause a malfunction or fire.
!Caution Execute online edit only after confirming that no adverse effects will be caused
by extending the cycle time. Otherwise, the input signals may not be readable.
!Caution Confirm safety at the destination node before transferring a program to
another node or editing the I/O area. Doing either of these without confirming
safety may result in injury.
!Caution Tighten the screws on the terminal block of the AC power supply to the torque
specified in this manual. The loose screws may result in burning or malfunction.
!Caution Do not touch anywhere near the power supply parts or I/O terminals while the
power is ON, and immediately after turning OFF the power. The hot surface
may cause burn injury.
!Caution Pay careful attention to the polarities (+/-) when wiring the DC power supply. A
wrong connection may cause malfunction of the system.
!Caution When connecting the PLC to a computer or other peripheral device, either
ground the 0 V side of the external power supply or do not ground the external
power supply at all. Otherwise the external power supply may be shorted
depending on the connection methods of the peripheral device. DO NOT ground
the 24 V side of the external power supply, as shown in the following diagram.
24 V
Non-insulated DC power supply
Twisted-pair
cable
0V
0V
0V
FG
FG
CPU Unit
FG
Peripheral device
FG
xxv
Operating Environment Precautions
4
!Caution After programming (or reprogramming) using the IOWR instruction, confirm
that correct operation is possible with the new ladder program and data before
starting actual operation. Any irregularities may cause the product to stop
operating, resulting in unexpected operation in machinery or equipment.
!Caution The CP1L CPU Units automatically back up the user program and parameter
data to flash memory when these are written to the CPU Unit. I/O memory
(including the DM Area, counter present values and Completion Flags, and
HR Area), however, is not written to flash memory. The DM Area, counter
present values and Completion Flags, and HR Area can be held during power
interruptions with a battery. If there is a battery error, the contents of these
areas may not be accurate after a power interruption. If the contents of the
DM Area, counter present values and Completion Flags, and HR Area are
used to control external outputs, prevent inappropriate outputs from being
made whenever the Battery Error Flag (A402.04) is ON.
4
Operating Environment Precautions
!Caution Do not operate the control system in the following locations:
• Locations subject to direct sunlight.
• Locations subject to temperatures or humidity outside the range specified
in the specifications.
• Locations subject to condensation as the result of severe changes in temperature.
• Locations subject to corrosive or flammable gases.
• Locations subject to dust (especially iron dust) or salts.
• Locations subject to exposure to water, oil, or chemicals.
• Locations subject to shock or vibration.
• Locations subject to direct rain fall.
• Locations subject to direct strong UV.
!Caution Take appropriate and sufficient countermeasures when installing systems in
the following locations:
• Locations subject to static electricity or other forms of noise.
• Locations subject to strong electromagnetic fields.
• Locations subject to possible exposure to radioactivity.
• Locations close to power supplies.
!Caution The operating environment of the PLC System can have a large effect on the
longevity and reliability of the system. Improper operating environments can
lead to malfunction, failure, and other unforeseeable problems with the PLC
System. Make sure that the operating environment is within the specified conditions at installation and remains within the specified conditions during the
life of the system.
xxvi
5
Application Precautions
5
Application Precautions
Observe the following precautions when using the PLC System.
!WARNING Always heed these precautions. Failure to abide by the following precautions
could lead to serious or possibly fatal injury.
• Always connect to 100 Ω or less when installing the Units. Not connecting
to a ground of 100 Ω or less may result in electric shock.
• Always turn OFF the power supply to the PLC before attempting any of
the following. Not turning OFF the power supply may result in malfunction
or electric shock.
• Mounting or dismounting Expansion Units or any other Units
• Connecting or removing the Memory Cassette or Option Board
• Setting DIP switches or rotary switches
• Connecting or wiring the cables
• Connecting or disconnecting the connectors
!Caution Failure to abide by the following precautions could lead to faulty operation of
the PLC or the system, or could damage the PLC or PLC Units. Always heed
these precautions.
• When unpacking the Unit, check carefully for any external scratches or
other damages. Also, shake the Unit gently and check for any abnormal
sound.
• Install external breakers and take other safety measures against short-circuiting in external wiring. Insufficient safety measures against short-circuiting may result in burning.
• Mount the Unit only after checking the connectors and terminal blocks
completely.
• Be sure that all the terminal screws and cable connector screws are tightened to the torque specified in the relevant manuals. Incorrect tightening
torque may result in malfunction.
• Wire all connections correctly according to instructions in this manual.
• Keep the wire cuttings out of the Unit when wiring.
• Always use the power supply voltage specified in the operation manuals.
An incorrect voltage may result in malfunction or burning.
• Take appropriate measures to ensure that the specified power with the
rated voltage and frequency is supplied. Be particularly careful in places
where the power supply is unstable. An incorrect power supply may result
in malfunction.
• Leave the label attached to the Unit when wiring. Removing the label may
result in malfunction.
• Remove the label after the completion of wiring to ensure proper heat dissipation. Leaving the label attached may result in malfunction.
• Use crimp terminals for wiring. Do not connect bare stranded wires
directly to terminals. Connection of bare stranded wires may result in
burning.
• Do not apply voltages to the input terminals in excess of the rated input
voltage. Excess voltages may result in burning.
xxvii
5
Application Precautions
• Do not apply voltages or connect loads to the output terminals in excess
of the maximum switching capacity. Excess voltage or loads may result in
burning.
• Be sure that the terminal blocks, connectors, Option Boards, and other
items with locking devices are properly locked into place. Improper locking
may result in malfunction.
• Disconnect the functional ground terminal when performing withstand
voltage tests. Not disconnecting the functional ground terminal may result
in burning.
• Wire correctly and double-check all the wiring or the setting switches
before turning ON the power supply. Incorrect wiring may result in burning.
• Check that the DIP switches and data memory (DM) are properly set
before starting operation.
• Check the user program for proper execution before actually running it on
the Unit. Not checking the program may result in an unexpected operation.
• Resume operation only after transferring to the new CPU Unit the contents of the DM, HR, and CNT Areas required for resuming operation. Not
doing so may result in an unexpected operation.
• Confirm that no adverse effect will occur in the system before attempting
any of the following. Not doing so may result in an unexpected operation.
• Changing the operating mode of the PLC (including the setting of the
startup operating mode).
• Force-setting/force-resetting any bit in memory.
• Changing the present value of any word or any set value in memory.
• Do not pull on the cables or bend the cables beyond their natural limit.
Doing either of these may break the cables.
• Do not place objects on top of the cables. Doing so may break the cables.
• When replacing parts, be sure to confirm that the rating of a new part is
correct. Not doing so may result in malfunction or burning.
• Before touching the Unit, be sure to first touch a grounded metallic object
in order to discharge any static buildup. Not doing so may result in malfunction or damage.
• Install the Unit properly as specified in the operation manual. Improper
installation of the Unit may result in malfunction.
• Do not touch the Expansion I/O Unit Connecting Cable while the power is
being supplied in order to prevent malfunction due to static electricity.
• Do not turn OFF the power supply to the Unit while data is being transferred.
• When transporting or storing the product, cover the PCBs and the Units or
put there in the antistatic bag with electrically conductive materials to prevent LSls and ICs from being damaged by static electricity, and also keep
the product within the specified storage temperature range.
• Do not touch the mounted parts or the rear surface of PCBs because
PCBs have sharp edges such as electrical leads.
• Double-check the pin numbers when assembling and wiring the connectors.
• Wire correctly according to specified procedures.
xxviii
Application Precautions
5
• Do not connect pin 6 (+5V) on the RS-232C Option Board (CP1W-CIF01)
on the CPU Unit to any external device other than the NT-AL001 or
CJ1W-CIF11 Conversion Adapter. The external device and the CPU Unit
may be damaged.
• Use the dedicated connecting cables specified in this manual to connect
the Units. Using commercially available RS-232C computer cables may
cause failures in external devices or the CPU Unit.
• The user program and parameter area data in the CPU Unit is backed up
in the built-in flash memory. The BKUP indicator will light on the front of
the CPU Unit when the backup operation is in progress. Do not turn OFF
the power supply to the CPU Unit when the BKUP indicator is lit. The data
will not be backed up if power is turned OFF.
• Do not turn OFF the power supply to the PLC while the Memory Cassette
is being written. Doing so may corrupt the data in the Memory Cassette.
The BKUP indicator will light while the Memory Cassette is being written.
Wait for the BKUP indicator to go out before turning OFF the power supply to the PLC.
• Before replacing the battery, supply power to the CPU Unit for at least 5
minutes and then complete battery replacement within 5 minutes of turn
OFF the power supply. Memory data may be corrupted if this precaution is
not observed.
• Always use the following size wire when connecting I/O terminals:
AWG22 to AWG18 (0.32 to 0.82 mm2).
• Dispose of the product and batteries according to local ordinances as
they apply.
Have qualified specialists properly dispose of used batteries as industrial
waste.
• UL standards required that batteries be replaced only by experienced
technicians. Do not allow unqualified persons to replace batteries. Also,
always follow the replacement procedure provided in the manual.
• Never short-circuit the positive and negative terminals of a battery or
charge, disassemble, heat, or incinerate the battery. Do not subject the
battery to strong shocks or deform the barry by applying pressure. Doing
any of these may result in leakage, rupture, heat generation, or ignition of
the battery. Dispose of any battery that has been dropped on the floor or
otherwise subjected to excessive shock. Batteries that have been subjected to shock may leak if they are used.
• Always construct external circuits so that the power to the PLC it turned
ON before the power to the control system is turned ON. If the PLC power
supply is turned ON after the control power supply, temporary errors may
result in control system signals because the output terminals on DC Output Units and other Units will momentarily turn ON when power is turned
ON to the PLC.
• Fail-safe measures must be taken by the customer to ensure safety in the
event that outputs from Output Units remain ON as a result of internal circuit failures, which can occur in relays, transistors, and other elements.
xxix
6
Conformance to EC Directives
• If the I/O Hold Bit is turned ON, the outputs from the PLC will not be
turned OFF and will maintain their previous status when the PLC is
switched from RUN or MONITOR mode to PROGRAM mode. Make sure
that the external loads will not produce dangerous conditions when this
occurs. (When operation stops for a fatal error, including those produced
with the FALS(007) instruction, all outputs from Output Unit will be turned
OFF and only the internal output status will be maintained.)
6
6-1
Conformance to EC Directives
Applicable Directives
• EMC Directives
• Low Voltage Directive
6-2
Concepts
EMC Directives
OMRON devices that comply with EC Directives also conform to the related
EMC standards so that they can be more easily built into other devices or the
overall machine. The actual products have been checked for conformity to
EMC standards (see the following note). Whether the products conform to the
standards in the system used by the customer, however, must be checked by
the customer.
EMC-related performance of the OMRON devices that comply with EC Directives will vary depending on the configuration, wiring, and other conditions of
the equipment or control panel on which the OMRON devices are installed.
The customer must, therefore, perform the final check to confirm that devices
and the overall machine conform to EMC standards.
Note
The applicable EMC (Electromagnetic Compatibility) standard is EN61131-2.
Low Voltage Directive
Always ensure that devices operating at voltages of 50 to 1,000 V AC and 75
to 1,500 V DC meet the required safety standards for the PLC (EN61131-2).
6-3
Conformance to EC Directives
The CP1L PLCs comply with EC Directives. To ensure that the machine or
device in which the CP1L PLC is used complies with EC Directives, the PLC
must be installed as follows:
1,2,3...
1. The CP1L PLC must be installed within a control panel.
2. You must use reinforced insulation or double insulation for the DC power
supplies used for I/O Units and CPU Units requiring DC power. The output
holding time must be 10 ms minimum for the DC power supply connected
to the power supply terminals on Units requiring DC power.
3. CP1L PLCs complying with EC Directives also conform to EN61131-2. Radiated emission characteristics (10-m regulations) may vary depending on
the configuration of the control panel used, other devices connected to the
control panel, wiring, and other conditions. You must therefore confirm that
the overall machine or equipment complies with EC Directives.
xxx
6
Conformance to EC Directives
6-4
Relay Output Noise Reduction Methods
The CP1L PLCs conforms to the Common Emission Standards (EN61131-2)
of the EMC Directives. However, noise generated by relay output switching
may not satisfy these Standards. In such a case, a noise filter must be connected to the load side or other appropriate countermeasures must be provided external to the PLC.
Countermeasures taken to satisfy the standards vary depending on the
devices on the load side, wiring, configuration of machines, etc. Following are
examples of countermeasures for reducing the generated noise.
Countermeasures
Countermeasures are not required if the frequency of load switching for the
whole system with the PLC included is less than 5 times per minute.
Countermeasures are required if the frequency of load switching for the whole
system with the PLC included is more than 5 times per minute.
Note
Refer to EN61131-2 for more details.
Countermeasure Examples
When switching an inductive load, connect an surge protector, diodes, etc., in
parallel with the load or contact as shown below.
Circuit
Current
AC
DC
Yes
C
R
Power
supply
Inductive
load
CR method
Yes
Characteristic
Required element
If the load is a relay or solenoid, there is
a time lag between the moment the circuit is opened and the moment the load
is reset.
If the supply voltage is 24 or 48 V, insert
the surge protector in parallel with the
load. If the supply voltage is 100 to
200 V, insert the surge protector
between the contacts.
The capacitance of the capacitor must
be 1 to 0.5 µF per contact current of
1 A and resistance of the resistor must
be 0.5 to 1 Ω per contact voltage of 1 V.
These values, however, vary with the
load and the characteristics of the
relay. Decide these values from experiments, and take into consideration that
the capacitance suppresses spark discharge when the contacts are separated and the resistance limits the
current that flows into the load when
the circuit is closed again.
The dielectric strength of the capacitor
must be 200 to 300 V. If the circuit is an
AC circuit, use a capacitor with no
polarity.
xxxi
6
Conformance to EC Directives
Circuit
Current
AC
DC
Power
supply
Yes
Yes
Yes
Inductive
load
Varistor method
Power
supply
No
Inductive
load
Diode method
Characteristic
Required element
The diode connected in parallel with
the load changes energy accumulated
by the coil into a current, which then
flows into the coil so that the current will
be converted into Joule heat by the
resistance of the inductive load.
This time lag, between the moment the
circuit is opened and the moment the
load is reset, caused by this method is
longer than that caused by the CR
method.
The varistor method prevents the imposition of high voltage between the contacts by using the constant voltage
characteristic of the varistor. There is
time lag between the moment the circuit is opened and the moment the load
is reset.
If the supply voltage is 24 or 48 V, insert
the varistor in parallel with the load. If
the supply voltage is 100 to 200 V,
insert the varistor between the contacts.
The reversed dielectric strength value
of the diode must be at least 10 times
as large as the circuit voltage value.
The forward current of the diode must
be the same as or larger than the load
current.
The reversed dielectric strength value
of the diode may be two to three times
larger than the supply voltage if the
surge protector is applied to electronic
circuits with low circuit voltages.
---
When switching a load with a high inrush current such as an incandescent
lamp, suppress the inrush current as shown below.
Countermeasure 1
Countermeasure 2
R
OUT
OUT
R
COM
COM
Providing a dark current of
approx. one-third of the rated
value through an incandescent
lamp
6-5
Providing a limiting resistor
Conditions for Meeting EMC Directives when Using CP-series
Relay Expansion I/O Units
EN61131-2 immunity testing conditions when using the CP1W-40EDR,
CP1W-32ER, or CP1W-16ER with a CP1W-CN811 I/O Connecting Cable are
given below.
Recommended Ferrite Core
Ferrite Core (Data Line Filter): 0443-164151 manufactured by Nisshin Electric
Minimum impedance: 90 Ω at 25 MHz, 160 Ω at 100 MHz
30
32
xxxii
33
6
Conformance to EC Directives
Recommended Connection Method
1,2,3...
1. Cable Connection Method
2. Connection Method
As shown below, connect a ferrite core to each end of the CP1W-CN811
I/O Connecting Cable.
SYSMAC
CP1L
IN
L1
L2/N
COM
01
00
03
02
05
04
00
01
COM
07
06
02
COM
09
08
03
COM
11
10
04
COM
01
00
06
05
07
03
05
02
04
00
01
COM
07
06
03
02
09
08
04
COM
11
10
06
05
07
OUT
NC
COM
NC
NC
NC
01
03
00
02
05
04
07
06
09
08
CH
11
10
01
00
03
02
05
04
07
06
09
08
11
10
CH
CH
IN
00
01
02
03
04
05
06
07
08
09
10
11
00
01
02
03
04
05
06
07
08
09
10
11
00
01
02
03
04
05
06
07
04
05
06
07
CH
CH
OUT
CH
00
01
02
03
40EDR
CH
NC
NC
00
COM
01
COM
02
COM
04
03
05
COM
07
06
COM
CH
00
02
04
05
07
01
03
COM
06
EXP
xxxiii
SECTION 1
Features and System Configuration
This section introduces the features of the CP1L and describes its configuration. It also describes the Units that are available
and connection methods for the CX-Programmer and other peripheral devices.
1-1
1-2
Features and Main Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
1-1-1
CP1L Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
1-1-2
Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
1-2-1
Basic System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
1-2-2
System Expansion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18
1-2-3
Restrictions on System Configuration . . . . . . . . . . . . . . . . . . . . . . .
21
Connecting the CX-Programmer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23
1-3-1
Connecting with a Commercially Available USB Cable . . . . . . . . .
23
1-3-2
Connecting to a Serial Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
31
1-4
Function Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
33
1-5
Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
1-5-1
Overview of Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
1-5-2
Advantages of Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
1-3
1
Section 1-1
Features and Main Functions
1-1
Features and Main Functions
1-1-1
CP1L Overview
The SYSMAC CP1L PLCs are the low end PLCs in the SYSMAC CP Series
of package-type Programmable Controllers. They have the smallest program
and I/O capacity. The CP1L PLCs are the same size as the CPM1A and
CPM2A PLCs, but offer many more features and high performance.
CPU Units with 60 I/O Points: [email protected]@
CPU Units with 40 I/O Points: [email protected]@
• The CPU Unit has 36 inputs and 24 outputs built
• The CPU Unit has 24 inputs and 16 outputs built
in.
in.
• The PLC can be expanded to a maximum total of
• The PLC can be expanded to a maximum total of
180 I/O points by using CP-series Expansion I/O
160 I/O points by using CP-series Expansion I/O
Units.
Units.
36 built-in inputs (Functions
can be assigned.) (See note.)
Normal inputs (36)
Normal inputs (24)
High-speed counter
(4 counters/2 axes)
100 kHz (single phase)
Interrupt inputs (6)
Quick-response inputs (6)
Interrupt inputs (6)
High-speed counter
(4 counters/2 axes)
100 kHz (single phase)
Quick-response inputs (6)
24 built-in outputs (Functions
can be assigned.) (See note.)
16 built-in outputs (Functions
can be assigned.) (See note.)
Normal outputs (16)
Normal outputs (24)
2 pulse outputs
100 kHz
2 pulse outputs
100 kHz
2 PWM outputs
2 PWM outputs
CPU Units with transistor outputs only.
2
24 built-in inputs (Functions
can be assigned.) (See note.)
CPU Units with transistor outputs only.
Section 1-1
Features and Main Functions
CPU Units with 30 I/O Points: [email protected]@
• The CPU Unit has 18 inputs and 12 outputs built
in.
• The PLC can be expanded to a maximum total of
150 I/O points by using CP-series Expansion I/O
Units.
18 built-in inputs (Functions
can be assigned.) (See note.)
Normal inputs (18)
High-speed counter
(4 counters/2 axes)
100 kHz (single phase)
Interrupt inputs (6)
Quick-response inputs (6)
12 built-in outputs (Functions
can be assigned.) (See note.)
Normal outputs (12)
2 pulse outputs
100 kHz
2 PWM outputs
CPU Units with transistor outputs only.
• Four high-speed counters for two axes and two pulse outputs for two axes
can be used with the CPU Unit alone.
• Using CP-series Expansion Units also allows extra functions (such as
temperature sensor inputs) to be added.
• Installing an Option Board enables RS-232C and RS-422A/485 communications for Programmable Terminals, Bar Code Readers, Inverters, etc.
Note
Settings in the PLC Setup determine whether each input point is to be used
as a normal input, interrupt input, quick-response input, or high-speed
counter. The instruction used to control each output point determines whether
it is used as a normal output, pulse output, or PWM output.
3
Section 1-1
Features and Main Functions
CPU Units with 20 I/O Points: [email protected]@ and CPU Units with 14 I/O Points: [email protected]@ and
[email protected]@
[email protected]@
• The CPU Unit has 12 inputs and 8 outputs built in.
• The CPU Unit has 8 inputs and 6 outputs built in.
• The PLC can be expanded to a maximum total of
• The PLC can be expanded to a maximum total of
60 I/O points by using CP-series Expansion I/O
54 I/O points by using CP-series Expansion I/O
Units.
Units.
12 built-in inputs (Functions
can be assigned.) (See note.)
Normal inputs (12)
Interrupt inputs (6)
High-speed counter
(4 counters/2 axes)
100 kHz (single phase) CP1L-L
20 kHz (single phase) CP1L-J
Normal inputs (8)
Interrupt inputs (4)
High-speed counter
(4 counters/2 axes)
100 kHz (single phase) CP1L-L
20 kHz (single phase) CP1L-J
Quick-response inputs (4)
Quick-response inputs (6)
8 built-in outputs (Functions
can be assigned.) (See note.)
12 built-in outputs (Functions
can be assigned.) (See note.)
Normal outputs (6)
Normal outputs (8)
2 pulse outputs
100 kHz (CP1L-L)
20 kHz (CP1L-J)
2 pulse outputs
100 kHz (CP1L-L)
20 kHz (CP1L-J)
2 PWM outputs
2 PWM outputs
CPU Units with transistor outputs only.
4
8 built-in inputs (Functions can
be assigned.) (See note.)
CPU Units with transistor outputs only.
Section 1-1
Features and Main Functions
CPU Units with 10 I/O Points: [email protected]@
• The CPU Unit has 6 inputs and 4 outputs built in.
• The PLC cannot use CP-series Expansion I/O
Units to expand the maximum total of I/O points.
6 built-in inputs (Functions
can be assigned.) (See note.)
Normal inputs (6)
High-speed counter
(4 counters/2 axes)
100 kHz (single phase)
Interrupt inputs (2)
Quick-response inputs (2)
4 built-in outputs (Functions
can be assigned.) (See note.)
Normal outputs (4)
2 pulse outputs
100 kHz
2 PWM outputs
CPU Units with transistor outputs only.
• Four high-speed counters for two axes and two pulse outputs for two axes
can be used with the CPU Unit alone.
• Using CP-series Expansion Units also allows extra functions (such as
temperature sensor inputs) to be added.
• Installing an Option Board enables RS-232C and RS-422A/485 communications for Programmable Terminals, Bar Code Readers, Inverters, etc.
Note
Settings in the PLC Setup determine whether each input point is to be used
as a normal input, interrupt input, quick-response input, or high-speed
counter. The instruction used to control each output point determines whether
it is used as a normal output, pulse output, or PWM output.
5
Section 1-1
Features and Main Functions
CP1L CPU Units
Type
Model
M CPU Units
CP1L-M60DR-A
CP1L-M60DR-D
CP1L-M60DT-A
CP1L-M60DT-D
CP1L-M60DT1-D
L CPU Units
CP1L-M40DR-A CP1L-M30DR-A CP1L-L20DR-A CP1L-L14DR-A CP1L-L10DR-A
CP1L-M40DR-D CP1L-M30DR-D CP1L-L20DR-D CP1L-L14DR-D CP1L-L10DR-D
CP1L-M40DT-A CP1L-M30DT-A CP1L-L20DT-A CP1L-L14DT-A CP1L-L10DT-A
CP1L-M40DT-D CP1L-M30DT-D CP1L-L20DT-D CP1L-L14DT-D CP1L-L10DT-D
CP1L-M40DT1-D CP1L-M30DT1-D CP1L-L20DT1-D CP1L-L14DT1-D CP1L-L10DT1-D
CP1L-J20DR-A CP1L-J14DR-A
CP1L-J20DR-D CP1L-J14DR-D
CP1L-J20DT1-D CP1L-J14DT1-D
Models with AC power (model numbers ending in “-A”):
100 to 240 V AC, 50/60 Hz
Models with DC power (model numbers ending in “-D”):
24 V DC
Power supply
Program capacity
10K steps
Maximum number of
I/O points
Normal I/O points
I/O
Input points
180
(See note 1.)
60
160
150
(See note 1.) (See note 1.)
40
30
60
(See note 2.)
20
54
10
(See note 2.) (See note 3.)
14
10
36
24 VDC
24
12
8
6
4 max
2 max
6
4
Input
specifications
Interrupt or
quick-response
inputs
Output points
5K steps
J models : 1K steps
18
6 max
24
16
12
8
Output
specifications
Relay outputs:
Model numbers with “R” before the final suffix
Transistor outputs, sinking: Model numbers with “T” before the final suffix
Transistor outputs, sourcing:Model numbers with “T1” before the final suffix
High-speed counter inputs 4 counters/2 axes, 100 kHz (single-phase),
100 kHz for up/down pulses or pulse plus direction, 50 kHz for differential phases
J models: 4 counters/2 axes, 20kHz (single-phase),
20kHz for up/down pulses or pulse plus direction, 10kHz for differential phases.
Pulse outputs
2 axes, 100 kHz (transistor outputs)
J models : 2 axes, 20kHz (transistor outputs)
Note
(1) Three Expansion I/O Units connected to a CP-series CPU Unit with 60,
40 or 30 I/O Points.
(2) One Expansion I/O Unit connected to a CP-series CPU Unit with 20 or 14
I/O Points.
6
Section 1-1
Features and Main Functions
Interpreting CP1L CPU Unit Model Numbers
[email protected]@@[email protected]@
Power supply
A: AC
D: DC
Program capacity
M: 10K steps
L: 5K steps
J: 1K steps
Output classification
R: Relay outputs
T: Transistor outputs (sinking)
T1: Transistor outputs (sourcing)
Number of built-in
normal I/O points
60: 60
40: 40
30: 30
20: 20
14: 14
10: 10
Input classification
D: DC inputs
1-1-2
Features
This section describes the main features of the CP1L.
Basic CP1L Configuration
CP1L CPU Unit (Example for model with 40 I/O points)
CX-One
Power supply/input terminal block
Battery (CJ1W-BAT01)
USB port
Peripheral
USB port
USB cable
Analog adjuster
External analog
settings input
Memory Cassette
Two Option Board slots
Output terminal block
Option Board
CP1W-ME05M
Memory Cassette
One RS-232C port
CP1W-CIF01
RS-232C Option
Board
CP1W-CIF41
One RS-422A/485 port CP1W-DAM01
LCD Option Board Ethernet Option
CP1W-CIF11/CIF12
Board
RS-422A/485 Option
Board
7
Section 1-1
Features and Main Functions
Positioning with an
Inverter
Positioning can be controlled using an inverter. Previously, an internal pulse
output with trapezoidal acceleration/deceleration is created using the PULSE
OUTPUT instruction. The position offset is calculated using an error counter
for the feedback pulse input from a rotary encoder connected to an inductive
motor and the internal pulse output. The error counter is then used to output a
speed command to the inverter to control positioning. This enables positioning
with high-capacity motors, as well as low-cost positioning with small-capacity
motors (in comparison to using a servo).
A virtual pulse output is created using a pulse output instruction, the position
offset is calculated using an error counter, and a frequency (i.e., speed)
command is output according to the position offset to control positioning.
Analog output or RS-422A (Modbus-RTU)
Pulse Output
Instruction
Frequency
command
Inverter
Pulse input
Encoder
Motor
Note
Full Complement of
High-speed Counter
Functions
If high-precision positioning is required, we recommend using an inverter with
vector control.
High-speed counter inputs can be enabled by connecting rotary encoders to
the built-in inputs. The ample number of high-speed counter inputs makes it
possible to control a multi-axis device with a single PLC.
• Four 100-kHz (single phase)/50-kHz (differential phases) high-speed
counter inputs (4 counters/2 axes) are provided as a standard feature.
(See note.)
• For CP1L-J PLCs, four 20-kHz (single phase)/10-kHz (differential phases)
high-speed counter inputs (4 counters/2 axes) are provided as a standard
feature. (See note.)
24 built-in inputs
(Functions can be assigned.)
High-speed counters
(4 counters/2 axes)
100 kHz (single phase)
Note
8
Settings in the PLC Setup determine whether each input point is to
be used as a normal input, interrupt input, quick-response input, or
high-speed counter.
Section 1-1
Features and Main Functions
Full Complement of Highspeed Counter Functions
High-speed Processing for High-speed Counter Present Value (PV)
Target Values or Range Comparison Interrupts
An interrupt task can be started when the count reaches a specified value or
falls within a specified range.
High-speed Counter Input Frequency (Speed) Monitoring
The input pulse frequency can be monitored using the PRV instruction (one
point (counter 0) only, and you must select whether to use input frequency
monitoring or counter 3; you cannot use both).
High-speed Counter PV Holding/Refreshing
It is possible to toggle between holding and refreshing the high-speed counter
PV by turning ON and OFF the High-speed Counter Gate Flag from the ladder
program.
Versatile Pulse
Control (CPU Units
with Transistor
Outputs Only)
Positioning and speed control by a pulse-input servo driver is enabled by outputting fixed duty ratio pulse output signals from the CPU Unit's built-in outputs.
• Pulse outputs for 2 axes at 100 kHz maximum are provided as standard
features. (See note.)
• For CP1L-J PLCs, pulse outputs for 2 axes at 20 kHz maximum are provided as standard features. (See note.)
16 built-in outputs
(Functions assigned.)
2 pulse outputs
100 kHz
Note
Full Complement of Pulse
Output Functions
The instruction used to control each output point determines
whether it is used as a normal output, pulse output, or PWM output.
Select CW/CCW Pulse Outputs or Pulse Plus Direction Outputs for the
Pulse Outputs
The pulse outputs can be selected to match the pulse input specifications of
the motor driver.
Easy Positioning with Absolute Coordinate System Using Automatic
Direction Setting
For operations in an absolute coordinate system (i.e., when the origin is
established or when the PV is changed by the INI instruction), the CW/CCW
direction can be automatically set when PULSE OUTPUT instructions are
executed according to whether the specified number of output pulses is more
or less than the pulse output PV.
9
Features and Main Functions
Section 1-1
Triangular Control
If the amount of output pulses required for acceleration and deceleration (the
target frequency times the time to reach the target frequency) exceeds the
preset target number of output pulses during positioning (when the ACC
instruction in independent mode or the PLS2 instruction is executed), the
acceleration and deceleration will be shortened and triangular control will be
executed instead of trapezoidal control. In other words, the trapezoidal pulse
output will be eliminated, with no period of constant speed.
Target Position Changes during Positioning (Multiple Start)
While positioning using a PULSE OUTPUT (PLS2) instruction is in progress,
the target position, target speed, acceleration rate, and deceleration rate can
be changed by executing another PLS2 instruction.
Positioning Changes during Speed Control (Interrupt Feeding)
While speed control in continuous mode is in effect, it is possible to change to
positioning in independent mode by executing a PULSE OUTPUT (PLS2)
instruction. By this means, interrupt feeding (moving a specified amount) can
be executed under specified conditions.
Target Speed, Acceleration Rate, and Deceleration Rate Changes during
Acceleration or Deceleration
When a PULSE OUTPUT instruction with trapezoidal acceleration and deceleration is executed (for speed control or positioning), the target speed and
acceleration and deceleration rates can be changed during acceleration or
deceleration.
Lighting and Power Control by Outputting Variable Duty Ratio Pulses
Operations, such as lighting and power control, can be handled by outputting
variable duty ratio pulse (PWM) output signals from the CPU Unit's built-in
outputs.
Origin Searches
Origin Search and Origin Return Operations Using a Single Instruction
An accurate origin search combining all I/O signals (origin proximity input signal, origin input signal, positioning completed signal, error counter reset output, etc.) can be executed with a single instruction. It is also possible to move
directly to an established origin using an origin return operation.
Input Interrupts
In direct mode, an interrupt task can be started when a built-in input turns ON
or OFF. In counter mode, the rising or falling edges of built-in inputs can be
counted, and an interrupt task started when the count reaches a specified
value. The maximum number of interrupt input points is 6 for CPU Units with
20, 30, 40 or 60 I/O points and 4 for CPU Units with 14 I/O points and 2 for
CPU Units with 10 I/O points.
Note
Quick-response
Inputs
10
For each input point, a selection in the PLC Setup determines whether it is to
be used as a normal input, interrupt input, quick-response input, or highspeed counter. The interrupt input response frequency in counter mode must
be 5 kHz or less total for all interrupts.
By using quick-response inputs, built-in inputs up to a minimum input signal
width of 50 µs can be read regardless of the cycle time. The maximum number of quick-response input points is 6 for CPU Units with 20, 30, 40 or 60 I/O
points and 4 for CPU Units with 14 I/O points and 2 for CPU Units with 10 I/O
points.
Section 1-1
Features and Main Functions
Note
For each input, a PLC Setup parameter determines whether it is to be used as
a normal input, interrupt input, quick-response input, or high-speed counter.
Analog Settings
Changing Settings Using
Analog Adjustment
By adjusting the analog adjuster with a Phillips screwdriver, the value in the
Auxiliary Area can be changed to any value between 0 and 255. This makes it
easy to change set values such as timers and counters without Programming
Devices.
Phillips screwdriver
Analog adjuster
Turning the control on the CP1H changes the
PV in A642 between 0000 and 0255 (00 and
FF hex).
Ladder program
CNTX
A642
Example: The production quantity could be changed by
changing the counter set value from 100 to 150.
Changing Settings Using
External Analog Setting
Inputs
External analog values of 0 to 10 V (resolution: 256) are converted to digital
values and stored in a word in the AR Area. This enables applications that
require on-site adjustment of settings that do not demand a particularly high
degree of accuracy, such as for example, a setting based on changes in outdoor temperatures or potentiometer inputs.
External analog setting
input connector
Potentiometer, temperature
sensor, etc.
0 to 10 V
Ladder program
TIMX
A643
When a voltage (0 to 10 V) is input from a
device such as a potentiometer to the
external analog setting input, the PV in A643
is refreshed between 0000 and 0100 hex (0
to 256).
Example: The production quantity could be changed by changing
the timer set value from 100 to 150.
11
Section 1-1
Features and Main Functions
Connectability with Various Components
USB Port for
Programming Devices
CX-One Support Software, such as the CX-Programmer, connects from the
USB port on a computer to the CP1L built-in peripheral USB port via commercially available USB cable.
Personal computer
CX-One (ver. 2.0 or higher)
(e.g., CX-Programmer ver. 7.1 or higher)
USB port
USB cable
Peripheral
USB port
Expansion Capability for
Serial Ports
Up to two Serial Communications Boards each with one RS-232C port or one
RS-422A/485 port can be added to a CPU Unit with 30, 40 or 60 I/O points.
One Serial Communications Boards can be added to a CPU Unit with 20 or
14 I/O points. With a total of up to three ports, including the USB port, this
makes it possible to simultaneously connect a computer, PT, CP1L, and/or
various components, such as an Inverter, Temperature Controller, or Smart
Sensor.
NS-series PT, personal computer, bar code reader, etc.
CP1W-CIF01 RS-232C
Option Board
RS-232C
CP1W-CIF11/CIF12
RS-422A/485 Option Board
CP1L
RS-422A
Inverter, etc. (See note 1.)
CP1L
Note
12
(1) The Modbus-RTU easy master (available for all models) makes it easy to
control Modbus Slaves (such as Inverters) with serial communications.
After the Modbus Slave address, function, and data have been preset in
Section 1-1
Features and Main Functions
a fixed memory area (DM), messages can be sent or received independently of the program by turning software switches.
Communications can be executed
independently of the program by setting
a Modbus-RTU command in the DM and
turning ON a software switch.
Modbus-RTU
Inverter
(2) By using the serial PLC Links, a maximum of 10 words of data per CPU
Unit can be shared independently of the program among a maximum of
nine CPU Units (CP1L-CP1L-CP1H/CJ1M) using RS-422A/485 Option
Boards.
CP1L CPU Unit
(Master)
RS-422A/485
Data sharing
CP1L CPU Unit
(Slave)
CP1L CPU Unit
(Slave)
CJ1M CPU Unit
(Slave)
8 CPU Units max.
No-battery Operation
Programs, the PLC Setup, and other data can be automatically saved to the
CPU Unit's built-in flash memory. Moreover, DM Area data can be saved to
the flash memory and then used as initial data when the power is turned ON.
This allows programs and initial values (such as recipe setup data) in the DM
Area to be saved in the CPU Unit without the need to maintain a backup battery.
13
Section 1-1
Features and Main Functions
CP1L CPU Unit
Built-in flash
memory
Data saving capability
without a battery
Programs, DM initial values, etc.
Memory Cassettes
Built-in flash memory data, such as programs and DM initial-value data, can
be stored on a Memory Cassette (optional) as backup data. In addition, programs and initial-value data can be easily copied to another CPU Unit using
the Memory Cassette to recreate the same system.
CP1L CPU Unit
Another CP1L CPU Unit
Built-in flash
memory
Memory
Cassette
Can be automatically
transferred at startup.
Programs, DM initial values, etc.
Note
Security
14
Memory Cassette cannot be used in CP1L-J CPU Unit.
A password registration function is provided for the CPU Unit to prevent unauthorized copy of ladder programs. If an attempt is made to read a ladder program from a CX-Programmer, access to the program is denied if the password
that is entered does not match the registered password. If incorrect passwords are entered for five consecutive attempts, the CPU Unit does not
accept any more passwords for two hours.
Section 1-2
System Configuration
1-2
1-2-1
System Configuration
Basic System
CPU Unit with 60 I/O Points
CPU Unit with 40 I/O Points
CPU Unit with 30 I/O Points
CPU Unit with 20 I/O Points
CPU Unit with 14 I/O Points
CPU Unit with 10 I/O Points
Maximum Number of Normal I/O Points
Type
M
I/O
Power supply
Model
capacity
voltage
60 points 100 to 240 VAC CP1L-M60DR-A
Normal builtNormal built-in outputs
in inputs
36 DC inputs 24 relay outputs
24 VDC
CP1L-M60DR-D
100 to 240 VAC CP1L-M60DT-A
24 VDC
24 transistor (sinking) outputs
CP1L-M60DT-D
CP1L-M60DT1-D
40 points 100 to 240 VAC CP1L-M40DR-A
24 VDC
CP1L-M40DR-D
24 VDC
CP1L-M30DR-D
100 to 240 VAC CP1L-M30DT-A
24 VDC
CP1L-M30DT-D
CP1L-M30DT1-D
820 g max.
730 g max.
765 g max.
680 g max.
24 transistor (sourcing) outputs 675 g max.
24 DC inputs
100 to 240 VAC CP1L-M40DT-A
24 VDC
CP1L-M60DT-D
CP1L-M40DT1-D
30 points 100 to 240 VAC CP1L-M30DR-A
Weight
18 DC inputs
16 relay outputs
675 g max.
590 g max.
16 transistor (sinking) outputs
645 g max.
550 g max.
16 transistor (sourcing) outputs 550 g max.
12 relay outputs
610 g max.
12 transistor (sinking) outputs
525 g max.
590 g max.
495 g max.
12 transistor (sourcing) outputs 495 g max.
15
Section 1-2
System Configuration
Type
L
I/O
Power supply
Model
capacity
voltage
20 points 100 to 240 VAC CP1L-L20DR-A
Normal builtNormal built-in outputs
in inputs
12 DC inputs 8 relay outputs
380 g max.
24 VDC
CP1L-L20DR-D
100 to 240 VAC CP1L-L20DT-A
8 transistor (sinking) outputs
350 g max.
360 g max.
8 transistor (sourcing) outputs
335 g max.
335 g max.
24 VDC
CP1L-L20DT-D
CP1L-L20DT1-D
14 points 100 to 240 VAC CP1L-L14DR-A
24 VDC
CP1L-L14DR-D
8 DC inputs
100 to 240 VAC CP1L-L14DT-A
24 VDC
CP1L-L14DT-D
CP1L-L14DT1-D
10 points 100 to 240 VAC CP1L-L10DR-A
6 DC inputs
24 VDC
CP1L-L10DR-D
100 to 240 VAC CP1L-L10DT-A
24 VDC
J
CP1L-L10DT-D
CP1L-L10DT1-D
20 points 100 to 240 VAC CP1L-J20DR-A
24 VDC
CP1L-J20DR-D
CP1L-J20DT1-D
14 points 100 to 240 VAC CP1L-J14DR-A
24 VDC
Weight
6 relay outputs
380 g max.
350 g max.
6 transistor (sinking) outputs
360 g max.
335 g max.
6 transistor (sourcing) outputs
4 relay outputs
335 g max.
300 g max.
4 transistor (sinking) outputs
275 g max.
290 g max.
4 transistor (sourcing) outputs
270 g max.
270 g max.
12 DC inputs
8 relay outputs
380 g max.
350 g max.
8 DC inputs
8 transistor (sourcing) outputs
6 relay outputs
335 g max.
380 g max.
6 transistor (sourcing) outputs
350 g max.
335 g max.
CP1L-J14DR-D
CP1L-J14DT1-D
Optional Products
Item
Memory
Cassette
LCD Option
Board
Ethernet
Option
Board
Serial
Communications
Expansion
Model
Specifications
CP1W-ME05M Can be used to store user programs in
flash memory, parameters, DM initial
values, comment memory, FB programs, and data in RAM.
CP1W-DAM01 Can be used to monitor and change
user-specified messages, time or other
data of the PLC.
CP1W-CIF41
Weight
10 g max.
20 g max.
Can be used to communicate with these 20 g max.
units supported OMRON FINS/TCP,
FINS/UDP protocol.
When serial communications are required for a CP1L CPU Unit, an RS-232C
or RS-422A/485 Option Board can be added.
Two Option Boards can be mounted with a CPU Units with 30, 40 or 60 I/O
points and one Option Board can be mounted with a CPU Units with 20 or 14
I/O points.
This enables connection by serial communications to NS-series PTs, Bar
Code Readers, components such as Inverters, and computers without USB
ports (such as when using the CX-Programmer).
16
Section 1-2
System Configuration
NS-series PT, personal computer, bar code reader, etc.
CP1W-CIF01 RS-232C
Option Board
RS-232C
(Expansion)
CP1W-CIF11/CIF12
RS-422A/485C Option Board
RS-422A (Expansion)
Inverter, etc.
Option Boards for Serial Communications
Appearance
Name
Model
CP1W-CIF01
COMM
RS-232C
Option Board
One RS-232C port
(D-Sub, 9 pins,
female)
Port
RS-422A/485
Option Board
CP1W-CIF11/CIF12
COMM
One RS-422A/485
port (terminal block
for ferrules)
Serial communications modes
Host Link, NT Link (1: N or 1:1
Link Master, 1:1 Link Slave),
No-protocol, Serial PLC Link
Slave, Serial PLC Link Master,
Serial Gateway (conversion to
CompoWay/F, conversion to Modbus-RTU), peripheral bus
17
Section 1-2
System Configuration
1-2-2
System Expansion
CP-series Expansion Units or Expansion I/O Units can be connected to a
CP1L CPU Unit. Up to three Expansion Units or Expansion I/O Units can be
connected to a CPU Unit with 30, 40 or 60 I/O points and one Expansion Unit
or Expansion I/O Unit can be connected to a CPU Unit with 20 or 14 I/O
points. This allows for the expansion of various functions such as I/O points or
temperature sensor inputs.
CP1L CPU Unit with 30, 40 or 60 I/O Points
A maximum of three CP-series Expansion
I/O Units or Expansion Units can be added.
CP1L CPU Unit with 20 or 14 I/O Points
One CP-series Expansion I/O Unit or
Expansion Unit can be added.
CP1L CPU Unit with 10 I/O Points
No CP-series Expansion I/O Unit or
Expansion Unit can be added.
Using I/O Connecting Cable
When using CP-series Expansion Units and Expansion I/O Units, it is possible
to use CP1W-CN811 Connecting Cable to arrange the Units in upper and
lower rows.
• I/O Connecting Cable can be used in one place only, and not in multiple
places.
SYSMAC
CP1L
IN
L1
L2/N
COM
01
00
03
02
05
04
07
06
09
08
11
10
01
00
03
02
05
04
07
06
09
NC
11
10
08
NC
COM
NC
NC
01
03
00
05
02
04
07
09
06
08
11
10
01
00
CH
03
02
05
04
07
06
09
08
11
10
CH
CH
00
IN
01
02
03
04
05
06
07
08
09
10
11
07
08
09
10
11
CH
00
01
02
03
04
05
06
CH
OUT
CH
00
01
COM
02
COM
03
COM
04
COM
06
05
00
07
01
COM
03
02
04
COM
00
01
02
03
04
05
06
07
00
01
02
03
04
05
06
07
CH
06
05
40EDR
07
NC
NC
00
COM
01
COM
02
COM
04
03
05
07
COM
06
COM
EXP
CH
00
02
04
05
07
01
03
COM
06
OUT
NC
COM
NC
NC
NC
01
00
03
02
05
04
07
06
09
08
CH
11
10
01
00
03
02
05
04
07
06
09
08
NC
11
10
01
02
07
08
09
10
11
00
01
02
03
04
05
06
07
08
09
10
11
00
01
02
03
04
05
06
07
00
01
02
03
03
04
04
05
05
06
06
07
01
00
03
02
05
04
07
06
09
08
CH
00
IN
01
02
03
04
05
06
11
10
01
00
03
02
05
04
07
06
09
08
11
10
CH
07
08
09
10
11
07
08
09
10
11
CH
00
CH
01
02
03
04
05
06
CH
00
COM
01
COM
02
COM
OUT
40EDR
CH
NC
NC
18
COM
NC
CH
00
CH
CH
NC
NC
CH
CH
IN
OUT
04
03
05
COM
07
06
COM
CH
00
02
04
05
07
01
03
COM
06
CH
00
01
02
03
04
05
06
07
00
01
02
03
04
05
06
07
EXP
40EDR
CH
NC
NC
00
COM
01
COM
02
COM
04
03
05
COM
07
06
COM
CH
00
02
04
05
07
01
03
COM
06
EXP
Section 1-2
System Configuration
Maximum I/O Points
Up to three Expansion Units or Expansion I/O Units can be connected to a
CPU Unit with 30, 40 or 60 I/O points and one Expansion Unit or Expansion
I/O Unit can be connected to a CPU Unit with 20 or 14 I/O points. The maximum I/O capacity is thus achieved by connecting either one or three Expansion Units or Expansion I/O Units.
Type
M
I/O capacity
Model
Maximum number of
Expansion I/O Units or
Expansion Units
Maximum total I/O
points
CP1L-M60DR-A
CP1L-M60DR-D
CP1L-M60DT-A
CP1L-M60DT-D
CP1L-M60DT1-D
36
24
3 Units max.
Inputs: 24 × 3
Outputs: 16 × 3
Max.: 180 points
Inputs: 108 points
Outputs: 72 points
40 points
CP1L-M40DR-A
CP1L-M40DR-D
CP1L-M40DT-A
CP1L-M40DT-D
CP1L-M40DT1-D
CP1L-M30DR-A
CP1L-M30DR-D
CP1L-M30DT-A
CP1L-M30DT-D
CP1L-M30DT1-D
CP1L-L20DR-A
CP1L-L20DR-D
CP1L-L20DT-A
CP1L-L20DT-D
CP1L-L20DT1-D
CP1L-L14DR-A
CP1L-L14DR-D
CP1L-L14DT-A
CP1L-L14DT-D
CP1L-L14DT1-D
24
16
3 Units max.
Inputs: 24 × 3
Outputs: 16 × 3
Max.: 160 points
Inputs: 96 points
Outputs: 64 points
18
12
3 Units max.
Inputs: 24 × 3
Outputs: 16 × 3
Max.: 150 points
Inputs: 90 points
Outputs: 60 points
12
8
1 Unit max.
Inputs: 24
Outputs: 16
Max.: 60 points
Inputs: 36 points
Outputs: 24 points
8
6
1 Unit max.
Inputs: 24
Outputs: 16
Max.: 54 points
Inputs: 32 points
Outputs: 22 points
10 points
CP1L-L10DR-A
CP1L-L10DR-D
CP1L-L10DT-A
CP1L-L10DT-D
CP1L-L10DT1-D
6
4
0 Unit max.
Inputs: 0
Outputs: 0
Max.: 10 points
Inputs: 6 points
Outputs: 4 points
20 points
CP1L-J20DR-A
CP1L-J20DR-D
CP1L-J20DT1-D
12
8
1 Unit max.
Inputs: 24
Outputs: 16
Max.: 60 points
Inputs: 36 points
Outputs: 24 points
14 points
CP1L-J14DR-A
CP1L-J14DR-D
CP1L-J14DT1-D
8
6
1 Unit max.
Inputs: 24
Outputs: 16
Max.: 54 points
Inputs: 32 points
Outputs: 22 points
20 points
14 points
J
Built-in
outputs
60 points
30 points
L
Built-in
inputs
CP-series Expansion I/O Units
Appearance
Model
CP1W-40EDR
NC
COM
NC
NC
NC
01
03
00
05
02
04
07
06
09
08
11
10
01
00
CH
03
02
05
04
07
06
09
08
CP1W-40EDT
CP1W-40EDT1
11
10
CH
CH
00
IN
07
08
09
10
11
00
01
02
03
04
05
06
07
08
09
10
11
00
01
01
02
02
03
03
04
04
05
05
06
06
07
04
05
06
07
CH
CH
OUT
CH
00
01
02
03
CH
NC
NC
00
COM
01
COM
02
04
COM
03
05
COM
07
06
COM
CH
00
02
04
05
07
01
03
COM
06
EXP
CP1W-32ER
CP1W-32ET
CP1W-32ET1
CP1W-20EDR1
COM
NC
01
00
03
02
05
04
07
06
09
08
CP1W-20EDT
CP1W-20EDT1
11
10
CH
IN
CH 00 01 02 03 04 05 06 07
08 09 10 11
OUT
CH
00 01 02 03 04 05 06 07
CH
NC
00
01
02
04
05
07
NC
COM COM COM
03
COM
06
EXP
CP1W-16ER
CP1W-16ET
CP1W-16ET1
Normal
inputs
24 VDC:
24 inputs
None
24 VDC:
12 inputs
None
Normal outputs
16 relay outputs
Weight
380 g max.
16 transistor outputs (sinking) 320 g max.
16 transistor outputs (sourcing)
32 relay outputs
465 g max.
32 transistor outputs (sinking) 325 g max.
32 transistor outputs (sourcing)
8 relay outputs
300 g max.
8 transistor outputs (sinking)
8 transistor outputs (sourcing)
16 relay outputs
280 g max.
16 transistor outputs (sinking) 225 g max.
16 transistor outputs (sourcing)
19
Section 1-2
System Configuration
Appearance
Model
CP1W-8ED
COM
03
01
00
Normal
inputs
24 VDC:
8 inputs
Normal outputs
None
Weight
200 g max.
02
IN
CP1W-8ER
CP1W-8ET
CH 00 01 02 03
08 09 10 11
EXP
06
04
COM
05
07
None
CP1W-8ET1
8 relay outputs
250 g max.
8 transistor outputs (sinking)
8 transistor outputs (sinking)
CP-series Expansion Units
Name and
Model
appearance
Analog I/O Units CP1W-MAD11
NC
NC
CP1W-MAD42
Specifications
2 analog
inputs
0 to 5 V/1 to 5 V/0 to Resolu150 g max.
10 V/−10 to +10 V/0 tion: 6,000
to 20 mA/4 to 20 mA
1 analog
output
1 to 5 V/0 to 10 V/
−10 to +10 V/0 to
20 mA/4 to 20 mA
0 to 5 V/1 to 5 V/0 to Resolu10 V/−10 to +10 V/0 tion:
to 20 mA/4 to 20 mA 12,000
1 to 5 V/0 to 10 V/
−10 to +10 V/0 to
20 mA/4 to 20 mA
0 to 5 V/1 to 5 V/0 to
10 V/−10 to +10 V/0
to 20 mA/4 to 20 mA
4 analog
inputs
2 analog
outputs
CP1W-MAD44
4 analog
inputs
4 analog
outputs
Analog Input
Units
IN
CP1W-AD042
4 analog
inputs
0 to 5 V/1 to 5 V/0 to Resolu10 V/−10 to +10 V/0 tion:
to 20 mA/4 to 20 mA 12,000
CP1W-DA021
2 analog
outputs
4 analog
outputs
1 to 5 V/0 to 10 V/
−10 to +10 V/0 to
20 mA/4 to 20 mA
Resolu200 g max.
tion: 6,000
CP1W-DA042
4 analog
outputs
Resolution:
12,000
CP1W-TS001
2 inputs
CP1W-TS002
CP1W-TS003
4 inputs
4 inputs
1 to 5 V/0 to 10 V/
−10 to +10 V/0 to
20 mA/4 to 20 mA
Thermocouple input
K, J
CP1W-TS004
12 inputs
CH
CH
I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 AG
VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC
Temperature
Sensor Units
CompoBus/S
I/O Link Unit
S
No.
COMM
ERR
SRT21
EXP
BD H
NC(BS+)
BD L NC(BS-) NC
20
1 to 5 V/0 to 10 V/
−10 to +10 V/0 to
20 mA/4 to 20 mA
0 to 5 V/1 to 5 V/0 to Resolu200 g max.
10 V/−10 to +10 V/0 tion: 6,000
to 20 mA/4 to 20 mA
4 analog
inputs
CP1W-DA041
OUT
260 g max.
CP1W-AD041
I IN1 VIN2 COM2 I IN3 VIN4 COM4 AG
VIN1 COM1 I IN2 VIN3 COM3 I IN4
NC
Analog Output
Units
Weight
Thermocouple input ResoluK or J, 4 inputs
tion:
or 2 analog inputs
12,000
0 to 10V/1 to 5V/4 to
20mA
250 g max.
225 g max.
Thermocouple input
380 g max.
K, J
Platinum resistance thermometer 250 g max.
input
Pt100, JPt100
CP1W-TS101
2 inputs
CP1W-TS102
4 inputs
CP1W-SRT21
As a CompoBus/S slave, 8 inputs and 8 outputs are allocated.
200 g max.
Section 1-2
System Configuration
1-2-3
Restrictions on System Configuration
The following restrictions apply to the CP-series Expansion Units and CPseries Expansion I/O Units that can be connected to CP1L CPU Units.
■
Number of Expansion Units and Expansion I/O Units Connected
A maximum of three Units can be connected to a CPU Unit with 30, 40 or 60
I/O points and one Unit can be connected to a CPU Unit with 20 or 14 I/O
points.
Each CPU Unit can connect one device to pin 6 (+5 V power supply) of the
CP1W-CIF01 RS232C Option Board.
If two CP1W-CIF01 Option Boards are mounted on a CPU Unit with 30, 40 or
60 IO points and both of which use pin 6 (+5 V power supply), a total of up to
two Expansion Units can be connected to the CPU Unit.
■
Mounting Restriction
When connecting CP-series Expansion Units or Expansion I/O Units to a
CPU Unit with AC power, provide a space of approximately 10 mm between
the CPU Unit and the first Expansion Unit or Expansion I/O Unit.
Expansion I/O Units or Expansion Units
CP1L CPU Unit
10 mm
If sufficient space cannot be provided between the CPU Unit and the first
Expansion Unit or Expansion I/O Unit, use the PLC in an ambient temperature
of 0 to 50°C.
■
Restrictions in the External Power Supply Capacity
The following restrictions apply when using the external power supply from a
CPU Unit with AC power.
CPU Units with 30, 40 or 60 I/O Points and AC Power ([email protected]@DR-A
and [email protected]@[email protected])
When CP-series Expansion Units or Expansion I/O Units are connected to a
CPU Unit with 30, 40 or 60 I/O Points and AC Power ([email protected]@DR-A and
[email protected]@DT-A), it may not be possible to use the entire 300 mA from the
external power supply due to restrictions in the power supply capacity. The
entire 300 mA from the external power supply can be used if Expansion Units
and Expansion I/O Units are not connected.
21
Section 1-2
System Configuration
Calculation Examples of Restrictions in External Power Supply Capacity
Calculate the external power supply capacity using the following calculation
example.
Item
CPU Unit
Expansion Unit
2nd Unit
3rd Unit
5V
CP1L-M40DR-A CP1W-DA041
0.22 A
0.08 A
CP1W-DA041
0.08 A
CP1W-DA041
0.08 A
24 V
Power consumption
0.08 A
0.124 A
5 V × 0.46 A = 2.3 W
24 V × 0.452 A = 10.848 W
0.124 A
0.124 A
1st Unit
Total
Restriction
0.46 A
0.452 A
13.148 W
≤ 18.5 W
Applicable
0.223 A
18.5 W (total external power supply capacity) − 13.148 W = 5.352 W
external power 5.352 W/24V = 0.223 A
supply capacity Note If the results exceeds 0.3 A, reduce the current consumption to 0.3 A or less.
≤ 0.3 A
CPU Units with 14 or 20 I/O Points and AC Power ([email protected]@DR-A and
[email protected]@[email protected])
When CP-series Expansion Units or Expansion I/O Units are connected to a
CPU Unit with 14 or 20 I/O Points and AC Power ([email protected]@DR-A and [email protected]@DT-A), the external power supply cannot be used. If no Expansion Units
or Expansion I/O Units are connected, up to 200 mA can be used.
CPU Units with DC Power
CPU Units with DC power do not have an external power supply.
■
Restrictions on the number of simultaneously ON output points
CP1W-32ER/32ET/32ET1’s maximum number of simultaneously ON points is
24 (75%).
■
Restrictions Imposed by Ambient Temperature
There are restrictions in the power supply voltage and output load current
imposed by the ambient temperature for CPU Units with DC power. Use the
CPU Unit within the following ranges of power supply voltage and output load
current.
CPU Units with Relay Outputs ([email protected]@@DR-D)
Relay Output Load Current Derating Curves for CPU Units and Expansion I/O
Units
CP1L-L14DR-D
CP1L-L20DR-D
CP1L-J14DR-D
CP1L-J20DR-D
CP1L-M30DR-D
100%
Power voltage:
21.6 VDC
50%
Power voltage:
20.4 VDC
22
50%
0%
35
45
55°C
Ambient temperature
Power
voltage:
21.6 VDC
Power
voltage:
20.4 VDC
Power voltage:
20.4 VDC
50%
Note
100%
Power voltage:
21.6 VDC
100%
0%
CP1L-M40DR-D
CP1L-M60DR-D
0%
35
45 50 55°C
Ambient temperature
40 45
55°C
Ambient temperature
The above restrictions, apply to the relay output load current from the CPU
Unit even if Expansion I/O Units are not connected.
Section 1-3
Connecting the CX-Programmer
Using CP1W-8ER/16ER/20EDR1/32ER/40EDR Expansion I/O Units with
CPU Units with Transistor Outputs ([email protected]@@[email protected])
Relay Output Load Current Derating Curves for Expansion I/O Units
Expansion I/O Units added Expansion I/O Units added
to the
to the
CP[email protected] or
[email protected]
[email protected]
[email protected] or
100%
[email protected]
100%
Power voltage:
21.6 VDC
Power voltage:
21.6 VDC
100%
Power voltage:
20.4 VDC
Power voltage:
20.4 VDC
50%
Power voltage:
20.4 VDC
0%
50%
50%
Power voltage:
21.6 VDC
Note
Expansion I/O Units added
to the
[email protected] or
[email protected]
0%
55°C
35
45
Ambient temperature
0%
55°C
35
45
Ambient temperature
55°C
40 45
Ambient temperature
There are no restrictions on the transistor output load current from the CPU
Unit.
CPU Units with AC Power
There are no restrictions on the output load current from CPU Units with AC
power.
1-3
Connecting the CX-Programmer
The CX-Programmer (version 7.3 or higher), which runs on Windows, can be
used with CP-series CP1L L model PLCs with 10 I/O points. The CX-Programmer (Version 7.22 or higher), which runs on Windows, can be used in
CP-series CP1L J model PLCs. The CX-Programmer (version 7.1 or higher),
which runs on Windows, can be used with CP-series CP1L L or M model
PLCs with 14, 20, 30, 40 or 60 I/O points. Computers running Support Software (e.g., the CX-Programmer) can be connected to the USB port or to a
serial port.
Note
1-3-1
A Programming Console cannot be used with CP1L PLCs.
Connecting with a Commercially Available USB Cable
Connect the computer running the CX-One Support Software (e.g., the CXProgrammer) using a commercially available USB cable to the peripheral USB
port on the CPU Unit.
Personal computer
CX-One (CX-Programmer, etc.)
USB port
USB cable
Peripheral
USB port
23
Section 1-3
Connecting the CX-Programmer
Restrictions when
Connecting by USB
In conformity with USB specifications, the following restrictions apply when
connecting a computer running Support Software.
• A USB connection is possible for only one CP-series PLC from a single
computer. It is not possible to connect multiple PLCs simultaneously.
• Do not disconnect the USB cable while the Support Software is connected online. Before disconnecting the USB cable, be sure to place the
application in offline status. If the USB cable is disconnected while online,
the situations described below will occur as a result of OS error.
• Windows Me, 2000, or XP:
The Support Software cannot be returned to online status by simply reconnecting the USB cable. First return the Support Software to offline
status, and then reconnect the USB cable. Then perform the online
connection procedure for the Support Software.
• Windows 98:
If the USB cable is disconnected while online, an error message may
be displayed on a blue screen. If that occurs, it will be necessary to reboot the computer.
The peripheral USB port (conforming to USB 1.1, B connector) is a dedicated
port for connecting Support Software, such as the CX-Programmer.
Items Required for USB Connection
Installing the USB Driver
Operating system
Windows 98, Me, 2000, or XP
Support Software
USB driver
CX-Programmer Ver. 6.1 (CX-One Ver. 1.1)
Included with above Support Software.
USB cable
USB 1.1(or 2.0) cable (A connector-B connector), 5 m max.
The procedure for first connecting a computer to the CP1L peripheral USB
port is described below.
It is assumed that the Support Software has already been installed in the
computer.
Windows XP
Turn ON the power supply to the CP1L, and connect USB cable between the
USB port of the computer and the peripheral USB port of the CP1L.
After the cable has been connected, the computer will automatically recognize
the device and the following message will be displayed.
24
Connecting the CX-Programmer
1,2,3...
Section 1-3
1. If the following window appears, select the No, not this time Option and
then click the Next Button. This window is not always displayed.
2. The following window will be displayed. Select the Install from a list of specific location Option and then click the Next Button.
25
Connecting the CX-Programmer
Section 1-3
3. The following window will be displayed. Click the Browse Button for the Include this location in the search Field, specify C:\Program Files\
OMRON\CX-Server\USB\win2000_XP\Inf, and then click the Next Button.
The driver will be installed. (“C:\” indicates the installation drive and may
be different on your computer.)
4. Ignore the following window if it is displayed and click the Continue Anyway Button.
26
Connecting the CX-Programmer
Section 1-3
5. The following window will be displayed if the installation is completed normally. Click the Finish Button.
Windows 2000
Turn ON the power supply to the CP1L, and connect USB cable between the
USB port of the computer and the peripheral USB port of the CP1L.
After the cable has been connected, the computer will automatically recognize
the device and the following message will be displayed.
1,2,3...
1. The following message will be displayed. Click the Next Button.
27
Connecting the CX-Programmer
Section 1-3
2. The following window will be displayed.
3. Select the Search for a suitable driver for the device (recommended) Option and then click the Next Button. The following window will be displayed.
From the list in the window, select the Specify location Checkbox and then
click the Next Button.
4. Click the Browse Button, specify C:\Program Files\OMRON\CX-Server\USB\win2000_XP\Inf, and then click the Next Button. (“C:\” indicates
the installation drive and may be different on your computer.)
28
Connecting the CX-Programmer
Section 1-3
5. A search will be made for the driver and the following window will be displayed. Click the Next Button. The driver will be installed.
6. After the driver has been successfully installed, the following window will
be displayed. Click the Finish Button.
Connection Setup Using the CX-Programmer
1,2,3...
1. Select CP1L as the device type in the Change PLC Dialog Box and confirm
that USB is displayed in the Network Type Field.
29
Connecting the CX-Programmer
Section 1-3
2. Click the OK Button to finish setting the PLC model. Then connect to the
CP1L by executing the CX-Programmer's online connection command.
Checking after Installation
1,2,3...
1. Display the Device Manager at the computer.
2. Click USB (Universal Serial Bus) Controller, and confirm that OMRON
SYSMAC PLC Device is displayed.
Re-installing the USB
Driver
If the USB driver installation fails for some reason or is cancelled in progress,
the USB driver must be reinstalled.
Checking USB Driver Status
1,2,3...
1. Display the Device Manager on the computer.
2. If USB Device is displayed for Other devices, it means that the USB driver
installation has failed.
30
Section 1-3
Connecting the CX-Programmer
Reinstalling the USB Driver
1,2,3...
1. Right-click USB Device and select Delete from the pop-up menu to delete
the driver.
2. Reconnect the USB cable. The USB Driver Installation Window will be displayed.
3. Reinstall the USB driver.
1-3-2
Connecting to a Serial Port
Mounting a CP1W-CIF01 RS-232C Option Board in a CP1L Option Board slot
makes it possible to connect Support Software with serial communications,
just as with previous models.
Personal computer
CX-One (e.g., CX-Programmer)
D-Sub connector
(9-pin, female)
Recommended cable
XW2Z-200S-CV (2 m) or
XW2Z-500S-CV (5 m)
D-Sub connector
(9-pin, male)
CP1W-CIF01
RS-232C Option Board
Connect the CX-Programmer to the RS-232C port of the CP1W-CIF01 Option
Board by XW2Z-200S-CV/500S-CV RS-232C cable.
Connection Method
Model
Computer
Connector
IBM PC/AT or D-Sub 9 pin,
compatible
male
Connect the Programming Device using the Connecting Cable that is appropriate for the serial communications mode of the computer and CPU Unit.
Connecting Cable
Model
Length
XW2Z-200S-CV
2m
XW2Z-500S-CV
5m
CP1L CPU Unit
Connector
Serial
communications
mode
D-Sub 9 pin, female
Peripheral bus or Host
(With a CP1W-CIF01 RS- Link (SYSWAY)
232C Option Board
mounted in Option Board
Slot 1 or 2.)
31
Section 1-3
Connecting the CX-Programmer
Serial Communications Mode
Serial
communications
mode
Note
32
Features
CPU Unit setting method
Peripheral bus
(toolbus)
This is the faster mode, so it is
generally used for CX-Programmer connections.
• Only 1: 1 connections are
possible.
• When a CP1L CPU Unit is
used, the baud rate is automatically detected by the Support Software.
Turn ON pins SW4 (Serial Port
1) and SW5 (Serial Port 2) on
the DIP switch on the front
panel of the CPU Unit. These
settings enable connection by
peripheral bus regardless of the
serial port settings in the PLC
Setup.
Host Link
(SYSWAY)
A standard protocol for host
computers with either 1: 1 or 1:
N connections.
• Slower than the peripheral
bus mode.
• Allows modem or optical
adapter connections, or longdistance or 1: N connections
using RS-422A/485.
Turn OFF pins SW4 (Serial Port
1) and SW5 (Serial Port 2) on
the DIP switch on the front
panel of the CPU Unit.
The mode will then be determined by the serial port settings in the PLC Setup. The
default settings are for Host
Link with a baud rate of 9,600
bits/s, 1 start bit, data length of
7 bits, even parity, and 2 stop
bits.
When a Serial Communications Option Board is mounted in Option Board
Slot 1, it is called “Serial Port 1.” When mounted in Option Board Slot 2, it is
called “Serial Port 2.”
Section 1-4
Function Charts
1-4
Function Charts
Built-in input functions
Built-in I/O functions
Normal inputs
Selected in PLC Setup.
Interrupt inputs
Interrupt inputs (Direct mode)
Interrupt inputs (Counter mode)
High-speed counter inputs
No interrupts
High-speed counter interrupts
Quick-response inputs
Built-in output functions
• Target value comparison interrupts
• Range comparison interrupts
Normal outputs
Selected by instructions.
Pulse outputs
Variable duty ratio pulse outputs
(PWM outputs)
Origin functions
Origin search
Origin return
Execute the ORG instruction to move from any position to the origin.
Inverter positioning functions
Analog setting functions
1 input
• Set value: 0 to 255
External analog setting
input
1 input, 0 to 10 V
• Resolution: 256
User memory, parameters (such as PLC Setup), DM initial
values, comment memory, etc., can be saved in the CPU
Unit's built-in flash memory.
No-battery operation
Memory Cassette
Analog adjustment
Data saved in the CPU Unit's built-in flash memory can be saved to a
Memory Cassette (purchased separately) and transferred automatically
from the Memory Cassette when the power supply is turned ON.
Memory Cassette cannot be used in CP1L-J CPU Unit.
Clock
Functions using Option Boards
Functions using CPseries Expansion Units
Serial
communications
Analog I/O functions
Temperature sensor
input functions
CompoBus/S Slave
function
CompoBus/S I/O Link Unit
• Data exchanged with Master Unit: 8 inputs and 8 outputs
33
Section 1-5
Function Blocks
1-5
Function Blocks
Function blocks can be used in programming SYSMAC CP-series PLCs.
Note
1-5-1
Function blocks cannot be used in CP1L-J PLCs.
Overview of Function Blocks
A function block is a basic program element containing a standard processing
function that has been defined in advance. Once the function block has been
defined, the user just has to insert the function block in the program and set
the I/O in order to use the function.
As a standard processing function, a function block is not created with actual
physical addresses, but local variables. The user sets parameters (addresses
or values) in those variables to use the function block. The addresses used for
the variables themselves are automatically assigned by the system (CX-Programmer) each time they are placed in the program.
In particular, each function block is saved by the CX-Programmer as an individual file that can be reused with programs for other PLCs. This makes it possible to create a library of standard processing functions.
Program 2
Standard program
section written
with variables
aa
Copy of function block A
Function block A
Program 1
cc
Copy of function block A
Variable
Output
bb
MOV
#0000
Input
Variable
Variable
Output
dd
Define in advance.
Insert in program.
Setting
Setting
Copy of function block A
Save function
block as file.
Library
Function
block A
Input
Variable
Variable
Output
To another PLC program
Reuse
1-5-2
Advantages of Function Blocks
Function blocks allow complex programming units to be reused easily. Once
standard program sections have been created as function blocks and saved in
files, they can be reused just by placing a function block in a program and setting the parameters for the function block's I/O. Reusing standardized function
blocks reduces the time required for programming/debugging, reduces coding
errors, and makes programs easier to understand.
Structured
Programming
34
Structured programs created with function blocks have better design quality
and required less development time.
Section 1-5
Function Blocks
Easy-to-read “Block Box”
Design
The I/O operands are displayed as local variable names in the program, so
the program is like a “black box” when entering or reading the program and no
extra time is wasted trying to understand the internal algorithm.
Different Processes Easily
Created from a Single
Function Block
Many different processes can be created easily from a single function block by
using input variables for the parameters (such as timer SVs, control constants, speed settings, and travel distances) in the standard process.
Reduced Coding Errors
Coding mistakes can be reduced, because blocks that have already been
debugged can be reused.
Data Protection
The local variables in the function block cannot be accessed directly from the
outside, so the data can be protected. (Data cannot be changed unintentionally.)
Improved Reusability
through Programming
with Variables
The function block's I/O is entered as local variables, so the data addresses in
the function block do not have to be changed as they do when copying and
reusing a program section.
Creating Libraries
Processes that are independent and reusable (such as processes for individual steps, machinery, equipment, or control systems) can be saved as function block definitions and converted to library functions.
The function blocks are created with local variable names that are not tied to
physical addresses, so new programs can be developed easily just by reading
the definitions from the file and placing them in a new program.
Nesting Multiple
Languages
Mathematical expressions can be entered in structured text (ST) language.
Nesting function blocks is supported for CX-Programmer Ver. 6.0 or higher.
For example, it is possible to express only special operations in ST language
within a function block in a ladder diagram.
Function block (ladder language)
Call (Nesting)
Function block (ST language)
For details on using function blocks, refer to the CX-Programmer Ver. 7.0
Operation Manual: Function Blocks (Cat. No. W447).
35
SECTION 2
Nomenclature and Specifications
This section describes the names and functions of CP1L parts and provides CP1L specifications.
2-1
2-2
2-3
2-4
2-5
2-6
2-7
Part Names and Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-1-1 CP1L CPU Units. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-1-2 CP1W-CIF01 RS-232C Option Boards . . . . . . . . . . . . . . . . . . . . . .
2-1-3 CP1W-CIF11/CIF12 RS-422A/485 Option Boards . . . . . . . . . . . . .
Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-2-1 CP1L CPU Units. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-2-2 I/O Memory Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-2-3 I/O Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-2-4 CP-series Expansion I/O Unit I/O Specifications. . . . . . . . . . . . . . .
CP1L CPU Unit Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-3-1 Overview of CPU Unit Configuration . . . . . . . . . . . . . . . . . . . . . . .
2-3-2 Flash Memory Data Transfers . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-3-3 Memory Cassette Data Transfers . . . . . . . . . . . . . . . . . . . . . . . . . . .
CPU Unit Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-4-1 General Flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-4-2 I/O Refreshing and Peripheral Servicing . . . . . . . . . . . . . . . . . . . . .
2-4-3 I/O Refresh Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-4-4 Initialization at Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CPU Unit Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-5-1 Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-5-2 Status and Operations in Each Operating Mode. . . . . . . . . . . . . . . .
2-5-3 Operating Mode Changes and I/O Memory . . . . . . . . . . . . . . . . . . .
2-5-4 Startup Mode Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Power OFF Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-6-1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-6-2 Instruction Execution for Power Interruptions . . . . . . . . . . . . . . . . .
Computing the Cycle Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-7-1 CPU Unit Operation Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-7-2 Cycle Time Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-7-3 Functions Related to the Cycle Time . . . . . . . . . . . . . . . . . . . . . . . .
2-7-4 I/O Refresh Times for PLC Units . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-7-5 Cycle Time Calculation Example . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-7-6 Online Editing Cycle Time Extension . . . . . . . . . . . . . . . . . . . . . . .
2-7-7 I/O Response Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-7-8 Interrupt Response Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-7-9 Serial PLC Link Response Performance . . . . . . . . . . . . . . . . . . . . .
2-7-10 Pulse Output Start Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-7-11 Pulse Output Change Response Time. . . . . . . . . . . . . . . . . . . . . . . .
38
38
41
42
43
43
50
51
69
73
73
77
79
81
81
82
83
84
85
85
86
86
87
88
88
89
90
90
91
92
94
94
95
96
97
99
99
100
37
Section 2-1
Part Names and Functions
2-1
Part Names and Functions
2-1-1
CP1L CPU Units
Front
(8) Power supply, ground,
(10) Input indicators
and input terminal block
(1) Battery cover
Back
(9) Option Board slots
1 (left) and 2 (right)
(2) Operation indicators
(3) Peripheral USB port
(4) Analog adjuster
(5) External analog settings
input connector
(6) DIP switch
(7) Memory
Cassette slot
(11) Expansion I/O
(13) External power supply,
Unit connector
and output terminal
block
(12) Output indicators
(1) Battery Cover
Covers the location where the battery is stored.
(2) Operation Indicators
Show CP1L operation status.
POWER
POWER
(Green)
Lit
Not lit
Power is ON.
Power is OFF.
RUN
(Green)
Lit
RUN
The CP1L is executing a program in either RUN or
MONITOR mode.
Not lit
Operation is stopped in PROGRAM mode or due to
a fatal error.
A fatal error (including FALS execution) or a hardware error (WDT error) has occurred. CP1L operation will stop and all outputs will be turned OFF.
ERR/ALM
INH
ERR/ALM
(Red)
Lit
Flashing
PRPHL
Not lit
BKUP
INH
(Yellow)
PRPHL
(Yellow)
Lit
The Output OFF Bit (A500.15) has turned ON. All
outputs will be turned OFF.
Not lit
Flashing
Operation is normal.
Communications (either sending or receiving) are in
progress through the peripheral USB port.
Other than the above.
Not lit
BKUP
(Yellow)
A non-fatal error has occurred (including FAL execution). CP1L operation will continue.
Operation is normal.
Lit
A user program, parameters, or Data Memory is
being written or accessed in the built-in flash memory (backup memory).
A user program, parameters, Data Memory, DM initial values, or comment memory is being written or
accessed in a Memory Cassette.
The BKUP indicator also lights while user programs,
parameters, and Data Memory are being restored
when the PLC power supply is turned ON.
Note Do not turn OFF the PLC power supply while
this indicator is lit.
Not lit
38
Other than the above.
Section 2-1
Part Names and Functions
(3) Peripheral USB Port
Used for connecting to a personal computer for programming and monitoring by the CX-Programmer.
(4) Analog Adjuster
By turning the analog adjuster, it is possible to adjust the value of A642
within a range of 0 to 255. (Refer to 6-4 Analog Adjuster and External
Analog Setting Input.)
(5) External Analog Setting Input Connector
By applying 0 to 10 V of external voltage, it is possible to adjust the value
of A643 within a range of 0 to 256. This input is not isolated. (Refer to 64 Analog Adjuster and External Analog Setting Input.)
(6) DIP Switch
CPU Units with 30, 40 or 60 I/O Points
ON
1
2
No.
SW1
Setting
ON
3
4
OFF
5
SW2
ON
6
OFF
SW3
ON
OFF
SW4
ON
OFF
SW5
ON
OFF
SW6
Note
OFF
Description
User memory writeprotected (See note.)
User memory not
write-protected.
Data automatically
transferred from
Memory Cassette at
startup.
Application
Used to prevent programs from being inadvertently overwritten.
Used to enable programs, Data Memory, or
parameters saved on a
Memory Cassette to be
Data not transferred. opened by the CPU Unit
at startup.
A395.12 ON
This pin enables controlling a bit in memory withA395.12 OFF
out using an input relay.
Used for peripheral
Used to enable a Serial
bus.
Communications Option
Board mounted in Option
According to PLC
Board Slot 1 to be used
Setup.
by the peripheral bus.
Used for peripheral
Used to enable a Serial
bus.
Communications Option
Board mounted in Option
According to PLC
Board Slot 2 to be used
Setup.
by the peripheral bus.
Keep turned OFF.
---
Default
OFF
OFF
OFF
OFF
OFF
OFF
The following data will be write-protected if pin SW1 is turned ON:
• The entire user program (all tasks)
• All data in parameter areas (such as the PLC Setup)
When SW1 is turned ON, the user program and the data in the parameter areas will not be cleared even if the All Clear operation is
performed from a Peripheral Device (i.e., the CX-Programmer).
CPU Units with 10,14 or 20 I/O Points
ON
1
2
No.
SW1
Setting
ON
3
OFF
4
Description
Application
User memory write- Used to prevent proprotected (See note.) grams from being inadvertently overwritten.
User memory not
write-protected.
Default
OFF
39
Section 2-1
Part Names and Functions
No.
SW2
Setting
ON
OFF
SW3
ON
OFF
SW4
ON
OFF
Note
Description
Data automatically
transferred from
Memory Cassette at
startup.
Application
Default
Used to enable proOFF
grams, Data Memory, or
parameters saved on a
Memory Cassette to be
Data not transferred. opened by the CPU Unit
at startup.
Memory Cassette cannot
be used in CP1L-J CPU
Unit.
A395.12 ON
This pin enables control- OFF
ling a bit in memory withA395.12 OFF
out using an input relay.
Used for peripheral
Used to enable a Serial
OFF
bus.
Communications Option
Board mounted in Option
According to PLC
Board Slot 1 to be used
Setup.
by the peripheral bus.
This SW should be
always OFF for CPU
Units with 10 I/O points,
because there is no
option slot in CPU Units
with 10 I/O points.
The following data will be write-protected if pin SW1 is turned ON:
• The entire user program (all tasks)
• All data in parameter areas (such as the PLC Setup)
When SW1 is turned ON, the user program and the data in the parameter areas will not be cleared even if the All Clear operation is
performed from a Peripheral Device (i.e., the CX-Programmer).
(7) Memory Cassette Slot
Used for mounting a CP1W-ME05M Memory Cassette. When mounting
a Memory Cassette, remove the dummy cassette.
Data, such as CP1L CPU Unit programs, parameters, and data memory,
can be transferred to the Memory Cassette to be saved.
Note
Memory Cassette cannot be used in CP1L-J CPU Unit.
(8) Power Supply, Ground, and Input Terminal Block
Power supply terminals
Used to provide a 100- to 240-VAC or 24-VDC power
supply.
Ground terminals
Functional ground (
):
Connect this ground to strengthen noise immunity and to
prevent electric shock.
(AC power supply models only.)
Input terminals
Protective ground ( ):
To prevent electric shock, ground to 100 Ω or less.
Used to connect input devices.
(9) Option Board Slots
The following Option Boards can be mounted in either slot 1 (left) or slot
2 (right).
• CP1W-CIF01 RS-232C Option Board
• CP1W-CIF11/CIF12 RS-422A/485 Option Board
• CP1W-DAM01 LCD Option Board
• CP1W-CIF41 Ethernet Option Board
40
Section 2-1
Part Names and Functions
!Caution Always turn OFF the power supply to the PLC before mounting or removing
an Option Board.
(10) Input Indicators
The input indicators light when input terminal contacts turn ON.
(11) Expansion I/O Unit Connector
CP-series Expansion I/O Units and Expansion Units (Analog I/O Units,
Temperature Sensor Units, CompoBus/S I/O Link Units, or DeviceNet I/O
Link Units) can be connected. Up to three Expansion Units or Expansion
I/O Units can be connected to a CPU Unit with 30, 40 or 60 I/O points
and one Expansion Unit or Expansion I/O Unit can be connected to a
CPU Unit with 20 or 14 I/O points. (For details on using Expansion Units
and Expansion I/O Units, refer to SECTION 7 Using Expansion Units and
Expansion I/O Units.)
(12) Output Indicators
The output indicators light when output terminal contacts turn ON.
(13) External Power Supply and Output Terminal Block
2-1-2
External power
supply terminals
CPU Units with AC power supply specifications have
external 24-VDC, 300-mA, power supply terminals.
(except for the [email protected], which has a 200-mA
power supply terminals). They can be used as service
power supplies for input devices.
Output terminals
Used for connecting output devices.
CP1W-CIF01 RS-232C Option Boards
An RS-232C Option Board can be mounted to an Option Board slot on the
CPU Unit. With a CPU Unit with 30, 40 or 60 I/O points, either Option Board
slot may be used.
When mounting an Option Board, first remove the slot cover. Grasp both of
the cover's up/down lock levers at the same time to unlock the cover, and then
pull the cover out.
Then to mount the Option Board, check the alignment and firmly press it in
until it snaps into place.
!Caution Always turn OFF the power supply to the PLC before mounting or removing
an Option Board.
Front
Back
(1) Communications Status Indicator
(3) CPU Unit Connector
COMM
(2) RS-232 Connector
41
Section 2-1
Part Names and Functions
RS-232C Connector
5
1
6
9
1
Pin
FG
Abbr.
Signal name
Frame Ground
Signal direction
---
2
3
SD (TXD)
RD (RXD)
Send Data
Receive Data
Output
Input
4
5
RS (RTS)
CS (CTS)
Request to Send
Clear to Send
Output
Input
6
7
5V
DR (DSR)
Power Supply
Data Set Retry
--Input
8
9
ER (DTR)
SG (0V)
Equipment Ready
Signal Ground
Output
---
Frame Ground
---
Connector hood FG
2-1-3
CP1W-CIF11/CIF12 RS-422A/485 Option Boards
An RS-422A/485 Option Board can be mounted to an Option Board slot on
the CPU Unit. With a CPU Unit with 30, 40 or 60 I/O points, either Option
Board slot may be used.
When mounting an Option Board, first remove the slot cover. Grasp both of
the cover's up/down lock levers at the same time to unlock the cover, and then
pull the cover out.
Then to mount the Option Board, check the alignment and firmly press it in
until it snaps into place.
!Caution Always turn OFF the power supply to the PLC before mounting or removing
an Option Board.
Front
Back
(1) Communications Status Indicator
(3) CPU Unit Connector
COMM
(4) DIP Switch for
Operation Settings
RDA− RDB+ SDA− SDB+ FG
(2) RS-422A/485 Connector
RS-422A/485 Terminal Block
Tighten the terminal block screws to
a torque of 0.28 N·m (2.5 Lb In.).
FG
RDA−
RDB+
42
SDA− SDB+
Section 2-2
Specifications
6
5
4
3
2
1
O
N
DIP Switch for Operation Settings
Pin
Settings
1
ON
OFF
ON (both ends)
OFF
Terminating resistance selection
Resistance value: 220Ω typical
2
ON
OFF
2-wire
4-wire
2-wire or 4-wire selection (See
note 1.)
3
ON
OFF
2-wire
4-wire
2-wire or 4-wire selection (See
note 1.)
4
5
--ON
--RS control enabled
OFF
RS control disabled (Data
always received.)
Not used.
RS control selection for RD (See
note 2.)
ON
OFF
RS control enabled
RS control disabled (Data
always sent.)
6
Note
RS control selection for SD (See
note 3.)
(1) Set both pins 2 and 3 to either ON (2-wire) or OFF (4-wire).
(2) To disable the echo-back function, set pin 5 to ON (RS control enabled).
(3) When connecting to a device on the N side in a 1: N connection with the
4-wire method, set pin 6 to ON (RS control enabled).
Also, when connecting by the 2-wire method, set pin 6 to ON (RS control
enabled).
2-2
Specifications
2-2-1
CP1L CPU Units
General Specifications
Power supply
Model
numbers
AC power supply
DC power supply
60 I/O points
CP1L-M60DR-A,
CP1L-M60DT-A
CP1L-M60DR-D, CP1L-M60DT-D, or
CP1L-M60DT1-D
40 I/O points
CP1L-M40DR-A,
CP1L-M40DT-A
CP1L-M30DR-A,
CP1L-M30DT-A
CP1L-L20DR-A,
CP1L-L20DT-A,
or CP1L-J20DR-A
CP1L-L14DR-A,
CP1L-L14DT-A,
or CP1L-J14DR-A,
CP1L-M40DR-D, CP1L-M40DT-D, or
CP1L-M40DT1-D
CP1L-M30DR-D, CP1L-M30DT-D, or
CP1L-M30DT1-D
CP1L-L20DR-D, CP1L-L20DT-D,
CP1L-L20DT1-D, CP1L-J20DR-D, or
CP1L-J20DT1-D
CP1L-L14DR-D, CP1L-L14DT-D,
CP1L-L14DT1-D, CP1L-J14DR-D, or
CP1L-J14DT1-D
30 I/O points
20 I/O points
14 I/O points
10 I/O points
Power supply
Operating voltage range
CP1L-L10DR-A,
CP1L-L10DT-A
100 to 240 VAC
50/60 Hz
85 to 264 VAC
CP1L-L10DR-D, CP1L-L10DT-D, or
CP1L-L10DT1-D
24 VDC
20.4 to 26.4 VDC
43
Section 2-2
Specifications
Model
numbers
Power supply
60 I/O points
AC power supply
CP1L-M60DR-A,
CP1L-M60DT-A
DC power supply
CP1L-M60DR-D, CP1L-M60DT-D, or
CP1L-M60DT1-D
40 I/O points
CP1L-M40DR-A,
CP1L-M40DT-A
CP1L-M40DR-D, CP1L-M40DT-D, or
CP1L-M40DT1-D
30 I/O points
CP1L-M30DR-A,
CP1L-M30DT-A
CP1L-M30DR-D, CP1L-M30DT-D, or
CP1L-M30DT1-D
20 I/O points
CP1L-L20DR-A,
CP1L-L20DT-A,
or CP1L-J20DR-A
CP1L-L20DR-D, CP1L-L20DT-D,
CP1L-L20DT1-D, CP1L-J20DR-D, or
CP1L-J20DT1-D
14 I/O points
CP1L-L14DR-A,
CP1L-L14DT-A,
or CP1L-J14DR-A,
CP1L-L14DR-D, CP1L-L14DT-D,
CP1L-L14DT1-D, CP1L-J14DR-D, or
CP1L-J14DT1-D
10 I/O points
CP1L-L10DR-A,
CP1L-L10DT-A
CP1L-L10DR-D, CP1L-L10DT-D, or
CP1L-L10DT1-D
Power consumption
50 VA max. ([email protected])
50 VA max. ([email protected])
30 VA max. ([email protected])
30 VA max. ([email protected])
30 VA max. ([email protected])
See note 3.
20 W max. ([email protected])
20 W max. ([email protected]@-D)
13 W max. ([email protected])
13 W max. ([email protected]@-D)
13 W max. ([email protected]@-D)
Inrush current
(See note 1.)
100 to 120 VAC inputs:
20 A max.(for cold start at room
temperature.)
8 ms max.
200 to 240 VAC inputs:
40 A max.(for cold start at room
temperature.)
8 ms max.
30 A max.(for cold start.)
20 ms max.
External power supply (See note 2.)
300 mA at 24 VDC ([email protected])
None
300 mA at 24 VDC ([email protected])
200 mA at 24 VDC ([email protected])
200 mA at 24 VDC ([email protected])
20 MΩ min. (at 500 VDC) between the No insulation between primary and secexternal AC terminals and GR terminals ondary DC power supplies.
2,300 VAC 50/60 Hz for 1 min between No insulation between primary and secthe external AC and GR terminals, leak- ondary DC power supplies.
age current: 5 mA max.
Conforms to IEC 61000-4-4 2 kV (power supply line)
Insulation resistance
Dielectric strength
Noise resistance
Vibration resistance
10 to 57 Hz, 0.075-mm amplitude, 57 to 150 Hz, acceleration: 9.8 m/s2 in X, Y, and
Z directions for 80 minutes each (time coefficient of 8 minutes × coefficient factor
of 10 = total time of 80 minutes)
Shock resistance
147 m/s2 three times each in X, Y, and Z directions
Ambient operating
Ambient humidity
0 to 55°C
10% to 90% (with no condensation)
Atmosphere
Ambient storage
No corrosive gas.
−20 to 75°C (excluding battery)
Terminal screw size
Power interrupt time
M3
10 ms min.
Weight
[email protected]@: 820g max.
[email protected]@: 675 g max.
[email protected]@: 610 g max.
[email protected]@: 380 g max.
[email protected]@: 380 g max.
[email protected]@: 300 g max.
[email protected]@: 380 g max.
[email protected]@: 380 g max.
44
2 ms min.
Section 2-2
Specifications
Note
(1) The above values are for a cold start at room temperature for an AC power supply, and for a cold start for a DC power supply.
• A thermistor (with low-temperature current suppression characteristics) is used in the inrush current control circuitry for the AC power supply. The thermistor will not be sufficiently cooled if the ambient
temperature is high or if a hot start is performed when the power supply has been OFF for only a short time, so in those cases the inrush
current values may be higher (as much as two times higher) than those
shown above.
• A capacitor delay circuit is used in the inrush current control circuitry
for the DC power supply. The capacitor will not be charged if a hot start
is performed when the power supply has been OFF for only a short
time, so in those cases the inrush current values may be higher (as
much as two times higher) than those shown above.
Always allow for this when selecting fuses and breakers for external circuits.
(2) Use the external power supply to power input devices. Do not use it to
drive output devices.
(3) This is the rated value for the maximum system configuration. Use the following formula to calculate DC power consumption for CPU Units with DC
power.
Formula:
DC-powered CP1L power consumption = 5-V current consumption × 5 V/
70% (CP1L internal power efficiency) + 24-V current consumption × 1.1
(current fluctuation factor)
Calculation Example
CPU Unit
System
CP1L-M40DR-D
5V
24 V
0.220 A
0.080 A
Expansion Unit or Expansion I/O Unit
1st Unit
2nd Unit
3rd Unit
CP1W-20EDT
0.130 A
0.000 A
CP1W-TS001
0.040 A
0.059 A
Total
CP1W-DA041
0.080 A
0.124 A
0.470 A
0.263A
CP1L Power Consumption
= (0.47 A × 5 V/70% + 0.263 A × 24 V) × 1.1
= 10.64 W
The above calculation results show that a power supply with a capacity of
7 W or greater is required.
(4) General specification of Expansion I/O Units and Expansion Units will be
the same criteria with CPU Units.
45
Section 2-2
Specifications
Current Consumption
CPU Units
Type
I/O capacity
Model
Current consumption
5 V DC
M
60 I/O points
40 I/O points
30 I/O points
L
20 I/O points
14 I/O points
10 I/O points
J
20 I/O points
14 I/O points
CP1L-M60DR-A
CP1L-M60DR-D
CP1L-M60DT-A
CP1L-M60DT-D
CP1L-M60DT1-D
CP1L-M40DR-A
CP1L-M40DR-D
CP1L-M40DT-A
CP1L-M40DT-D
CP1L-M40DT1-D
CP1L-M30DR-A
CP1L-M30DR-D
CP1L-M30DT-A
CP1L-M30DT-D
CP1L-M30DT1-D
CP1L-L20DR-A
CP1L-L20DR-D
CP1L-L20DT-A
CP1L-L20DT-D
CP1L-L20DT1-D
CP1L-L14DR-A
CP1L-L14DR-D
CP1L-L14DT-A
CP1L-L14DT-D
CP1L-L14DT1-D
CP1L-L10DR-A
CP1L-L10DR-D
CP1L-L10DT-A
CP1L-L10DT-D
CP1L-L10DT1-D
CP1L-J20DR-A
CP1L-J20DR-D
CP1L-J20DT1-D
CP1L-J14DR-A
CP1L-J14DR-D
CP1L-J14DT1-D
Note
Unit
Interface Unit
0.25 A
0.25 A
0.39 A
0.39 A
0.39 A
0.22 A
0.22 A
0.31 A
0.31 A
0.31 A
0.21 A
0.21 A
0.28 A
0.28 A
0.28 A
0.20 A
0.20 A
0.24 A
0.24 A
0.24 A
0.18 A
0.18 A
0.21 A
0.21 A
0.21 A
0.16 A
0.16 A
0.18 A
0.18 A
0.18 A
0.20 A
0.20 A
0.24 A
0.18 A
0.18 A
0.21 A
24 V DC
0.14 A
0.14 A
0.03 A
0.03 A
0.03 A
0.08 A
0.08 A
0.03 A
0.03 A
0.03 A
0.07 A
0.07 A
0.03 A
0.03 A
0.03 A
0.05 A
0.05 A
0.03 A
0.03 A
0.03 A
0.04 A
0.04 A
0.03 A
0.03 A
0.03 A
0.03 A
0.03 A
0.03 A
0.03 A
0.03 A
0.05 A
0.05 A
0.03 A
0.04 A
0.04 A
0.03 A
External power
supply
24 V DC
0.3 A max.
--0.3 A max.
----0.3 A max.
--0.3 A max.
----0.3 A max.
--0.3 A max.
----0.2 A max.
--0.2 A max.
----0.2 A max.
--0.2 A max.
----0.2 A max.
--0.2 A max.
----0.2 A max.
----0.2 A max.
-----
(1) The current consumption of the CP1W-ME05M Memory Cassette and
CP1W-CIF01/11 Option Boards are included in the current consumption
of the CPU Unit.
(2) The current consumption of the following is not included with the current
consumption of the CPU Unit: CP1W-CIF12.
Model
CP1W-CIF12
Current consumption
5 V DC
24 V DC
0.075 A
---
External power
supply
---
(3) CPU Units with DC power do not provide an external power supply.
(4) The current consumptions given in the following table must be added to
the current consumption of the CPU Unit if an Expansion Unit or Expansion I/O Unit is connected.
(5) The external power supply cannot be used if an Expansion Unit or Expansion I/O Unit is connected to a CPU Unit with 14 or 20 I/O points.
46
Section 2-2
Specifications
Expansion Units and Expansion I/O Units
Unit name
Model
Expansion I/O Units
40 I/O points
24 inputs
16 outputs
32 outputs
20 I/O points
12 inputs
8 outputs
16 outputs
8 inputs
8 outputs
Expansion
Units
Current consumption
5 VDC
24 VDC
CP1W-40EDR
CP1W-40EDT
0.080 A
0.160 A
0.090 A
---
CP1W-40EDT1
CP1W-32ER
0.049 A
0.131 A
CP1W-32ET
CP1W-32ET1
0.113 A
---
CP1W-20EDR1
CP1W-20EDT
0.103 A
0.130 A
0.044 A
---
CP1W-20EDT1
CP1W-16ER
0.042 A
0.090 A
CP1W-16ET
CP1W-16ET1
0.076 A
---
CP1W-8ED
CP1W-8ER
0.018 A
0.026 A
--0.044 A
CP1W-8ET
CP1W-8ET1
0.075 A
---
Analog Input Unit
4 inputs
CP1W-AD041
CP1W-AD042
0.100 A
0.100 A
0.090 A
0.050 A
Analog Output
Unit
2 outputs
4 outputs
CP1W-DA021
CP1W-DA041
0.040 A
0.080 A
0.095 A
0.124 A
Analog I/O Units
2 inputs
1 output
CP1W-DA042
CP1W-MAD01
0.070 A
0.066 A
0.160 A
0.066 A
CP1W-MAD11
CP1W-MAD42
0.083 A
0.120 A
0.110 A
0.120 A
CP1W-MAD44
0.120 A
0.170 A
CP1W-TS001
CP1W-TS002
0.040 A
0.059 A
CP1W-TS004
CP1W-TS003
0.080 A
0.070 A
0.050 A
0.030 A
Pt or JPt platinum
resistance thermometers
CP1W-TS101
CP1W-TS102
0.054 A
0.073 A
8 inputs
8 outputs
CP1W-SRT21
0.029 A
---
4 inputs
2 outputs
4 inputs
4 outputs
Temperature Sensor Units
K or J thermocouples
K or J thermocouples or analog
inputs
CompoBus/S I/O
Link Unit
Note
CP1W-32ER/32ET/32ET1’s maximum number of simultaneously ON points is
24 (75%).
47
Section 2-2
Specifications
Characteristics
Type
Model
M CPU Units
L CPU Units
CP1L-M60DR-A CP1L-M40DR-A CP1L-M30DR-A CP1L-L20DR-A CP1L-L14DR-A CP1L-L10DR-A
CP1L-M60DR-D CP1L-M40DR-D CP1L-M30DR-D CP1L-L20DR-D CP1L-L14DR-D CP1L-L10DR-D
CP1L-M60DT-A CP1L-M40DT-A CP1L-M30DT-A CP1L-L20DT-A
CP1L-L14DT-A
CP1L-L10DT-A
CP1L-M60DT-D CP1L-M40DT-D CP1L-M30DT-D CP1L-L20DT-D
CP1L-L14DT-D
CP1L-L10DT-D
CP1L-M60DT1-D CP1L-M40DT1-D CP1L-M30DT1-D CP1L-L20DT1-D CP1L-L14DT1-D CP1L-L10DT1-D
CP1L-J20DR-A CP1L-J14DR-A
CP1L-J20DR-D CP1L-J14DR-D
CP1L-J20DT1-D CP1L-J14DT1-D
Program capacity
Control method
10 Ksteps
Stored program method
5 Ksteps (J models : 1K steps)
I/O control method
Program language
Cyclic scan with immediate refreshing
Ladder diagram
Function blocks
Instruction length
Maximum number of function block definitions: 128
Maximum number of instances: 256
Languages usable in function block definitions: Ladder diagrams, structured text (ST)
Function blocks cannot be used in CP1L-J CPU Unit.
1 to 7 steps per instruction
Instructions
Instruction
execution time
Approx. 500 (function codes: 3 digits)
Basic instructions: 0.61 µs min.
Special instructions: 4.1 µs min.
Common
0.38 ms
processing time
Number of
3 Units (CP Series)
connectable Expansion Units and Expansion I/O Units
Maximum number of
I/O points
180 points
(60 built in,
40 × 3
expansion)
60 terminals
(36 inputs and
24 outputs)
160 points
(40 built in,
40 × 3
expansion)
40 terminals
(24 inputs and
16 outputs)
150 points
(30 built in,
40 × 3
expansion)
30 terminals
(18 inputs and
12 outputs)
Built-in
Built-in I/O
terminals
(Functions can
Inter- Direct 6 inputs
be
mode Response time: 0.3 ms
assigned.) rupt
inputs
Counter 6 inputs
mode
Response frequency: 5 kHz total, 16 bits
Incrementing counter or decrementing counter
Quickresponse
inputs
High-speed
counters
Pulse
Pulse outputs
outputs
(Transistor
output PWM outputs
models
only)
48
6 points
Min. input pulse width: 50 µs max.
1 Unit (CP Series)
0 Unit
60 points
(20 built in,
40 × 1
expansion)
20 terminals
(12 inputs and
8 outputs)
10 points
(10 built in)
54 points
(14 built in,
40 × 1
expansion)
14 terminals
(8 inputs and 6
outputs)
10 terminals
(6 inputs and 4
outputs)
4 inputs
2 inputs
4 inputs
2 inputs
4 points
2 points
4 inputs/2 axes (24 VDC)
• Single phase (pulse plus direction, up/down, increment), 100 kHz (J models : 20kHz)
• Differential phases (4×), 50 kHz (J models : 10kHz)
Value range: 32 bits, Linear mode or ring mode
Interrupts: Target value comparison or range comparison
• 2 outputs, 1 Hz to 100 kHz (J models : 1kHz to 20kHz)
(CCW/CW or pulse plus direction)
Trapezoidal or S-curve acceleration and deceleration (Duty ratio: 50% fixed)
2 outputs, 0.1 to 6,553.5 Hz or 1 to 32,800 Hz
Variable duty ratio: 0.0% to 100.0% (in increments of 0.1% or 1%)
Accuracy: +1%/-0% at 0.1 Hz to 10,000 Hz and +5%/-0% at 10,000 Hz to 32,800 Hz
Section 2-2
Specifications
Type
Model
M CPU Units
L CPU Units
CP1L-M60DR-A CP1L-M40DR-A CP1L-M30DR-A CP1L-L20DR-A CP1L-L14DR-A CP1L-L10DR-A
CP1L-M60DR-D CP1L-M40DR-D CP1L-M30DR-D CP1L-L20DR-D CP1L-L14DR-D CP1L-L10DR-D
CP1L-M60DT-A CP1L-M40DT-A CP1L-M30DT-A CP1L-L20DT-A
CP1L-L14DT-A
CP1L-L10DT-A
CP1L-M60DT-D CP1L-M40DT-D CP1L-M30DT-D CP1L-L20DT-D
CP1L-L14DT-D
CP1L-L10DT-D
CP1L-M60DT1-D CP1L-M40DT1-D CP1L-M30DT1-D CP1L-L20DT1-D CP1L-L14DT1-D CP1L-L10DT1-D
CP1L-J20DR-A CP1L-J14DR-A
CP1L-J20DR-D CP1L-J14DR-D
CP1L-J20DT1-D CP1L-J14DT1-D
Analog Analog
settings adjuster
External
analog
setting
1 (Setting range: 0 to 255)
Serial Peripheral
port
USB port
Supported. (1-port USB connector, type B): Special for a Peripheral Device such as the CX-Programmer. (Set the network classification to USB in the Peripheral Device's PLC model setting.)
• Serial communications standard: USB 1.1
Not Support
Ports not provided as standard equipment. (M-type CPU Unit: 2 ports max.,
L-type CPU Unit: 1 port)
The following Option Boards can be mounted:
• CP1W-CIF01: One RS-232C port
• CP1W-CIF11/CIF12: One RS-422A/485 port
Applicable communications modes (same for all of the above ports): Host Link,
NT Link (1: N mode), No-protocol, Serial PLC Link Slave, Serial PLC Link Master,
Serial Gateway (conversion to CompoWay/F, conversion to Modbus-RTU),
peripheral bus (See note.)
288 (32 cycle execution tasks and 256 interrupt tasks)
RS-232C
port,
RS-422A/485
port
Number of tasks
1 input (Resolution: 1/256, Input range: 0 to 10 V)
Scheduled
1 (interrupt task 2, fixed)
interrupt
Input
6 (interrupt tasks 140 to 145, fixed)
interrupt tasks
Maximum subroutine
number
Maximum jump
number
Scheduled interrupts
Clock function
Memory Built-in flash
Backup memory
Battery
backup
Memory Cassette
function
4 (interrupt
tasks 140 to
143, fixed)
2 (interrupt
tasks 140 to
141, fixed)
(High-speed counter interrupts and interrupt tasks specified by external interrupts
can also be executed.)
256
256
1
Supported.
Accuracy (monthly deviation): 4.5 min to −0.5 min (ambient temperature: 55°C),
−2.0 min to +2.0 min (ambient temperature: 25°C),
−2.5 min to +1.5 min (ambient temperature: 0°C)
User programs and parameters (such as the PLC Setup) are automatically saved to the flash
memory. It is also possible to save and read data memory initial data.
The data is automatically transferred to RAM when the power supply is turned ON. (Data memory
initial data, however, may or may not be transferred, depending on the selection in the PLC Setup.
The HR Area, DM Area, and counter values (flags, PV) are backed up by a battery.
Battery model: CJ1W-BAT01 (Built into the CP1L CPU Unit.)
Maximum battery service life: 5 years
Guaranteed (ambient temperature: 55°C): 13,000 hours (approx. 1.5 years)
Effective value (ambient temperature: 25°C): 43,000 hours (approx. 5 years)
A CP1W-ME05M Memory Cassette (512K words, optional) can be mounted. It can be used to
back up the following data on the CPU Unit's RAM and to transfer the data at startup.
• Data saved on Memory Cassette: User programs, parameters (such as the PLC Setup), DM
Area, data memory initial data, comment memory (CX-Programmer conversion tables, comments, program indices), and FB program memory.
• Writing to Memory Cassette: By operations from the CX-Programmer.
• Reading from Memory Cassette: At startup, or by operations from the CX-Programmer.
Memory Cassette cannot be used in CP1L-J CPU Unit.
Note
Can be used as Modbus-RTU easy master function.
49
Section 2-2
Specifications
2-2-2
I/O Memory Details
Type
Model
I/O
Input bits
Areas
Output
bits
M CPU Units
CP1L-M60DR-A CP1L-M40DR-A CP1L-M30DR-A
CP1L-M60DR-D CP1L-M40DR-D CP1L-M30DR-D
CP1L-M60DT-A
CP1L-M40DT-A
CP1L-M30DT-A
CP1L-M60DT-D
CP1L-M40DT-D
CP1L-M30DT-D
CP1L-M60DT1-D CP1L-M40DT1-D CP1L-M30DT1-D
L CPU Units
CP1L-L20DR-A
CP1L-L14DR-A
CP1L-L10DR-A
CP1L-L20DR-D
CP1L-L14DR-D
CP1L-L10DR-D
CP1L-L20DT-A
CP1L-L14DT-A
CP1L-L10DT-A
CP1L-L20DT-D
CP1L-L14DT-D
CP1L-L10DT-D
CP1L-L20DT1-D CP1L-L14DT1-D CP1L-L10DT1-D
CP1L-J20DR-A
CP1L-J14DR-A
CP1L-J20DR-D
CP1L-J14DR-D
CP1L-J20DT1-D CP1L-J14DT1-D
12 bits
8 bits
6 bits
CIO 0.00 to
CIO 0.00 to
CIO 0.00 to
CIO 0.11
CIO 0.07
CIO 0.05
36 bits
24 bits
18 bits
CIO 0.00 to
CIO 0.00 to
CIO 0.00 to
CIO 0.11
CIO 0.11
CIO 0.11
CIO 1.00 to
CIO 1.00 to
CIO 1.00 to
CIO 1.11
CIO 1.11
CIO 1.05
CIO 2.00 to
CIO 2.11
24 bits
16 bits
12 bits
6 bits
8 bits
CIO 100.00 to CIO 100.00 to CIO 100.00 to CIO 100.00 to CIO 100.00 to
CIO 100.07
CIO 100.07
CIO 100.07
CIO 100.07
CIO 100.05
CIO 101.00 to CIO 101.00 to CIO 101.00 to
CIO 101.07
CIO 101.07
CIO 100.03
CIO 102.00 to
CIO 102.07
256 bits (16 words): CIO 3000.00 to CIO 3015.15 (words CIO 3000 to CIO 3015)
4 bits
CIO 100.00 to
CIO 100.03
1:1 Link
Not Support
Bit Area
Serial PLC 1,440 bits (90 words): CIO 3100.00 to CIO 3189.15 (words CIO 3100 to CIO 3189) Not Support
Link Area
Work bits 4,800 bits (300 words): CIO 1200.00 to CIO 1499.15 (words CIO 1200 to CIO 1499)
6,400 bits (400 words): CIO 1500.00 to CIO 1899.15 (words CIO 1500 to CIO 1899)
15,360 bits (960 words): CIO 2000.00 to CIO 2959.15 (words CIO 2000 to CIO 2959)
9,600 bits (600 words): CIO 3200.00 to CIO 3799.15 (words CIO 3200 to CIO 3799)
37,504 bits (2,344 words): CIO 3800.00 to CIO 6143.15 (words CIO 3800 to CIO 6143)
Work bits
8,192 bits (512 words): W000.00 to W511.15 (words W0 to W511)
TR Area
16 bits: TR0 to TR15
HR Area
8,192 bits (512 words): H0.00 to H511.15 (words H0 to H511)
AR Area
Read-only (Write-prohibited) 7,168 bits (448 words): A0.00 to A447.15 (words A0 to A447)
Read/Write 8,192 bits (512 words): A448.00 to A959.15 (words A448 to A959)
Timers
4,096 bits: T0 to T4095
Counters
4,096 bits: C0 to C4095
DM Area
32 Kwords: D0 to D32767
10 Kwords: D0 to D9999 and D32000 to D32767
Note Initial data can be transferred to the CPU
Note Initial data can be transferred to the CPU
Unit's built-in flash memory using the data
Unit's built-in flash memory using the data
memory initial data transfer function. A setmemory initial data transfer function. A setting in the PLC Setup can be used so that
ting in the PLC Setup can be used so that
the data in flash memory is transferred to
the data in flash memory is transferred to
RAM at startup.
RAM at startup.
Data Register
Area
Index Register
Area
Task Flag Area
Trace Memory
50
DM fixed allocation words for Modbus-RTU Easy
Master
D32200 to D32249 for Serial Port 1, D32300 to
D32349 for Serial Port 2
16 registers (16 bits): DR0 to DR15
DM fixed allocation words for Modbus-RTU Easy
Master
D32300 to D32349 for Serial Port 1
16 registers (16 bits): IR0 to IR15
32 flags (32 bits): TK0 to TK31
4,000 words (500 samples for the trace data maximum of 31 bits and 6 words.)
Section 2-2
Specifications
2-2-3
I/O Specifications
I/O Terminal Blocks of CPU Units with 60 I/O Points
Input Terminal Block (Top Block)
AC Power Supply Models
L1
L2/N COM
01
00
03
02
05
04
07
06
09
08
11
10
01
00
Inputs (CIO 0)
03
02
05
04
07
06
09
08
11
10
Inputs (CIO 1)
01
00
03
02
05
04
07
06
09
08
11
10
Inputs (CIO 2)
DC Power Supply Models
−
+
NC
COM
01
00
03
02
05
04
07
06
09
08
11
10
Inputs (CIO 0)
01
00
03
02
05
04
07
06
09
08
Inputs (CIO 1)
11
10
01
00
03
02
05
04
07
06
09
08
11
10
Inputs (CIO 2)
Setting Input Functions Using PLC Setup
Address
Word Bit
CIO 0
00
01
02
03
Input operation settings
Normal
Interrupt
Quickinputs
inputs
response
(See note.)
inputs
Normal
input 0
Normal
input 1
Normal
input 2
Normal
input 3
---
---
---
---
---
---
---
---
High-speed counters
Operation settings:
High-speed counters enabled
Phase-Z reset
Single-phase Two-phase (differential
(increment
phase x4, up/down, or
pulse input)
pulse/direction)
Origin searches
Origin searches
enabled for pulse
outputs 0 and 1
Counter 0, increment input
Counter 1, increment input
Counter 2, increment input
Counter 3, increment input
Counter 0, A phase, up,
or count input
Counter 0, B phase,
down, or direction input
Counter 1, A phase, up,
or count input
Counter 1, B phase,
down, or direction input
Quickresponse
input 0
Quickresponse
input 1
Quickresponse
input 2
Quickresponse
input 3
Counter 0,
phase-Z/reset
input
Counter 1,
phase-Z reset
input
Counter 2,
phase-Z reset
input
Counter 3,
phase-Z reset
input
Counter 0, phase-Z reset --input
04
Normal
input 4
Interrupt
input 0
05
Normal
input 5
Interrupt
input 1
06
Normal
input 6
Interrupt
input 2
07
Normal
input 7
Interrupt
input 3
08
Normal
input 8
Interrupt
input 4
Quickresponse
input 4
09
Normal
input 9
Interrupt
input 5
10
Normal
input 10
11
Normal
input 11
---------
Counter 1, phase-Z reset --input
---
Pulse output 0: Origin
input signal
---
Pulse output 1: Origin
input signal
---
---
---
Quickresponse
input 5
---
---
---
---
---
---
---
Pulse output 0: Origin
proximity input signal
---
---
---
---
Pulse output 1: Origin
proximity input signal
51
Section 2-2
Specifications
Address
Word Bit
CIO 1
Normal
input 12
Normal
input 13
Normal
input 14
---
---
High-speed counters
Origin searches
Operation settings:
Origin searches
enabled for pulse
High-speed counters enabled
outputs 0 and 1
Phase-Z reset
Single-phase Two-phase (differential
(increment
phase x4, up/down, or
pulse input)
pulse/direction)
-------
---
---
---
---
---
---
---
---
---
---
03
Normal
input 15
---
---
---
---
---
04
Normal
input 16
---
---
---
---
---
05
Normal
input 17
Normal
input 18
Normal
input 19
Normal
input 20
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
09
Normal
input 21
---
---
---
---
---
10
Normal
input 22
---
---
---
---
---
11
Normal
input 23
---
---
---
---
---
00
Normal
input 24
Normal
input 25
Normal
input 26
Normal
input 27
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
04
Normal
input 28
---
---
---
---
---
05
Normal
input 29
---
---
---
---
---
06
Normal
input 30
Normal
input 31
Normal
input 32
Normal
input 33
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
10
Normal
input 34
---
---
---
---
---
11
Normal
input 35
---
---
---
---
---
00
01
02
06
07
08
CIO 2
01
02
03
07
08
09
52
Input operation settings
Normal
Interrupt
Quickinputs
inputs
response
(See note.)
inputs
Section 2-2
Specifications
Output Terminal Block (Bottom Block)
AC Power Supply Models
+
−
00
01
02
COM COM COM
04
03
05
COM
07
06
00
COM
CIO 100
02
01
04
03
05
COM
07
06
CIO 101
00
COM
02
01
04
03
05
COM
07
06
CIO 102
DC Power Supply Models
NC
NC
00
01
02
COM COM COM
04
03
05
COM
07
06
CIO 100
00
COM
02
01
04
03
05
COM
CIO 101
07
06
00
COM
02
01
04
03
05
COM
07
06
CIO 102
Setting Output Functions Using Instructions and PLC Setup
Address
Word
Bit
When the
instructions to
the right are not
executed
When a pulse output
instruction (SPED, ACC,
PLS2, or ORG) is executed
When origin searches are
enabled in the PLC Setup,
and an origin search is
executed with ORG
instruction
Fixed duty ratio pulse output
Normal outputs
CW/CCW
Pulse plus
+ When the origin search
direction
function is used
Pulse output 0 Pulse output 0 --(CW)
(pulse)
When the PWM
instruction is
executed
Variable duty ratio
pulse output
PWM output
CIO 100 00
Normal output 0
---
01
Normal output 1
Pulse output 0 Pulse output 0 --(CCW)
(direction)
PWM output 0
02
Normal output 2
Pulse output 1 Pulse output 1 --(CW)
(pulse)
---
03
Normal output 3
Pulse output 1 Pulse output 1 --(CCW)
(direction)
PWM output 1
04
Normal output 4
---
---
05
Normal output 5
---
---
06
Normal output 6
---
---
Origin search 0 (Error counter --reset output)
Origin search 1 (Error counter --reset output)
-----
07
CIO 101 00
Normal output 7
Normal output 8
-----
-----
-----
-----
01
02
Normal output 9 --Normal output 10 ---
-----
-----
-----
03
04
Normal output 11 --Normal output 12 ---
-----
-----
-----
05
06
Normal output 13 --Normal output 14 ---
-----
-----
-----
07
Normal output 15 ---
---
---
---
53
Section 2-2
Specifications
Address
Word
Bit
When the
instructions to
the right are not
executed
When a pulse output
instruction (SPED, ACC,
PLS2, or ORG) is executed
When origin searches are
enabled in the PLC Setup,
and an origin search is
executed with ORG
instruction
Fixed duty ratio pulse output
Normal outputs
CW/CCW
When the PWM
instruction is
executed
Variable duty ratio
pulse output
PWM output
CIO 102 00
Normal output 16 ---
Pulse plus
direction
---
+ When the origin search
function is used
---
01
02
Normal output 17 --Normal output 18 ---
-----
-----
-----
---
03
04
Normal output 19 --Normal output 20 ---
-----
-----
-----
05
06
Normal output 21 --Normal output 22 ---
-----
-----
-----
07
Normal output 23 ---
---
---
---
I/O Terminal Blocks of CPU Units with 40 I/O Points
Input Terminal Block (Top Block)
AC Power Supply Models
L1
L2/N COM 01
00
03
02
05
04
07
06
09
08
11
10
Inputs (CIO 0)
01
00
03
02
05
04
07
06
09
08
11
10
Inputs (CIO 1)
DC Power Supply Models
−
+
NC
COM 01
00
03
02
05
04
Inputs (CIO 0)
54
07
06
09
08
11
10
01
00
03
02
05
04
Inputs (CIO 1)
07
06
09
08
11
10
Section 2-2
Specifications
Setting Input Functions Using PLC Setup
Address
Word Bit
CIO 0
00
01
02
Input operation settings
Normal
Interrupt
Quickinputs
inputs
response
(See note.)
inputs
Normal
input 0
Normal
input 1
Normal
input 2
---
---
---
---
---
---
High-speed counters
Origin searches
Operation settings:
Origin searches
enabled for pulse
High-speed counters enabled
outputs 0 and 1
Phase-Z reset
Single-phase Two-phase (differential
(increment
phase x4, up/down, or
pulse input)
pulse/direction)
Counter 0, incre- Counter 0, A phase, up, --ment input
or count input
Counter 1, incre- Counter 0, B phase,
--ment input
down, or direction input
Counter 2, incre- Counter 1, A phase, up, --ment input
or count input
03
Normal
input 3
---
---
Counter 3, incre- Counter 1, B phase,
ment input
down, or direction input
---
04
Normal
input 4
Interrupt
input 0
Quickresponse
input 0
Counter 0,
phase-Z/reset
input
Counter 0, phase-Z reset --input
05
Normal
input 5
Interrupt
input 1
Normal
input 6
Interrupt
input 2
07
Normal
input 7
Interrupt
input 3
08
Normal
input 8
Interrupt
input 4
Counter 1,
phase-Z reset
input
Counter 2,
phase-Z reset
input
Counter 3,
phase-Z reset
input
---
Counter 1, phase-Z reset --input
06
Quickresponse
input 1
Quickresponse
input 2
Quickresponse
input 3
Quickresponse
input 4
09
Normal
input 9
Interrupt
input 5
Quickresponse
input 5
10
Normal
input 10
---
11
Normal
input 11
---
---
Pulse output 0: Origin
input signal
---
Pulse output 1: Origin
input signal
---
---
---
---
---
---
---
---
Pulse output 0: Origin
proximity input signal
---
---
---
Pulse output 1: Origin
proximity input signal
55
Section 2-2
Specifications
Address
Word Bit
CIO 1
Normal
input 12
Normal
input 13
Normal
input 14
---
---
High-speed counters
Origin searches
Operation settings:
Origin searches
enabled for pulse
High-speed counters enabled
outputs 0 and 1
Phase-Z reset
Single-phase Two-phase (differential
(increment
phase x4, up/down, or
pulse input)
pulse/direction)
-------
---
---
---
---
---
---
---
---
---
---
03
Normal
input 15
---
---
---
---
---
04
Normal
input 16
---
---
---
---
---
05
Normal
input 17
Normal
input 18
Normal
input 19
Normal
input 20
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
09
Normal
input 21
---
---
---
---
---
10
Normal
input 22
---
---
---
---
---
11
Normal
input 23
---
---
---
---
---
00
01
02
06
07
08
Input operation settings
Normal
Interrupt
Quickinputs
inputs
response
(See note.)
inputs
Output Terminal Block Arrangement (Bottom Block)
AC Power Supply Models
+
00
−
01
COM
02
03
COM COM
04
COM
06
05
00
COM
07
CIO 100
01
03
02
04
COM
06
07
05
CIO 101
DC Power Supply Models
00
NC
NC
01
COM
CIO 100
56
02
03
COM COM
04
COM
06
05
00
07
01
COM
CIO 101
03
02
04
COM
06
05
07
Section 2-2
Specifications
Setting Output Functions Using Instructions and PLC Setup
Address
Word
Bit
When the
instructions to
the right are not
executed
When a pulse output
instruction (SPED, ACC,
PLS2, or ORG) is executed
When origin searches are
enabled in the PLC Setup,
and an origin search is
executed with ORG
instruction
Fixed duty ratio pulse output
Normal outputs
CW/CCW
Pulse plus
direction
When the PWM
instruction is
executed
Variable duty ratio
pulse output
+ When the origin search
function is used
PWM output
CIO 100 00
Normal output 0
Pulse output 0 Pulse output 0 --(CW)
(pulse)
---
01
Normal output 1
PWM output 0
Normal output 2
---
---
03
Normal output 3
---
PWM output 1
04
Normal output 4
Pulse output 0
(direction)
Pulse output 1
(pulse)
Pulse output 1
(direction)
---
---
02
Pulse output 0
(CCW)
Pulse output 1
(CW)
Pulse output 1
(CCW)
---
05
Normal output 5
---
---
Origin search 1 (Error counter --reset output)
06
07
Normal output 6
Normal output 7
-----
-----
-----
-----
CIO 101 00
01
Normal output 8
Normal output 9
-----
-----
-----
-----
02
03
Normal output 10 --Normal output 11 ---
-----
-----
-----
04
05
Normal output 12 --Normal output 13 ---
-----
-----
-----
06
07
Normal output 14 --Normal output 15 ---
-----
-----
-----
Origin search 0 (Error counter --reset output)
I/O Terminal Blocks of CPU Units with 30 I/O Points
Input Terminal Block (Top Block)
AC Power Supply Models
L1
L2/N COM
01
03
00
02
05
04
07
06
09
08
Inputs (CIO 0)
11
10
01
00
03
02
05
04
NC
Inputs (CIO 1)
DC Power Supply Models
−
+
NC
COM
00
01
03
02
Inputs (CIO 0)
05
04
07
06
09
08
11
10
01
00
03
02
05
04
NC
Inputs (CIO 1)
57
Section 2-2
Specifications
Setting Input Functions Using PLC Setup
Address
Word
Bit
CIO 0
00
---
---
---
---
---
---
03
Normal
input 3
---
---
Counter 3,
increment input
Counter 1, B phase,
down, or direction input
04
Normal
input 4
Interrupt
input 0
Quickresponse
input 0
Counter 0,
phase-Z/reset
input
Counter 0, phase-Z reset --input
05
Normal
input 5
Interrupt
input 1
Normal
input 6
Interrupt
input 2
07
Normal
input 7
Interrupt
input 3
08
Normal
input 8
Interrupt
input 4
Counter 1,
phase-Z reset
input
Counter 2,
phase-Z reset
input
Counter 3,
phase-Z reset
input
---
Counter 1, phase-Z reset --input
06
Quickresponse
input 1
Quickresponse
input 2
Quickresponse
input 3
Quickresponse
input 4
09
Normal
input 9
Interrupt
input 5
Quickresponse
input 5
---
---
10
Normal --input 10
---
---
Pulse output 0: Origin
proximity input signal
11
Normal --input 11
---
---
Pulse output 1: Origin
proximity input signal
00
Normal
input 12
Normal
input 13
Normal
input 14
Normal
input 15
---
---
---
---
---
---
---
---
---
---
---
---
04
Normal --input 16
---
---
05
Normal --input 17
---
---
02
01
02
03
58
High-speed counters
Origin searches
Operation settings:
Origin searches
enabled for pulse
High-speed counters enabled
outputs 0 and 1
Phase-Z reset
Single-phase Two-phase (differential
(increment
phase x4, up/down, or
pulse input)
pulse/direction)
Counter 0,
Counter 0, A phase, up, --increment input or count input
Counter 1,
Counter 0, B phase,
--increment input down, or direction input
Counter 2,
Counter 1, A phase, up, --increment input or count input
Normal
input 0
Normal
input 1
Normal
input 2
01
CIO 1
Input operation settings
Normal Interrupt
Quickinputs
inputs
response
(See note.)
inputs
---
---
Pulse output 0: Origin
input signal
---
Pulse output 1: Origin
input signal
---
Section 2-2
Specifications
Output Terminal Block (Bottom Block)
AC Power Supply Models
00
+
−
COM
01
02
COM COM
04
03
CIO 100
05
COM
00
07
06
02
01
COM
03
CIO 101
DC Power Supply Models
00
NC
NC
COM COM
02
01
COM
04
03
05
COM
07
06
00
COM
02
01
03
CIO 101
CIO 100
Setting Output Functions Using Instructions and PLC Setup
Address
Word
Bit
When the
When a pulse output
instructions to instruction (SPED, ACC, PLS2,
the right are not
or ORG) is executed
executed
When origin searches are
enabled in the PLC Setup,
and an origin search is
executed with ORG
instruction
Fixed duty ratio pulse output
Normal outputs
CW/CCW
Pulse plus
direction
+ When the origin search
function is used
When the PWM
instruction is
executed
Variable duty
ratio pulse output
PWM output
CIO 100 00
Normal output 0
Pulse output 0
(CW)
Pulse output 0
(pulse)
---
---
01
Normal output 1
Pulse output 0
(CCW)
Pulse output 0
(direction)
---
PWM output 0
02
Normal output 2
---
Normal output 3
---
PWM output 1
04
Normal output 4
Pulse output 1
(pulse)
Pulse output 1
(direction)
---
---
03
Pulse output 1
(CW)
Pulse output 1
(CCW)
---
05
Normal output 5
---
---
06
07
Normal output 6
Normal output 7
-----
-----
-----
-----
CIO 101 00
01
Normal output 8
Normal output 9
-----
-----
-----
-----
02
Normal output 10 ---
---
---
---
03
Normal output 11 ---
---
---
---
Origin search 0 (Error counter --reset output)
Origin search 1 (Error counter --reset output)
59
Section 2-2
Specifications
I/O Terminal Blocks of CPU Units with 20 I/O Points
Input Terminal Block (Top Block)
AC Power Supply Models
L1
L2/N COM
01
00
03
02
05
04
07
06
09
08
11
10
Inputs (CIO 0)
DC Power Supply Models
−
+
COM
NC
00
01
03
02
05
04
07
06
09
08
11
10
Inputs (CIO 0)
Setting Input Functions Using PLC Setup
Address
Word Bit
CIO 0
00
01
02
03
60
Input operation settings
Normal
Interrupt
Quickinputs
inputs
response
(See note.)
inputs
Normal
input 0
Normal
input 1
Normal
input 2
Normal
input 3
---
---
---
---
---
---
---
---
High-speed counters
Operation settings:
High-speed counters enabled
Phase-Z reset
Single-phase Two-phase (differential
(increment
phase x4, up/down, or
pulse input)
pulse/direction)
Origin searches
Origin searches
enabled for pulse
outputs 0 and 1
Counter 0,
increment input
Counter 1,
increment input
Counter 2,
increment input
Counter 3,
increment input
Counter 0, A phase, up,
or count input
Counter 0, B phase,
down, or direction input
Counter 1, A phase, up,
or count input
Counter 1, B phase,
down, or direction input
---
Quickresponse
input 0
Quickresponse
input 1
Quickresponse
input 2
Quickresponse
input 3
Counter 0,
phase-Z/reset
input
Counter 1,
phase-Z reset
input
Counter 2,
phase-Z reset
input
Counter 3,
phase-Z reset
input
Counter 0, phase-Z
reset input
---
Counter 1, phase-Z
reset input
---
---
Pulse output 0: Origin
input signal
---
Pulse output 1: Origin
input signal
-------
04
Normal
input 4
Interrupt
input 0
05
Normal
input 5
Interrupt
input 1
06
Normal
input 6
Interrupt
input 2
07
Normal
input 7
Interrupt
input 3
08
Normal
input 8
Interrupt
input 4
Quickresponse
input 4
---
---
09
Normal
input 9
Interrupt
input 5
---
---
10
Normal --input 10
Quickresponse
input 5
---
---
Pulse output 0: Origin
proximity input signal
11
Normal --input 11
---
---
Pulse output 1: Origin
proximity input signal
Section 2-2
Specifications
Output Terminal Block (Bottom Block)
AC Power Supply Models
+
−
00
COM
01
COM
DC Power Supply Models
02
COM
04
03
05
COM
07
06
NC
00
COM
NC
CIO 100
01
COM
02
COM
04
03
07
05
COM
06
CIO 100
Setting Output Functions Using Instructions and PLC Setup
Address
Word
When the
instructions to
the right are
not executed
Bit Normal outputs
When a pulse output
instruction (SPED, ACC,
PLS2, or ORG) is executed
When origin searches are
When the PWM
enabled in PLC Setup, and an
instruction is
origin search is executed
executed
with ORG instruction
Fixed duty ratio pulse output
Variable duty ratio
pulse output
CW/CCW
Pulse plus
direction
+ When the origin search
function is used
PWM output
CIO 100 00
Normal output 0
Pulse output 0 Pulse output 0 --(CW)
(pulse)
---
01
Normal output 1
Pulse output 0 Pulse output 0 --(CCW)
(direction)
PWM output 0
02
Normal output 2
---
03
Normal output 3
04
Normal output 4
Pulse output 1
(CW)
Pulse output 1
(CCW)
---
05
Normal output 5
---
06
07
Normal output 6
Normal output 7
-----
Pulse output 1 --(pulse)
Pulse output 1 --(direction)
--Origin search 0 (Error counter
reset output)
--Origin search 1 (Error counter
reset output)
-----
-----
PWM output 1
---------
61
Section 2-2
Specifications
I/O Terminal Blocks of CPU Units with 14 I/O Points
Input Terminal Block (Top Block)
AC Power Supply Models
L1
L2/N COM
00
01
DC Power Supply Models
03
02
05
04
07
06
NC
NC
NC
NC
−
+
COM
NC
00
01
03
02
05
04
07
NC
06
NC
NC
NC
Inputs (CIO 0)
Inputs (CIO 0)
Setting Input Functions Using PLC Setup
Address
Word
Bit
Input operation settings
Normal
inputs
Interrupt
inputs
(See note.)
Quickresponse
inputs
High-speed counters
Origin searches
Operation settings:
High-speed counters enabled
Phase-Z reset
Origin searches
enabled for pulse
outputs 0 and 1
Single-phase
(increment
pulse input)
CIO 0
62
Two-phase (differential
phase x4, up/down, or
pulse/direction)
00
Normal
input 0
---
---
Counter 0, incre- Counter 0, A phase, up,
ment input
or count input
---
01
Normal
input 1
---
---
Counter 1, incre- Counter 0, B phase,
ment input
down, or direction input
---
02
Normal
input 2
---
---
Counter 2, incre- Counter 1, A phase, up,
ment input
or count input
Pulse output 0: Origin proximity input
signal
03
Normal
input 3
---
---
Counter 3, incre- Counter 1, B phase,
ment input
down, or direction input
Pulse output 1: Origin proximity input
signal
04
Normal
input 4
Interrupt
input 0
---
Normal
input 5
Interrupt
input 1
Counter 1, phase-Z or
reset input
---
06
Normal
input 6
Interrupt
input 2
---
Pulse output 0: Origin input signal
07
Normal
input 7
Interrupt
input 3
Counter 0,
phase-Z/reset
input
Counter 1,
phase-Z reset
input
Counter 2,
phase-Z reset
input
Counter 3,
phase-Z reset
input
Counter 0, phase-Z or
reset input
05
Quickresponse
input 0
Quickresponse
input 1
Quickresponse
input 2
Quickresponse
input 3
---
Pulse output 1: Origin input signal
Section 2-2
Specifications
Output Terminal Block (Bottom Block)
AC Power Supply Models
+
−
00
COM
01
COM
DC Power Supply Models
02
COM
04
03
05
COM
NC
00
NC
NC
COM
NC
01
COM
02
COM
04
03
NC
05
COM
NC
CIO 100
CIO 100
Setting Functions Using Instructions and PLC Setup
Address
When the
When a pulse output
When origin searches are
instructions to
instruction (SPED, ACC,
enabled in PLC Setup, and an
the right are not PLS2, or ORG) is executed origin search is executed with
executed
ORG instruction
Bit Normal outputs
Fixed duty ratio pulse output
Word
CW/CCW
Normal output 4
Pulse output
0 (CW)
Pulse output
0 (CCW)
Pulse output
1 (CW)
Pulse output
1 (CCW)
---
Pulse plus
direction
Pulse output
0 (pulse)
Pulse output
0 (direction)
Pulse output
1 (pulse)
Pulse output
1 (direction)
---
Normal output 5
---
---
CIO 100 00
Normal output 0
01
Normal output 1
02
Normal output 2
03
Normal output 3
04
05
+ When the origin search
function is used
When the PWM
instruction is
executed
Variable duty ratio
pulse output
PWM output
---
---
---
PWM output 0
---
---
---
PWM output 1
Origin search 0 (Error counter
reset output)
Origin search 1 (Error counter
reset output)
-----
I/O Terminal Blocks of CPU Units with 10 I/O Points
Input Terminal Block (Top Block)
AC Power Supply Models
L1
L2/N COM
01
00
DC Power Supply Models
03
02
−
+
05
COM
NC
04
00
01
03
02
05
04
Inputs (CIO 0)
Inputs (CIO 0)
Setting Input Functions Using PLC Setup
Address
Word Bit
CIO 0
00
Input operation settings
Normal
Interrupt
Quickinputs
inputs
response
(See note.)
inputs
Normal
input 0
Normal
input 1
Normal
input 2
Normal
input 3
---
---
---
---
---
---
---
---
04
Normal
input 4
Interrupt
input 0
05
Normal
input 5
Interrupt
input 1
Quickresponse
input 0
Quickresponse
input 1
01
02
03
High-speed counters
Operation settings:
High-speed counters enabled
Phase-Z reset
Single-phase Two-phase (differential
(increment
phase x4, up/down, or
pulse input)
pulse/direction)
Counter 0, incre- Counter 0, A phase, up,
ment input
or count input
Counter 1, incre- Counter 0, B phase,
ment input
down, or direction input
Counter 2, incre- Counter 1, A phase, up,
ment input
or count input
Counter 3, incre- Counter 1, B phase,
ment input
down, or direction input
Counter 0,
phase-Z/reset
input
Counter 1,
phase-Z reset
input
Counter 0, phase-Z or
reset input
Counter 1, phase-Z or
reset input
Origin searches
Origin searches
enabled for pulse
outputs 0
------Pulse output 0: Origin proximity input
signal
--Pulse output 0: Origin input signal
63
Section 2-2
Specifications
I/O Terminal Blocks of CPU Units with 10 I/O Points
Output Terminal Block (Bottom Block)
AC Power Supply Models
+
00
−
01
COM
COM
DC Power Supply Models
02
COM
NC
03
NC
00
COM
01
COM
02
COM
03
CIO 100
CIO 100
Setting Functions Using Instructions and PLC Setup
Address
Word
Bit
When the
When a pulse output
instructions to
instruction (SPED, ACC,
the right are not PLS2, or ORG) is executed
executed
Normal outputs
Fixed duty ratio pulse output
CW/CCW
Pulse output
0 (CW)
Pulse output
0 (CCW)
Pulse plus
direction
Pulse output
0 (pulse)
Pulse output
0 (direction)
Normal output 2
Pulse output
1 (CW)
Normal output 3
Pulse output
1 (CCW)
CIO 100 00
Normal output 0
01
Normal output 1
02
03
Note
When origin searches are
enabled in PLC Setup, and an
origin search is executed with
ORG instruction
+ When the origin search
function is used
When the PWM
instruction is
executed
Variable duty ratio
pulse output
PWM output
---
---
---
PWM output 0
Pulse output
1 (pulse)
---
---
Pulse output
1 (direction)
Origin search 0 (Error counter
reset output)
PWM output 1
Prohibiting repeated use of input terminal number
The input terminals are used for input interrupts, quick-response inputs, highspeed counters, origin searches and normal inputs. Therefore, do not use the
input terminals repeatedly.
A priority is as follows when used repeatedly.
Origin search settings > High-speed counter settings > Input settings
Input Specifications
Normal Inputs
Item
Specification
High-speed Counter Inputs
Interrupt Inputs and
Quick-response Inputs
Normal inputs
CIO 0.00 to CIO 0.03
CIO 0.04 to CIO 0.09 (See
note 1.)
CIO 0.10 to CIO 0.11 and
CIO 1.00 to 1.11 (See note 2.)
Input voltage
24 VDC +10%/−15%
Applicable inputs
Input impedance
2-wire and 3-wire sensors
3.0 kΩ
3.0 kΩ
4.7 kΩ
Input current
ON voltage
7.5 mA typical
17.0 VDC min.
7.5 mA typical
17.0 VDC min.
5 mA typical
14.4 VDC min.
OFF voltage/current
ON delay
1 mA max. at 5.0 VDC max.
2.5 µs max.
1 mA max. at 5.0 VDC max.
50 µs max.
1 mA max. at 5.0 VDC max.
1 ms max. (See note 3.)
64
Section 2-2
Specifications
Item
High-speed Counter Inputs
CIO 0.00 to CIO 0.03
OFF delay
Circuit configuration
2.5 µs max.
Specification
Interrupt Inputs and
Quick-response Inputs
Normal inputs
CIO 0.04 to CIO 0.09 (See
note 1.)
CIO 0.10 to CIO 0.11 and
CIO 1.00 to 1.11 (See note 2.)
50 µs max.
1 ms max. (See note 3.)
Input bits: CIO 0.04 to CIO 0.11
IN
Input LED
1000 pF
Internal
circuits
4.3 kΩ
IN
3.0 kΩ
COM
Input bits: CIO 0.00 to CIO 0.03, CIO 1.00 to CIO 1.03
IN
Input LED
IN
3.0 kΩ
910 Ω
1000 pF
Internal
circuits
COM
Input bits: CIO 1.04 to CIO 1.11
IN
Input LED
4.7 kΩ
Internal
circuits
750 Ω
IN
COM
Note
(1) HIgh-speed counter inputs, interrupt inputs, and quick-response inputs
can also be used as normal inputs.
(2) The bits that can be used depend on the model of CPU Unit.
(3) The response time is the hardware delay value. The delay set in the PLC
Setup (0 to 32 ms, default: 8 ms) must be added to this value.
High-speed Counter Inputs
Bit
CIO 0.00,
CIO 0.02
CIO 0.01,
CIO 0.03
CIO 0.04,
CIO 0.05
Differential
phase mode
Pulse plus
Up/down input
Increment
direction input
mode
mode
mode
A-phase pulse
Pulse input
Increment pulse Increment pulse
input
input
input
B-phase pulse
Direction input
Decrement
Normal input
input
pulse input
Z-phase pulse input or hardware reset input (Can be used as ordinary
inputs when high-speed counter is not being used.)
Max. count 50 kHz (4×)
frequency
100 kHz
65
Section 2-2
Specifications
Input Bits for High-speed Counters
Counter
Single phase
Phase A
High-speed counter 0 CIO 0.00
CIO 0.00
Phase B
CIO 0.01
Phase Z
CIO 0.04
High-speed counter 1 CIO 0.01
High-speed counter 2 CIO 0.02
CIO 0.02
---
CIO 0.03
---
CIO 0.05
---
High-speed counter 3 CIO 0.03
---
---
---
Pulse plus direction input mode,
Increment mode
Up/down input mode
Differential phase mode
10.0 µs min.
20.0 µs min.
90%
50%
10%
ON
ON
OFF
2.5 µs
min.
90%
50%
10%
2.5 µs
min.
OFF
ON
OFF
90%
50%
10%
T1
T4
90%
10%
OFF
50 µs
min.
Interrupt Inputs and
Quick-response Inputs
T3
T1, T2, T3, T4: 2.5 µs min.
Input bits: CIO 0.04 to CIO 0.09
ON
T2
50 µs
min.
With CPU Units with 20, 30, 40 or 60 I/O points, the six input bits from CIO
0.04 to CIO 0.09 can be used as either normal inputs or as interrupt or quickresponse inputs depending on the settings in the PLC Setup. With CPU Units
with 14 I/O points, the four input bits from CIO 0.04 to CIO 0.07 can be used
as either normal inputs or as interrupt or quick-response inputs. With CPU
Units with 10 I/O points, the two input bits from CIO 0.04 to CIO 0.05 can be
used as either normal inputs or as interrupt or quick-response inputs.
Input bit
CPU Units with CPU Units CPU Units
20, 30, 40 or with 14 I/O with 10 I/O
60 I/O points
points
points
Interrupt
inputs
Quick-response
inputs
CIO 0.04
CIO 0.05
CIO 0.04
CIO 0.05
CIO 0.04
CIO 0.05
Interrupt input 0 Quick-response input 0
Interrupt input 1 Quick-response input 1
CIO 0.06
CIO 0.07
CIO 0.06
CIO 0.07
-----
Interrupt input 2 Quick-response input 2
Interrupt input 3 Quick-response input 3
CIO 0.08
CIO 0.09
-----
-----
Interrupt input 4 Quick-response input 4
Interrupt input 5 Quick-response input 5
Output Specifications
Relay Outputs
Item
Specification
Max. switching capacity
Min. switching capacity
Service life Electrical
of relay
Mechanical
ON delay
66
2 A, 250 VAC (cosφ = 1)
2 A, 24 VDC (4 A/common)
Resistive
load
Inductive
load
10 mA, 5 VDC
100,000 operations (24 VDC)
48,000 operations (250 VAC, cosφ = 0.4)
20,000,000 operations
15 ms max.
Section 2-2
Specifications
Item
Specification
OFF delay
15 ms max.
Circuit configuration
Output LED
Internal
circuits
OUT
OUT
COM
(1) Under the worst conditions, the service life of output contacts is as shown
above. The service life of relays is as shown in the following diagram as
a guideline.
500
125 VAC resistive load
300
200
30 VDC/250 VAC resistive load
100
30 VDC τ = 7 ms
Life (× 104)
Note
Maximum
250 VAC: 2 A
24 VDC: 2 A
50
30
20
10
5
125 VAC cosφ = 0.4
3
2
0.1
250 VAC cosφ = 0.4
0.2
0.3 0.5 0.7 1
2
3
5
10
Contact current (A)
(2) There are restrictions imposed by the ambient temperature.
CPU Units with Relay Outputs ([email protected]@@DR-D)
Relay Output Load Current Derating Curves for CPU Units and Expansion
I/O Units
CP1L-L14DR-D
CP1L-L20DR-D
CP1L-J14DR-D
CP1L-J20DR-D
CP1L-M30DR-D
100%
CP1L-M40DR-D
CP1L-M60DR-D
100%
Power voltage:
21.6 VDC
100%
Power voltage:
21.6 VDC
50%
0%
Note
Power
voltage:
20.4 VDC
Power voltage:
20.4 VDC
50%
Power voltage:
20.4 VDC
50%
0%
55°C
35
45
Ambient temperature
Power
voltage:
21.6 VDC
0%
35
45 50 55°C
Ambient temperature
55°C
40 45
Ambient temperature
The above restrictions, apply to the relay output load current from
the CPU Unit even if Expansion I/O Units are not connected.
67
Section 2-2
Specifications
Transistor Outputs (Sinking or Sourcing)
Normal Outputs
Item
Specification
CIO 100.00 to CIO 100.03
CIO 100.04 to CIO 100.07 (See note 3.)
Max. switching capac- 4.5 to 30 VDC, 300 mA/output, 0.9 A/common, [email protected] 5.4 A/Unit
ity
[email protected] 3.6 A/Unit
[email protected] 2.7 A/Unit
[email protected] 1.8 A/Unit
[email protected] 1.5 A/Unit (See note 2.)
[email protected] 0.9 A/Unit (See note 2.)
[email protected] 1.8 A/Unit
[email protected] 1.4 A/Unit
Min. switching capacity 4.5 to 30 VDC, 1 mA
Leakage current
0.1 mA max.
Residual voltage
0.6 V max.
1.5 V max.
ON delay
0.1 ms max.
OFF delay
0.1 ms max.
1 ms max.
Fuse
1 fuse/output (See note 1.)
Circuit configuration
• Normal outputs CIO 100.00 to CIO 100.03
• Normal outputs CIO 100.04 to CIO 101.07
(Sinking Outputs)
(Sinking Outputs)
OUT
OUT
Internal
circuits
OUT
L
L
Internal
circuits
OUT
24 VDC/
4.5 to
30 VDC
Internal
circuits
L
L
24 VDC/4.5
to 30 VDC
COM (−)
COM (−)
• Normal outputs CIO 100.00 to CIO 100.03
(Sourcing Outputs)
• Normal outputs CIO 100.04 to CIO 101.07
(Sourcing Outputs)
COM (+)
COM (+)
Internal
circuits
Internal
circuits
OUT
OUT
Note
L
24 VDC/
4.5 to
30 VDC
Internal
circuits
OUT
L
OUT
24 VDC/4.5
to 30 VDC
L
L
(1) The fuse cannot be replaced by the user.
(2) Also do not exceed 0.9 A for the total of CIO 100.00 to CIO 100.03, which
are different common.
(3) The bits that can be used depend on the model of the CPU Unit.
!Caution Do not connect a load to an output terminal or apply a voltage in excess of the
maximum switching capacity.
Pulse Outputs (CIO 100.00 to CIO 100.03)
Item
Max. switching capacity
Min. switching capacity
Max. output frequency
Output waveform
Specification
30 mA/4.75 to 26.4 VDC
7 mA/4.75 to 26.4 VDC
100 kHz
OFF 90%
ON 10%
4 µs min.
2 µs min.
The OFF and ON refer to the output transistor. The output
transistor is ON at level “L”.
68
Section 2-2
Specifications
Note
(1) The load for the above values is assumed to be the resistance load, and
does not take into account the impedance for the connecting cable to the
load.
(2) Due to distortions in pulse waveforms resulting from connecting cable impedance, the pulse widths in actual operation may be smaller than the
values shown above.
PWM Outputs (CIO 100.01 and CIO 100.03)
Item
Max. switching capacity
Specification
30 mA/4.75 to 26.4 VDC
Max. output frequency
PWM output accuracy
1 kHz
For ON duty +1%, −0%:10 kHz output
For ON duty +5%, −0%: 0 to 32.8 kHz output
Output waveform
OFF
ON
tON
ON duty =
T
tON
× 100%
T
The OFF and ON refer to the output transistor. The output
transistor is ON at level “L”.
2-2-4
CP-series Expansion I/O Unit I/O Specifications
Input Specifications (CP1W-40EDR/40EDT/40EDT1/20EDR1/20EDT/20EDT1/8ED)
Item
Input voltage
24 VDC
Input impedance
Input current
4.7 kΩ
5 mA typical
ON voltage
OFF voltage
14.4 VDC min.
5.0 VDC max.
ON delay
OFF delay
1 ms max. (See note 1.)
1 ms max. (See note 1.)
Circuit configuration
Specification
+10%/
−15%
IN
IN
4.7 kΩ
750 Ω
Input LED
Internal
circuits
COM
Note
(1) The response time is the hardware delay value. The delay set in the PLC
Setup (0 to 32 ms, default: 8 ms) must be added to this value. For the
CP1W-40EDR/EDT/EDT1, a fixed value of 16 ms must be added.
(2) Do not apply voltage in excess of the rated voltage to the input terminal.
69
Section 2-2
Specifications
Output Specifications
Relay Outputs (CP1W-40EDR/32ER/20EDR1/16ER/8ER)
Item
Max. switching capacity
Min. switching capacity
Service life Electrical
of relay
(See note.)
Specification
2 A, 250 VAC (cosφ = 1),
2 A, 24 VDC (4 A/common)
5 VDC, 10 mA
150,000 operations (24 VDC)
Resistive
load
Inductive
load
100,000 operations (240 VAC, cosφ = 0.4)
Mechanical
ON delay
OFF delay
Circuit configuration
20,000,000 operations
15 ms max.
15 ms max.
Output LED
Internal
circuits
OUT
OUT
COM
Note
Maximum
250 VAC: 2 A
24 VDC: 2 A
(1) Under the worst conditions, the service life of output contacts is as shown
above. The service life of relays is as shown in the following diagram as
a guideline.
120 VAC resistive load
24 VDC τ = 7 ms
120 VAC cosφ = 0.4
240 VAC cosφ = 0.4
24 VDC/240 VAC resistive load
300
200
Life (× 104)
100
50
30
20
10
5
Switching rate: 1,800 operations/hour
3
2
0.1
0.2
0.3 0.5 0.7 1
2
3
5
Contact current (A)
Output load current(%)
(2) With the CP1W-32ER/CP1W-16ER, the load current is restricted depending on the ambient temperature. Design the system considering the
load current based on the following graph.
70
100
50
0
55
43
Ambient temperature(˚C)
Section 2-2
Specifications
Simultaneously ON points(%)
(3) CP1W-32ER’s maximum number of simultaneously ON output points is
24 (75%). Design the system considering the simultaneously ON points
and load current based on the following curve.
75
0
55
Ambient temperature(˚C)
(4) There are restrictions imposed by the ambient temperature.
Relay Output Load Current Derating Curves for Expansion I/O Units (CP1W8ER/16ER/20EDR1/32ER/40EDR)
Added to CP1L-L14DR-D,
Added to CP1L-M30DR-D
CP1L-L20DR-D, CP1L-J14DR-D
or CP1L-J20DR-D
100%
100%
Power voltage:
21.6 VDC
50%
100%
Power voltage:
21.6 VDC
50%
Power voltage:
20.4 VDC
0%
55°C
40 45
Ambient temperature
Added to CP1L-M40DR-D or
CP1L-M60DR-D
50%
Power
voltage:
20.4 VDC
Power voltage:
20.4 VDC
0%
35
45
55°C
Ambient temperature
Power
voltage:
21.6 VDC
0%
35
45 50 55°C
Ambient temperature
Added to [email protected],
Added to [email protected]
[email protected], [email protected] or [email protected]
Added to [email protected] or
[email protected]
100%
100%
100%
Power voltage:
21.4 VDC
50%
50%
Power voltage:
20.4 VDC
0%
55°C
40 45
Ambient temperature
Power
voltage:
21.6 VDC
Power voltage:
21.6 VDC
50%
Power
voltage:
20.4 VDC
Power voltage:
20.4 VDC
0%
35
45 55°C
Ambient temperature
0%
35
45 55°C
Ambient temperature
71
Section 2-2
Specifications
Transistor Outputs (Sinking or Sourcing)
Item
CP1W-40EDT
CP1W-40EDT1
CP1W-32ET
CP1W-32ET1
Specification
CP1W-20EDT
CP1W-20EDT1
CP1W-16ET
CP1W-16ET1
CP1W-8ET
CP1W-8ET1
4.5 to 30 VDC
0.3 A/output
4.5 to 30 VDC
0.3 A/output
24 VDC10%/−5%
0.3 A/output
4.5 to 30 VDC
0.3 A/output
0.9 A/common
3.6 A/Unit
0.9 A/common
7.2 A/Unit
0.9 A/common
1.8 A/Unit
0.9 A/common
3.6 A/Unit
• OUT00/01 4.5 to
30 VDC, 0.2 A/
output
• OUT02 to 07 4.5
to 30 VDC, 0.3
A/output
0.9 A/common
1.8 A/Unit
Leakage current
Residual voltage
0.1 mA max.
1.5 V max.
0.1 mA max.
1.5 V max.
0.1 mA max.
1.5 V max.
0.1 mA max.
1.5 V max.
0.1 mA max.
1.5 V max.
ON delay
OFF delay
0.1 ms max.
1 ms max.
24 VDC +10%/−5%
5 to 300 mA
16 pts (100%)
0.1 ms max.
1 ms max.
24 VDC +10%/−5%
5 to 300 mA
24 pts (75%)
0.1 ms.
1 ms max.
24 VDC +10%/−5%
5 to 300 mA
8 pts (100%)
0.1 ms max.
1 ms max.
24 VDC +10%/−5%
5 to 300 mA
16 pts (100%)
0.1 ms max.
1 ms max.
24 VDC +10%/−5%
5 to 300 mA
8 pts (100%)
Max. switching
capacity
(See note2.)
Max. number of
Simultaneously
ON Points of Output
Fuse (See note 1.)
Circuit configuration
1 fuse/common
Sinking Outputs
Sourcing Outputs
Output LED
Output LED
OUT
L
COM (+)
L
Internal
circuits
OUT
24 VDC/4.5
to 30 VDC
Internal
circuits
OUT
L
COM (−)
24 VDC/4.5
to 30 VDC
L
OUT
Note
(1) The fuse cannot be replaced by the user.
(2) If the ambient temperature is maintained below 50°C, up to 0.9 A/common can be used.
(A)
Total current for common
0.9
0.8
0
Ambient temperature
50 55 (°C)
!Caution Do not connect a load to an output terminal or apply a voltage in excess of the
maximum switching capacity.
72
Section 2-3
CP1L CPU Unit Operation
2-3
2-3-1
CP1L CPU Unit Operation
Overview of CPU Unit Configuration
The CP1L CPU Unit memory consists of the following blocks.
Built-in inputs
CPU Unit
RAM
(3)
User program
Flash memory
(1)
Analog adjuster
I/O memory
External analog
setting input
FB program
memory
AR Area
(2)
DM Area
(3)
PLC Setup
and other
parameters
User
program
Comment
memory
Access
(1)
Memory
Cassette
(3)
(3)
(3)
DM Area
initial values
PLC Setup
and other
parameters
(3)
Built-in outputs
(1)
• Data is backed up from RAM to the built-in flash memory when
changes are made, e.g., from the CX-Programmer.
• When the power supply is turned ON, data is transferred from the builtin flash memory to RAM.
(2)
• A CX-Programmer operation can be used to transfer DM Area initial
values from RAM to the built-in flash memory.
• The PLC Setup can be set so that DM Area initial values are transferred from the built-in flash memory to RAM when the power supply
is turned ON.
(3)
• CX-Programmer operations can be used to transfer data from RAM to
the Memory Cassette or from the built-in flash memory to the Memory
Cassette.
73
Section 2-3
CP1L CPU Unit Operation
• When the power supply is turned ON, data is transferred from the
Memory Cassette to the built-in flash memory and RAM. Data can also
be transferred from the Memory Cassette to the built-in flash memory
and RAM using the CX-Programmer.
User Program
The user program consists of up to 288 tasks, including interrupt tasks. Each
task is programmed from the CX-Programmer and then transferred to the
CPU Unit.
There are two types of tasks: cyclic tasks and interrupt tasks. Cyclic tasks are
executed once each cycle and interrupt tasks are executed only when the
interrupt conditions are met. There can be up to 32 cyclic tasks and up to 256
interrupt tasks. Cyclic tasks are executed in the order of the task numbers.
Instructions programmed in the tasks are executed in order from the first
instruction and then I/O memory is refreshed. When all cyclic tasks have been
executed, I/O refreshing with PLC Units is performed and then the cyclic tasks
are executed again starting from the one with the lowest task number. This is
called the cyclic scan method.
I/O Memory
The I/O memory area is a RAM area read and written by the user. Some parts
of the I/O memory are cleared when the power is interrupted. Other parts are
maintained. There are parts that used for data exchange with PLC Units and
parts that are used internally.
There are two ways to refresh the parts of I/O memory used for data
exchange with PLC Units: Once each program execution cycle and immediately when needed when executing specific instructions.
Parameter Area
In addition to the I/O memory used as instructions operands by the user, there
is also a separate memory area that can be manipulated only from the CXProgrammer. This area, called the parameter area, contains the following.
• PLC Setup
• Routing tables
PLC Setup
74
The PLC Setup contains configuration parameters that can be set by the user
to define the basic specifications of the CPU Unit. Included are serial port settings, a minimum cycle time setting, and other parameters. For details, refer to
the CX-Programmer Operation Manual.
Section 2-3
CP1L CPU Unit Operation
Routing Tables
Tables specifying the communications paths from the Communications Units
on the local PLC to remote PLCs connected on other networks must be registered in all the CPU Units in network PLCs to send and receive data between
networks. These tables are called the routing tables. The routing tables consist of the relay network table and local network table.
Routing tables are created from the CX-Programmer or Support Software for
Communications Units (e.g., CX-Integrator) and then transferred to each CPU
Unit.
Relay Network Table for PLC 1
Node M
Network 2
PLC 3
PLC 1
PLC 2
Remote
network
Relay
network
Relay
node
3
1
N
Relay Network Table for PLC 2
Unit number n
PLC 4
Network 1
Remote
network
Relay
network
3
2
Relay
node
M
Network 3
Local Network Table for PLC 3
Node N
Local
network
Unit
number
3
n
Remote Network Table
The remote network tables lists the node number and network address of the
first relay node that must be passed through to reach any remote network to
which the PLC is not directly connected. Once the routing tables have been
registered, any remote network can be reached by passing through relay
nodes.
Local Network Table
The local network table contains the unit number and network address of all
Communications Units that are part of the local PLC.
75
Section 2-3
CP1L CPU Unit Operation
Built-in Flash Memory
Flash memory is built into the CP1L CPU Units. Data in the following areas is
automatically backed up to the flash memory whenever it is written in any way
other than by instructions in the user program, e.g., when the CX-Programmer
or PT is used to transfer or edit data, edit the program online, or transfer data
from a Memory Cassette.
• User program area
• Parameter area (PLC Setup and routing tables)
The next time the power supply is turned ON, the data in the built-in flash
memory is automatically transferred to user memory (i.e., the user program
area and parameter area).
It is also possible to save data from data areas in I/O memory in the built-in
flash memory using operations from the CX-Programmer.
The symbol table, comment file, and program index file can be stored in the
comment memory in flash memory. When the program is transferred from the
CX-Programmer to the CPU Unit, function block program information is also
stored automatically in flash memory.
Note
Memory Cassette
Memory Cassettes can be used as required in system operation and maintenance. For example, they can be used to save programs, data memory contents, PLC Setup data, or I/O comments from the CX-Programmer. The
contents of a Memory Cassette can also be automatically transferred if
desired.
Note
76
The BKUP indicator on the front of the CPU Unit will light whenever the built-in
flash memory is being written or the Memory Cassette is being accessed.
Never turn OFF the power supply to the CPU Unit when the BKUP indicator is
lit.
Memory Cassette cannot be used in CP1L-J CPU Unit.
Section 2-3
CP1L CPU Unit Operation
2-3-2
Flash Memory Data Transfers
Built-in Flash Memory
Writing to Flash Memory
Data
User program and
parameter data
Transfer method
This data is automatically transferred from RAM to flash memory when a project is transferred from the CX-Programmer,
when the data is written to RAM from a PT or other external
device, or when the data is transferred from a Memory Cassette.
DM Area data
This data is transferred to flash memory only when the transfer is specified from the CX-Programmer.
Comment memory
data
This data is written to flash memory when a project is transferred from the CX-Programmer and transferring comment
memory is specified.
Function block
source data
This data is written to flash memory when a project containing
one or more function blocks is transferred from the CX-Programmer.
Write operation from CX-Programmer
or automatic transfer from Memory
Cassette at startup.
CPU Unit
Built-in flash memory
RAM
User program
area
User program
area
Automatic write
Write
Write
Parameter area
Automatic write
I/O memory area
Parameter area
Write operation
to flash memory
DM Area
Write
DM Area initial
values
Battery
Backup
Write (comment memory specified)
Write
Comment memory
area
FB source memory
area
FB = Function block
77
Section 2-3
CP1L CPU Unit Operation
Reading from Flash
Memory
Data
User program and
parameter data
DM Area data
Comment memory
data
Function block
source data
Read method
This data is automatically read to RAM when power is turned
ON.
Reading this data when power is turned ON can be enabled or
disabled in the PLC Setup.
When the project is transferred from the CX-Programmer,
comment memory can be specified as a destination to transfer
the comment memory data to built-in flash memory.
When a project that contains function blocks is transferred
from the CX-Programmer, the function block source data is
transferred to built-in flash memory.
CPU Unit
Built-in flash memory
RAM
Power
ON
User program area
Auto read
User program
area
Power
ON
Parameter area
Auto read
I/O memory area
Parameter area
When power-ON
transfer is specified
in PLC Setup.
DM Area
Auto read
DM Area initial
values
Battery
Backup
Comment
memory area
FB source
memory area
FB = Function block
78
Section 2-3
CP1L CPU Unit Operation
2-3-3
Memory Cassette Data Transfers
Note
Memory Cassette cannot be used in CP1L-J CPU Unit.
Writing to a Memory Cassette
Data
Method
User program and
parameter data
Comment memory
and function block
source data
Source
Data is written to a Memory
Cassette using write operations from the CX-Programmer.
DM Area data
Data in the built-in flash memory is written to the Memory
Cassette.
Either of both of the following
can be transferred to the
Memory Cassette.
• Data in the built-in flash
memory.
• Data in RAM.
Memory
Cassette write
operation from
CX-Programmer
CPU Unit
RAM
Built-in flash memory
Memory Cassette
User program
area
User program
area
Parameter area
Parameter area
Parameter area
DM Area initial
values
DM Area initial
values
User program
area
I/O memory
area
DM Area
Battery
Backup
FB = Function block
Comment
memory area
FB source
memory area
Comment
memory area
FB source
memory area
DM Area
data from RAM
79
Section 2-3
CP1L CPU Unit Operation
Reading from a Memory Cassette
Data
User program and
parameter data
Method
This data is transferred by
turning SW2 on the DIP
switch to ON and turning ON
the power supply.
Destination
Data in the Memory Cassette
is transferred to RAM and
then automatically transferred
to the built-in flash memory.
Comment memory
and function block
source data
Data is transferred to the builtin flash memory.
DM Area data
DM Area data originally from
the built-in flash memory is
transferred back to the flash
memory and DM Area data
originally from RAM is transferred to RAM.
CPU Unit
Power turned ON with SW2 turned ON
RAM
Built-in flash memory
User program
area
Parameter
area
User program
area
Memory Cassette
User program
area
Parameter area
Parameter area
I/O memory area
DM Area
DM Area initial
values
DM Area initial
values
Battery
Backup
FB = Function block
80
Comment
memory area
FB source
memory area
Comment
memory area
FB source
memory area
DM Area
data from RAM
Section 2-4
CPU Unit Operation
2-4
2-4-1
CPU Unit Operation
General Flow
The following flowchart shows the overall operation of the CPU Unit. First the
user program is executed and then I/O is refreshed and peripheral servicing is
performed. These processes are then repeated in cyclic fashion.
Power ON
Startup
initialization Initialize hardware
memory and system work
area.
Detect I/O.
Automatically transfer data
from Memory Cassette.
Overseeing Check the Battery.
processing
Read DIP switch settings.
Check I/O bus.
Program
execution
Cycle time
Clear I/O memory.
Check user memory.
Clear forced status, etc.
Check user program
memory.
Operation processing: Execute the user program.
Error processing: Turn OFF outputs. (Reset Units
for bus errors.)
After error: Clear I/O memory if an error occurs
(unless a FALS(007) instruction created the error).
I/O refreshing Refresh data for the following Units.
(even in
CP-series Expansion Units and Expansion I/O Units
PROGRAM
mode)
Peripheral
servicing
Perform the following servicing if any events have occurred.
Peripheral USB port servicing
Serial port servicing
Communications port servicing
Built-in flash memory access servicing
Memory Cassette access servicing
Online editing
81
Section 2-4
CPU Unit Operation
2-4-2
I/O Refreshing and Peripheral Servicing
I/O Refreshing
I/O refreshing involves cyclically transferring data with external devices using
preset words in memory. I/O refreshing includes the following:
• Refreshing between I/O words in the CIO Area and CPU Unit built-in I/O,
CP-series Expansion Units, and CP-series Expansion I/O Units
All I/O refreshing is performed in the same cycle (i.e., time slicing is not used).
I/O refreshing is always performed after program execution.
Units
CPU Unit built-in I/O
CP-series Expansion Units
and Expansion I/O Units
Peripheral Servicing
Max. data exchange
Data exchange area
2 input words
I/O Bit Area
2 output words
Fixed depending on Units I/O Bit Area
Peripheral servicing involves servicing non-scheduled events for external
devices. This includes both events from external devices and service requests
to external devices.
Most peripheral servicing involves FINS commands. The specific amount of
time set in the system is allocated to each type of servicing and executed
every cycle. If all servicing cannot be completed within the allocated time, the
remaining servicing is performed the next cycle.
Service
USB port servicing
Communications port servicing
Communications port servicing
Built-in flash memory access
servicing
Description
• Non-scheduled servicing for FINS or Host Link
commands received via a USB port or serial port
from the CX-Programmer, PTs, or host computers
(e.g., requests for program transfers, monitoring,
forced-set/reset operations, or online editing)
• Non-scheduled servicing from the CPU Unit transmitted from a serial port (non-solicited communications)
• Servicing to execute network communications or
serial communications for the SEND, RECV, CMND
or PMCR instructions using communications ports
0 to 7 (internal logical ports)
• Servicing to execute background execution using
communications ports 0 to 7 (internal logical ports)
• Read/write processing for built-in flash memory
Memory Cassette access ser- • Read/write processing for a Memory Cassette
vicing
Note
(1) Peripheral USB port, serial port, and communications port servicing is allocated 8% of the previous cycle time by default (the default can be
changed) for each service. If servicing is separated over many cycles, delaying completion of the servicing, set the same allocated time (same
time for all services) rather than a percentage under execute time settings
in the PLC Setup.
(2) An error will be occurred if the cycle time is too long. Modify the CX-Programmer’s response monitoring time longer according to the following
method.
Start the CX-Programmer. Select Change Model from the PLC Menu.
The Change PLC Dialog Box will be displayed. Click the Settings Button
on the right side of Network Type. The Network Settings [USB] Dialog
Box will be displayed. Click the Network Tab and increase the value in
Response Timeout(s).
82
Section 2-4
CPU Unit Operation
2-4-3
I/O Refresh Methods
I/O for CPU Unit built-in I/O and I/O on CP-series Expansion Units and Expansion I/O Units is performed at the following times.
1,2,3...
1. Cyclic refresh period
2. When instructions with an immediate refresh variation are executed
3. When IORF(097) is executed
Cyclic Refreshing
I/O is refreshed after all the instructions in executable tasks have been executed.
Cycle
END(001)
Task
END(001)
Task
END(001)
Task
I/O terminal
status
I/O refresh period
Immediate Refreshing
When the immediate refreshing variation of an instruction is specified and the
instruction’s operand is an input bit or word in the Built-in I/O Area, the word
containing the bit or the word itself will be refreshed.
I/O terminal status (built-in I/O)
Immediate refresh
15 11
!LD
0.00
CIO 0
!OUT
100.00
CIO 100
15
0
7
15 11
!MOV
1
101
0
0
CIO 1
7
CIO 101
Note
(1) Immediate refreshing is possible only for the Built-in I/O Area. Use
IORF(097) for I/O on CP-series Expansion Units and Expansion I/O
Units.
(2) Refreshing Range
• Bit Operands
The ON/OFF status of the 16 I/O points allocated to the word containing the specified bit will be refreshed.
• Word Operands
The ON/OFF status of the 16 I/O points allocated to the specified word
will be refreshed.
83
Section 2-4
CPU Unit Operation
(3) Refresh Timing
• Input or source operands are read just before the instruction is executed.
• Output or destination (results) operands are written just after the instruction is executed.
(4) Using instructions with the immediate refresh option, instruction execution time will be increased, increasing the overall cycle time. Be sure to
confirm that this will not adversely affect system operation.
IORF(097) Refreshing
When IORF(097) (I/O REFRESH) is executed, the I/O bits in the specified
range of words are refreshed. IORF(097) can be used for CP-series Expansion Units and Expansion I/O Units.
IORF
St
E
St: Starting word
E: End word
All the words from St to E, inclusive
are refreshed.
Example
IORF
2
Here, the four words from CIO 2
to CIO 5 are refreshed.
5
If high-speed response is required from input to output, execute IORF(097)
before and after the relevant instructions.
Note
2-4-4
IORF(097) has a relatively long execution time which increases with the number of words being refreshed. Be sure to consider the affect of this time on the
overall cycle time. Refer to the CP Series Programmable Controllers Programming Manual for instruction execution times.
Initialization at Startup
The following initializing processes will be performed once each time the
power is turned ON.
• Confirm mounted Units and I/O allocations.
• Clear the non-holding areas of I/O memory according to the status of the
IOM Hold Bit. (See note 1.)
• Clear forced status according to the status of the Forced Status Hold Bit.
(See note 2.)
• Automatically transfer data from the Memory Cassette if one is mounted
and automatic transfer at startup is specified.
• Perform self-diagnosis (user memory check).
• Restore the user program. (See note 3.)
84
Section 2-5
CPU Unit Operating Modes
Note
(1) The I/O memory is held or cleared according to the status of the IOM Host
Bit and the setting for IOM Hold Bit Status at Startup in the PLC Setup
(read only when power is turned ON).
Auxiliary bit
PLC Setup setting
IOM Hold Bit Status Clear
at Startup
(OFF)
Hold
(ON)
Note
IOM Hold Bit (A500.12)
Clear (OFF)
Hold (ON)
At power ON: Clear
At power ON: Clear
At mode change: Clear At mode change: Hold
At power ON: Hold
At mode change: Hold
When the mode is changed between PROGRAMMING mode and
RUN or MONITOR mode, I/O memory initialization is according to
the status of the IOM Hold Bit at that time.
(2) The forced status held or cleared according to the status of the Force Status Hold Bit and the setting for Forced Status Hold Bit Status at Startup
in the PLC Setup (read only when power is turned ON).
Auxiliary bit
PLC Setup setting
Forced Status Hold
Bit Status at Startup
Note
Forced Status Hold Bit (A500.13)
Clear (OFF)
Hold (ON)
Clear At power ON: Clear
(OFF) At mode change: Clear
Hold
(ON)
At power ON: Clear
At mode change: Hold
At power ON: Hold
At mode change: Hold
When the mode is changed between PROGRAMMING mode and
RUN or MONITOR mode, forced status initialization is according to
the status of the Forced Status Hold Bit at that time.
(3) User program recovery is performed if online editing is performed but the
power supply to the PLC is turned OFF before the CPU Unit can complete
backup processing. The BKUP indicator will light during backup processing.
2-5
2-5-1
CPU Unit Operating Modes
Operating Modes
The CPU Unit has three operating modes that control the entire user program
and are common to all tasks.
PROGRAM:
Programs are not executed and preparations, such as initializing the PLC Setup and other settings, transferring programs, checking programs, force-setting and force-resetting
can be executed prior to program execution.
MONITOR:
Programs are executed, but some operations, such as online
editing, forced-set/reset, and changes to present values in I/O
memory, are enabled for trial operation and other adjustments.
RUN:
Programs are executed and some operations are disabled.
85
Section 2-5
CPU Unit Operating Modes
2-5-2
Status and Operations in Each Operating Mode
The following table lists status and operations for each mode.
Operation
Program execution
PROGRAM mode
Stopped
RUN mode
Executed
MONITOR mode
Executed
I/O refreshing
External I/O status
Executed
OFF
Executed
According to program
Executed
According to program
I/O memory
Non-holding memory
Holding memory
Cleared
Held
According to program
According to program
CX-Programmer
operations
I/O memory monitoring
Program monitoring
OK
OK
OK
OK
OK
OK
From CPU Unit OK
To CPU Unit
OK
OK
X
OK
X
Program
transfers
Checking program
Setting PLC Setup
OK
OK
X
X
X
X
Changing program
Force-setting/resetting
OK
OK
X
X
OK
OK
Changing timer/counter SV OK
Changing timer/counter PV OK
X
X
OK
OK
Change I/O memory PV
X
OK
OK
Note The following table shows the relationship of operating modes to tasks.
Mode
Cyclic task status
Interrupt task
status
Stopped
PROGRAM
Disabled status (INI)
RUN
Executed if inter• Any task that has not yet been executed, will be in disabled status (INI).
• A task will go to READY status if the task is set to go to READY status at star- rupt condition is
met.
tup or the TASK ON (TKON) instruction has been executed for it.
• A task in READY status will be executed (RUN status) when it obtains the
right to execute.
• A status will go to Standby status (WAIT) if a READY task is put into Standby
status by a TASK OFF (TKOF) instruction.
MONITOR
2-5-3
Operating Mode Changes and I/O Memory
Operating Mode Changes and I/O Memory
Mode Changes
Non-holding areas
• I/O bits
• Data Link bits
• Work bits
• Timer PV/Completion Flags
• Index Registers
• Data Registers
• Task Flags
Auxiliary Area bits/words are holding or
non-holding depending on the address.
Holding Areas
• HR Area
• DM Area
• Counter PV and Completion Flags
Auxiliary Area bits/words are holding or
non-holding depending on the address.
RUN or MONITOR to PROGRAM Cleared (See note 1.)
PROGRAM to RUN or MONITOR Cleared (See note 1.)
Held
Held
RUN to MONITOR or
MONITOR to RUN
Held
86
Held (See note 2.)
Section 2-5
CPU Unit Operating Modes
Note
1. The following processing is performed if the I/O Memory Hold Bit is ON.
Outputs from Output Units will be turned OFF when operation stops even
if I/O bit status is held in the CPU Unit.
2. The cycle time will increase by approximately 10 ms when the operating
mode is changed from MONITOR to RUN mode. This will not, however,
cause an error for exceeding the maximum cycle time limit.
I/O Memory
Hold Bit status Mode changed
(A500.12)
between
PROGRAM
and RUN/
MONITOR
OFF
ON
Cleared
Held
I/O Memory
Operation stopped
Fatal error
other than
FALS
Cleared
Held
FALS
executed
Held
Held
Output bits allocated to Output Units
Mode changed
Operation stopped
between
Fatal error
FALS
PROGRAM
other than
executed
and RUN/
FALS
MONITOR
OFF
Held
OFF
OFF
OFF
OFF
Note Refer to SECTION 4 I/O Memory Allocation.
2-5-4
Startup Mode Setting
This setting in the PLC Setup determines the operating mode that will be used
by the CPU Unit when the power supply is turned ON.
PLC Setup
Name
Startup Mode
Description
Specifies the
CPU Unit operating mode at
startup
Settings
• Program (See note.)
• Monitor
• Run
• Use programming console
Default
Use programming console
(See note.)
Note
A Programming Console cannot be connected to the CP1L.
Note
A Programming Console cannot be connected to a CP1L CPU Unit. If Use
programming console is set, the CPU Unit will start in RUN mode.
87
Section 2-6
Power OFF Operation
2-6
2-6-1
Power OFF Operation
Overview
The following processing is performed when CPU Unit power is turned OFF.
Power OFF processing will be performed if the power supply voltage falls
below the specified value while the CPU Unit is in RUN or MONITOR mode.
1,2,3...
1. The CPU Unit will stop.
2. Outputs from all Output Units will be turned OFF.
Note
(1) All outputs will turn OFF despite the status of the I/O Memory Hold Bit or
I/O Memory Hold Bit at power ON settings in the PLC Setup.
(2) AC Power
85% of the rated voltage: 85 V or less for a 100 to 240 V AC system
(3) DC Power
90% of rated voltage: 20.4 V DC or less
The following processing will be performed if power drops only momentarily
(momentary power interruption).
1,2,3...
1. The system will continue to run unconditionally if the momentary power interruption lasts less than 10 ms for AC power or 2 ms for DC power, i.e.,
the time it takes the rated voltage at 85% or less to return to 85% or higher
is less than 10 ms for AC power or the time it takes the rated voltage at 90%
or less to return to 90% or higher is less than 2 ms for DC power.
2. A momentary power interruption that lasts more than 10 ms for AC power
or more than 2 ms for DC power may or may not be detected.
85% of the rated voltage or less for AC power
90% of the rated voltage or less or DC power
10 ms
Time
0
0 to 10 ms for AC
0 to 2 ms for DC
Momentary power
interruption not detected
and operation continues.
Power supply
voltage
Greater than 10 ms for AC
Greater than 2 ms for DC
Power supply
voltage
Operation will continue or stop
depending on whether or not a
momentary power interruption is
detected.
The following timing chart shows the CPU Unit power OFF operation in more
detail.
88
Section 2-6
Power OFF Operation
Power OFF Timing Chart
Operation always stopped
at this point regardless.
AC: 85% of rated voltage
DC: 90% of rated voltage
Holding time for 5 V internal
power supply after power
OFF detection: 1 ms
Power OFF detected
Power OFF Detection
Delay Time
AC: 10 ms
DC: 2 ms
Power OFF detected signal
Program execution status
Cyclic tasks or interrupt tasks
Stopped
CPU reset signal
Power OFF detection time:
The time from when the power supply voltages drops to 85% or less of the rated
voltage for AC power or 90% for DC power until the power OFF condition is detected.
Holding time for 5 V internal power supply after power OFF detection:
The maximum time that the 5 V internal power supply voltage will be maintained after
the power OFF condition is detected. The holding time is fixed at 1 ms.
Description of Operation
Power OFF will be detected if the 100 to 240 V AC power supply falls below
85% of the rated voltage or the DC power supply falls below 90% of the rated
voltage for the power OFF detection time (10 ms minimum for AC power and
2 ms minimum for DC power). The CPU reset signal will turn ON while the
internal power supply is being held and the CPU Unit will be reset.
2-6-2
Instruction Execution for Power Interruptions
If power is interrupted and the interruption is detected when the CPU Unit is
operating in RUN or MONITOR mode, the instruction currently being executed
will be completed and then the CPU Unit will be reset.
89
Section 2-7
Computing the Cycle Time
2-7
2-7-1
Computing the Cycle Time
CPU Unit Operation Flowchart
The CPU Unit processes data in repeating cycles from the overseeing processing up to peripheral servicing as shown in the following diagram.
Power ON
Checks Unit connection status.
Startup
initialization
Checks hardware and user
program memory.
Overseeing
processing
Error
Check OK?
Normal
Sets error flags.
PLC
cycle
time
ERR/ALM
indicator ON or
flashing?
Flashing
(nonfatal error)
Executes user program (i.e.,
executes READY cyclic tasks).
Program
execution
ON (fatal error)
End of program?
NO
YES
Waits until the set cycle time
has elapsed.
Cycle time
calculation
Calculates cycle time.
I/O
refreshing
Performs I/O refreshing.
Services peripheral devices.
90
Peripheral
servicing
Section 2-7
Computing the Cycle Time
2-7-2
Cycle Time Overview
The cycle time depends on the following conditions.
• Type and number of instructions in the user program (in all cyclic tasks
that are executed during a cycle, and within interrupt tasks for which the
execution conditions have been satisfied)
• Type and number of CP-series Expansion Units and Expansion I/O Units
• Use of protocol macros and the largest communications message
• Fixed cycle time setting in the PLC Setup
• Use of USB and serial ports
• Fixed peripheral servicing time in the PLC Setup
Note
1. The cycle time is not affected by the number of tasks that are used in the
user program. The tasks that affect the cycle time are those cyclic tasks
that are READY in the cycle.
2. When the mode is switched from MONITOR mode to RUN mode, the cycle
time will be extended by 10 ms (this will not, however, take the cycle time
over its limit).
The cycle time is the total time required for the PLC to perform the five operations given in the following tables.
Cycle time = (1) + (2) + (3) + (4) + (5)
1: Overseeing
Details
Checks the I/O bus and user program memory, checks for
battery errors, etc.
Processing time and fluctuation cause
0.4 ms
2: Program Execution
Details
Executes the user program, and calculates the total time
time taken for the instructions to execute the program.
Processing time and fluctuation cause
Total instruction execution time
3: Cycle Time Calculation
Details
Processing time and fluctuation cause
Waits for the specified cycle time to elapse when a minimum When the cycle time is not fixed, the time for step 3 is
(fixed) cycle time has been set in the PLC Setup.
approximately 0.
When the cycle time is fixed, the time for step 3 is the preset
Calculates the cycle time.
fixed cycle time minus the actual cycle time ((1) + (2) + (4) +
(5)).
4: I/O Refreshing
Details
CPU Unit built- Outputs from the CPU Unit to the actual
in I/O and I/O outputs are refreshed first for each Unit,
on CP-series
and then inputs.
Expansion
Units and
Expansion I/O
Units
Processing time and fluctuation cause
I/O refresh time for each Unit multiplied by the number of
Units used.
91
Section 2-7
Computing the Cycle Time
5: Peripheral Servicing
Details
Services USB port.
Processing time and fluctuation cause
If a uniform peripheral servicing time hasn’t been set in the PLC Setup for
this servicing, 8% of the previous cycle’s cycle time (calculated in step (3))
will be allowed for peripheral servicing.
If a uniform peripheral servicing time has been set in the PLC Setup, servicing will be performed for the set time. Servicing will be performed for at
least 0.1 ms, however, whether the peripheral servicing time is set or not.
If the ports are not connected, the servicing time is 0 ms.
Services serial ports
Services communications ports.
Services built-in flash memory access.
Serves Memory Cassette access.
2-7-3
If a uniform peripheral servicing time hasn’t been set in the PLC Setup for
this servicing, 8% of the previous cycle’s cycle time (calculated in step (3))
will be allowed for peripheral servicing.
If a uniform peripheral servicing time has been set in the PLC Setup, servicing will be performed for the set time. Servicing will be performed for at
least 0.1 ms, however, whether the peripheral servicing time is set or not.
If no communications ports are used, the servicing time is 0 ms.
If a uniform peripheral servicing time hasn’t been set in the PLC Setup for
this servicing, 8% of the previous cycle’s cycle time (calculated in step (3))
will be allowed for peripheral servicing.
If a uniform peripheral servicing time has been set in the PLC Setup, servicing will be performed for the set time. Servicing will be performed for at
least 0.1 ms, however, whether the peripheral servicing time is set or not.
If there is no access, the servicing time is 0 ms.
Functions Related to the Cycle Time
Minimum Cycle Time
Set the minimum cycle time to a non-zero value to eliminate inconsistencies in
I/O responses. A minimum cycle time can be set in the PLC Setup between 1
and 32,000 ms in 1-ms increments.
Minimum cycle time
(effective)
Minimum cycle time
(effective)
Actual cycle
time
Actual cycle
time
Minimum cycle time
(effective)
Actual cycle
time
This setting is effective only when the actual cycle time is shorter than the
minimum cycle time setting. If the actual cycle time is longer than the minimum cycle time setting, the actual cycle time will remain unchanged.
Minimum cycle time
Actual cycle
time
Minimum cycle time
Actual cycle
time
Minimum cycle time (effective)
Actual cycle
time
PLC Setup
Name
Minimum cycle time
92
Settings
Default
0000 to 7D00 hex
0000 hex: Variable cycle time
(1 to 32,000 ms in 1-ms increments)
Section 2-7
Computing the Cycle Time
Watch Cycle Time
If the cycle time exceeds the watch (maximum) cycle time setting, the Cycle
Time Too Long Flag (A401.08) will be turned ON and PLC operation will be
stopped.
PLC Setup
Name
Settings
Enable Watch Cycle
Time Setting
0: Default (1 s)
1: User setting
Watch Cycle Time
001 to FA0: 10 to 40,000 ms
(10-ms increments)
Default
0000 hex: Watch cycle time of
1s
Related Flags
Name
Address
Cycle Time Too Long A401.08
Flag
Cycle Time
Monitoring
Description
Turns ON if the present cycle time exceeds the
Watch Cycle Time set in the PLC Setup.
The maximum cycle time is stored in A262 and A263 and the present cycle
time is stored in A264 and A265 every cycle.
Related Words
Name
Addresses
Maximum Cycle
Time
A262 and
A263
Present Cycle Time
A264 and
A265
Description
These words contain the maximum cycle time in
increments of 0.1 ms. The time is updated every
cycle and is recorded in 32-bit binary (0 to FFFF
FFFF hex, or 0 to 429,496,729.5 ms). (A263 is
the leftmost word.)
These words contain the present cycle time in
increments of 0.1 ms. The time is updated every
cycle and is recorded in 32-bit binary (0 to FFFF
FFFF, or 0 to 429,496,729.5 ms). (A265 is the
leftmost word.)
The average cycle time for the past eight cycles can be read from the CX-Programmer.
Note
The following methods are effective in reducing the cycle time.
• Place tasks that do not need to be executed on standby.
• Use JMP-JME instructions to skip instructions that do not need to be executed.
93
Section 2-7
Computing the Cycle Time
2-7-4
I/O Refresh Times for PLC Units
CP-series Expansion Unit and Expansion I/O Unit I/O Refresh Times
Name
Expansion I/O Units
Model
CP1W-40EDR
I/O refresh time per Unit
0.39 ms
CP1W-40EDT
CP1W-40EDT1
0.39 ms
0.39 ms
CP1W-32ER
CP1W-32ET
0.33 ms
0.33 ms
CP1W-32ET1
CP1W-20EDT
0.33 ms
0.18 ms
CP1W-20EDT1
CP1W-16ER
0.18 ms
0.25 ms
CP1W-16ET
CP1W-16ET1
0.25 ms
0.25 ms
CP1W-8ED
CP1W-8ER
0.13 ms
0.08 ms
CP1W-8ET
0.08 ms
Analog Input Units
CP1W-8ET1
CP1W-AD041
0.08 ms
0.61 ms
Analog Output Units
CP1W-AD042
CP1W-DA021
0.87 ms
0.33 ms
CP1W-DA041
CP1W-DA042
0.33 ms
0.40 ms
CP1W-MAD11
CP1W-MAD42
0.32 ms
0.87 ms
CP1W-MAD44
CP1W-TS001
0.97 ms
0.25 ms
CP1W-TS002
CP1W-TS003
0.52 ms
0.67 ms
CP1W-TS004
CP1W-TS101
0.47 ms
0.25 ms
CP1W-TS102
CP1W-SRT21
0.52 ms
0.21 ms
Analog I/O Units
Temperature Sensor Units
CompoBus/S I/O Link Unit
Note
2-7-5
The I/O refresh time for CPU Unit built-in I/O is included in overhead processing.
Cycle Time Calculation Example
The following example shows the method used to calculate the cycle time
when CP-series Expansion I/O Units only are connected to a CP1L CPU Unit.
Conditions
Item
94
CP1L
CP1W-40EDR
40-pt I/O Unit
User program
5 K steps
USB port connection
Fixed cycle time processing
Yes and no
No
Serial port connection
Other peripheral servicing
No
No
Details
1 Unit
LD instructions: 2.5 Ksteps,
OUT instructions: 2.5 Ksteps
Section 2-7
Computing the Cycle Time
Calculation Example
Process name
Calculation
Processing time
USB port
connected
(1) Overseeing
(2) Program execution
2-7-6
USB port not
connected
--0.55 µs × 2,500 + 1.1 µs
× 2,500
(3) Cycle time calculation (Minimum cycle time not
set)
0.4 ms
4.1 ms
0.4 ms
4.1 ms
0 ms
0 ms
(4) I/O refreshing
(5) Peripheral servicing
0.39 ms
(Only USB port connected)
0.39 ms
0.1 ms
0.39 ms
0 ms
Cycle time
(1) + (2) + (3) + (4) + (5)
4.99 ms
4.89 ms
Online Editing Cycle Time Extension
When online editing is executed to change the program from the CX-Programmer while the CPU Unit is operating in MONITOR mode, the CPU Unit will
momentarily suspend operation while the program is being changed. The
period of time that the cycle time is extended is determined by the following
conditions.
• Number of steps changed
• Editing operations (insert/delete/overwrite)
• Types of instructions
The cycle time extension for online editing is negligibly affected by the size of
task programs. If the maximum program size for a task is 10 Ksteps, the
online editing cycle time extension will be as follows:
CPU Unit
CP1L CPU Unit
Increase in cycle time for online editing
Maximum: 16 ms, Normal: 12 ms
(for a program size of 10 Ksteps)
When editing online, the cycle time will be extended by according to the editing that is performed. Be sure that the additional time will not adversely affect
system operation.
Note When there is one task, online editing is processed all in the cycle time following the cycle in which online editing is executed (written). When there are multiple tasks (cyclic tasks and interrupt tasks), online editing is separated, so
that for n tasks, processing is executed over n to n ×2 cycles max.
95
Section 2-7
Computing the Cycle Time
2-7-7
I/O Response Time
The I/O response time is the time it takes from when an input turns ON, the
data is recognized by the CPU Unit, and the user program is executed, up to
the time for the result to be output to an output terminal. The length of the I/O
response time depends on the following conditions.
• Timing of Input Bit turning ON.
• Cycle time.
Minimum I/O
Response Time
The I/O response time is shortest when data is retrieved immediately before
I/O refresh of the CPU Unit. The minimum I/O response time is calculated as
follows:
Minimum I/O response time = Input ON delay + Cycle time + Output ON delay
Note The input and output ON delays depend on the type of terminals used on the
CPU Unit or the model number of the Unit being used.
I/O refresh
Input
Input ON delay
(Interrupt to
CPU Unit)
Cycle time
Cycle time
Instruction
execution
Instruction
execution
Instruction
execution
Output ON delay
Output
Minimum I/O
response time
Maximum I/O Response
Time
The I/O response time is longest when data is retrieved immediately after I/O
refresh period of the CPU Unit. The maximum I/O response time is calculated
as follows:
Maximum I/O response time = Input ON delay + (Cycle time × 2) + Output ON
delay
I/O refresh
Input
Input ON delay
(Interrupt to
CPU Unit)
Cycle time
Cycle time
Instruction
execution
Instruction
execution
Output ON delay
Output
Maximum I/O
response time
96
Instruction
execution
Section 2-7
Computing the Cycle Time
Calculation Example
Conditions:
Input ON delay
Output ON delay
Cycle time
1 ms (normal input with input
constant set to 0 ms)
0.1 ms (transistor output)
20 ms
Minimum I/O response time = 1 ms + 20 ms + 0.1 ms = 21.1 ms
Maximum I/O response time = 1 ms + (20 ms × 2) + 0.1 ms = 41.1 ms
Input Response
Times
Input response times can be set in the PLC Setup. Increasing the response
time reduces the effects of chattering and noise. Decreasing the response
time allows reception of shorter input pulses, (but the pulse width must be
longer than the cycle time).
Input response time
The pulse width is
less than the input
response time, so
it is not detected.
Input response time
Input
Input
I/O refresh
CPU Unit
I/O refresh
CPU Unit
PLC Setup
Name
Input constants
2-7-8
Description
Settings
Input response times 00 hex: 8 ms
10 hex: 0 ms
11 hex: 0.5 ms
12 hex: 1 ms
13 hex: 2 ms
14 hex: 4 ms
15 hex: 8 ms
16 hex: 16 ms
17 hex: 32 ms
Default
00 hex (8 ms)
Interrupt Response Times
Input Interrupt Tasks
The interrupt response time for I/O interrupt tasks is the time taken from when
a built-in input has turned ON (or OFF) until the I/O interrupt task has actually
been executed. The length of the interrupt response time for I/O interrupt
tasks depends on the following conditions. (About 0.3ms)
Item
Hardware response
Software interrupt
response
Note
Interrupt response time
Rise time: 50 µs
---
Counter interrupts
Fall time: 50 µs
Minimum: 134 µs
--Minimum: 236 µs
Maximum: 234 µs + Wait
time (See note 1.)
Maximum: 336 µs + Wait time
(See note1.)
(1) The wait time occurs when there is competition with other interrupts. As
a guideline, the wait time will be 6 to 169 µs.
(2) I/O interrupt tasks can be executed during execution of the user program
(even while an instruction is being executed by stopping the execution of
an instruction), I/O refresh, peripheral servicing, or overseeing. The interrupt response time is not affected by which of the above processing operations during which the interrupt inputs turns ON. I/O interrupts,
however, are not executed during execution of other interrupt tasks even
if the I/O interrupt conditions are satisfied. Instead, the I/O interrupts are
97
Section 2-7
Computing the Cycle Time
executed in order of priority after the current interrupt task has completed
execution and the software interrupt response time has elapsed.
The interrupt response time of input interrupt tasks is calculated as follows:
Interrupt response time = Input ON delay + Software interrupt response time
Input
Input ON delay
Next interrupt signal
can be accepted.
(Interrupt signal retrieval)
Software interrupt response time
Interrupt task execution
Input interrupt task
response time
Ladder program
execution time
Return time from
input interrupt task
Cyclic task execution
(main program)
The time from completing the ladder program in the input
interrupt task until returning to cyclic task execution is 60 µs.
Scheduled Interrupt Tasks
The interrupt response time of scheduled interrupt tasks is the time taken
from after the scheduled time specified by the MSKS(690) instruction has
elapsed until the interrupt task has actually been executed. The length of the
interrupt response time for scheduled interrupt tasks is 1 ms max. There is
also an error of 80 µs in the time to the first scheduled interrupt (0.5 ms min.).
Note Scheduled interrupt tasks can be executed during execution of the user program (even while an instruction is being executed by stopping the execution of
an instruction), I/O refresh, peripheral servicing, or overseeing. The interrupt
response time is not affected by which of the above processing operations
during which the scheduled interrupt time occurs. Scheduled interrupts, however, are not executed during execution of other interrupt tasks even if the
interrupt conditions are satisfied. Instead, the interrupts are executed in order
of priority after the current interrupt task has completed execution and the
software interrupt response time has elapsed.
Scheduled interrupt time
Internal timer
Software interrupt response time
Scheduled interrupt task
98
Section 2-7
Computing the Cycle Time
2-7-9
Serial PLC Link Response Performance
The response times for CPU Units connected via a Serial PLC Link (master to
slave or slave to master) can be calculated as shown below. If a PT is in the
Serial PLC Link, however, the amount of communications data will not be
fixed and the values will change.
• Maximum I/O response time (not including hardware delay) =
Master cycle time + Communications cycle time + Slave cycle time + 4 ms
• Minimum I/O response time (not including hardware delay) =
Slave communications time + 0.8 ms
Here,
Number of participating slave nodes
The number of slaves to which links have been established
within the maximum unit number set in the master.
Number of non-participating slave
nodes
The number of slaves not participating in the links within the
maximum unit number set in the master
Communications
cycle time (ms)
Slave communications time × Number of participating slave
nodes + 10 × Number of non-participating slave nodes
Slave communications time (ms)
• Communications time set to Standard
0.4 + 0.286 × ((No. of slaves + 1) × No. of link words × 2 + 12)
• Communications time set to Fast
0.4 + 0.0955 × ((No. of slaves + 1) × No. of link words × 2 +
12)
2-7-10 Pulse Output Start Time
The pulse output start time is the time required from executing a pulse output
instruction until pulses are output externally. This time depends on the pulse
output instruction that is used and operation that is performed.
Instruction execution
Start time
Pulse output
Pulse output instruction
Start time
SPED: continuous
SPED: independent
86 µs
98 µs
ACC: continuous
ACC: independent, trapezoidal
103 µs
122 µs
ACC: independent, triangular
PLS2: trapezoidal
123 µs
145 µs
PLS2: triangular
146 µs
99
Section 2-7
Computing the Cycle Time
2-7-11 Pulse Output Change Response Time
The pulse output change response time is the time for any change made by
executing an instruction during pulse output to actually affect the pulse output
operation.
Pulse output instruction
INI: immediate stop
Change response time
63 µs + 1 pulse output time
SPED: immediate stop
ACC: deceleration stop
106 µs + 1 pulse output time
1 control cycle (4 ms) minimum,
2 control cycles (8 ms) maximum
PLS2: deceleration stop
SPED: speed change
ACC: speed change
PLS2: target position change in
reverse direction
PLS2: target position change in
same direction at same speed
PLS2: target position change in
same direction at different speed
100
SECTION 3
Installation and Wiring
This section describes how to install and wire the CP1L.
3-1
Fail-safe Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
102
3-2
Installation Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
103
3-2-1
103
3-3
3-4
3-5
3-6
Installation and Wiring Precautions . . . . . . . . . . . . . . . . . . . . . . . . .
Mounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
105
3-3-1
Mounting in a Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
105
3-3-2
Connecting Expansion Units and Expansion I/O Units . . . . . . . . . .
108
3-3-3
DIN Track Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
110
Wiring CP1L CPU Units. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
112
3-4-1
Wiring Power Supply and Ground Lines . . . . . . . . . . . . . . . . . . . . .
112
3-4-2
Wiring Built-in I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
114
3-4-3
Wiring Safety and Noise Controls . . . . . . . . . . . . . . . . . . . . . . . . . .
117
Wiring CPU Unit I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
119
3-5-1
I/O Wiring for CPU Units with 60 I/O Points . . . . . . . . . . . . . . . . .
119
3-5-2
I/O Wiring for CPU Units with 40 I/O Points . . . . . . . . . . . . . . . . .
120
3-5-3
I/O Wiring for CPU Units with 30 I/O Points . . . . . . . . . . . . . . . . .
122
3-5-4
I/O Wiring for CPU Units with 20 I/O Points . . . . . . . . . . . . . . . . .
123
3-5-5
I/O Wiring for CPU Units with 14 I/O Points . . . . . . . . . . . . . . . . .
125
3-5-6
I/O Wiring for CPU Units with 10 I/O Points . . . . . . . . . . . . . . . . .
126
3-5-7
Pulse Input Connection Examples . . . . . . . . . . . . . . . . . . . . . . . . . .
127
3-5-8
Pulse Output Connection Examples . . . . . . . . . . . . . . . . . . . . . . . . .
128
CP-series Expansion I/O Unit Wiring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
130
101
Section 3-1
Fail-safe Circuits
3-1
Fail-safe Circuits
Always set up safety circuits outside of the PLC to prevent dangerous conditions in the event of errors in the CP1L CPU Unit or external power supply. In
particular, be careful of the following points.
Supply Power to the
CP1L CPU Unit before
the Controlled
System
If the PLC's power supply is turned ON after the controlled system's power
supply, outputs in Units such as DC Output Units may malfunction momentarily. To prevent any malfunction, add an external circuit that prevents the
power supply to the controlled system from going ON before the power supply
to the PLC itself.
Managing CPU Unit
Errors
When any of the following errors occurs, PLC operation (program execution)
will stop and all outputs from Output Units will be turned OFF.
• A CPU error (watchdog timer error) or CPU on standby
• A fatal error (memory error, I/O bus error, duplicate number error, too
many I/O points error, I/O setting error, program error, cycle time too long
error, or FALS(007) error) (See note.)
Always add any circuits necessary outside of the PLC to ensure the safety of
the system in the event of an error that stops PLC operation.
Note
When a fatal error occurs, all outputs from Output Units will be turned OFF
even if the IOM Hold Bit has been turned ON to protect the contents of I/O
memory. (When the IOM Hold Bit is ON, the outputs will retain their previous
status after the PLC has been switched from RUN/MONITOR mode to PROGRAM mode.)
Managing Output
Malfunctions
It is possible for an output to remain ON due to a malfunction in the internal
circuitry of the Output Unit, such as a relay or transistor malfunction. Always
add any circuits necessary outside of the PLC to ensure the safety of the system in the event that an output fails to go OFF.
Interlock Circuits
When the PLC controls an operation such as the clockwise and counterclockwise operation of a motor and if there is any possibility of an accident or
mechanical damage due to faulty PLC operation, provide an external interlock
such as the one shown below to prevent both the forward and reverse outputs
from turning ON at the same time.
Example
Interlock circuit
CP1H
CIO
100.00
CIO
100.01
MC2
MC1 Motor clockwise
MC1
MC2 Motor counterclockwise
This circuit prevents outputs MC1 and MC2 from both being ON at the same
time even if both PLC outputs CIO 100.00 and CIO 100.01 are both ON, so
the motor is protected even if the PLC is programmed improperly or malfunctions.
102
Section 3-2
Installation Precautions
3-2
3-2-1
Installation Precautions
Installation and Wiring Precautions
Always consider the following factors when installing and wiring the PLC to
improve the reliability of the system and make the most of the CP1L functions.
Ambient Conditions
Do not install the PLC in any of the following locations.
• Locations subject to ambient temperatures lower than 0°C or higher than
55°C.
• Locations subject to drastic temperature changes or condensation.
• Locations subject to ambient humidity lower than 10% or higher than
90%.
• Locations subject to corrosive or flammable gases.
• Locations subject to excessive dust, salt, or metal filings.
• Locations that would subject the PLC to direct shock or vibration.
• Locations exposed to direct sunlight.
• Locations that would subject the PLC to water, oil, or chemical reagents.
Always enclose or protect the PLC sufficiently in the following locations.
• Locations subject to static electricity or other forms of noise.
• Locations subject to strong electromagnetic fields.
• Locations subject to possible exposure to radioactivity.
• Locations close to power lines.
Installation in
Cabinets or Control
Panels
When the CP1L is being installed in a cabinet or control panel, always provide
proper ambient conditions as well as access for operation and maintenance.
Temperature Control
The ambient temperature within the enclosure must be within the operating
range of 0°C to 55°C. When necessary, take the following steps to maintain
the proper temperature.
• Provide enough space for good air flow.
• Do not install the PLC above equipment that generates a large amount of
heat, such as heaters, transformers, or high-capacity resistors.
• If the ambient temperature exceeds 55°C, install a cooling fan or air conditioner.
Control
panel
Fan
SYSMAC
CP1H
Louver
103
Section 3-2
Installation Precautions
Accessibility for
Operation and
Maintenance
• To ensure safe access for operation and maintenance, separate the PLC
as much as possible from high-voltage equipment and moving machinery.
• The PLC will be easiest to install and operate if it is mounted at a height of
about 1,000 to 1,600 mm.
!Caution Do not touch the power supply or the area around the I/O terminals while
power is being supplied or immediately after power has been turned OFF.
Doing so may result in burns.
!Caution After the power supply has been turned OFF, wait until the PLC has sufficiently cooled before touching it.
Improving Noise
Resistance
• Do not mount the PLC in a control panel containing high-voltage equipment.
• Install the PLC at least 200 mm from power lines.
Power lines
200 mm
min.
SYSMAC CP1L
200 mm min.
• Ground the mounting plate between the PLC and the mounting surface.
Mounting in a Panel
104
• The CP1L must be installed in the orientation shown below to ensure adequate cooling.
Section 3-3
Mounting
• Do not install the CP1L in any of the following orientations.
3-3
3-3-1
Mounting
Mounting in a Panel
When mounting the CP1L CPU Unit in a panel, use either surface installation
or DIN Track installation.
Surface Installation
Even if a DIN Track is not used, a CP1L CPU Unit and CP-series Expansion
Units or Expansion I/O Units can be mounted using M4 screws.
For restrictions on the number of Expansion Units and Expansion I/O Units
that can be connected, refer to 1-2 System Configuration.
CP1L CPU Unit
Expansion I/O Units or Expansion Units
105
Section 3-3
Mounting
DIN Track Installation
The CP1L CPU Unit, Expansion Units, and Expansion I/O Units can be
mounted to DIN Track. Secure the DIN Track with screws in at least three
places.
DIN Track
Using I/O Connecting
Cable
When using Expansion Units and Expansion I/O Units, it is possible to use
CP1W-CN811 Connecting Cable to arrange the Units in upper and lower
rows. The following restrictions apply:
• I/O Connecting Cable can be used in one place only, and not in multiple
places.
SYSMAC
CP1L
IN
L1
L2/N
COM
01
00
03
02
05
04
07
06
09
08
11
10
01
00
03
02
05
07
04
06
09
08
NC
11
10
NC
COM
NC
NC
01
03
00
05
02
04
07
09
06
08
11
10
01
00
CH
03
02
05
04
07
06
09
08
11
10
CH
CH
00
IN
01
02
03
04
05
06
07
08
09
10
11
07
08
09
10
11
CH
00
01
02
03
04
05
06
CH
OUT
CH
00
01
COM
02
COM
03
COM
04
COM
06
05
00
07
01
COM
03
02
04
COM
00
01
02
03
04
05
06
07
00
01
02
03
04
05
06
07
CH
06
05
40EDR
07
NC
NC
00
COM
01
COM
02
COM
04
03
05
07
COM
06
COM
EXP
CH
00
02
04
05
07
01
03
COM
06
OUT
NC
NC
COM
NC
NC
01
00
03
02
05
04
07
06
09
08
CH
11
10
01
00
03
02
05
04
07
06
09
08
NC
11
01
02
03
04
05
06
07
08
09
10
11
01
02
03
04
05
06
07
08
09
10
11
01
00
03
02
05
04
07
06
09
08
CH
00
IN
01
02
03
04
05
06
11
10
01
00
03
02
05
04
07
06
09
08
11
10
CH
07
08
09
10
11
07
08
09
10
11
CH
00
CH
01
02
03
04
05
06
CH
00
01
02
03
04
05
06
07
00
01
02
03
04
05
06
07
00
COM
01
COM
02
COM
OUT
40EDR
CH
NC
NC
Wiring Ducts
COM
NC
CH
00
00
CH
CH
NC
NC
10
CH
CH
IN
OUT
04
03
05
COM
07
06
COM
CH
00
02
04
05
07
01
03
COM
06
CH
00
01
02
03
04
05
06
07
00
01
02
03
04
05
06
07
EXP
40EDR
CH
NC
NC
00
COM
01
COM
02
COM
04
03
05
COM
07
06
COM
CH
00
02
04
05
07
01
03
COM
06
EXP
Whenever possible, route I/O wiring through wiring ducts. Install the duct so
that it is easy to wire from the I/O Units through the duct. It is handy to have
the duct at the same height as the PLC.
81.6 to 89.0 mm
Duct
20 mm min.
CPU
Rack
Unit
DIN Track
30 mm
30 mm
20 mm min.
40 mm
Mounting
bracket
Duct
Duct
Note
106
Tighten terminal block screws and cable screws to the following torque.
M4: 1.2 N·m
M3: 0.5 N·m
Section 3-3
Mounting
Routing Wiring Ducts
Install the wiring ducts at least 20 mm between the tops of the PLC and any
other objects, (e.g., ceiling, wiring ducts, structural supports, devices, etc.) to
provide enough space for air circulation and replacement of Units.
Input duct
Output duct
Power duct
200 mm min.
SYSMAC
CP1H
Breakers
and fuses
IN
AC100-240V
0CH
BATTERY
PERIPHERAL
CP1L
L1
L2/N COM
POWER
ERR/ALM
BKUP
00
RUN
INH
PRPHL
01
1CH
03
02
05
04
07
06
09
08
11
10
01
00
03
02
05
04
07
06
09
08
11
10
EXP
00
01
03
COM COM02
04
06
COM COM
00
DC24V 0.3A
01
05
100CH
03
07
COM
OUTPUT
04
06
07
COM
05
OUT
07
101CH
Power
equipment,
such as
transformers
and magnetic
relays
Fuses, relays,
timers, etc. (not
heat-generating
equipment,
power
equipment,
etc.)
Terminal
blocks for
PLC
Terminal blocks
for power
equipment
Dimensions
External Dimensions
W1
85
W2
8
110 100 90
Four, 4.5 dia.
107
Section 3-3
Mounting
Mounting Height
Model
[email protected]@
195
W1
185
W2
[email protected]@
[email protected]@
150
130
140
120
[email protected]@
[email protected]@
86
86
76
76
[email protected]@
66
56
The mounting height is approximately 90 mm.
When a cable is connected to an Option Board, however, the additional height
must be factored in. Always allow for the additional height when considering
the depth of the control panel in which the PLC is to be mounted.
3-3-2
Connecting Expansion Units and Expansion I/O Units
Leave approximately 10 mm of space between the CPU Unit and the Expansion Units or Expansion I/O Units.
Expansion I/O Units or Expansion Units
CP1L CPU Unit
10 mm
Mounting Method
A
CP1L CPU Unit
with 30, 40 or 60 I/O
points
100 mm
Expansion I/O Unit
with 32 or 40 I/O points
8 mm
A
CP1L CPU Unit
100 mm
with 10, 14 or 20 I/O
points
Expansion I/O Unit
with 8, 16 or 20 I/O points
Expansion Unit
8 mm
108
Section 3-3
Mounting
Unit
CP1L CPU Unit
Expansion I/O Unit
Analog I/O Unit
Temperature Sensor Unit
A (mm)
60 I/O points
40 I/O points
185 ±0.5
140 ±0.5
30 I/O points
20 I/O points
120 ±0.5
76 ±0.5
14 I/O points
10 I/O points
76 ±0.5
56 ±0.5
40 I/O points
32 outputs
140 ±0.2
140 ±0.2
20 I/O points
16 outputs
76 ±0.2
76 ±0.2
8 inputs
8 outputs
56 ±0.2
56 ±0.2
76 ±0.2
76 ±0.2
TS01
TS02
TS003
TS004
140 ±0.2
56 ±0.2
56 ±0.2
CompoBus/S I/O Link Unit
DeviceNet I/O Link Unit
Space between Units When Expansion I/O Units Are Connected
100 mm
CP1L CPU Unit
Expansion I/O Unit
Expansion Unit
20 mm min.
25 mm max.
1,2,3...
Expansion I/O Unit
Expansion Unit
10 mm min.
15 mm max.
1. Remove the cover from the CPU Unit's or the Expansion I/O Unit's expansion connector. Use a flat-blade screwdriver to remove the cover from the
Expansion I/O Connector.
Expansion
connector cover
109
Section 3-3
Mounting
2. Insert the Expansion I/O Unit's connecting cable into the CPU Unit's or the
Expansion I/O Unit's expansion connector.
NC
NC
COM
NC
NC
01
00
03
02
05
04
07
06
09
08
CH
11
10
01
00
CH
IN
OUT
01
02
03
04
05
06
07
00
08
01
09
02
10
03
11
04
05
06
07
08
09
10
11
CH
CH
03
02
05
04
07
06
00
01
02
00
01
02
03
04
05
06
07
03
04
05
06
07
09
08
CH
00
CH
11
10
40EDR
CH
NC
NC
00
COM
01
COM
02
COM
04
03
05
COM
CH
00
07
06
COM
02
01
04
03
05
COM
EXP
07
06
3. Replace the cover on the CPU Unit's or the Expansion I/O Unit's expansion
connector.
NC
NC
COM
NC
NC
01
00
03
02
05
04
07
06
09
08
CH
11
10
01
02
03
04
05
06
07
00
08
01
09
02
10
03
11
04
05
06
07
08
09
10
03
11
04
05
06
07
03
04
05
06
07
CH
00
CH
03
02
05
04
07
06
CH
00
CH
OUT
01
00
CH
IN
00
01
01
02
02
09
08
11
10
40EDR
CH
NC
NC
3-3-3
00
COM
01
COM
02
COM
04
03
05
COM
CH
00
07
06
COM
01
02
04
03
05
COM
07
EXP
06
DIN Track Installation
1,2,3...
1. Use a screwdriver to pull down the DIN Track mounting pins from the back
of the Units, and mount the Units to the DIN Track.
2. Lower the Units so that they catch on the top of the DIN Track, and then
press them forward all the way to the DIN Track at the bottom.
110
Section 3-3
Mounting
3. Press in all of the DIN Track mounting pins to securely lock the Units in
place.
DIN Track
Mount the DIN Track in the control panel with screws in at least three places.
• DIN Track: PFP-50N (50 cm), PFP-100N (100 cm), or PFP-100N2
(100 cm)
Secure the DIN Track to the control panel using M4 screws separated by
210 mm (6 holes). The tightening torque is 1.2 N·m.
PFP-100N2
16
28.25 × 4.5 oblong holes
4.5
30 ±0.3 27
15
25
10
25
25
1000
10
25
PFP-100N/50N
15
24
29.2
1
1.5
7.3 ±0.15
4.5
35 ±0.3
15
25
10
25
25
1000 (500)
(See note.)
10
25
15 (5)
(See note.)
27 ±0.15
1
Note: PFP-50N dimensions are given in parentheses.
111
Section 3-4
Wiring CP1L CPU Units
3-4
Wiring CP1L CPU Units
Note
(1) Do not remove the protective label from the top of the Unit until wiring has
been completed. This label prevents wire strands and other foreign matter from entering the Unit during wiring procedures.
(2) Remove the label after the completion of wiring to ensure proper heat dissipation.
3-4-1
Wiring Power Supply and Ground Lines
CPU Units with AC Power Supply
Wiring the AC Power Supply and Ground Lines
100 to 240 VAC at 50/60 Hz
R
S
MCCB
Upper terminal block
L1
L2/N COM
00
LG: Functional ground terminal
01
03
02
05
04
07
06
09
08
11
10
01
00
03
02
05
04
07
06
09
08
11
10
GR: Protective ground terminal
Ground (100 Ω or less)
• Wire a separate circuit for the power supply circuit so that there is no voltage drop from the inrush current that flows when other equipment is
turned ON.
• When several CP1L PLCs are being used, it is recommended to wire the
PLCs on separate circuits to prevent a voltage drop from the inrush current or incorrect operation of the circuit breaker.
• Use twisted-pair power supply cables to prevent noise from the power
supply lines. Adding a 1:1 isolating transformer reduces electrical noise
even further.
• Consider the possibility of voltage drops and the allowable current, and
always use thick power lines.
• Use round crimp terminals for AC power supply wiring.
6.2 mm max.
• AC Power Supply
Provide a power supply of 100 to 240 VAC.
• Use a power supply within the following voltage fluctuation range.
Power supply voltage
100 to 240 VAC
Note
112
Allowable voltage fluctuation range
85 to 264 VAC
(1) Before connecting the power supply, make sure that the CPU Unit requires an AC power supply and not a DC power supply. The CPU Unit's
internal circuitry will be damaged if AC power is mistakenly supplied to a
CPU Unit that requires a DC power supply.
Section 3-4
Wiring CP1L CPU Units
(2) The power supply input terminals are at the top of the CPU Unit; the terminals at the bottom of the CPU Unit output 24-VDC power for external
devices. The CPU Unit's internal circuitry will be damaged if AC power is
mistakenly supplied to a CPU Unit's power supply output terminals.
!Caution Tighten the terminal block screws for the AC power supply to the torque of
0.5 N·m. Loose screws may result in fire or malfunction.
• Always ground the ground terminal to 100 Ω or less to protect against
electric shock and incorrect operation from electrical noise.
• If one phase of the power supply is grounded, connect the grounded
phase to the L2/N terminal.
• The GR terminal is a ground terminal. To prevent electrical shock, use a
dedicated ground line (2 mm2 min.) of 100 Ω or less.
• The line ground terminal (LG) is a noise-filtered neutral terminal. If noise
is a significant source of errors or if electrical shocks are a problem, connect the line ground terminal (LG) to the ground terminal (GR) and ground
both with a ground resistance of 100 Ω or less.
• To prevent electrical shock when short-circuiting between the LG and GR
terminals, always use a ground of 100 Ω or less.
• Do not connect ground lines to other devices or to the frame of a building.
Doing so will reverse the effectiveness of the ground and instead have a
bad influence.
Isolating Transformer
The PLC's internal noise control is sufficient for the general noise to which
power supply lines are subjected. Ground noise can be further reduced by
providing the power supply through a 1:1 isolating transformer. Leave the isolating transformer's secondary side ungrounded.
CPU Units with DC Power Supply
DC Power Supply Wiring
24 VDC
+
−
Circuit protector
Upper terminal block
−
+
NC
COM
00
01
03
02
05
04
07
06
09
08
11
10
01
00
03
02
05
04
07
06
09
08
11
10
GR: Protective ground terminal
Ground (100 Ω or less)
• Use crimp terminals or solid wire for wiring the power supply. Do not connect bare stranded wires directly to terminals.
6.2 mm max.
6.2 mm max.
• M3 self-rising terminal screws are used. Tighten the terminal screws to
the torque of 0.5 N·m.
• To prevent noise, use a ground of 100 Ω or less.
113
Section 3-4
Wiring CP1L CPU Units
DC Power Supply
• Provide a power supply of 20.4 to 26.4 VDC.
• The maximum current consumption is 20 W for CPU Units with 30, 40 or
60 I/O points and 13 W for CPU Units with 10, 14 or 20 I/O points.
• When the power supply is turned ON, the inrush current is approximately
five times the normal current.
• The GR terminal is a ground terminal. To prevent electrical shock, use a
dedicated ground line (2 mm2 min.) of 100 Ω or less.
Note
(1) Never reverse the positive and negative leads when wiring the power supply terminals.
(2) Supply all power to the power supply terminals from the same source.
3-4-2
Wiring Built-in I/O
Wiring Precautions
Double-checking I/O
Specifications
Double-check the specifications for the I/O Units. In particular, do not apply a
voltage that exceeds the input voltage for Input Units or the maximum switching capacity for Output Units. Doing so may result in breakdown, damage, or
fire.
When the power supply has positive and negative terminals, always wire them
correctly.
Electric Wires
• AWG22 to AWG18 (0.32 to 0.82 mm2) power lines are recommended.
Use cable with a maximum diameter of 1.61 mm including the insulation
covering.
• The current capacity of electric wire depends on factors such as the ambient temperature and insulation thickness, as well as the gauge of the conductor.
• M3 self-rising screws are used for all screw terminals including terminal
screws for crimp terminal power supply wiring.
• Use crimp terminals or solid wire for wiring.
• Do not connect bare stranded wires directly to terminals.
• Tighten the terminal block screws to the torque of 0.5 N·m.
• Use crimp terminals (M3) having the dimensions shown below.
6.2 mm max.
Wiring
6.2 mm max.
• Wire the Units so that they can be easily replaced.
• Make sure that the I/O indicators are not covered by the wiring.
• Do not place the I/O wiring in the same conduits or ducts as high-voltage
or power lines. Inductive noise can cause errors or damage.
• Tighten the terminal screws to the torque of 0.5 N·m.
Unit type
CPU Units
Expansion I/O Units
40ED/32E/20EDT
Expansion I/O Units
AD04/DA0/MAD/TS0
SRT21/20EDR1/16E/8E
114
Terminal width
6.4 mm
6.4 mm
Terminal pitch
7.6 mm
7.7 mm
6.8 mm
8.4 mm
Section 3-4
Wiring CP1L CPU Units
Terminal
width
Note
Terminal
pitch
(1) Never apply a voltage that exceeds the input voltage for Input Units or the
maximum switching capacity for Output Units.
(2) When the power supply has positive and negative terminals, always wire
them correctly.
(3) When required by EC Low Voltage Directive, use reinforced insulation or
double insulation on the DC power supply connected to DC-power-supply
CPU Units and I/O.
For the DC power supply connected to a DC-power-supply CPU Unit, use
a power supply with a minimum output holding time of 10 ms.
(4) Do not pull on the cables or bend the cables beyond their natural limit. Doing either of these may break the cables.
Connecting I/O
Devices
Use the following information for reference when selecting or connecting input
devices.
DC Input Devices
Connectable DC Input Devices (for DC Output Models)
Contact output
Two-wire DC output
IN
IN
CP1L
CP1L
COM
Sensor
power supply
NPN open-collector output
+
5 mA/
7 mA
0V
+
Current
regulator
CP1L
IN
Output
5 mA/
7 mA
0V
COM +
PNP current output
+
5 mA/
7 mA
0V
Sensor
power supply
IN
+
CP1L
COM ⊕
Voltage output
Sensor
power supply
Output
COM +
NPN current output
Sensor
power supply
Output
+
+
Output
CP1L
IN
COM +
0V
COM
IN
CP1L
Sensor
power supply
• The circuit below should not be used for I/O devices with a voltage output.
+
Output
0V
Sensor
power supply
IN
COM
CP1L
−
115
Wiring CP1L CPU Units
Section 3-4
Precautions when
Connecting a Two-wire DC
Sensor
When using a two-wire sensor with a 24-V DC input device, check that the following conditions have been met. Failure to meet these conditions may result
in operating errors.
1,2,3...
1. Relation between voltage when the PLC is ON and the sensor residual
voltage:
VON ≤ VCC − VR
2. Relation between current when the PLC is ON and sensor control output
(load current):
IOUT (min) ≤ ION ≤ IOUT (max)
ION = (VCC − VR − 1.5 [PLC internal residual voltage]*)/RIN
When ION is smaller than IOUT (min), connect a bleeder resistor R. The
bleeder resistor constant can be calculated as follows:
R ≤ (VCC − VR)/(IOUT (min) − ION)
Power W ≥ (VCC − VR)2/R × 4 [allowable margin]
3. Relation between current when the PLC is OFF and sensor leakage current:
IOFF ≥ Ileak
Connect a bleeder resistor if Ileak is greater than IOFF. Use the following
equation to calculate the bleeder resistance constant.
R ≤ RIN × VOFF/(Ileak × RIN − VOFF)
Power W ≥ (VCC − VR)2/R × 4 (allowable margin)
DC Input Unit
Two-wire Sensor
VR
R
RIN
VCC
Vcc: Power voltage
Vr: Sensor output residual current
Von: PLC ON voltage
Iout: Sensor control output (load current)
Voff: PLC OFF voltage
Ion: PLC ON current
Ileak: Sensor leakage current
Ioff: PLC OFF current
R: Bleeder resistance
Rin: PLC input impedance
4. Precautions on Sensor Inrush Current
An incorrect input may occur due to sensor inrush current if a sensor is
turned ON after the PLC has started up to the point where inputs are possible. Determine the time required for sensor operation to stabilize after the
sensor is turned ON and take appropriate measures, such as inserting into
the program a timer delay after turning ON the sensor.
Program Example
In this example, the sensor's power supply voltage is provided to input bit CIO
0.00 and a 100-ms timer delay (the time required for an OMRON Proximity
Sensor to stabilize) is created in the program. After the Completion Flag for
the timer turns ON, the sensor input on input bit CIO 0.01 will cause output bit
CIO 100.00 to turn ON.
116
Section 3-4
Wiring CP1L CPU Units
0.00
TIM
100
#0001
T100
0.01
100.00
Output Wiring Precautions
Output Short-circuit
Protection
If a load connected to the output terminals is short-circuited, output components and the printed circuit boards may be damaged. To guard against this,
incorporate a fuse in the external circuit. Use a fuse with a capacity of about
twice the rated output.
Connecting to a TTL
Circuit
A TTL circuit cannot be connected directly to a transistor output because of
the transistor's residual voltage. It is necessary to connect a pull-up resistor
and a CMOS IC between the two.
Inrush Current
Considerations
When connecting a transistor or triac output to a load having a high inrush
current (such as an incandescent lamp), steps must be taken to avoid damage to the transistor or triac. Use either of the following methods to reduce the
inrush current.
Example Method 1
L
OUT
SYSMAC CP1L
+
R
COM
Use a dark current of approximately 1/3 the rated current of the incandescent lamp.
Example Method 2
R
OUT
L
+
SYSMAC CP1L
COM
Install a limit resistance.
3-4-3
Wiring Safety and Noise Controls
I/O Signal Wiring
Whenever possible, place I/O signal lines and power lines in separate ducts or
conduits both inside and outside of the control panel.
(1) = I/O cables
(2) = Power cables
(1)
(1)
(2)
(1)
(2)
(2)
In-floor duct
Conduits
Suspended duct
If the I/O wiring and power wiring must be routed in the same duct, use
shielded cables and connect the shields to the GR terminal to reduce noise.
117
Section 3-4
Wiring CP1L CPU Units
Inductive Loads
When an inductive load is connected to an I/O Unit, connect a surge suppressor or diode in parallel with the load as shown below.
IN
Diode
L
OUT
DC input
L
Relay output
COM
COM
Surge suppressor
OUT
+
Relay output or
transistor output
COM
Note
Diode
Use surge suppressors and diodes with the following specifications.
Surge Suppressor Specifications
Resistance: 50 Ω
Capacitance: 0.47µF
Voltage:
200 V
Diode Specifications
Breakdown voltage:
3 times load voltage min.
Mean rectification current: 1 A
Noise from External
Wiring
Take the following points into account when externally wiring I/O, power supply, and power lines.
• When multi-conductor signal cable is being used, avoid combining I/O
wires and other control wires in the same cable.
• If wiring racks are parallel, allow at least 300 mm between them.
Low-current cables
PLC I/O wiring
PLC power supply
cable and general
control circuit wiring
300 mm min.
Control cables
300 mm min.
Power cables
Power lines
Ground to 100 Ω or less
• If the I/O wiring and power cables must be placed in the same duct, they
must be shielded from each other using grounded steel sheet metal.
PLC power
supply cable
and general
control circuit
PLC I/O wiring wiring
Power lines
Steel sheet metal
200 mm min.
Ground to 100 Ω or less
118
Section 3-5
Wiring CPU Unit I/O
3-5
3-5-1
Wiring CPU Unit I/O
I/O Wiring for CPU Units with 60 I/O Points
Input Wiring (Upper Terminal Block, Removable)
The input circuits have 36 points/common. Use power lines with sufficient current capacity for the COM terminals.
CIO 1
CIO 0
-
+
24 VDC +
-
L1 L2/N COM 01
00
03
02
05
04
07
06
09
08
11
10
01
00
03
05
02
04
CIO 2
07 09
06 08
11
01
00
10
03
02
05
04
CIO 1
CIO 0
07 09
06 08
11
10
CIO 2
Output Wiring (Lower Terminal Block, Removable)
Relay Outputs
(CP1L-M60DR-A and
CP1L-M60DR-D)
CIO 101
CIO 100
+
-
L
L
L
00
01
02
COM COM COM
L
L
04
03
L
CIO 100
05
COM
06
L
L
L
07
00
COM
L
L
02
L
04
01
03
L
L
CIO 102
L
05
COM
CIO 101
L
07
06
L
L
00
COM
L
02
01
L
L
04
03
L
05
COM
L
07
06
L
CIO 102
AC-power-supply models have a 24-VDC output terminals (+/−) on the lower
terminal block. They can be used as a DC power supply for the input circuit.
119
Section 3-5
Wiring CPU Unit I/O
Sinking Transistor
Outputs (CP1L-M60DT-A
and CP1L-M60DT-D)
CIO 100
+
CIO 101
L
L
L
L
L
L
L
L
00
01
02
04
05
07
00
02
- COM COM COM 03 COM 06 COM 01
L
L
L
CIO 100
CIO 102
L
L
L
L
L
04
05
07
00
02
L
04
03 COM 06 COM 01
03
L
L
L
L
CIO 101
L
L
05
07
COM 06
L
CIO 102
AC-power-supply models have a 24-VDC output terminals (+/−) on the lower
terminal block. They can be used as a DC power supply for the input circuit.
Sourcing Transistor
Outputs (CP1L-M60DT1-D)
NC
L
L
L
L
L
L
L L
00
01
02
04
05
07
00
NC COM COM COM 03
COM 06
L
COM
L
CIO 100
3-5-2
CIO 102
CIO 101
CIO 100
L
02
04
L
L
05
07
01
03
COM 06
L
L
L
L
L
00
02
COM 01
L
CIO 101
L
L
L
04
05
07
03
COM 06
L
L
CIO 102
I/O Wiring for CPU Units with 40 I/O Points
Input Wiring (Upper Terminal Block, Removable)
The input circuits have 24 points/common. Use power lines with sufficient current capacity for the COM terminals.
CIO 1
CIO 0
24 VDC
L1
L2/N COM
00
01
03
02
05
04
07
06
CIO 0
120
09
08
11
10
01
00
03
02
05
04
07
06
CIO 1
09
08
11
10
Section 3-5
Wiring CPU Unit I/O
Output Wiring (Lower Terminal Block, Removable)
Relay Outputs
(CP1L-M40DR-A and
CP1L-M40DR-D)
CIO 101
CIO 100
+
L
L
L
L
L
L
L
L
L
L
L
00
01
02
03
04
06
00
01
03
04
06
−
COM COM COM COM
05
07
L
L
COM
02
COM
L
05
07
L
L
CIO 101
CIO 100
AC-power-supply models have a 24-VDC output terminals (+/−) on the lower
terminal block. They can be used as a DC power supply for the input circuit.
Sinking Transistor
Outputs (CP1L-M40DT-A
and CP1L-M40DT-D)
CIO 100
+
CIO 101
L
L
L
L
L
L
00
01
02
03
04
- COM COM COM COM
06
L
L
L
L
L
00
01
03
04
06
05
07 COM 02 COM 05
07
L
L
L
L
L
CIO 100
CIO 101
AC-power-supply models have a 24-VDC output terminals (+/−) on the lower
terminal block. They can be used as a DC power supply for the input circuit.
Sourcing Transistor
Outputs (CP1L-M40DT1-D)
CIO 100
NC
CIO 101
L
L
L
L
L
00
01
02
03
04
NC COM COM COM COM
CIO 100
L
06
05
07
L
L
L
L
00
01
COM
02
L
L
L
03
04
COM
L
06
05
07
L
L
CIO 101
121
Section 3-5
Wiring CPU Unit I/O
3-5-3
I/O Wiring for CPU Units with 30 I/O Points
Input Wiring (Upper Terminal Block, Removable)
The input circuits have 18 points/common. Use power lines with sufficient current capacity for the COM terminals.
CIO 0
CIO 1
24 VDC
L1
L2/N COM
00
01
03
07
05
02
04
06
09
08
01
11
00
10
03
02
05
04
CIO 1
CIO 0
Output Wiring (Lower Terminal Block, Removable)
Relay Outputs
(CP1L-M30DR-A and
CP1L-M30DR-D)
CIO 100
+
-
CIO 101
L
L
L
L
L
L
L
L
00
01
02
04
05
07
00
02
COM COM COM
03
L
CIO 100
COM
06
L
COM
01
03
L
L
CIO 101
AC-power-supply models have a 24-VDC output terminals (+/−) on the lower
terminal block. They can be used as a DC power supply for the input circuit.
122
Section 3-5
Wiring CPU Unit I/O
Sinking Transistor
Outputs (CP1L-M30DT-A
and CP1L-M30DT-D)
CIO 100
+
-
CIO 101
L
L
L
L
L
L
L
L
00
01
02
04
05
07
00
02
COM COM COM
03
COM
06
COM
01
03
L
L
L
L
CIO 100
CIO 101
AC-power-supply models have a 24-VDC output terminals (+/−) on the lower
terminal block. They can be used as a DC power supply for the input circuit.
Sourcing Transistor
Outputs (CP1L-M30DT1-D )
CIO 100
NC
NC
L
L
L
00
01
02
COM COM COM
CIO 101
L
L
04
05
03
COM
L
CIO 100
3-5-4
06
L
L
07
00
COM
L
02
01
03
L
L
L
CIO 101
I/O Wiring for CPU Units with 20 I/O Points
Input Wiring (Upper Terminal Block, not Removable)
The input circuits have 12 points/common. Use power lines with sufficient current capacity for the COM terminals.
CIO 0
24 VDC
L1
L2/N COM
00
01
03
02
07
05
04
06
09
08
11
10
CIO 0
123
Section 3-5
Wiring CPU Unit I/O
Output Wiring (Lower Terminal Block, not Removable)
Relay Outputs
(CP1L-L20DR-A, CP1LL20DR-D, CP1L-J20DR-A
and CP1L-J20DR-D)
CIO 100
+
-
L
L
L
00
01
02
COM COM COM
L
L
04
05
03
COM
L
07
06
L
L
CIO 100
AC-power-supply models have a 24-VDC output terminals (+/−) on the lower
terminal block. They can be used as a DC power supply for the input circuit.
Sinking Transistor
Outputs (CP1L-L20DT-A
and CP1L-L20DT-D)
CIO 100
+
-
L
L
L
00
01
02
COM COM COM
L
L
04
05
03
COM
L
07
06
L
L
CIO 100
AC-power-supply models have a 24-VDC output terminals (+/−) on the lower
terminal block. They can be used as a DC power supply for the input circuit.
Sourcing Transistor
Outputs (CP1L-L20DT1-D
and CP1L-J20DT1-D)
CIO 100
NC
L
L
L
00
01
02
NC COM COM COM
03
L
L
04
05
COM
L
CIO 100
124
L
07
06
L
Section 3-5
Wiring CPU Unit I/O
3-5-5
I/O Wiring for CPU Units with 14 I/O Points
Input Wiring (Upper Terminal Block, not Removable)
The input circuits have 8 points/common. Use power lines with sufficient current capacity for the COM terminals.
CIO 0
24 VDC
L1
L2/N COM
00
01
03
02
07
05
04
06
NC
NC
NC
NC
CIO 0
Output Wiring (Lower Terminal Block, not Removable)
Relay Outputs
(CP1L-L14DR-A, CP1LL14DR-D, CP1L-J14DR-A
and CP1L-J14DR-D)
CIO 100
+
-
L
L
L
00
01
02
COM COM COM
L
L
04
05
03
COM
NC
NC
L
CIO 100
AC-power-supply models have a 24-VDC output terminals (+/−) on the lower
terminal block. They can be used as a DC power supply for the input circuit.
Sinking Transistor
Outputs (CP1L-L14DT-A
and CP1L-L14DT-D)
CIO 100
+
-
L
L
L
L
L
00
01
02
04
05
COM COM COM
03
COM
NC
NC
L
CIO 100
AC-power-supply models have a 24-VDC output terminals (+/−) on the lower
terminal block. They can be used as a DC power supply for the input circuit.
125
Section 3-5
Wiring CPU Unit I/O
Sourcing Transistor
Outputs (CP1L-L14DT1-D
and CP1L-J14DT1-D)
CIO 100
NC
NC
L
L
L
L
L
00
01
02
04
05
COM COM COM
03
COM
NC
NC
L
CIO 100
3-5-6
I/O Wiring for CPU Units with 10 I/O Points
Input Wiring (Upper Terminal Block, not Removable)
The input circuits have 6 points/common. Use power lines with sufficient current capacity for the COM terminals.
CIO 0
24 V DC
L1
-
+
+
-
L2/N COM
00
01
03
02
05
04
CIO 0
Output Wiring (Lower Terminal Block, not Removable)
Relay Outputs
(CP1L-L10DR-A and
CP1L-L10DR-D)
CIO 100
+
-
L
L
L
00
01
02
COM
COM
COM
03
L
CIO 100
126
Section 3-5
Wiring CPU Unit I/O
AC-power-supply models have a 24-VDC output terminals (+/−) on the lower
terminal block. They can be used as a DC power supply for the input circuit.
Sinking Transistor
Outputs (CP1L-L10DT-A
and CP1L-L10DT-D)
CIO 100
+
-
L
L
L
00
01
02
COM
COM
COM
03
L
CIO 100
AC-power-supply models have a 24-VDC output terminals (+/−) on the lower
terminal block. They can be used as a DC power supply for the input circuit.
Sourcing Transistor
Outputs (CP1L-L10DT1-D)
CIO 100
NC
NC
L
L
L
00
01
02
COM
COM
COM
NC
03
NC
L
CIO 100
3-5-7
Pulse Input Connection Examples
For a 24-VDC Opencollector Encoder
This example shows the connections to an encoder with phase-A, phase-B,
and phase Z inputs.
CP1L CPU Unit
(Differential phase input mode)
Encoder
(Power supply: 24 VDC)
Black
Phase A
White
Phase B
Orange Phase Z
Example: E6B2-CWZ6C
NPN opencollector output
Brown +Vcc
008
(High-speed counter 0:
Phase A 0 V)
009
(High-speed counter 0:
Phase B 0 V)
003
(High-speed counter 0:
Phase Z 0 V)
COM (COM 24 V)
0 V (COM)
Blue
24-V DC power supply
0V
+24 V
127
Section 3-5
Wiring CPU Unit I/O
(Do not use the same I/O power supply as other equipment.)
Power
Power provided.
Encoder
0V supply
24V 0V
Shielded twisted-pair cable
IA
CP1L CPU Unit
0.00
Phase A
IB
0.01
Phase B
IZ
0.04
Phase Z
COM
3-5-8
Pulse Output Connection Examples
This example shows a connection to a motor driver. Always check the specifications of the motor driver before actually connecting it.
For open-collector output, use a maximum of 3 m of wiring between the CP1L
CPU Unit and the motor driver.
No pulses are output while the pulse output transistor is OFF. For a direction
output, OFF indicates that CCW output is in progress.
Do not use the same power supply for both pulse output 24-VDC/5-VDC
power and other I/O power.
ON
Output transistor
OFF
Pulse output in progress
CW and CCW Pulse Outputs
CW
CCW
CW
CCW
Pulse and Direction Outputs
CW
CCW
Pulses
Direction
128
Output ON
Output OFF
Section 3-5
Wiring CPU Unit I/O
CW/CCW Pulse Output and Pulse Plus Direction Output
Using a 24-VDC Photocoupler Input Motor Driver ([email protected]@@DT-D)
24-V DC power supply
CP1L CPU Unit
Motor driver (for 24-V input)
−
+
24-VDC
power supply
for outputs
(+)
(−)
CW pulse
output
(Pulse
output)
(+)
(−)
CCW pulse
output
(Direction
output)
Using a 5-VDC
Photocoupler Input Motor
Driver ([email protected]@@DT-D)
Connection Example 1
24-V DC power supply
CP1L CPU Unit
+
24-VDC
power supply
for outputs
CW pulse
output
(Pulse
output)
CCW pulse
output
(Direction
output)
Motor driver (for 5-V input)
−
(+)
100.02
1.6 kΩ
←
Approx. 12 mA
100.03
1.6 kΩ
(Example: R = 220 Ω)
(−)
(+)
(−)
←
Approx. 12 mA
COM
In this example, a 5-V input motor driver is used with a 24-VDC power supply.
Be careful to ensure that the Position Control Unit output current does not
damage the input circuit at the motor driver and yet is sufficient to turn it ON.
Take into account the power derating for the 1.6-kΩ resistance.
129
Section 3-6
CP-series Expansion I/O Unit Wiring
Connection Example 2
5-V DC power supply
CP1L CPU Unit
+
Motor driver (for 5-V input)
−
(+)
(−)
100.02
CW pulse
output
(Pulse
output)
CCW pulse
output
(Direction
output)
3-6
(+)
(−)
100.03
COM
CP-series Expansion I/O Unit Wiring
CP-series Expansion I/O Units
40-point I/O
Units
Model
Inputs
CP1W-40EDR
CP1W-40EDT
24 24-VDC
inputs
16 relay outputs
16 transistor outputs (sinking)
None
16 transistor outputs (sourcing)
32 relay outputs
CP1W-40EDT1
32-point
CP1W-32ER
Output Units CP1W-32ET
CP1W-32ET1
20-point I/O
Units
CP1W-20EDT1
CP1W-20EDT
CP1W-20EDT1
16-point
CP1W-16ER
Output Units CP1W-16ET
CP1W-16ET1
8-point Input CP1W-8ED
Units
8-point Output Units
CP1W-8ER
CP1W-8ET
CP1W-8ET1
Outputs
32 transistor outputs (sinking)
32 transistor outputs (sourcing)
12 24-VDC
inputs
None
8 24-VDC
inputs
None
8 relay outputs
8 transistor outputs (sinking)
8 transistor outputs (sourcing)
16 relay outputs
16 transistor outputs (sinking)
16 transistor outputs (sourcing)
None
8 relay outputs
8 transistor outputs (sinking)
8 transistor outputs (sourcing)
For details on wiring Expansion Units, refer to SECTION 7 Using Expansion
Units and Expansion I/O Units.
130
Section 3-6
CP-series Expansion I/O Unit Wiring
40-point I/O Units ([email protected]@) (Terminal Block is not Removable)
Input Wiring
CIO m+1
24 VDC −
+
+
−
NC
NC COM
NC
NC
01
00
03
05
02
04
07
CIO m+2
09
06
11
08
01
10
00
03
02
CIO m+1
Output Wiring
05
07
04
06
09
08
11
10
CIO m+2
CP1W-40EDR (Relay Outputs)
NC
NC
L
L
L
L
L
L
L
L
L
L
L
00
01
02
04
05
07
00
02
04
05
07
COM COM COM
03
COM
06
L
COM
L
01
03
L
L
COM
06
L
CP1W-40EDT (Sinking Transistor Outputs)
NC
L
L
00
01
L
02
NC COM COM COM
4.5 to 30 VDC
03
L
L
L
L
L
L
L
L
L
04
05
07
00
02
04
05
07
COM
06
L
COM
01
03
L
L
COM
06
L
131
Section 3-6
CP-series Expansion I/O Unit Wiring
CP1W-40EDT1 (Sourcing Transistor Outputs)
NC
L
L
L
L
L
L
00
01
02
04
05
07
NC COM COM COM
03
COM
L
L
L
L
00
02
04
05
07
COM
01
03
L
L
L
L
4.5 to 30 VDC
06
L
COM
06
L
32-point Output Units ([email protected]@) (Terminal Block is not Removable)
Output Wiring
CP1W-32ER (Relay Outputs)
Upper Terminal Block
CIO n+1
Lower Terminal Block
CIO n+2
L
L
CIO n+4
CIO n+3
L
L
L
L
L
L
L
L
L
00
01
02
03
04
06
NC COM COM COM COM 05
NC COM COM COM COM 05
07 COM 02 COM 05
07
00
01
02
03
04
06
00
01
03
04
06
L
L
L
L
L
L
L
L
L
L
L
CIO n+1
NC NC
NC
NC
00
L
L
01 03
04
L
06 NC
07 COM 02 COM 05 07
L
L
L
L
L
CIO n+4
CIO n+3
CP1W-32ET (Sinking Transistor Outputs)
Upper Terminal Block
CIO n+1
Lower Terminal Block
CIO n+3
CIO n+2
L
L
NC COM COM COM COM 05
L
L
L
07 COM 02 COM 05
07
00
01
02
03
04
06
00
01
03
04
06
L
L
L
L
L
L
L
L
L
L
L
CIO n+1
132
L
NC
NC
CIO n+2
Output Wiring
L
CIO n+2
NC NC NC
NC NC NC
CIO n+4
L
L
L
L
L
L
00
01
02
03
04
06
NC COM COM COM COM 05
L
CIO n+3
L
L
L
L
L
00
01
03
04
06
07 COM 02 COM 05
L
L
L
CIO n+4
NC
07
L
Section 3-6
CP-series Expansion I/O Unit Wiring
Output Wiring
CP1W-32ET1 (Sourcing Transistor Outputs)
Upper Terminal Block
CIO n+1
Lower Terminal Block
CIO n+2
L
L
NC COM COM COM COM 05
L
CIO n+3
L
L
07 COM 02 COM 05
07
00
01
02
03
04
06
00
01
03
04
06
L
L
L
L
L
L
L
L
L
L
L
CIO n+1
NC
NC
NC
NC
NC
NC
CIO n+4
L
L
L
L
L
L
00
01
02
03
04
06
NC COM COM COM COM 05
L
CIO n+2
L
L
L
L
L
00
01
03
04
06 NC
07 COM 02 COM 05
07
L
L
CIO n+3
L
L
CIO n+4
20-point I/O Units ([email protected]@) (Terminal Block is not Removable)
Input Wiring
[email protected]@
CIO m+1
24 VDC
−
+
+
−
COM
NC
01
00
03
02
05
04
07
06
09
08
11
10
CIO m+1
Output Wiring
CP1W-20EDR1 (Relay Outputs)
L
L
L
L
L
L
00
01
02
04
05
07
COM COM COM
03
L
COM
06
L
133
Section 3-6
CP-series Expansion I/O Unit Wiring
CP1W-20EDT (Sinking Transistor Outputs)
L
L
L
L
00
01
02
04
COM COM COM
03
L
L
05
07
COM
06
L
L
CP1W-20EDT1 (Sourcing Transistor Outputs)
L
L
L
L
L
L
00
01
02
04
05
07
COM COM COM
03
COM
06
L
L
16-point Output Units ([email protected]@) (Terminal Block is not Removable)
Output Wiring
CP1W-16ER (Relay Outputs)
Unit Lower Terminal Block
Unit Upper Terminal Block
NC
L
L
L
L
L
L
00
02
04
05
07
NC COM
NC COM COM COM
NC
134
NC
L
04
06
01
03
L
L
COM
06
COM
00
01
02
03
05
07
L
L
L
L
L
L
L
NC
Section 3-6
CP-series Expansion I/O Unit Wiring
Output Wiring
CP1W-16ET (Sinking Transistor Outputs)
Upper Terminal Block
Lower Terminal Block
CIO n+1
CIO n+2
L
L
04
06
NC
NC COM COM COM
L
L
L
L
L
00
02
04
05
07
NC COM
NC
00
01
02
03
05
07
L
L
L
L
L
L
01
03
L
L
COM
06
NC
L
CIO n+2
CIO n+1
Output Wiring
NC
COM
CP1W-16ET1 (Sourcing Transistor Outputs)
Upper Terminal Block
Lower Terminal Block
CIO n+2
CIO n+1
L
L
04
06
NC
NC COM COM COM
L
L
L
L
L
00
02
04
05
07
NC COM
NC
NC
COM
00
01
02
03
05
07
L
L
L
L
L
L
01
03
L
L
CIO n+1
COM
06
NC
L
CIO n+2
8-point Input Units (CP1W-8ED) (Terminal Block is not Removable)
Input Wiring
Unit Upper Terminal Block
24 VDC
−
+
+
−
COM
00
01
Unit Lower Terminal Block
03
04
02
COM
+
−
−
24 VDC
+
06
05
07
The Unit's upper terminal block COM
and lower terminal block COM are
connected internally, but connect them
externally as well.
135
Section 3-6
CP-series Expansion I/O Unit Wiring
8-point Output Units ([email protected]) (Terminal Block is not Removable)
Output Wiring
CP1W-8ER (Relay Outputs)
Unit Upper Terminal Block
COM
Output Wiring
Unit Lower Terminal Block
L
L
L
L
01
03
04
06
00
02
L
L
COM
07
L
L
CP1W-8ET (Sinking Transistor Outputs)
Unit Upper Terminal Block
Unit Lower Terminal Block
+
4.5 to
30 VDC
−
COM
Output Wiring
05
L
L
L
L
01
03
04
06
00
02
L
L
COM
05
07
L
L
−
4.5 to
30 VDC
+
CP1W-8ET1 (Sourcing Transistor Outputs)
Unit Upper Terminal Block
4.5 to
30 VDC
Unit Lower Terminal Block
−
L
L
L
L
01
03
04
06
+
COM
00
02
COM
4.5 to
30 VDC
L
136
L
05
07
L
L
+
−
SECTION 4
I/O Memory Allocation
This section describes the structure and functions of the I/O Memory Areas and Parameter Areas.
4-1
Overview of I/O Memory Area. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
138
4-1-1
I/O Memory Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
138
4-1-2
Overview of the Data Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
139
4-1-3
Clearing and Holding I/O Memory. . . . . . . . . . . . . . . . . . . . . . . . . .
142
4-1-4
Hot Start/Hot Stop Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
143
I/O Area and I/O Allocations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
145
4-2-1
I/O Bits Allocated to CPU Units . . . . . . . . . . . . . . . . . . . . . . . . . . .
146
4-2-2
I/O Bits Allocated to Expansion I/O Units . . . . . . . . . . . . . . . . . . . .
148
4-2-3
I/O Allocation Examples with Expansion I/O Units . . . . . . . . . . . .
150
4-2-4
I/O Word Allocations to Expansion Units . . . . . . . . . . . . . . . . . . . .
151
4-3
1:1 Link Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
152
4-4
Serial PLC Link Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
153
4-5
Internal Work Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
153
4-6
Holding Area (H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
154
4-7
Auxiliary Area (A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
155
4-8
TR (Temporary Relay) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
155
4-9
Timers and Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
156
4-9-1
Timer Area (T) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
156
4-9-2
Counter Area (C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
158
4-9-3
Changing the BCD or Binary Mode for Counters and Timers . . . . .
159
4-2
4-10 Data Memory Area (D) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
160
4-11 Index Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
161
4-11-1 Using Index Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
165
4-11-2 Precautions for Using Index Registers . . . . . . . . . . . . . . . . . . . . . . .
168
4-12 Data Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
170
4-13 Task Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
171
4-14 Condition Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
171
4-15 Clock Pulses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
174
137
Section 4-1
Overview of I/O Memory Area
4-1
Overview of I/O Memory Area
4-1-1
I/O Memory Area
This region of memory contains the data areas that can be accessed as
instruction operands. I/O memory includes the CIO Area, Work Area, Holding
Area, Auxiliary Area, DM Area, Timer Area, Counter Area, Task Flag Area,
Data Registers, Index Registers, Condition Flag Area, and Clock Pulse Area.
I/O Memory
Instruction
Area
CIO
Area
I/O Area
Size
Range
Input
Area
1,600 bits
(100
words)
CIO 0 to
CIO 99
Output
Area
1,600 bits
(100
words)
CIO 100
to CIO
199
Task usage
Shared by
all tasks
Allocation
Bit
Word
access access
Access
Read
Write
Forcing
Change
bit
from CXProgrammer status
CP1L CPU
Units and CPseries Expansion Units or
Expansion I/O
Units
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
1:1 Link Area
256 bits
CIO 3000
(16 words) to CIO
3015
1:1 Links
OK
OK
OK
OK
OK
OK
Serial PLC Link Area
1,440 bits CIO 3100
(90 words) to CIO
3189
Serial PLC
Links
OK
OK
OK
OK
OK
OK
Work Area
14,400
bits (900
words)
CIO 3800
to CIO
6143
---
OK
OK
OK
OK
OK
OK
Work Area
8,192 bits
(512
words)
W000 to
W511
---
OK
OK
OK
OK
OK
OK
Holding Area
8,192 bits
(512
words)
H000 to
H511
(Note 6)
---
OK
OK
OK
OK
OK
OK
Auxiliary Area
15,360
bits (960
words)
A000 to
A959
---
OK
---
OK
Note 1
Note 1
No
TR Area
16 bits
TR0 to
TR15
---
OK
OK
OK
OK
No
No
Data Memory Area
32,768
words
D00000
to
D32767
(Note 7)
---
No
(Note
2)
OK
OK
OK
OK
No
Timer Completion Flags
4,096 bits
T0000 to
T4095
---
OK
---
OK
OK
OK
OK
Counter Completion Flags
4,096 bits
C0000 to
C4095
---
OK
---
OK
OK
OK
OK
Timer PVs
4,096
words
T0000 to
T4095
---
---
OK
OK
OK
OK
No
(Note 4)
Counter PVs
4,096
words
C0000 to
C4095
---
---
OK
OK
OK
OK
No
(Note 5)
Task Flag Area
32 bits
TK0 to
TK31
---
OK
---
OK
No
No
No
Index Registers
16 registers
IR0 to
IR15
OK
OK
Indirect
addressing only
Specific
No
instructions only
No
Data Registers
16 registers
DR0 to
DR15
Function
--separately in
each task
(Note 3)
---
No
OK
OK
OK
No
Note
No
1. A0 to A447 are read only and cannot be written. A448 to A959 are
read/write.
2. Bits can be manipulated using TST(350), TSTN(351), SET, SETB(532),
RSTB(533), and OUTB(534).
138
Section 4-1
Overview of I/O Memory Area
3. Index registers and data registers can be used either individually by task
or they can be shared by all the tasks (the default is individual use by task).
4. Timer PVs can be refreshed indirectly by force-setting/resetting the Timer
Completion Flags.
5. Counter PVs can be refreshed indirectly by force-setting/resetting the
Counter Completion Flags.
6. H512 to H1535 are used as a Function Block Holding Area. These words
can be used only for function block instances (internally allocated variable
area).
7. Data Memory Area for CPU Units with 10, 14 or 20 I/O Points: D0 to D9999
and D32000 to D32767.
4-1-2
Overview of the Data Areas
■ CIO Area
It is not necessary to input the “CIO” acronym when specifying an address in
the CIO Area. The CIO Area is generally used for data exchanges, such as
I/O refreshing with PLC Units. Words that are not allocated to Units may be
used as work words and work bits in the program.
Bit 15
00
Word CIO 0
Input Area
CIO 99
CIO 100
Output Area
CIO 199
Not used (see note).
CIO 1900
Reserved for system.
CIO 1999
Not used (see note).
CIO 3000
1:1 Link Area
CIO 3015
Not used (see note).
CIO 3100
Serial PLC Link Area
CIO 3189
Not used (see note).
CIO 3800
Work Area
CIO 6143
Note
The parts of the CIO Area that are labelled “not used” may be used in programming as work bits. In the future, however, unused CIO Area bits may be
used when expanding functions. Always use Work Area bits first.
I/O Area (Inputs: CIO 0 to CIO 99, Outputs: CIO 100 to CIO 199)
These words are allocated to built-in I/O terminals of CP1L CPU Units and
CP-series Expansion Units or Expansion I/O Units. Input words and output
bits that aren’t allocated may be used in programming.
139
Section 4-1
Overview of I/O Memory Area
1:1 Link Area
These bits are used by the 1:1 Link Master and Slave. They are used for data
links between CP1L CPU Units and [email protected] CPU Units.
Serial PLC Link Area
These words are allocated for use for data links (Serial PLC Links) with other
CP1L CPU Units or CP1H CPU Units. Addresses not used for Serial PLC
Links can be used in programming.
Internal I/O Area
These words can be used in programming; they cannot be used for I/O
exchange with external I/O terminals. Be sure to use the work words provided
in the Work Area before using words in the Internal I/O Area or other unused
words in the CIO Area. It is possible that these words will be assigned to new
functions in future versions of the CPU Units. The parts of the CIO Area that
are labelled “Not used” are functionally identical to the Internal I/O Area.
Work Area (W)
Words in the Work Area can be used in programming; they cannot be used for
I/O exchange with external I/O terminals. Use this area for work words and
bits before any words in the CIO Area.
Word 15
Bit
W511
Note
Holding Area (H)
These words should be used first in programming be assigned to new functions in future versions of CP1L CPU Units.
Words in the Holding Area can be used in programming. These words retain
their content when the PLC is turned ON or the operating mode is switched
between PROGRAM mode and RUN or MONITOR mode.
Word 15
Bit
H511
Note H512 to H1535 are used as a Function Block Holding Area. These words can
be used only for function block instances (internally allocated variable area).
These words cannot be specified as instruction operands in the user program.
140
Section 4-1
Overview of I/O Memory Area
Auxiliary Area (A)
These words are allocated to specific functions in the system.
Refer to Appendix C Auxiliary Area Allocations by Function and Appendix D
Auxiliary Area Allocations by Address for details on the Auxiliary Area.
Word 15
Bit
Read-only area
A447
A448
Read-write area
A959
Temporary Relay Area
(TR)
The TR Area contains bits that record the ON/OFF status of program
branches. Refer to the CP1H/CP1L Programming Manual for details.
Data Memory Area (D)
The DM Area is a multi-purpose data area that is normally accessed only in
word-units. These words retain their content when the PLC is turned ON or
the operating mode is switched between PROGRAM mode and RUN or MONITOR mode.
CPU Unit with 10, 14 or 20 I/O Points
CPU Unit with 30, 40 or 60 I/O Points
Bit 15
D0
Bit 15
0
0
D0
D9999
D32000
D32767
Timer Area (T)
D32767
There are two parts to the Timer Area: the Timer Completion Flags and the
timer Present Values (PVs). Up to 4,096 timers with timer numbers T0 to
T4095 can be used.
Timer Completion Flags
These flags are read as individual bits. A Completion Flag is turned ON by the
system when the corresponding timer times out (i.e., when the set time
elapses).
Timer PVs
The PVs are read and written as words (16 bits). The PVs count up or down
as the timer operates.
Counter Area (C)
There are two parts to the Counter Area: the Counter Completion Flags and
the Counter Present Values (PVs). Up to 4,096 counters with counter numbers C0 to C4095 can be used.
Counter Completion Flags
These flags are read as individual bits. A Completion Flag is turned ON by the
system when the corresponding counter counts out (i.e., when the set value is
reached).
141
Section 4-1
Overview of I/O Memory Area
Counter PVs
The PVs are read and written as words (16 bits). The PVs count up or down
as the counter operates.
Condition Flags
These flags include the Arithmetic Flags, such as the Error Flag and Equals
Flag, which indicate the results of instruction execution as well as the Always
ON and Always OFF Flags. The Condition Flags are specified with symbols
rather than addresses.
Clock Pulses
The Clock Pulses are turned ON and OFF by the CPU Unit’s internal timer.
These bits are specified with symbols rather than addresses.
Task Flag Area (TK)
A Task Flag will be ON when the corresponding cyclic task is in executable
(RUN) status and OFF when the cyclic task hasn’t been executed (INI) or is in
standby (WAIT) status.
Index Registers (IR)
Index registers (IR0 to IR15) are used to store PLC memory addresses (i.e.,
absolute memory addresses in RAM) to indirectly address words in I/O memory. The Index Registers can be used separately in each task or they can be
shared by all tasks.
Data Registers (DR)
Data registers (DR0 to DR15) are used together with Index Registers. When a
Data Register is input just before an Index Register, the content of the Data
Register is added to the PLC memory address in the Index Register to offset
that address. The Data Registers can be used separately in each task or they
can be shared by all tasks.
4-1-3
Clearing and Holding I/O Memory
Area
Fatal error generated
Mode changed1
Execution of FALS
PLC power turned ON
Other fatal errors
PLC Setup set to
clear IOM Hold Bit
status2
PLC Setup set to
hold IOM Hold Bit
status2
IOM Hold
Bit OFF
IOM Hold
Bit ON
IOM Hold
Bit OFF
IOM Hold
Bit ON
IOM Hold
Bit OFF
IOM Hold
Bit ON
IOM Hold
Bit OFF
IOM Hold
Bit ON
IOM Hold
Bit OFF
IOM Hold
Bit ON
Cleared
Retained
Retained
Retained
Cleared
Retained
Cleared
Cleared
Cleared
Retained
Work Area (W)
Cleared
Retained
Retained
Retained
Cleared
Retained
Cleared
Cleared
Cleared
Retained
Holding Area (H)
Retained
Retained
Retained
Retained
Retained
Retained
Retained
Retained
Retained
Retained
Auxiliary Area (A)
Status treatment depends on address.
Data Memory Area (D)
Retained
Retained
Retained
Retained
Retained
Retained
Retained
Retained
Retained
Retained
Timer Completion Flags (T)
Cleared
Retained
Retained
Retained
Cleared
Retained
Cleared
Cleared
Cleared
Retained
Timer PVs (T)
Cleared
Retained
Retained
Retained
Cleared
Retained
Cleared
Cleared
Cleared
Retained
Counter Completion Flags (C)
Retained
Retained
Retained
Retained
Retained
Retained
Retained
Retained
Retained
Retained
Counter PVs (C)
Retained
Retained
Retained
Retained
Retained
Retained
Retained
Retained
Retained
Retained
Task Flags (TK)
Cleared
Cleared
Retained
Retained
Cleared
Cleared
Cleared
Cleared
Cleared
Cleared
Index Registers (IR)
Cleared
Retained
Retained
Retained
Cleared
Retained
Cleared
Cleared
Cleared
Retained
Data Registers (DR)
Cleared
Retained
Retained
Retained
Cleared
Retained
Cleared
Cleared
Cleared
Retained
CIO
Area
I/O Area
Serial PC Link Area
Internal I/O Area
Note
1. Mode changed from PROGRAM to RUN/MONITOR or vice-versa.
2. The PLC Setup’s IOM Hold Bit Status at Startup setting determines whether the IOM Hold Bit’s status is held or cleared when the PLC is turned ON.
142
Section 4-1
Overview of I/O Memory Area
4-1-4
Hot Start/Hot Stop Functions
Operating Mode Changes
Hot Start
Turn ON the IOM Hold Bit to retain all data* in I/O memory when the CPU Unit
is switched from PROGRAM mode to RUN/MONITOR mode to start program
execution.
I/O memory
PROGRAM
Retain
CIO and
other areas
MONITOR or RUN
Hot Stop
When the IOM Hold Bit is ON, all data* in I/O memory will also be retained
when the CPU Unit is switched from RUN or MONITOR mode to PROGRAM
mode to stop program execution.
MONITOR or RUN
Retain
I/O memory
CIO and
other areas
PROGRAM
Note *The following areas of I/O memory will be cleared during mode changes
(between PROGRAM and RUN/MONITOR) unless the IOM Hold Bit is ON:
the CIO Area (I/O Area, Data Link Area, CPU Bus Unit Area, Special I/O Unit
Area, DeviceNet (CompoBus/D) Area, and Internal I/O Areas), Work Area,
Timer Completion Flags, and Timer PVs.
Auxiliary Area Flags and Words
Name
IOM Hold Bit
Address
Description
A500.12 Specifies whether the I/O memory will be retained or not
when the CPU Unit operating mode is changed
(between PROGRAM and RUN/MONITOR) or when the
power is cycled.
OFF: I/O memory is cleared to 0 when the operating
mode is changed.
ON: I/O memory is retained when the operating mode
is changed between PROGRAM and RUN or
MONITOR.
When the IOM Hold Bit is ON, all outputs from Output Units will be maintained
when program execution stops. When the program starts again, outputs will
have the same status that they had before the program was stopped and
instructions will be executed. (When the IOM Hold Bit is OFF, instructions will
be executed after the outputs have been cleared.)
143
Section 4-1
Overview of I/O Memory Area
PLC Power ON
In order for all data* in I/O memory to be retained when the PLC is turned ON,
the IOM Hold Bit must be ON and it must be protected in the PLC Setup using
the IOM Hold Bit Status at Startup parameter.
Retained
Power ON
I/O memory
CIO and
other areas
Auxiliary Area Flags and Words
Name
Address
IOM Hold Bit
A500.12
Description
Specifies whether the I/O memory will be retained or
not when the CPU Unit operating mode is changed
(between PROGRAM and RUN/MONITOR) or when
the power is cycled.
OFF: I/O memory is cleared to 0 when the operating
mode is changed.
ON: I/O memory is retained when the operating
mode is changed between PROGRAM and
RUN or MONITOR.
PLC Setup
Name
IOM Hold
Bit Status
at Startup
144
Description
Setting
Default
To retain all data in I/O
OFF
OFF: The IOM Hold Bit is cleared
memory when the PLC
(Cleared)
to 0 when power is cycled.
is turned ON, set the
ON: The status of the IOM Hold
IOM Hold Bit at startup
Bit is retained when power is
parameter to hold the
cycled.
status of the I/O Hold Bit.
Section 4-2
I/O Area and I/O Allocations
4-2
I/O Area and I/O Allocations
Input Bits: CIO 0.00 to CIO 99.15 (100 words)
Output Bits: CIO 100.00 to CIO 199.15 (100 words)
The starting words for inputs and outputs are predetermined for CP1L CPU
Unit. Input bits in CIO 0 and CIO 1 and output bits in CIO 100 and CIO 101
are automatically allocated to the built-in I/O on the CPU Unit. CP-series
Expansion Units and CP-series Expansion I/O Units are automatically allocated input bits in words starting from CIO 2 and output bits in words starting
from CIO 102.
• Allocated Words and Number of Expansion Units and Expansion I/O
Units
CPU Unit
CPU Unit with
10 I/O points
CPU Unit with
14 I/O points
CPU Unit with
20 I/O points
CPU Unit with
30 I/O points
CPU Unit with
40 I/O points
CPU Unit with
60 I/O points
Allocated words
Input bits
Output bits
Number of
Expansion Units
and Expansion I/O
Units connected
CIO 0
CIO 100
0
CIO 0
CIO 100
1
CIO 0
CIO 100
1
CIO 0 and CIO 1 CIO 100 and CIO 101 3
CIO 0 and CIO 1 CIO 100 and CIO 101 3
CIO 0, CIO 1,
CIO 2
CIO 100, CIO 101,
CIO 102
3
For example, with a CPU Unit with 40 I/O points, the input bits in CIO 0 and
CIO 1 and the outputs bits in CIO 100 and CIO 101 would be allocated to the
built-in I/O of the CPU Unit. Input bits in CIO 2 and higher and outputs bits in
CIO 102 and higher would be automatically allocated in order to any Expansion Units or Expansion I/O Units connected to the CPU Unit.
When the power to the CPU Unit is turned ON, the CPU Unit checks for any
Expansion Units and Expansion I/O Units connected to it and automatically
allocates I/O bits. If the order in which the Units are connected is changed, the
the bits used in the ladder program will no longer match the bits allocated to
the actual Units. Always review the ladder program whenever changing the
order in which Units are connected.
145
Section 4-2
I/O Area and I/O Allocations
4-2-1
I/O Bits Allocated to CPU Units
CPU Unit with 10 I/O Points
6 inputs
CIO 0
(CIO 0.00 to CIO 0.05)
Input bits
CIO 100
(CIO 100.00 to CIO 100.03)
Output bits
4 outputs
15
14
13
12
CIO 0
11
10
9
8
7
6
5
Do not use
4
3
2
1
0
6 input bits
CIO 100
4 output bits
Can be used as work bits.
CPU Unit with 14 I/O Points
8 inputs
Input bits
CIO 0
(CIO 0.00 to CIO 0.07)
Output bits
CIO 100
(CIO 100.00 to CIO 100.05)
6 outputs
15
14
13
12
11
10
09
08
07
06
05
CIO 0
03
02
01
00
8 input bits
Do not use.
CIO 100
04
6 output bits
Can be used as work bits.
CPU Unit with 20 I/O Points
12 inputs
CIO 0
(CIO 0.00 to CIO 0.11)
Input bits
CIO 100
(CIO 100.00 to CIO 100.07)
Output bits
8 outputs
15
CIO 0
CIO 100
146
14
13
12
11
10
Do not use.
Can be used as work bits.
09
08
07
06
05
04
03
12 inputs bits
8 output bits
02
01
00
Section 4-2
I/O Area and I/O Allocations
CPU Unit with 30 I/O Points
18 inputs
CIO 0 (CIO 0.00 to CIO 0.11)
CIO 1 (CIO 1.00 to CIO 1.05)
Input bits
CIO 100 (CIO 100.00 to CIO 100.07)
CIO 101 (CIO 101.00 to CIO 101.03)
Output bits
8 outputs
15
CIO 0
14
13
12
11
10
09
08
07
06
05
04
03
02
01
00
18 inputs bits
Do not use.
CIO 1
12 output bits
CIO 100
Can be used as work bits.
CIO 101
CPU Unit with 40 I/O Points
24 inputs
Input bits
CIO 0 (CIO 0.00 to CIO 0.11)
CIO 1 (CIO 1.00 to CIO 1.11)
Output bits
CIO 100 (CIO 100.00 to CIO 100.07)
CIO 101 (CIO 101.00 to CIO 101.07)
16 outputs
15
CIO 0
14
13
12
11
10
09
08
07
06
05
04
03
02
01
00
1
0
24 inputs bits
Do not use.
CIO 1
CIO 100
Can be used as work bits.
16 output bits
CIO 101
CPU Unit with 60 I/O Points
36 inputs
C IO 0 (C IO 0 .0 0 to C IO 0 .11 )
C IO 1 (C IO 1 .0 0 to C IO 1 .11 )
C IO 2 (C IO 2 .0 0 to C IO 2 .11 )
Input bits
C IO 10 0 ( C I O 1 00. 00 t o C IO 10 0. 7)
C IO 10 1 ( C I O 1 01. 00 t o C IO 10 1. 7)
C IO 10 2 ( C I O 1 02. 00 t o C IO 10 2. 7)
Output bits
24 outputs
15
CIO 0
CIO 1
CIO 2
CIO 100
CIO 101
CIO 102
14
13
12
11
10
Do not use
Can be usedas workbits.
9
8
7
6
5
4
3
2
36 input bits
24 output bits
For a CPU Unit with 40 I/O points (shown above), a total of 24 input bits are
allocated to the input terminal block. The bits that are allocated are input bits
CIO 0.00 to CIO 0.11 (i.e., bits 00 to 11 in CIO 0) and input bits CIO 1.00 to
CIO 1.11 (i.e., bits 00 to 11 in CIO 1).
147
Section 4-2
I/O Area and I/O Allocations
In addition, a total of 16 output bits are allocated to the output terminal block.
The bits that are allocated are output bits CIO 100.00 to CIO 100.07 (i.e., bits
00 to 07 in CIO 0) and output bits CIO 101.00 to CIO 101.07 (i.e., bits 00 to 07
in CIO 1).
The upper bits (bits 12 to 15) not used in the input words cannot be used as
work bits. Only the bits not used in the output words can be used as work bits.
4-2-2
I/O Bits Allocated to Expansion I/O Units
There are Expansion I/O Units for expanding inputs, for expanding outputs,
and for expanding both input and outputs. I/O bits starting from bit 00 in the
next word after the word allocated to the previous Expansion Unit, Expansion
I/O Unit, or CPU Unit are automatically allocated. This word is indicated as
“CIO m” for input words and as “CIO n” for output words.
Unit
Unit with 8 inputs
Unit with Relays
8 outputs Sinking
transistors
Sourcing
transistors
Unit with Relays
16 outputs
Sinking
CP1W-8ED
CP1W-8ER
CP1W-8ET
Input bits
No. of No. of
Addresses
bits
words
8 bits 1 word CIO m (bits 00 to 07)
--None
None
--None
None
Output bits
No. of No. of
Addresses
bits
words
--None
None
8 bits 1 word CIO n (bits 00 to 07)
8 bits 1 word CIO n (bits 00 to 07)
CP1W-8ET1
---
None
None
8 bits
CP1W-16ER
---
None
None
CP1W-16ET
---
None
None
16 bits 2 words CIO n (bits 00 to 07)
CIO n+1 (bits 00 to 07)
16 bits 2 words CIO n (bits 00 to 07)
CIO n+1 (bits 00 to 07)
---
None
None
16 bits 2 words CIO n (bits 00 to 07)
CIO n+1 (bits 00 to 07)
transistors
Sourcing CP1W-16ET1
transistors
Unit with
20 I/O
Unit
with 32
outputs
Unit with
40 I/O
148
1 word
CIO n (bits 00 to 07)
Relays
Sinking
transistors
Sourcing
transistors
Relays
CP1W-20EDR1
CP1W-20EDT
12 bits 1 word
12 bits 1 word
CIO m (bits 00 to 11)
CIO m (bits 00 to 11)
8 bits
8 bits
1 word
1 word
CIO n (bits 00 to 07)
CIO n (bits 00 to 07)
CP1W-20EDT1
12 bits 1 word
CIO m (bits 00 to 11)
8 bits
1 word
CIO n (bits 00 to 07)
CP1W-32ER
---
None
Sinking
transistors
CP1W-32ET
Sourcing
transistors
CP1W-32ET1
Relays
CP1W-40EDR
Sinking
transistors
Sourcing
transistors
CP1W-40EDT
CP1W-40EDT1
None
32 bits 4 words CIO n (bits 00 to 07)
CIO n+1 (bits 00 to 07)
CIO n+2 (bits 00 to 07)
CIO n+3 (bits 00 to 07)
--None
None
32 bits 4 words CIO n (bits 00 to 07)
CIO n+1 (bits 00 to 07)
CIO n+2 (bits 00 to 07)
CIO n+3 (bits 00 to 07)
--None
None
32 bits 4 words CIO n (bits 00 to 07)
CIO n+1 (bits 00 to 07)
CIO n+2 (bits 00 to 07)
CIO n+3 (bits 00 to 07)
24 bits 2 words CIO m (bits 00 to 11)
16 bits 2 words CIO n (bits 00 to 07)
CIO m+1 (bits 00 to 11)
CIO n+1 (bits 00 to 07)
24 bits 2 words CIO m (bits 00 to 11)
16 bits 2 words CIO n (bits 00 to 07)
CIO m+1 (bits 00 to 11)
CIO n+1 (bits 00 to 07)
24 bits 2 words CIO m (bits 00 to 11)
16 bits 2 words CIO n (bits 00 to 07)
CIO m+1 (bits 00 to 11)
CIO n+1 (bits 00 to 07)
Section 4-2
I/O Area and I/O Allocations
■ I/O Bit Addresses
Units 8 Input Points (CP1W-8ED)
Eight input bits are allocated in one word (bits 00 to 07 in CIO m).
15
Inputs
14
13
m
12
11
10
09
08
07
06
05
04
03
02
01
00
Do not use.
Only one word (8 bits) is allocated to an 8-input Expansion Input Unit. No output words are allocated. Input bits 08 to 15 are always cleared by the system
and cannot be used as work bits.
Units with 8 Output Points ([email protected]@)
Eight output bits are allocated in one word (bits 00 to 07 in CIO n+1).
15
Outputs
14
13
12
11
10
09
08
07
06
05
04
03
02
01
00
n
Can be used as work bits.
Only one word (8 bits) is allocated to an 8-output Expansion Output Unit. No
input words are allocated. Output bits 08 to 15 can be used as work bits.
Units with 16 Output Points ([email protected]@)
Sixteen output bits in two words are allocated in two words (bits 00 to 07 in
CIO n and bits 00 to 07 in CIO n+1).
15
14
n
Output
bits
n+1
13
12
11
10
09
08
07
06
05
04
03
02
01
00
Can be used as work bits.
Two words (16 bits) are allocated to a 16-output Expansion Output Unit. No
input words are allocated. Output bits 08 to 15 can be used as work bits.
Units with 20 I/O Points ([email protected]@)
Twelve input bits are allocated in one word (bits 00 to 11 in CIO m). Eight output bits are allocated in one word (bits 00 to 07 in CIO n).
15
Input bits
m
14
13
Do not use.
12
11
10
09
08
07
06
05
04
03
02
01
00
Output bits n
Can be used as work bits.
One input word (12 bits) and one output word (8 bits) are allocated for a 20point Expansion I/O Unit.
Input bits 12 to 15 are always cleared by the system and cannot be used as
work bits. Output bits 08 to 15, however, can be used as work bits.
Units with 32 Output Points ([email protected]@)
Thirty-two output bits are allocated in four words (bits 00 to 07 in CIO n, bits
00 to 07 in CIO n+1, bits 00 to 07 in CIO n+2 and bits 00 to 07 in CIO n+3).
15
n
Output
bits
n+1
14
13
12
11
10
09
08
07
06
05
04
03
02
01
00
Can be used as work bits.
n+2
n+3
Four words (32 bits) are allocated to a 32-output Expansion Output Unit. No
input words are allocated. Output bits 08 to 15 can be used as work bits.
149
Section 4-2
I/O Area and I/O Allocations
Units with 40 I/O Points ([email protected]@)
Twenty-four input bits in two words are allocated (bits 00 to 11 in CIO m and
bits 00 to 11 CIO m+1). Sixteen output bits in two words are allocated (bits 00
to 07 in CIO n and bits 00 to 07 in CIO n+1).
15
m
Input
bits
m+1
Output
bits
14
13
12
11
10
09
08
07
06
05
04
03
02
01
00
Do not use.
n
Can be used as work bits.
n+1
Two input words (24 bits) and two output words (16 bits) are allocated to a 40point Expansion I/O Unit. Input bits 12 to 15 cannot be used as work bits. Output bits 08 to 15, however, can be used as work bits.
4-2-3
I/O Allocation Examples with Expansion I/O Units
Example 1: Maximum I/O Capacity
The configuration shown in this example is for the maximum I/O capacity. It
consists of a CPU Unit with 40 I/O points and three Expansion I/O Units, each
with 40 I/O points. Up to three Expansion I/O Units can be connected to a
CPU Unit with either 30, 40 or 60 I/O points.
When Expansion I/O Units with 40 I/O points are connected, control is possible for up to 160 I/O points, including 96 inputs and 64 outputs.
Three Expansion I/O Units, each with 40 I/O points
CPU Unit
(40 I/O points)
CIO 2.00 to CIO 2.11
CIO 3.00 to CIO 3.11
CIO 0.00 to CIO 0.11
CIO 1.00 to CIO 1.11
Input bits
24 input points
16 output points
Output bits
Bit
15
14
24 input points
24 input points
16 output points
16 output points
13
12
11
10
CIO 0
CIO 2
08
07
06
05
04
03
02
01
First Expansion I/O Unit with 40 I/O points
CIO 3
CIO 4
16 output points
CIO 106.00 to CIO 106.07
CIO 107.00 to CIO 107.07
CPU Unit with 40 I/O points
CIO 1
Input bits
09
24 input points
CIO 104.00 to CIO 106.07
CIO 105.00 to CIO 105.07
CIO 102.00 to CIO 102.07
CIO 103.00 to CIO 103.07
CIO 100.00 to CIO 100.07
CIO 101.00 to CIO 101.07
CIO 6.00 to CIO 6.11
CIO 7.00 to CIO 7.11
CIO 4.00 to CIO 4.11
CIO 5.00 to CIO 5.11
Do not use.
Second Expansion I/O Unit with 40 I/O points
CIO 5
CIO 6
Third Expansion I/O Unit with 40 I/O points
CIO 7
CIO 100
CPU Unit with 40 I/O points
CIO 101
CIO 102
Output bits
CIO 103
CIO 104
First Expansion I/O Unit with 40 I/O points
Can be used as work bits.
Second Expansion I/O Unit with 40 I/O points
CIO 105
CIO 106
CIO 107
150
Third Expansion I/O Unit with 40 I/O points
00
Section 4-2
I/O Area and I/O Allocations
Example 2: Connecting Expansion I/O Units with Only Inputs or Only
Outputs
If Expansion I/O Units with only inputs or only outputs are connected, the
input or output word not used by an Expansion I/O Unit is allocated to the next
Unit that requires it.
CPU Unit
(30 I/O points)
Input bits
Output bits
First Expansion I/O Unit:
Unit with 8 inputs
Second Expansion I/O Unit:
Unit with 16 outputs
104.00 104.07
CIO 0.00 to CIO 0.11
CIO 1.00 to CIO 1.05
CIO 2.00 to CIO 2.07
18 input points
8 input points
12 output points
No outputs
CIO 3.00 to CIO 3.11
No inputs
12 input points
15
14
13
12
11
10
09
08
07
06
05
CIO 0
Input bits
03
02
01
00
CPU Unit with 30 I/O points
Do not use.
First Expansion I/O Unit: Unit with 8 inputs
CIO 3
Third Expansion I/O Unit: Unit with 20 I/O
CIO 100
CPU Unit with 30 I/O
points
CIO 101
Can be used as work bits.
CIO 102
Second Expansion I/O Unit:
Unit with 16 outputs
CIO 103
CIO 104
4-2-4
04
CIO 104.00 to CIO 104.07
CIO 1
CIO 2
Output bits
8 output points
16 output points
CIO 102.00 to CIO 102.07
CIO 103.00 to CIO 103.07
CIO 100.00 to CIO 100.07
CIO 101.00 to CIO 101.03
Bit
Third Expansion I/O Unit:
Unit with 20 I/O
Third Expansion I/O Unit: Unit with 20 I/O
I/O Word Allocations to Expansion Units
Unit
Analog I/O Units
Analog Input Units
Analog Output Units
Temperature Sensor Units
CompoBus/S I/O Link
Units
m:
n:
Input words
Output words
CP1W-MAD11
CP1W-MAD42
2 words CIO m to CIO m+1
4 words CIO m to CIO m+3
1 word CIO n
2 words CIO n to CIO n+1
CP1W-MAD44
CP1W-AD041
CP1W-AD042
CP1W-DA021
4 words CIO m to CIO m+3
4 words CIO m to CIO m+3
4 words CIO n to CIO n+3
2 words CIO n to CIO n+1
None
---
2 words CIO n to CIO n+1
CP1W-DA041
CP1W-DA042
None
---
4 words CIO n to CIO n+3
CP1W-TS001
CP1W-TS002
2 words CIO m to CIO m+1
4 words CIO m to CIO m+3
None
None
-----
CP1W-TS003
CP1W-TS004
4 words CIO m to CIO m+3
2 words CIO m to CIO m+1
None
1 word
--CIO n
CP1W-TS101
CP1W-TS102
2 words CIO m to CIO m+1
4 words CIO m to CIO m+3
None
None
-----
CP1W-SRT21
1 word
1 word
CIO n
CIO m
Indicates the next input word after the input word allocated to the
Expansion Unit, Expansion I/O Unit, or CPU Unit to the left of the current Unit.
Indicates the next output word after the output word allocated to the
Expansion Unit, Expansion I/O Unit, or CPU Unit to the left of the current Unit.
151
Section 4-3
1:1 Link Area
■ I/O Word Allocations to Expansion Units
CPU Unit with 40 I/O Points + TS002 + DA041 + 40ED
CPU Unit
(40 I/O points)
Input bits
Second Unit:
Analog Input Unit
First Unit:
Temperature Sensor Unit
CIO 0.00 to CIO 0.11
CIO 1.00 to CIO 1.11
CIO 2 to CIO 5
No inputs
TS002
DA041
Third Unit:
Expansion I/O Unit with 40 I/O points
CIO 2 to CIO 6.11
CIO 7 to CIO 7.11
24 input points
24 input points
16 output points
16 output points
Output bits
CIO 100.00 to CIO 100.07
CIO 101.00 to CIO 101.07
Bit 15
CIO 0
14
13
12
11
10
Do not use.
CIO 106.00 to CIO 106.07
CIO 107.00 to CIO 107.07
CIO 102 to CIO 105
No outputs
09
08
07
06
05
04
03
02
01
00
CPU Unit with 40 I/O points
CIO 1
CIO 2
Input bits
CIO 3
First Unit: Temperature Sensor Unit
CIO 4
CIO 5
CIO 6
Do not use.
Third Unit: Expansion I/O Unit with 40
CIO 7
CIO 100
Can be used as work bits.
CPU Unit with 40 I/O points
CIO 101
CIO 102
Output bits
CIO 103
Second Unit: Analog Output Unit
CIO 104
CIO 105
CIO 106
CIO 107
4-3
Can be used as work bits.
Third Unit: Expansion I/O Unit with 40 I/O points
1:1 Link Area
The 1:1 Link Area contains 1,024 bits (64 words) with addresses ranging from
CIO 3000.00 to CIO 3015.15 (CIO 3000 to CIO 3015).
These bits are used to create 1:1 links (i.e., shared data link areas) by connecting the RS-232C ports of two PLCs, including the CP1L, CPM1A,
CPM2A, CPM2B, CPM2C, SRM1(-V2), CQM1H, and C200HX/HG/HE(-Z).
1:1 Links
Master
Slave
CP1L,
CPM1A,
CPM2A,
CPM2B,
CPM2C,
SRM1(-V2),
CQM1H,
C200HX/HG/HE(-Z),
Other C-series PLCs
RS-232C
CIO 3000
CIO 3000
Write words
Read words
CIO 3007
CIO 3007
CIO 3008
CIO 3008
Read words
CIO 3015
Write words
CIO 3015
Refer to 6-3-6 1:1 Links for information on using 1:1 links.
152
Section 4-4
Serial PLC Link Area
4-4
Serial PLC Link Area
The Serial PLC Link Area contains 1,440 bits (90 words) with addresses ranging from CIO 3100.00 to CIO 3189.15 (CIO 3100 to CIO 3189).
Words in the Serial PLC Link Area can be used for data links with other PLCs.
Serial PLC Links exchange data among CPU Units via the built-in RS-232C
ports, with no need for special programming.
The Serial PLC Link allocations are set automatically by means of the following PLC Setup in the Polling Unit.
• Serial PLC Link Mode
• Number of Serial PLC Link transfer words
• Maximum Serial PLC Link unit number
CP1L CPU
Unit
CP1L CPU
Unit
CJ1M CPU
Unit
Serial PLC
Link Area
RS-232C
port
RS-232C
port
Serial PLC Link
RS-232C
port
Addresses not used for Serial PLC Links can be used in programming, the
same as the Work Area.
Forcing Bit Status
Bits in the Serial PLC Link Area can be force-set and force-reset.
Serial PLC Link Area
Initialization
The contents of the Serial PLC Link Area will be cleared in the following
cases:
1. When the operating mode is changed from PROGRAM mode to
RUN/MONITOR mode or vice-versa and the IOM Hold Bit is OFF
2. When the power is cycled
3. When the Serial PLC Link Area is cleared from the CX-Programmer
4. When PLC operation is stopped when a fatal error other than an
FALS(007) error occurs (The contents of the Serial PLC Link Area will be
retained when FALS(007) is executed.)
4-5
Internal Work Area
The Internal Work Area contains 512 words with addresses ranging from W0
to W511. These words can be used in programming as work words.
There are unused words in the CIO Area (CIO 3800 to CIO 6143) that can
also be used in the program, but use any available words in the Work Area
first because the unused words in the CIO Area may be allocated to other
applications when functions are expanded.
Forcing Bit Status
Bits in the Work Area can be force-set and force-reset.
Work Area Initialization
The contents of the Work Area will be cleared in the following cases:
1. When the operating mode is changed from PROGRAM to RUN or MONITOR mode or vice-versa and the IOM Hold Bit is OFF
2. When the power is cycled
3. When the Work Area is cleared from the CX-Programmer.
153
Section 4-6
Holding Area (H)
4. When PLC operation is stopped when a fatal error other than an
FALS(007) error occurs. (The contents of the Work Area will be retained
when FALS(007) is executed.)
4-6
Holding Area (H)
The Holding Area contains 512 words with addresses ranging from H0 to
H511 (bits H0.00 to H511.15). These words can be used in programming.
Holding Area Initialization
Data in the Holding Area is not cleared when the power is cycled or the PLC’s
operating mode is changed from PROGRAM mode to RUN or MONITOR
mode or vice-versa.
A Holding Area bit will be cleared if it is programmed between IL(002) and
ILC(003) and the execution condition for IL(002) is OFF. To keep a bit ON
even when the execution condition for IL(002) is OFF, turn ON the bit with the
SET instruction just before IL(002).
Self-maintaining Bits
When a self-maintaining bit is programmed with a Holding Area bit, the selfmaintaining bit won’t be cleared even when the power is reset.
Note
1. If a Holding Area bit is not used for the self-maintaining bit, the bit will be
turned OFF and the self-maintaining bit will be cleared when the power is
reset.
2. If a Holding Area bit is used but not programmed as a self-maintaining bit
as in the following diagram, the bit will be turned OFF by execution condition A when the power is reset.
H0.00
H0.00
H0.00
A
3. H512 to H1535 are used as a Function Block Holding Area. These words
can be used only for function block instances (internally allocated variable
area). These words cannot be specified as instruction operands in the user
program.
Precautions
When a Holding Area bit is used in a KEEP(011) instruction, never use a normally closed condition for the reset input if the input device uses an AC power
supply. When the power supply goes OFF or is temporarily interrupted, the
input will go OFF before the PLC’s internal power supply and the Holding Area
bit will be reset.
Set input
Input
Unit
154
H1.00
Reset input
Section 4-7
Auxiliary Area (A)
Instead, use a configuration like the one shown below.
Set input
Input
Unit
H1.00
Reset input
There are no restrictions in the order of using bit address or in the number of
N.C. or N.O. conditions that can be programmed.
4-7
Auxiliary Area (A)
The Auxiliary Area contains 960 words with addresses ranging from A0 to
A959). These words are preassigned as flags and control bits to monitor and
control operation.
A0 through A447 are read-only, but A448 through A959 can be read or written
from the program or the CX-Programmer.
Refer to Appendix C Auxiliary Area Allocations by Function and Appendix D
Auxiliary Area Allocations by Address for Auxiliary Area functions.
Forcing Bit Status
4-8
Read/write bits in the Auxiliary Area cannot be force-set and force-reset continuously.
TR (Temporary Relay) Area
The TR Area contains 16 bits with addresses ranging from TR0 to TR15.
These temporarily store the ON/OFF status of an instruction block for branching and are used only with mnemonics. TR bits are useful when there are several output branches and interlocks cannot be used.
The TR bits can be used as many times as required and in any order required
as long as the same TR bit is not used twice in the same instruction block.
TR bits can be used only with the OUT and LD instructions. OUT instructions
(OUT TR0 to OUT TR15) store the ON OFF status of a branch point and LD
instructions recall the stored ON OFF status of the branch point.
Forcing Bit Status
TR bits cannot be changed from the CX-Programmer.
Examples
In this example, a TR bit is used when two outputs have been directly connected to a branch point.
Instruction
0.00
0.01
TR0
0.02
0.04
0.03
0.05
OUT
LD
Operand
0.00
0.01
TR 0
0.02
0.03
TR 0
AND
OUT
0.04
0.05
LD
OR
OUT
AND
155
Section 4-9
Timers and Counters
In this example, a TR bit is used when an output is connected to a branch
point without a separate execution condition.
0.00
TR0
0.01
0.02
0.03
Instruction
LD
OUT
AND
OUT
LD
OUT
Operand
0.00
TR 0
0.01
0.02
TR 0
0.03
Note A TR bit is not required when there are no execution conditions after the
branch point or there is an execution condition only in the last line of the
instruction block.
0.00
0.01
0.02
0.00
0.01
0.02
4-9
4-9-1
0.03
Instruction
LD
OUT
OUT
Operand
0.00
0.01
0.02
Instruction
Operand
LD
OUT
AND
OUT
0.00
0.01
0.02
0.03
Timers and Counters
Timer Area (T)
The 4,096 timer numbers (T0000 to T4095) are shared by the TIM,
TIMX(550), TIMH(015), TIMHX(551), TMHH(540), TIMHHX(552), TTIM(087),
TTIMX(555), TIMW(813), TIMWX(816), TMHW(815), and TIMHWX(817)
instructions. Timer Completion Flags and present values (PVs) for these
instructions are accessed with the timer numbers.
The TIML(542), TIMLX(553), MTIM(543), and MTIMX(554) instructions do not
use timer numbers.
When a timer number is used in an operand that requires bit data, the timer
number accesses the Completion Flag of the timer. When a timer number is
used in an operand that requires word data, the timer number accesses the
PV of the timer. Timer Completion Flags can be used as often as necessary
as normally open and normally closed conditions and the values of timer PVs
can be read as normal word data.
The refresh method for timer PVs can be set from the CX-Programmer to
either BCD or binary.
Note It is not recommended to use the same timer number in two timer instructions
because the timers will not operate correctly if they are timing simultaneously.
(If two or more timer instructions use the same timer number, an error will be
generated during the program check, but the timers will operate as long as the
instructions are not executed in the same cycle.)
156
Section 4-9
Timers and Counters
The following table shows when timers will be reset or maintained.
Instruction name
Effect on PV and Completion Flag
Mode change1 PLC start-up2 CNR(545)/CN
RX(547)
TIMER: TIM/TIMX(550)
HIGH-SPEED TIMER:
TIMH(015)/TIMHX(551)
ONE-MS TIMER:
TMHH(540)/TMHHX(552)
ACCUMULATIVE TIMER:
TTIM(087)/TTIMX(555)
PV → 0
Flag → OFF
TIMER WAIT:
TIMW(813)TIMWX(816)
PV → 0
Flag → OFF
PV → 9999
Flag → OFF
Operation in
Jumps and Interlocks
Jumps
Interlocks
(JMP-JME) or
(IL-ILC)
Tasks on
standby4
PVs refreshed in
operating timers
PV → SV
(Reset to SV.)
Flag → OFF
PV Maintained
PV Maintained
PVs refreshed in
operating timers
---
HIGH-SPEED TIMER WAIT:
TMHW(815)/TMHWX(817)
Note
---
1. If the IOM Hold Bit (A500.12) is ON, the PV and Completion Flag will be
retained when a fatal error occurs (including execution of FALS instructions) or the operating mode is changed from PROGRAM mode to RUN or
MONITOR mode or vice-versa. The PV and Completion Flag will be
cleared when power is cycled.
2. If the IOM Hold Bit (A50012) is ON and the PLC Setup’s IOM Hold Bit Status at Startup setting is set to protect the IOM Hold Bit, the PV and Completion Flag will be retained when the PLC’s power is cycled.
3. Since the TIML(542), TIMLX(553), MTIM(543), and MTIMX(554) instructions do not use timer numbers, they are reset under different conditions.
Refer to the descriptions of these instructions for details.
4. The present value of TIM, TIMX(550), TIMH(015), TIMHX(551), TMHH(540), TMHHX(552), TIMW(813), TIMWX(816), TMHW(815) and TMHWX(817) timers programmed with timer numbers 0000 to 2047 will be
updated even when jumped between JMP and JME instructions or when
in a task that is on standby. The present value of timers programmed with
timer numbers 2048 to 4095 will be held when jumped or when in a task
that is on standby.
Forcing Bit Status
Timer Completion Flags can be force-set and force-reset.
Timer PVs cannot be force-set or force-reset, although the PVs can be
refreshed indirectly by force-setting/resetting the Completion Flag.
Restrictions
There are no restrictions in the order of using timer numbers or in the number
of N.C. or N.O. conditions that can be programmed. Timer PVs can be read as
word data and used in programming.
157
Section 4-9
Timers and Counters
4-9-2
Counter Area (C)
The 4,096 counter numbers (C0000 to C4095) are shared by the CNT,
CNTX(546), CNTR(012), CNTRX(548), CNTW(814), and CNTWX(818)
instructions. Counter Completion Flags and present values (PVs) for these
instructions are accessed with the counter numbers.
When a counter number is used in an operand that requires bit data, the
counter number accesses the Completion Flag of the counter. When a
counter number is used in an operand that requires word data, the counter
number accesses the PV of the counter.
The refresh method for counter PVs can be set from the CX-Programmer to
either BCD or binary. (Refer to the previous page).
It is not recommended to use the same counter number in two counter
instructions because the counters will not operate correctly if they are counting simultaneously. If two or more counter instructions use the same counter
number, an error will be generated during the program check, but the counters
will operate as long as the instructions are not executed in the same cycle.
The following table shows when counter PVs and Completion Flags will be
reset.
Instruction name
Reset
COUNTER:
CNT/CNTX(546)
PV → 0
Flag → OFF
Mode
change
Maintained
Effect on PV and Completion Flag
PLC startup Reset Input CNR(545)/CN Interlocks
RX(547)
(IL-ILC)
Maintained
Reset
Reset
Maintained
REVERSIBLE
COUNTER:
CNTR(012)/CNTRX(548)
COUNTER WAIT:
CNTW(814)/CNTWX(818)
Forcing Bit Status
Counter Completion Flags can be force-set and force-reset.
Counter PVs cannot be force-set or force-reset, although the PVs can be
refreshed indirectly by force-setting/resetting the Completion Flag.
Restrictions
158
There are no restrictions in the order of using counter numbers or in the number of N.C. or N.O. conditions that can be programmed. Counter PVs can be
read as word data and used in programming.
Timers and Counters
4-9-3
Section 4-9
Changing the BCD or Binary Mode for Counters and Timers
The refresh method for set values and present values for timers and counters
can be changed from BCD mode (0000 to 9999) to binary method (0000 to
FFFF) using the CX-Programmer
This setting is made in common for all tasks for all timers and counters.
1. Right-click New PLC in the project tree and select Properties.
2. Select the Execute Timer/Counter as Binary Option in the PLC Properties
Dialog Box. The timers and counters for all tasks will be executed in binary
mode.
159
Section 4-10
Data Memory Area (D)
4-10 Data Memory Area (D)
CPU Units with 30, 40 or 60 I/O points: D0 to D32767
CPU Units with 10, 14 or 20 I/O points: D0 to D9999 and D32000 to D32767
CPU Unit with 10, 14 or 20 I/O Points
CPU Unit with 30, 40 or 60 I/O Points
D0
D0
D9999
D10000
Do not use.
D31999
D32000
D32199
D32200 DM Fixed Allocation
Words for Modbus-RTU
D32399 Easy Master
D32400
D32299
D32300
D32767
D32767
DM Fixed Allocation
Words for Modbus-RTU
D32399 Easy Master
D32400
This data area is used for general data storage and manipulation and is
accessible only by word.
Data in the DM Area is retained when the PLC’s power is cycled or the PLC’s
operating mode is changed from PROGRAM mode to RUN/MONITOR mode
or vice-versa.
Although bits in the DM Area cannot be accessed directly, the status of these
bits can be accessed with the BIT TEST instructions, TST(350) and
TSTN(351).
Forcing Bit Status
Bits in the DM Area cannot be force-set or force-reset.
Indirect Addressing
Words in the DM Area can be indirectly addressed in two ways: binary-mode
and BCD-mode.
Binary-mode Addressing (@D)
When a “@” character is input before a DM address, the content of that DM
word is treated as binary and the instruction will operate on the DM word at
that binary address. The entire DM Area (D0 to D32767) can be indirectly
addressed with hexadecimal values 0000 to 7FFF.
0100
▲
@D100
D256
Address actually used.
BCD-mode Addressing (*D)
When a “*” character is input before a DM address, the content of that DM
word is treated as BCD and the instruction will operate on the DM word at that
BCD address. Only part of the DM Area (D0 to D09999) can be indirectly
addressed with BCD values 0000 to 9999.
Note
160
0100
▲
*D100
D100
Address actually used.
(1) If an address between D10000 and D31999 is specified as an operand
for a CPU Unit with 10, 14 or 20 I/O Points, an illegal area access error
will occur.
Section 4-11
Index Registers
(2) If two-word data is accessed from the last address in the DM Area (D9999
for the [email protected]@[email protected] and D32767 for other CPU Units), the Access Error Flag (P_AER) will turn ON and the data at D9999 or D32767 will not
be read or written.
DM Fixed Allocation
Words for Modbus-RTU
Easy Master
The following DM area words are used as command and response storage
areas for the Modbus-RTU Easy Master function.
D32200 to D32299: Serial port 1 on CP1L CPU Unit with M CPU type
D32300 to D32399: Serial port 2 on CP1L CPU Unit with M CPU type and
serial port 1 on CP1L CPU Unit with L CPU type
For use of these areas, refer to 6-3-3 Modbus-RTU Easy Master Function.
4-11 Index Registers
The sixteen Index Registers (IR0 to IR15) are used for indirect addressing.
Each Index Register can hold a single PLC memory address, which is the
absolute memory address of a word in I/O memory. Use MOVR(560) to convert a regular data area address to its equivalent PLC memory address and
write that value to the specified Index Register. (Use MOVRW(561) to set the
PLC memory address of a timer/counter PV in an Index Register.)
Note Refer to Appendix E Memory Map for more details on PLC memory
addresses.
Indirect Addressing
When an Index Register is used as an operand with a “,” prefix, the instruction
will operate on the word indicated by the PLC memory address in the Index
Register, not the Index Register itself. Basically, the Index Registers are I/O
memory pointers.
• All addresses in I/O memory (except Index Registers, Data Registers, and
Condition Flags) can be specified seamlessly with PLC memory
addresses. It isn’t necessary to specify the data area. I/O memory
addresses for IR, DR, and Condition Flags, however, cannot be held.
• In addition to basic indirect addressing, the PLC memory address in an
Index Register can be offset with a constant or Data Register, auto-incremented, or auto-decremented. These functions can be used in loops to
read or write data while incrementing or decrementing the address by one
each time that the instruction is executed.
With the offset and increment/decrement variations, the Index Registers can
be set to base values with MOVR(560) or MOVRW(561) and then modified as
pointers in each instruction.
I/O Memory
Set to a base value
with MOVR(560) or
MOVRW(561).
Note
Pointer
(1) It is possible to specify regions outside of I/O memory and generate an
Illegal Access Error when indirectly addressing memory with Index Registers. Refer to Appendix E Memory Map for details on the limits of PLC
memory addresses.
161
Section 4-11
Index Registers
(2) When an Instruction Execution Error or an Illegal Access Error is generated during the execution of a certain instruction, the auto-increment/decrement for the rest Index Registers of the instruction will not execute.
(3) An Illegal Access Error will be generated when indirectly addressing
memory in D10000 to D31999 with Index Registers for CPU Units with
10, 14 or 20 I/O Points.
The following table shows the variations available when indirectly addressing
I/O memory with Index Registers. ([email protected] represents an Index Register from IR0
to IR15.)
Variation
Indirect addressing
Indirect addressing
with constant offset
Indirect addressing
with DR offset
Indirect addressing
with auto-increment
Function
The content of [email protected] is treated as
the PLC memory address of a bit
or word.
The constant prefix is added to the
content of [email protected] and the result is
treated as the PLC memory
address of a bit or word.
The constant may be any integer
from –2,048 to 2,047.
The content of the Data Register
is added to the content of [email protected] and
the result is treated as the PLC
memory address of a bit or word.
After referencing the content of
[email protected] as the PLC memory address
of a bit or word, the content is
incremented by 1 or 2.
Indirect addressing
The content of [email protected] is decrewith auto-decrement mented by 1 or 2 and the result is
treated as the PLC memory
address of a bit or word.
162
Syntax
,[email protected]
LD ,IR0
Constant ,[email protected]
(Include a + or –
in the constant.)
LD +5,IR0
[email protected],[email protected]
LD
DR0,IR0
Increment by 1:
,[email protected]+
Increment by 2:
,[email protected]++
Decrement by 1:
,–[email protected]
Decrement by 2:
,– –[email protected]
LD , IR0++
Example
Loads the bit at the PLC
memory address contained
in IR0.
Adds 5 to the contents of IR0
and loads the bit at that PLC
memory address.
Adds the contents of DR0 to
the contents of IR0 and
loads the bit at that PLC
memory address.
Loads the bit at the PLC
memory address contained
in IR0 and then increments
the content of IR0 by 2.
LD , – –IR0 Decrements the content of
IR0 by 2 and then loads the
bit at that PLC memory
address.
Section 4-11
Index Registers
Example
This example shows how to store the PLC memory address of a word (CIO 2)
in an Index Register (IR0), use the Index Register in an instruction, and use
the auto-increment variation.
MOVR(560)
2
IR0
Stores the PLC memory address of
CIO 2 in IR0.
MOV(021)
#0001
,IR0
Writes #0001 to the PLC memory address contained in IR0.
MOV(021)
#0020
+1,IR0 Reads the content of IR0, adds 1,
and writes #0020 to that PLC memory address.
PLC memory
address
Regular
data area
I/O memory
address
MOVE TO REGISTER instruction
MOVR(560) 0002 IR0
Pointer
#0001
#0020
Note The PLC memory addresses are listed in the diagram above, but it isn’t necessary to know the PLC memory addresses when using Index Registers.
Since some operands are treated as word data and others are treated as bit
data, the meaning of the data in an Index Register will differ depending on the
operand in which it is used.
1,2,3...
1. Word Operand:
MOVR(560)
0000
MOV(021)
D0
IR2
, IR2
When the operand is treated as a word, the contents of the Index Register
are used “as is” as the PLC memory address of a word.
In this example MOVR(560) sets the PLC memory address of CIO 2 in IR2
and the MOV(021) instruction copies the contents of D0 to CIO 2.
2. Bit Operand:
MOVR(560)
SET
000013
+5 , IR2
,IR2
When the operand is treated as a bit, the leftmost 7 digits of the Index Register specify the word address and the rightmost digit specifies the bit number. In this example, MOVR(560) sets the PLC memory address of CIO 13
(0C00D hex) in IR2. The SET instruction adds +5 from bit 13 (D hex) to this
PLC memory address, so it turns ON bit CIO 1.02.
Index Register
Initialization
The Index Registers will be cleared in the following cases:
1. When the operating mode is changed from PROGRAM to RUN or MONITOR mode or vice-versa
2. When the power is cycled
163
Section 4-11
Index Registers
Setting Index Registers
Always set the required value in an index register before using it. The contents
of an index register will be unpredictable if it is not set in advance.
The contents of an index register is also unpredictable after an interrupt task
is started. When using index registers inside an interrupt task, use
MOVR(560) (for anything but timer/counter PVs) or MOVRW(561) (for
timer/counter PVs) to set the required value.
Direct Addressing
When an Index Register is used as an operand without a “,” prefix, the instruction will operate on the contents of the Index Register itself (a two-word or
“double” value). Index Registers can be directly addressed only in the instructions shown in the following table. Use these instructions to operate on the
Index Registers as pointers.
The Index Registers cannot be directly addressed in any other instructions,
although they can usually be used for indirect addressing.
Instruction group
Data Movement
Instructions
Table Data Processing
Instructions
Increment/Decrement
Instructions
Comparison Instructions
Instruction name
MOVE TO REGISTER
Mnemonic
MOVR(560)
MOVE TIMER/COUNTER PV TO REGISTER
DOUBLE MOVE
MOVRW(561)
DOUBLE DATA EXCHANGE
SET RECORD LOCATION
XCGL(562)
SETR(635)
GET RECORD NUMBER
DOUBLE INCREMENT BINARY
GETR(636)
++L(591)
DOUBLE DECREMENT BINARY
DOUBLE EQUAL
– –L(593)
=L(301)
DOUBLE NOT EQUAL
DOUBLE LESS THAN
< >L(306)
< L(311)
DOUBLE LESS THAN OR EQUAL
< =L(316)
DOUBLE GREATER THAN
DOUBLE GREATER THAN OR EQUAL
> L(321)
> =L(326)
DOUBLE COMPARE
Symbol Math Instructions DOUBLE SIGNED BINARY ADD WITHOUT CARRY
DOUBLE SIGNED BINARY SUBTRACT
WITHOUT CARRY
MOVL(498)
CMPL(060)
+L(401)
–L(411)
The SRCH(181), MAX(182), and MIN(183) instructions can output the PLC
memory address of the word with the desired value (search value, maximum,
or minimum) to IR0. In this case, IR0 can be used in later instructions to
access the contents of that word.
164
Section 4-11
Index Registers
4-11-1 Using Index Registers
Processing of multiple (identical) instructions such as consecutive addresses
for table data can be merged into one instruction by combining repetitive processing (e.g., FOR(513) and NEXT(514)instructions) with indirect addressing
using Index Registers, thereby simplifying programming.
Instruction execution
repeatedly incrementing
IR0 by 1
Instruction
Table data
Indirect
addressing
,IR0
IR0
The Index operation uses the following procedure.
1. PLC memory addresses for the addresses in the Index Registers are
stored using a MOVR instruction.
2. Operation is then executed by indirectly addressing Index Registers to the
operand for Instruction A.
3. The addresses are moved using processing such as adding, subtracting,
incrementing, or decrementing the Index Register (see note).
4. Steps 2 and 3 are processed repeatedly until the conditions are met.
Note
Adding, subtracting incrementing, or decrementing for the Index
Register is performed using one of the following methods.
• Each Type of Indirect Addressing for Index Registers:
Auto-increment (,[email protected]+ or ,[email protected]++), auto-decrement (,[email protected] or ,[email protected]),
constant offset (constant ,[email protected]), and DR offset ([email protected],[email protected]) for Index
Registers
• Instructions for Direct Addressing of Index Registers:
DOUBLE SIGNED BINARY ADD WITHOUT CARRY (+L), DOUBLE
SIGNED BINARY SUBTRACT WITHOUT CARRY (-L), DOUBLE INCREMENT BINARY (++L), DOUBLE DECREMENT BINARY (--L)
Example:
Instruction A
MOVR m IR0
The PLC memory address
of address m is stored in IR0.
Instruction A m+1
Instruction A ,IR0+
Repeated execution,
e.g., loop for
FOR or NEXT.
Instruction A m+n
If, for example, instruction A above is a comparison instruction, table data
could be read from start to the end of the table to compare all of the data with
a specific value. In this way, blocks of user-defined processing can be freely
created depending by applying Index Registers.
165
Section 4-11
Index Registers
■ Example Using Index Registers
In the following example, TIM instructions for timer numbers 0 to 99 use set
values in D100 to D199. This can be achieved by using one TIM instruction,
using an index register for the timer number, using another index register for
the Completion Flags, and repeatedly executing the TIM instruction to start
the timers.
The PLC memory addresses for each T0's PV, Completion
Flag, and W0.00 are set in Index Registers IR0, IR1, and IR2 using a
MOVRW or MOVR instruction.
- The TIM instruction is executed for the timer number
(timer PV) that IR0+ indirectly addresses.
- The Timer Completion Flag that is indirectly addressed for
IR1+ turns ON when the time elapses. When the ON status
is received, bits in the work area that are indirectly
addressed for IR2+ are turned ON.
- The contents of IR0+, IR1+, and IR2+ are automatically
incremented by one after accessing the values using indirect
addressing.
- D0 is incremented.
166
Repeated
Section 4-11
Index Registers
W0.00
MOVRW
T0
TIM
The PLC memory address for the
PV area for TO is set in IR0.
0000
D100
IR0
MOVR
T0
The PLC memory address for the
Completion Flag for TO is set in IR1.
W0.00
T0000
IR1
W0.01
MOVR
W0.00
TIM
The PLC memory address for W0.00
is set in IR2.
0001
D101
IR2
MOV
&100
The value &100 (100 decimal) is
set in D0.
D0
JMP
W6.03
TIM
0099
D199
Start of repetition (100 times)
T0099
&100
,IR2
TIM
If the above are not set, the FOR to
NEXT loop is not executed, and if
&1 the above are set, the loop is executed.
FOR
W0.01
T0001
W6.03
When indirect addressing for IR2
is OFF, timers are started with indirect
,IR0+ addressing (auto-increment) for IR0 as
the timer number and indirect addressing
@D0 for D0 as the timer SV.
,IR2+ Indirect addressing for IR2 will turn ON
(auto-increment) when indirect addressing
for IR1 is ON (auto-increment).
,IR1+
ON
++
D0 is incremented.
D0
NEXT
Return to FOR and repeat.
JME
&1
Repeat execution of TIM instructions 100 times while incrementing each value for IR0
(timer number, PV), IR1 (Completion Flag), IR2 (W0.00 on), and @D0, and start T0 to T99.
167
Section 4-11
Index Registers
4-11-2 Precautions for Using Index Registers
Precautions
Do not use a Index Register until a PLC memory address has been set in the
register. The pointer operation will be unreliable if the registers are used without setting their values.
The values in Index Registers are unpredictable at the start of an interrupt
task. When an Index Register will be used in an interrupt task, always set a
PLC memory address in the Index Register with MOVR(560) or MOVRW(561)
before using the register in that task.
Each Index Register task is processed independently, so they do not affect
each other. For example, IR0 used in Task 1 and IR0 used in Task 2 are different. Consequently, each Index Register task has 16 Index Registers.
Limitations when Using Index Registers
• It is only possible to read the Index Register for the last task executed
within the cycle from the CX-Programmer. If using Index Registers with
the same number to perform multiple tasks, it is only possible with the CXProgrammer to read the Index Register value for the last task performed
within the cycle from the multiple tasks, nor is it possible to write the Index
Register value from the CX-Programmer.
• It is not possible to either read or write to the Index Registers using Host
Link commands or FINS commands.
• A setting can be made from the CX-Programmer to share Index Registers
between tasks. This setting will be enabled uniformly for all Index Registers and Data Registers.
Sharing Index Registers
The following setting can be made from the PLC Properties Dialog Box on the
CX-Programmer to control sharing Index and Data Registers between tasks.
Monitoring Index Registers
It is possible to monitor Index Registers as follows:
To use the Programming Devices to monitor the final Index Register values for
each task, or to monitor the Index Register values using Host Link commands
or FINS commands, write a program to store Index Register values from each
task to another area (e.g., DM area) at the end of each task, and to read Index
Register values from the storage words (e.g., DM area) at the beginning of
each task. The values stored for each task in other areas (e.g., DM area) can
then be edited using the CX-Programmer, Host Link commands, or FINS
commands.
168
Section 4-11
Index Registers
Note Be sure to use PLC memory addresses in Index Registers.
IR storage words for task 1
Task 1
D1001 and D1000
stored in IR0
or
or
Actual memory address of
CIO 0 (0000C000 hex)
stored in IR0
Contents of IR0 stored in
D01001 and D01000
IR storage words for task 2
Task 2
D02001 and D02000
stored in IR0
or
or
Actual memory address
CIO 5 (0000C005 hex)
stored in IR0
Contents of IR0 stored in
D02001 and D02000
Peripheral servicing
Read D01001
and D01000
Read D02001
and D02000
169
Section 4-12
Data Registers
4-12 Data Registers
The sixteen Data Registers (DR0 to DR15) are used to offset the PLC memory addresses in Index Registers when addressing words indirectly.
The value in a Data Register can be added to the PLC memory address in an
Index Register to specify the absolute memory address of a bit or word in I/O
memory. Data Registers contain signed binary data, so the content of an
Index Register can be offset to a lower or higher address.
Normal instructions can be used to store data in Data Registers.
Forcing Bit Status
Bits in Data Registers cannot be force-set and force-reset.
Set to a base value
with MOVR(560) or
MOVRW(561).
I/O Memory
Pointer
Set with a regular
instruction.
Examples
The following examples show how Data Registers are used to offset the PLC
memory addresses in Index Registers.
LD
DR0 ,IR0
Adds the contents of DR0 to the contents
of IR0 and loads the bit at that PLC memory address.
MOV(021) #0001 DR0 ,IR1
Range of Values
Adds the contents of DR0 to the contents
of IR1 and writes #0001 to that PLC
memory address.
The contents of data registers are treated as signed binary data and thus
have a range of –32,768 to 32,767.
Hexadecimal content
Decimal equivalent
8000 to FFFF
–32,768 to –1
0000 to 7FFF
Data Register Initialization
0 to 32,767
The Data Registers will be cleared in the following cases:
1. When the operating mode is changed from PROGRAM mode to
RUN/MONITOR mode or vice-versa and the IOM Hold Bit is OFF
2. When the power is cycled and the IOM Hold Bit is OFF or not protected in
the PLC Setup
IOM Hold Bit Operation
If the IOM Hold Bit (A500.12) is ON, the Data Registers won’t be cleared
when a FALS error occurs or the operating mode is changed from PROGRAM
mode to RUN/MONITOR mode or vice-versa.
If the IOM Hold BIt (A500.12) is ON and the PLC Setup’s “IOM Hold Bit Status
at Startup” setting is set to protect the IOM Hold Bit, the Data Registers won’t
be cleared when the PLC’s power supply is reset (ON →OFF →ON).
170
Task Flags
Section 4-13
Precautions
Data Registers are normally local to each task. For example, DR0 used in
task 1 is different from DR0 used in task 2. (A PLC Setup setting can be made
from the CX-Programmer to share Data Registers between tasks.)
The content of Data Registers cannot be accessed (read or written) from the
CX-Programmer.
Do not use Data Registers until a value has been set in the register. The register’s operation will be unreliable if they are used without setting their values.
The values in Data Registers are unpredictable at the start of an interrupt
task. When a Data Register will be used in an interrupt task, always set a
value in the Data Register before using the register in that task.
4-13 Task Flags
Task Flags range from TK00 to TK31 and correspond to cyclic tasks 0 to 31. A
Task Flag will be ON when the corresponding cyclic task is in executable
(RUN) status and OFF when the cyclic task hasn’t been executed (INI) or is in
standby (WAIT) status.
Note These flags indicate the status of cyclic tasks only, they do not reflect the status of interrupt tasks.
Task Flag Initialization
The Task Flags will be cleared in the following cases, regardless of the status
of the IOM Hold Bit.
1. When the operating mode is changed from PROGRAM mode to
RUN/MONITOR mode or vice-versa
2. When the power is cycled.
Forcing Bit Status
The Task Flags cannot be force-set and force-reset.
4-14 Condition Flags
These flags include the Arithmetic Flags, such as the Error Flag and Equals
Flag, which indicate the results of instruction execution.
The Condition Flags are specified with symbols, such as P_CY and P_ER,
rather than addresses. The status of these flags reflects the results of instruction execution, but the flags are read-only; they cannot be written directly from
instructions or the CX-Programmer.
Note The CX-Programmer treats condition flags as global symbols beginning with
P_.
All Condition Flags are cleared when the program switches tasks, so the status of the ER and AER flags are maintained only in the task in which the error
occurred.
Forcing Bit Status
The Condition Flags cannot be force-set and force-reset.
171
Section 4-14
Condition Flags
Summary of the Condition
Flags
Name
Error Flag
P_ER
Access Error Flag
P_AER
Carry Flag
P_CY
Greater Than Flag
P_GT
Equals Flag
P_EQ
Less Than Flag
P_LT
Negative Flag
P_N
Overflow Flag
P_OF
Turned ON when the result of calculation overflows the capacity of the
result word(s).
Underflow Flag
P_UF
Greater Than or
Equals Flag
Not Equal Flag
P_GE
Less Than or
Equals Flag
P_LE
Turned ON when the result of calculation underflows the capacity of
the result word(s).
Turned ON when the first operand of a Comparison Instruction is
greater than or equal to the second.
Turned ON when the two operands of a Comparison Instruction are
not equal.
Turned ON when the first operand of a Comparison Instruction is less
than or equal to the second.
Always ON Flag
Always OFF Flag
P_On
P_Off
172
Symbol
The following table summarizes the functions of the Condition Flags, although
the functions of these flags will vary slightly from instruction to instruction.
Refer to the description of the instruction for complete details on the operation
of the Condition Flags for a particular instruction.
P_NE
Function
Turned ON when the operand data in an instruction is incorrect (an
instruction processing error) to indicate that an instruction ended
because of an error.
When the PLC Setup is set to stop operation for an instruction error
(Instruction Error Operation), program execution will be stopped and
the Instruction Processing Error Flag (A29508) will be turned ON
when the Error Flag is turned ON.
Turned ON when an Illegal Access Error occurs. The Illegal Access
Error indicates that an instruction attempted to access an area of
memory that should not be accessed.
When the PLC Setup is set to stop operation for an instruction error
(Instruction Error Operation), program execution will be stopped and
the Instruction Processing Error Flag (A429510) will be turned ON
when the Access Error Flag is turned ON.
Turned ON when there is a carry in the result of an arithmetic operation or a “1” is shifted to the Carry Flag by a Data Shift instruction.
The Carry Flag is part of the result of some Data Shift and Symbol
Math instructions.
Turned ON when the first operand of a Comparison Instruction is
greater than the second or a value exceeds a specified range.
Turned ON when the two operands of a Comparison Instruction are
equal the result of a calculation is 0.
Turned ON when the first operand of a Comparison Instruction is less
than the second or a value is below a specified range.
Turned ON when the most significant bit (sign bit) of a result is ON.
Always ON. (Always 1.)
Always OFF. (Always 0.)
Section 4-14
Condition Flags
Using the Condition Flags
The Condition Flags are shared by all of the instructions, so their status may
change often in a single cycle. Be sure to read the Condition Flags immediately after the execution of instruction, preferably in a branch from the same
execution condition.
Instruction
Instruction A
Operand
LD
Instruction A
The result from instruction A is
reflected in the Equals Flag.
Condition Flag,
e.g., =
Instruction B
AND
Instruction B
=
Since the Condition Flags are shared by all of the instructions, program operation can be changed from its expected course by interruption of a single task.
Be sure to consider the effects of interrupts when writing the program. Refer
to SECTION 2 Programming of CS/CJ Series Programming Manual (W394)
for more details.
The Condition Flags are cleared when the program switches tasks, so the status of a Condition Flag cannot be passed to another task. For example the
status of a flag in task 1 cannot be read in task 2.
Saving and Loading Condition Flag Status
The CP1-H CPU Units support instructions to save and load the Condition
Flag status (CCS(282) and CCL(283)). These can be used to access the status of the Condition Flags at other locations in a task or in a different task.
The following example shows how the Equals Flag is used at a different location in the same task.
Task
CMP
CCS
Stores result of comparison in the Condition Flags.
This will enable loading the results to use with
Instruction B.
Saves status of Condition Flags.
Instruction A
CCL
Instruction B
Loads the statuses of the Conditions Flags that
were stored.
The result of the comparison instruction in the
Equals Flag can be used by Instruction B without
interference from Instruction A.
173
Section 4-15
Clock Pulses
4-15 Clock Pulses
The Clock Pulses are flags that are turned ON and OFF at regular intervals by
the system.
Name
Symbol
0.02 s Clock Pulse P_0_02_s
Operation
ON for 0.01 s
OFF for 0.01 s
0.01 s
0.01 s
0.1 s Clock Pulse
P_0_1s
ON for 0.05 s
OFF for 0.05 s
0.05 s
0.05 s
0.2 s Clock Pulse
P_0_2s
ON for 0.1 s
OFF for 0.1 s
0.1 s
0.1 s
1 s Clock Pulse
P_1s
ON for 0.5 s
OFF for 0.5 s
0.5 s
0.5 s
1 min Clock Pulse
P_1min
ON for 30 s
OFF for 30 s
30 s
30 s
The Clock Pulses are specified with symbols rather than addresses.
Note The CX-Programmer treats condition flags as global symbols beginning with
P_.
The Clock Pulses are read-only; they cannot be overwritten from instructions
or the CX-Programmer.
The Clock Pulses are cleared at the start of operation.
Using the Clock Pulses
1s
The following example turns CIO 100.00 ON and OFF at 0.5 s intervals.
100.00
0.5 s
100.00
0.5 s
174
Instruction
Operand
LD
OUT
1s
100.00
SECTION 5
Pulse and Counter Functions
This section describes the CP1L’s interrupt and high-speed counter functions.
5-1
5-2
5-3
High-speed Counters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
176
5-1-1
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
176
5-1-2
High-speed Counter Specifications . . . . . . . . . . . . . . . . . . . . . . . . .
177
5-1-3
Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
182
5-1-4
PLC Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
183
5-1-5
High-speed Counter Terminal Allocation. . . . . . . . . . . . . . . . . . . . .
184
5-1-6
Pulse Input Connection Examples . . . . . . . . . . . . . . . . . . . . . . . . . .
190
5-1-7
Ladder Program Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
190
5-1-8
Additional Capabilities and Restrictions . . . . . . . . . . . . . . . . . . . . .
194
Pulse Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
198
5-2-1
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
198
5-2-2
Pulse Output Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
200
5-2-3
Pulse Output Terminal Allocations. . . . . . . . . . . . . . . . . . . . . . . . . .
201
5-2-4
Pulse Output Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
208
5-2-5
Origin Search and Origin Return Functions . . . . . . . . . . . . . . . . . . .
220
5-2-6
Origin Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
238
5-2-7
Pulse Output Procedures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
240
5-2-8
Instructions Used for Pulse Outputs . . . . . . . . . . . . . . . . . . . . . . . . .
241
5-2-9
Variable Duty Factor Pulse Outputs (PWM(891) Outputs) . . . . . . .
250
5-2-10 Example Pulse Output Applications. . . . . . . . . . . . . . . . . . . . . . . . .
251
Inverter Positioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
279
5-3-1
Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
279
5-3-2
System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
282
5-3-3
Functional Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
283
5-3-4
Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
285
5-3-5
Application Procedure for Inverter Positioning . . . . . . . . . . . . . . . .
287
5-3-6
Instruction Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
288
5-3-7
Determining the Internal Pulse Output Frequency . . . . . . . . . . . . . .
295
5-3-8
PLC Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
296
5-3-9
Automatic Calculation of Inverter Frequency Command Value. . . .
301
5-3-10 Memory Allocations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
304
5-3-11 Application Example with Serial Communications . . . . . . . . . . . . .
316
5-3-12 Application Example with an Analog Output . . . . . . . . . . . . . . . . .
325
5-3-13 Supplemental Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
334
175
Section 5-1
High-speed Counters
5-1
5-1-1
High-speed Counters
Overview
• A rotary encoder can be connected to a built-in input to produce a highspeed pulse input.
• The PRV(881) instruction can be used to measure the input pulse frequency (one input only).
• The high-speed counter PVs can be maintained or refreshed.
• The High-speed Counter Gate Bit can be turned ON/OFF from the ladder
program to select whether the high-speed counter PVs will be maintained
or refreshed.
• Any one of the following input signals can be selected as the counter input
mode.
Response Frequencies for 24 VDC Inputs to High-speed Counters 0 and 1:
• Differential phase inputs (4x): 50 kHz
• Pulse + direction inputs: 100 kHz
• Up/Down pulse inputs: 100 kHz
• Increment pulse inputs: 100 kHz
Response Frequencies of CP1L-J show below:
• Differential phase inputs (4x): 10 kHz
• Pulse + direction inputs: 20 kHz
• Up/Down pulse inputs: 20 kHz
• Increment pulse inputs: 20 kHz
• The counting mode can be set to linear mode or circular (ring) mode.
• The counter reset method can be set to Z phase signal + software reset,
software reset, Z phase signal + software reset (continue comparing), or
software reset (continue comparing).
Pulse Input Functions
Purpose
Receive incremental rotary
encoder inputs to calculate
length or position.
Function used
High-speed counter
function
Measure a workpiece's length
or position.
(Start counting when a certain
condition is established or
pause counting when a certain
condition is established.)
Measure a workpiece's speed
from its position data (frequency
measurement.)
High-speed Counter
Gate Bit
PRV(881) HIGHSPEED COUNTER
PV READ
PRV2(883) PULSE
FREQUENCY CONVERT
176
Description
Built-in input terminals can be used for high-speed counter
inputs.
The PV for the high-speed counters are stored in the Auxiliary
Area.
The counters can be operated in ring mode or linear mode.
The high-speed counter can be started or stopped (PV held)
from the Unit's program by turning ON/OFF the High-speed
Counter Gate Bit when the desired condition is met.
The PRV(881) instruction can be used to measure the pulse frequency.
• Range with differential phase inputs: 0 to 50 kHz (Y models: 0
to 500 kHz, J models : 0 to 10kHz)
• Range with all other input modes: 0 to 100 kHz (Y models: 0 to
1 MHz, J models : 0 to 20kHz))
PRV2(883) reads the pulse frequency and converts it to a rotational speed (r/min) or it converts the counter PV to a total number of rotations. Results are calculated by the number of pulses/
rotation.
Section 5-1
High-speed Counters
5-1-2
High-speed Counter Specifications
Specifications
Item
Specification
Number of high-speed counters
2 (High-speed counters 0 and 1)
Pulse input modes (Selected in the PLC
Setup)
Input terminal allocation
Differential phase Up/down inputs
inputs
Phase-A input
Increment pulse
input
Phase-B input
Decrement pulse
input
Phase-Z input
Reset input
4 (High-speed
counters 0 to 3)
Pulse + direction
inputs
Pulse input
Increment inputs
Direction input
Increment pulse
input
---
Reset input
Reset input
Input method
Differential phase, Two single-phase Single-phase
4x
inputs
pulse + direction
inputs
(Fixed)
Response frequency
50 kHz
100 kHz
100 kHz
100 kHz
(J models : 10kHz) (J models : 20kHz) (J models : 20kHz) (J models : 20kHz)
Counting mode
Count values
Linear mode or circular (ring) mode (Select in the PLC Setup.)
Linear mode: 8000 0000 to 7FFF FFFF hex
Ring mode: 0000 0000 to Ring SV
(The Ring SV (Circular Max. Count) is set in the PLC Setup and the setting
range is 00000001 to FFFFFFFF hex.)
High-speed counter PV storage locations
High-speed counter 0: A271 (leftmost 4 digits) and A270 (rightmost 4 digits)
High-speed counter 1: A273 (leftmost 4 digits) and A272 (rightmost 4 digits)
High-speed counter 2: A317 (leftmost 4 digits) and A316 (rightmost 4 digits)
High-speed counter 3: A319 (leftmost 4 digits) and A318 (rightmost 4 digits)
Target value comparison interrupts or range comparison interrupts can be
executed based on these PVs.
Single-phase
input
Note The PVs are refreshed in the overseeing processes at the start of each
cycle. Use PRV(881) to read the most recent PVs.
Control
method
Target value comparison
Range comparison
Counter reset method
Data format: 8 digit hexadecimal
Range in linear mode: 8000 0000 to 7FFF FFFF hex
Range in ring mode: 0000 0000 to Ring SV (Circular Max. Count)
Up to 48 target values and corresponding interrupt task numbers can be registered.
Up to 8 ranges can be registered, with a separate upper limit, lower limit, and
interrupt task number for each range.
Select one of the following methods in the PLC Setup.
•Phase-Z + Software reset
The counter is reset when the phase-Z input goes ON while the Reset Bit is
ON.
•Software reset
The counter is reset when the Reset Bit goes ON.
(Set the counter reset method in the PLC Setup.)
Note Operation can be set to stop or continue the comparison operation
when the high-speed counter is reset.
177
Section 5-1
High-speed Counters
Auxiliary Area Data
Allocation
Function
High-speed counter number
Leftmost 4 digits
0
A271
1
A273
2
A317
3
A319
Rightmost 4 digits
Range 1 Comparison Condition Met Flag
A270
A274.00
A272
A275.00
A316
A320.00
A318
A321.00
Range 2 Comparison Condition Met Flag
Range 3 Comparison Condition Met Flag
A274.01
A274.02
A275.01
A275.02
A320.01
A320.02
A321.01
A321.02
Range 4 Comparison Condition Met Flag
Range 5 Comparison Condition Met Flag
A274.03
A274.04
A275.03
A275.04
A320.03
A320.04
A321.03
A321.04
Range 6 Comparison Condition Met Flag
Range 7 Comparison Condition Met Flag
A274.05
A274.06
A275.05
A275.06
A320.05
A320.06
A321.05
A321.06
Range 8 Comparison Condition Met Flag
A274.07
Comparison In-progress
ON when a comparison operation is being exe- A274.08
Flags
cuted for the high-speed counter.
Overflow/Underflow Flags ON when an overflow or underflow has
A274.09
occurred in the high-speed counter’s PV.
(Used only when the counting mode is set to
Linear Mode.)
A275.07
A275.08
A320.07
A320.08
A321.07
A321.08
A275.09
A320.09
A321.09
Count Direction Flags
A275.10
A320.10
A321.10
PV storage words
Range Comparison Condition Met Flags
0: Decrementing
1: Incrementing
A274.10
Counter Input Modes
Differential Phase Mode
(4x)
The differential phase mode uses two phase signals (phase A and phase B)
and increments/decrements the count according to the status of these two
signals.
Phase-A
Phase-B
Count
0
1 2 3 4 5 6 7 8 9 10 11
12
11 10 9 8 7 6 5 4 3 2
1
2 3 4 5 6 7 8
Conditions for Incrementing/Decrementing the Count
Phase A
Pulse + Direction Mode
Phase B
↑
L
Count value
Increment
H
↓
↑
H
Increment
Increment
L
↓
Increment
L
↑
↑
H
Decrement
Decrement
H
↓
↓
L
Decrement
Decrement
The pulse + direction mode uses a direction signal input and pulse signal
input. The count is incremented or decremented depending on the status (ON
or OFF) of the direction signal.
Pulse
Direction
178
0
1
2
3
4
5
6
7
8
7
6
5
4
3
2
1
0
Section 5-1
High-speed Counters
Conditions for Incrementing/Decrementing the Count
Direction
signal
Pulse
signal
Count value
↑
H
L
↑
No change
Increment
↓
L
H
↓
No change
No change
L
↑
↑
H
Decrement
No change
H
↓
↓
L
No change
No change
• The count is incremented when the direction signal is ON and decremented when it is OFF.
• Only up-differentiated pulses (rising edges) can be counted.
Up/Down Mode
The up/down mode uses two signals, an increment pulse input and a decrement pulse input.
Increment pulse
Decrement pulse
0
1
2
3
4
5
6
7
8
7
6
5
4
3
2
1
0
Conditions for Incrementing/Decrementing the Count
Decrement
pulse
Increment
pulse
Count value
↑
H
L
↑
Decrement
Increment
↓
L
H
↓
No change
No change
L
↑
↑
H
Increment
Decrement
H
↓
↓
L
No change
No change
• The count is incremented for each increment pulse input and decremented for each decrement pulse input.
• Only up-differentiated pulses (rising edges) can be counted.
Increment Mode
The increment mode counts single-phase pulse signal inputs. This mode only
increments the count.
Pulse
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Conditions for Incrementing/Decrementing the Count
↑
Pulse
Count value
Increment
H
↓
No change
No change
L
No change
179
Section 5-1
High-speed Counters
• Only up-differentiated pulses (rising edges) can be counted.
Note The count of the high-speed counter can be monitored to see if it is currently
being incremented or decremented. The count in the current cycle is compared with the count in the previous cycle to determine if it is being incremented or decremented. The results are reflected in the High-speed Counter
Count Direction Flags (A274.10 for high-speed counter 0, A275.10 for highspeed Counter 1, A320.10 for high-speed counter 2, and A321.10 for highspeed counter 3.)
Counting Modes
Linear Mode
Input pulses can be counted in the range between the lower limit and upper
limit values. If the pulse count goes beyond the lower/upper limit, an underflow/overflow will occur and counting will stop.
Lower and Upper Limits of the Range
The following diagrams show the lower limit and upper limit values for increment mode and up/down mode.
Increment Mode
0
(000000 hex)
4294967295
(FFFFFFFF hex)
PV overflow
Up/Down Mode
−2147483648
(80000000 hex)
PV underflow
Circular (Ring) Mode
0
(00000000 hex)
+2147483647
(7FFFFFFF hex)
PV overflow
Input pulses are counted in a loop within the set range. The loop operates as
follows:
• If the count is incremented from the max. ring count, the count will be
reset to 0 automatically and incrementing will continue.
• If the count is decremented from 0, the count will be set to the max. ring
count automatically and decrementing will continue.
Consequently, underflows and overflows cannot occur when ring mode is
used.
Count value
232−1
Max. ring
count
0
Max. Ring Count
Use the PLC Setup to set the max. ring count (Circular Max. Count), which is
the max. value of the input pulse counting range. The max. ring count can be
set to any value between 00000001 and FFFFFFFF hex.
180
Section 5-1
High-speed Counters
Restrictions
• There are no negative values in ring mode.
• If the max. ring count is set to 0 in the PLC Setup, the counter will operate
with a max. ring count of FFFFFFFF hex.
Reset Methods
Phase-Z Signal + Software
Reset
The high-speed counter's PV is reset when the phase-Z signal (reset input)
goes from OFF to ON while the corresponding High-speed Counter Reset Bit
is ON.
The CPU Unit recognizes the ON status of the High-speed Counter Reset Bit
only at the beginning of the PLC cycle during the overseeing processes. Consequently, when the Reset Bit is turned ON in the ladder program, the phaseZ signal does not become effective until the next PLC cycle.
One cycle
Phase-Z
Reset Bit
PV not PV
reset
reset
Software Reset
PV
reset
PV not
reset
PV
reset
PV
reset
The high-speed counter's PV is reset when the corresponding High-speed
Counter Reset Bit goes from OFF to ON.
The CPU Unit recognizes the OFF-to-ON transition of the High-speed
Counter Reset Bit only at the beginning of the PLC cycle during the overseeing processes. Reset processing is performed at the same time. The OFF-toON transition will not be recognized if the Reset Bit goes OFF again within the
same cycle.
One cycle
Reset Bit
PV
reset
PV not
reset
PV not
reset
PV not
reset
Note The comparison operation can be set to stop or continue when a high-speed
counter is reset. This enables applications where the comparison operation
can be restarted from a counter PV of 0 when the counter is reset.
181
Section 5-1
High-speed Counters
5-1-3
Procedure
Select high-speed counter 0 to 3.
Select the pulse input method, reset
method, and counting range.
Select the kind of interrupt (if any).
• High-speed counters 0 to 3: 24 VDC input,
Response frequency: 50 kHz for single-phase, 100 kHz for
differential phase
• Pulse input methods: Differential phase (4x),
Pulse + direction, Up/Down, or Increment
• Reset methods: Phase-Z + Software reset, Software reset,
Phase-Z + Software reset (continuing comparing),
Software reset (continuing comparing)
• Counting ranges: Linear mode or Ring mode
• Enable/disable interrupts
• Target value comparison interrupt
• Range comparison interrupt
• Connect to the terminals (24 VDC input or line-driver)
Wire inputs.
PLC Setup settings
Ladder program
182
• High-speed Counters 0 to 3 Enable/Disable:
• High-speed Counters 0 to 3Pulse Input Mode:
Differential phase (4x)
Pulse + direction
Up/Down
Increment
• High-speed Counters 0 to 3 Reset Method:
Phase-Z + Software reset, Software reset, Phase-Z + Software
reset (continuing comparing), Software reset (continuing
comparing)
• High-speed Counters 0 to 3 Counting Mode:
Linear mode
Ring mode
• Program the interrupt task (with any interrupt number between 0
and 255) to be executed when using a target value comparison
or range comparison interrupts.
• Register a target value comparison table and start the
comparison.
• Register a range comparison table and start the comparison.
• Register a target value comparison table without starting the
comparison.
• Register a range comparison table without starting the
comparison.
• Change the counter PV.
• Start comparison with the registered target value comparison
table or range comparison table.
• Read the high-speed counter PVs, read the status of the highspeed counter comparison operation, or read the rangecomparison results.
• Turn ON the High-speed Counter Gate Bit to stop counting input
pulses.
Section 5-1
High-speed Counters
5-1-4
PLC Setup
The settings for high-speed counters 0 to 3 are located in the Built-in Input
Tab of the CX-Programmer’s PLC Settings Window.
Settings in the Builtin Input Tab
Item
Use high speed counter 0 to 3 Use counter
Setting
Counting mode
Linear mode
Circular mode (ring mode)
Circular Max. Count
(max. ring count)
0 to 4,294,967,295 (0 to FFFF FFFF hex)
Reset method
Phase Z and software reset
Software reset
Phase Z and software reset (continue comparing)
Software reset (continue comparing)
Input Setting
Differential phase inputs (4x)
Pulse + direction inputs
Up/Down inputs
Increment pulse input
183
Section 5-1
High-speed Counters
5-1-5
High-speed Counter Terminal Allocation
The following diagrams show the input terminals that can be used for highspeed counters in each CPU Unit.
Differential Phases, Up/
Down, or Pulse + Direction
Input Terminal Arrangement for CPU Units with 10 I/O Points
High-speed counter 1
(Phase B, Decrement,
or Direction input)
High-speed counter 0
(Phase B, Decrement,
or Direction input)
Upper Terminal Block
(Example: AC Power
Supply Modules)
L1
High-speed counter 1
(Phase Z or Reset input)
L2/N COM
01
00
03
02
05
04
High-speed counter 0
(Phase Z or Reset input)
High-speed counter 0
(Phase A, Increment,
or Count input)
High-speed counter 1
(Phase A, Increment,
or Count input)
Input Terminal Arrangement for CPU Units with 14 I/O Points
High-speed counter 1
(Phase B, Decrement, or
Direction input)
High-speed counter 0
(Phase B, Decrement, or
Direction input)
Upper Terminal Block
(Example: AC Power
Supply Modules)
L1
High-speed counter 1
(Phase Z or Reset input)
L2/N CO M
01
00
03
02
05
04
07
06
High-speed counter 0
(Phase A, Increment, or
Count input)
NC
NC
NC
NC
High-speed counter 0
(Phase Z or Reset input)
High-speed counter 1
(Phase A, Increment, or
Count input)
Input Terminal Arrangement for CPU Units with 20 I/O Points
High-speed counter 1
(Phase B, Decrement, or
Direction input)
High-speed counter 0
(Phase B, Decrement, or
Direction input)
Upper Terminal Block
(Example: AC Power
Supply Modules)
L1
L2/N COM
High-speed counter 0
(Phase A, Increment, or
Count input)
High-speed counter 1
(Phase A, Increment, or
Count input)
184
High-speed counter 1
(Phase Z or Reset input)
00
01
03
02
05
04
07
06
09
08
11
10
High-speed counter 0
(Phase Z or Reset input)
Section 5-1
High-speed Counters
Input Terminal Arrangement for CPU Units with 30 I/O Points
High-speed counter 1
(Phase B, Decrement, or
Direction input)
High-speed counter 0
(Phase B, Decrement, or
Direction input)
Upper Terminal Block
(Example: AC Power
Supply Modules)
L1
High-speed counter 1
(Phase Z or Reset input)
L2/ N CO M
01
00
03
02
05
04
High-speed counter 0
(Phase A, Increment, or
Count input)
07
06
09
08
11
01
10
00
03
02
05
04
NC
High-speed counter 0
(Phase Z or Reset input)
High-speed counter 1
(Phase A, Increment, or
Count input)
Input Terminal Arrangement for CPU Units with 40 I/O Points
High-speed counter 1
(Phase B, Decrement, or
Direction input)
High-speed counter 0
(Phase B, Decrement, or
Direction input)
Upper Terminal Block
(Example: AC Power
Supply Modules)
L1
High-speed counter 1
(Phase Z or Reset input)
L2/N CO M 01
00
High-speed counter 0
(Phase A, Increment, or
Count input)
03
02
05
04
07
06
09
08
11
10
01
00
03
02
05
04
07
06
09
08
11
10
High-speed counter 0
(Phase Z or Reset input)
High-speed counter 1
(Phase A, Increment, or
Count input)
Input Terminal Arrangement for CPU Units with 60 I/O Points
High-speed counter 1
(Phase B, Decrement,
or Direction input)
High-speed counter 0
(Phase B, Decrement,
or Direction input)
Upper Terminal Block
(Example: AC Power
Supply Modules)
High-speed counter 1
(Phase Z or Reset input)
L1 L2/N COM 01 03 05 07 09 11 01 03 05 07 09 11 01 03 05 07 09 11
High-speed counter 0
(Phase A, Increment,
or Count input)
00 02 04 06 08 10 00 02 04 06 08 10
00 02 04 06 08 10
High-speed counter 0
(Phase Z or Reset input)
High-speed counter 1
(Phase A, Increment,
or Count input)
185
Section 5-1
High-speed Counters
Increment Pulse Inputs
Input Terminal Arrangement for CPU Units with 10 I/O Points
High-speed counter 1
(Phase Z or Reset input)
High-speed counter 3
(Increment)
High-speed counter 1
(Increment)
Upper Terminal Block
L1
(Example: AC Power
L2/N COM
Supply Modules)
01
00
03
05
02
04
High-speed counter 0
(Increment)
High-speed counter 2
(Increment)
High-speed counter 0
(Phase Z or Reset input)
Input Terminal Arrangement for CPU Units with 14 I/O Points
High-speed counter 1
(Phase Z or Reset input)
High-speed counter 3
(Increment)
High-speed counter 3
(Phase Z or Reset input)
High-speed counter 1
(Increment)
Upper Terminal Block
(Example: AC Power
Supply Modules)
L1
L2/N CO M
01
00
03
02
05
04
NC
07
NC
06
NC
NC
High-speed counter 2
(Phase Z or Reset input)
High-speed counter 0
(Increment)
High-speed counter 0
(Phase Z or Reset input)
High-speed counter 2
(Increment)
Input Terminal Arrangement for CPU Units with 20 I/O Points
High-speed counter 1
(Phase Z or Reset input)
High-speed counter 3
(Increment)
High-speed counter 3
(Phase Z or Reset input)
High-speed counter 1
(Increment)
Upper Terminal Block
(Example: AC Power
Supply Modules)
L1
L2/N CO M
01
00
03
02
05
04
07
06
09
08
11
10
High-speed counter 2
(Phase Z or Reset input)
High-speed counter 0
(Increment)
High-speed counter 0
(Phase Z or Reset input)
High-speed counter 2
(Increment)
Input Terminal Arrangement for CPU Units with 30 I/O Points
High-speed counter 3
(Increment)
High-speed counter 1
(Phase Z or Reset input)
High-speed counter 1
(Increment)
Upper Terminal Block
(Example: AC Power
Supply Modules)
L1
L2/N CO M 01
High-speed counter 0
(Increment)
High-speed counter 2
(Increment)
186
High-speed counter 3
(Phase Z or Reset input)
00
03
02
05
04
07
06
09
08
11
10
01
00
03
02
High-speed counter 2
(Phase Z or Reset input)
High-speed counter 0
(Phase Z or Reset input)
05
04
NC
Section 5-1
High-speed Counters
Input Terminal Arrangement for CPU Units with 40 I/O Points
High-speed counter 1
(Phase Z or Reset input)
High-speed counter 3
(Increment)
High-speed counter 3
(Phase Z or Reset input)
High-speed counter 1
(Increment)
Upper Terminal Block
(Example: AC Power
Supply Modules)
L1
L2/N CO M 01
00
03
02
05
04
07
06
09
08
11
10
01
00
03
02
05
04
07
06
09
08
11
10
High-speed counter 2
(Phase Z or Reset input)
High-speed counter 0
(Increment)
High-speed counter 2
(Increment)
High-speed counter 0
(Phase Z or Reset input)
Input Terminal Arrangement for CPU Units with 60 I/O Points
High-speed counter 3
(Increment)
High-speed counter 1
(Phase Z or Reset input)
High-speed counter 1
(Increment)
High-speed counter 3
(Phase Z or Reset input)
Upper Terminal Block
L1 L2/N COM 01 03 05 07 09 11 01 03 05 07 09 11 01 03 05 07 09 11
(Example: AC Power
Supply Modules)
00 02 04 06 08 10 00 02 04 06 08 10 00 02 04 06 08 10
High-speed counter 0
(Increment)
High-speed counter 2
(Phase Z or Reset input)
High-speed counter 2
(Increment)
High-speed counter 0
(Phase Z or Reset input)
Input Function Settings in the PLC Setup
The CPU Unit’s built-in inputs can be set for use as high-speed counter inputs
in the PLC Setup’s Built-in Input Tab using the CX-Programmer. (When an
input is set for use as a high-speed counter input, the corresponding words
and bits cannot be used for general-purpose (normal) inputs, input interrupts,
or quick-response inputs.)
CPU Units with 10 I/O Points
Address
Word
CIO 0
Default setting
Bit
High-speed counter operation settings
Single-phase
(increment pulse input)
Two-phase (differential
phases x4, up/down, or
pulse/direction)
Counter 0, increment input Counter 0, A phase, up, or
count input
Origin searches
Origin searches
enabled for pulse
outputs 0
---
00
Normal input 0
01
Normal input 1
Counter 1, increment input Counter 0, B phase, down, --or direction input
02
Normal input 2
Counter 2, increment input Counter 1, A phase, up, or
count input
03
Normal input 3
Counter 3, increment input Counter 1, B phase, down, Pulse output 0:
or direction input
Origin proximity input
signal
04
Normal input 4
Counter 0, phase-Z/reset
input
Counter 0, phase-Z reset
input
---
05
Normal input 5
Counter 1, phase-Z reset
input
Counter 1, phase-Z reset
input
Pulse output 0:
Origin input signal
---
187
Section 5-1
High-speed Counters
CPU Units with 14 I/O Points
Input terminal
block
Word
Bit
CIO 0
188
Default setting
High-speed counter operation settings
Single-phase
(increment pulse input)
Two-phase (differential
phases x4, up/down, or
pulse/direction)
Origin searches
Origin searches
enabled for pulse
outputs 0 and 1
00
Normal input 0
High-speed counter 0
(Increment)
High-speed counter 0
(Phase A, Increment, or
Count input)
---
01
Normal input 1
High-speed counter 1
(Increment)
High-speed counter 0
(Phase B, Decrement, or
Direction input)
---
02
Normal input 2
High-speed counter 2
(Increment)
03
Normal input 3
High-speed counter 3
(Increment)
04
Normal input 4
Pulse output 0:
Origin proximity input
signal
Pulse output 1:
Origin proximity input
signal
---
05
Normal input 5
High-speed counter 0
(Phase Z or reset input)
High-speed counter 1
(Phase Z or reset input)
High-speed counter 1
(Phase A, Increment, or
Count input)
High-speed counter 1
(Phase B, Decrement, or
Direction input)
High-speed counter 0
(Phase Z or reset input)
High-speed counter 1
(Phase Z or reset input)
06
Normal input 6
High-speed counter 2
(Phase Z or reset input)
---
Pulse output 0:
Origin input signal
07
Normal input 7
High-speed counter 3
(Phase Z or reset input)
---
Pulse output 1:
Origin input signal
---
Section 5-1
High-speed Counters
CPU Units with 20, 30, 40 or 60 I/O Points
Address
Word
Bit
Default setting
High-speed counter operation settings:
CPU Units CPU Units CPU Units CPU Units
with 60 I/O with 40 I/O with 30 I/O with 20 I/O
Points
Points
Points
Points
Single-phase
(increment pulse
input)
Origin
searches
Two-phase
Origin searches
(differential phases
enabled for
x4, up/down, or
pulse outputs 0
pulse/direction)
and 1
CIO 0 00
Normal
input 0
Normal
input 0
Normal
input 0
Normal
input 0
Counter 0,
increment input
Counter 0, A phase,
up, or count input
---
01
Normal
input 1
Normal
input 1
Normal
input 1
Normal
input 1
Counter 1,
increment input
Counter 0, B phase,
down, or direction
input
---
02
Normal
input 2
Normal
input 2
Normal
input 2
Normal
input 2
Counter 2,
increment input
Counter 1, A phase,
up, or count input
---
03
Normal
input 3
Normal
input 3
Normal
input 3
Normal
input 3
Counter 3,
increment input
Counter 1, B phase,
down, or direction
input
---
04
Normal
input 4
Normal
input 4
Normal
input 4
Normal
input 4
Counter 0,
phase-Z reset input
Counter 0, phase-Z
reset input
---
05
Normal
input 5
Normal
input 5
Normal
input 5
Normal
input 5
Counter 1,
phase-Z reset input
Counter 1, phase-Z
reset input
---
06
Normal
input 6
Normal
input 6
Normal
input 6
Normal
input 6
Counter 2,
phase-Z reset input
---
Pulse output 0:
Origin input
signal
07
Normal
input 7
Normal
input 7
Normal
input 7
Normal
input 7
Counter 3,
phase-Z reset input
---
Pulse output 1:
Origin input
signal
08
Normal
input 8
Normal
input 8
Normal
input 8
Normal
input 8
---
---
---
09
Normal
input 9
Normal
input 9
Normal
input 9
Normal
input 9
---
---
---
10
Normal
input 10
Normal
input 10
Normal
input 10
Normal
input 10
---
---
Pulse output 0:
Origin proximity input signal
11
Normal
input 11
Normal
input 11
Normal
input 11
Normal
input 11
---
---
Normal
input 12
to 17
Normal
input 18
to 23
Normal
input 24
to 35
Normal
input 12
to 17
Normal
input 18
to 23
---
Normal
input 12
to 17
---
---
---
---
Pulse output 1:
Origin proximity input signal
---
---
---
---
---
---
---
---
---
---
CIO 1 00 to
05
06 to
11
CIO 2 00 to
11
189
Section 5-1
High-speed Counters
5-1-6
Pulse Input Connection Examples
Encoders with 24 VDC Open-collector Outputs
This example shows how to connect an encoder that has phase-A, phase-B,
and phase-Z outputs.
X/XA CPU Unit
(Differential Input Mode)
Encoder
(Power: 24 VDC)
Black
Phase A
White
Phase B
Orange Phase Z
Example: E6B2-CWZ6C
(NPN open-collector
output)
Brown +Vcc
0.00 (High-speed
counter 0: Phase A, 0 V)
0.01 (High-speed
counter 0: Phase B, 0 V)
0.04 (High-speed
counter 0: Phase Z, 0 V)
COM (COM
24 V)
0V
Blue (COM)
24-VDC power supply
0V
+24 V
(Do not use the same power supply as for other I/O.)
Power supply
Encoder
−
0 V Power
24 V 0 V
+
Shielded twisted-pair cable
IA
CPU Unit
0.00
Phase A
IB
0.01
Phase B
IZ
0.04
Phase Z
COM
5-1-7
Ladder Program Example
Inspecting a Dimension by
Counting Pulse Inputs
• This example is for a CPU Unit with 40 I/O Points.
• High-speed counter 0 is used.
• When the edge of the workpiece is detected, the counter PV is reset by a
phase-Z pulse.
• The workpiece is passes inspection if the final count is between 30,000
and 30,300, otherwise the workpiece fails.
• If the workpiece passes, output CIO 100.00 is turned ON by an interrupt
and the indicator PL1 is lit. If the workpiece fails, output CIO 100.01 is
turned ON by an interrupt and indicator PL2 is lit.
• The interrupt program is interrupt task 10.
190
Section 5-1
High-speed Counters
■
I/O Allocations
Input Terminals
Input terminal
Word
CIO 0
Usage
Bit
00
High-speed counter 0 phase-A input (See note.)
01
02
High-speed counter 0 phase-B input (See note.)
Start measurement by pushbutton switch (normal input).
03
04
Detect trailing edge of measured object (normal input).
Detect leading edge of measured object for high-speed counter 0
phase-Z/reset input (see note). Bit status is reflected in A531.00.
05 to 11 Not used. (normal input)
CIO 1
Note
00 to 11 Not used. (normal input)
The high-speed counter inputs are enabled when the Use high speed counter
0 Option is selected in the PLC Setup’s Built-in Input Tab.
Output Terminals
Output terminal
Word
Bit
CIO 100
CIO 101
Usage
00
01
Normal input
Normal input
PL1: Dimension pass output
PL2: Dimension fail output
02 to 07
00 to 07
Normal input
Normal input
Not used.
Not used.
Auxiliary Area Addresses for High-speed Counter 0
Function
Leftmost 4 digits
Address
A271
Rightmost 4 digits
Range 1 Comparison Condition Met Flag
A270
A274.00
A274.08
Reset Bit
ON when a comparison operation is being executed for the high-speed counter.
ON when an overflow or underflow has occurred
in the high-speed counter’s PV. (Used only when
the counting mode is set to Linear Mode.)
0: Decrementing
1: Incrementing
Used for the PV software reset.
High-speed Counter
Gate Bit
When ON, the counter's PV will not be changed
even if pulse inputs are received for the counter.
PV storage words
Range Comparison
Condition Met Flag
Comparison Inprogress Flag
Overflow/Underflow
Flag
Count Direction Flag
A274.09
A274.10
A531.00
A531.08
Range Comparison Table
The range comparison table is stored in D10000 to D10039.
191
Section 5-1
High-speed Counters
■
PLC Setup
Select the Use high speed counter 0 Option in the PLC Setup’s Built-in Input
Tab.
■
Item
High-speed counter 0
Setting
Use high speed counter 0
Counting mode
Circular Max. Count
Linear mode
---
Reset method
Input Setting
Software reset
Up/Down inputs
I/O Wiring
L2/N COM
01
00
03
02
05
04
07
06
09
08
11
10
01
00
03
02
05
04
07
06
09
08
High-speed counter 0
(phase Z)
Workpiece start
detection
L1
High-speed counter 0
(phase A)
Upper Terminal Block
(Example: AC Power
Supply Modules)
Workpiece end
detection
High-speed counter 0
(phase B)
Input Wiring
Measurement
start switch
Output Wiring
CIO 100
PL1: OK indicator
PL2: NG indicator
Bottom
terminal block
+
−
PL1
PL2
00
01
CIO 101
02
03
06
04
COM COM COM COM
05
00
07
01
COM 02
03
04
COM
CIO 101
CIO 100
192
06
05
07
11
10
Section 5-1
High-speed Counters
■
Range Comparison Table Settings
The inspection standards data is set in the DM Area with the CX-Programmer.
Even though range 1 is the only range being used, all 40 words must still be
dedicated to the range comparison table.
Word
D10000
Setting
Function
7430
Rightmost 4 digits of range 1 lower limit
D10001
D10002
0000
765C
D10003
D10004
0000
000A
Leftmost 4 digits of range 1 lower limit
Rightmost 4 digits of range 1 upper limit
Lower limit value:
30,000
Upper limit value:
30,300
Leftmost 4 digits of range 1 upper limit
Range 1 interrupt task number = 10 (A hex)
D10005 to All 0000 Range 2 lower and upper limit values
D10008
(Not used and don’t need to be set.)
Range 2 settings
D10009
FFFF
Disables range 2.
D10014
D10019
D10024
D10029
D10034
FFFF
Set the fifth word for ranges 3 to 7 (listed at left) to FFFF to disable those ranges.
~
:
D10035 to All 0000 Range 8 lower and upper limit values
D10038
(Not used and don’t need to be set.)
D10039
■
FFFF
Range 8 settings
Disables range 8.
Creating the Ladder Program
Programming in Cyclic Task
Use CTBL(882) to start the comparison operation with high-speed counter 0
and interrupt task 10.
0.00 (Measurement start input)
@CTBL(8 82)
#0000
#0001
D10000
A 531.00
Use high-speed counter 0.
Register a range comparison table and
start comparison operation.
0 .01
First comparison table word
W0.00
W0.00
A531.00
W 0.00
W0.01
W0.01
Programming in Interrupt Task 10
Create the processing performed by interrupt task 10.
W0.01
A274.00 (in range)
100.00 (Pass inspection: PL1 indicator)
A274.00 (in range)
100.01 (Fail inspection: PL2 indicator)
END(001)
193
Section 5-1
High-speed Counters
5-1-8
Additional Capabilities and Restrictions
Restrictions on Highspeed Counter Inputs
• The Phase-Z signal + Software reset method cannot be used when the
high speed counters are operating in Differential Phase or Pulse + Direction Input Modes and the origin search function is enabled for the pulse
output (in the PLC Setup).
• When a high-speed counter is being used (enabled in the PLC Setup), the
input cannot be used as a general-purpose (normal) input, interrupt input,
or quick-response input.
Starting Interrupt Tasks based on Comparison Conditions
Data registered in advance in a comparison table can be compared with the
actual counter PVs during operation. The specified interrupt tasks (registered
in the table) will be started when the corresponding comparison condition is
met.
There are two comparison methods available: Target value comparison and
range comparison.
• Use the CTBL(882) instruction to register the comparison table.
• Use either the CTBL(882) instruction or INI(880) instruction to start the
comparison operation.
• Use the INI(880) instruction to stop the comparison operation.
Target Value Comparison
The specified interrupt task is executed when the high-speed counter PV
matches a target value registered in the table.
• The comparison conditions (target values and counting directions) are
registered in the comparison table along with the corresponding interrupt
task number. The specified interrupt task will be executed when the highspeed counter PV matches the registered target value.
• Up to 48 target values (between 1 and 48) can be registered in the comparison table.
• A different interrupt task can be registered for each target value.
• The target value comparison is performed on all of the target values in the
table, regardless of the order in which the target values are registered.
• If the PV is changed, the changed PV will be compared with the target
values in the table, even if the PV is changed while the target value comparison operation is in progress.
Comparison table
Number of values = 4
High-speed counter PV
Target value 1 (Incrementing)
Interrupt task = 000
Target value 1
Comparison is
executed without
regard to the order
of the values in the
table.
Target value 4
Target value 2 (Incrementing)
Interrupt task = 001
Target value 2
Target value 3 (Decrementing)
Interrupt task = 020
Target value 3
Target value 4 (Incrementing)
Interrupt task = 015
Time
Interrupt task that is started. No. 001 No. 015 No. 000
No. 020
Restrictions
A comparison condition (target value and count direction) cannot appear in
the table more than once. An error will occur if a comparison condition is
specified two or more times.
194
Section 5-1
High-speed Counters
Note When the count direction (incrementing/decrementing) changes at a PV that
matches a target value, the next target value cannot be matched in that direction.
Set the target values so that they do not occur at the peak or trough of count
value changes.
Match
Match
Target value 1
Target value 1
Target value 2
Target value 2
Match
Match not recognized.
Range Comparison
The specified interrupt task is executed when the high-speed counter PV is
within the range defined by the upper and lower limit values.
• The comparison conditions (upper and lower limits of the range) are registered in the comparison table along with the corresponding interrupt task
number. The specified interrupt task will be executed once when the highspeed counter PV is in the range (Lower limit ≤ PV ≤ Upper limit).
• A total of 8 ranges (upper and lower limits) are registered in the comparison table.
• The ranges can overlap.
• A different interrupt task can be registered for each range.
• The counter PV is compared with the 8 ranges once each cycle.
• The interrupt task is executed just once when the comparison condition
goes from unmet to met.
Restrictions
When more than one comparison condition is met in a cycle, the first interrupt
task in the table will be executed in that cycle. The next interrupt task in the
table will be executed in the next cycle.
High-speed counter PV
Comparison table
Upper limit 1
Lower limit 1
Interrupt task = 000
Upper limit 2
Lower limit 2
Interrupt task = 255
Upper limit 1
Lower limit 1
Comparison is executed
without regard to the
order of the ranges in
the table.
Upper limit 2
Lower limit 2
Time
Interrupt task that is started. No. 255
No. 000
No. 000
No. 255
Note The range comparison table can be used without starting an interrupt task
when the comparison condition is met. The range comparison function can be
useful when you just want to know whether or not the high-speed counter PV
is within a particular range.
Use the Range Comparison Condition Met Flags to determine whether the
high-speed counter PV is within a registered range.
Pausing Input Signal Counting (Gate Function)
If the High-speed Counter Gate Bit is turned ON, the corresponding highspeed counter will not count even if pulse inputs are received and the counter
PV will be maintained at its current value. Bits A53108 to A53111 are the
High-speed Counter Gate Bits for high-speed counters 0 to 3.
195
Section 5-1
High-speed Counters
When the High-speed Counter Gate Bit is turned OFF again, the high-speed
counter will resume counting and the counter PV will be refreshed.
Restrictions
• The Gate Bit will be disabled if the high-speed counter's reset method is
set to Phase-Z signal + Software reset and the Reset Bit is ON (waiting
for the phase-Z input to reset the counter PV.)
High-speed Counter Frequency Measurement
This function measures the frequency of the high-speed counter (input
pulses.)
The input pulse frequency can be read by executing the PRV(881) instruction.
The measured frequency is output in 8-digit hexadecimal and expressed in
Hz. The frequency measurement function can be used with high-speed
counter 0 only.
The frequency can be measured while a high-speed counter 0 comparison
operation is in progress. Frequency measurement can be performed at the
same time as functions such as the high-speed counter and pulse output without affecting the performance of those functions.
Procedure
1,2,3...
1. High-speed Counter Enable/Disable Setting (Required)
Select the Use high speed counter 0 Option in the PLC Setup.
2. Pulse Input Mode Setting (Required)
Set the High-speed Counter 0 Pulse Input Mode (Input Setting) in the PLC
Setup.
3. Counting Mode Setting (Required)
Set the High-speed Counter 0 Counting Mode in the PLC Setup.
If ring mode counting is selected, set the High-speed Counter 0 Circular
Max. Count (max. ring count) in the PLC Setup.
4. Reset Method Setting (Required)
Set the High-speed Counter 0 Reset Method in the PLC Setup.
5. PRV(881) Instruction Execution (Required)
N: Specify the high-speed counter number. (High-speed counter 0: 0010)
C: 0003 (Read frequency)
D: Destination word for frequency data
Restrictions
• The frequency measurement function can be used with high-speed
counter 0 only.
Specifications
Item
Number of frequency
measurement inputs
Frequency measurement
range
Measurement method
Output data range
196
Specifications
1 input (high-speed counter 0 only)
High-speed counter 0:
Differential phase inputs: 0 to 50 kHz
(J models : 0 to 10kHz)
All other input modes: 0 to 100 kHz
(J models : 0 to 20kHz)
Note: If the frequency exceeds the maximum value, the
maximum value will be stored.
Execution of the PRV(881) instruction
Units: Hz
Range:
Differential phase input: 0000 0000 to 0003 0D40 hex
(Y models: 0000 0000 to 0007 A120 hex)
All other input modes: 0000 0000 to 0001 86A0 hex
(Y models: 0000 0000 to 000F 4240 hex)
Section 5-1
High-speed Counters
Pulse Frequency Conversion
The pulse frequency input to a high-speed counter can be converted to a rotational speed (r/min) or the PV of the counter can be converted to the total
number of rotations. The converted value is output as 8-digit hexadecimal.
This function is supported only for high-speed counter 0.
Frequency−Rotational Speed Conversion
The rotational speed in r/min is calculated from the pulse frequency input to a
high-speed counter and the number of pulses per rotation.
Counter PV−Total Number of Rotations Conversion
The total number of rotations is calculated from the present value of the
counter and the number of pulses per rotation.
Procedure
1,2,3...
1. High-speed Counter Enable/Disable Setting (Required)
Select the Use high speed counter 0 Option in the PLC Setup.
2. Pulse Input Mode Setting (Required)
Set the High-speed Counter 0 Pulse Input Mode (Input Setting) in the PLC
Setup.
3. Counting Mode Setting (Required)
Set the High-speed Counter 0 Counting Mode in the PLC Setup.
If ring mode counting is selected, set the Circular Max. Count (max. ring
count) in the PLC Setup.
4. Reset Method Setting (Required)
Set the High-speed Counter 0 Reset Method in the PLC Setup.
5. Execute PRV2(883) as described below (required).
Converting the Frequency to a Rotational Speed
Execute PRV2(883) with the following operands.
C: Control data (Set to 0000 for frequency-rotational speed conversion.)
P: Coefficient (pulses/rotation (hex))
D: First word for result
Converting the Counter PV to the Total Number of Rotations
Execute PRV2(883) with the following operands.
C: Control data (Set to 0001 for counter PV-total number of rotations conversion.)
P: Coefficient (pulses/rotation (hex))
D: First word for result
Restrictions
Pulse frequency conversion is possible only for high-speed counter 0.
197
Section 5-2
Pulse Outputs
5-2
5-2-1
Pulse Outputs
Overview
Fixed duty factor pulses can be output from the CPU Unit's built-in outputs to
perform positioning or speed control with a servo driver that accepts pulse
inputs.
■ CW/CCW Pulse Outputs or Pulse + Direction Outputs
The pulse output mode can be set to match the motor driver's pulse input
specifications.
■ Automatic Direction Selection for Easy Positioning with Absolute
Coordinates
When operating in absolute coordinates (origin defined or PV changed with
the INI(880) instruction), the CW/CCW direction will be selected automatically
when the pulse output instruction is executed. (The CW/CCW direction is
selected by determining whether the number of pulses specified in the
instruction is greater than or less than the pulse output PV.)
■ Triangular Control
Triangular control (trapezoidal control without a constant-speed plateau) will
be performed during positioning executed by an ACC(888) instruction (independent) or PLS2(887) instruction if the number of output pulses required for
acceleration/deceleration exceeds the specified target pulse Output Amount.
■ Change Target Position during Positioning (Multiple Start)
When positioning was started with a PULSE OUTPUT (PLS2(887)) instruction and the positioning operation is still in progress, another PLS2(887)
instruction can be executed to change the target position, target speed, acceleration rate, and deceleration rate.
■ Switch from Speed Control to Positioning (Fixed Distance Feed Interrupt)
A PLS2(887) instruction can be executed during a speed control (continuous
mode) operation to change to positioning mode (independent mode). This
feature allows a fixed distance feed interrupt (moving a specified amount) to
be executed when specific conditions occur.
■ Change Target Speed and Acceleration/Deceleration Rate during
Acceleration or Deceleration
When trapezoidal acceleration/deceleration is being executed according to a
pulse output instruction (speed control or positioning), the target speed and
acceleration/deceleration rate can be changed during acceleration or deceleration.
■ Use Variable Duty Factor Pulse Outputs for Lighting, Power Control, Etc.
The PULSE WITH VARIABLE DUTY FACTOR instruction (PWM(891)) can be
used to output variable duty factor pulses from the CPU Unit's built-in outputs
for applications such as lighting and power control.
198
Section 5-2
Pulse Outputs
Controlling Pulse Outputs
Purpose
Function
Perform simple posiPulse output functions
tioning by outputting
• Single-phase pulse output without
pulses to a motor driver
acceleration/deceleration
that accepts pulse-train
Controlled by SPED.
inputs.
• Single-phase pulse output with
acceleration/deceleration (equal
acceleration and deceleration
rates for trapezoidal form)
Controlled by ACC.
• Single-phase pulse output with
trapezoidal acceleration/deceleration (Supports a startup frequency and different acceleration/
deceleration rates.)
Controlled by PLS2(887).
Description
Built-in outputs can be used as pulse outputs 0 and 1.
Target frequency ranges: 1 Hz to 100 kHz
(J models : 1 Hz to 20kHz)
Duty factor: 50%
The pulse output mode can be set to CW/CCW pulse
control or Pulse plus direction control, but the same output mode must be used for pulse outputs 0 and 1.
Perform origin search
Origin functions (Origin search and
and origin return opera- origin return)
tions.
Origin search and origin return operations can be executed through pulse outputs.
• Origin search:
To start the origin search, set the PLC Setup to
enable the origin search operation, set the various
origin search parameters, and execute the ORIGIN
SEARCH instruction (ORG(889)). The Unit will determine the location of the origin based on the Origin
Proximity Input Signal and Origin Input Signal. The
coordinates of the pulse output's PV will automatically
be set as the absolute coordinates.
• Origin return:
To return to the predetermined origin, set the various
origin return parameters and execute the ORIGIN
SEARCH instruction (ORG(889)).
Change the target posi- Positioning with the PLS2(887)
tion during positioning. instruction
(For example, perform
an emergency avoid
operation with the Multiple Start feature.)
When a positioning operation started with the PULSE
OUTPUT (PLS2(887)) instruction is in progress, another
PLS2(887) instruction can be executed to change the
target position, target speed, acceleration rate, and
deceleration rate.
Change speed in steps
(polyline approximation) during speed control.
When a speed control operation started with the
ACC(888) instruction (continuous) is in progress,
another ACC(888) instruction (continuous) can be executed to change the acceleration rate or deceleration
rate.
Use the ACC(888) instruction (continuous) to change the acceleration
rate or deceleration rate.
Note The pulse output PVs are stored in the Auxiliary
Area.
Change speed in steps Use the ACC(888) instruction (inde- When a positioning operation started with the ACC(888)
(polyline approximapendent) or PLS2(887) to change the instruction (independent) or PLS2(887) instruction is in
tion) during positioning. acceleration rate or deceleration rate. progress, another ACC(888) (independent) or
PLS2(887) instruction can be executed to change the
acceleration rate or deceleration rate.
Perform fixed distance Execute positioning with the
When a speed control operation started with the
feed interrupt.
PLS2(887) instruction during an
SPED(885) instruction (continuous) or ACC(888)
operation started with SPED(885)
instruction (continuous) is in progress, the PLS2(887)
(continuous) or ACC(888) (continuinstruction can be executed to switch to positioning, outous).
put a fixed number of pulses, and stop.
After determining the
The positioning direction is selected When operating in absolute coordinates (with the origin
origin, perform position- automatically in the absolute coordi- determined or INI(880) instruction executed to change
ing simply in absolute
nate system.
the PV), the CW or CCW direction is selected automaticoordinates without
cally based on the relationship between the pulse output
regard to the direction
PV and the pulse Output Amount specified when the
of the current position
pulse output instruction is executed.
or target position.
199
Section 5-2
Pulse Outputs
Purpose
Perform triangular control.
Function
Positioning with the ACC(888)
instruction (independent) or
PLS2(887) instruction.
Description
When a positioning operation started with the ACC(888)
instruction (independent) or PLS2(887) instruction is in
progress, triangular control (trapezoidal control without
the constant-speed plateau) will be performed if the
number of output pulses required for acceleration/deceleration exceeds the specified target pulse Output
Amount.
(The number of pulses required for acceleration/deceleration equals the time required to reach the target frequency x the target frequency.)
Use variable duty factor Control with analog inputs and the
Two built-in outputs can be used as PWM(891) outputs 0
outputs for time-propor- variable duty factor pulse output func- and 1 by executing the PWM(891) instruction.
tional temperature con- tion (PWM(891)).
trol.
5-2-2
Pulse Output Specifications
Specifications
Item
Output mode
Specifications
Continuous mode (for speed control) or independent mode (for position control)
Positioning (independent mode)
instructions
PULS(886) and SPED(885), PULS(886) and ACC(888), or PLS2(887)
Speed control (continuous mode)
instructions
SPED(885) or ACC(888)
Origin (origin search and origin
return) instructions
Output frequency
ORG(889)
Pulse output method
CW/CCW inputs or Pulse + direction inputs
The method is selected with an instruction operand. The same method must be used
for pulse outputs 0 and 1.
Pulse outputs 0, 1: 1 Hz to 100 kHz (1 Hz units)
J models : 1Hz to 20kHz (1Hz units)
Frequency acceleration and decel- Set in 1 Hz units for acceleration/deceleration rates from 1 Hz to 65,635 Hz (every 4
eration rates
ms). The acceleration and deceleration rates can be set independently only with
PLS2(887).
Changing SVs during instruction
The target frequency, acceleration/deceleration rate, and target position can be
execution
changed.
Duty factor
Fixed at 50%
Number of output pulses
Relative coordinates: 0000 0000 to 7FFF FFFF hex
(Each direction accelerating or decelerating: 2,147,483,647)
Absolute coordinates: 8000 0000 to 7FFF FFFF hex
(−2147483648 to 2147483647)
Pulse output PV's relative/absolute Absolute coordinates are specified automatically when the origin location has been
coordinate specification
determined by setting the pulse output PV with INI(880) or performing an origin
search with ORG(889). Relative coordinates are used when the origin location is
undetermined.
Relative pulse specification/
Absolute pulse specification
The pulse type can be specified with an operand in PULS(886) or PLS2(887).
Note The absolute pulse specification can be used when absolute coordinates are specified for
the pulse output PV, i.e. the origin location has been determined.
The absolute pulse specification cannot be used when relative coordinates are specified,
i.e. the origin location is undetermined. An instruction error will occur.
Pulse output PV's storage location The following Auxiliary Area words contain the pulse output PVs:
Pulse output 0: A277 (leftmost 4 digits) and A276 (rightmost 4 digits)
Pulse output 1: A279 (leftmost 4 digits) and A278 (rightmost 4 digits)
The PVs are refreshed during regular I/O refreshing.
Acceleration/deceleration curve
specification
200
Trapezoidal or S-curve acceleration/deceleration
Section 5-2
Pulse Outputs
Pulse Output Modes
There are two pulse output modes. In independent mode the number of output pulses is specified and in continuous mode the number of output pulses is
not specified.
5-2-3
Mode
Independent mode
Description
This mode is used for positioning.
Operation stops automatically when the preset number of
pulses has been output. It is also possible to stop the pulse
output early with INI(880).
Continuous mode
This mode is used for speed control.
The pulse output will continue until it is stopped by executing
another instruction or switching the PLC to PROGRAM mode.
Pulse Output Terminal Allocations
The following diagrams show the terminals that can be used for pulse outputs
in each CPU Unit.
■ CPU Unit with 10 I/O Points
Lower Terminal Block
(Example: Transistor Outputs)
Pulse output 1 (CW/pulse)
Pulse output 0 (CCW/direction/PWM output 0)
Pulse output 0(CW/pulse)
NC
NC
00
01
02
COM COM COM
03
CIO 100
Pulse output 1(CCW/direction/PWM output 1)
/ Origin search 0 (Error counter reset output)
■ CPU Unit with 14 I/O Points
Lower Terminal Block
(Example: Transistor Outputs)
Pulse output 1 (CW/pulse)
Pulse output 0 (CCW/direction/PWM output 0)
Origin search 0
(Error counter reset output)
Pulse output 0 (CW/pulse)
NC
NC
00
01
02
COM COM COM
04
03
05
COM
NC
Origin search 1
(Error counter reset output)
NC
CIO 100
Pulse output 1 (CCW/direction/PWM output 1)
201
Section 5-2
Pulse Outputs
■ CPU Unit with 20 I/O Points
Lower Terminal Block
(Example: Transistor Outputs)
Pulse output 1 (CW/pulse)
Pulse output 0 (CCW/direction/PWM output 0)
Origin search 0
(Error counter reset output)
Pulse output 0 (CW/pulse)
NC
00
01
02
COM COM COM
NC
04
03
Origin search 1
(Error counter reset output)
07
05
COM 06
CIO 100
Pulse output 1 (CCW/direction/PWM output 1)
■ CPU Unit with 30 I/O Points
Lower Terminal Block
(Example: Transistor Outputs)
Pulse output 1 (CW/pulse)
Pulse output 0 (CCW/direction/PWM output 0)
Origin search 0 (Error counter reset output)
Pulse output 0 (CW/pulse)
Origin search 1 (Error counter reset output)
NC
00
01
02
04
NC COM COM COM 03
07
05
COM
06
00
COM
02
03
01
CIO 101
CIO 100
Pulse output 1 (CCW/direction/PWM output 1)
■ CPU Unit with 40 I/O Points
Lower Terminal Block
(Example: Transistor Outputs)
Pulse output 1 (CW/pulse)
Pulse output 0 (CCW/direction/PWM output 0)
Pulse output 1 (CCW/direction/PWM output 1)
Pulse output 0 (CW/pulse)
Origin search 0 (Error counter reset output)
NC
NC
00
01
02
03
COM COM COM COM
CIO 100
06
04
05
00
07
COM
01
02
03
06
04
COM
05
07
CIO 101
Origin search 1 (Error counter reset output)
202
Section 5-2
Pulse Outputs
■ CPU Unit with 60 I/O Points
Lower Terminal Block
(Example: Transistor Outputs)
Pulse output 1 (CW/pulse)
Pulse output 0 (CCW/direction/PWM output 0)
Pulse output 1 (CCW/direction/PWM output 1)
Pulse output 0 (CW/pulse)
Origin search 0 (Error counter reset output)
NC
00
01
02
03
04
06
NC COM COM COM COM 05
00
01
03
04
06
07 COM 02 COM 05
CIO 100
00
01
03
04
06
07 COM 02 COM 05
CIO 101
07
CIO 102
Origin search 1 (Error counter reset output)
■ Setting Functions Using Instructions and PLC Setup
Output
terminal
block
Word
Bit
When the
instructions to
the right are not
executed
When a pulse output instruction
(SPED, ACC, PLS2, or ORG) is executed
Normal output
CIO
101
When the PWM
instruction is
executed
Fixed duty factor pulse output
Variable duty
factor pulse output
Pulse plus direction
PWM output
CW/CCW
CIO
100
When the origin search
function is enabled in
the PLC Setup, and an
origin search is
executed by the ORG
instruction
When the origin search
function is used
00
Normal output 0
Pulse output 0 (CW)
fixed
Pulse output 0 (pulse)
fixed
---
01
Normal output 1
Pulse output 0 (CCW)
fixed
Pulse output 0 (direction) --fixed
PWM output 0
02
Normal output 2
Pulse output 1 (CW)
fixed
Pulse output 1 (pulse)
fixed
---
03
Normal output 3
Pulse output 1 (CCW)
fixed
Pulse output 1 (direction) --fixed
PWM output 1
04
Normal output 4
---
---
Origin search 0 (Error
counter reset output)
---
05
Normal output 5
---
---
Origin search 1 (Error
counter reset output)
---
06
Normal output 6
---
---
---
---
07
Normal output 7
---
---
---
---
00 to
07
Normal output 8
to 15
---
---
---
---
---
■ Input Terminal Block Arrangements
CPU Unit with 10 I/O Points
Pulse output 0: Origin input signal
Pulse 0: Origin proximity input signal
Upper Terminal Block
(Example: DC Power
Supply Modules)
+
NC
COM
00
01
03
02
05
04
203
Section 5-2
Pulse Outputs
CPU Unit with 14 I/O Points
Pulse 1: Origin proximity input signal
Upper Terminal Block
(Example: DC Power
Supply Models)
−
+
Pulse output 1: Origin input signal
01
COM
NC
00
03
02
05
04
07
NC
NC
06
Pulse 0: Origin proximity input signal
NC
NC
Pulse output 0: Origin input signal
CPU Unit with 20 I/O Points
Pulse output 1: Origin input signal
Upper Terminal Block
(Example: DC Power
Supply Models)
−
+
01
COM
NC
Pulse 1: Origin proximity input signal
00
03
02
05
04
07
06
09
NC
11
10
Pulse 0: Origin proximity input signal
Pulse output 0: Origin input signal
CPU Unit with 30 I/O Points
Pulse output 1: Origin input signal
Upper Terminal Block
(Example: DC Power
Supply Models)
−
+
NC
01
COM
00
03
02
05
04
Pulse 1: Origin proximity input signal
07
09
NC
06
01
11
00
10
03
02
05
04
NC
Pulse 0: Origin proximity input signal
Pulse output 0: Origin input signal
CPU Unit with 40 I/O Points
Pulse output 1: Origin input signal
Upper Terminal Block
(Example: DC Power
Supply Models)
−
+
NC
COM
01
00
03
02
Pulse 1: Origin proximity input signal
05
04
07
06
Pulse output 0: Origin input signal
09
08
01
11
10
00
03
02
05
04
07
06
09
08
11
10
Pulse 0: Origin proximity input signal
CPU Unit with 60 I/O Points
Pulse output 1: Origin input signal
Upper Terminal Block
(Example: DC Power
Supply Modules)
+
NC
-
COM 01 03
05 07 09 11
00 02
06 08 10
04
Pulse output 0: Origin input signal
204
Pulse 1: Origin proximity input signal
01 03 05 07 09 11
00 02 04 06 08 10
01 03
00 02
05 07 09 11
04 06 08 10
Pulse 0: Origin proximity input signal
Section 5-2
Pulse Outputs
■ Setting Functions Using Instructions and PLC Setup
CPU Units with 10 I/O Points
Address
Word
Bit
CIO 0
Default setting
High-speed counter operation settings
Origin searches
Single-phase
Two-phase (differential
Origin searches
(increment pulse input)
phases x4, up/down, or
enabled for pulse
pulse/direction)
outputs 0
Counter 0, increment input Counter 0, A phase, up, or --count input
Counter 1, increment input Counter 0, B phase, down, --or direction input
00
Normal input 0
01
Normal input 1
02
Normal input 2
Counter 2, increment input Counter 1, A phase, up, or
count input
03
Normal input 3
Counter 3, increment input Counter 1, B phase, down, Pulse output 0: Origin
or direction input
proximity input signal
04
Normal input 4
05
Normal input 5
Counter 0, phase-Z/reset
input
Counter 1, phase-Z reset
input
Counter 0, phase-Z reset
input
Counter 1, phase-Z reset
input
---
--Pulse output 0: Origin
input signal
CPU Units with 14 I/O Points
Input terminal
block
Word
Bit
CIO 0
Default setting
High-speed counter operation settings
Single-phase
(increment pulse input)
Two-phase (differential
phases x4, up/down, or
pulse/direction)
Origin searches
Origin searches
enabled for pulse
outputs 0 and 1
00
Normal input 0
High-speed counter 0
(Increment)
High-speed counter 0
(Phase A, Increment, or
Count input)
---
01
Normal input 1
High-speed counter 1
(Increment)
---
02
Normal input 2
High-speed counter 2
(Increment)
03
Normal input 3
High-speed counter 3
(Increment)
04
Normal input 4
05
Normal input 5
06
Normal input 6
High-speed counter 0
(Phase Z or reset input)
High-speed counter 1
(Phase Z or reset input)
High-speed counter 2
(Phase Z or reset input)
High-speed counter 0
(Phase B, Decrement, or
Direction input)
High-speed counter 1
(Phase A, Increment, or
Count input)
High-speed counter 1
(Phase B, Decrement, or
Direction input)
High-speed counter 0
(Phase Z or reset input)
High-speed counter 1
(Phase Z or reset input)
---
07
Normal input 7
High-speed counter 3
(Phase Z or reset input)
---
Pulse output 0:
Origin proximity input
signal
Pulse output 1:
Origin proximity input
signal
----Pulse output 0:
Origin input signal
Pulse output 1:
Origin input signal
205
Section 5-2
Pulse Outputs
CPU Units with 20, 30, 40 or 60 I/O Points
Address
Word
Bit
Default setting
High-speed counter operation settings:
CPU Units CPU Units CPU Units CPU Units
with 60 I/O with 40 I/O with 30 I/O with 20 I/O
Points
Points
Points
Points
Single-phase
(increment pulse
input)
Origin
searches
Two-phase
Origin searches
(differential phases
enabled for
x4, up/down, or
pulse outputs 0
pulse/direction)
and 1
CIO 0 00
Normal
input 0
Normal
input 0
Normal
input 0
Normal
input 0
Counter 0,
increment input
Counter 0, A phase,
up, or count input
---
01
Normal
input 1
Normal
input 1
Normal
input 1
Normal
input 1
Counter 1,
increment input
Counter 0, B phase,
down, or direction
input
---
02
Normal
input 2
Normal
input 2
Normal
input 2
Normal
input 2
Counter 2,
increment input
Counter 1, A phase,
up, or count input
---
03
Normal
input 3
Normal
input 3
Normal
input 3
Normal
input 3
Counter 3,
increment input
Counter 1, B phase,
down, or direction
input
---
04
Normal
input 4
Normal
input 4
Normal
input 4
Normal
input 4
Counter 0,
phase-Z reset input
Counter 0, phase-Z
reset input
---
05
Normal
input 5
Normal
input 5
Normal
input 5
Normal
input 5
Counter 1,
phase-Z reset input
Counter 1, phase-Z
reset input
---
06
Normal
input 6
Normal
input 6
Normal
input 6
Normal
input 6
Counter 2,
phase-Z reset input
---
Pulse output 0:
Origin input
signal
07
Normal
input 7
Normal
input 7
Normal
input 7
Normal
input 7
Counter 3,
phase-Z reset input
---
Pulse output 1:
Origin input
signal
08
Normal
input 8
Normal
input 8
Normal
input 8
Normal
input 8
---
---
---
09
Normal
input 9
Normal
input 9
Normal
input 9
Normal
input 9
---
---
---
10
Normal
input 10
Normal
input 10
Normal
input 10
Normal
input 10
---
---
Pulse output 0:
Origin proximity input signal
11
Normal
input 11
Normal
input 11
Normal
input 11
Normal
input 11
---
---
Normal
input 12
to 17
Normal
input 18
to 23
Normal
input 24
to 35
Normal
input 12
to 17
Normal
input 18
to 23
---
Normal
input 12
to 17
---
---
---
---
Pulse output 1:
Origin proximity input signal
---
---
---
---
---
---
---
---
---
---
CIO 1 00 to
05
06 to
11
CIO 2 00 to
11
206
Section 5-2
Pulse Outputs
Auxiliary Area Data Allocation
Function
Pulse output number
0
1
Pulse output PV storage words
PV range: 8000 0000 to 7FFF FFFF hex
(−2,147,483,648 to 2,147,483,647)
Leftmost 4 digits
Rightmost 4 digits
A277
A276
A279
A278
Reset Bits
The pulse output PV will be cleared when this bit is
turned from OFF to ON.
0: Not cleared.
1: Clear PV.
A540.00
A541.00
CW Limit Input Signal Flags
This is the CW limit input signal, which is used in the
origin search.
CCW Limit Input Signal Flags
This is the CCW limit input signal, which is used in
the origin search.
Positioning completed input signals
This is the positioning completed input signal, which
is used in the origin search.
Accel/Decel Flags
ON when pulses are being output according to an
ACC(888) or PLS2(887) instruction and the output
frequency is being changed in steps (accelerating or
decelerating).
Overflow/Underflow Flags
ON when an overflow or underflow has occurred in
the pulse output PV.
Output Amount Set Flags
ON when the number of output pulses has been set
with the PULS instruction.
ON when turned ON from an external
input.
A540.08
A541.08
ON when turned ON from an external
input.
A540.09
A541.09
ON when turned ON from an external
input.
A540.10
A541.10
0: Constant speed
1: Accelerating or decelerating
A280.00
A281.00
0: Normal
1: Overflow or underflow
A280.01
A281.01
0: No setting
1: Setting made
A280.02
A281.02
Output Completed Flags
ON when the number of output pulses set with the
PULS(886)/PLS2(887) instruction has been output.
0: Output not completed.
1: Output completed.
A280.03
A281.03
Output In-progress Flags
ON when pulses are being output from the pulse
output.
No-origin Flags
ON when the origin has not been determined for the
pulse output.
At-origin Flags
ON when the pulse output PV matches the origin
(0).
Output Stopped Error Flags
ON when an error occurred while outputting pulses
in the origin search function.
0: Stopped
1: Outputting pulses.
A280.04
A281.04
0: Origin established.
1: Origin not established.
A280.05
A281.05
0: Not stopped at origin.
1: Stopped at origin.
A280.06
A281.06
0: No error
1: Stop error occurred.
A280.07
A281.07
---
A444
A445
Stop Error Codes
When a Pulse Output Stop Error occurs, the error
code is stored in that pulse outputs corresponding
Stop Error Code word.
207
Section 5-2
Pulse Outputs
5-2-4
Pulse Output Patterns
The following tables show the kinds of pulse output operations that can be
performed by combining various pulse output instructions.
Continuous Mode (Speed Control)
Starting a Pulse Output
Operation
Output with
specified
speed
Example
application
Changing the
speed (frequency)
in one step
Frequency changes
Description
Procedure
Instruction
Pulse frequency
Target frequency
Time
Settings
Outputs pulses at a SPED(885)
• Port
specified frequency. (Continuous) “CW/CCW”
or “Pulse +
direction”
• Continuous
• Target frequency
Execution of SPED(885)
Output with
specified
acceleration
and speed
Accelerating the
speed (frequency)
at a fixed rate
Outputs pulses and
changes the frequency at a fixed
rate.
Pulse frequency
Target frequency
Acceleration/
deceleration
rate
Time
Execution of
ACC(888)
ACC(888)
• Port
(Continuous) • “CW/CCW”
or “Pulse +
direction”
• Continuous
• Acceleration/deceleration rate
• Target frequency
Changing Settings
Operation
Change
speed in
one step
Example application
Changing the
speed during operation
Frequency changes
Description
Pulse frequency
Target frequency
Procedure
Instruction
Settings
Changes the frequency (higher or
lower) of the pulse
output in one step.
SPED(885)
(Continuous)
↓
SPED(885)
(Continuous)
• Port
• Continuous
• Target frequency
Changes the frequency from the
present frequency
at a fixed rate. The
frequency can be
accelerated or
decelerated.
ACC(888) or
SPED(885)
(Continuous)
↓
ACC(888)
(Continuous)
• Port
• Continuous
• Target frequency
• Acceleration/deceleration rate
Changes the acceleration or deceleration rate during
acceleration or
deceleration.
ACC(888)
(Continuous)
↓
ACC(888)
(Continuous)
• Port
• Continuous
• Target frequency
• Acceleration/deceleration rate
Present frequency
Time
Execution of
SPED(885)
Change
speed
smoothly
Changing the
speed smoothly
during operation
Pulse frequency
Target frequency
Acceleration/
deceleration
rate
Present frequency
Time
Execution of
ACC(888)
Changing the
speed in a polyline
curve during operation
Pulse frequency
Target frequency
Present frequency
Acceleration rate n
Acceleration
rate 2
Acceleration
rate 1
Time
Execution of ACC(888)
Execution of ACC(888)
Execution of ACC(888)
Change
direction
Not supported.
Change
pulse output method
Not supported.
208
Section 5-2
Pulse Outputs
Stopping a Pulse Output
Operation
Stop pulse
output
Example
application
Immediate
stop
Frequency changes
Description
Procedure
Instruction
Settings
Stops the pulse out- SPED(885) • Port
put immediately.
or ACC(888) • Stop pulse
(Continuoutput
ous)
↓
INI(880)
Pulse frequency
Present frequency
Time
Execution of INI(880)
Stop pulse
output
Immediate
stop
Stops the pulse out- SPED(885)
put immediately.
↓
SPED(885)
(Continuous)
Pulse frequency
Present frequency
• Port
• Continuous
• Target frequency=0
Time
Execution of SPED(885)
Stop pulse
output
smoothly
Decelerate
to a stop
Pulse frequency
Present frequency
Target frequency = 0
Acceleration/
deceleration rate
(Rate set at the
start of the
operation.)
Time
Execution of ACC(888)
Decelerates the
pulse output to a
stop.
SPED(885) • Port
or ACC(888) • Continuous
(Continu• Target freous)
quency=0
Note If ACC(888)
↓
started the
operation, the ACC(888)
(Continuoriginal
acceleration/ ous)
deceleration
rate will
remain in
effect.
If SPED(885)
started the
operation, the
acceleration/
deceleration
rate will be
invalid and
the pulse output will stop
immediately.
209
Section 5-2
Pulse Outputs
Independent Mode (Positioning)
Starting a Pulse Output
Operation
Output with
specified
speed
Example
application
Positioning
without acceleration or
deceleration
Frequency changes
Description
Pulse frequency
Starts outputting
PULS(886)
pulses at the speci- ↓
fied frequency and
SPED(885)
stops immediately
when the specified
number of pulses
has been output.
Specified number of
pulses (Specified with
PULS(886).)
Target
frequency
Time
Execution of
SPED(885)
Simple trapezoidal control
Complex
trapezoidal
control
Procedure
Instruction
Outputs the specified
number of pulses
and then stops.
Note The target
position
(specified
number of
pulses) cannot be
changed during positioning.
Settings
• Number of
pulses
• Relative or
absolute
pulse specification
• Port
• “CW/CCW”
or “Pulse +
direction”
• Independent
• Target frequency
Positioning
Specified number of
with trapezoiPulse frequency pulses (Specified
dal accelerawith PULS(886).)
tion and
deceleration
Target
Acceleration/
(Same rate
frequency deceleration
rate
used for
acceleration
Time
and deceleration; no startExecution
of
Outputs
the
specified
ing speed)
ACC(888)
number of pulses and
The number
then stops.
of pulses cannot be
changed during positioning.
Accelerates and
decelerates at the
same fixed rate and
stops immediately
when the specified
number of pulses
has been output.
(See note.)
PULS(886)
↓
ACC(888)
(Independent)
• Number of
pulses
• Relative or
absolute
pulse specification
• Port
• “CW/CCW”
or “Pulse +
direction”
• Independent
• Acceleration and
deceleration rate
• Target frequency
Positioning
with trapezoidal acceleration and
deceleration
(Separate
rates used for
acceleration
and deceleration; starting
speed)
The number
of pulses can
be changed
during positioning.
PLS2(887)
Accelerates and
decelerates at a
fixed rates. The
pulse output is
stopped when the
specified number of
pulses has been
output. (See note.)
• Number of
pulses
• Relative or
absolute
pulse specification
• Port
• “CW/CCW”
or “Pulse +
direction”
• Acceleration rate
• Deceleration rate
• Target frequency
• Starting
frequency
Pulse frequency
Target
frequency
Starting
frequency
Specified number
of pulses
Deceleration
rate Stop
Acceleration
rate
frequency
Time
Execution of
Output stops.
PLS2(887) Target Deceleration point
frequency
reached.
Note
Note The target
position
(specified
number of
pulses) cannot be
changed during positioning.
Note The target
position
(specified
number of
pulses) can
be changed
during positioning.
Triangular Control
If the specified number of pulses is less than the number required just to
reach the target frequency and return to zero, the function will automatically
reduce the acceleration/deceleration time and perform triangular control
(acceleration and deceleration only.) An error will not occur.
Pulse frequency
Target
frequency
Specified number
of pulses
(Specified with Pulse frequency
PULS(886).)
Target
frequency
Specified number
of pulses
(Specified with
PULS(887).)
Time
Execution of
ACC(888)
210
Execution of
PLS2(887)
Section 5-2
Pulse Outputs
Changing Settings
Operation
Change
speed in
one step
Example
application
Changing
the speed in
one step during operation
Frequency changes
Pulse
frequency
New target
frequency
Original target
frequency
Specified number
of pulses
(Specified with
PULS(886).)
Description
Number of pulses
specified with
PULS(886) does
not change.
Time
Execution of SPED(885)
(independent mode)
SPED(885) (independent
mode) executed again to
change the target
frequency. (The target
position is not changed.)
Change
speed
smoothly
(with acceleration rate
= deceleration rate)
Changing
the target
speed (frequency) during
positioning
(acceleration rate =
deceleration
rate)
Specified
number of
pulses
Pulse
frequency (Specified with
PULS(886).)
New target
frequency
Original target
Acceleration/
frequency
deceleration
Number of
pulses specified
with PULS(886)
does not
change.
rate
Time
Settings
SPED(885) can be
executed during
positioning to
change (raise or
lower) the pulse
output frequency in
one step.
The target position
(specified number
of pulses) is not
changed.
PULS(886)
↓
SPED(885)
(Independent)
↓
SPED(885)
(Independent)
• Number of
pulses
• Relative or
absolute
pulse specification
• Port
• “CW/CCW”
or “Pulse +
direction”
• Independent
• Target frequency
ACC(888) can be
executed during
positioning to
change the acceleration/deceleration
rate and target frequency.
The target position
(specified number
of pulses) is not
changed.
PULS(886)
↓
ACC(888) or
SPED(885)
(Independent)
↓
ACC(888)
(Independent)
• Number of
pulses
• Relative or
absolute
pulse specification
• Port
• “CW/CCW”
or “Pulse +
direction”
• Independent
• Acceleration and
deceleration rate
• Target frequency
Execution of
ACC(888)
(independent ACC(888) (independent
mode) executed again to
mode)
change the target
frequency. (The target
position is not changed,
but the
acceleration/deceleration
rate is changed.)
Change
speed
smoothly
(with
unequal
acceleration
and deceleration rates)
Changing
Specified number of
Pulse
the target
frequency pulses (Specified
speed (frewith PULS(886).)
New target
quency) durfrequency
ing
positioning
Original target Acceleration/
deceleration
frequency
(different
rate
acceleration
Time
and deceleration rates)
Execution of
ACC(888)
PLS2(887) executed to
(independent change the target frequenmode)
cy and acceleration/deceleration rates.
(The target position is not
changed. The original target position is specified
again.)
Procedure
Instruction
PLS2(887)
↓
ACC(888)
(Independent)
PLS2(887) can be
executed during
positioning to
change the acceleration rate, deceleration rate, and target
frequency.
Note To prevent
the target
position from
being
changed
intentionally,
the original
target position must be
specified in
absolute
coordinates.
PULS(886)
↓
ACC(888)
(Independent)
↓
PLS2(887)
PLS2(887)
↓
PLS2(887)
• Number of
pulses
• Relative or
absolute
pulse specification
• Port
• “CW/CCW”
or “Pulse +
direction”
• Acceleration rate
• Deceleration rate
• Target frequency
• Starting
frequency
211
Section 5-2
Pulse Outputs
Operation
Change target position
Example
application
Change the
target position during
positioning
(multiple
start function)
Frequency changes
Description
Number of pulses
Specified changed with
Pulse
number of PLS2(887).
frequency pulses
Target
frequency
Acceleration/
deceleration
rate
Time
Execution of
PLS2(887)
Change target position
and speed
smoothly
Change the
target position and target speed
(frequency)
during positioning (multiple start
function)
PLS2(887) executed to
change the target position.
(The target frequency and
acceleration/deceleration
rates are not changed
Number of pulses
Number of
not change with
Pulse
pulses specified PLS2(887).
frequency
with PLS2(887).
Changed target
frequency
Target frequency
Acceleration/
deceleration
rate
Execution of
PLS2(887)
Change the
acceleration
and deceleration rates
during positioning (multiple start
function)
Time
ACC(888) executed to change the
target frequency. (The target position is
not changed, but the acceleration/
deceleration rates are changed.)
Number of pulses
Pulse
specified by
frequency Acceleration rate n PLS2(887) #N.
New target
frequency Acceleration
rate 3
Original target Acceleration
rate 2
frequency
Acceleration
rate 1
Time
Execution of PLS2(887) #N
Execution of PLS2(887) #3
Execution of
PLS2(887) #2
Execution of
PLS2(887) #1
212
Procedure
Instruction
PLS2(887) can be
executed during
positioning to
change the target
position (number of
pulses).
PULS(886)
↓
ACC(888)
(Independent)
↓
Note When the tar- PLS2(887)
get position
PLS2(887)
cannot be
changed
↓
without main- PLS2(887)
taining the
same speed PLS2(887)
range, an
↓
error will
occur and the PLS2(887)
original operation will continue to the
original target position.
PLS2(887) can be
executed during
positioning to
change the target
position (number of
pulses), acceleration rate, deceleration rate, and target
frequency.
• Number of
pulses
• Relative or
absolute
pulse specification
• Port
• “CW/CCW”
or “Pulse +
direction”
• Acceleration rate
• Deceleration rate
• Target frequency
• Starting
frequency
PULS(886)
↓
ACC(888)
(Independent)
↓
PLS2(887)
• Number of
pulses
• Relative or
absolute
pulse specification
• Port
• “CW/CCW”
or “Pulse +
direction”
• Acceleration rate
• Deceleration rate
• Target frequency
• Starting
frequency
PULS(886)
↓
ACC(888)
(Independent)
↓
PLS2(887)
• Number of
pulses
• Acceleration rate
• Deceleration rate
Note When the
settings cannot be
changed
without maintaining the
same speed
range, an
error will
occur and the
original operation will continue to the
original target position.
PLS2(887) can be
executed during
positioning (acceleration or deceleration) to change the
acceleration rate or
deceleration rate.
Settings
PLS2(887)
↓
PLS2(887)
Section 5-2
Pulse Outputs
Operation
Change
direction
Example
application
Change the
direction during positioning
Frequency changes
Description
Specified
number of
Pulse
frequency pulses
Change of direction at the
specified deceleration rate
Target
frequency
Number of pulses
(position) changed
by PLS2(887)
PLS2(887) can be
executed during
positioning with relative pulse specification to change to
absolute pulses and
reverse direction.
PULS(886)
↓
ACC(888)
(Independent)
↓
PLS2(887)
PLS2(887)
↓
PLS2(887)
Time
Execution
of PLS2
(887)
Change
pulse output method
Procedure
Instruction
Execution of
PLS2(887)
Settings
• Number of
pulses
• Absolute
pulse specification
• Port
• “CW/CCW”
or “Pulse +
direction”
• Acceleration rate
• Deceleration rate
• Target frequency
• Starting
frequency
Not supported.
Stopping a Pulse Output
Operation
Stop pulse
output
(Number of
pulses setting is not
preserved.)
Example application
Frequency changes
Description
Immediate stop
Stops the pulse output immediately
and clears the number of output pulses
setting.
Pulse frequency
Present
frequency
Time
Execution of
SPED(885)
Stop pulse
output
(Number of
pulses setting is not
preserved.)
Immediate stop
Procedure
Instruction
Settings
PULS(886) • Stop pulse
output
↓
ACC(888) or
SPED(885)
(Independent)
↓
INI(880)
PLS2(887)
↓
INI(880)
Execution
of INI(880)
Stops the pulse output immediately
and clears the number of output pulses
setting.
Pulse frequency
Present frequency
Time
PULS(886)
↓
SPED(885)
(Independent)
↓
SPED(885)
• Port
• Independent
• Target frequency = 0
Execution of Execution of
SPED(885) SPED(885)
Stop sloped
pulse output
smoothly.
(Number of
pulses setting is not
preserved.)
Decelerate to a
stop
Decelerates the
pulse output to a
stop.
Pulse frequency
Present
frequency
Target
frequency = 0
Original
deceleration
rate
Time
Execution of
ACC(888)
PULS(886) • Port
• Indepen↓
ACC(888) or dent
• Target freNote If ACC(888)
SPED(885)
quency = 0
started the
(Indepenoperation, the dent)
original
↓
acceleration/
deceleration ACC(888)
(Indepenrate will
dent)
remain in
effect.
PLS2(887)
If SPED(885) ↓
started the
operation, the ACC(888)
acceleration/ (Independeceleration dent)
rate will be
invalid and
the pulse output will stop
immediately.
213
Section 5-2
Pulse Outputs
Switching from Continuous Mode (Speed Control) to Independent Mode (Positioning)
Example application
Frequency changes
Description
Change from speed
control to fixed distance positioning
during operation
Pulse frequency
Outputs the number of
pulses specified in
PLS2(887) (Both relative
and absolute pulse
specification can be used.)
Target
frequency
Time
Execution of
ACC(888)
(continuous) Execution of
PLS2(887)
Fixed distance feed
interrupt
Procedure
Instruction
Pulse
frequency
Present
frequency
PLS2(887) can be
executed during a
speed control operation started with
ACC(888) to
change to positioning operation.
ACC(888)
(Continuous)
↓
PLS2(887)
Settings
• Port
• Acceleration rate
• Deceleration rate
• Target frequency
• Number of pulses
Note The starting frequency is ignored.
Note An error will
occur if a
constant
speed cannot be
achieved
after switching the mode.
If this happens, the
instruction
execution will
be ignored
and the previous operation will be
continued.
Time
Execution of
ACC(888)
(continuous) Execution of
PLS2(887) with the
following settings
• Number of pulses = number
of pulses until stop
• Relative pulse specification
• Target frequency = present
frequency
• Acceleration rate = Not 0
• Deceleration rate = target
deceleration rate
Relative Pulse Outputs and Absolute Pulse Outputs
Selecting Relative or
Absolute Coordinates
The pulse output PV’s coordinate system (absolute or relative) is selected
automatically, as follows:
• When the origin is undetermined, the system operates in relative coordinates.
• When the origin has been determined, the system operates in absolute
coordinates.
214
Conditions
Origin has been
Origin has been
determined by an ori- determined by exegin search
cuting INI(880) to
change the PV
Pulse output
PV’s coordinate system
Absolute coordinates
Origin not established (Origin search
has not been performed and PV has
not been changed
with INI(880).)
Relative coordinates
Section 5-2
Pulse Outputs
Relationship between the
Coordinate System and
Pulse Specification
Pulse output
specified in
PULS(886) or
PLS2(887)
The following table shows the pulse output operation for the four possible
combinations of the coordinate systems (absolute or relative) and the pulse
output (absolute or relative) specified when PULS(886) or PLS2(887) is executed.
Coordinate system
Relative coordinate system
Absolute coordinate system
Origin not established:
Origin established:
The No-origin Flag will be ON in this case.
The No-origin Flag will be OFF in this case.
Relative pulse speci- Positions the system to another position relative to the current position.
fication
Number of movement pulses = number of pulses setting
The pulse output PV after instruction execution The pulse output PV after instruction execution
= Number of movement pulses = Number of
= PV + Number of movement pulses.
pulses setting
The following example shows the number of
pulses setting = 100 counterclockwise.
Note The pulse output PV is reset to 0 just before
pulses are output. After that, the specified number of pulses is output.
Number of pulses
setting
II
Number of
movement pulses
The following example shows the number of
pulses setting = 100 counterclockwise.
Number of pulses
setting
II
Number of
movement pulses
100
Target
position
100
0
Target
Origin position
Pulse
output PV
Current
position=0
Pulse output PV range:
8000 0000 to 7FFF FFFF hex
Number of pulses setting range:
0000 0000 to 7FFF FFFF hex
Pulse
output PV
Current
position
Pulse output PV range:
8000 0000 to 7FFF FFFF hex
Number of pulses setting range:
0000 0000 to 7FFF FFFF hex
215
Section 5-2
Pulse Outputs
Pulse output
specified in
PULS(886) or
PLS2(887)
Absolute pulse
specification
Coordinate system
Relative coordinate system
Absolute coordinate system
Origin not established:
The No-origin Flag will be ON in this case.
The absolute pulse specification cannot be
used when the origin location is undetermined,
i.e., when the system is operating in the relative
coordinate system. An instruction execution
error will occur.
Origin established:
The No-origin Flag will be OFF in this case.
Positions the system to an absolute position relative to the origin.
The number of movement pulses and movement direction are calculated automatically from
the current position (pulse output PV) and target
position.
The following example shows the number of
pulses setting = +100.
Number of pulses
setting
II
Number of
movement pulses
+100
+200
0
Origin
Target
Current
position = position
number of
pulses
setting
Pulse
output PV
Number of movement pulses = Number of
pulses setting - Pulse output PV when instruction is executed
The movement direction is determined automatically.
Pulse output PV when instruction is executed =
Number of pulses setting
Pulse output PV range:
8000 0000 to 7FFF FFFF hex
Number of pulses setting range:
8000 0000 to 7FFF FFFF hex
216
Section 5-2
Pulse Outputs
Operations Affecting the Origin Status (Established/Not Established Status)
The following table shows the operations that can affect the origin status (origin established or no-origin), such as changing the operating mode and executing certain instructions.
The No-origin Flag will be ON when the corresponding pulse output's origin is
not established and OFF when the origin is established.
Current status
PROGRAM mode
RUN mode or MONITOR
mode
Origin
Origin not
established established
Operation
Origin
established
Origin not
established
OperatSwitch to
ing mode RUN or
change
MONITOR
Status
changes to
“Origin not
established.”
---
“Origin not
--established”
status continues.
--“Origin
established”
status continues.
Switch to
PROGRAM
Instruction execution
Origin search --performed by
ORG(889)
---
PV changed
by INI(880)
---
---
The Pulse Output Reset Status
Bit (A54000 or A54100) changes to
goes from OFF to ON.
“Origin not
established.”
“Origin not
established”
status continues.
---
“Origin not
established”
status continues.
Status
changes to
“Origin
established.”
“Origin
established”
status continues.
Status
changes to
“Origin
established.”
Status
changes to
“Origin
established.”
Status
changes to
“Origin not
established.”
“Origin not
established”
status continues.
Movement Direction when Using Absolute Pulse Specification
When operating with the absolute pulse specification, the movement direction
is selected automatically based on the relationship between the pulse output
PV when the instruction is executed and the specified target position. The
direction (CW/CCW) specified in an ACC(888) or SPED(885) instruction is not
effective.
Using CW/CCW Limit Inputs for Pulse Output Functions Other than Origin Searches
Pulse outputs will stop when either the CW or CCW limit input signals turns
ON. It is also possible to select whether or not the established origin will be
cleared when a CW or CCW limit input signal turns ON for an origin search or
other pulse output function.
S-curve Acceleration/Deceleration
S-curve acceleration/deceleration can be used for pulse output instructions
involving acceleration/deceleration. When there is leeway in the maximum
allowable speed, S-curve accelerations/decelerations will help control shock
and vibration by reducing the initial acceleration rate in comparison with linear
acceleration/deceleration.
Note
The setting for S-curve acceleration/deceleration applies to all pulse outputs.
217
Section 5-2
Pulse Outputs
Output Pattern
The output pattern for S-curve acceleration/deceleration is shown below.
Example for PLS2(887)
Pulse frequency
Max. acceleration
is 1.5 times
set acceleration
Deceleration
specified
for S-curve
deceleration
Target
frequency Acceleration
specified
for S-curve
acceleration
Set
deceleration
Set
acceleration
Specified
number of
pulses
Starting
frequency
Stop frequency
PLS2
executed
Target frequency
reached
Deceleration point
Time
Output stops
The same type of S-curve acceleration/deceleration can be used for
ACC(888) as well.
Note The curve for S-curve acceleration/deceleration is formed by applying a cubic
equation to the straight line of the set acceleration/deceleration rates (a cubic
polynomial approximation). The curve’s parameters cannot be changed.
The maximum acceleration will be 1.5 times that of trapezoidal acceleration/
deceleration for the same acceleration/deceleration rate.
Procedure
Make the following settings in the PLC Setup.
Pulse Output 0 to 3
Speed Curve
218
Trapezium
S-shaped
When a pulse output is executed with acceleration/deceleration, this setting determines
whether the acceleration/deceleration rate is linear (trapezium) or S-shaped.
Section 5-2
Pulse Outputs
Restrictions
The following restrictions apply when using S-curve acceleration/deceleration.
Starting Frequency
The starting frequency must be 100 Hz or greater. If the starting frequency is
set to less than 100 Hz, it will automatically be increased to 100 Hz if S-curve
acceleration/deceleration is set.
Pulse frequency
Automatically
increased
to 100 Hz.
100 Hz
50 Hz
Time
Target Frequency
S-curve acceleration/deceleration will not be performed if the target frequency
is less than 100 Hz.
Pulse frequency
50 Hz
No
acceleration/deceleration
Time
Precautions when
using the Pulse
Output Function
The CP1L CPU Unit’s pulse output frequency is determined by dividing the
source clock frequency by an integer ratio. (The source clock frequency for
ports 0 and 1 is 20 MHz and the frequency for ports 2 and 3 is 16.4 MHz.)
Consequently, there may be a slight difference between the set frequency and
the actual frequency, and that difference increases as the frequency
increases. The actual frequency can be calculated from the following equations.
Pulse Output System
Integer dividing ratio calculated
from user's set frequency
Output pulses (actual frequency)
Source 16.4 MHz
clock
Frequency
divider
219
Section 5-2
Pulse Outputs
Equations
Actual frequency (Hz) =
Dividing ratio = INT
Source clock frequency
Dividing ratio
(Clock frequency x 2) + Set frequency
Set frequency (Hz) x 2
The INT function extracts an integer from the fraction. The non-integer
remainder is rounded.
Differences between Set Frequencies and Actual Frequencies
• Source clock frequency: 16.4 MHz
5-2-5
Set frequency (kHz)
99.696 to 100.000
Actual frequency (kHz)
100.000
99.093 to 99.696
98.498 to 99.093
99.393
98.795
:
50.076 to 50.229
:
50.152
49.923 to 50.076
49.772 to 49.923
50.000
49.848
:
20.012 to 20.036
:
20.024
19.987 to 20.012
19.963 to 19.987
20.000
19.975
:
:
10.003 to 10.009
9.996 to 10.003
10.006
10.000
9.990 to 9.996
:
9.993
:
5.000 to 5.002
4.999 to 5.000
5.001
5.000
4.997 to 4.999
:
4.998
:
3.001 to 3.001
3.000 to 3.000
3.001
3.000
2.998 to 2.999
2.999
Origin Search and Origin Return Functions
The CP1L CPU Units have two functions that can be used to determine the
machine origin for positioning.
1,2,3...
1. Origin Search
The ORG instruction outputs pulses to turn the motor according to the pattern specified in the origin search parameters. As the motor turns, the origin search function determines the machine origin from the following 3
kinds of position input signals.
• Origin input signal
• Origin proximity input signal
• CW limit input signal and CCW limit input signal
220
Section 5-2
Pulse Outputs
2. Changing the Pulse Output PV
When you want to set the current position as the origin, execute INI(880)
to reset the pulse output PV to 0.
The origin location can be determined after using either method.
The CP1L CPU Units are also equipped with the origin return function, which
can be executed to return the system to the origin after the origin location has
been determined by one of the methods above.
• Origin Return
If the motor is stopped, ORG(889) can be executed to perform an origin
return operation that moves the motor back to the origin position. The origin position must be determined in advance by performing an origin
search or changing the pulse output PV.
Note The motor can be moved even if the origin position has not been determined,
but positioning operations will be limited as follows:
• Origin return: Cannot be used.
• Positioning with absolute pulse specification: Cannot be used.
• Positioning with relative pulse specification: Outputs the specified number
of pulses after setting the current position to 0.
5-2-5-1
Origin Search
When ORG(889) executes an origin search, it outputs pulses to actually move
the motor and determines the origin position using the input signals that indicate the origin proximity and origin positions.
The input signals that indicate the origin position can be received from the
servomotor's built-in phase-Z signal or external sensors such as photoelectric
sensors, proximity sensors, or limit switches.
Several origin search patterns can be selected.
In the following example, the motor is started at a specified speed, accelerated to the origin search high speed, and run at that speed until the origin
proximity position is detected. After the Origin Proximity Input is detected, the
motor is decelerated to the origin search low speed and run at that speed until
the origin position is detected. The motor is stopped at the origin position.
Origin search
high speed
Pulse frequency
Origin search
acceleration rate
Origin search
deceleration rate
Origin search
proximity speed
Deceleration
point
Origin search
initial speed
Start
Decelerate from high to low speed.
Execution of ORG(889)
Indicated by the Origin
Proximity Input Signal
Stop
Time
Indicated by the
Origin Input Signal
221
Section 5-2
Pulse Outputs
Procedure
Wire the pulse output
and input signals.
PLC Setup settings
Ladder program
Restrictions
• Output: Connect the outputs using the CW/CCW
method or pulse + direction method. The same
method must be used for all of the pulse outputs.
Power supply for outputs: 24 V DC
• Inputs: Connect the Origin input Signal, Near Origin
Input Signal, and Positioning Complete Signal to the
built-in input terminals allocated to the pulse output
being used.
The limit inputs must be connected to available
normal input terminals or terminals and output from
the ladder program.
• Enable the origin search function for pulse output 0 to 3 by setting
the Origin Search Function Enable/Disable setting to 1.
• Limit Input Signal Settings
Limit Input Signal Operation and Undefine Origin Settings
• Acceleration/Deceleration Curve Setting
• Other Parameter Settings
1. Operation Mode
• Set the best operation mode for the driver being used (servomotor
or stepping motor.)
• Set “mode 0” when driving a stepping motor. Set “mode 1” or
“mode 2” when driving a servomotor.
2. Set the origin search operation setting.
3. Set the origin detection method.
4. Set the origin search direction (CW or CCW.)
5. Set the origin search speeds:
Initial speed for origin search/origin return, origin search high
speed, origin search proximity speed, origin search acceleration
rate, and origin search deceleration rate
6. Origin Compensation
After the origin has been determined, the origin compensation can
be set to compensate for a shift in the Proximity Sensor’s ON
position, motor replacement, or other change.
7. Set the Origin Proximity Input Signal type, Origin Input Signal
type, and Limit Input Signal type.
8. Set the Positioning Monitor Time.
• Output the status of the Limit Signal Inputs and Positioning
Completed Signal to Auxiliary Area bits.
• Execute ORG(889).
Specify the origin search operation by setting the third
operand to 0000.
• The Phase-Z signal + Software reset method cannot be used for a highspeed counter when the origin search function has been enabled in the
PLC Setup.
PLC Setup
■ Origin Search Function Enable/Disable Settings
These PLC Setup indicate whether or not the origin search function will be
used for each pulse output.
■ Limit Input Signal Setting
Specify in the following PLC Setup whether to use the CW/CCW limit input
signals only for origin searches or for all pulse output functions. These settings affect all pulse outputs.
(This setting is called the Limited Input Signal Operation setting.)
222
Section 5-2
Pulse Outputs
■ Pulse Output 0 Undefined Origin Setting
■ Acceleration/Deceleration Curve Settings
Note
Origin Search Parameters
The acceleration/deceleration curve setting applies to all pulse outputs, not
just to origin searches. Refer to S-curve Acceleration/Deceleration on
page 217 for details.
The various origin search parameters are set in the PLC Setup.
Name
Settings
Operating mode
Operating mode 0, 1, or 2
Origin search operation
setting
0: Reversal mode 1
1: Reversal mode 2
0: Read the Origin Input Signal after the
Origin Proximity Input Signal goes
from OFF→ON→OFF.
1: Read the Origin Input Signal after the
Origin Proximity Input Signal goes
from OFF→ON.
2: Just read the Origin Input Signal without
using the Origin Proximity Input Signal.
0: CW direction
1: CCW direction
00000000 to 000186A0 hex
(0 Hz to 100 kHz)
J models : 00000000 to 00004E20 hex
(0 Hz to 20kHz)
Origin detection method
Origin search direction
Origin
search
speed
(See
note.)
Origin search/
return initial
speed
Origin search
high speed
Origin search
proximity speed
00000001 to 000186A0 hex
(1 Hz to 100 kHz)
J models : 00000001 to 00004E20 hex
(1 Hz to 20kHz)
Same as above.
Time when
read
Start of
operation
Start of
operation
Start of
operation
Start of
operation
Start of
operation
Start of
operation
Start of
operation
Origin search
0001 to FFFF hex (1 to 65,535 Hz/4 ms) Start of
acceleration rate
operation
Origin search
0001 to FFFF hex (1 to 65,535 Hz/4 ms) Start of
deceleration rate
operation
Origin compensation
I/O settings
Positioning monitor time
8000 0000 to 7FFF FFFF hex
(−2147483648 to 2147483647)
Limit Input Signal type
0: Normally closed (NC)
1: Normally open (NO)
Start of
operation
Start of
operation
Origin Proximity Input Signal type
0: Normally closed (NC)
1: Normally open (NO)
Start of
operation
Origin Input Signal type
0: Normally closed (NC)
1: Normally open (NO)
When power
is turned ON
0000 to 270F hex
(0 to 9,999 ms)
Start of
operation
Note An origin search will not be started unless the origin search proximity speed is
less than the origin search high speed and unless the origin search/return initial speed is less than the origin search proximity speed.
223
Section 5-2
Pulse Outputs
Explanation of the Origin Search Parameters
Operating Mode
Operating
mode
0
The operating mode parameter specifies the kind of I/O signals that are used
in the origin search. The 3 operating modes indicate whether the Error
Counter Reset Output and Positioning Completed Input are used.
I/O signal
Origin Input
Signal
Error Counter
Reset Output
The origin position
is determined
when the Origin
Input Signal goes
from OFF to ON.
1
2
Not used.
The origin search
operation ends
after the origin is
detected.
Goes ON for 20 to
30 ms when the
origin is detected.
Remarks
Positioning Completed
Input
Not used.
Operation when the origin is
detected during deceleration from
the origin search's high speed
The Origin Input Signal will be
detected during deceleration. An Origin Input Signal Error (error code
0202) will occur and the motor will
decelerate to a stop.
After the origin is
detected, the origin
search will not be end
until the Positioning
Completed Input is
received from the driver.
The Origin Input Signal will not be
detected during deceleration. When
the Origin Input Signal is detected
after the motor has reached the proximity speed for origin search, the
motor will be stopped and the origin
search operation will end.
The following table shows the proper operating mode settings for different
drivers and applications.
Driver
Remarks
Operating mode
Stepping motor driver (See note.)
0
Servo driver
Use this mode when you want to
1
reduce the processing time, even at the
expense of positioning accuracy. (The
Servo Driver's positioning complete
signal is not used.)
Use this mode when you want high
2
positioning accuracy. (The Servo
Driver's positioning complete signal is
used.)
Note There are stepping motor drivers that are equipped with a positioning completed signal like a Servo driver. Operating modes 1 and 2 can be used with
these stepping motor drivers.
■
Remarks: Operations Detecting the Origin During Deceleration from High
Speed
Operating Mode 0 (without Error Counter Reset Output, without
Positioning Completed Input)
Connect the sensor’s open collector output signal to the Origin Input Signal.
The Origin Input Signal’s response time is 0.1 ms when set as a NO contact.
When the Origin Proximity Input Signal is received, the motor will begin decelerating from the origin search high speed to the origin search proximity speed.
In this operating mode, the Origin Input Signal will be detected if it is received
during this deceleration and an Origin Input Signal Error (error code 0202) will
be generated. In this case, the motor will decelerate to a stop.
224
Section 5-2
Pulse Outputs
Origin Input Signal goes from OFF
to ON while motor is decelerating.
Origin Proximity
Input Signal
1
Origin Input
Signal
1
0
0
Original pulse output
pattern
Pulse output
CCW
CW
Starts when
ORG(889) is
executed.
Origin Input Signal
Error (error code
0202)
Operating Mode 1 (with Error Counter Reset Output, without Positioning
Completed Input)
Connect the phase-Z signal from the Servo Driver to the Origin Input Signal.
When the Origin Input Signal is received, the pulse output will be stopped and
the Error Counter Reset Signal will be output for about 20 to 30 ms.
Origin Input Signal
(Phase-Z signal)
Pulse output
1
0
1
0
Error Counter Reset
Signal
Approx. 20 to 30 ms
When the Origin Proximity Input Signal is received, the motor will begin decelerating from the origin search high speed to the origin search proximity speed.
In this operating mode, the motor will stop at the Origin Input Signal after
deceleration is completed.
Operating Mode 1 with Origin Proximity Input Signal Reverse (Origin
Detection Method Setting = 0)
When the deceleration time is short, the Origin Input Signal can be detected
immediately after the Origin Proximity Input Signal goes from ON to OFF. Set
225
Section 5-2
Pulse Outputs
a Origin Proximity Input Signal dog setting that is long enough (longer than
the deceleration time.)
Verify that the Origin Proximity Input
Signal's dog setting is long enough
(longer than the deceleration time.)
1
Origin Proximity
Input Signal
0
Origin Input Signal 1
(Phase-Z signal)
0
Origin Input
Signal is
ignored during
deceleration.
Motor stopped by an Origin
Input Signal received after
deceleration.
Pulse output
CCW
CW
Starts when
ORG(889) is
executed.
Stop
Ideal time for the Origin Proximity Input
Signal to go OFF.
(Settings when the
deceleration time is short)
CCW
CW
Stop (See note.)
Starts when ORG(889)
is executed.
Note: The Origin Input Signal can be detected immediately
after the Origin Proximity Input Signal goes from ON
to OFF if the deceleration time is short, e.g., starting
from within the Origin Proximity Input Signal.
Operating Mode 1 without Origin Proximity Input Signal Reverse (Origin
Detection Method Setting = 1)
Depending on the length of the deceleration time, the stopping position may
change when the Origin Input Signal is detected during deceleration.
Origin Proximity
Input Signal
1
Origin Input Signal
(Phase-Z signal)
1
0
0
Origin Input
Signal is
ignored during
deceleration.
Pulse output
CCW
(The deceleration time is
relatively long in this case.)
Motor stopped by an Origin
Input Signal received after
deceleration.
CW
Starts when
ORG(889) is
executed.
Stop
Motor stopped by an
Origin Input Signal
received after
deceleration.
CCW
CW
(The deceleration time is short
in this case.)
Starts when Stop
ORG(889)
is executed.
Operating Mode 2 (with Error Counter Reset Output, with Positioning
Completed Input)
This operating mode is the same as mode 1, except the Positioning Completed Signal (INP) from the Servo Driver is used. Connect the Positioning
Completed Signal from the Servo Driver to a normal input (origin search 0 to 3
input).
226
Section 5-2
Pulse Outputs
If origin compensation is not being applied, the Positioning Completed Signal
is checked after the Error Counter Reset Output. If origin compensation is
being applied, the Positioning Completed Signal is checked after the compensation operation is completed.
Pulse output
Time
Stop
1
Error Counter
Reset Output
0
1
Positioning
Completed
Signal
0
Origin Search Operation
Setting
Select either of the following two reverse modes for the origin search operation pattern.
Setting
0: Reversal mode 1
1: Reversal mode 2
Origin Detection Method
Description
When the limit input signal is received in the origin search
direction, reverse and continue operation.
When the limit input signal is received in the origin search
direction, generate an error and stop operation.
The origin detection method depends on the Origin Proximity Input Signal settings. Select one of the following three methods in each port’s parameters.
Setting
0: Origin Proximity Input Signal
reversal required.
Description
Reads the first Origin Input Signal after the Origin Proximity Input Signal goes
OFF→ON→OFF.
1: Origin Proximity Input Signal
reversal not required.
2: Origin Proximity Input Signal not
used.
Reads the first Origin Input Signal after the Origin Proximity Input Signal goes OFF→ON.
Just read the Origin Input Signal without using
the Origin Proximity Input Signal.
Origin Detection Method 0: Origin Proximity Input Signal Reversal
Required
Deceleration starts when
Origin Proximity Input
Signal goes OFF→ON.
Origin Proximity 1
Input Signal
0
Origin Input
Signal
After the Origin Proximity Input Signal has gone
from OFF→ON→OFF, the motor is stopped
when the Origin Input Signal goes OFF→ON.
1
0
High speed for
origin search
Deceleration
Pulse output
Acceleration
Initial
speed
CCW
Start when
ORG(889) is
executed.
Proximity speed for origin search
Stop
CW
227
Section 5-2
Pulse Outputs
Origin Detection Method 1: Origin Proximity Input Signal Reversal Not
Required
Deceleration starts when
Origin Proximity Input
Signal goes OFF→ON.
Origin Proximity
Input Signal
Origin Input
Signal
Pulse output
1
0
After the Origin Proximity Input Signal has gone
from OFF→ON→OFF, the motor is stopped when
the Origin Input Signal goes OFF→ON.
1
0
Acceleration
High speed for
origin search
Deceleration
Proximity speed for origin search
Initial
speed
CCW
CW
Start when
ORG(889) is
executed.
Stop
Origin Detection Method 2: Origin Proximity Input Signal Reversal Not
Used
Deceleration starts when
Origin Proximity Input
Signal goes OFF→ON.
Origin Input
Signal
Pulse output
1
0
Proximity speed
for origin search
Acceleration
Initial
speed
Start when
ORG(889) is
executed.
Origin Search Operating
Mode and Origin
Detection Method Settings
228
Stop
The following examples explain how the operation patterns are affected by the
origin search operation and origin detection method settings.
These examples have a CW origin search direction. (The search direction and
limit input signal direction would be different for an origin search in the CCW
direction.)
Section 5-2
Pulse Outputs
Using Reversal Mode 1
Origin search
operation
Origin
detection
method
0: Origin Proximity Input Signal reversal
required.
0: Reversal mode 1
Origin Proximity 1
0
Input Signal
1
Origin Input
0
Signal
High speed for origin search
Pulse output
CCW
Proximity speed for origin search
CW
Stop
Start
CCW
CW
Stop CW limit input signal (See note.)
Start
CCW
CW
Stop Start
Note When the limit input signal is received, the motor stops without deceleration, reverses direction, and accelerates.
1: Origin Proximity Input Signal reversal not
required.
Origin Proximity
Input Signal
Origin Input
Signal
1
0
1
0
Pulse output
CCW
CW
Start
CCW
Stop
CW
Stop CW limit input signal
(See note.)
Start
CCW
CW
Stop
Start
Note When the limit input signal is received, the motor stops without deceleration, reverses direction, and accelerates.
2: Origin Proximity Input Signal not used.
Origin Input
Signal
1
0
Proximity speed for origin search
Pulse output
CCW
CW
Start
Stop
CCW
Stop Start
CW
CW limit input signal
(See note.)
CCW
CW
Stop
Start
Note When the direction of operation is reversed, it is reversed immediately
without deceleration or acceleration.
229
Section 5-2
Pulse Outputs
Using Reversal Mode 2
Origin search
operation
Origin detection
method
0: Origin Proximity Input
Origin Proximity 1
Signal reversal required.
Input Signal
1: Reversal mode 2
0
1
0
Origin Input
Signal
Pulse output
CCW
CW
Stop
Start
CCW
Stop
CW
CW limit input signal
(See note.)
Start
CCW
CW
Start Limit stop
(error code 0200)
Note When the limit input signal is received, the motor stops without deceleration.
1: Origin Proximity Input
Signal reversal not
required.
Origin Proximity
Input Signal
1
0
Origin Input
Signal
1
0
Pulse output
CCW
CW
Start
Stop
CCW
Stop
CW
CW limit input signal
(See note.)
Start
CCW
CW
Start
Limit stop
(error code 0200)
Note When the limit input signal is received, the motor stops without deceleration.
230
Section 5-2
Pulse Outputs
Origin search
operation
Origin detection
method
2: Origin Proximity Input
Origin Input
Signal not used.
Signal
1: Reversal mode 2
1
0
Proximity speed for origin search
Pulse output
CCW
CW
Start
Stop
CCW
CW
Stop Start
CW limit input signal (See note.)
CCW
CW
Start
Limit stop (error code 0201)
Note When the limit input signal is received, the motor stops without deceleration.
Specifying the Origin
Search Direction (CW or
CCW Direction)
Sets the direction to move when detecting the Origin Input Signal.
Typically, the origin search is performed so that the Origin Input Signal’s rising
edge is detected when moving in the origin search direction.
Setting
0
1
Origin Search Speed
Description
CW direction
CCW direction
These are the motor speed settings used in the origin search.
Note
The origin search will not be performed in these cases:
Origin search high speed ≤ Origin search proximity speed
Origin search proximity speed ≤ Origin search initial speed
Origin Search/Return Initial Speed
Sets the motor’s starting speed when the origin search is executed. Specify
the speed in the number of pulses per second (pps).
Origin Search High Speed
Sets the motor’s target speed when the origin search is executed. Specify the
speed in the number of pulses per second (pps).
Origin Search Proximity Speed
Sets the motor’s speed after the Origin Proximity Input Signal is detected.
Specify the speed in the number of pulses per second (pps).
Origin Search Acceleration Rate
Sets the motor’s acceleration rate when the origin search is executed. Specify
the amount to increase the speed (Hz) per 4-ms interval.
Origin Search Deceleration Rate
Sets the motor’s acceleration rate when the origin search function is decelerating. Specify the amount to decrease the speed (Hz) per 4-ms interval.
231
Section 5-2
Pulse Outputs
Origin Compensation
After the origin has been determined, the origin compensation can be set to
compensate for a shift in the Proximity Sensor’s ON position, motor replacement, or other change.
Once the origin has been detected in an origin search, the number of pulses
specified in the origin compensation is output, the current position is reset to
0, and the pulse output's No-origin Flag is turned OFF.
Setting range: 8000 0000 to 7FFF FFFF hex (−2,147,483,648 to
2,147,483,647) pulses
I/O Settings
Limit Input Signal Type (NC/NO)
Specifies the type of input signal (normally closed or normally open) being
used for the limit inputs.
0: NC
1: NO
Origin Proximity Input Signal Type (NC/NO)
Specifies the type of input signal (normally closed or normally open) being
used for the Origin Proximity Input Signal.
0: NC
1: NO
Origin Input Signal Type (NC/NO)
Specifies the type of input signal (normally closed or normally open) being
used for the Origin Input Signal.
0: NC
1: NO
Positioning Monitor Time
When the operating mode is set to mode 2, this setting specifies how long to
wait (in ms) for the Positioning Completed Signal after the positioning operation has been completed, i.e., the pulse output has been completed. A Positioning Timeout Error (error code 0300) will be generated if the motor driver's
Positioning Completed Signal does not come ON within the specified time.
Setting range: 0000 to 270F hex (0 to 9,999 ms)
The actual monitoring time will be the Positioning Monitor Time rounded up to
the nearest 10-ms unit + 10 ms max.
If the Positioning Monitor Time is set to 0, the function will be disabled and the
Unit will continue waiting for the Positioning Completed Signal to come ON. (A
Positioning Timeout Error will not be generated.)
Executing an Origin Search
Execute ORG(889) in the ladder program to perform an origin search with the
specified parameters.
ORG(889)
P
C
232
P: Port specifier
Pulse output 0: #0000
Pulse output 1: #0001
C: Control data; Origin search and CW/CCW method: #0000
Origin search and pulse + direction method: #0001
Section 5-2
Pulse Outputs
Restrictions
The motor can be moved even if the origin position has not been determined
with the origin search function, but positioning operations will be limited as follows:
Function
Origin return
Positioning with absolute
pulse specification
Positioning with relative
pulse specification
Operation
Cannot be used.
Cannot be used.
Outputs the specified number of pulses after setting the
current position to 0.
An origin search will not be started unless the origin search proximity speed is
less than the origin search high speed and unless the origin search/return initial speed is less than the origin search proximity speed.
Origin Search Error Processing
The CP1L CPU Unit’s pulse output function performs a basic error check
before starting to output pulses (when the instruction is executed) and will not
output pulses if the settings are incorrect. There are other errors that can
occur with the origin search function during pulse output, which may stop the
pulse output.
If an error occurs that stops pulse output, the pulse output’s Output Stopped
Error Flag will be turned ON and the Pulse Output Stop Error Code will be
written to Error Code word. Use these flags and error codes to identify the
cause of the error.
The Pulse Output Stop Errors will not affect the CPU Unit’s operating status.
(The Pulse Output Stop Errors do not cause a fatal or non-fatal error in the
CPU Unit.)
Related Auxiliary Area Flags
Function
Output Stopped Error Flags
0: No error
ON when an error occurred while outputting pulses in the ori- 1: Stop error occurred.
gin search function.
Stop Error Codes
When a Pulse Output Stop Error occurs, the error code is stored in that pulse outputs corresponding Stop Error Code word.
Pulse output number
0
A280.07
1
A281.07
A444
A445
233
Section 5-2
Pulse Outputs
Pulse Output Stop Error Codes
Error name
Error code
CW Limit Stop Input
Signal
CCW Limit Stop
Input Signal
No Origin Proximity
Input Signal
0100
No Origin Input Signal
Likely cause
Corrective action
Stopped due to a CW limit signal
input.
Stopped due to a CCW limit signal input.
The parameters indicate that the
Origin Proximity Input Signal is
being used, but a Origin Proximity Input Signal was not received
during the origin search.
Move in the CCW direction.
0201
The Origin Input Signal was not
received during the origin
search.
Check the wiring of the Origin
Input Signal as well as the PLC
Setup's Origin Input Signal Type
setting (NC or NO) and execute
the origin search again. Turn the
power supply OFF and then ON
if the signal type setting was
changed.
Origin Input Signal
Error
0202
During an origin search in operating mode 0, the Origin Input
Signal was received during the
deceleration started after the
Origin Proximity Input Signal
was received.
Limit Inputs in Both
Directions
0203
Simultaneous Origin
Proximity and Limit
Inputs
0204
Limit Input Signal
Already Being Input
0205
234
0101
0200
Move in the CW direction.
Operation after
error
Immediate stop,
No effect on
other port
Check the wiring of the Origin
No effect on
Proximity Input Signal as well as other port
the PLC Setup's Origin Proximity Input Signal Type setting (NC
or NO) and execute the origin
search again. Turn the power
supply OFF and then ON if the
signal type setting was changed.
Take one or both of the following
steps so that the Origin Input
Signal is received after deceleration is completed.
•Increase the distance between
the Origin Proximity Input Signal sensor and Origin Input Signal sensor.
•Decrease the difference
between the origin search's
high speed and proximity
speed settings.
The origin search cannot be per- Check the wiring of the limit sigformed because the limit signals nals in both directions as well as
for both directions are being
the PLC Setup’s Limit Signal
input simultaneously.
Type setting (NC or NO) and
execute the origin search again.
Turn the power supply OFF and
then ON if the signal type setting
was changed.
Decelerates to a
stop,
No effect on
other port
The Origin Proximity Input Signal and the Limit Input Signal in
the search direction are being
input simultaneously during an
origin search.
Immediate stop,
No effect on
other port
Check the wiring of the Origin
Proximity Input Signal and the
Limit Input Signal. Also check
the PLC Setup’s Origin Proximity Input Signal Type and Limit
Signal Type settings (NC or NO)
and then execute the origin
search again. Turn the power
supply OFF and then ON if a
signal type setting was changed.
•When an origin search in one
Check the wiring of the Limit
direction is being performed,
Input Signal and the PLC
the Limit Input Signal is already Setup’s I/O settings. Also check
being input in the origin search the PLC Setup’s Limit Signal
direction.
Type setting (NC or NO) and
•When a non-regional origin
then execute the origin search
search is being performed, the
again. Turn the power supply
Origin Input Signal and the
Limit Input Signal in the oppo- OFF and then ON if the signal
site direction (from the search type setting was changed.
direction) are being input simultaneously.
Operation will
not start.
No effect on
other port
Immediate stop,
No effect on
other port
Section 5-2
Pulse Outputs
Error name
Error code
Origin Proximity
Input Signal Origin
Reverse Error
0206
Positioning Timeout
Error
0300
Likely cause
•When an origin search with
reversal at the limit is being performed, the Limit Input Signal in
the search direction was input
while the Origin Proximity Input
Signal was reversing.
•When an origin search with
reversal at the limit is being performed and the Origin Proximity
Input Signal is not being used,
the Limit Input Signal in the
search direction was input
while the Origin Input Signal
was reversing.
The Servo Driver's Positioning
Completed Signal does not
come ON within the Positioning
Monitor Time specified in the
PLC Setup.
Corrective action
Operation after
error
Check the installation positions Immediate stop,
of the Origin Proximity Input Sig- No effect on
nal, Origin Input Signal, and
other port
Limit Input Signal as well as the
PLC Setup’s I/O settings. Also
check the PLC Setup’s Signal
Type settings (NC or NO) for
each input signal and then execute the origin search again.
Turn the power supply OFF and
then ON if a signal type setting
was changed.
Adjust the Positioning Monitor
Time setting or Servo system
gain setting. Check the Positioning Completed Signal wiring,
correct it if necessary, and then
execute the origin search again.
Decelerates to a
stop,
No effect on
other port
Origin Search Examples
Operation
Connect a Servo Driver and execute an origin search based on the Servomotor's built-in encoder phase-Z signal and a Origin Proximity Input Signal.
Conditions
• Operating mode: 1
(Uses the Servomotor encoder’s phase-Z signal as the Origin Input Signal.)
• Origin search operation setting: 0
(Sets reverse mode 1. Reverses direction when the limit input signal is
input in the origin search direction.)
• Origin detection method: 0
(Reads the Origin Input Signal after the Origin Input Signal goes
OFF→ON→OFF.)
• Origin search direction: 0 (CW direction)
System Configuration
CW limit
detection
sensor
Origin Proximity
Input sensor
Workpiece
CCW limit
detection
sensor
0.10: Origin proximity input sensor
0.00: CW limit detection sensor
0.01: CCW limit detection sensor
Servomotor
Encoder
Servomotor Driver
0.00: Servomotor encoder's
phase-Z input; Origin input
Pulse output from built-in
outputs OUT0
235
Section 5-2
Pulse Outputs
Instructions Used
ORG(889)
I/O Allocations
(Example: CP1L-M40/30
[email protected], [email protected]
Units)
■ Inputs
Input terminal
Word
CIO 0
Word
A540
Name
Bit
00
CW limit detection sensor
01
06
CCW limit detection sensor
Pulse Output 0 Origin Input Signal
10
Pulse Output 0 Origin Proximity Input Signal
Bit
08
Name
Pulse Output 0 CW Limit Input Signal
09
Pulse Output 0 CCW Limit Input Signal
■ Outputs
Output terminal
Word
Bit
CIO 100 00
01
Name
Pulse Output 0 CW output
Pulse Output 0 CCW output
Operation
1
Pulse Output 0
Origin Proximity Input
(0.10)
0
Pulse Output 0
Origin Signal Input
(0.06)
1
0
Pulse
frequency
Pulse Output 0
(100.00 and 100.01)
Origin search
acceleration
rate
Origin search
high speed
Origin search
deceleration
rate
Origin search
proximity speed
Origin search
initial speed
CCW
236
Execution of
ORG(889) starts.
Origin search starts.
Stop
CW
Section 5-2
Pulse Outputs
PLC Setup
Function
Pulse Output 0 Origin Search Function Enable/Disable
Setting (example)
1 hex: Enabled
Pulse Output 0 Origin Search Operating Mode
Pulse Output 0 Origin Search Operation Setting
1 hex: Mode 1
0 hex: Reverse mode 1
Pulse Output 0 Origin Detection Method
Pulse Output 0 Origin Search Direction Setting
0 hex: Origin detection method 0
0 hex: CW direction
Pulse Output 0 Origin Search/Return Initial Speed
0064 hex (100 pps)
0000 hex
Pulse Output 0 Origin Search High Speed
07D0 hex (2,000 pps)
0000 hex
Pulse Output 0 Origin Search Proximity Speed
03E8 hex (1,000 pps)
0000 hex
Pulse Output 0 Origin Compensation
0000 hex
0000 hex
Pulse Output 0 Origin Search Acceleration Rate
Pulse Output 0 Origin Search Deceleration Rate
0032 hex (50 Hz/4 ms)
0032 hex (50 Hz/4 ms)
Pulse Output 0 Limit Input Signal Type
Pulse Output 0 Origin Proximity Input Signal Type
1: NO
1: NO
Pulse Output 0 Origin Input Signal Type
1: NO
Ladder Program
CW limit detection
sensor
0.00
CCW limit
detection sensor
A540.08
CW Limit
Input Signal
0.01
CCW Limit
Input Signal
A540.09
Execution condition
@ORG
#0000
#0000
Origin search 0:
#0000; Origin
search and
CW/CCW
method: #0000
237
Section 5-2
Pulse Outputs
5-2-6
Origin Return
Overview
Moves the motor to the origin position from any other position. The origin
return operation is controlled by ORG(889).
The origin return operation returns the motor to the origin by starting at the
specified speed, accelerating to the target speed, moving at the target speed,
and then decelerating to a stop at the origin position.
Origin return
target speed
Pulse frequency
Origin return
deceleration rate
Origin return
acceleration
rate
Origin return
initial speed
Start
Stop
Time
Started by executing
ORG(889)
Procedure
Determine the origin return parameters.
Wire the outputs.
PLC Setup settings
Ladder program
1. Starting Speed for Origin Search and Origin Return
2. Origin return target speed
3. Origin return acceleration rate
4. Origin return deceleration rate
• Outputs: Use either the CW/CCW method or Pulse +
direction method. The same method must be used
for both pulse output 0 and pulse output 1.
• Various origin return parameter settings
• Execution of ORG(889)
To specify the origin return operation, set bits 12
to 15 of the second operand to 1 hex.
PLC Setup
The various origin return parameters are set in the PLC Setup.
238
Section 5-2
Pulse Outputs
Origin Return Parameters
Name
Settings
Origin search/return initial speed 00000000 to 000186A0 hex
(0 Hz to 100 kHz)
J models : 00000000 to
00004E20 hex
(0 Hz to 20 kHz)
Origin return target speed
00000001 to 000186A0 hex
(1 Hz to 100 kHz)
J models : 00000001 to
00004E20 hex
(1 Hz to 20 kHz)
Origin return acceleration rate
0001 to FFFF hex
(1 to 65,535 Hz/4 ms)
Origin return deceleration rate
0001 to FFFF hex
(1 to 65,535 Hz/4 ms)
Remarks
Start of operation
Explanation of the Origin Return Parameters
Origin Search/Return
Initial Speed
Sets the motor’s starting speed when the origin return is executed. Specify the
speed in the number of pulses per second (pps).
Origin Return Target
Speed
Sets the motor's target speed when the origin return is executed. Specify the
speed in the number of pulses per second (pps).
Origin Return
Acceleration Rate
Sets the motor's acceleration rate when the origin return operation starts.
Specify the amount to increase the speed (Hz) per 4-ms interval.
Origin Return
Deceleration Rate
Sets the motor's acceleration rate when the origin return function is decelerating. Specify the amount to decrease the speed (Hz) per 4-ms interval.
Executing an Origin Return
ORG(889)
P
C
P: Port specifier (Pulse output 0: #0000, Pulse output 1: #0001)
Pulse output 0: #0000
Pulse output 1: #0001
C: Control data
(Origin return and CW/CCW method: #1000, Origin search and pulse
+ direction method: #1100)
Note An instruction execution error will occur if the origin is not determined (relative
coordinate system) when ORG(889) is executed to perform an origin return
operation.
239
Section 5-2
Pulse Outputs
5-2-7
Pulse Output Procedures
Single-phase Pulse Output without Acceleration/Deceleration
The number of output pulses setting cannot be changed during positioning.
■
PULS(886) and SPED(885)
Determine the pulse output method,
output frequency, and port.
• Pulse output method
• CW/CCW inputs: Pulse outputs 0 to 1
• Pulse + direction inputs: Pulse outputs 0 to 1
• Output frequency: 1 Hz to 100 kHz (1 Hz units)
J models: 1Hz to 20 kHz (1 Hz units)
Wire the outputs.
PLC Setup settings
Ladder program
• Enable/disable the origin search function. Set the
various origin search parameters if the origin search
function is enabled.
• PULS(886): Specify port number and set the number of
output pulses.
• SPED(885): Specify port number and set the output
method (CW/CCW method or Pulse + direction method)
and pulse output control without acceleration/deceleration.
• INI(880): Specify port number and stop pulse output when
necessary.
• PRV(881): Specify port number and read pulse output PV
when necessary.
Single-phase Pulse Output with Acceleration/Deceleration
■
PULS(886) and ACC(888)
Determine the pulse output method,
output frequency, and port.
• Pulse output method
• CW/CCW inputs
• Pulse + direction inputs
• Output frequency: 1 Hz to 100 kHz (1 Hz units)
J models: 1Hz to 20 kHz (1 Hz units)
Wire the outputs.
PLC Setup settings
Ladder program
240
• Enable/disable the origin search function. Set the
various origin search parameters if the origin
search function is enabled.
• PULS(886): Specify port number and set the number
of output pulses.
• ACC(888): Specify port number and set the output
method (CW/CCW method or Pulse + direction
method) and pulse output control with
acceleration/deceleration (the same rate is used for
both acceleration and deceleration.)
• INI(880): Specify port number and stop pulse output
when necessary.
• PRV(881): Specify port number and read pulse
output PV when necessary.
Section 5-2
Pulse Outputs
Pulse Output with Trapezoidal Acceleration/Deceleration (Using PLS2(887))
Determine the pulse output
method, output frequency, and port.
• Pulse output method
• CW/CCW inputs
• Pulse + direction inputs
• Output frequency: 1 Hz to 100 kHz (1 Hz units)
J models: 1Hz to 20 kHz (1 Hz units)
Wire the outputs.
PLC Setup settings
Ladder program
5-2-8
• Enable/disable the origin search function. Set the
various origin search parameters if the origin
search function is enabled.
• PLS2(887): Specify port number and set the
output method (CW/CCW method or Pulse +
direction method) and pulse output control with
trapezoidal acceleration/deceleration (different
rates can be set for acceleration and
deceleration).
• INI(880): Specify port number and stop pulse
output when necessary.
• PRV(881): Specify port number and read pulse
output PV when necessary.
Instructions Used for Pulse Outputs
The pulse output functions can be used by executing the pulse control instructions in the ladder program. For some instructions, the PLC Setup must be set
in advance. The following instructions can be combined for positioning and
speed control.
Supported Pulse
Instructions
Use the following 8 instructions to control the pulse outputs.
241
Section 5-2
Pulse Outputs
The following table shows the kinds of pulse outputs controlled by each
instruction.
Instruction
Function
Positioning (independent mode)
Speed control
Origin
(continuous mode) search
Pulse
Pulse output with accelPulse
Pulse
output
eration/deceleration
output
output
without
without
with
TrapezoiTrapezoiaccelera- dal, equal dal, sepa- accelera- acceleration/
tion/
tion/
accelerarate
decelera- tion/ decel- accelera- decelera- deceleration
tion
tion
eration
tion/ decelrates
eration
rates
PULS(886)
SET PULSES
Sets the number of pulses
to be output.
Used
---
---
---
---
---
SPED(885)
SPEED OUTPUT
Performs pulse output con- Used
trol without acceleration or
deceleration.
(When positioning, the
number of pulses must be
set in advance with
PULS(886).)
Performs pulse output con- --trol with acceleration and
deceleration.
(When positioning, the
number of pulses must be
set in advance with
PULS(886).)
---
---
Used
---
---
Used
---
---
Used
---
Performs pulse output con- --trol with independent
acceleration and deceleration rates.
(Also sets the number of
pulses.)
---
Used
---
---
---
---
---
---
---
---
Used
Used
Used
Used
Used
Used
---
Reads the pulse output PV. Used
Used
Used
Used
Used
---
Performs pulse output con- --trol with variable duty factor pulse output.
---
---
---
---
---
ACC(888)
ACCELERATION
CONTROL
PLS2(887)
PULSE OUTPUT
ORG(889)
ORIGIN SEARCH
Actually moves the motor
with pulse outputs and
determines the machine
origin based on the Origin
Proximity Input and Origin
Input signals
INI(880)
Stops the pulse output.
MODE CONTROL Changes the pulse output
PV. (This operation determines the origin location.)
PRV(881)
HIGH-SPEED
COUNTER PV
READ
PWM(891)
PULSE WITH
VARIABLE DUTY
FACTOR
242
Section 5-2
Pulse Outputs
SET PULSES: PULS(886)
PULS(886) is used to set the pulse output amount (number of output pulses)
for pulse outputs that are started later in the program using SPED(885) or
ACC(888) in independent mode.
PULS(886)
SPEED OUTPUT:
SPED(885)
P
P: Port specifier
T
T: Pulse type
N
N: Number of pulses
P
Operand
Port specifier
Contents
T
Pulse type
N
First number
N and N+1 contain the number of pulses setting. (N contains
of pulses word the rightmost 4 digits and N+1 contains the leftmost 4 digits.)
Relative pulse output:
0000 0000 to 7FFF FFFF hex (0 to 2,147,483,647)
Absolute pulse output:
8000 0000 to 7FFF FFFF hex (-2,147,483,648 to
2,147,483,647)
0000 hex: Pulse output 0
0001 hex: Pulse output 1
0000 hex: Relative pulse output
0001 hex: Absolute pulse output
SPED(885) can be used to perform pulse output without acceleration or
deceleration. Either independent mode positioning or continuous mode speed
control is possible. For independent mode positioning, the number of pulses is
set using PULS(886).
SPED(885) can also be executed during pulse output to change the output
frequency, creating stepwise changes in the speed.
SPED(885)
P
P: Port specifier
T
T: Output mode
F
F: First pulse frequency word
Operand
P
Port specifier
T
Output
mode
Bits 0 to 3
Bits 4 to 7
Contents
0000 hex: Pulse output 0
0001 hex: Pulse output 1
Mode
0 hex: Continuous
1 hex: Independent
Direction
0 hex: CW
1 hex: CCW
Bits 8 to 11
Pulse output method (See note.)
0 hex: CW/CCW
1 hex: Pulse + direction
Bits 12 to 15 Not used. (Always 0 hex.)
F
First pulse frequency
word
F and F+1 contain the pulse frequency setting, in units of
1 Hz. (F contains the rightmost 4 digits and F+1 contains
the leftmost 4 digits.)
0000 0000 to 0001 86A0 hex (0 Hz to 100 kHz)
J models: 0000 0000 to 0000 4E20 hex (0Hz to 20kHz)
243
Section 5-2
Pulse Outputs
ACCELERATION
CONTROL: ACC(888)
Use ACC(888) to set the target frequency and acceleration and deceleration
rate and output pulses with acceleration and deceleration. (Acceleration rate
is the same as the deceleration rate.)
Either independent mode positioning or constant mode speed control is possible when used in combination with PULS(886). ACC(888) can also be executed during pulse output to change the target frequency or acceleration/
deceleration rate, enabling smooth (sloped) speed changes.
ACC(888)
P
P: Port specifier
M
M: Output mode
S
S: First word of settings table
Operand
P
Port specifier
M
Output
mode
S
Contents
Bits 0 to 3
Bits 4 to 7
Direction
0 hex: CW
1 hex: CCW
Bits 8 to 11
Pulse output method (See note.)
0 hex: CW/CCW
1 hex: Pulse + direction
Bits 12 to 15 Not used. (Always 0 hex.)
S
Acceleration/deceleration rate:
0001 to FFFF hex (1 to 65,535 Hz)
Specify the increase or decrease in the frequency per
pulse control period (4 ms).
First
settings
table
word
S+1 and
S+2
PULSE OUTPUT:
PLS2(887)
0000 hex: Pulse output 0
0001 hex: Pulse output 1
Mode
0 hex: Continuous
1 hex: Independent
S and S+1 contain the target frequency setting, in units
of 1 Hz. (S+1 contains the rightmost 4 digits and S+2
contains the leftmost 4 digits.)
0000 0000 to 0001 86A0 hex (0 Hz to 100 kHz)
J models: 0000 0000 to 0000 4E20 hex (0Hz to 20kHz)
Use PLS2(887) to set the startup frequency, acceleration rate, and deceleration rate, and output a specified number of pulses. Only independent mode
positioning is supported.
PLS2(887) can also be executed during pulse output to change the number of
output pulses, target frequency, acceleration rate, or deceleration rate.
PLS2(887)
244
P
P: Port specifier
M
M: Output mode
S
S: First word of settings table
F
F: First word of starting frequency
Section 5-2
Pulse Outputs
P
M
Operand
Port specifier
Output
mode
Bits 0 to 3
Bits 4 to 7
Bits 8 to 11
S
S+2 and
S+3
S+4 and
S+5
ORIGIN SEARCH:
ORG(889)
Pulse output method (See note.)
0 hex: CW/CCW
1 hex: Pulse + direction
Bits 12 to 15 Not used. (Always 0 hex.)
S
Acceleration rate:
0001 to FFFF hex (1 to 65,535 Hz)
Specify the increase or decrease in the frequency per
pulse control period (4 ms).
First
settings
table
word
S+1
F
Contents
0000 hex: Pulse output 0
0001 hex: Pulse output 1
Mode
0000 hex: Relative pulse output
0001 hex: Absolute pulse output
Direction
0 hex: CW
1 hex: CCW
First starting frequency word
Deceleration rate:
0001 to FFFF hex (1 to 65,535 Hz)
Specify the increase or decrease in the frequency per
pulse control period (4 ms).
S+2 and S+3 contain the target frequency setting, in
units of 1 Hz. (S+2 contains the rightmost 4 digits and
S+3 contains the leftmost 4 digits.)
0000 0000 to 0001 86A0 hex (0 Hz to 100 kHz)
J models: 0000 0000 to 0000 4E20 hex (0Hz to 20kHz)
S+4 and S+5 contain the number of pulses setting. (S+4
contains the rightmost 4 digits and S+5 contains the leftmost 4 digits.)
Relative pulse output:
0000 0000 to 7FFF FFFF hex (0 to 2,147,483,647)
Absolute pulse output:
8000 0000 to 7FFF FFFF hex (-2,147,483,648 to
2,147,483,647)
F and F+1 contain the starting frequency setting, in units
of 1 Hz. (F contains the rightmost 4 digits and F+1 contains the leftmost 4 digits.)
0000 0000 to 0001 86A0 hex (0 Hz to 100 kHz)
J models: 0000 0000 to 0000 4E20 hex (0Hz to 20kHz)
ORG(889) performs an origin search or origin return operation. The required
PLC Setup parameters must be set before performing an origin search or origin return operation.
Origin Search
Positions the system to the origin based on the origin proximity input and origin input signals.
Origin Return
Returns the system from its present position to the pre-established origin.
ORG(889)
P
P: Port specifier
C
C: Control data
245
Section 5-2
Pulse Outputs
Operand
Port specifier
P
C
Control
data
Bits 0 to 3
Contents
0000 hex: Pulse output 0
0001 hex: Pulse output 1
Not used. (Always 0 hex.)
Bits 4 to 7
Bits 8 to 11
Not used. (Always 0 hex.)
Pulse output method (See note.)
0 hex: CW/CCW
1 hex: Pulse + direction
Bits 12 to 15 Mode
0 hex: Origin search
1 hex: Origin return
MODE CONTROL: INI(880)
In addition to the various interrupt and high-speed counter functions, INI(880)
can be used to change the pulse output PV or stop the pulse output.
Note
This section explains the functions related to pulse outputs only. For details on
the INI(880) instruction’s high-speed counter or interrupt functions, refer to 6-1
Interrupt Functions or 5-1 High-speed Counters.
INI(880)
P
P: Port specifier
C
C: Control data
NV
NV: First word of new PV
Operand
HIGH-SPEED COUNTER
PV READ: PRV(881)
Contents
P
Port specifier
C
Control data
NV
First word of new PV
0000 hex: Pulse output 0
0001 hex: Pulse output 1
1000 hex: PWM output 0
1001 hex: PWM output 1
0002 hex: Change the PV.
0003 hex: Stop pulse output.
NV and NV+1 contain the new PV when changing the
PV. (N contains the rightmost 4 digits and N+1 contains the leftmost 4 digits.)
0000 0000 to FFFFFFFF hex
In addition to its interrupt and high-speed counter functions, PRV(881) can be
used to read the pulse output PV or pulse output status information.
The status of the following flags is read as status information:
• Pulse Output Status Flag
• PV Underflow/Overflow Flag
• Pulse Output Amount Set Flag
• Pulse Output Completed Flag
• Pulse Output Flag
• No-origin Flag
• At Origin Flag
• Pulse Output Stopped Error Flag
PRV(881)
246
P
P: Port specifier
C
C: Control data
D
D: First destination word
Section 5-2
Pulse Outputs
Note
This section explains the functions related to pulse outputs only. For details on
the PRV(881) instruction’s high-speed counter or interrupt functions, refer to
6-1 Interrupt Functions or 5-1 High-speed Counters.
Operand
P
Port specifier
C
Control data
D
First
destination
word
Contents
0000 hex: Pulse output 0
0001 hex: Pulse output 1
1000 hex: PWM output 0
1001 hex: PWM output 1
0000 hex: Read the PV.
0001 hex: Read the status.
0003 hex: Read the pulse output frequency.
Reading PV After the pulse output PV is read, the 8-digit hexadecimal
(D and D+1) data is stored in D and D+1. (D contains the rightmost 4
digits and D+1 contains the leftmost 4 digits.)
Reading
Bit 0
pulse output
status
(D)
Bit 1
Bit 2
Bit 3
Pulse Output Status Flag
0: Constant speed
1: Accelerating/decelerating
PV Underflow/Overflow Flag
0: Normal
1: Error
Pulse Output Amount Set Flag
0: Not set
1: Set
Pulse Output Completed Flag
0: Output not completed
1: Output completed
Bit 4
Pulse Output Flag
0: Stopped
1: Outputting pulses
Bit 5
No-origin Flag
0: Origin established
1: Origin not established
Bit 6
At Origin Flag
0: Not stopped at origin
1: Stopped at origin
Bit 7
Pulse Output Stopped Error Flag
0: No error
1: Pulse output stopped due to error
Bits 8 to 15 Not used.
Reading
Bit 0
PWM output
status (D)
PWM Output Flag
0: Stopped
1: Outputting pulses
Bits 1 to 15 Not used.
PULSE WITH VARIABLE
DUTY FACTOR: PWM(891)
PWM(891) is used to output pulses with the specified duty factor.
PWM
P
P: Port specifier
F
F: Frequency
D
D: Duty factor
247
Section 5-2
Pulse Outputs
Combinations of
Pulse Control
Instructions
P
Operand
Port specifier
Contents
0000 hex: Pulse output 0 (duty factor set in 1% units, frequency 0.1 Hz units)
0001 hex: Pulse output 1 (duty factor set in 1% units, frequency 0.1 Hz units)
1000 hex: Pulse output 0 (duty factor set in 0.1% units,
frequency 0.1 Hz units)
1001 hex: Pulse output 1 (duty factor set in 0.1% units,
frequency 0.1 Hz units)
0100 hex: Pulse output 0 (duty factor set in 1% unit, frequency 1 Hz units)
0101 hex: Pulse output 1 (duty factor set in 1% unit, frequency 1 Hz units)
1100 hex: Pulse output 0 (duty factor set in 0.1% unit,
frequency 1 Hz units)
1101 hex: Pulse output 1 (duty factor set in 0.1% unit,
frequency 1 Hz units)
T
Frequency
0001 to FFFF hex (0.1 to 6553.5 Hz, in 0.1 Hz units)
0001 to 8020 hex (1 to 32,800 Hz, in 1 Hz units)
S
Duty factor
Specify the duty factor of the pulse output, i.e., the percentage of time that the output is ON.
0000 to 03E8 hex: 0.0% to 100.0% (in 0.1 units)
0000 to 0064 hex: 0.0% to 100% (in 1% units)
The following tables show when a second pulse control instruction can be
started if a pulse control operation is already being executed.
Generally, a second independent-mode positioning instruction can be started
if an independent-mode positioning instruction is being execute, and a second
continuous-mode speed control instruction can be started if a continuousmode speed control instruction is being executed. Operation cannot be
switched between the independent and continuous modes, although
PLS2(887) can be started while ACC(888) (continuous mode) is being executed.
It is possible to start another operation during acceleration/deceleration and
start another positioning instruction during positioning.
Instruction being executed
Starting instruction
(❍ : Can be executed., ×: Instruction Error occurs and Error Flag goes ON)
INI(880)
SPED(885)
SPED(885)
ACC(888)
ACC(888)
(Independent) (Continuous) (Independent) (Continuous)
PLS2(887)
ORG(889)
SPED(885) (Independent)
❍
❍ (note 1)
×
❍ (note 3)
×
×
×
SPED(885) (Continuous)
❍
×
❍ (note 2)
×
❍ (note 5)
×
×
ACC(888)
(Independent)
Steady speed
❍
×
×
❍ (note 4)
×
❍ (note 6)
×
Accelerating or
decelerating
❍
×
×
❍ (note 4)
×
❍ (note 6)
×
ACC(888)
(Continuous)
Steady speed
❍
×
×
×
❍ (note 5)
❍ (note 7)
×
Accelerating or
decelerating
❍
×
×
×
❍ (note 5)
❍ (note 7)
×
PLS2(887)
Steady speed
❍
×
×
❍ (note 4)
×
❍ (note 8)
×
Accelerating or
decelerating
❍
×
×
❍ (note 4)
×
❍ (note 8)
×
Steady speed
❍
×
×
×
×
×
×
Accelerating or
decelerating
❍
×
×
×
×
×
×
❍
×
×
×
×
×
×
ORG(889)
PWM
Note
248
(1) SPED(885) (Independent) to SPED(885) (Independent)
Section 5-2
Pulse Outputs
• The number of pulses cannot be changed.
• The frequency can be changed.
• The output mode and direction cannot be switched.
(2) SPED(885) (Continuous) to SPED(885) (Continuous)
• The frequency can be changed.
• The output mode and direction cannot be switched.
(3) SPED(885) (Independent) to ACC(888) (Independent)
• The number of pulses cannot be changed.
• The frequency can be changed.
• The acceleration/deceleration rate can be changed.
• The output mode and direction cannot be switched.
(4) ACC(888) (Independent) to ACC(888) (Independent)
or PLS2(887) to ACC(888) (Independent)
• The number of pulses cannot be changed.
• The frequency can be changed.
• The acceleration/deceleration rate can be changed. (The rate can
even be changed during acceleration or deceleration.)
• The output mode and direction cannot be switched.
(5) SPED(885) (Continuous) to ACC(888) (Continuous)
or ACC(888) (Continuous) to ACC(888) (Continuous)
• The frequency can be changed. (The target frequency can even be
changed during acceleration or deceleration.)
• The acceleration/deceleration rate can be changed. (The rate can
even be changed during acceleration or deceleration.)
• The output mode and direction cannot be switched.
(6) ACC(888) (Independent) to PLS2(887)
• The number of pulses can be changed. (The setting can even be
changed during acceleration or deceleration.)
• The frequency can be changed. (The target frequency can even be
changed during acceleration or deceleration.)
• The acceleration/deceleration rate can be changed. (The rate can
even be changed during acceleration or deceleration.)
• The output mode and direction cannot be switched.
(7) ACC(888) (Continuous) to PLS2(887)
• The frequency can be changed. (The target frequency can even be
changed during acceleration or deceleration.)
• The acceleration/deceleration rate can be changed. (The rate can
even be changed during acceleration or deceleration.)
• The output mode and direction cannot be switched.
(8) PLS2(887) to PLS2(887)
• The number of pulses can be changed. (The setting can even be
changed during acceleration or deceleration.)
• The frequency can be changed. (The target frequency can even be
changed during acceleration or deceleration.)
• The acceleration/deceleration rate can be changed. (The rate can
even be changed during acceleration or deceleration.)
• The output mode and direction cannot be switched.
249
Section 5-2
Pulse Outputs
5-2-9
Variable Duty Factor Pulse Outputs (PWM(891) Outputs)
Overview
PWM (Pulse Width Modulation) pulse outputs can be output with a specified
duty factor. The duty factor is the ratio of the pulse's ON time and OFF time in
one pulse cycle. Use the PWM(891) instruction to generate variable duty factor pulses from a built-in output.
The duty factor can be changed while pulses are being output.
Bit Allocations
Word
CIO 100
01
Bit
Function
PWM output 0
03
PWM output 1
Procedure
Determine the pulse output port.
• PWM output 0 or PWM output 1
Wire the outputs.
• Enable/disable the origin search function.
PLC Setup settings
Execute PWM(891).
Ladder program
Specifications
Item
Duty factor
Output mode
Specifications
0.0% to 100.0% in 0.1% increments
(Duty factor accuracy is +1%/−0% at10 kHz, +5%/−0% at
10 to 32.8 kHz .)
0.1 Hz to 6,553.5 Hz
Set in 0.1 Hz units. (See note.)
Continuous mode
Instruction
PWM(891)
Frequency
Note
250
The frequency can be set up to 6553.5 Hz in the PWM(891) instruction, but
the duty factor accuracy declines significantly at high frequencies because of
limitations in the output circuit at high frequencies.
Section 5-2
Pulse Outputs
5-2-10 Example Pulse Output Applications
Outputting Pulses after a Preset Delay
This example program waits for a preset time (0.5 ms) after the interrupt input
(CIO 0.04) goes ON and then outputs 100,000 pulses at 100 kHz from pulse
output 0.
Input interrupt task 0 (interrupt task number 140) starts a scheduled interrupt
with a scheduled time of 0.5 ms. The scheduled interrupt task executes the
pulse output instructions and stops the scheduled interrupt.
Pulse output 0
(CIO 100.00)
I/O interrupt
response time
MSKS
Scheduled interrupt
time 500 µs
PULS SPED
Interrupt input 0
(CIO 0.04)
Instructions Used
MSKS(690)
Enables the I/O interrupt. Starts the scheduled interrupt.
PULS(886)
Sets the number of output pulses.
SPED(885)
Starts the pulse output.
Preparation
■ PLC Setup
Built-in Input Settings
PLC Setup setting details
Use built-in input 0.04 as the interrupt input.
251
Section 5-2
Pulse Outputs
Pulse Output 0 Settings
PLC Setup setting details
Do not use high-speed counter 0.
Do not use the pulse output 0 origin search function.
Scheduled Interrupt Time Unit Setting
PLC Setup setting details
Set the scheduled interrupt time units to 0.1 ms.
252
Data
0002 hex
Section 5-2
Pulse Outputs
Ladder Program
Cyclic Task (Task 0)
P_First_Cycle_Task
MSKS(690)
Task Start Flag
Built-in interrupt input 0
(IN0.04)
Unmask (Enable
interrupts.)
0100
#0000
Built-in Input 0 Interrupt Task (Interrupt Task 140)
A280.04
MSKS(690)
Pulse Output 0
Output In-progress
Flag
Scheduled interrupt 2
(Reset start)
Scheduled interrupt time
(5 x 0.1 ms* = 0.5 ms)
0014
#0005
* Select 0.1 ms for the setting units in the PLC Setup.
Scheduled Interrupt Task 0 (Interrupt Task 2)
P_On
PULS(886)
Always ON
Flag
#0000
Pulse output 0
#0000
Relative pulse
specification
&100000
Number of output pulses
(100,000 pulses)
SPED(885)
#0000
#0001
&100000
Pulse output 0
Specifies CW/CCW outputs,
CW direction, and
independent mode.
Target frequency
(100,000 Hz)
MSKS(690)
0014
#0000
Scheduled interrupt 0
Stop scheduled interrupt
253
Section 5-2
Pulse Outputs
Positioning (Trapezoidal Control)
Specifications and
Operation
When the start input (0.00) goes ON, this example program outputs 600,000
pulses from pulse output 0 and turns the motor.
50,000 Hz
Target frequency
Acceleration rate
300 Hz/4 ms
Number of
output pulses
600,000 pulses
Starting frequency
100 Hz
Deceleration rate
200 Hz/4 ms
Start input (0.00)
Instructions Used
PLS2(887)
Preparation
■ PLC Setup
There are no settings that need to be made in the PLC Setup.
DM Area Settings
PLS2(887) Settings (D00000 to D00007)
Setting details
Acceleration rate: 300 Hz/4 ms
Address
D0
Data
012C
Deceleration rate: 200 Hz/4 ms
Target frequency: 50,000 Hz
D1
D2
00C8
C350
Number of output pulses: 600,000 pulses
D3
D4
0000
27C0
Starting frequency: 100 Hz
D5
D6
0009
0064
D7
0000
Ladder Program
0.00
@PLS2 (887)
Start input
#0001
Pulse output 1
#0000
Specifies CW/CCW output method,
CW side, and relative pulses
Target frequency, number of
pulses setting
D0
D6
Starting frequency
END(001)
Remarks
• Absolute pulses can be specified when the origin position has been determined.
• If a target frequency that cannot be reached has been set, the target frequency will be reduced automatically, i.e., triangular control will be performed. In some cases where the acceleration rate is substantially greater
than the deceleration rate, the operation won't be true triangular control.
The motor will be operated at a constant speed for a short time between
the acceleration and deceleration.
254
Section 5-2
Pulse Outputs
Jog Operation
Specifications and
Operation
• Low-speed jog operation (CW) will be executed from pulse output 1 while
input 0.00 is ON.
• Low-speed jog operation (CCW) will be executed from pulse output 1
while input 0.01 is ON.
Target frequency
1,000 Hz
CW Low-speed
JOG (0.00)
CCW Low-speed
JOG (0.01)
• High-speed job operation (CW) will be executed from pulse output 1 while
input 0.04 is ON.
• High-speed jog operation (CCW) will be executed from pulse output 1
while input 0.05 is ON.
Target frequency
100,000 Hz
Acceleration/deceleration rate
100 Hz/4 ms
Acceleration/deceleration rate
100 Hz/4 ms
CW High-speed jog
(0.04)
CCW high-speed
jog (0.05)
Instructions Used
SPED(885) Starts and stops (immediate stop) the low-speed jog operations.
ACC(888)
Starts and stops (decelerate to a stop) the high-speed jog operations.
Preparation
■ PLC Setup
There are no settings that need to be made in the PLC Setup.
255
Section 5-2
Pulse Outputs
DM Area Settings
Settings to Control Speed while Jogging
(D0 to D1 and D10 to D15)
Setting details
Target frequency (low speed): 1,000 Hz
Address
D0
Data
03E8
Acceleration rate: 100 Hz/4 ms
D1
D10
0000
0064
Target frequency (high speed): 100,000 Hz
D011
D12
86A0
0001
Deceleration rate: 100 Hz/4 ms (Not used.)
Target frequency (stop): 0 Hz
D13
D14
0064
0000
D15
0000
Ladder Program
0.00
A281.04
SPED(885)
Low-speed
CW Start
Pulse Output
in Progress
#0001
#0000
D0
Pulse output 1
Specifies CW/CCW output method,
CW side, and continuous mode.
Target frequency
SET W0.00
W0.00
0.00
SPED(885)
Low-speed
CW output in
progress
Low-speed
CW Start
#0001
#0000
#0000
RSET W0.00
0.01
A281.04
SPED(885)
Low-speed
CCW Start
Outputting
Pulses
#0001
#0010
D0
SET W0.01
W0.01
0.01
SPED(885)
Low-speed
CCW output
in progress
Low-speed
CCW Start
#0001
#0010
#0000
RSET W0.01
256
Pulse output 1
Specifies CW/CCW output method,
CW side, and continuous mode.
Target frequency
Section 5-2
Pulse Outputs
0.04
A281.04
ACC(888)
High-speed
CW Start
Pulse Output
in Progress
#0001
#0000
D10
Pulse output 1
Specifies CW/CCW output method,
CW side, and continuous mode.
Acceleration rate and target frequency
SET W0.02
W0.02
0.04
ACC(888)
High-speed
CW output in
progress
High-speed
CW Start
#0001
#0000
D13
RSET W0.02
0.05
A281.04
ACC(888)
High-speed
CCW Start
Pulse Output
in Progress
#0001
#0010
D00010
Pulse output 1
Specifies CW/CCW output method,
CW side, and continuous mode.
Acceleration rate and target frequency
SET W0.03
W0.03
0.05
ACC(888)
High-speed
CCW output
in progress
High-speed
CCW Start
#0001
#0010
D13
RSET W0.03
END(001)
Remarks
PLS2(887) can be used to set a starting frequency or unequal acceleration
and deceleration rates, but there are limitations on the operating range
because the end point must be specified in PLS2(887).
Cutting Long Material Using Fixed Feeding
Specifications and
Operation
■ Outline
In this example, first jogging is used to position the material and then fixeddistance positioning is used to feed the material.
1,000 Hz
(03E8 hex)
Jogging
10,000 Hz
(2710 hex)
Acceleration: 1,000 Hz/4 ms
(03E8 hex)
50000
(C350 hex)
CW
Fixed-distance
feeding
Material cut
with cutter
Material cut
with cutter
Material cut
with cutter
257
Section 5-2
Pulse Outputs
■ System Configuration
Jogging switch
IN 0.00
Positioning switch
IN 0.01
Cutter start
OUT 100.02
Emergency stop switch
IN 0.03
Cutter finished
IN 0.02
Pulse output (CW/CCW)
Cut operation finished
OUT 100.03
Built-in I/O other than pulse outputs are used.
■ Operation
1,2,3...
1. The workpiece is set at the starting position using the Jogging Switch Input
(IN 0.00).
2. The workpiece is feed the specified distance (relative) using the Positioning Switch Input (IN 0.01).
3. When feeding has been completed, the cutter is activated using the Cutter
Start Output (OUT 100.02).
4. Feeding is started again when the Cutter Finished Input (IN 0.02) turns
ON.
5. The feeding/cutting operation is repeated for the number of times specified
for the counter (C0, 100 times).
6. When the operation has been completed, the Cutting Operation Finished
Output (OUT 100.03). is turned ON.
The feeding operation can be canceled and operation stopped at any point
using the Emergency Switch Input (IN 0.03).
Instructions Used
SPED(885)
PLS2(887)
Preparation
■ PLC Setup
There are no settings that need to be made in the PLC Setup.
■ DM Area Settings
Speed Settings for Jogging (D0 to D3)
258
Setting details
Target frequency: 1,000 Hz
Address
D0
Data
03E8
Target frequency: 0 Hz
D1
D2
0000
0000
D3
0000
Section 5-2
Pulse Outputs
Settings for PLS2(887) for Fixed-distance Feeding (D10 to D20)
Setting details
Acceleration rate: 1,000 Hz/4 ms
Address
D10
Data
03E8
Deceleration rate: 1,000 Hz/4 ms
Target frequency: 10,000 Hz
D11
D12
03E8
2710
Number of output pulses: 50,000 pulses
D13
D14
0000
C350
Starting frequency: 0000 Hz
D15
D16
0000
0000
Counter setting: 100 times
D17
D20
0000
0100
Ladder Program
Jog Operation
0.00
A280.04
Jogging
Switch
Pulse Output
In-Progress
Flag
SPED(885)
#0000
#0000
D0
SET W0.00
0.00
W0.00
Jogging
Switch
Jogging
Flag
Target frequency:
1,000 Hz
Jogging Flag
SPED(885)
#0000
#0000
D2
RSET W0.00
Target frequency:
0Hz
Jogging Flag
Fixed-distance Feed
0.01
@PLS2(887)
Positioning
Switch
#0000
#0000
0.02
D10
D16
Cutter
Finished
A280.03
100.02
Cutter activated
Pulse Output
Completed Flag
Counting Feed Operations
A280.03
CNT
Pulse Output
Completed Flag
0000
0.01
D20
Positioning
Switch
C0000
100.03
Cutting Operation
Finished
0.03
INI(880)
Emergency
Stop
#0000
#0003
0
259
Section 5-2
Pulse Outputs
Remarks
1,2,3...
1. PLS22(887) used a relative pulse setting. This enables operation even if
the origin is not defined. The present position in A276 (lower 4 digits) and
A277 (upper 4 digits) is set to 0 before pulse output and then contains the
specified number of pulses.
2. ACC(888) can be used instead of SPED(885) for the jog operation. If
ACC(888) is used, acceleration/deceleration can be included in the jog operation.
Vertically Conveying PCBs (Multiple Progressive Positioning)
Specifications and
Operation
■ Outline
1,2,3...
1. PCBs with components mounted are stored in a stocker.
2. When a stocker becomes full, it is moved to the conveyance point.
Positioning Operation for Vertical Conveyor
Stocker conveyance
position
(2)
(3)
From mounter
(1)
■ Operation Pattern
1,2,3...
1. An origin search is performed.
2. Fixed-distance positioning is repeated.
3. The system is returned to the original position.
CCW
limit
Origin
(servo
phase Z)
CW
limit
Origin
proximity
1. Origin search
CCW
CW
2. Fixed-distance
positioning repeated
50,000 Hz
(C350 hex)
10000
(2710 hex)
PCB storage
enabled
260
Acceleration/
deceleration:
1,000 Hz/4 ms
(03E8 hex)
3. Return to start
CCW
PCB storage
completed
Stocker
moved
Stocker
movement
completed
CW
Section 5-2
Pulse Outputs
Wiring Example Using SmartStep A-series Servo Driver
Origin Search Switch (CIO 0.00)
Emergency Stop Switch (CIO 0.01)
Stocker Moving (CIO 100.02)
PCB Storage Completed (CIO 0.03)
PCB Storage Enable (CIO 100.03)
Stocker Movement Completed (CIO 0.04)
SmartStep A-series
Servo Driver
[email protected] and resistor
SMARTSTEP A-series Servo Driver
CP1L-M60/40/30DT-D, CP1L-20DT-D
[email protected]
Power Supply Terminal
24-VDC power supply (+)
24-VDC power supply (-)
Output Terminal Block
1.6 kΩ
Pulse CW output (CIO 100.00)
output
0
CCW output (CIO 100.01)
1.6 kΩ
1
2
3
4
+CW
−CW
+CCW
−CCW
1.6 kΩ
5
6
+ECRST
−ECRST
8
33
32
13
INP
ZCOM
Z
+24VIN
14
18
10
RUN
RESET
OGND
34
35
7
ALM
ALMCOM
BKIR
Shell
FG
Deviation counter reset output 0 (CIO 100.04)
COM (CIO 100)
Stocker moving (CIO 100.02)
PCB storage enable (CIO 100.03)
Input Terminal Block
Pulse 0 origin input signal (CIO 0.06)
COM
24 VDC
Servo Driver
RUN input
X1
Pulse 0 origin proximity input signal (CIO 0.10)
Origin search switch (CIO 0.00)
Emergency stop switch (CIO 0.01)
PCB storage completed (CIO 0.03)
Stocker movement completed (CIO 0.04)
Servo Driver
alarm reset input
X1
24 VDC
XB
Operation
1,2,3...
1. An origin search is performed using the Origin Search Switch (CIO 0.00).
2. When the origin search is finished, the PCB Storage Enabled Output
(CIO 100.03) is turned ON.
3. When a PCB has been stored, the stocker is raised (relative positioning)
using the PCB Storage Completed Input (CIO 0.03).
4. Storing PCBs is repeated until the stocker is full.
5. The number of PCBs in the stocker is counted with counter C0 by counting
the number of times the stocker is raised.
6. When the stocker is full, it is moved (CIO 100.02) and only the conveyor is
lowered (absolute positioning) when stoker movement is completed (CIO
0.04).
261
Section 5-2
Pulse Outputs
The operation can be canceled and pulse output stopped at any point using
the Emergency Switch Input (CIO 0.01).
Preparation
■ PLC Setup
Setting details
Enable origin search function for pulse output 0.
Note The origin search enable setting is read when the power supply is turned ON.
DM Area Settings
Settings for PLS2(887) for Fixed-distance Positioning (D0 to D7)
Setting details
Address
Data
Acceleration rate: 1,000 Hz/4 ms
Deceleration rate: 1,000 Hz/4 ms
D0
D1
03E8
03E8
Target frequency: 50,000 Hz
D2
D3
C350
0000
Number of output pulses: 10,000 pulses
D4
D5
2710
0000
Starting frequency: 0 Hz
D6
D7
0000
0000
Settings for PLS2(887) to Return to Start (D10 to D17)
Setting details
262
Address
Data
Acceleration rate: 300 Hz/4 ms
Deceleration rate: 200 Hz/4 ms
D10
D11
012C
00C8
Target frequency: 50,000 Hz
D12
D13
C350
0000
Number of output pulses: 10,000 × 15 pulses
D14
D15
49F0
0002
Starting frequency: 100 Hz
D16
D17
0000
0000
Section 5-2
Pulse Outputs
Number of Repeats of Fixed-distance Positioning Operation (D20)
Setting details
Address
Number of repeats of fixed-distance positioning operation D20
(number of PCBs in stocker)
Data
0015
Ladder Program
Jog Operation
0.00
W0.01
Origin
Search
Switch
Origin
Search
Completed
W0.00
Origin Search in
progress
ORG(889)
W0.00
#0000
#0000
Origin
Search in
progress
A280.05
W0.01
Origin Search
Completed
No Origin
Flag
W0.01
W0.02
Origin Search
Completed
Lift
positioning
start
W0.05
100.03
PCB Storage
enabled
PCB
Stored
0.03
W0.02
Lift positioning
start
PCB
storage
completed
100.03
PCB
Storage enabled
Positioning
Lift 10,000 pulses (relative) at a time
W0.02
Lift
positioning
start
W0.03
W0.03
W0.04
Lift positioning in
progress
Lift
positioning
completed
@PLS2(887)
#0000
#0000
Lift
positioning
in
progress
D0
D6
A280.03
W0.04
Lift positioning
completed
Pulse Output
Completed Flag
Counter for Number of Lifts (Number of PCBs stored)
W0.04
CNT
Lift positioning
completed
W0.09
0000
#0100
Lower
positioning
completed
263
Section 5-2
Pulse Outputs
When the stocker is not full (C0=OFF), store PCB,
and repeat lift positioning after PCB storage is completed.
W0.04
W0.05
C0000
PCB Stored
Lift
Stocker
positioning
full
completed
When the stocker is full (C0=ON), move the stocker,
and start lower positioning after stocker movement is completed.
W0.04
C0000
Lift
positioning
completed
Stocker
full
W0.06
Stocker Moving
W0.06
Stocker
Moving
100.02
100.02
W0.07
Stocker moving
output
Lower
positioning
start
W0.07
0.04
Stocker
moving
output
Lower positioning
start
Stocker
movement
completed
Positioning
Lower to "0" position (absolute pulses)
W0.07
Lower
positioning
start
W0.08
W0.08
W0.09
Lower positioning
in progress
Lower
positioning
start
@PLS2(887)
#0000
#0001
Lower
positioning
in progress
D10
D16
A280.03
W0.09
Lower positioning
completed
Pulse
output
completed
Emergency Stop (Pulse Output Stopped)
0.01
@INI(880)
Emergency
stop
switch
#0000
#0003
0
Repeat Limit Input Settings
Limit inputs are allocated to external sensors using the following programming.
0.05
A540.08
CW limit input
signal
Built-in
input
0.07
Built-in
input
264
A540.09
CCW limit input
signal
Section 5-2
Pulse Outputs
Palletize: Two-axis Multipoint Positioning
Specifications and
Operation
■ Outline
Y axis
X axis
Cylinder
Workpieces grasped
and moved.
■ Operation Pattern
1,2,3...
1. An origin search is performed.
2. A workpiece is grasped and moved to position A.
3. The workpiece is grasped at one position and moved back and forth to several assembly positions.
1. Origin search
50000
30000
Y axis (CW) (C350 hex)
(7530 hex)
5000
(1388 hex)
Origin
2. Move to
position A.
B
C
D
3. Move back and
forth to several
positions.
25000
(61A8 hex)
1. Origin search
5000
(1388 hex)
A
35000
(88B8 hex)
X axis (CW)
Note The X and Y axes are moved independently, i.e., interpolation is not performed.
265
Section 5-2
Pulse Outputs
Wiring Example Using SmartStep A-series Servo Driver
Origin Search Switch (CIO 0.00)
Emergency Stop Switch (CIO 0.01)
SMARTSTEP A-series Servo Driver
X axis
[email protected] and resistor
Y axis
SMARTSTEP A-series Servo Driver
[email protected] and resistor
266
Section 5-2
Pulse Outputs
X Axis
CP1L-M60/40/30DT-D, CP1L-L20DT-D
SMARTSTEP A-series Servo Driver
[email protected]
Power Supply Terminal
24-VDC power supply (+)
24-VDC power supply (-)
Output Terminal Block
1.6 kΩ
CW output (CIO 100.00)
Pulse
output
CCW output (CIO 100.01)
0
1.6 kΩ
1.6 kΩ
Deviation counter reset output 0 (CIO 100.04)
1
2
3
4
+CW
−CW
+CCW
−CCW
5
6
+ECRST
−ECRST
8
33
32
13
INP
ZCOM
Z
24VIN
14
18
10
RUN
RESET
OGND
34
35
7
ALM
ALMCOM
BKIR
Shell
FG
COM (CIO 100)
Input Terminal Block
Pulse 0 origin input signal (CIO 0.06)
COM
24 VDC
Servo Driver
RUN input
X1
Pulse 0 origin proximity input signal (CIO 0.10)
Servo Driver
alarm reset input
Origin search switch (CIO 0.00)
Emergency stop switch (CIO 0.01)
X1
24 VDC
XB
Y Axis
CP1L-M60/40/30DT-D, CP1L-L20DT-D
SMARTSTEP A-series Servo Driver
[email protected]
Power Supply Terminal
24-VDC power supply (+)
24-VDC power supply (-)
Output Terminal Block
1.6 kΩ
1.6 kΩ
1
2
3
4
+CW
−CW
+CCW
−CCW
1.6 kΩ
5
6
+ECRST
−ECRST
8
33
32
13
INP
ZCOM
Z
24VIN
14
18
10
RUN
RESET
OGND
34
35
7
ALM
ALMCOM
BKIR
Shell
FG
CW output (CIO 100.02)
Pulse
output CCW output (CIO 100.03)
1
Deviation counter reset output 1 (CIO 100.05)
COM (CIO 100)
Input Terminal Block
Pulse 1 origin input signal (CIO 0.07)
COM
24 VDC
Servo Driver
RUN input
X1
Pulse 1 origin proximity input signal (CIO 0.11)
Origin search switch (CIO 0.00)
Emergency stop switch (CIO 0.01)
Servo Driver
alarm reset input
X1
24 VDC
XB
267
Section 5-2
Pulse Outputs
Operation
1,2,3...
1. An origin search is performed using the Origin Search Switch (CIO 0.00).
2. When the origin search is finished, the following operations are performed
continuously.
Move to A.
Move to B and return to A.
Move to C and return to A.
Move to D and return to A.
3. An emergency stop can be performed using the Emergency Stop Input
(CIO 0.01)
Preparation
■ PLC Setup
Setting details
Enable origin search function for pulse output 0 and 1.
Note The origin search enable setting is read when the power supply is turned ON.
268
Section 5-2
Pulse Outputs
■ DM Area Settings
Starting Frequency
Setting details
X-axis starting frequency
Y-axis starting frequency
Address
D0
D2
Data
0000
0000
PLS2(887) Settings to Move from Origin to Position A
Setting details
X axis
Y axis
Address
Data
Acceleration rate: 2,000 Hz/4 ms
Deceleration rate: 2,000 Hz/4 ms
D10
D11
07D0
07D0
Target frequency: 100,000 Hz
D12
D13
86A0
0001
Number of output pulses: 5,000 pulses
D14
D15
1388
0000
Acceleration rate: 2,000 Hz/4 ms
Deceleration rate: 2,000 Hz/4 ms
D20
D21
07D0
07D0
Target frequency: 100,000 Hz
D22
D23
86A0
0001
Number of output pulses: 5,000 pulses
D24
D25
1388
0000
PLS2(887) Settings to Move from Position A to Position B
Setting details
X axis
Address
Data
Acceleration rate: 2,000 Hz/4 ms
Deceleration rate: 2,000 Hz/4 ms
D30
D31
07D0
07D0
Target frequency: 100,000 Hz
D32
D33
86A0
0001
Number of output pulses: 25,000 pulses
D34
D35
61A8
0000
269
Section 5-2
Pulse Outputs
Y axis
Setting details
Acceleration rate: 2,000 Hz/4 ms
Address
D40
Data
07D0
Deceleration rate: 2,000 Hz/4 ms
Target frequency: 100,000 Hz
D41
D42
07D0
86A0
Number of output pulses: 50,000 pulses
D43
D44
0001
C350
D45
0000
PLS2(887) Settings to Move from Position A to Position C
Setting details
X axis
Y axis
Address
Data
Acceleration rate: 2,000 Hz/4 ms
Deceleration rate: 2,000 Hz/4 ms
D50
D51
07D0
07D0
Target frequency: 100,000 Hz
D52
D53
86A0
0001
Number of output pulses: 35,000 pulses
D54
D55
88B8
0000
Acceleration rate: 2,000 Hz/4 ms
Deceleration rate: 2,000 Hz/4 ms
D60
D61
07D0
07D0
Target frequency: 100,000 Hz
D62
D63
86A0
0001
Number of output pulses: 50,000 pulses
D64
D65
C350
0000
PLS2(887) Settings to Move from Position A to Position D
Setting details
X axis
Y axis
270
Address
Data
Acceleration rate: 2,000 Hz/4 ms
Deceleration rate: 2,000 Hz/4 ms
D70
D71
07D0
07D0
Target frequency: 100,000 Hz
D72
D73
86A0
0001
Number of output pulses: 25,000 pulses
D74
D75
61A8
0000
Acceleration rate: 2,000 Hz/4 ms
Deceleration rate: 2,000 Hz/4 ms
D80
D81
07D0
07D0
Target frequency: 100,000 Hz
D82
D83
86A0
0001
Number of output pulses: 30,000 pulses
D84
D85
7530
0000
Section 5-2
Pulse Outputs
Ladder Program
000000
(000000)
[Program Name: New Program1]
[Section Name: Section1]
Origin Search for X and Y Axis
0.00
SET
Origin
Search
Switch
000001
(000002)
000002
(000006)
W0.00
W0.00
W1.14
W1.15
RSET
Origin
Search
completed
W0.00
W0.00
SET
W0.01
W1.00
W2.00
Positioning
to A
completed
000004
(000012)
RSET
W0.01
W0.01
SET
W0.02
W1.01
W2.01
Positioning
to B
completed
000006
(000018)
RSET
W0.02
W0.02
SET
W0.03
W3.00
W2.00
Positioning
to A
completed
000008
(000024)
<W000.01>
a08 a12
Positioning to A
start
<W001.00>
a54
<W000.01>
a08 a12
<W000.02>
a14 a18
Positioning to B
start
<W001.01>
a63
<W000.02>
a14 a18
Operation 2: Positioning to A
W0.03
000007
(000020)
<W000.00>
a02 a06
Operation 2: Positioning to B
W0.02
000005
(000014)
Origin Search
start
<W001.14>
a48
Operation 1: Positioning to A
W0.01
000003
(000008)
<W000.00>
a02 a06
RSET
W0.03
<W000.03>
a20 a24
Positioning to A
start
<W003.00>
a55
<W000.03>
a20 a24
Operation3: Positioning to C
271
Section 5-2
Pulse Outputs
W0.03
SET
W0.04
W1.02
W0.04
000009
(000026)
W2.02
Positioning
to C
completed
000010
(000030)
RSET
W0.04
W0.04
SET
W0.05
W3.01
W2.00
Positioning
to A
completed
000012
(000036)
RSET
W0.05
SET
W0.06
W0.06
W1.03
W2.03
Positioning
to D
completed
000014
(000042)
RSET
W0.06
SET
W0.07
W0.07
W3.02
W2.00
Positioning
to A
completed
000016
(000048)
Positioning to A
start
<W003.01>
a56
<W000.05>
a32 a36
<W000.06>
a38 a42
Positioning to D
start
<W001.03>
a75
<W000.06>
a38 a42
RSET
W0.07
<W000.07>
a44
Positioning to A
start
<W003.02>
a57
<W000.07>
a44
Origin Search Start and Completion for X and Y Axis
W1.14
@ORG
(889)
Origin
Search
start
#0
#0
@ORG
(889)
#1
#0
272
<W000.05>
a32 a36
Operation 5: Positioning to A
W0.06
000015
(000044)
<W000.04>
a26 a30
Operation 4: Positioning to D
W0.05
000013
(000038)
Positioning to C
start
<W001.02>
a69
Operation 3: Positioning to A
W0.05
000011
(000032)
<W000.04>
a26 a30
[OP1]
[OP2]
[OP1]
[OP2]
Section 5-2
Pulse Outputs
000017
(000054)
A280.05
A281.05
No Origin
Flag
No Origin
Flag
W1.15
Origin Search
completed
<W001.15>
a04
Positioning to A Start and Completion for X and Y axis
W1.00
@PLS2
(887)
Positioning
to A
start
#0
#1
D10
D0
[OP1]
[OP2]
[OP3]
[OP4]
<cD00000>
c64 c70 c76
W3.00
Positioning
to A
start
W3.01
Positioning
to A
start
W3.02
Positioning
to A
start
@PLS2
(887)
#1
#1
D20
D2
A280.03
A281.03
W2.00
Pulse
pulse
output
output
completed completed
000018
(000063)
Positioning to A
completed
<W002.00>
a10 a22 a34 a46
Positioning to B Start and Completion for X and Y axis
W1.01
@PLS2
(887)
Positioning
to B
start
#0
#1
D30
D0
@PLS2
(887)
#1
#1
D40
D2
A280.03
A281.03
W2.01
Pulse
pulse
output
output
completed completed
000019
(000069)
[OP1]
[OP2]
[OP3]
[OP4]
<cD00002>
c65 c71 c77
[OP1]
[OP2]
[OP3]
[OP4]
<cD00000>
c58 c70 c76
[OP1]
[OP2]
[OP3]
[OP4]
<cD00002>
c59 c71 c77
Positioning to B
completed
<W002.01>
a16
Positioning to C Start and Completion for X and Y axis
W1.02
@PLS2
(887)
Positioning
to C
start
#0
#1
D50
D0
[OP1]
[OP2]
[OP3]
[OP4]
273
Section 5-2
Pulse Outputs
<cD00000>
c58 c64 c76
@PLS2
(887)
#1
#1
D60
D2
A280.03
A281.03
W2.02
Pulse
pulse
output
output
completed completed
000020
(000075)
@PLS2
(887)
Positioning
to D
start
#0
#1
D70
D0
@PLS2
(887)
#1
#1
D80
D2
A280.03
A281.03
W2.03
Pulse
pulse
output
output
completed completed
[OP1]
[OP2]
[OP3]
[OP4]
<cD00000>
c58 c64 c70
[OP1]
[OP2]
[OP3]
[OP4]
<cD00002>
c59 c65 c71
Positioning to D
completed
<W002.03>
a40
Emergency Stop (Pulse Output Stopped)
0.01
@INI
(880)
Emergency
stop
switch
#0
#3
0
@INI
(880)
#1
#3
0
274
Positioning to C
completed
<W002.02>
a28
Positioning to D Start and Completion for X and Y axis
W1.03
000021
(000081)
[OP1]
[OP2]
[OP3]
[OP4]
<cD00002>
c59 c65 c77
[OP1]
[OP2]
[OP3]
<c0>
c83
<0.00>
a00
<0.01>
a81
<0.06>
b84
<0.07>
b86
<0.08>
b88
<0.09>
b90
[OP1]
[OP2]
[OP3]
<c0>
c82
<0.00>
a00
<0.01>
a81
<0.06>
b84
<0.07>
b86
Section 5-2
Pulse Outputs
<0.08>
b88
<0.09>
b90
000022
(000084)
Limit Input Setting
0.04
A540.08
CW limit input
signal X axis
A540.09
CCW limit input
signal X axis
A541.08
CW limit input
signal Y axis
A541.09
CCW limit input
signal Y axis
Built-in
input
000023
(000086)
0.05
Built-in
input
000024
(000088)
0.08
Built-in
input
000025
(000090)
0.09
Built-in
input
275
Section 5-2
Pulse Outputs
Feeding Wrapping Material: Interrupt Feeding
Specifications and
Operation
Feeding Wrapping Material in a Vertical Pillow Wrapper
Emergency Stop Switch (CIO 0.01)
Start Switch (CIO 0.00)
Speed
control
Marker sensor
(Built-in input 0.04)
Position
control
Pulse output
(CW/CCW)
■ Operation Pattern
Speed control is used to feed wrapping material to the initial position. When
the marker sensor input is received, fixed-distance positioning is performed
before stopping.
500 Hz/4 ms
(01F4 hex)
10000 Hz
(2710 hex)
Speed
control
Position control
5,000 (1388 hex) pulses
output before stopping.
Input interrupt task
executes PLS2(887)
Marker sensor
input (0.04)
■ Operation
1,2,3...
1. Speed control is used to feed wrapping material to the initial position when
the Start Switch (CIO 0.00) is activated.
2. When the Marker Sensor Input (0.04) is received, PLS2(887) is executed
in interrupt task 140.
3. Fixed-distance positioning is executed with PLS2(887) before stopping.
4. An emergency stop is executed to stop pulse output with the Emergency
Stop input (0.01).
276
Section 5-2
Pulse Outputs
Preparation
■ PLC Setup
Setting details
Enable using built-in input IN0 as an interrupt input.
Note The interrupt input setting is read when the power supply is turned ON.
■ DM Area Settings
Speed Control Settings to Feed Wrapping Material to Initial Position
Setting details
Acceleration rate: 1,000 Hz/4 ms
Address
D0
Data
03E8
Target frequency: 10,000 Hz
D1
D2
2710
0000
Positioning Control Settings for Wrapping Material
Setting details
Acceleration rate: 500 Hz/4 ms
Address
D10
Data
01F4
Deceleration rate: 500 Hz/4 ms
Target frequency: 10,000 Hz
D11
D12
01F4
2710
Number of output pulses: 5,000 pulses
D13
D14
0000
1388
Starting frequency: 0 Hz
D15
D16
0000
0000
D17
0000
277
Section 5-2
Pulse Outputs
Ladder Program
Cyclic Task Program
(Executed at Startup)
000000
(000000)
[Program Name: New Program1]
[Section Name: Section1]
Enabling Input Interrupt 0 (IN0)
P_First_Cycle
MSKS
(690)
6
#0
First Cycle Flag
000001
(000002)
Feeding Material with Speed Control
0.00
Material
feed start
W0.01
W0.00
Material
positioning
completed
W0.00
@ACC
(888)
Material
being fed
#0
#0
D0
A280.03
A280.04
Pulse Output
Completed Flag
000002
(000010)
[OP1]
[OP2]
W0.01
Pulse Output
Completed Flag
Material being
fed
<W000.00>
a03
[OP1]
[OP2]
[OP3]
Material
positioning
completed
<W000.01>
b04
Emergency Stop (Pulse Output Stopped)
0.01
@INI
(880)
Emergency
stop
switch
#0
#3
0
[OP1]
[OP2]
[OP3]
<0.00>
a02
<0.01>
a10
Program for Interrupt Task
140
000000
(000000)
[Program Name: New Program2]
[Section Name: Section1]
Interrupt Task for Master Sensor ON
Starting interrupt Feed
P_On
PLS2
(887)
Always ON Flag
278
#0
#0
D10
D16
[OP1]
[OP2]
[OP3]
[OP4]
Section 5-3
Inverter Positioning
5-3
5-3-1
Inverter Positioning
Features
Positioning can be achieved using an inverter. This enables a far more economical positioning system than with a servomotor.
Feedback Control
with Error Counter
A position error counter built into the CP1L CPU Unit enables high-precision
positioning with an Inverter using feedback control. The PULSE OUTPUT
instruction is used in the ladder program in the CP1L CPU Unit to output internal pulses to a built-in error counter.
The error counter calculates the position error from the number of input internal pulses and the number of feedback pulses from the rotary encoder, and
sends speed commands to the inverter so that the position error goes to zero.
Ladder program
CP1L CPU Unit
PLS2 instruction
SYSMAC
CP1L
Inverter
IN
L1
L2/N
COM
01
00
03
02
05
04
07
06
09
08
11
10
01
00
03
02
05
04
07
06
09
08
11
10
Internal pulses
Speed command
Error
counter
Positioning
instruction
RS-485 or analog output
00
01
COM
02
COM
03
COM
04
COM
06
05
00
07
01
COM
03
02
04
COM
06
05
07
OUT
Frequency
command
Feedback pulses
Encoder
Reducing Positioning
Time
Motor
With traditional inverter positioning, positioning patterns are created in which
set positions are detected to trigger changes in the speed. Pulses are read
from the encoder and compared to set values during positioning to enable
determining when a position requiring a speed change has been reached.
This results in positioning errors at speed-change points when stopping at
high speed, reducing stopping precision. To ensure high-precision positioning,
sufficient deceleration was required before stopping, but this increases the
positioning time.
With the CP1L’s inverter positioning function, feedback pulses are used so
that the prevent position is always known, increasing positioning accuracy.
And because preset positioning patterns are used for deceleration and stopping, positioning time is reduced.
279
Section 5-3
Inverter Positioning
Traditional Inverter Positioning
The PLC counts the feedback pulses from the encoder using a high-speed
counter. When a deceleration point is reached, the speed is changed to control the stop position. If the precision of the stop position must be increased,
the stop position must also be detected to control positioning.
Multi-step or
speed
commands
Power
supply
frequency
Inverter
Inductive motor
PLC
Speed change judgments
Encoder
Feedback pulses
If Positioning Accuracy Is Increased:
If Positioning Speed Is Increased:
Frequency
Calculated speedchange point
Point where speed was
actually changed (High speed
results in positioning error.)
Frequency
Calculated speedchange point
Points where speed was
actually changed
Actually stopping
Low-speed point
Calculated
operation
stopping
point
Preset
deceleration
Error is reduced
by using a low
speed
Position
Position
Actual
Positioning
error occurs!
Settings
Actual
Settings
Positioning
error occurs
Positioning
error occurs
Time
Positioning
error
continues
Positioning
error is
reduced
Command
output
Time
Setting
Command
output
Time
Setting
Actual
Changing the speed
is delayed.
Actual
Stopping position
is reached faster
due to high-speed
positioning error.
Stopping from a low speed is necessary to prevent positioning error.
The speed of high-speed operation produces error, requiring that
the deceleration start position be calculated and adjusted so that
a low speed is achieved near the stopping point.
The need for low-speed operation near the stopping position
increases the positioning time. PLC
280
Section 5-3
Inverter Positioning
Inverter Positioning with the CP1L
With the CP1L’s inverter positioning function, feedback is constantly read for
the positioning data while controlling the position.
Power
supply
frequency
Speed command
Inverter
CP1L
Position feedback
Inductive motor
Encoder
Feedback pulses
There is no positioning error because the present position and position error
are constantly monitored and corrected.
Frequency
Low-speed operation is not required to prevent
positioning error. Control is simplified because the
low-speed position does not need to be calculated.
Position
Time
Actual/Settings
Command output
Settings/Actual
Time
Positioning is faster because low-speed
operation is not used.
Note
(1) The CP1L’s inverter positioning function is designed to increase positioning speed and stopping precision by reading position information and using a feedback loop with an error counter to switch speeds. It does not
increase the response, stopping precision, or speed change rate of the
inverter and motor. These are characteristics of the inverter and motor.
Refer to user documentation on your inverter and motor for details.
(2) The corresponding pulse output number (0 or 1) cannot be used for the
PULSE WITH VARIABLE DUTY FACTOR instruction (PWM) if inverter
positioning 0 or 1 is used. The high-speed counter of the same number
(0 or 1) is used to input the feedback pulse.
281
Section 5-3
Inverter Positioning
5-3-2
System Configuration
Speed Commands
Using Serial
Communications or
Analog Outputs
There are two ways to send speed commands to the inverter: serial communications and analog outputs.
Speed Commands Using Serial Communications
SYSMAC
CP1L
IN
L1
L2/N
COM
01
00
03
02
05
04
07
06
09
11
08
01
10
03
00
02
05
04
07
06
09
RS-485 communications
(Modbus-RTU)
11
10
08
COMM
00
01
02
03
04
COM
COM
COM
COM
06
05
00
07
01
COM
03
04
02
COM
Inverter
06
07
05
OUT
CP1W-CIF11/CIF12
(RS-422A/485
Option Board)
Serial communications
mode: Serial Gateway
CP1L
OR
3G3MV or 3G 3RV
Speed Commands Using an Analog Output
SYSMAC
CP1L
IN
L1
L2/N
COM
01
00
03
02
00
05
04
07
06
09
08
11
10
01
02
03
04
COM
COM
COM
COM
01
00
06
05
07
03
05
02
04
00
01
COM
07
06
09
03
02
04
COM
11
10
08
06
05
07
OUT
CH
I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 AG
VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC
Feedback
pulses
General-purpose
motor
OUT
CP1L
CP1W-DA021
CP1W-DA041/DA042
(Analog Output Unit)
Encoder
CP1W-MAD11
CP1W-MAD42/MAD44
(Analog I/O Unit)
Note
(1) The inverter positioning function uses either serial communications or an
analog output, and is thus possible with a CP1L CPU Unit with either transistor or relay outputs.
(2) The inverter positioning function does not use external pulse outputs.
Normal outputs are used for commands to the inverter (e.g., forward/reverse commands).
282
Section 5-3
Inverter Positioning
■
Precaution for Inverter Settings
• Set the stop time to 0 second.
• Use Modus-RTU communication when the send delay setting is above
10ms.
However, if the send delay time is too long, the inverter response to the
command from the PLC will be slow.
5-3-3
Functional Overview
Operation
CP1L
PLC Setup
■ Inverter Positioning
Settings
⋅ Enable function
⋅ Calculation cycle
⋅ Motor/encoder specs
⋅ Gain
⋅ In-position width
⋅ Min./max. output
⋅ Error settings
⋅ Etc.
■ High-speed
Counter Settings
Point 2.
Point 3.
Point 4.
Point 1.
Point 6.
Conversion
using PLC Setup
Positioning
instructions
Pulse output
instruction
Internal pulses
Error
counter
Gain
(PLS2, PULS +
SPED, etc.)
Port Setting
No. 0: #0020
No. 1: #0021
Position
feedback
Frequency command
conversions for inverter
MOV
(operation
commands,
output values,
present values
MOV
(automatically
calculated inverter
frequency
commands
■ Serial Port Settings
MOV
(forward/reverse
operation)
Point 1.
CP1W-CIF11/CIF12
Ladder Program
⋅ Enable counter
⋅ Mode settings
⋅ Etc.
(When using serial
communications for
outputs to the inverter.)
Point 5.
Point 8.
Auxiliary
Area word
Serial or
analog
output
Inverter
Power
supply
frequency
0.01 Hz
increments
Output
compensation
(upper/lower
limits)
Encoder
CP1W-DA021/DA041/
DA042/MAD11/
MAD42/MAD44
High-speed
counter input
terminal
Error Counter Status
(forward/reverse commands, in-position
status, etc.)
Stored in Auxiliary Area bits.
Inductive
motor
Feedback pulses
(See note.)
Point 7.
Forward/reverse commands
and other commands
Analog output: Output bits
Serial: Serial communications
Point 9.
Note: There is no speed or current (i.e.,
torque) loop.
Output to CP1W-CIF11/
CIF12
Modbus
communications
register settings
Output to Analog Unit
Analog output
settings
1. To use inverter positioning, the motor and encoder specifications, feedback gain, and other parameters must be set in the PLC Setup. The highspeed counter and inverter must also be set.
2. Pulse output instructions, such as PLS2 or PULS with SPED, are used to
execute positioning. Although normally the pulse output instructions are
used to output pulses from CP1L output contacts, when inverter positioning 0 or inverter positioning 1 is enabled in the PLC Setup, the internal position error counter (called simply the “error counter”) is enabled and the
pulse output instruction will output internal pulses to the error counter. Both
error counters 0 and 1 can be used at the same time.
3. For the number of pulses (i.e., the amount of movement) set in the pulse
output instruction, use the number of feedback pulses from the encoder.
For the pulse frequency set in the pulse output instruction, use the motor
power supply frequency converted to the feedback pulse frequency from
the encoder. (Refer to 5-3-7 Determining the Internal Pulse Output Frequency for details.)
4. Specify an inverter positioning port for the pulse output instruction (port 0:
0020, port 1: 0021). The internal pulses will be output to the error counter
for the specified port.
283
Inverter Positioning
Section 5-3
5. The number of pulses remaining in the error counter is converted to a power supply frequency command for the inverter according to a value set in
the PLC Setup and output to a word in the Auxiliary Area in increments of
0.01 Hz.
6. The frequency command value output to the Auxiliary Area is output to the
inverter from the ladder program according to the inverter command method (i.e., RS-485 communications or analog output). (Refer to 5-3-9 Automatic Calculation of Inverter Frequency Command Value for details.)
7. When a speed command is sent to the inverter, the motor will turn at the
command speed and feedback pulses (i.e., the amount of movement) from
the encoder will be returned to a high-speed counter of the CP1L. The
CP1L will continue to send a speed command to the inverter until the error
counter (i.e., the position error) goes to zero, i.e., until positioning has been
completed.
8. When the error counter goes to zero, the speed command to the inverter
will also go to zero. Even after the completion of internal pulse output (i.e.,
position command) from the pulse output instruction, the CP1L will maintain the error counter so that is remains at zero.
9. The status of the error counter (such as the command direction and in-position status) will be stored in the Auxiliary Area. This status can be read
from the user program to enable controlling output of commands to the inverter.
For example, if a change in the load causes the motor shaft to turn, feedback
pulses from the encoder will enter the error counter, the value in the error
counter will be reduced, and the Reverse Command Flag in the Auxiliary Area
will turn ON. By writing the ladder program to output a reverse operation command to the inverter for the Reverse Command Flag, a command in the opposite direction of motor shaft movement will be output from the CP1L to the
inverter, causing the motor to return to its original position. This compensating
operation to continuously maintain the current stop position is called a servo
lock.
Other Functions
Servo Locks with Vector
Control Inverters
The servo lock on an inverter can be used to stop positioning. By using the
inverter’s servo lock, the inverter positioning function and the output command
to the inverter can be stopped from the user program without using feedback
control even if the error counter value is not zero. This enables servo locks
when using an inverter with vector control.
Clearing the Error Counter
for Errors
If the motor shaft is moved manually for error stops or when the inverter is
stopped, feedback pulses will accumulate in the error counter. This can be
very dangerous because it may cause the motor to suddenly return to the
original position at high speed when operation is started again. To prevent
such problems, an error counter error output can be produced when more
than a set number of pulses accumulated in the error counter when positioning operations are stopped.
284
Section 5-3
Inverter Positioning
Pulse frequency
Error counter
present value
Error counter
error setting
PLS2
instruction
Motor shaft
turned manually.
Error counter
error occurs.
Time
In-position width
Pulse Output Flag
In-position flag
Error Counter Error
Flag (Output value cleared.)
Error Counter Reset Bit
(Error counter cleared.)
Low-speed Operation
Using Minimum Output
Setting
An inductive motor driven with an inverter is different from a servomotor in that
the torque at low speeds is so low that it may not be possible to turn the motor
shaft at the minimum frequency. The CP1L provide a minimum output setting
the ensure a minimum output to enable positioning at low speeds even when
there are extremely few pulses in the error counter.
Absolute Positioning
The amount of movement (i.e., amount of rotation) is input to the high-speed
counter as feedback pulses. During inverter positioning, the present value of
the high-speed counter can be used as an absolute position.
Note
5-3-4
The absolute position will change if the present value of the high-speed
counter is changed or the high-speed counter is reset.
Specifications
Inverter Positioning
Specifications
Item
Applicable inverters
Applicable motors
Specification
Inverter that receives frequency commands from an analog
input or via Modbus-RTU communications. (Control method:
V/f control, vector control, etc.)
Depends on the inverter (e.g., squirrel-cage inductive motor)
Number of positioning ports and
response frequency
Two ports at 100 kHz (J models: 20kHz) (within the speed
command range of the pulse output instructions)
Inverter command
output method
Modbus-RTU communications commands or analog output
(from ladder program)
Present value coordinate system
With origin: Absolute coordinate system
Without origin: Relative coordinate system
32 bits: 8000 000 to 7FFF FFFF hex (range of position command values and present values for pulse output instructions)
Continuous output (Number of pulses not specified.)
Independent mode (Number of pulses specified.)
Trapezoidal or S-curve acceleration/deceleration
Present value range
Output modes
Acceleration/deceleration control
285
Section 5-3
Inverter Positioning
Item
Specifications of
number of pulses
Origin searches
Feedback pulse
input ports
Present value range
for feedback pulses
Error counter range
Error counter calculation cycle
Note
Specification
Relative positions: 0000 0000 to 7FFF FFFF hex
(2,147,483,647 incrementing and decrementing)
Absolute positions: 8000 0000 to 7FFF FFFF hex
(−2,147,483,648 to 2,147,483,647)
(Ranges of position command values and present values for
pulse output instructions)
Motor driver and signal wire modes: 3 modes
Origin search modes: 2 modes
Origin detection methods: 3 methods
High-speed counter 0 and high-speed counter 1 (fixed)
Maximum response frequency: 100 kHz (J models: 20kHz)
32 bits: 8000 000 to 7FFF FFFF hex
8000 to 7FFF hex (signed)
4 to 1,020 ms (x4)
(1) If inverter positioning 0 is used, pulse output 0 and PWM0 cannot be
used. If inverter positioning 1 is used, pulse output 1 and PWM1 cannot
be used.
(2) If inverter positioning 1 is used with a CPU Unit with 14 I/O Points, origin
searches cannot be used.
(3) If the continuous output mode is specified (i.e., if the number of pulses is
not specified), be sure to use the high-speed counter (linear mode) so
that it does not overflow.
High-speed Counter
Specifications for Inverter
Positioning
Item
Two 2-phase counters at 50 kHz and two singlephase counters at 100 kHz
Counting mode
Differential-phase inputs (x4), up/down pulse
inputs, or pulse plus direction inputs
Numeric range mode
Linear mode
Numeric range
Note Always set linear mode when using inverter
positioning.
32 bits (−2,147,483,648 to 2,147,483,647)
Reset method
Interrupts
(See note.)
Note
286
Specification
Response frequency and number of counters
Phase Z signal (reset input) + software reset, or
software reset
Target value
matching
Zone comparison
Up to 48 target values and interrupt task numbers
can be registered.
Up to 8 sets of upper values, lower values, and
interrupt task numbers can be registered.
Target value matching and zone comparisons can be used for high-speed
counters with a feedback pulse input from an encoder even when using
inverter positioning.
Section 5-3
Inverter Positioning
5-3-5
Application Procedure for Inverter Positioning
Determine positioning
patterns.
Determine applicability.
Determine instructions to use.
· PLS2
· PULS + SPED
· PULS + ACC
· Etc.
Decided to use error counter 0 or 1.
Determine inverter specifications
For example, the control method (V/f control
or vector control)
Determine inverter command
method.
· RS-485 communications (Modbus-RTU)
· Analog signal
Wire the system.
Set inverter parameters.
Set PLC Setup.
Write ladder program.
■
· Enable inverter positioning
Error counter calculation cycle
Gain
In-position width
Minimum output
Error counter error setting
Power supply frequency per motor rotations/s
Number of encoder pulses per motor rotation
· High-speed counter
Counting mode
Numeric range mode
Etc.
· Enter positioning instructions.
· Program scaling for inverter frequency commands.
· Program forward/reverse operation instructions, stopping instructions,
etc.
Positioning Instruction Settings
• PULSE OUTPUT (PLS2)
Port: Inverter positioning, Mode: Absolute pulse
• SET PULSES (PULS)
Port: Inverter positioning, Mode: Absolute pulse
+ SPEED OUTPUT (SPED)
Mode: Independent
• SET PULSES (PULS)
Port: Inverter positioning, Mode: Absolute pulse
+ ACCELERATION CONTROL (ACC)
Port: Inverter positioning, Mode: Independent
287
Section 5-3
Inverter Positioning
• MODE CONTROL (INI)
Port: Inverter positioning, stopping inverter positioning
• HIGH-SPEED COUNTER PV READ (PRV)
Port: Inverter positioning, Operation: Reading error counter, inverter positioning status, or error counter present value
■
Automatic Calculation of Inverter Frequency Commands
• For either serial communications or an analog output, the power supply
frequency per motor revolutions/s, the number of encoder pulses per
motor revolution, and the error counter calculation cycle can be set in the
PLC Setup to automatically calculate the inverter frequency command
values and store it in A23/A33 in increments of 0.01 Hz.
• For serial communications, the ladder program is used to output the value
in A23/A33 to the inverter using serial communications.
• For analog output, the value in A23/A33 can be scaled to analog output
values and output from the Analog Unit to the inverter.
■
Forward/Reverse Operation Commands, Stopping Commands, Etc.
• The Forward Command Flag (A26.01/A36.01) and Reverse Command
Flag (A26.02/A36.02) can be used as input conditions for forward and
reverse operation commands.
• The Operation Command Flag (A26.00/A36.00) and In-position Flag
(A26.03/A36.03) can be used as input conditions to execute scaling to
inverter frequency commands and to execute stop commands.
5-3-6
Instruction Specifications
The normal pulse output instructions are used (PLS2, PULS + SPED, or
PULS + ACC). One of the inverter positioning ports is specified as the port for
the instruction. Just like pulses are output externally for the normal pulse output instructions, error counter pulses are accumulated in the internal error
counter when executing inverter positioning.
Port Designation
Operand
Specifications
When executing pulse output instructions or status read instructions for
inverter positioning, a port number for inverter positioning is specified for the
port operand of the instruction. The following values are used.
0020 hex: Inverter positioning 0
0021 hex: Inverter positioning 1
When reading the present value of inverter positioning, use the following values to specified the port number for inverter positioning.
0030 hex: Inverter positioning 0 (signed)
0031 hex: Inverter positioning 1 (signed)
Set value
288
Specified port
Applicable instructions
0000
0001
Pulse output 0
Pulse output 1
-----
0002
0003
Pulse output 2
Pulse output 3
-----
0010
0011
High-speed counter input 0
High-speed counter input 1
-----
0012
0013
High-speed counter input 2
High-speed counter input 3
-----
0020
0021
Inverter positioning 0
Inverter positioning 1
SPED, PULS, ACC, PLS2, INI, PRV, ORG
SPED, PULS, ACC, PLS2, INI, PRV, ORG
Section 5-3
Inverter Positioning
Applicable
Instructions
Instruction
Set value
Specified port
0030
Error counter 0 (signed)
PRV
Applicable instructions
0031
0100
Error counter 1 (signed)
Interrupt input 0 (counter
mode)
PRV
---
:
0107
:
---
1000
:
Interrupt input 7 (counter
mode)
PWM output 0
---
1001
PWM output 1
---
The following seven instructions can be used to execute inverter positioning.
The relationship between the instructions and internal pulse outputs is as follows:
Overview
Positioning (Independent Mode)
Pulse output
with no
acceleration/
deceleration
Pulse output with acceleration/
deceleration
Trapezoid,
Trapezoid,
same rate for
different rates
acceleration/ for acceleration/
deceleration
deceleration
Origin
searches
PULS(886)
SET PULSES
Sets the number of internal
pulses to output.
Applicable
---
---
---
SPED(885)
SPEED OUTPUT
Controls pulse output without
Applicable
acceleration or deceleration. (The
number of internal pulses must be
set in advance with PULS(886).)
Controls pulse output with accel- --eration or deceleration using the
same rate for both. (The number
of internal pulses must be set in
advance with PULS(886).)
Controls pulse output with accel- --eration or deceleration using a different rate for each (The number
of internal pulses is also set.)
---
---
---
Applicable
---
---
---
Applicable
---
Actually moves the motor to
establish the origin using origin
proximity input, origin input, etc.
---
---
Applicable
INI(880)
Used to stop internal pulse output Applicable
MODE CONTROL and inverter positioning. It can
also be used to change the
present value of pulse output
(thus establishing the origin).
Applicable
Applicable
---
PRV(881)
HIGH-SPEED
COUNTER PV
READ
Applicable
Applicable
---
ACC(888)
ACCELERATION
CONTROL
PLS2(882)
PULSE OUTPUT
ORG(889)
ORIGIN SEARCH
Reads the present value of the
internal pulse output or error
counter.
---
Applicable
289
Section 5-3
Inverter Positioning
SET PULSES: PULS(886)
PULS(886) is used to set the pulse output amount (number of output pulses)
for pulse outputs that are started later in the program using SPED(885) or
ACC(888) in independent mode.
PULS(886)
P
T
N
SPEED OUTPUT:
SPED(885)
P
Operand
Port specifier
T
Pulse type
N
Number of
pulses
P: Port specifier
T: Pulse type
N: Number of pulses
Description
0020 hex: Inverter positioning 0
0021 hex: Inverter positioning 1
0000 hex: Relative
0001 hex: Absolute
N (lower 4 digits) • Relative pulses: 0000 0000 to 7FFF FFFF
hex (0 to 2,147,489,647)
N+1 (upper 4
• Absolute pulses: 8000 0000 to 7FFF FFFF
digits)
hex (−2,147,489,648 to 2,147,489,647)
SPED(885) is used to start pulse output without acceleration or deceleration.
It is used together with PULS(886). SPED(885) can also be executed during
pulse output to change the output frequency.
SPED(885)
P
M
F
P: Port specifier
M: Output mode
F: First pulse frequency word
P
Operand
Port specifier
Description
0020 hex: Inverter positioning 0
0021 hex: Inverter positioning 1
M
Output mode
Mode
0 hex: Continuous
1 hex: Independent
Direction
0 hex: CW
1 hex: CCW
Not used: Always set to 0 hex.
Bits 0 to 3
Bits 4 to 7
Bits 8 to 11
F
ACCELERATION
CONTROL: ACC(888)
290
Bits 9 to 15
First pulse fre- F (lower 4 digquency word its)
F+1 (upper 4
digits)
Not used: Always set to 0 hex.
Output Frequency in Hz
Pulse output 0 or 1: 0000 0000 to 0001 86A0
hex (0 to 100 kHz)
J models: 0000 0000 to 0000 4E20 hex
(0 to 20kHz)
ACC(888) outputs pulses to the specified output port at the specified frequency using the specified acceleration and deceleration rate. (Acceleration
rate is the same as the deceleration rate.) For positioning, ACC(888) is used
in combination with PULS(886). ACC(888) can also be executed during pulse
output to change the target frequency or acceleration/deceleration rate.
Section 5-3
Inverter Positioning
ACC(888)
P
M
S
P: Port specifier
M: Output mode
S: First word of settings table
Operand
P
Port specifier
M
Output mode
S
PULSE OUTPUT:
PLS2(887)
First word of
settings table
Description
0020 hex: Inverter positioning 0
0021 hex: Inverter positioning 1
Bits 0 to 3
Mode
1 hex: Independent
Bits 4 to 7
Direction
0 hex: CW
1 hex: CCW
Bits 8 to 11
Bits 9 to 15
Not used: Always set to 0 hex.
Not used: Always set to 0 hex.
S
Acceleration/Deceleration Rate
1 to 65,535 Hz (0001 to FFFF hex)
S+1 (lower 4
digits)
S+2 (upper 4
digits)
Target Frequency in Hz
Pulse output 0 to 3: 0000 0000 to 0001 86A0
hex (0 to 100 kHz)
J models: 0000 0000 to 0000 4E20 hex
(0 to 20kHz)
PLS2(887) outputs a specified number of pulses to the specified port. Pulse
output starts at a specified startup frequency, accelerates to the target frequency at a specified acceleration rate, decelerates at the specified deceleration rate, and stops at approximately the same frequency as the startup
frequency. Only independent mode positioning is supported.
PLS2(887) can also be executed during pulse output to change the number of
output pulses, target frequency, acceleration rate, or deceleration rate.
PLS2(887) can thus be used for sloped speed changes with different acceleration and deceleration rates, target position changes, target and speed
changes, or direction changes.
PLS2(887)
P
M
S
F
P: Port specifier
M: Output mode
S: First word of settings table
F: First word of starting frequency
P
Operand
Port specifier
Description
0020 hex: Inverter positioning 0
0021 hex: Inverter positioning 1
M
Output mode
Bits 8 to 11
Mode
0 hex: Relative pulses
1 hex: Absolute pulses
Direction
0 hex: CW
1 hex: CCW
Not used: Always set to 0 hex.
Bits 9 to 15
Not used: Always set to 0 hex.
Bits 0 to 3
Bits 4 to 7
291
Section 5-3
Inverter Positioning
S
F
ORIGIN SEARCH:
ORG(889)
Operand
First word of
S1
settings table
Description
Acceleration rate
Specify the increase or
0001 to FFFF hex (1 to decrease in the fre65,535 Hz)
quency in Hz per pulse
control period (4 ms).
S1+1
Deceleration rate
0001 to FFFF hex (1 to
65,535 Hz)
S1+2 (lower 4 Target Frequency in Hz
digits)
Pulse output 0 or 1: 0000 0000 to 0001 86A0
S1+3 (upper 4 hex (0 to 100 kHz)
digits)
J models: 0000 0000 to 0000 4E20 hex
(0 to 20kHz)
S1+4 (lower 4 Number of Pulses
digits)
• Relative pulses: 0000 0000 to 7FFF FFFF hex
S1+5 (upper 4 (0 to 2,147,489,647)
digits)
• Absolute pulses: 8000 0000 to 7FFF FFFF
hex (−2,147,489,648 to 2,147,489,647)
First word of
starting frequency
F (lower 4 dig- Starting Frequency in Hz
its)
Pulse output 0 or 1: 0000 0000 to 0001 86A0
F+1 (upper 4 hex (0 to 100 kHz)
J models: 0000 0000 to 0000 4E20 hex
digits)
(0 to 20kHz)
ORG(889) performs an origin search or origin return operation.
• Origin Search:
Pulses are output to establish the origin based on origin proximity input
and origin input signals.
• Origin Return:
The positioning system is returned to the origin.
The parameters for pulse output 0 or pulse output 1 must be set in advance in
the PLC Setup to perform either an origin search or origin return operation.
ORG(889)
P
C
P: Port specifier
C: Control data
Operand
292
P
Port specifier
C
Control data
Description
Bits 0 to 3
0020 hex: Inverter positioning 0
0021 hex: Inverter positioning 1
Not used: Always set to 0 hex
Bits 4 to 7
Bits 8 to 11
Not used: Always set to 0 hex
Not used: Always set to 0 hex
Bits 9 to 15
Mode
0 hex: Origin search
1 hex: Origin return
Section 5-3
Inverter Positioning
MODE CONTROL: INI(880)
INI(880) changes the present value of inverter positioning or stops positioning.
INI(880)
P
C
NP
NV: First word with new PV
P
Operand
Port specifier
C
Control data
NP First word
with new PV
HIGH-SPEED COUNTER
PV READ: PRV(881)
P: Port specifier
C: Control data
Description
0020 hex: Inverter positioning 0
0021 hex: Inverter positioning 1
0002 hex: Changes the PV of the internal pulse
output.
0003 hex: Stops internal pulse output. Positioning will continue and the output value will not be
cleared.
0004 hex: Stops inverter positioning. Internal
pulse output will be stopped, positioning will be
stopped, and the output value will be cleared.
The next operation will not be accepted until the
error counter is cleared.
NP (lower 4
digits)
NP+1 (upper
4 digits)
New PV
0000 0000 to FFFF FFFF hex
PRV(881) is used to read the present value and status of inverter positioning.
The following status can be read.
• Operation Command Flag
• Forward Command Flag
• Internal Pulse Acceleration/
Deceleration Flag
• Reverse Command Flag
• Error Counter Error Flag
• In-position Flag
• Error Counter Alarm Flag
• Internal Pulse Output Flag
• Error Counter Sign Flag
PRV(881)
P
C
D
P: Port specifier
C: Control data
D: First destination word
293
Section 5-3
Inverter Positioning
Operand
P
Port specifier
C
Control data
D
First destination word for
present value
Description
0020 hex: Inverter positioning 0
0021 hex: Inverter positioning 1
0030 hex: Error counter 0
0031 hex: Error counter 1
0000 hex: Read present value.
0001 hex: Read status.
D
Lower 4 When a present value is read, the following
digits
data is stored in D and D+1 as an 8-digit hexaD+1 Upper 4 decimal value.
P = #0020/#0021: The actual movement from
digits
the internal pulse origin.
P = #0030/#0031: The present value of the
error counter.
Destination
D
word for
inverter positioning status
(P = #0020 or
#0021)
Bit 0
Operation Command Flag
ON: Operation command in progress
OFF: Stopped
Bit 1
Forward Command Flag
ON: Forward command in progress
OFF: Reverse command in progress or
stopped
Reverse Command Flag
ON: Reverse command in progress
OFF: Forward command in progress or
stopped
Bit 2
Bit 3
In-position Flag
ON: In position
OFF: Not in position
Bit 4
Error Counter Error Flag
ON: Error occurred in error counter
OFF: No error
Internal Pulse Output Flag
ON: Pulses being output
OFF: Pulse output stopped
Internal Pulse Acceleration/Deceleration Flag
ON: Acceleration/deceleration in progress for
internal pulse output (i.e., frequency being
changed)
OFF: Constant frequency for internal pulse output
Bit 5
Bit 6
294
Bit 7
Error Counter Alarm Flag
ON: Alarm occurred for error counter
OFF: No alarm
Bit 15
Error Counter Sign Flag
ON: Positive
OFF: Negative
Section 5-3
Inverter Positioning
5-3-7
Determining the Internal Pulse Output Frequency
Use the following formula to calculate the internal pulse frequency (Hz) to output from the pulse output instruction (e.g., PLS2) based on the power supply
frequency (Hz) to be output from the inverter to the motor.
Frequency of
internal pulse
output (Hz)
Note
Encoder resolution
(pulses/revolution)
High-speed
counter multiplier
Gear ratio between motor
shaft and encoder shaft
(See note 2.)
Power supply frequency to motor
for one revolution per second (See note 1.)
Power supply
frequency to
motor (Hz)
(1) Calculate the power supply frequency for one revolution per second from
the motor specifications. For example, with a 1,800-r/min (60-Hz) motor
(30 r/s), the power supply frequency for one revolution per second would
be calculated as follows: 60 [Hz] ÷ 30 [r/s] = 2 [Hz].
(2) The encoder resolution times the counter multiplier times the gear ratio
equals the number of pulses output by the encoder for one motor shaft
revolution.
CP1L
Internal
pulses
Pulse output
instruction
Error
counter
Inverter
Target frequency
Motor
Power
supply
frequency
Encoder
Conversion formula
Example of
Calculating
Conversion Factor
Conditions
• Frequency for 1 revolution/s for inductive motor: 2 Hz (motor specification)
• Rotary encoder resolution: 1,000 pulses/revolution (encoder specification)
• High-speed counter multiplier: x4 (PLC Setup)
• Gear ratio between motor and encoder shafts: 1/4 (machine specification)
Calculations
The factor goes into the formula as shown below.
Frequency of
internal pulse
output (Hz)
1000 × 4 × 1/4
2
Power supply
frequency to
motor (Hz)
500 × Power supply frequency to motor (Hz)
For example, to output a power supply frequency of 10 Hz to the motor:
Frequency of internal pulse output = 500 × 10 Hz = 5,000 Hz = 5 kHz
Therefore, set a pulse output frequency of 5 kHz in the pulse output instructions (e.g., PLS2).
295
Section 5-3
Inverter Positioning
5-3-8
PLC Setup
The following settings must be made in advance when using inverter positioning 0 or 1.
Basic Settings
The following settings are required to use inverter positioning.
Inverter Positioning
Function
Setting
Use
inverter
positioning
Description
Set value
Select this option to use inverter
Use/Do not use
positioning. High-speed counter 0
will be allocated to inverter positioning 0 and high-speed counter 1
will be allocated to inverter positioning 1. The high-speed counter
mode that is set will be used.
Default
Do not use
Application
---
Refresh timing
When CPU Unit
power is turned
ON
Note If inverter positioning 1 is
used with a CPU Unit with
14 I/O Points, origin
searches cannot be used.
(Origin searches are possible even if inverter positioning 0 is used.)
Gain
Setting
Gain
Description
Set value
The error counter present value times
1 to 65,535
the gain setting will be used as the out- (0.1 increments)
put command to the inverter.
0 sets a value of
10 (0.1 increInverter output command
ments)
Gain > 1
Gain = 1
Gain < 1
Error counter
present value
Note The setting is made in increments of 0.1. The gain will thus
be 1/10 of the set value. For
example, if 50 is set, the gain will
be 5.
It’s best to initially try a gain of
from 5 to 10 (settings of 50 to
100) and then adjust from there.
296
Default
0: 10 (0.1
increments)
This will
set a
gain of 1.
Application
Adjusting the
following characteristic of the
motor
Refresh timing
When CPU Unit
power is turned
ON
Section 5-3
Inverter Positioning
In-position Range
Setting
In-position
range
Description
The In-position Flag (A26.03) will turn
ON when pulse output to the error
counter has been completed and the
error counter present value is less equal
to or less than the in-position range.
Set value Default
1 to 65,535 0: 1
Setting 0 is
the same
as setting
1.
Application
Refresh timing
When using the
When CPU Unit
inverter’s servo lock, the power is turned
command value to the
ON
inverter is set to zero
during in-position status.
Pulse frequency
Error counter present value
PLS2
In-position range
Positioning
In-position Flag
(A02603)
Minimum Output Value
Setting
Description
Min.
If the error counter present value times the gain
output
setting is less than the minimum output value,
value
the minimum output value will be output.
Set the minimum output value so that it is equal
to or smaller than the maximum output value.
Output command to inverter
Set value Default
1 to 65,535 0: 1
Setting 0 is
the same
as setting
1.
Application
Refresh timing
A minimum output
When CPU Unit
value can be set to
power is turned
ensure an output of ON
a specified size even
when the error
counter present
value is very small.
Min. output
Min. output
Error counter
present value
Maximum Output Value
Setting
Description
Max.
If the error counter present value times the gain
output
setting is greater than the maximum output
value
value, the maximum output value will be output.
Set the maximum output value so that it is equal
to or greater than the minimum output value.
Output command to inverter
Set value
Default
1 to
0: 2,000,000
4,294,967,29
5
Setting 0 is
the same as
setting
2,000,000.
Application
A maximum
output value
can be set to
prevent the
output value
from becoming too large.
Refresh timing
When CPU Unit
power is turned
ON
Max. output
Max. output
Error counter
present value
297
Section 5-3
Inverter Positioning
Error Counter Overflow
Detection Value
Setting
Description
Error counter
If the absolute value of the
overflow detection error counter present value is
value
greater than the error counter
overflow detection value, the
Error Counter Error Flag
(A26.03) will turn ON.
Set value
Default
1 to 32,767 0: 10,000
Setting 0 is
the same as
setting
10,000.
Application
Provides notification of
excessive pulses in the
error counter, e.g., when
manually moving the
motor shaft while positioning is stopped.
Refresh timing
When CPU Unit
power is turned
ON
Error Counter Alarm
Detection Value
Setting
Description
Error counter
alarm detection
value
If the absolute value of the
error counter present value is
greater than the error counter
alarm detection value, the
Error Counter Alarm Flag
(A26.08) will turn ON.
Set value
Default
1 to 32,767 0: 10,000
Setting 0 is
the same as
setting
10,000.
Application
Refresh timing
Provides notification of
excessive pulses in the
error counter, e.g., when
encoder wiring breaks during positioning.
When CPU Unit
power is turned
ON
Default
Refresh timing
Error Counter Cycle
Setting
Error counter
cycle
Description
Set value
The calculation cycle of the error
counter can be set. If the cycle is
too short when using a motor with a
slow response, pulses may easily
accumulate in the error counter.
Change the error counter cycle
according to the machine load and
motor response.
1 to 255 (in 4ms increments)
Setting 0 is the
same as setting
3 (4-ms increments)
Application
0: 3 (4-ms Set when using
increa motor with a
ments)
slow response.
The error
counter
cycle will
be 12 ms.
When CPU Unit
power is turned
ON
Note The setting is made in increments of 4 ms. The error
counter cycle will thus be the
set value times 4 ms. For
example, if the set value is
10, the error counter cycle
will be 40 ms.
Power Supply Frequency
for One Motor Revolution
per Second
Setting
Power Supply
Freq. for One
Motor Revolution
per Sec.
Description
Default
Calculate the power supply fre0 to 65,535 Hz 0 (0.1-Hz
quency for one revolution per second (0.1-Hz incre- increfrom the motor specifications. For
ments)
ments)
example, with a 1,800-r/min (60-Hz)
motor (30 r/s), the power supply frequency for one revolution per second
would be calculated as follows:
60 [Hz] ÷ 30 [r/s] = 2 [Hz].
Note The setting is made in increments of 0.1 Hz. The frequency will thus be the set
value times 0.1 Hz. For example, if the set value is 20, the
frequency will be 2 Hz.
298
Set value
Application
Refresh timing
This setting is
When CPU Unit
used when con- power is turned
verting the out- ON
put value to an
inverter frequency command.
Section 5-3
Inverter Positioning
Number of Encoder
Pulses for One Motor
Revolution
Setting
Number of
Encoder Pulses
for One Motor
Revolution
Description
Set value
Default
Calculate the number of encoder pulses for 0 to 65,535 0
one motor revolution from the encoder resolution (pulses/revolution), high-speed
counter’s multiplier, and motor-encoder
shaft gear ratio. For example, if the
encoder resolution is 1,000, the highspeed counter multiplier is 4, and the gear
ratio is 1/4, the number of encoder pulses
for one motor revolution is 1,000 × 4 × (1/4)
= 1,000.
Operation Adjustment
Settings
Application
Refresh timing
This setting is
When CPU Unit
used when con- power is turned
verting the out- ON
put value to an
inverter frequency command.
Use the following settings if the gain adjustment in the basic settings does not
produce stable operation.
Limit Output during
Acceleration and
Constant Speed
Setting
Description
Set value Default
Application
Limit output during Select this option to limit the upper and
Use/Do
Do not
Use this setting
acceleration and
lower values of the output value based on not use
use
when positioning
constant speed
the pulse output value during internal
precision is bad.
pulse output acceleration or constant
speed.
Refresh timing
When CPU Unit
power is turned
ON
Limit Output during
Deceleration and When
Stopped
Setting
Limit output during
deceleration and
when stopped
Description
Set value
Select this option to multiply the error of Use/Do
the output value by a coefficient during not use
internal pulse output deceleration or
after output has been completed.
Default
Do not
use
Application
Refresh timing
Use this setting
when positioning
precision is bad.
When CPU Unit
power is turned
ON
299
Section 5-3
Inverter Positioning
Output Coefficient during
Acceleration and
Constant Speed
Setting
Description
Set value
Output coefficient during
acceleration
and constant
speed
Upper and lower limits are placed on
the output value by multiplying the pulse
output value by a coefficient during
internal pulse output acceleration or
constant speed.
Output Upper Limit =
Internal pulse output value + Internal
pulse output value × Output coefficient
Output Lower Limit =
Internal pulse output value − Internal
pulse output value × Output coefficient
Default
1 to 255
0: 6 (0.01
(0.01 incre- increments)
ments)
Setting 0 is
the same as
setting 6
(0.01 increments).
Application
Refresh timing
This coefficient can When CPU Unit
be used to restrict
power is turned
the output range to
ON
prevent excessive
values, based on the
internal pulse output
value when the
motor response is
slow even if a large
error is produced.
Error counter
present value
Internal pulses
Output command
to inverter
Note The setting is made in increments of 0.01. The coefficient will
thus be the set value times 0.01.
For example, if the set value is
10, the coefficient will be 0.1 ms.
Output Coefficient during
Deceleration
Setting
Output coefficient
during deceleration
Description
Set value
The output value can be
changed by multiplying the
value in the error counter by
a coefficient during deceleration of internal pulse output.
Output value =
Error × Error counter cycle
(s) × Gain × Coefficient
1 to 255
(0.01 increments)
Setting 0 is
the same as
setting 96
(0.01 increments).
Note The setting is made in
increments of 0.01.
The coefficient will
thus be the set value
times 0.01. For example, if the set value is
10, the coefficient will
be 0.1 ms.
300
Default
0: 96
(0.01
increments)
Application
Refresh timing
This coefficient can be
When CPU Unit
used to reduce the output power is turned
value when the motor
ON
response is slow and the
target position is
exceeded when stopping.
Section 5-3
Inverter Positioning
Output Coefficient after
Pulse Output
Setting
Output coefficient
after pulse output
Description
The output value can be
changed by multiplying the
value in the error counter by a
coefficient after deceleration of
internal pulse output.
Output value =
Error × Error counter cycle (s)
× Gain × Coefficient
Set value
1 to 255
(0.01 increments)
Setting 0 is
the same as
setting 50
(0.01 increments).
Default
0: 50
(0.01
increments)
Application
Refresh timing
This coefficient can be
When CPU Unit
used to reduce the output power is turned
value when it the value in ON
the error counter is too
large after completing
internal pulse output.
Note The setting is made in
increments of 0.01. The
coefficient will thus be
the set value times 0.01.
For example, if the set
value is 10, the coefficient will be 0.1 ms.
5-3-9
Automatic Calculation of Inverter Frequency Command Value
Set the Power Supply Frequency for One Motor Revolution per Second, Number of Encoder Pulses for One Motor Revolution, and Error Counter Cycle in
the PLC Setup to automatically calculate the inverter frequency command
value and store it in A23 for inverter positioning 0 and A33 for inverter positioning 1.
Note
The inverter frequency command values are stored in A23 and A33
in increments of 0.01 Hz. Divide the value in A23 or A33 by 100 to
obtain the value in hertz.
The values stored in A23 and A33 can be used in converting the output value
to the frequency command value for the inverter. This value can be output to
the inverter from the program using serial communications or an Analog Output Unit.
Note
The following formula is used inside the PLC to automatically calculate the inverter frequency command value from the output value
(i.e., the error counter present value multiplied by the gain). (The
output value is stored in A20 and A21 for inverter positioning 0 and
in A30 and A31 for inverter positioning 1.)
Conversion Factor
(See
Inverter frequency
command value (Hz)
Motor frequency for 1 rotation per second (Hz) note 1.)
1
High-speed
counter
multiplier
Error counter
cycle (s)
Encoder resolution
(pulses/rotation)
Motor-encoder
shaft gear (See
ratio
note 2.)
Output value
A20/A21
A30/A31
Note: The inverter frequency command value is stored in A23/A33 in increments of 0.01 Hz.
Note
(1) Calculate the power supply frequency for one revolution per second from
the motor specifications. For example, with a 1,800-r/min (60-Hz) motor
(30 r/s), the power supply frequency for one revolution per second would
be calculated as follows: 60 [Hz] ÷ 30 [r/s] = 2 [Hz].
(2) The encoder resolution times the counter multiplier times the gear ratio
equals the number of pulses output by the encoder for one motor shaft
revolution.
301
Section 5-3
Inverter Positioning
CP1L
PLC Setup
Auxiliary Area
A20/A21 or
A30/A31
Output value
Auxiliary Area
A23 or A33
Automatic
calculation
Inverter frequency
command value
Unit: Hz
Unit: 0.01 Hz
Example of
Calculating
Conversion Factor
Conditions
• Power Supply Frequency for One Motor Revolution per Second: 2 Hz
(PLC Setup)
• Number of Encoder Pulses for One Motor Revolution: 1,000 (PLC Setup)
• Rotary encoder resolution: 1,000 pulses/revolution (encoder specification)
• High-speed counter multiplier: x4 (PLC Setup)
• Gear ratio between motor and encoder shafts: 1/4 (machine specification)
• Error Counter Cycle: 12 ms (PLC Setup)
Calculation
The calculation performed inside the PLC is as shown below.
A23/A33
Inverter frequency
command value
(0.1-Hz increments)
2
1000 × 0.012
17
Serial Communications
(To 0.01-Hz
increments)
100
Output value: Hz
A20/A21
A30/A31
Output value: Hz
A20/A21
A30/A31
The command value calculated above is used in the Modbus-RTU command
frame, adjusting for the frequency unit. (See note.)
CP1L
Auxiliary Area
A23/A33
Automatic
calculation
Inverter
frequency
command value
Serial communications
Unit: 0.01 Hz
Refer to 6-3-3 Modbus-RTU Easy Master Function and to the inverter manual
for details on Modbus-RTU communications.
Note
Analog Output
If the frequency command unit set in the inverter is 0.1 Hz, divide the command frequency in A23 or A33 by 10.
The following example is for the CP1W-DA041/CP1W-DA021.
The analog output resolution is 6,000, so the command value calculated
above is multiplied by 6,000 divided by the inverter’s maximum output frequency.
302
Section 5-3
Inverter Positioning
Inverter frequency
command value (Hz)
Stored analog
output value
6,000
Inverter's max. output frequency (Hz)
CP1L
Auxiliary Area
A23/A33
Converting values in A23/A33 to Hz.
Inverter
frequency
command value
Automatic
calculations
1
6,000
100
Inverter maximum
output frequency (Hz)
Stored analog
output value
Analog output
Unit: 0.01 Hz
Converted in ladder program
Refer to 7-3 Analog Output Units for operating procedures for the Analog Output Unit.
■
Calculation Example
Conditions
Inverter’s maximum output frequency: 60 Hz
Calculation
The stored analog output value is calculated as follows:
Stored analog
output value
Auxiliary Area
A23/A33
(Unit: 0.01 Hz)
Auxiliary Area
A23/A33
(Unit: 0.01 Hz)
1
6,000
100
60
1
303
Section 5-3
Inverter Positioning
5-3-10 Memory Allocations
Built-in Input Area
Input terminal block
Word
Bit
Default
Normal inputs
Pulse output origin searches enabled
Origin search
Inverter positioning
enabled
CIO 0
00
(See note 1.)
01
Normal input 0
---
High-speed counter 0:
Phase A
High-speed counter 0:
Phase B
High-speed counter 1:
Phase A
High-speed counter 1:
Phase B
Normal input 1
---
02
Normal input 2
03
Normal input 3
Pulse output 0: Origin proximity input signal
(CPU Units with 14 I/O (See note 3.))
Pulse output 1: Origin proximity input signal
(CPU Units with 14 I/O (See note 3.))
Pulse output 0: Origin proximity input signal
(CPU Units with 10 I/O (See note 3.))
04
05
Normal input 4
Normal input 5
--Pulse output 0: Origin input signal (CPU
Units with 10 I/O (See note 3.))
-----
06(See note 2.)
Normal input 6
Pulse output 0: Origin input signal
---
07(See note 2.) Normal input 7
08 (See note 2.) Normal input 8
Pulse output 1: Origin input signal
---
-----
09 (See note 2.) Normal input 9 --10 (See note 2.) Normal input 10 Pulse output 0: Origin proximity input signal
(CPU Units with 20, 30,40 or 60 I/O)
-----
11 (See note 2.) Normal input 11 Pulse output 1: Origin proximity input signal
(CPU Units with 20, 30,40 or 60 I/O)
---
Note
(1) The above table shows only allocations related to inverter positioning.
(2) Bits 08 to 11 are not supported by CPU Units with 14 I/O Points. Bits 06
to 11 are not supported by CPU Units with 10 I/O Points.
(3) If inverter positioning 1 is used with a CPU Unit with 14 I/O Points, origin
searches (i.e., the origin proximity input signal) cannot be used.
Built-in Output Area
This area is not used for inverter positioning.
When inverter positioning is enabled, bits 00 to 03 in CIO 100 can be used as
normal outputs 0 to 3. The corresponding pulse output and PWM output cannot be used.
304
Section 5-3
Inverter Positioning
Auxiliary Area
Read Area
■
Inverter Positioning 0
Use one of the following for the inverter frequency command.
Word
A20
Bits
Function
00 to 15 Lower 4 digits of
present value of
unsigned output
value (output value =
present value of
error counter × error
counter cycle (s) ×
gain)
Note The maximum and minimum output
values are
applied.
A21
00 to 15 Upper 4 digits of
present value of
unsigned output
value (output value =
present value of
error counter × error
counter cycle (s) ×
gain)
Data range
Refresh timing
Application
examples
0000 0000 to 8000 Cleared to zero at following times:
This value can be
0000 hex
• When power to CPU Unit is turned ON used when not
(0 to
using automatic
• At start of operation
2,147,483,648)
frequency com• When an error counter error occurs
mand calculations
Updated at following times:
and instead to convert the output
• Cyclically according to error counter
value provided
cycle
here in the user
program for output
to the inverter.
This value is used
when signed data
is not required, i.e.,
when using communications or normal I/O to specify
the direction.
Note The maximum and minimum output
values are
applied.
305
Section 5-3
Inverter Positioning
Word
A23
Bits
Function
00 to 15 Inverter frequency
0000 to FFFF hex
command value
(0.00 to
(0.01-Hz increments, 655.35 Hz)
unsigned)
Note Set the Power
Supply Frequency for
One Motor
Revolution per
Second, Number of
Encoder
Pulses for
One Motor
Revolution,
and Error
Counter Cycle
in the PLC
Setup before
using this
value.
A24
A25
00 to 15 Lower 4 digits of
present value of
signed output value
(output value =
present value of
error counter × error
counter cycle (s) ×
gain)
Note The maximum and minimum output
values are
applied.
00 to 15 Upper 4 digits of
present value of
signed output value
(output value =
present value of
error counter × error
counter cycle (s) ×
gain)
Note The maximum and minimum output
values are
applied.
306
Data range
Refresh timing
Application
examples
These words conCleared to zero at following times:
• When power to CPU Unit is turned ON tain the automatically calculated
• At start of operation
frequency com• When an error counter error occurs
mand value for the
Updated at following times:
inverter. (This value
is normally used.)
Cyclically according to error counter
cycle
For example, if the
frequency setting
unit of the inverter
is 0.01 Hz, this
value can be used
as it in serial communications with
the inverter. When
converting to an
analog output (0 to
5 V, 1 to 5 V, 0 to 10
V, 0 to 20 mA, or 4
to 20 mA), this
value can be used
to simplify the conversion.
This value is used
when signed data
is not required, i.e.,
when using communications or normal I/O to specify
the direction.
8000 0000 to 7FFF Cleared to zero at following times:
FFFF hex
• When power to CPU Unit is turned ON
(−214,748,348 to
• At start of operation
214,748,347)
• When an error counter error occurs
Updated at following times:
• Cyclically according to error counter
cycle
This value can be
used when not
using automatic
frequency command calculations
and instead to convert the output
value provided
here in the user
program for output
to the inverter.
This value is used
when signed data
is required, i.e.,
when outputting
the frequency command with an analog output from −10
to 10 V.
Section 5-3
Inverter Positioning
Use the following for inverter positioning status and the workpiece position.
Word
A26
Bits
Function
Data range
00
Operation Command ON: Operation
Flag
command executed.
OFF: Stop command executed.
01
Forward Operation
Command Flag
02
Reverse Operation
Command Flag
03
In-position Flag
ON: Forward command in progress
OFF: Reverse
command in
progress or
stopped
Refresh timing
Application
examples
This flag is used as
Turned ON at following times:
a NO input condi• When inverter positioning is started
tion when calculatTurned OFF at following times:
ing the frequency
• When power to CPU Unit is turned ON command value in
the user program. It
• At start of operation
is also used as a
• When CPU Unit operation stops
NC input condition
• When inverter positioning is stopped
when clearing the
using INI instruction
frequency command value to zero.
This flag is used as
a NO input condition when outputting a forward
operation command to the
inverter from the
user program
It is also used as a
NC input condition
when outputting a
reverse command
to the inverter.
This flag is used as
ON: Reverse com- Turned ON at following times:
a NO input condimand in progress • When error counter present value is
tion when outputOFF: Forward
less than 0 (i.e., negative)
ting a reverse
command in
Turned OFF at following times:
operation comprogress or
• When error counter present value is
mand to the
stopped
greater than 0 (i.e., positive) or zero
inverter from the
• When power to CPU Unit is turned ON user program
• When CPU Unit operation starts
It is also used as a
NC input condition
• When CPU Unit operation stops
when outputting a
forward command
to the inverter.
Turned ON at following times:
ON: In position
This flag is used as
OFF: Not in posi• When pulse output to error counter is an NO condition
when clearing the
tion
stopped and absolute value of error
counter present value is less than in- frequency command value to zero
position range
from the user proTurned OFF at following times:
gram.
• When pulses are being output to error
counter
• When absolute value of error counter
present value is greater than in-position range.
• When power to CPU Unit is turned ON
• When CPU Unit operation starts
• When CPU Unit operation stops
Turned ON at following times:
• When error counter present value is
greater than 0 (i.e., positive)
Turned OFF at following times:
• When error counter present value is
less than 0 (i.e., negative) or zero
• When power to CPU Unit is turned ON
• When CPU Unit operation starts
• When CPU Unit operation stops
307
Section 5-3
Inverter Positioning
Word
A26
Bits
04
05
06
07
Function
Application
examples
This flag can be
Error Counter Error ON: Error counter Turned ON at following times:
Flag
error
• When pulse output to error counter is used to provide
notification of
OFF: No error
stopped and absolute value of error
counter present value is greater than excessive pulses in
or equal to error counter error detec- the error counter,
e.g., when manution value
ally moving the
Turned OFF at following times:
motor shaft while
• When error counter error is reset
positioning is
• When power to CPU Unit is turned ON stopped.
• When CPU Unit operation starts
• When CPU Unit operation stops
This flag is used to
Error Counter Pulse ON: Pulses being Turned ON at following times:
Output Flag
output
• When pulse output to error counter is determine whether
pulses are being
OFF: Pulse output
started
output to the error
stopped
Turned OFF at following times:
counter.
• When pulse output to error counter is This flag can be
stopped (including immediate stops
used to determine
and deceleration stops)
when internal pulse
• When power to CPU Unit is turned ON output has been
• When CPU Unit operation starts
completed and
start the next
• When CPU Unit operation stops
instruction.
Error Counter Pulse ON: Pulse output
This flag is used to
Turned ON at following times:
Output Acceleration/ to the error counter • When pulse output frequency to error detect changes in
Deceleration Flag
is accelerating or
the output frecounter is changed by ACC or PLS2
decelerating (i.e.,
quency when the
instruction
the frequency is
frequency is
Turned OFF at following times:
changing)
changed stepwise
OFF: Pulse output • During output of a constant pulse fre- for internal pulses
are being output by
to the error counter quency to error counter
• When pulse output to error counter is the ACC or PLS2
is constant
instruction. It can
stopped (including immediate stops
be used as a condiand deceleration stops)
• When power to CPU Unit is turned ON tion for executing
ACC or PLS2 dur• When CPU Unit operation starts
ing internal pulse
• When CPU Unit operation stops
output.
Error Counter Alarm ON: Error counter
Flag
alarm
OFF: No error
counter alarm
08 to 14 Not used.
15
Inverter Positioning
Output Value Sign
Flag
308
Data range
ON: Positive value
OFF: Negative
value
Refresh timing
Turned ON at following times:
• When pulse output to error counter is
stopped and absolute value of error
counter present value is greater than
or equal to error counter alarm detection value
Turned OFF at following times:
• When error counter alarm is reset
• When power to CPU Unit is turned ON
• When CPU Unit operation starts
• When CPU Unit operation stops
This flag can be
used to provide
notification of
excessive pulses in
the error counter,
e.g., when encoder
wiring breaks during positioning.
Turned ON at following times:
• When signed output value is between
0000 0000 and 7FFF FFFF hex.
Turned OFF at following times:
• When signed output value is between
FFFF FFFF and 8000 0000 hex.
This flag can be
used as a direction
signal
Section 5-3
Inverter Positioning
Word
Bits
Function
Data range
A270 00 to 15 Lower 4 digits of
high-speed counter
present value
A271 00 to 15 Upper 4 digits of
high-speed counter
present value
8000 000 to 7FFF
FFFF hex
(−2,147,483,648 to
2,147,483,647)
Refresh timing
The present value of the feedback
pulse from the encoder.
Operation is the same as for a highspeed counter.
Application
examples
Use as the absolute position of the
workpiece positioned with inverter
positioning.
Use the following for the present values of the internal pulse and error counter
of inverter positioning.
Word
Bits
Function
Data range
Refresh timing
Application
examples
A22
00 to 15 Error counter 0
present value
(signed)
8000 to 7FFF hex
(−32,768 to
32,767)
Cleared to zero at following times:
• When power to CPU Unit is turned ON
• At start of operation
• When an error counter error occurs
Updated at following times:
• Cyclically according to error counter
cycle
Held at following times:
• When Error Counter Disable Bit
(A562.01) is turned ON.
Use to monitor the
difference between
the target value
and the present
value.
A28
00 to 15 Lower 4 digits of
present value of
pulse output to
inverter (relative
value)
8000 0000 to 7FFF
FFFF hex
(−2,147,483,648 to
2,147,483,647)
These values can
be used to monitor
the present value
of internal pulse
output.
A29
00 to 15 Upper 4 digits of
present value of
pulse output to
inverter (relative
value)
Contains relative internal pulse output
value when pulses are output to error
counter.
Cleared to zero at following times:
• When power to CPU Unit is turned ON
• When operation is started
• When pulse output to error counter is
started
Updated at following times:
• Cyclically on error counter cycle
8000 0000 to 7FFF
FFFF hex
(−2,147,483,648 to
2,147,483,647)
Contains absolute movement value
from the internal pulse origin when
pulses are output to error counter.
Cleared to zero at following times:
• When power to CPU Unit is turned ON
• When operation is started
Updated at following times:
• Cyclically on error counter cycle
This value can be
used to monitor the
present value of
the internal pulse
output as an absolute value when
using absolute
coordinates.
A276 00 to 15 Lower 4 digits of the
present value of the
internal pulse output
(absolute value for
absolute coordinates)
A277 00 to 15 Upper 4 digits of the
present value of the
internal pulse output
(absolute value for
absolute coordinates)
309
Section 5-3
Inverter Positioning
■
Inverter Positioning 1
Use one of the following for the inverter frequency command.
Word
A30
Bits
Function
00 to 15 Lower 4 digits of
present value of
unsigned output
value (output value =
present value of
error counter × error
counter cycle (s) ×
gain)
Note The maximum and minimum output
values are
applied.
A31
A33
00 to 15 Upper 4 digits of
present value of
unsigned output
value (output value =
present value of
error counter × error
counter cycle (s) ×
gain)
Application
examples
0000 0000 to 8000 Cleared to zero at following times:
This value can be
0000 hex
• When power to CPU Unit is turned ON used when not
(0 to
using automatic
• At start of operation
2,147,483,648)
frequency com• When an error counter error occurs
mand calculations
Updated at following times:
and instead to convert the output
• Cyclically according to error counter
value provided
cycle
here in the user
program for output
to the inverter.
This value is used
when signed data
is not required, i.e.,
when using communications or normal I/O to specify
the direction.
Note The maximum and minimum output
values are
applied.
00 to 15 Inverter frequency
0000 to FFFF hex
command value
(0.00 to
(0.01-Hz increments, 655.35 Hz)
unsigned)
Note Set the Power
Supply Frequency for
One Motor
Revolution per
Second, Number of
Encoder
Pulses for
One Motor
Revolution,
and Error
Counter Cycle
in the PLC
Setup before
using this
value.
310
Data range
Refresh timing
Cleared to zero at following times:
• When power to CPU Unit is turned ON
• At start of operation
• When an error counter error occurs
Updated at following times:
Cyclically according to error counter
cycle
These words contain the automatically calculated
frequency command value for the
inverter. (This value
is normally used.)
For example, if the
frequency setting
unit of the inverter
is 0.01 Hz, this
value can be used
as it in serial communications with
the inverter. When
converting to an
analog output (0 to
5 V, 1 to 5 V, 0 to 10
V, 0 to 20 mA, or 4
to 20 mA), this
value can be used
to simplify the conversion.
This value is used
when signed data
is not required, i.e.,
when using communications or normal I/O to specify
the direction.
Section 5-3
Inverter Positioning
Word
A34
A35
Bits
Function
Data range
Refresh timing
Application
examples
00 to 15 Lower 4 digits of
8000 0000 to 7FFF Cleared to zero at following times:
This value can be
present value of
FFFF hex
• When power to CPU Unit is turned ON used when not
signed output value (−214,748,348 to
using automatic
• At start of operation
(output value =
214,748,347)
frequency com• When an error counter error occurs
present value of
mand calculations
Updated at following times:
and instead to conerror counter × error
vert the output
counter cycle (s) ×
• Cyclically according to error counter
value provided
gain)
cycle
here in the user
Note The maxiprogram for output
mum and minto the inverter.
imum output
This value is used
values are
when signed data
applied.
is required, i.e.,
00 to 15 Upper 4 digits of
when outputting
present value of
the frequency comsigned output value
mand with an ana(output value =
log output from −10
present value of
to 10 V.
error counter × error
counter cycle (s) ×
gain)
Note The maximum and minimum output
values are
applied.
Use the following for inverter positioning status and the workpiece position.
Word
A36
Bits
00
01
Function
Data range
Refresh timing
Application
examples
This flag is used as
Operation Command ON: Operation
Turned ON at following times:
a NO input condiFlag
command exe• When inverter positioning is started
tion when calculatcuted.
Turned OFF at following times:
ing the frequency
OFF: Stop com•
When
power
to
CPU
Unit
is
turned
ON
command value in
mand executed.
the user program. It
• At start of operation
is also used as a
• When CPU Unit operation stops
NC input condition
• When inverter positioning is stopped
when clearing the
using INI instruction
frequency command value to zero.
Forward Operation
ON: Forward com- Turned ON at following times:
This flag is used as
Command Flag
mand in progress • When error counter present value is
a NO input condition when outputOFF: Reverse
greater than 0 (i.e., positive)
ting a forward
command in
Turned OFF at following times:
operation comprogress or
• When error counter present value is
mand to the
stopped
less than 0 (i.e., negative) or zero
inverter from the
• When power to CPU Unit is turned ON user program
• When CPU Unit operation starts
It is also used as a
NC input condition
• When CPU Unit operation stops
when outputting a
reverse command
to the inverter.
311
Section 5-3
Inverter Positioning
Word
A36
312
Bits
Function
Data range
Application
examples
ON: Reverse com- Turned ON at following times:
This flag is used as
a NO input condimand in progress • When error counter present value is
tion when outputOFF: Forward
less than 0 (i.e., negative)
ting a reverse
command in
Turned OFF at following times:
operation comprogress or
•
When
error
counter
present
value
is
mand to the
stopped
greater than 0 (i.e., positive) or zero
inverter from the
• When power to CPU Unit is turned ON user program
• When CPU Unit operation starts
It is also used as a
NC input condition
• When CPU Unit operation stops
when outputting a
forward command
to the inverter.
02
Reverse Operation
Command Flag
03
In-position Flag
ON: In position
OFF: Not in position
04
Error Counter Error
Flag
ON: Error counter
error
OFF: No error
05
Error Counter Pulse
Output Flag
ON: Pulses being
output
OFF: Pulse output
stopped
Refresh timing
Turned ON at following times:
• When pulse output to error counter is
stopped and absolute value of error
counter present value is less than inposition range
Turned OFF at following times:
• When pulses are being output to error
counter
• When absolute value of error counter
present value is greater than in-position range.
• When power to CPU Unit is turned ON
• When CPU Unit operation starts
• When CPU Unit operation stops
Turned ON at following times:
• When pulse output to error counter is
stopped and absolute value of error
counter present value is greater than
or equal to error counter error detection value
Turned OFF at following times:
• When error counter error is reset
• When power to CPU Unit is turned ON
• When CPU Unit operation starts
• When CPU Unit operation stops
Turned ON at following times:
• When pulse output to error counter is
started
Turned OFF at following times:
• When pulse output to error counter is
stopped (including immediate stops
and deceleration stops)
• When power to CPU Unit is turned ON
• When CPU Unit operation starts
• When CPU Unit operation stops
This flag is used as
an NO condition
when clearing the
frequency command value to zero
from the user program.
This flag can be
used to provide
notification of
excessive pulses in
the error counter,
e.g., when manually moving the
motor shaft while
positioning is
stopped.
This flag is used to
determine whether
pulses are being
output to the error
counter.
This flag can be
used to determine
when internal pulse
output has been
completed and
start the next
instruction.
Section 5-3
Inverter Positioning
Word
A36
Bits
06
07
Function
Data range
Application
examples
Error Counter Pulse ON: Pulse output
This flag is used to
Turned ON at following times:
Output Acceleration/ to the error counter • When pulse output frequency to error detect changes in
Deceleration Flag
is accelerating or
the output frecounter is changed by ACC or PLS2
decelerating (i.e.,
quency when the
instruction
the frequency is
frequency is
Turned OFF at following times:
changing)
changed stepwise
OFF: Pulse output • During output of a constant pulse fre- for internal pulses
are being output by
to the error counter quency to error counter
• When pulse output to error counter is the ACC or PLS2
is constant
instruction. It can
stopped (including immediate stops
be used as a condiand deceleration stops)
• When power to CPU Unit is turned ON tion for executing
ACC or PLS2 dur• When CPU Unit operation starts
ing internal pulse
• When CPU Unit operation stops
output.
Error Counter Alarm ON: Error counter
Flag
alarm
OFF: No error
counter alarm
Refresh timing
Turned ON at following times:
• When pulse output to error counter is
stopped and absolute value of error
counter present value is greater than
or equal to error counter alarm detection value
Turned OFF at following times:
• When error counter alarm is reset
• When power to CPU Unit is turned ON
• When CPU Unit operation starts
• When CPU Unit operation stops
This flag can be
used to provide
notification of
excessive pulses in
the error counter,
e.g., when encoder
wiring breaks during positioning.
Turned ON at following times:
• When signed output value is between
0000 0000 and 7FFF FFFF hex.
Turned OFF at following times:
• When signed output value is between
FFFF FFFF and 8000 0000 hex.
A272 00 to 15 Lower 4 digits of the 8000 0000 to 7FFF Contains absolute movement value
present value of the FFFF hex
when pulses are output to error
internal pulse output (−2,147,483,648 to counter.
(absolute value for
2,147,483,647)
Cleared to zero at following times:
absolute coordi• When power to CPU Unit is turned ON
nates)
• When operation is started
A273 00 to 15 Upper 4 digits of the
Updated at following times:
present value of the
internal pulse output
• Cyclically on error counter cycle
(absolute value for
absolute coordinates)
This flag can be
used as a direction
signal.
08 to 14 Not used.
15
Inverter Positioning
Output Value Sign
Flag
ON:
OFF:
This value can be
used to monitor the
present value of
the internal pulse
output as an absolute value when
using absolute
coordinates.
313
Section 5-3
Inverter Positioning
Use the following for the present values of the internal pulse and error counter
of inverter positioning.
Word
Bits
Function
Data range
A32
00 to 15 Error counter 0
present value
(signed)
8000 to 7FFF hex
(−32,768 to
32,767)
A38
00 to 15 Lower 4 digits of
present value of
pulse output to
inverter (relative
value)
00 to 15 Upper 4 digits of
present value of
pulse output to
inverter (relative
value)
8000 0000 to 7FFF
FFFF hex
(−2,147,483,648 to
2,147,483,647)
A39
A278 00 to 15 Lower 4 digits of the
present value of the
internal pulse output
(absolute value for
absolute coordinates)
A279 00 to 15 Upper 4 digits of the
present value of the
internal pulse output
(absolute value for
absolute coordinates)
314
8000 0000 to 7FFF
FFFF hex
(−2,147,483,648 to
2,147,483,647)
Refresh timing
Application
examples
Use to monitor the
Cleared to zero at following times:
• When power to CPU Unit is turned ON difference between
the target value
• At start of operation
and the present
• When an error counter error occurs
value.
Updated at following times:
• Cyclically according to error counter
cycle
Saved at following times:
• When Error Counter Disable Bit
(A562.01) is turned ON.
Contains relative internal pulse output These values can
be used to monitor
value when pulses are output to error
the present value
counter.
of internal pulse
Cleared to zero at following times:
output.
• When power to CPU Unit is turned ON
• When operation is started
• When pulse output to error counter is
started
Updated at following times:
• Cyclically on error counter cycle
This value can be
Contains absolute movement value
used to monitor the
from the internal pulse origin when
present value of
pulses are output to error counter.
the internal pulse
Cleared to zero at following times:
output as an abso• When power to CPU Unit is turned ON lute value when
• When operation is started
using absolute
coordinates.
Updated at following times:
• Cyclically on error counter cycle
Section 5-3
Inverter Positioning
Read/Write Area
Word
A562
Bits
00
Function
Inverter
positioning 0
01
Data range
Refresh
timing
---
Application
Error Counter
Reset Bit
Turned ON: Error counter 0
present value (A22) reset and
Error Counter Error Flag cleared.
Turn ON this bit to
clear the error
counter error status.
Error Counter
Disable Bit
While ON: Error counter value
held.
---
Turn ON this bit, for
example, to disable
accumulating
pulses in the error
counter when stopping positioning and
moving the motor
shaft manually.
Error Counter
Reset Bit
Turned ON: Error counter 0
--present value (A32) reset and
Error Counter Error Flag cleared.
While ON: Error counter value
--held.
Turn ON this bit to
clear the error
counter error status.
Turn ON this bit, for
example, to disable
accumulating
pulses in the error
counter when stopping positioning and
moving the motor
shaft manually.
02 to 15 Not used.
A563
00
Inverter
positioning 1
01
Error Counter
Disable Bit
02 to 15 Not used.
Note
Present Values of High-speed Counter and Pulse Outputs
The present value of the high-speed counter when inverter positioning is used
is stored in the same memory location as for normal high-speed counter application. This value can be used as the present value of feedback pulses from
the encoder, i.e., as the absolute position of inverter positioning. Target value
and range comparisons for high-speed counters are also valid.
The present value of the pulse output (A276/A277 or A278/A279), i.e., the
pulse output value to the error counter, is an absolute position if an absolute
coordinate system is specified and is a relative position if a relative coordinate
system is specified.
Present value of pulse output
CP1L
CP1L
Pulse output
instruction
Target frequency
Internal
pulses
Inverter
Error
counter
Motor
Power
supply
frequency
Encoder
Present value of
high-speed counter
315
Section 5-3
Inverter Positioning
5-3-11 Application Example with Serial Communications
Positioning with
Trapezoidal Control
Specifications and
Operation
Note
When start input CIO 1.04 turns ON, 600,000 pulses are output internally for
inverter positioning 0 to turn the motor shaft.
Refer to 5-3-7 Determining the Internal Pulse Output Frequency for the formula to convert the frequency and use the converted internal pulse frequency.
The number of output pulses is calculated from the encoder specifications
and the high-speed counter multiplier.
Target
20,000 Hz
frequency
Acceleration:
100 Hz/4 ms
No. of output
pulses: 600,000
Deceleration:
80 Hz/4 ms
Starting
100 Hz
frequency
Start input
CIO 0.05
System Configuration
Inverter
Speed Command via Serial Communications
SYSMAC
CP1L
RS-485
communications
(Modbus-RTU)
IN
L1
L2/N
COM
01
00
03
05
07
09
11
01
03
05
07
09
11
02
04
06
08
10
00
02
04
06
08
10
00
01
02
03
04
06
00
01
COM
03
04
06
COMM
COM
COM
COM
OUT
CP1L
COM
05
07
02
COM
05
07
CP1W-CIF11/
CIF12
3G3MV
3G3RV
Standard motor
Feedback pulses
Encoder
Instructions Used
316
PLS2(887)
Section 5-3
Inverter Positioning
Terminal Allocations
■
Error Counter
Error counter 1
Phase B
Error counter 0
Phase B
L1
L2/N COM
01
03
00
02
05
04
Error counter 1
Phase Z
07
09
06
08
11
01
10
03
00
02
■
04
07
06
09
08
11
10
CIO 1
CIO 0
Error counter 0
Phase A
05
Error counter 1
Phase A
Error counter 0
Phase Z
RS-422A/485 Communications (CP1W-CIF11/CIF12)
SW
ON
1
RDA- RDB+ SDA- SDB+
2
FG
3
4
5
6
■
Inverter (3G3MV)
S5
S1
S6
S2
S7
S3
P1
S4
P2
SC
R+
PC
RS+
S-
SW1
PNP
AM
FR
AC
FC
RP
SW2
OFF
NPN
■
FS
1
ON
2
Encoder
Black
Phase A
White
Phase B
Encoder
(Power supply: 24 VDC)
Orange Phase Z
Brown
+Vcc
Blue
COM
24-VDC power supply
0V
+24 V
317
Section 5-3
Inverter Positioning
Connection Example
■
Encoder (24 VDC) Connections to High-speed Counter 0
[email protected]@DT-D
Differential-phase
Input
Phase A
Black
0.00 Error counter 0: Phase A, 0 V
Encoder
(Power supply: 24 VDC)
Phase B
White
0.01 Error counter 0: Phase B, 0 V
Orange Phase Z
Brown +Vcc
0.04 Error counter 0: Phase Z, 0 V
COM (COM 24 V)
Blue 0 V (COM)
24-V DC power supply
0V
+24 V
■
RS-422A/485 (CP1W-CIF11/CIF12) Connections to Inverter
S5
S6
S7
P1
P2
R+
R-
FS
FR
FC
RS-422A/485
RDA- RDB+
SDA-
SDB+
S1
FG
S2
CP1W-CIF11/CIF12
SW
ON
1
S3
S4
SC
PC
S+
S-
AM
AC
RP
Inverter
SW1
2
SW2
3
Either setting
1
ON
2
Either setting
4
5
6
■
Inverter Connections to Motor
U
V
Motor
Parameter Settings
for 3G3MV Inverter
318
W
U/T1 V/T2 W/T3
Inverter
When connecting the Inverter to the PLC, communications parameters must
be set in the Inverter. The settings of parameters n152 to n157 cannot be
changed while communications are in progress. Always set them before starting communications.
Section 5-3
Inverter Positioning
Example settings of 3G3MV parameters are listed below. Refer to the User’s
Manual of the Inverter for details on the parameters.
Parameter
No.
n003
RUN command selection
0: The RUN Key and STOP/RESET Key on the
0
Digital Operator are enabled.
1: Multi-function input is enabled through the control circuit terminals.
2: RS-422A/485 communications are enabled.
3: Input is enabled from the optional Communications Unit.
2
n004
Frequency reference selection
0: Frequency reference adjustment
0
1: Frequency reference 1 (n024)
2: Frequency reference control terminal (0 to 10
V)
3: Frequency reference control terminal (4 to 20
mA)
4: Frequency reference control terminal (0 to 20
mA)
5: Pulse train reference control terminal
6: Frequency reference through RS-422A/RS-485
7: Multi-function analog voltage input (0 to 10 V)
8: Multi-function analog current input (4 to 20 mA)
9: Frequency reference input through optional
Communications Unit.
6
n005
Stopping method selection
0: Decelerates to stop
1: Coasts to stop
0
0
n006
Reverse rotation-prohibit
selection
0: Reverse enabled
1: Reverse disabled
0
0
n011
Maximum frequency (FMAX)
50.0 to 400.0 Hz (0.1-Hz increments)
60.0 Hz
n016
Minimum output frequency
(FMIN)
Acceleration/deceleration time
setting unit
0.1 Hz to 10.0 Hz (0.1-Hz increments)
1.5 Hz
60.0 Hz
(Depends
on machine
configuration.)
0.1 Hz
0: 0.1 s
1: 0.01 s
0 to 6,000 s
0
0
n018
Name
Description
n019
Acceleration time 1
n020
n151
Deceleration time 1
RS-422A/485 communications
timeover detection selection
(The time between receiving
PLC signals is monitored, Timeout time: 2 s.)
n152
RS-422A/485 communications 0: 0.1 Hz
frequency reference/display
1: 0.01 Hz
unit selection
2: Converted value based on 30,000 decimal as
maximum frequency
3: 0.1% (Maximum frequency: 100%)
Default
Setting
10.0 s
0
0 to 6,000 s
10.0 s
0: Detects time-over, fatal error, and the Inverter 0
coasts to a stop.
1: Detects time-over, detects fatal error, and the
Inverter decelerates to a stop in deceleration time
1.
2: Detects time-over, detects fatal error, and the
Inverter decelerates to a stop in deceleration time
2.
3: Detects time-over, detects nonfatal error warning, and the Inverter continues operating.
4: No time-over is detected.
0
0
0
1
319
Section 5-3
Inverter Positioning
Parameter
No.
n153
n154
n155
n156
n157
Name
Description
Default
Setting
RS-422A/485 communications Setting range: 0 to 32
Slave address
00: Communications disabled
01 to 32: Slave address
0
1
RS-422A/485 baud rate selec- 0: 2,400 bps
tion
1: 4,800 bps
2: 9,600 bps
3: 19,200 bps
RS-422A/485 parity selection 0: Even
1: Odd
2: No parity
RS-422A/485 send wait time
Set value: 10 to 65 ms
Setting unit: 1 ms
RS-422A/485 RTS control
0: RTS control enabled
selection
1: RTS control disabled
2
2
0
0
10 ms
10 ms
0
0
PLC Setup
■
Note
Serial Port Communications Settings
(1) Set the baud rate and parity check settings to the same value as for the
Inverter communications parameters.
(2) Set the serial port to the serial gateway communications mode.
320
Section 5-3
Inverter Positioning
■
Note
High-speed Counter Settings (on Built-in Input Tab Page)
(1) Set high-speed counter 0 when using inverter positioning 0. Set highspeed counter 1 when using inverter positioning 1.
(2) Use linear mode for inverter positioning.
■
Ladder Program
Inverter Positioning Settings (on Inverter Positioning 0 or 1 Tab Page)
The following Modbus-RTU communications parameters are used.
Baud rate
Format
9,600 bits/s
8, 1, E
Serial communications mode Serial Gateway
321
Section 5-3
Inverter Positioning
Serial port 1 is used for communications with the Inverter.
Starting Inverter
Positioning
0.05
@PLS2(887)
#0020
#0000
D200
D300
Start input
■
Inverter positioning 1
CW, relative pulses
Target frequency, No. of output pulses
Starting frequency
PLS2(887) Settings
Setting details
Address
Data
Acceleration rate: 100 Hz/4 ms
Deceleration rate: 80 Hz/4 ms
D200
D201
0064
0050
Target frequency: 20,000 Hz
D202
D203
4E20
0000
Number of output pulses: 600,000 pulses
D204
D205
27C0
0009
Starting frequency: 100 Hz
D300
D301
0064
0000
• High-speed counter 0 (i.e., error counter 0) is used for the feedback pulse
input port.
Stopping Internal Pulse
Output to the Error
Counter
0.06
@INI
#0003
Port specifier
(Error counter 0: 0020 hex)
0003 hex: Stop virtual pulse output
0000
0000 (Not used.)
#0020
• Internal pulse output is stopped immediately.
• Inverter positioning (i.e., the error counter) will continue to function.
Operation
Set to 0.
Error counter
Inverter
Inductive motor
Encoder
Stopping Inverter
Positioning
0.07
@INI
#0020
Port specified (Error counter 0: 0020 hex)
#0004
0004 hex: Stop inverter positioning
0000
0000 (Not used.)
• Internal pulse output is stopped immediately.
• The output value will remain at 0 until the error counter is reset.
322
Section 5-3
Inverter Positioning
• Pulse outputs will not be accepted until the error counter is reset. (Executing a pulse output instruction will cause an error.)
Operation
Outputs not
accepted
Error counter
Inverter
Inductive motor
Encoder
Referencing the
Automatically Calculated
Inverter Frequency
Command Value
If the following settings are made in the PLC Setup, the inverter frequency
command value will be calculated automatically and set in A23 in the Auxiliary
Area. These settings are on the Inverter Positioning 0 Tab Page in the PLC
Setup.
• Power Supply Frequency for One Motor Revolution per Second (0.1-Hz
increments)
• Number of Encoder Pulses for One Motor Revolution
• Error Counter Cycle (x 4 ms)
The inverter frequency command value in A23 is accessed. The value is
stored in 0.01-Hz increments.
A641.00
Modbus
simple master
function not
active
A026.00
Operation
Command
Flag
A26.01
Forward Command Flag
MOV
#0001
D1
Sets operation
command
in D1.
MOV
A023
D2
Sets frequency
command
value in D2.
MOV
#0000
D10
Sets forward
command in
D10.
A26.02
Reverse Command Flag
MOV
#0001
D10
Sets reverse
command in
D10.
Operation Command Flag
A641.00
A26.00
A26.03
MOV
#0000
D1
Sets stop
command
in D1.
In-position Flag
■
Internal Work Addresses
Address
D1
Usage
Bits 00 to 03: Run/Stop Command
D2
D10
Bits 00 to 15: Frequency Command Value
Bits 00 to 03: Forward/Reverse Command
323
Section 5-3
Inverter Positioning
Setting Modbus
Communications
Registers
A641.00
MOV
#0001
Modbus
simple master
function not
active
Slave address:
01 hex
D32200
MOV
#0010
Function code:
10 hex (write data)
D32201
MOV
#0009
Number of
communications data
bytes: 09 hex (9 bytes)
D32202
MOV
#0001
Register number of
write start data: 0001
hex
D32203
MOV
#0002
Number of write data
registers: 0002 hex
D32204
MOV
#0400
Number of attached
data bytes: 04 hex (4
bytes)
D32205
XFRB
#0480
D1
D32206
XFRB
#0190
D10
Moves bits 00 to 03 of
D1 (Run/Stop
Command) to D32206
(register 0001) bits 08 to
11.
Moves bit 00 of D10
(Forward/Reverse
Command) to bit 09 of
D15.
D15
ORW
D15
D32206
D32206
XFRB
#0808
D2
ORs D15 and D32206
(register 0001) and
stores the result in
D32206. (Reflect bit 09
of D15 in D32206
(register 0001).
Move bits 08 to 15 of D2
(frequency command
value) to bits 00 to 07 of
D32206 (register 0001).
D32206
XFRB
#0880
D2
D32207
324
Move bits 00 to 07 of D2
(frequency command
value) to bits 08 to 15 of
D32207 (register 0002).
Section 5-3
Inverter Positioning
■
Internal Work Addresses
Address
Usage
D1
Bits 00 to 03: Run/Stop Command
■
D2
D10
Bits 00 to 15: Frequency Command Value
Bits 00 to 03: Forward/Reverse Command
D15
Bit 09: Forward/Reverse Command
Settings Addresses
Address
D32200
Usage
Bits 00 to 07: Slave address
Data
01
D32201
D32202
Bits 00 to 07: Function code
Bits 00 to 07: Number of communications data bytes
10
09
D32203
D32204
Bits 00 to 15: Register number of write start data
Bits 00 to 15: Number of data registers to write
0001
0002
D32205
D32206
Bits 08 to 15: Number of attached data bytes
04
Bits 00 to 07: Upper bytes of frequency command value in D2 --Bit 08: Run/Stop Command
Bit 09: Forward/Reverse Command
Bits 08 to 15: Lower bytes of frequency command value in D2 ---
D32207
Modbus Communications
A26.00
A641.00
Modbus-RTU Master Execution Bit
Operation
Command Flag
Add the above instructions to the end of the program as a starting condition
for the ladder programming example. For error processing, refer to the ladder
program in 6-3-3 Modbus-RTU Easy Master Function and to the inverter’s
manual.
5-3-12 Application Example with an Analog Output
Positioning with
Trapezoidal Control
Specifications and
Operation
Note
When start input CIO 1.04 turns ON, 600,000 pulses are output internally for
inverter positioning 0 to turn the motor shaft.
Refer to 5-3-7 Determining the Internal Pulse Output Frequency for the formula to convert the frequency and use the converted internal pulse frequency.
The number of output pulses is calculated from the encoder specifications
and the high-speed counter multiplier.
Target
20,000 Hz
frequency
Acceleration:
100 Hz/4 ms
No. of output
pulses: 600,000
Deceleration:
80 Hz/4 ms
Starting
100 Hz
frequency
Start input
CIO 0.05
325
Section 5-3
Inverter Positioning
System Configuration
Speed Command via Analog Output
SYSMAC
CP1L
· Frequency
command
IN
L1
L2/N
COM
01
00
03
02
05
04
00
01
COM
07
09
06
08
02
COM
03
COM
11
10
04
COM
01
00
06
05
07
03
05
02
04
00
01
COM
07
06
03
02
09
04
COM
11
10
08
06
05
Inverter
Current/Voltage
Output
OUT
07
CH
I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 AG
VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC
OUT
Output Bits
· Forward
· Reverse
CP1L
3G3MV
3G3RV
CP1W-DA021
CP1W-DA041/DA042
(Analog Output Unit)
CP1W-MAD11
CP1W-MAD42/MAD44
(Analog I/O Unit)
Standard motor
Feedback pulses
Encoder
Instructions Used
PLS2(887)
Terminal Allocations
■
Error Counter
Error counter 1
Phase B
Error counter 0
Phase B
L2/N COM
L1
01
00
03
02
05
04
Error counter 1
Phase Z
07
06
09
08
11
10
01
00
03
02
04
■
00
−
Error counter 1
Phase A
01
02
03
04
COM COM COM COM
06
Error counter 0
Phase Z
05
00
07
Output word CIO 100
01
COM
03
02
04
COM
06
05
Output word CIO 101
CP1W-DA041
OUT
CH
I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 NC
VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC
I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 NC
VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC
326
06
Built-in Outputs
+
■
07
CIO 1
CIO 0
Error counter 0
Phase A
05
07
09
08
11
10
Section 5-3
Inverter Positioning
■
Inverter (3G3MV)
S5
S1
S6
S2
S7
P1
S3
S4
P2
SC
R+
PC
R−
S+
S-
SW1
FR
AM
FC
AC
RP
SW2
PNP
OFF
NPN
■
FS
1
ON
2
Encoder
Encoder
(Power supply: 24 VDC)
Black
Phase A
White
Phase B
Orange Phase Z
Brown +Vcc
Blue 0 V (COM)
24-V DC power supply
0V
+24 V
Connection Example
■
Encoder (24 VDC) Connections to High-speed Counter 0
[email protected]@DT-D
Black
Phase A
Encoder
(Power supply: 24 VDC)
Differential-phase
Input
0.00 Error counter 0: Phase A, 0 V
White
Phase B
0.01 Error counter 0: Phase B, 0 V
Orange Phase Z
0.04 Error counter 0: Phase Z, 0 V
Brown +Vcc
COM (COM 24 V)
Blue 0 V (COM)
24-V DC power supply
0V
+24 V
327
Section 5-3
Inverter Positioning
■
Output Terminal Connections to Inverter
Inverter
S5
S1
S6
S2
S7
S3
P1
S4
P2
SC
R+
PC
RS+
FS
S-
FR
AM
FC
AC
RP
PLC
+
00
-
01
02
03
04
COM COM COM COM
06
05
00
07
Output word CIO 100
■
01
COM
03
02
04
COM
06
05
07
Output word CIO 101
CP1W-DA041 (Current Output) Connections to Inverter
Inverter
S5
S1
S6
S2
S7
S3
P1
S4
P2
SC
R+
PC
RS+
FS
S-
FR
AM
CP1W-DA041
IOUT1 VOUT2 COM2 IOUT3 VOUT4 COM4
VOUT1 COM IOUT2 VOUT3 COM3 IOUT4
Inverter Switch Settings
NPN
SW1
SW2
■
Either setting
2
ON (Current: I)
Inverter Connections to Motor
U
V
Motor
328
1
W
U/T1 V/T2 W/T3
Inverter
NC
NC
FC
AC
RP
Section 5-3
Inverter Positioning
Parameter Settings
for 3G3MV Inverter
When connecting the Inverter to the PLC, communications parameters must
be set in the Inverter.
Example settings of 3G3MV parameters are listed below. Refer to the User’s
Manual of the Inverter for details on the parameters.
Parameter
No.
Name
Description
Default
0: The RUN Key and STOP/RESET Key on the
0
Digital Operator are enabled.
1: Multi-function input is enabled through the control circuit terminals.
2: RS-422A/485 communications are enabled.
3: Input is enabled from the optional Communications Unit.
0: Digital Operator
0
1: Frequency reference 1 (n024)
2: Frequency reference control terminal (0 to 10 V)
3: Frequency reference control terminal (4 to 20
mA)
4: Frequency reference control terminal (0 to 20
mA)
5: Pulse train reference control terminal
6: Frequency reference through RS-422A/RS-485
7: Multi-function analog voltage input (0 to 10 V)
8: Multi-function analog current input (4 to 20 mA)
9: Frequency reference input through optional
Communications Unit.
Setting
n003
RUN command selection
n004
Frequency reference selection
n050
n051
Multi-function input 1
Multi-function input 2
1 to 25
1 to 25
1
2
1
2
n060
n061
Frequency reference gain
Frequency reference bias
0% to 255% (1% increments)
−100% to 100% (1% increments)
100%
0%
100%
0%
n005
Stopping method selection
0
0
n006
Reverse rotation-prohibit
selection
0
0
n011
Maximum frequency (FMAX)
0: Decelerates to stop
1: Coasts to stop
0: Reverse enabled
1: Reverse disabled
50.0 to 400.0 Hz (0.1-Hz increments)
n016
Minimum output frequency
(FMIN)
0.1 Hz to 10.0 Hz (0.1-Hz increments)
n018
Acceleration/deceleration time
setting unit
0: 0.1 s
1: 0.01 s
0
0
n019
n020
Acceleration time 1
Deceleration time 1
0 to 6,000 s
0 to 6,000 s
10.0 s
10.0 s
0
0
1
4
60.0 Hz 60.0 Hz
(Depends
on machine
configuration.)
1.5 Hz 0.1 Hz
329
Section 5-3
Inverter Positioning
PLC Setup
■
Note
High-speed Counter Settings (on Built-in Input Tab Page)
(1) Set high-speed counter 0 when using inverter positioning 0. Set highspeed counter 1 when using inverter positioning 1.
(2) Use linear mode for inverter positioning.
■
330
Inverter Positioning Settings (on Inverter Positioning 0 or 1 Tab Page)
Section 5-3
Inverter Positioning
Ladder Program
Starting Inverter
Positioning
0.05
PLS2(887)
#0020
#0000
D200
D300
Start input
Note
Inverter positioning 1
CW, relative pulses
Target frequency, No. of output pulses
Starting frequency
The pulse output method (CCW/CW or pulse + direction) setting and direction
setting are not used.
■
PLS2(887) Settings
Setting details
Address
Data
Acceleration rate: 100 Hz/4 ms
Deceleration rate: 80 Hz/4 ms
D200
D201
0064
0050
Target frequency: 20,000 Hz
D202
D203
4E20
0000
Number of output pulses: 600,000 pulses
D204
D205
27C0
0009
Starting frequency: 100 Hz
D300
D301
0064
0000
• High-speed counter 0 (i.e., error counter 0) is used for the feedback pulse
input port.
Stopping Internal Pulse
Output to the Error
Counter
0.06
@INI
#0020
Port specifier (Error counter 0: 0020 hex)
#0003
0003 hex: Stop virtual pulse output
0000
0000 (Not used.)
• Internal pulse output is stopped immediately.
• Inverter positioning (i.e., the error counter) will continue to function.
Operation
Set to 0.
Error counter
Inverter
Inductive motor
Encoder
Stopping Inverter
Positioning
0.07
@INI
#0020
Port specified (Error counter 0: 0020 hex)
#0004
0004 hex: Stop inverter positioning
0000
0000 (Not used.)
• Internal pulse output is stopped immediately.
• The output value will remain at 0 until the error counter is reset.
• Pulse outputs will not be accepted until the error counter is reset. (Executing a pulse output instruction will cause an error.)
331
Section 5-3
Inverter Positioning
Operation
Outputs not
accepted
Error counter
Inverter
Inductive motor
Encoder
Referencing the
Automatically Calculated
Inverter Frequency
Command Value
If the following settings are made in the PLC Setup, the inverter frequency
command value will be calculated automatically and set in A23 in the Auxiliary
Area. These settings are on the Inverter Positioning 0 Tab Page in the PLC
Setup.
• Power Supply Frequency for One Motor Revolution per Second (0.1-Hz
increments)
• Number of Encoder Pulses for One Motor Revolution
• Error Counter Cycle (x 4 ms)
The inverter frequency command value in A23 is accessed and converted to
an analog output signal. The CP1W-DA041 has a resolution of 6,000, so the
conversion to an analog signal is performed as follows:
6,000 ÷ 60 Hz (inverter’s maximum output frequency) ÷ 100 = 1
The conditions are as follows:
P_On
TIM
0
T0
A26.00
*U
A023
Analog
conversion
trigger
Time for data for Analog Output Unit to become valid.
#0003
Always ON Flag
Operation
Command Bit
&100
D1010
/U
D1010
To convert to the analog output value, the inverter
frequency command value is multiplied by 100
(analog resolution of 6,000 divided by inverter's
maximum frequency of 60) and stored in D1010
and D1011.
The frequency command value is divided by
100 to convert to Hz and stored in D1020.
&100
D1020
MOV
D1020
Operation
Command Bit
A26.00
T0
MOV
Analog
conversion
trigger
A26.03
The contents of D102 is set in D1020.
D102
#0000
An analog value of 0 for the
stop command set in D102.
D102
In-position Flag
Forward
Command Bit
T0
A26.01
Reverse
Command Bit
A26.02
100.02
Analog
conversion
trigger
A26.01
Forward/Reverse Command
Bit turned ON.
A26.02
100.03
Forward
Command Bit
Reverse
Command Bit
In this example, the results of *U and /UL are 1, so the value in A23 is moved
directly to D102 with MOV.
332
Section 5-3
Inverter Positioning
■
Internal Work Addresses
Address
D1010
D1011
D1020
T0
■
Usage
Holds the frequency command value converted for the analog
output resolution.
Holds the frequency command value converted from 0.01-Hz
increments to hertz.
Analog conversion trigger
Settings Addresses
Address
CP1W-DA041 Analog
Output Settings
Usage
D102
CIO 100.02
Bits 00 to 15: Analog output value
Forward (external output)
CIO 100.03
Reverse (external output)
Analog output 1 is used in this example. It is set to a range of 4 to 20 mA. The
scaled value is set in the analog conversion area of the Analog Output Unit.
P_First_Cycle
MOV
#800B
First Cycle
Flag
102
MOV
#0000
Analog output 1 set to a
range of 0 to 20 mA
(range code: B hex).
Analog outputs 2 to 4 are
not used.
D103 (scaled value) is
initialized.
103
MOV
#0000
D102 (scaled value) is
initialized.
D102
T0
MOV
D102
102
The scaled value in
D102 is written as the
converted data for
analog output 1.
Refer to the first line in the programming example in Referencing the Automatically Calculated Inverter Frequency Command Value on page 332 for a timer
for the time required for the Analog Output Unit’s data to be valid (analog conversion trigger: T0).
■
Internal Work Addresses
Address
■
D102
Usage
Bits 00 to 15: Analog output value
T0
Analog conversion trigger
Settings Addresses
Address
CIO 102
Usage
Bits 00 to 15: Analog conversion area
CIO 103
Bits 00 to 15: Analog conversion area
333
Section 5-3
Inverter Positioning
5-3-13 Supplemental Information
Restrictions
• Inverter positioning 0 and inverter positioning 1 each use one high-speed
counter and one serial port (except that a serial port is not used when an
Analog Output Unit is used). (High-speed counter 0 is allocated to inverter
positioning 0 and high-speed counter 1 is allocated to inverter positioning
1.)
• When inverter positioning 0 or 1 is used, the corresponding pulse output
(0 or 1) and the corresponding PWM command (pulse output 0 or 1) cannot be used.
Precautions
• Determine the in-position range based on the mechanical system. Use a
smaller range if positioning precision is required. If the range is too small,
however, time may be required when stopping. If stopping quickly is more
important than precision, increase the in-position range.
• The error counter cycle also affects the conversion between the output
value and the inverter frequency command value. Refer to 5-3-9 Automatic Calculation of Inverter Frequency Command Value for details.
• If inverter positioning does not end normally, adjust the following settings.
Reduce the acceleration/deceleration rates.
Lower rates will stabilize operation at the end of acceleration/deceleration.
Reduce the target frequency.
Change the error counter cycle. Increasing the error counter cycle improve
stopping precision, but it may also cause unstable speeds during operation.
Adjust the gain.
Increasing the gain will improve stopping precision, but it may also cause
unstable speeds during operation.
334
SECTION 6
Advanced Functions
This section describes all of the advanced functions of the CP1L that can be used to achieve specific application needs.
6-1
Interrupt Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
336
6-2
6-1-1 Overview of CP1L Interrupt Functions . . . . . . . . . . . . . . . . . . . . . .
6-1-2 Input Interrupts (Direct Mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-1-3 Input Interrupts (Counter Mode) . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-1-4 Scheduled Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-1-5 High-speed Counter Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Quick-response Inputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
336
341
346
349
352
361
6-3
Serial Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
365
6-4
6-3-1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-3-2 No-protocol Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-3-3 Modbus-RTU Easy Master Function . . . . . . . . . . . . . . . . . . . . . . . .
6-3-4 Communications: Smart Active Parts and Function Blocks. . . . . . .
6-3-5 Serial PLC Links. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-3-6 1:1 Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-3-7 1:N NT Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-3-8 1:1 NT Links. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-3-9 Host Link Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Analog Adjuster and External Analog Setting Input . . . . . . . . . . . . . . . . . . .
365
368
370
374
376
385
387
388
389
393
6-5
6-4-1 Analog Adjuster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-4-2 External Analog Setting Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Battery-free Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
393
393
394
6-6
6-5-1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-5-2 Using Battery-free Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Memory Cassette Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
394
395
396
6-6-1
6-6-2
6-6-3
6-6-4
6-6-5
396
397
399
400
6-7
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Mounting and Removing a Memory Cassette . . . . . . . . . . . . . . . . .
Operation Using the CX-Programmer . . . . . . . . . . . . . . . . . . . . . . .
Memory Cassette Data Transfer Function . . . . . . . . . . . . . . . . . . . .
Procedures for Automatic Transfer from the Memory Cassette
at Startup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Program Protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-8
6-7-1 Read Protection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-7-2 Write Protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-7-3 Protecting Program Execution Using the Lot Number. . . . . . . . . . .
Failure Diagnosis Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
404
410
412
413
6-9
6-8-1 Failure Alarm Instructions: FAL(006) and FALS(007) . . . . . . . . . .
6-8-2 Failure Point Detection: FPD(269) . . . . . . . . . . . . . . . . . . . . . . . . . .
6-8-3 Simulating System Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-8-4 Output OFF Bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
413
414
416
417
417
403
404
335
Section 6-1
Interrupt Functions
6-1
6-1-1
Interrupt Functions
Overview of CP1L Interrupt Functions
The CP1L CPU Unit’s processing is normally cyclical (overseeing processing
→ program execution → I/O refreshing → peripheral servicing), with cyclic
tasks executed in the program execution stage of the cycle. The interrupt
functions can be used to temporarily interrupt this cyclic processing and execute a particular program when a predefined condition occurs.
Types of Interrupt
Functions
Input Interrupts (Direct
Mode)
When one of the CPU Unit’s built-in inputs goes from OFF to ON (or ON to
OFF), the corresponding interrupt task is executed. Interrupt tasks 140 to 145
are allocated to the 8 input terminals used for the input interrupts.
Input Interrupts (Counter
Mode)
This function counts input pulses at one of the CPU Unit’s built-in inputs and
executes the corresponding interrupt task when the count reaches the SV.
The maximum input response frequency for input interrupts (in counter mode)
is 5 kHz.
Scheduled Interrupts
This function executes an interrupt task at a fixed time interval measured by
the CPU Unit’s built-in timer. The time interval units can be set to 10 ms, 1 ms,
or 0.1 ms. The minimum timer SV is 0.5 ms.
Interrupt task 2 is allocated to scheduled interrupt.
High-speed Counter
Interrupts
This function counts input pulses with the CPU Unit’s built-in high-speed
counter and executes an interrupt task when the count reaches the preset
value or falls within a preset range (target-value or zone comparison). An
interrupt task between 0 and 255 can be allocated with an instruction.
Refer to 5-1 High-speed Counters for details on high-speed counters.
Note
(1) Power OFF interrupts cannot be used with CP1L CPU Units.
(2) The input terminals are used for input interrupts, but cannot used for
quick-response inputs, high-speed counters, origin searches and normal
inputs.
336
Interrupt Functions
Section 6-1
Creating an Interrupt
Task Program
1,2,3...
1. Right-click NewPLC1 [CP1L] Offline in the project workspace and select
Insert Program from the pop-up menu. A new program called
NewProgram2 (unassigned) will be inserted in the project workspace.
2. Right-click NewProgram2 (unassigned) and select Properties from the
pop-up menu to display the Program Properties Window.
3. Set the Task type in the Program Properties Window.
In this example, interrupt task 140 was allocated to NewProgram2.
If you click the X Button in the upper-right corner of the window, you can create the program that will be executed as interrupt task 140.
The programs allocated to each task are independent and an END(001)
instruction must be input at the end of each program.
337
Section 6-1
Interrupt Functions
Interrupt Task Priority
The input interrupts (direct mode and counter mode), high-speed counter
interrupts, scheduled interrupts, and external interrupts all have the same priority. If interrupt task A (an input interrupt, for example) is being executed
when interrupt task B (a scheduled interrupt, for example) is called, task A
processing will not be interrupted. Task B processing will be started when task
A is completed.
If two different types of interrupt occur simultaneously, they are executed in
the following order:
Input interrupt
(direct mode or
counter mode)
>
High-speed
counter interrupt
>
Scheduled
interrupt
If two of the same type interrupt occur simultaneously, the task with the lower
interrupt task number is executed first.
Note
Duplicate Processing
in Cyclic and Interrupt
Tasks
If a user program is likely to generate multiple interrupts simultaneously, the
interrupt tasks will be executed in the order shown above, so it may take some
time from the occurrence of the interrupt condition to the actual execution of
the corresponding interrupt task. In particular, it is possible that scheduled
interrupts will not be executed in the preset time, so the program must be
designed to avoid interrupt conflicts if necessary.
If a memory address is processed both by a cyclic task and an interrupt task,
an interrupt mask must be set to disable interrupts.
When an interrupt occurs, execution of the cyclic task will be interrupted
immediately, even during execution of a cyclic task’s instruction, and the partially processed data is saved. After the interrupt task is completed, processing returns to the cyclic task and the interrupted processing restarts with the
data saved before the interrupt processing. If the interrupt task overwrites a
memory address used by one of the interrupted instruction’s operands, that
overwrite may not be reflected after the saved data is restored as processing
returns to the cyclic task.
To prevent an instruction from being interrupted during processing, enter
DI(693) just before the instruction to disable interrupts and EI(694) just after
the instruction to enable interrupts again.
338
Section 6-1
Interrupt Functions
a. The following example shows duplicate processing by an interrupt
task, which interrupts processing of a +B instruction between the first
and third operands and overwrites the same memory address.
Cyclic task
Interrupt task
+B
MOV
D0
#0010
D0
#0001
D0
Flow of Processing
D0
Read D0 value (1234).
1234
BCD addition: 1234 + 1 = 1235
Interrupt occurs.
Processing
interrupted.
Processing
of +B
instruction
MOV executed
0010 moved to D0.
Data saved.
Addition result (1235)
0010
Interrupt completed.
Processing
continues.
Write addition result (1235).
1235
The interrupt occurs during processing of the +B instruction and the result is
saved temporarily without being written to the destination word (D0).
The interrupt task transfers the value of #0010 to D0, but the saved result of
the +B instruction (1235) is written to D0 when processing returns to the cyclic
task. In the end, the interrupt task’s processing has no effect.
Prevention of Duplicate Processing
Cyclic task
Disables execution of
interrupt programs.
DI
+B
D0
#0001
D0
EI
Enables execution of
interrupt programs.
339
Section 6-1
Interrupt Functions
b.
The following example shows duplicate processing by an interrupt
task, which interrupts processing while BSET is writing to a block of
words and yields an incorrect comparison result.
Interrupt task
Cyclic task
BSET
CMP
#1234
D0
D10
D0
D10
A
Equals Flag
Flow of Processing
D0
1234
#1234 set in D0.
#1234 set in D1.
Interrupted.
CMP(020)
processing
BSET(071)
processing
D1
D2
003E 0502
1234
A
D10
ABCD OFF
Interrupt occurs.
Read D0.
Read D1.
Compare D0 and D10.
Output result.
1234
ABCD
OFF*1
Interrupt completed.
Continued.
#1234 set in D2.
#1234 set in D10.
1234
1234
0502
1234
ABCD
1234
1234*2 OFF
Since the interrupt occurs during BSET(071) processing and before #1234 is
set in D10, the content of D0 and D10 do not match when the comparison is
made in the interrupt task (*1) and output A remains OFF.
In the end (*2), the D0 and D10 both contain #1234 and match, but the correct
comparison result is not reflected in comparison result output A.
Prevention of Duplicate Processing
Cyclic task
Disables execution of
interrupt programs.
DI
BSET
#1234
D0
D10
EI
340
Enables execution of
interrupt programs.
Section 6-1
Interrupt Functions
6-1-2
Input Interrupts (Direct Mode)
This function executes an interrupt task when the corresponding input signal
(up or down differentiated) is received.
Input Interrupt Bit and
Terminal Allocations
The following diagrams show the input bits and terminals that are used for the
input interrupt function in each CPU Unit.
Input Terminal Block of
CPU Units with 10 I/O
Points
The 2 input bits CIO 0.04 to CIO 0.05 can be used for input interrupts.
Upper Terminal Block
(Example: AC Power
Supply Modules)
L1
Input interrupt 1
L2/N COM
01
00
03
02
05
04
Inputs(CIO 0)
Input interrupt 0
Input Terminal Block of
CPU Units with 14 I/O
Points
The 4 input bits CIO 0.04 to CIO 0.07 can be used for input interrupts.
Input interrupt 1
Upper Terminal Block
(Example: CPU Unit
with AC Power Supply)
L1
L2/N COM
Input interrupt 3
01
00
03
02
05
04
07
06
Inputs (CIO 0)
NC
NC
NC
NC
Input interrupt 2
Input interrupt 0
Input Terminal Block of
CPU Units with 20 I/O
Points
The 6 input bits CIO 0.04 to CIO 0.09 can be used for input interrupts.
Upper Terminal Block
(Example: CPU Unit
with AC Power Supply)
L1
Input interrupt 3
Input interrupt 5
Input interrupt 1
L2/N COM
00
01
03
02
05
04
07
06
09
08
11
10
Inputs (CIO 0)
Input interrupt 0
Input interrupt 4
Input interrupt 2
341
Section 6-1
Interrupt Functions
Input Terminal Block of
CPU Units with 30 I/O
Points
The 6 input bits CIO 0.04 to CIO 0.09 can be used for input interrupts.
Upper Terminal Block Input interrupt 3
(Example: CPU Unit
with AC Power Supply) Input interrupt 1
L1
L2/N COM
01
00
Input interrupt 5
03
02
05
04
07
06
09
08
11
10
Inputs (CIO 0)
01
03
00
02
05
04
Inputs (CIO 1)
Input interrupt 0
Input interrupt 4
Input interrupt 2
Input Terminal Block of
CPU Units with 40 I/O
Points
The 6 input bits CIO 0.04 to CIO 0.09 can be used for input interrupts.
Upper Terminal Block
(Example: CPU Unit
with AC Power Supply)
Input interrupt 3
Input interrupt 5
Input interrupt 1
L1
L2/N COM
01
00
03
02
05
07
04
06
09
08
11
01
10
00
Inputs (CIO 0)
03
02
05
04
07
09
06
11
08
10
Inputs (CIO 1)
Input interrupt 0
Input interrupt 4
Input interrupt 2
Input Terminal Block of
CPU Units with 60 I/O
Points
The 6 input bits CIO 0.04 to CIO 0.09 can be used for input interrupts.
Upper Terminal Block
(Example: AC Power
Supply Modules)
Input interrupt 3
Input interrupt 5
Input interrupt 1
L1 L2/N COM 01
00
03
02
Inputs(CIO 0)
Input interrupt 0
Input interrupt 2
342
05
04
07
06
09
08
11
10
01
00
03
02
05
04
07
06
Inputs(CIO 1)
Input interrupt 4
09
08
11
10
01
00
03
02
05
04
07
06
Inputs(CIO 2)
09
08
11
10
Section 6-1
Interrupt Functions
Setting the Input Functions in the PLC Setup
Normally, bits CIO 0.04 to CIO 0.09 are used as normal inputs. When using
these inputs for input interrupts, use the CX-Programmer to change the
input’s setting in the PLC Setup.
Input terminal
block
Word
Bit
CPU Unit
CPU Units with
60 I/O Points
CPU Units with
40 I/O Points
CPU Units with
30 I/O Points
CPU Units with
20 I/O Points
Input
interrupt
CPU Units with
14 I/O Points
Task
number
CPU Units with
10 I/O Points
CIO 0 00
Normal input 0 Normal input 0 Normal input 0 Normal input 0 Normal input 0 Normal input 0 ---
---
01
Normal input 1 Normal input 1 Normal input 1 Normal input 1 Normal input 1 Normal input 1 ---
---
02
Normal input 2 Normal input 2 Normal input 2 Normal input 2 Normal input 2 Normal input 2 ---
---
03
Normal input 3 Normal input 3 Normal input 3 Normal input 3 Normal input 3 Normal input 3 ---
---
04
Normal input 4 Normal input 4 Normal input 4 Normal input 4 Normal input 4 Normal input 4 Input
Interrupt
interrupt 0 task 140
05
Normal input 5 Normal input 5 Normal input 5 Normal input 5 Normal input 5 Normal input 5 Input
Interrupt
interrupt 1 task 141
06
Normal input 6 Normal input 6 Normal input 6 Normal input 6 Normal input 6 ---
Input
interrupt
2**
Interrupt
task
142**
07
Normal input 7 Normal input 7 Normal input 7 Normal input 7 Normal input 7 ---
Input
interrupt
3**
Interrupt
task
143**
08
Normal input 8 Normal input 8 Normal input 8 Normal input 8 ---
---
Input
interrupt
4*
Interrupt
task
144*
09
Normal input 9 Normal input 9 Normal input 9 Normal input 9 ---
---
Input
interrupt
5*
Interrupt
task
145*
10
Normal input
10
Normal input
10
Normal input
10
Normal input
10
---
---
---
---
11
Normal input
11
Normal input
11
Normal input
11
Normal input
11
---
---
---
---
CIO 1 00 to Normal input
05
12 to 17
Normal input
12 to 17
Normal input
12 to 17
---
---
---
---
---
Normal inputs
18 to 23
---
---
---
---
---
---
---
---
---
---
---
---
---
06 to Normal inputs
11
18 to 23
CIO 2 00 to Normal inputs
11
24 to 35
Note
*Input interrupts 4 and 5 are not supported by CPU Units with 10 or 14 I/O
Points.
**Input interrupts 2 and 3 are not supported by CPU Units with 10 I/O Points.
Procedure
Select the input interrupts.
↓
Wire the inputs.
• Determine the inputs to be used for input
interrupts and corresponding task numbers.
• Wire the inputs.
↓
Set the PLC Setup.
• Use the CX-Programmer to select the interrupt inputs in the PLC Setup.
↓
Write the ladder program.
• Write the programs for the corresponding
interrupt task numbers.
• Use MSKS(690) to specify up-differentiation
or down-differentiation.
• Use MSKS(690) to enable input interrupts (in
direct mode).
343
Section 6-1
Interrupt Functions
PLC Setup
Click the Built-in Input Tab to display the Interrupt Input settings (at the bottom
of the tab). Set the input function to Interrupt for each input that will be used
as an input interrupt.
Note
(1) Interrupt Input settings IN0 to IN7 correspond to input interrupt numbers
0 to 7.
(2) When using an input as a general-purpose (normal) input, set the input
function to Normal.
Writing the Ladder
Program
MSKS(690) Settings
The MSKS(690) instruction must be executed in order to use input interrupts.
The settings made with MSKS(690) are enabled with just one execution, so in
general execute MSKS(690) in just one cycle using an up-differentiated condition.
MSKS(690) has the following two functions and two of the instructions are
used in combination. If an up-differentiated input interrupt is being used, the
first MSKS(690) instruction can be omitted since the input is set for up-differentiation by default.
Execution condition
MSKS(690)
N
S
1. Specifies up-differentiated or
down-differentiated input
interrupt.
MSKS(690) 2. Enables or disables the input
interrupt.
N
S
344
Section 6-1
Interrupt Functions
MSKS(690) Operands
Input interrupt
number
1. Up-differentiation or
Down-differentiation
140
N
Input
interrupt
number
110 (or 10)
Input interrupt 1 141
Input interrupt 2** 142
111 (or 11)
112 (or 12)
Input interrupt 3** 143
Input interrupt 4* 144
113 (or 13)
114
Input interrupt 5* 145
115
Input interrupt 0
Note
Interrupt
task
number
S
Execution
condition
#0: Up-differentiated
#1: Downdifferentiated
2. Enabling/Disabling
the input interrupt
N
Input
interrupt
number
100 (or 6)
101 (or 7)
102 (or 8)
103 (or 9)
104
S
Enable/
Disable
#0: Enable
interrupt
#1: Disable
interrupt
105
*Input interrupts 4 and 5 are not supported by the CPU Units with 10 or 14 I/O
Points.
**Input interrupts 2 and 3 are not supported by the CPU Units with 10 I/O
Points.
Writing the Interrupt
Task’s Program
Create programs for interrupt tasks 140 to 145, which are executed by the corresponding input interrupt. Always put an END(001) instruction at the last
address of the program.
Input Interrupt
Settings and
Operation
This example shows how to execute interrupt task 140 when input CIO 0.04
goes ON.
Settings
1,2,3...
1. Connect an input device to input 0.04.
2. Use the CX-Programmer to set input 0 as an input interrupt in the PLC Setup.
3. Use the CX-Programmer to create the program to use for interrupt processing and allocate the program to interrupt task 140.
4. Use the CX-Programmer to write MSKS(690) in the program.
W0.00
(Execution condition)
MSKS(690)
110
#0
1. Specifies input interrupt 0.
2. Specifies up-differentiated input interrupt.
MSKS(690)
100
#0
3. Specifies input interrupt 0.
4. Enables the input interrupt.
345
Section 6-1
Interrupt Functions
Operation
When execution condition W0.00 goes ON, MSKS(690) is executed to enable
CIO 0.04 as an up-differentiated input interrupt.
If CIO 0.04 goes from OFF to ON (up-differentiation), processing of the cyclic
task that is currently being executed will be interrupted and processing of
interrupt task 140 will start. When the interrupt task processing is completed,
processing of the interrupted ladder program will restart.
W0.00
0.04
MSKS(690) executed
Processing
Cyclic task processing
interrupted
Interrupt
task 140
processing
Restrictions
6-1-3
Cyclic task
processing
Processing
interrupted
Interrupt
task 140
processing
Inputs cannot be used for input interrupts when they are being used as general-purpose (normal) inputs or quick-response inputs.
Input Interrupts (Counter Mode)
Overview
This function counts up-differentiated or down-differentiated input signals and
executes an interrupt task when the count reaches the set value.
• The counter-mode input interrupts use the same input terminals as the
direct-mode input interrupts. Refer to 6-1-2 Input Interrupts (Direct Mode)
for details.
• The counter input mode can be set to up or down (incrementing or decrementing) with MSKS(690).
• The counter-mode input interrupts start the same interrupt tasks (140 to
145) as the direct-mode input interrupts.
• The maximum input response frequency is 5 kHz total for all countermode input interrupts.
Relationship of Input Bits,
Task Numbers, and
Counters
Note
Input bits
0.04
Function
Counter words
Input interrupt Interrupt task
SV
PV
number
number
(0000 to FFFF)
Input interrupt 0 140
A532
A536
0.05
0.06**
Input interrupt 1 141
Input interrupt 2** 142
A533
A534
A537
A538
0.07**
0.08*
Input interrupt 3** 143
Input interrupt 4* 144
A535
A544
A539
A548
0.09*
Input interrupt 5* 145
A545
A549
*Input interrupts 4 and 5 are not supported by CPU Units with 10 or 14 I/O
Points.
**Input interrupts 2 and 3 are not supported by CPU Units with 10 I/O Points.
346
Section 6-1
Interrupt Functions
Procedure
Select the input interrupts (counter
mode).
↓
Wire the inputs.
• Determine the inputs to be used for input
interrupts and corresponding task numbers.
• Wire the inputs.
↓
Set the PLC Setup.
• Use the CX-Programmer to select the interrupt inputs in the PLC Setup.
↓
Set the counter SVs.
• Set the interrupt counter SVs in the corresponding AR Area words.
↓
Write the ladder program.
Note
• Write the programs for the corresponding
interrupt task numbers.
• Use MSKS(690) to specify up-differentiation
or down-differentiation.
• Use MSKS(690) to enable input interrupts (in
counter mode).
The input interrupt (counter mode) function is one of the input interrupt functions and executes an interrupt based on the pulse count. If the input pulse
frequency is too high, interrupts will occur too frequently and prevent normal
cyclic task processing. In this case, cycle time too long errors may occur or
the pulse input may not be read.
The maximum total frequency of the counter-mode interrupt inputs is 5 kHz.
Even in this case, the high frequencies may adversely affect other devices’
operation or the system load, so check the system’s operation thoroughly
before using the counters at high frequencies.
PLC Setup
The procedures for using the CX-Programmer to set the PLC Setup are the
same as the procedures for input interrupts (direct mode). Refer to 6-1-2 Input
Interrupts (Direct Mode) for details.
Writing the Ladder
Program
MSKS(690) Settings
The MSKS(690) instruction must be executed in order to use input interrupts.
The settings made with MSKS(690) are enabled with just one execution, so in
general execute MSKS(690) in just one cycle using an up-differentiated condition.
MSKS(690) has the following two functions and three of the instructions are
used in combination. If up-differentiated input pulses are being used, the first
MSKS(690) instruction can be omitted since the input is set for up-differentiation by default.
Execution condition
MSKS(690)
N
S
1. Specifies up-differentiated or
down-differentiated inputs.
MSKS(690)
N
S
2. Enables or disables the input interrupt.
347
Section 6-1
Interrupt Functions
MSKS(690) Operands
Input interrupt
number
Interrupt 1. Up-differentiation or
task
Down-differentiation
muber
N
S
Count
Input
Count
interrupt
trigger
number
Input interrupt 0 140
110 (or 10) #0: Up-differentiated
Input interrupt 1 141
111 (or 11) pulses
#1: DownInput interrupt 2** 142**
112 (or 12)
differentiInput interrupt 3** 143**
113 (or 13) ated pulses
Note
2. Enabling/Disabling the
input interrupt
N
Input
interrupt
number
S
Enable/
Disable
100 (or 6)
#2: Start counting down (decrementing) and
enable interrupts
#3: Start counting up (incrementing) and
enable interrupts
101 (or 7)
102 (or 8)
103 (or 9)
Input interrupt 4* 144*
114
104
Input interrupt 5* 145*
115
105
*Input interrupts 4 and 5 are not supported by CPU Units with 10 or 14 I/O
Points.
**Input interrupts 2 and 3 are not supported by CPU Units with 10 I/O Points.
Writing the Interrupt
Task’s Program
Create programs for interrupt tasks 140 to 145, which are executed by the corresponding input interrupt. Always put an END(001) instruction at the last
address of the program.
Input Interrupt
Settings and
Operation
This example shows how to execute interrupt task 141 when 200 up-differentiated pulses have been counted at input CIO 0.05. (The counter is an incrementing counter.)
Settings
1,2,3...
1. Connect an input device to input 0.05.
2. Use the CX-Programmer to set input 0.05 as an input interrupt in the PLC
Setup.
3. Use the CX-Programmer to create the program to use for interrupt processing and allocate the program to interrupt task 141.
4. Use the CX-Programmer to set a high-speed counter SV of 00C8 hex (200
decimal) in A533.
5. Use the CX-Programmer to write MSKS(690) in the program.
W0.00
(Execution condition)
MSKS(690)
111
#0
MSKS(690)
111
#3
Operation
348
Specifies input interrupt 1.
Specifies up-differentiated pulses.
Specifies input interrupt 1.
Specifies an incrementing counter,
starts counting, and enables the input
interrupt.
When execution condition W0.00 goes ON, MSKS(690) is executed to enable
operation of the input interrupt in counter mode.
Section 6-1
Interrupt Functions
When CIO 0.05 goes from OFF to ON 200 times, processing of the cyclic task
that is currently being executed will be interrupted and processing of interrupt
task 141 will start. When the interrupt task processing is completed, processing of the interrupted ladder program will restart.
W0.00
0.05
Counter SV (in A533)
= 200 (00C8 hex)
Counter PV (in A537)
0
Counting enabled.
Restrictions
6-1-4
Interrupt task 141
executed.
Inputs cannot be used for input interrupts when they are being used as general-purpose (normal) inputs or quick-response inputs.
Scheduled Interrupts
This function executes an interrupt task at a fixed time interval measured by
the CPU Unit’s built-in timer. Interrupt task 2 is allocated to scheduled interrupt.
Procedure
Set the PLC Setup.
• Use the CX-Programmer to set the scheduled
interrupt timer units in the PLC Setup.
↓
Write the ladder program.
PLC Setup
• Write the program allocated to interrupt task
2 (scheduled interrupt task).
• Use MSKS(690) to specify the timer SV.
Click the Timings Tab and set the input function to Scheduled Interrupt Interval (the scheduled interrupt timer’s units). The timing units can be set to 10
ms, 1 ms, or 0.1 ms. The scheduled interrupt timer SV is calculated by multiplying this interval setting by the timer SV set with MSKS(690).
349
Section 6-1
Interrupt Functions
Scheduled Interrupt Interval Setting
Note
(1) Set a scheduled interrupt time (interval) that is longer than the time required to execute the corresponding interrupt task.
(2) If the scheduled time interval is too short, the scheduled interrupt task will
be executed too frequently, which may cause a long cycle time and adversely affect the cyclic task processing.
(3) If an interrupt task is being executed for another interrupt (input interrupt,
high-speed counter interrupt, or external interrupt) when the scheduled
interrupt occurs, the scheduled interrupt will not be executed until the other interrupt task is completed.
When different kinds of interrupts are being used, design the program to
handle multiple interrupts smoothly. Even if two interrupts occur at the
same time, the scheduled interrupts will continue as programmed, so the
scheduled interrupt tasks will continue to occur at the scheduled times
even if specific scheduled interrupts are delayed.
Writing the Ladder
Program
MSKS(690) Settings
The MSKS(690) instruction must be executed in order to use the scheduled
interrupt. The settings made with MSKS(690) are enabled with just one execution, so in general execute MSKS(690) in just one cycle using an up-differentiated condition.
Execution condition
MSKS(690)
N
S
350
Specifies scheduled interrupt 0 (interrupt task 2).
Sets the scheduled interrupt time interval and
starts timing.
Section 6-1
Interrupt Functions
MSKS(690) Operands
Operand
N
S
Scheduled interrupt
number
Interrupt time
Scheduled interrupt 0
(interrupt task 2)
14: Reset start
4: Start without reset
Writing the Scheduled
Interrupt Task’s Program
#0000 to #270F
(0 to 9999)
Interrupt time interval (period)
Time units set in Scheduled time
PLC Setup
interval
10 ms
1 ms
10 to 99,990 ms
1 to 9,999 ms
0.1 ms
0.5 to 999.9 ms
Create the program for interrupt task 2 (scheduled interrupt 0), which is executed by the input interrupt. Always put an END(001) instruction at the last
address of the program.
Selecting the Scheduled Interrupt Task
Input Interrupt
Settings and
Operation
This example shows how to execute interrupt task 2 at 30.5 ms intervals.
Settings
1,2,3...
1. Use the CX-Programmer to set the scheduled interrupt time units to 0.1
ms.
2. Use the CX-Programmer to create the interrupt program allocated to interrupt task 2.
W0.00
(Execution condition)
MSKS(690)
14
&305
Operation
Specifies scheduled interrupt 0 (reset start).
Sets the scheduled time interval to 30.5 ms
(305 x 0.1 ms = 30.5 ms)
When execution condition W0.00 goes ON, MSKS(690) is executed to enable
the scheduled interrupt with the reset start specified. The timer is reset and
timing starts.
Scheduled interrupt 2 is executed every 30.5 ms.
W 0.00
Internal
clock
Cyclic task
processing
30.5 ms
Cyclic task
processing
30.5 ms
Interrupt
Interrupt
task 2
Cyclic task
processing
30.5 ms
Interrupt
Interrupt
task 2
Cyclic task
processing
Interrupt
Interrupt
task 2
351
Section 6-1
Interrupt Functions
6-1-5
High-speed Counter Interrupts
This function executes the specified interrupt task (0 to 255) when the CP1L
CPU Unit’s built-in high-speed counter PV matches a pre-registered value
(target value comparison) or lies within a pre-registered range (range comparison).
• CTBL(882) is used to register the comparison table.
• Either CTBL(882) or INI(880) can be used to start comparison.
• INI(880) is used to stop comparison.
For details on the built-in high-speed counter, refer to 5-1 High-speed
Counters.
Procedure
Set the PLC Setup.
• Using the CX-Programmer, set the PLC
Setup so that the built-in input is used for a
high-speed counter.
↓
Wire the inputs.
• Wire the input being used for the high-speed
counter.
↓
Write the ladder program.
PLC Setup
352
• Write the interrupt task program.
• Use CTBL(882) to register the high-speed
counter number and comparison table. Create the comparison table’s data in advance.
Click the Built-in Input Tab to and set the high-speed counters that will be
used for interrupts.
Section 6-1
Interrupt Functions
Settings
Item
Use high speed counter 0 to 3 Use counter
Setting
Counting mode
Linear mode
Circular mode (ring mode)
Circular Max. Count
0 to FFFF FFFF hex
(When circular (ring) mode is selected as the counting mode, set maximum ring value here.)
Phase Z and software reset
Reset method
Software reset
Phase Z and software reset (continue comparing)
Input Setting
Software reset (continue comparing)
Differential phase inputs (4x)
Pulse + direction inputs
Up/Down inputs
Increment pulse input
Input Function Settings
According the PLC Setup
Setting
If the built-in inputs are set to be used as high-speed counters 0 to 3, the function of the input bits will change as shown in the following table. If a highspeed counter is set to be used, the bits in CIO 0 and CIO 1 can no longer be
used for normal inputs, input interrupts, or quick-response inputs.
353
Section 6-1
Interrupt Functions
■ CPU Units with 20, 30, 40 or 60 I/O Points
Address
Word
Bit
Default setting
CPU Units CPU Units CPU Units CPU Units
with 60 I/O with 40 I/O with 30 I/O with 20 I/O
Points
Points
Points
Points
CIO 0 00
Normal
input 0
Normal
input 0
Normal
input 0
Normal
input 0
Counter 0,
increment input
Counter 0, A phase,
up, or count input
---
01
Normal
input 1
Normal
input 1
Normal
input 1
Normal
input 1
Counter 1,
increment input
Counter 0, B phase,
down, or direction
input
---
02
Normal
input 2
Normal
input 2
Normal
input 2
Normal
input 2
Counter 2,
increment input
Counter 1, A phase,
up, or count input
---
03
Normal
input 3
Normal
input 3
Normal
input 3
Normal
input 3
Counter 3,
increment input
Counter 1, B phase,
down, or direction
input
---
04
Normal
input 4
Normal
input 4
Normal
input 4
Normal
input 4
Counter 0,
phase-Z reset input
Counter 0, phase-Z
reset input
---
05
Normal
input 5
Normal
input 5
Normal
input 5
Normal
input 5
Counter 1,
phase-Z reset input
Counter 1, phase-Z
reset input
---
06
Normal
input 6
Normal
input 6
Normal
input 6
Normal
input 6
Counter 2,
phase-Z reset input
---
Pulse output 0:
Origin input
signal
07
Normal
input 7
Normal
input 7
Normal
input 7
Normal
input 7
Counter 3,
phase-Z reset input
---
Pulse output 1:
Origin input
signal
08
Normal
input 8
Normal
input 8
Normal
input 8
Normal
input 8
---
---
---
09
Normal
input 9
Normal
input 9
Normal
input 9
Normal
input 9
---
---
---
10
Normal
input 10
Normal
input 10
Normal
input 10
Normal
input 10
---
---
Pulse output 0:
Origin proximity input signal
11
Normal
input 11
Normal
input 11
Normal
input 11
Normal
input 11
---
---
Normal
input 12
to 17
Normal
input 18
to 23
Normal
input 24
to 35
Normal
input 12
to 17
Normal
input 18
to 23
---
Normal
input 12
to 17
---
---
---
---
Pulse output 1:
Origin proximity input signal
---
---
---
---
---
---
---
---
---
---
CIO 1 00 to
05
06 to
11
CIO 2 00 to
11
354
High-speed counter operation settings:
Single-phase
Two-phase
Origin searches
(increment pulse (differential phases
input)
x4, up/down, or
pulse/direction)
Section 6-1
Interrupt Functions
■ CPU Units with 14 I/O Points
Input terminal block
Word
CIO 0
Default setting
Bit
High-speed counter settings
Single-phase
(increment pulse
input)
Two-phase
(differential phase x4,
up/down, or
pulse/direction)
Origin searches
00
Normal input 0
High-speed counter 0:
Increment input
High-speed counter 0:
Phase A, Increment, or
Count input
---
01
Normal input 1
High-speed counter 1:
Increment input
High-speed counter 0:
Phase B, Decrement,
or Direction input
---
02
Normal input 2
High-speed counter 2:
Increment input
High-speed counter 1:
Phase A, Increment, or
Count input
Pulse output 0: Origin
proximity input signal
03
Normal input 3
High-speed counter 3:
Increment input
High-speed counter 1:
Phase B, Decrement,
or Direction input
Pulse output 1: Origin
proximity input signal
04
Normal input 4
High-speed counter 0:
Phase Z or reset input
High-speed counter 0:
Phase Z or reset input
---
05
Normal input 5
High-speed counter 1:
Phase Z or reset input
High-speed counter 1:
Phase Z or reset input
---
06
Normal input 6
High-speed counter 2:
Phase Z or reset input
---
Pulse output 0: Origin
input signal
07
Normal input 7
High-speed counter 3:
Phase Z or reset input
---
Pulse output 1: Origin
input signal
■ CPU Units with 10 I/O Points
Address
Word
CIO 0
Default setting
Bit
High-speed counter Operation settings:
Single-phase
(increment pulse
input)
Two-phase
(differential phase x4,
up/down, or
pulse/direction)
Origin searches
00
Normal input 0
Counter 0, increment
input
Counter 0, A phase, up, --or count input
01
Normal input 1
Counter 1, increment
input
Counter 0, B phase,
--down, or direction input
02
Normal input 2
Counter 2, increment
input
Counter 1, A phase, up, --or count input
03
Normal input 3
Counter 3, increment
input
Counter 1, B phase,
Pulse output 0: Origin
down, or direction input proximity input signal
04
Normal input 4
Counter 0, phase-Z
reset input
Counter 0, phase-Z
reset input
---
05
Normal input 5
Counter 1, phase-Z
reset input
Counter 1, phase-Z
reset input
Pulse output 0: Origin
input signal
355
Section 6-1
Interrupt Functions
High-speed Counter
Memory Areas
Content
PV
Range Comparison Condition Met Flags
Comparison In-progress
Flags
Overflow/Underflow Flags
Count Direction Flags
Note
REGISTER
COMPARISON TABLE
Instruction:
CTBL(882)
High-speed counter
Leftmost 4 digits
0
A271
1
A273
Rightmost 4 digits
ON for match in range 1
A270
A274.00
A272
A275.00
ON for match in range 2
ON for match in range 3
A274.01
A274.02
A275.01
A275.02
ON for match in range 4
ON for match in range 5
A274.03
A274.04
A275.03
A275.04
ON for match in range 6
ON for match in range 7
A274.05
A274.06
A275.05
A275.06
ON for match in range 8
ON while the comparison is in
progress.
A274.07
A274.08
A275.07
A275.08
ON if a PV overflow or underflow occurred while operating
in linear mode.
0: Decrementing
1: Incrementing
A274.09
A275.09
A274.10
A275.10
The comparison table and comparison conditions 1 to 8 are different for target-value comparison and range comparison operations. For details, refer to
next page.
CTBL(882) compares the PV of a high-speed counter (0 to 3) to target values
or target value ranges and executes the corresponding interrupt task (0 to
255) when the specified condition is met.
Execution condition
@CTBL(882)
P
C
TB
Operand
Settings
P
High-speed
counter number
#0000
#0001
High-speed counter 0
High-speed counter 1
C
Control data
#0000
Registers a target-value comparison table and
starts the comparison operation.
Registers a range comparison table and starts
the comparison operation.
Registers a target-value comparison table.
#0001
#0002
TB
356
P: High-speed counter number
C: Control data
TB: First comparison table word
First comparison
table word
#0003
Registers a range comparison table.
Specifies the leading word address of the comparison
table, which is described below.
Section 6-1
Interrupt Functions
Contents of the
Comparison Table
Target-value Comparison Table
Depending on the number of target values in the table, the target-value comparison table requires a continuous block of 4 to 145 words.
Number of target values
0001 to 0030 hex (1 to 48 target values)
Target value 1 (rightmost digits)
Target value 1 (leftmost digits)
0000 0000 to FFFF FFFF hex
Task number for target value 1
Target value 48 (rightmost digits)
Target value 48 (leftmost digits)
0000 0000 to FFFF FFFF hex
Task number for target value 48
Interrupt task number
Direction
0: Incrementing
1: Decrementing
Interrupt task number
00 to FF hex (0 to 255)
Range Comparison Table
The range comparison table requires a continuous block of 40 words because
comparison conditions 1 to 8 require 5 words each (2 words for the upper
range value, 2 words for the lower range value, and one word for the interrupt
task number).
Range 1 lower value (rightmost)
Range 1 lower value (leftmost
Range 1 upper value (rightmost)
0000 0000 to FFFF FFFF hex (see note)
0000 0000 to FFFF FFFF hex (see note)
Range 1 upper value (leftmost
Task number for range 1
Range 8 lower value (rightmost)
Range 8 lower value (leftmost
Range 8 upper value (rightmost)
0000 0000 to FFFF FFFF hex (see note)
0000 0000 to FFFF FFFF hex (see note)
Range 8 upper value (leftmost
Task number for range 8
Interrupt task number: 0000 to 00FF hex (0 to 255)
AAAA hex: Do not start interrupt task
FFFF hex: Disables that range’s settings.
Note
MODE CONTROL
Instruction: INI(880)
Always set the upper limit greater than or equal to the lower limit in each
range.
INI(880) can be used to start/stop comparison with the high-speed counter’s
comparison table, change the high-speed counter’s PV, change the PV of
interrupt inputs in counter mode, and control the pulse output functions.
Execution condition
@INI (880)
P
C
NV
P: Port specifier
C: Control data
NV: First word of new PV
357
Section 6-1
Interrupt Functions
Operand
Port specifier
P
#0000, #0001
Settings
Pulse outputs 0 or 1
#0010
#0011
High-speed counter 0
High-speed counter 1
#0100 to #0105 Input interrupts 0 to 5 (in counter mode)
#1000 or #1001 PWM(891) output 0 or 1
C
Control data
NV
First word of
new PV
#0000
#0001
Start comparison.
Stop comparison.
#0002
#0003
Change the PV.
Stop pulse output.
NV and NV+1 contain the new PV when C is set to #0002
(change the PV).
New PV Setting in NV and NV+1
New PV (rightmost 4 digits)
New PV (leftmost 4 digits)
Setting range for pulse outputs and high-speed counter inputs:
0000 0000 to FFFF FFFF hex
Setting range for input interrupts (counter mode):
0000 0000 to 0000 FFFF hex
Ladder Program
Examples
Example 1: High-speed
Counter (Linear Mode)
1,2,3...
In this example, high-speed counter 0 operates in linear mode and starts
interrupt task 10 when the PV reaches 30,000 (0000 7530 hex).
1. Set high-speed counter 0 in the PLC Setup’s Built-in Input Tab.
Item
Setting
High-speed counter 0
Counting mode
Use counter
Linear mode
Circular Max. Count
Reset method
--Software reset
Input Setting
Up/Down inputs
2. Set the target-value comparison table in words D10000 to D10003.
Word
Setting
D10000
D10001
#0001
#7530
D10002
#0000
D10003
#000A
Function
Number of target values = 1
Rightmost 4 digits of the target value 1 data Target value =
30,000
Leftmost 4 digits of the target value 1 data
(0000 7530 hex)
Bit 15: 0 (incrementing)
Bits 0 to 7: A hex (interrupt task number 10)
3. Create the program for interrupt task 10. Always put an END(001) instruction at the program’s last address.
358
Section 6-1
Interrupt Functions
4. Use CTBL(882) to start the comparison operation with high-speed counter
0 and interrupt task 10.
W0.00
@CTBL(882)
# 0000
# 0000
D100 00
Use high-speed counter 0.
Register a target-value comparison table and
start comparison operation.
First comparison table word
5. Operation
When execution condition W0.00 goes ON, the comparison starts with
high-speed counter 0.
When the PV of high speed counter 0 reaches 30,000, cyclic task processing is interrupted, and interrupt task 10 is processed. When interrupt task
10 processing is completed, processing of the interrupted cyclic task resumes.
W0.00
CIO 0.01
30,000 (7530 hex)
High-speed counter 0 PV
(in A270 and A271)
0
Counting enabled
Cyclic task
processing
Processing
interrupted
Cyclic task
processing
Cyclic task
processing
Interrupt task
10 processing
Interrupt task
10 processing
Example 2: High-speed
Counter (Ring Mode)
Processing
interrupted
In this example, high-speed counter 1 operates in circular (ring) mode and
starts interrupt task 12 when the PV is between 25,000 (0000 61A8 hex) and
25,500 (0000 639C hex).
The maximum ring count is set at 50,000 (0000 C350 hex).
1,2,3...
1. Set high-speed counter 1 in the PLC Setup’s Built-in Input Tab.
Item
High-speed counter 1
Use counter
Setting
Counting mode
Circular Max. Count
Circular mode
50,000
Reset method
Input Setting
Software reset (continue comparing)
Up/Down inputs
2. Set the range comparison table starting at word D20000. Even though
range 1 is the only range being used, all 40 words must still be dedicated
to the range comparison table.
Word
Setting
Function
D20000
D20001
#61A8
#0000
Rightmost 4 digits of range 1 lower limit
Leftmost 4 digits of range 1 lower limit
Lower limit value:
25,000
D20002
D20003
#639C
#0000
Rightmost 4 digits of range 1 upper limit
Leftmost 4 digits of range 1 upper limit
Upper limit value:
25,500
359
Section 6-1
Interrupt Functions
Word
D20004
Setting
Function
#000C Range 1 interrupt task number = 12 (C hex)
D20005 to All
D20008
#0000
D20009
#FFFF
D20014
D20019
D20024
D20029
D20034
Range 2 lower and upper limit values
(Not used and don’t need to be set.)
Disables range 2.
Range 2 settings
~
Set the fifth word for ranges 3 to 7 (listed at left) to #FFFF to
disable those ranges.
#FFFF
~
D20035 to All
D20038
#0000
Range 8 lower and upper limit values
(Not used and don’t need to be set.)
D20039
Disables range 8.
#FFFF
Range 8 settings
3. Create the program for interrupt task 12. Always put an END(001) instruction at the program’s last address.
4. Use CTBL(882) to start the comparison operation with high-speed counter
1 and interrupt task 12.
W0.00
@CTBL(882)
#0001
#0001
D20000
Use high-speed counter 1.
Register a range comparison table and start
comparison operation.
First comparison table word
5. Operation
When execution condition W0.00 goes ON, the comparison starts with
high-speed counter 1.
When the PV of high speed counter 1 is between 25,000 and 25,500, cyclic
task processing is interrupted, and interrupt task 12 is processed. When
interrupt task 12 processing is completed, processing of the interrupted cyclic task resumes.
W0.00
CIO 0.01
High-speed counter 1 PV
(in A272 and A273)
Upper limit: 25,500 (639C hex)
Lower limit: 25,000 (61A8 hex)
Counting enabled
Cyclic task
processing
Processing
interrupted
Interrupt task
10 processing
360
Cyclic task
processing
Processing Cyclic task
interrupted processing
Interrupt task
10 processing
Section 6-2
Quick-response Inputs
6-2
Quick-response Inputs
Overview
The quick-response inputs can read pulses with an ON time shorter than the
cycle time (as short as 50 µs). Use the quick-response inputs to read signals
shorter than the cycle time, such as inputs from photomicrosensors.
PLC Setup
Use the CX-Programmer to set a built-in input as a quick-response input in the
PLC Setup. Click the Built-in Input Tab to display the Interrupt Input settings
(at the bottom of the tab). Set the input function from Normal to Quick for each
input that will be used as a quick-response input.
Bit Allocation for
Quick-Response
Inputs
The following diagrams show the input bits and terminals that can be used for
quick-response inputs in each CPU Unit.
CPU Units with 10 I/O
Points
The 2 input bits CIO 0.04 to CIO 0.05 can be used as quick-response inputs.
Upper Terminal Block
(CPU Unit with AC
Power Supply )
L1
Quick-response input 1
L2/N COM
00
01
03
02
05
04
CIO 0 inputs
Quick-response input 0
361
Section 6-2
Quick-response Inputs
CPU Units with 14 I/O
Points
The 4 input bits CIO 0.04 to CIO 0.07 can be used as quick-response inputs.
Quick-response input 1
Upper Terminal Block
(CPU Unit with
AC Power Supply)
L1
L2/N COM
Quick-response input 3
01
00
03
02
05
04
07
06
NC
NC
CIO 0 inputs
NC
NC
Quick-response input 2
Quick-response input 0
CPU Units with 20 I/O
Points
The 6 input bits CIO 0.04 to CIO 0.09 can be used as quick-response inputs.
Quick-response input 3
Quick-response input 5
Quick-response input 1
Upper Terminal Block
(CPU Unit with
AC Power Supply)
L1
L2/N COM
01
00
03
02
05
04
07
09
06
11
08
10
Quick-response input 0
Quick-response input 4
Quick-response input 2
CPU Units with 30 I/O
Points
The 6 input bits CIO 0.04 to CIO 0.09 can be used as quick-response inputs.
Quick-response input 3
Upper Terminal Block
(CPU Unit with
AC Power Supply)
Quick-response input 5
Quick-response input 1
L1
L2/N COM
01
00
03
02
05
04
07
06
09
08
11
10
CIO 0 inputs
01
00
03
05
02
04
CIO 1 inputs
Quick-response input 0
Quick-response input 4
Quick-response input 2
CPU Units with 40 I/O
Points
The 6 input bits CIO 0.04 to CIO 0.09 can be used as quick-response inputs.
Quick-response input 3
Upper Terminal Block
(CPU Unit with
AC Power Supply)
Quick-response input 5
Quick-response input 1
L1
L2/N COM
00
01
03
02
CIO 0 inputs
05
04
07
06
09
08
11
10
01
00
03
02
05
04
07
06
CIO 1 inputs
Quick-response input 0
Quick-response input 2
362
Quick-response input 4
09
08
11
10
Section 6-2
Quick-response Inputs
CPU Units with 60 I/O
Points
The 6 input bits CIO 0.04 to CIO 0.09 can be used as quick-response inputs.
Upper Terminal Block
(CPU Unit with AC
Power Supply )
Quick-response input 3
Quick-response input 5
Quick-response input 1
L1 L2/N COM 01
00
03
02
05
04
07
06
09
08
CIO 0 inputs
11
10
01
00
03
02
05
04
07
06
09
08
11
10
00
03
02
05
04
07
06
09
08
11
10
CIO 2 inputs
CIO 1 inputs
Quick-response input 0
01
Quick-response input 4
Quick-responseinput 2
Setting the Input Functions in the PLC Setup
Normally, bits CIO 0.04 to CIO 0.09 are used as normal inputs. When using
these inputs as quick-response inputs, use the CX-Programmer to change the
input’s setting in the PLC Setup.
Input terminal
block
Word
CIO 0
CIO 1
CIO 2
Bit
CPU Unit
CPU Units
with 60 I/O
Points
CPU Units
with 40 I/O
Points
CPU Units
with 30 I/O
Points
CPU Units
with 20 I/O
Points
CPU Units
with 14 I/O
Points
Quickresponse
inputs
CPU Units
with 10 I/O
Points
00
Normal input 0 Normal input 0 Normal input 0 Normal input 0 Normal input 0 Normal input 0 ---
01
Normal input 1 Normal input 1 Normal input 1 Normal input 1 Normal input 1 Normal input 1 ---
02
Normal input 2 Normal input 2 Normal input 2 Normal input 2 Normal input 2 Normal input 2 ---
03
Normal input 3 Normal input 3 Normal input 3 Normal input 3 Normal input 3 Normal input 3 ---
04
Normal input 4 Normal input 4 Normal input 4 Normal input 4 Normal input 4 Normal input 4 Quick-response
input 0
05
Normal input 5 Normal input 5 Normal input 5 Normal input 5 Normal input 5 Normal input 5 Quick-response
input 1
06
Normal input 6 Normal input 6 Normal input 6 Normal input 6 Normal input 6 ---
Quick-response
input 2**
07
Normal input 7 Normal input 7 Normal input 7 Normal input 7 Normal input 7 ---
Quick-response
input 3**
08
Normal input 8 Normal input 8 Normal input 8 Normal input 8 ---
---
Quick-response
input 4*
09
Normal input 9 Normal input 9 Normal input 9 Normal input 9 ---
---
Quick-response
input 5*
10
Normal input
10
Normal input
10
Normal input
10
Normal input
10
---
---
---
11
Normal input
11
Normal input
11
Normal input
11
Normal input
11
---
---
---
00 to 05
Normal input
12 to 17
Normal input
12 to 17
Normal input
12 to 17
---
---
---
---
06 to 11
Normal input
18 to 23
Normal input
18 to 23
---
---
---
---
---
00 to 11
Normal input
24 to 35
---
---
---
---
---
---
Note
*Input interrupts 4 and 5 are not supported by CPU Units with 10 or 14 I/O
Points.
**Input interrupts 2 and 3 are not supported by CPU Units with 10 I/O Points.
363
Section 6-2
Quick-response Inputs
Interrupt Input and
Quick-response Input
Specifications
Item
Specification
30 µs max.
150 µs max.
ON delay
OFF delay
Response pulse
30 µs min.
150 µs min.
ON
OFF
Procedure
Select quick-response inputs.
Wire inputs.
PLC Setup settings
• When IN0 to IN5 are used as quick response inputs,
set the corresponding built-in input's Interrupt Input
setting to Quick in the PLC Setup's Built-in Input Tab.
Ladder program
Restrictions
364
• Use the quick-response inputs in
instructions such as LD.
Inputs cannot be used as quick-response inputs when they are being used as
general-purpose (normal) inputs, input interrupts, or high-speed counter
inputs.
Section 6-3
Serial Communications
6-3
Serial Communications
6-3-1
Overview
The CP1L CPU Units support the following serial communications functions.
Protocol
No-protocol
Connected devices
Standard devices supporting serial communications
CP1L CPU Unit
RS-232C or RS-422A/485
Description
Serial
port 1
Communicates with standard
OK
devices with an RS-232C or
RS-422A/485 port without a
command–response format.
Instead the TXD(236) and
RXD(235) instructions are executed from the program to
transmit data from the transmission port or read data in the
reception port. The frame
headers and end codes can be
specified.
Serial
port 2
OK
Standard device with
serial communications
Serial gateway (to
CompoWay/F or
ModbusRTU)
OMRON components supporting CompoWay/F or Mod- Converts received FINS combus-RTU slave devices
mands into CompoWay/F or
Modbus-RTU commands and
transfers them on the serial
CP1L CPU Unit
communications path.
OK
OK
RS-485 (CompoWay/F or Modbus-RTU)
OMRON CompoWay/F-compliant components
or Modbus-RTU slave devices
365
Section 6-3
Serial Communications
Protocol
Serial PLC
Link
Connected devices
Description
CP-series CPU Units or CJ1M CPU Units
CP1L CPU Unit
Polling Unit
RS-422A/485 Option Board
RS-422A/485
Shared data
CP1L CPU Unit
Polled Unit
CP1L CPU Unit
Polled Unit
1:N NT links OMRON PTs (Programmable Terminals)
(1:N NT
NS-series PT
Links are
also used for
1:1 connections.)
Up to ten words per Unit can
be shared by up to nine CPU
Units, including one Polling
Unit and eight Polled Units.
An RS-422A/485 Option
Boards (CP1W-CIF11/CIF12)
are used to communicate via
RS-422A/485, or RS-232C
Option Boards (CP1W-CIF01)
can be used to communicate
between two CPU Units via an
RS-232C connection.
CJ1M CPU Units can also be
included in Serial PLC Links,
and the Serial PLC Links can
also include PTs as Polled
Units via 1:N NT Links.
Note Serial PLC Links can be
created on serial port 1
or serial port 2, but not
on both ports at the
same time.
Data can be exchanged with
PTs without using a communications program in the CPU
Unit.
Serial Serial
port 1 port 2
OK
OK
OK
OK
Host computer or OMRON PT (Programmable Terminal) 1) Various control commands OK
such as reading and writing
I/O memory, changing the
operating mode, and forcePersonal computer
setting/resetting bits can be
executed by sending Cmode host link commands
or FINS commands from the
RS-232C
host computer to the CPU
Unit.
Host Link
OK
RS-232C
NT Link
CP1L CPU Unit
Host Link
2) It is also possible to send
FINS commands from the
CPU Unit to the host computer to send data or information.
Use Host Link communications to monitor data, such as
operating status, error information, and quality data in the
PLC or send data, such as production planning information, to
the PLC.
366
Section 6-3
Serial Communications
Protocol
Connected devices
Peripheral
CX-Programmer
bus (toolbus)
Description
Serial Serial
port 1 port 2
Provides high-speed communi- OK
OK
cations with the CX-Programmer.
Personal computer running
the CX-Programmer
RS-232C
Peripheral bus (toolbus)
1:1 NT Links OMRON PTs (Programmable Terminals)
NS-series PT
Enables data exchange with a
PT without communications
programming in the CPU Unit.
(The 1:N NT Link protocol is
used for communications even
for 1:1 connections.)
OK
OK
Enables linking data in a 64word Link Area between two
PLCs connected by an RS232C cable.
OK
OK
RS-232C
NT Link
1:1 Links
CP1L CPU Unit
CP1L CPU Unit
C-series CPU Unit
CPM1A-V1
[email protected]
CQM1H
C200HX/HG/HE
RS-232C
1:1 Link
367
Section 6-3
Serial Communications
6-3-2
No-protocol Communications
No-protocol communications enable sending and receiving data using the
TRANSMIT (TXD(236)) and RECEIVE (RXD(235)) instructions without using
a protocol and without data conversion (e.g., no retry processing, data type
conversion, or process branching based on received data). The communications mode for the serial port must be set for no-protocol communications in
the PLC Setup.
No-protocol communications are used to send data in one direction to or from
standard devices that have an RS-232C or RS-422A/485 port using TXD(236)
or RXD(235).
CP1L CPU Unit
TXD(236) or RXD(235)
Sending/receiving data
RS-232C or RS422A/485
Standard device with
serial communications
(e.g., barcode reader)
For example, simple (non-protocol) communications can be used to input data
from a barcode reader or output data to a printer.
The following table lists the no-protocol communication functions supported
by CP1L PLCs.
Transfer direction
Method
Data transmission
Execution of
(PLC → External device) TXD(236) in
the program
Data reception
Execution of
(External device → PLC) RXD(235) in
the program
368
Max.
amount
of data
256 bytes
256 bytes
Frame format
Start code
Yes: 00 to FF
No: None
Other functions
End code
Yes:
• Send delay time
00 to FF or CR+LF
(delay between
TXD(236) execuNo: None
tion and sending
(The amount of data to
data from specified
receive is specified
port): 0 to 99,990
between 1 and 256 bytes
ms (unit: 10 ms)
when no end code is speci•
Controlling
RS and
fied.)
ER signals
Monitoring CS and
DR signals
Section 6-3
Serial Communications
Procedure
Set the PLC Setup from the CXProgrammer.
(Set the communications mode to
RS-232C and set the parameters.)
Power OFF
Connect the CPU Unit and external device through
RS-232C or RS-485. (Mounting the RS-232C or
RS-422A/485 Option Board in option slot 1 or 2.
Turn OFF pin 4 to use serial port 1.
Turn OFF pin 5 to use serial port 2.
Note Serial port 2 is not supported by CPU
Units with 20/14 I/O points.
Serial port 1 and 2 are not supported
by CPU Units with 10 I/O points.
Set the DIP switch on the front of
the CPU Unit.
Power ON
Message Frame Formats
PLC → External device
External device → PLC
Execute TXD(236).
Execute RXD(235).
Data can be placed between a start code and end code for transmission by
TXD(236) and data between a start code and end code can be received by
RXD(235). When transmitting with TXD(236), data from I/O memory is transmitted, and when receiving with RXD(235), the data (without start/end codes)
is stored in I/O memory. Up to 256 bytes (including the start and end codes)
can be transferred in no-protocol mode.
The start and end codes are set in the PLC Setup.
The following table shows the message formats that can be set for transmissions and receptions in no-protocol mode.
Start code
End code
No
Yes
CR+LF
No
data
256 bytes max.
256 bytes max.
Yes
ST
data
ED
data
data
ST
256 bytes max.
data
256 bytes max.
CR+F
256 bytes max.
ED
ST
data
CR+LF
256 bytes max.
• When more than one start code is used, the first start code will be effective.
• When more than one end code is used, the first end code will be effective.
• If the data being transferred contains the end code, the data transfer will
be stopped midway. In this case, change the end code to CR+LF.
369
Section 6-3
Serial Communications
Note
A setting can be made to delay the transmission of data after the execution of
TXD(236).
Delay time
Transmission
Time
Execution of TXD(236)
Refer to the SYSMAC CP Series CP1L CPU Unit Programming Manual
(W451) for more details on TXD(236) and RXD(235).
6-3-3
Modbus-RTU Easy Master Function
Overview
If an RS-232C or RS-422A/485 Option Board is used, the CP1L CPU Unit can
function as a Modbus-RTU Master to send Modbus-RTU commands by
manipulating software switches. This enables easily controlling Modbus-compliant slaves, such as Inverters, through serial communications.
The following OMRON Inverters support Modbus-RTU slave operation:
3G3JV, 3G3MV, and 3G3RV.
The communications mode in the PLC Setup must be set to the Gateway
Mode to enable this functionality.
370
Section 6-3
Serial Communications
Modbus-RTU commands can be set simply by turning ON a software switch
after setting the Modbus slave address, function, and data in the DM fixed
allocation words for the Modbus-RTU Easy Master. The response when
received is also store in the DM fixed allocation words for the Modbus-RTU
Easy Master.
15
D32200
D32201
Communications are easily achieved
by simply by turning ON A641.00
after setting the Modbus-RTU
command in the DM fixed allocation
words.
08
07
---
---
Slave address
---
---
Function code
00
D32202
Number of communications data bytes
D32203
Communications data
:
:
Slave address
Slave address
Modbus-RTU Master
Execution Bit for Port 1
A641.00
Function code
Function code
Communications data
Communications data
Modbus-RTU
OMRON Inverters
3G3JV, 3G3MV, or
3G3RV
DM Fixed Allocation
Words for the
Modbus-RTU Easy
Master
The Modbus-RTU command is stored in the following words in the DM Area.
• M-type CPU Units
Serial port 1: D32200 to D32249
Serial port 2: D32300 to D32349
• L-type CPU Units
Serial port 1: D32300 to D32349
When a response is received after turning ON the Modbus-RTU Master Execution Bit, it is sotred in the following words in the DM Area.
• M-type CPU Units
Serial port 1: D32250 to D32299
Serial port 2: D32350 to D32399
• L-type CPU Units
Serial port 1: D32350 to D32399
Words
Serial port 1
on M-type
CPU Unit
Bits
Contents
D32200
Serial port 2
on M-type
CPU Unit
or
Serial port 1
on L-type
CPU Unit
D32300
00 to 07 Command Slave address (00 to F7 hex)
D32201
D32301
08 to 15
00 to 07
Reserved (Always 00.)
Function code
D32202
D32302
08 to 15
00 to 15
D32203 to
D32249
D32303 to
D32349
Reserved (Always 00.)
Number of communications
data bytes (0000 to 005E
hex)
Communications data
(94 bytes maximum)
00 to 15
371
Section 6-3
Serial Communications
Words
Serial port 1 Serial port 2
on M-type
on M-type
CPU Unit
CPU Unit
or
Serial port 1
on L-type
CPU Unit
Error Codes
Contents
D32250
D32350
00 to 07 Response Slave address (00 to F7 hex)
08 to 15
Reserved (Always 00.)
D32251
D32351
00 to 07
08 to 15
Function code
Reserved
D32252
D32352
00 to 07
08 to 15
Error code
Reserved (Always 00.)
D32253
D32353
00 to 15
D32254 to
D32299
D32354 to
D32399
00 to 15
Number of response bytes
(0000 to 03EA hex)
Response data
(92 bytes maximum)
The following error codes are stored in an allocated DM Area word when an
error occurs in Modbus-RTU Easy Master function execution.
Code
0x00
Name
Normal end
0x01
Illegal address
The slave address specified in the parameter
is illegal (248 or higher).
0x02
Illegal function code
The function code specified in the parameter is
illegal.
0x03
0x04
Data length overflow
Serial communications mode error
0x80
Response timeout
There are more than 94 data bytes.
The Modbus-RTU Easy Master function was
executed when the serial communications
mode was not the Serial Gateway Mode.
A response was not received from the Servo.
0x81
0x82
Parity error
Framing error
A parity error occurred.
A framing error occurred.
0x83
0x84
Overrun error
CRC error
An overrun error occurred.
A CRC error occurred.
0x85
Incorrect confirmation
address
The slave address in the response is difference from the one in the request.
0x86
Incorrect confirmation
function code
The function code in the response is difference
from the one in the request.
0x87
Response size overflow
Exception response
0x8A
Service being executed
Execution canceled
The response frame is larger than the storage
area (92 bytes).
An exception response was received from the
slave.
A service is already being executed (reception
traffic congestion).
Executing the service has been canceled.
0x8f
Other error
Other FINS response code was received.
0x88
0x89
372
Bits
Description
Not an error.
Section 6-3
Serial Communications
Auxiliary Area Flags
and Bits
The Modbus-RTU command set in the DM fixed allocation words for the Modbus-RTU Easy Master is automatically sent when the Modbus-RTU Master
Execution Bit is turned ON. The results (normal or error) will be given in corresponding flags.
Word
A640
Bit
00
01
02
A641
00
01
02
Port
M-type
CPU
Units:
Serial
port 2
L-type
CPU
Units:
Serial
port 1
M-type
CPU
Unit:
Serial
port 1
Contents
Modbus-RTU Master Execution Bit
Turned ON: Execution started
ON: Execution in progress.
OFF: Not executed or execution completed.
Modbus-RTU Master Execution Normal Flag
ON: Execution normal.
OFF: Execution error or still in progress.
Modbus-RTU Master Execution Error Flag
ON: Execution error.
OFF: Execution normal or still in progress.
Modbus-RTU Master Execution Bit
Turned ON: Execution started
ON: Execution in progress.
OFF: Not executed or execution completed.
Modbus-RTU Master Execution Normal Flag
ON: Execution normal.
OFF: Execution error or still in progress.
Modbus-RTU Master Execution Error Flag
ON: Execution error.
OFF: Execution normal or still in progress.
373
Section 6-3
Serial Communications
6-3-4
Communications: Smart Active Parts and Function Blocks
Overview
OMRON components that support CompoWay/F communications or ModbusRTU slave functionality (such as Temperature Controllers) can be easily
accessed from a CP1L CPU Unit equipped with an RS-422A/485 or RS-232C
Option Board using Smart Active Parts (SAPs) on an NS-series PT or using
function blocks in the ladder program in the CP1L CPU Unit.
The communications mode in the PLC Setup must be set to the Gateway
Mode to enable this functionality.
Note
Function blocks cannot be used in the CP1L-J CPU Unit.
System Configuration
Using SAPs from an NS-series PT
Using Function Blocks in CPU Unit
NS-series PT
User program
Smart Active Parts
FB
RS-232C
CP1L CPU Unit
Function block
CP1L CPU Unit
XW2Z-200T/500T Cable
RS-422A/485 Option Board
RS-422A/485 Option Board
RS-422A/485 (CompoWay/F or Modbus-RTU)
RS-232C Option Board
RS-422A/485 (CompoWay/F or Modbus-RTU)
CPU Unit functions as a gateway
OMRON components that support CompoWay/F or ModbusRTU slave functionality
OMRON components that support CompoWay/F or
Modbus-RTU slave functionality
Note
Refer to OMRON’s Smart Library website for the most recent information on
using SAPs and function blocks.
Serial Gateway Function
When a FINS command is received, it is automatically converted to the protocol corresponding to the message and sent on the serial communications
path. Responses are also converted in the same way.
Note
Serial ports 1 and 2 on the CP1L CPU Unit can be used to convert to the following protocols.
• CompoWay/F
• Modbus-RTU
This functionality is enabled when the serial communications mode is set to
Serial Gateway.
FINS message (on network or CPU bus)
FINS header
2803
CompoWay/F command
FINS header
2804
Modbus-RTU command
(Serial port 1 or 2)
Serial port 1 or
2 on CPU Unit
CompoWay/F command
Modbus-RTU command
The serial gateway functionality is enabled when serial port 1 or 2 is set to
the Serial Gateway Mode.
374
Section 6-3
Serial Communications
Contents of FINS Header
• Destination network address (DNA)
a. When the routing table for network control of serial communication
channel is developed:
It is the network address that corresponds to serial communication
port according to the routing table.
b.
When the routing table for networking serial communication channel is
not developed:
It is the network address when actual destination PLC is specified.
• Destination node address (DA1)
a. When the routing table for network control of serial communication
channel is developed:
00Hex (means PLC internal communication)
b.
When the routing table for network control of serial communication
channel is not developed:
It is the node address when actual destination PLC is specified.
• Destination model address (DA2)
It needs to be the model address of serial communication port.
CP1L CPU Unit with 30,40 or 60 I/O Points
Serial port 1: 0XFD Hex
Serial port 2: 0XFC Hex
CP1L CPU Unit
Serial communication port of CP1L
Serial port 1
Model address of serial
communication port
FD Hex (decimal 253)
Serial port 2
FC Hex (decimal 252)
CP1L CPU Unit with 14 or 20 I/O Points
Serial port 1: 0XFC Hex
Serial communication port of CP1L
Serial port 1
Model address of serial
communication port
FC Hex (decimal 252)
375
Section 6-3
Serial Communications
CPU Unit Serial Gateway Function Specifications
Item
Pre-conversion data
Conversion functions
Post-conversion data
Serial communications
method
Maximum number of
nodes
Enabling serial communications mode
Response timeout
Specification
FINS (via FINS network, Host Link FINS, toolbus, NT Link,
or CPU bus)
FINS commands addressed to serial port 1 or 2 on the CPU
Unit are converted to CompoWay/F commands (after
removing the header) if the FINS command code is 2803
hex and to Modbus-RTU commands (after removing the
header) if the FINS command code is 2804 hex.
CompoWay/F command or Modbus-RTU command
1:N half-duplex
31
Serial Gateway Mode
The time from when a message converted to a different protocol is set until a response is received is monitored by the
serial gateway function.
Default: 5 s, User setting: 0.1 to 25.5 s
Note A FINS response code of 0205 hex (response timeout) is sent to the source of the FINS command if a
timeout occurs.
Send delay function
Note
6-3-5
None
If a CJ-series Serial Communications Unit is connected via a CJ Unit Adapter,
messages can also be converted to Modbus-ASCII or Host Link FINS. Refer
to the SYSMAC CS/CJ Series Serial Communications Boards/Units Operation Manual (W336) for details.
Serial PLC Links
Overview
Serial PLC Links can be used to allow data to be exchanged among CP1L
and CJ1M CPU Units via the RS-422A/485 or RS-232C Option Boards
mounted to the CPU Units without requiring special programming. The communications mode in the PLC Setup must be set to the Serial PLC Link Mode
to enable this functionality.
• Either serial port 1 or 2 can be used. (See note.)
• Words are allocated in memory in the Serial PLC Link Words (CIO 3100
to CIO 3199).
• A maximum of 10 words can be transferred by each CP1L CPU Unit, but
the number of linked words can be set to fewer words. (The size must be
the same for all CP1L CPU Units.)
Note
376
Serial PLC Links cannot be used on serial ports 1 and 2 at the same time. If
one port is set as a Serial PLC Link slave or master, it will not be possible to
set the other port for a Serial PLC Link. A PLC Setup error will occur if an
attempt is made to set both ports for Serial PLC Links.
Section 6-3
Serial Communications
Configuration
1:N Connections between CP1L/CJ1M CPU Units (8 Nodes Maximum)
CP1L CPU Unit (Polling Unit)
RS-422A/485 Option Board
RS-422A/485
Shared data
CJ1M CPU Unit
(Polled Unit)
CP1L CPU Unit
(Polled Unit)
CP1L CPU Unit
(Polled Unit)
8 nodes maximum
1:1 Connections between CP1L/CJ1M CPU Units
CJ1M CPU Unit
(Polling Unit)
CP1L CPU Unit
(Polling Unit)
RS-232C or RS-422A/485
Shared data
RS-232C or RS-422A/485
Shared data
CP1L CPU Unit
(Polled Unit)
CP1L CPU Unit
(Polled Unit)
Specifications
Item
Applicable serial
ports
Connection method
Allocated data area
Number of Units
Link methods (data
refresh methods)
Specifications
Serial port 1 or 2. Both ports cannot be used for PLC Links at
the same time. If both ports are set for PLC Links (either as
polling node or polled node), a PLC Setup setting error (nonfatal error) will occur and the PLC Setup Setting Error Flag
(A402.10) will turn ON.
RS-422A/485 or RS-232C connection via RS-422A/485 or
RS-232C Option Board.
Serial PLC Link Words:
CIO 3100 to CIO 3199 (Up to 10 words can be allocated for
each CPU Unit.)
9 Units max., comprising 1 Polling Unit and 8 Polled Units (A
PT can be placed on the same network in an 1:N NT Link, but
it must be counted as one of the 8 Polled Units.)
Complete link method or Polling Unit link method
Data Refresh Methods
The following two methods can be used to refresh data.
• Complete link method
• Polling Unit link method
Complete Link Method
The data from all nodes in the Serial PLC Links are reflected in both the Polling Unit and the Polled Units. (The only exceptions are the address allocated
377
Section 6-3
Serial Communications
to the connected PT’s unit number and the addresses of Polled Units that are
not present in the network. These data areas are undefined in all nodes.)
Example: Complete Link Method, Highest Unit Number: 3
In the following diagram, Polled Unit No. 2 is either a PT or is a Unit not
present in the network, so the area allocated for Polled Unit No. 2 is undefined
in all nodes.
Polling Unit
Local area
Polled Unit No.0
Polled Unit No.1
Polled Unit No.3
Polling Unit
Polling Unit
Polled Unit
No.0
Polled Unit
No.1
Local area
Polled Unit
No.0
Polling Unit
Polled Unit
No.1
Local area
Polled Unit
No.0
Polled Unit
No.1
Undefined
Undefined
Undefined
Undefined
Polled Unit
No.3
Polled Unit
No.3
Polled Unit
No.3
Local area
(Not used)
(Not used)
(Not used)
(Not used)
(Not used)
(Not used)
(Not used)
(Not used)
(Not used)
(Not used)
(Not used)
(Not used)
(Not used)
(Not used)
(Not used)
(Not used)
Example: Complete Link Method, Number of Link Words: 10
Each CPU Unit (either CP1L or CJ1M) sends data to the same words in all
other CPU Units for the Polling Unit and all Polled Units. The Polling Unit is a
CP1L CPU Unit in the following example, but it could also be a CJ1M CPU
Unit.
CP1L CPU Unit
(Polling Unit)
CP1L CPU Unit
(Polled Unit No. 0)
Serial PLC Link Words
(CIO Area)
Serial PLC Link Words
(CIO Area)
378
CJ1M CPU Unit
(Polled Unit No. 2)
Serial PLC Link Words
(CIO Area)
Serial PLC Link Words
(CIO Area)
3100 to 3109
3100 to 3109
3100 to 3109
Polling Unit Link Method
CP1L CPU Unit
(Polled Unit No. 1)
3100 to 3109
No.0
3110 to 3119
No.0
3110 to 3119
No.0
3110 to 3119
No.0
3110 to 3119
No.1
3120 to 3129
No.1
3120 to 3129
No.1
3120 to 3129
No.1
3120 to 3129
No.2
3130 to 3139
No.2
3130 to 3139
No.2
3130 to 3139
No.2
3130 to 3139
No.3
3140 to 3149
No.3
3140 to 3149
No.3
3140 to 3149
No.3
3140 to 3149
No.4
3150 to 3159
No.4
3150 to 3159
No.4
3150 to 3159
No.4
3150 to 3159
No.5
3160 to 3169
No.5
3160 to 3169
No.5
3160 to 3169
No.5
3160 to 3169
No.6
3170 to 3179
No.6
3170 to 3179
No.6
3170 to 3179
No.6
3170 to 3179
No.7
3180 to 3189
No.7
3180 to 3189
No.7
3180 to 3189
No.7
3180 to 3189
The data for all the Polled Units in the Serial PLC Links ar reflected in the Polling Unit only, and each Polled Unit reflects the data of the Polling Unit only.
The advantage of the Polling Unit link method is that the addresses allocated
for the local Polled Unit data are the same in each Polled Unit, allowing data to
be accessed using common ladder programming. The areas allocated for the
unit numbers of the PT or Polled Units not present in the network are undefined in the Polling Unit only.
Section 6-3
Serial Communications
Example: Polling Unit Link Method, Highest Unit Number: 3
In the following diagram, Polled Unit No. 2 is a PT or a Unit not participating in
the network, so the corresponding area in the Polling Unit is undefined.
Polling Unit
Polled Unit No.0
Polled Unit No.1
Polled Unit No.3
Local area
Polling Unit
Polling Unit
Polling Unit
Polled Unit
No.0
Polled Unit
No.1
Local area
Local area
Local area
(Not used.)
(Not used.)
(Not used.)
Undefined
(Not used.)
(Not used.)
(Not used.)
Polled Unit
No.3
(Not used.)
(Not used.)
(Not used.)
(Not used.)
(Not used.)
(Not used.)
(Not used.)
(Not used.)
(Not used.)
(Not used.)
(Not used.)
(Not used.)
(Not used.)
(Not used.)
(Not used.)
(Not used.)
(Not used.)
(Not used.)
(Not used.)
Example: Polling Unit Link Method, Number of Link Words: 10
The CPU Unit that is the Polling Unit (either CP1L or CJ1M) sends its data
(CIO 3100 to CIO 3109) to the same words (CIO 3100 to CIO 3109) in all
other CPU Units. The Polled Units send their data (CIO 3110 to CIO 3119) to
consecutive sets of 10 words in the Polling Unit. The Polling Units is a CP1L
CPU Unit in the following example, but it could also be a CJ1M CPU Unit.
(Only the first three Polled Units are shown below.)
CP1L CPU Unit
(Polling Unit)
Serial PLC Link Words
(CIO Area)
CP1L CPU Unit
(Polled Unit No. 0)
Serial PLC Link Words
(CIO Area)
CP1L CPU Unit
(Polled Unit No. 1)
Serial PLC Link Words
(CIO Area)
CJ1M CPU Unit
(Polled Unit No. 2)
Serial PLC Link Words
(CIO Area)
3100 to 3109
3100 to 3109
3100 to 3109
3100 to 3109
No.0
3110 to 3119
3110 to 3119
3110 to 3119
3110 to 3119
No.1
3120 to 3129
No.2
3130 to 3139
No.3
3140 to 3149
No.4
3150 to 3159
No.5
3160 to 3169
No.6
3170 to 3179
No.7
3180 to 3189
379
Section 6-3
Serial Communications
Allocated Words
Complete Link Method
Address
Link words
CIO 3100
Serial PLC
Link Words
CIO 3199
1 word
2 words
Polling Unit
CIO 3100
CIO 3100 to
CIO 3101
CIO 3100 to
CIO 3102
3 words
to
CIO 3100 to
CIO 3109
10 words
Polled Unit No. 0
CIO 3101
Polled Unit No. 1
CIO 3102
Polled Unit No. 2
CIO 3103
Polled Unit No. 3
CIO 3104
CIO 3102 to
CIO 3103
CIO 3104 to
CIO 3105
CIO 3106 to
CIO 3107
CIO 3108 to
CIO 3109
CIO 3103 to
CIO 3105
CIO 3106 to
CIO 3108
CIO 3109 to
CIO 3111
CIO 3112 to
CIO 3114
CIO 3110 to
CIO 3119
CIO 3120 to
CIO 3129
CIO 3130 to
CIO 3139
CIO 3140 to
CIO 3149
Polled Unit No. 4
CIO 3105
CIO 3110 to
CIO 3111
CIO 3115 to
CIO 3117
CIO 3150 to
CIO 3159
Polled Unit No. 5
CIO 3106
CIO 3112 to
CIO 3113
CIO 3118 to
CIO 3120
CIO 3160 to
CIO 3169
Polled Unit No. 6
CIO 3107
Polled Unit No. 7
CIO 3108
Not used.
CIO 3109
to
CIO 3199
CIO 3114 to
CIO 3115
CIO 3116 to
CIO 3117
CIO 3118 to
CIO 3199
CIO 3121 to
CIO 3123
CIO 3124 to
CIO 3126
CIO 3127 to
CIO 3199
CIO 3170 to
CIO 3179
CIO 3180 to
CIO 3189
CIO 3190 to
CIO 3199
Polling Unit Link Method
Address
Link words
CIO 3100
Serial PLC
Link Words
CIO 3199
380
1 word
2 words
Polling Unit
CIO 3100
CIO 3100 to
CIO 3101
CIO 3100 to
CIO 3102
3 words
to
CIO 3100 to
CIO 3109
10 words
Polled Unit No. 0
CIO 3101
Polled Unit No. 1
CIO 3101
Polled Unit No. 2
CIO 3101
Polled Unit No. 3
CIO 3101
CIO 3102 to
CIO 3103
CIO 3102 to
CIO 3103
CIO 3102 to
CIO 3103
CIO 3102 to
CIO 3103
CIO 3103 to
CIO 3105
CIO 3103 to
CIO 3105
CIO 3103 to
CIO 3105
CIO 3103 to
CIO 3105
CIO 3110 to
CIO 3119
CIO 3110 to
CIO 3119
CIO 3110 to
CIO 3119
CIO 3110 to
CIO 3119
Polled Unit No. 4
CIO 3101
CIO 3102 to
CIO 3103
CIO 3103 to
CIO 3105
CIO 3110 to
CIO 3119
Polled Unit No. 5
CIO 3101
CIO 3102 to
CIO 3103
CIO 3103 to
CIO 3105
CIO 3110 to
CIO 3119
Polled Unit No. 6
CIO 3101
Polled Unit No. 7
CIO 3101
Not used.
CIO 3102
to
CIO 3199
CIO 3102 to
CIO 3103
CIO 3102 to
CIO 3103
CIO 3104 to
CIO 3199
CIO 3103 to
CIO 3105
CIO 3103 to
CIO 3105
CIO 3106 to
CIO 3199
CIO 3110 to
CIO 3119
CIO 3110 to
CIO 3119
CIO 3120 to
CIO 3199
Section 6-3
Serial Communications
Procedure
The Serial PLC Links operate according to the following settings in the PLC
Setup in the Polling Unit and Polled Units.
Settings at the Polling Unit
1,2,3...
1. Set the serial communications mode of serial port 1 or 2 to Serial PLC
Links (Polling Unit).
2. Set the link method to the Complete Link Method or Polling Unit Link Method.
3. Set the number of link words (up to 10 words for each Unit).
4. Set the maximum unit number in the Serial PLC Links (0 to 7).
Settings at the Polled Units
1,2,3...
1. Set the serial communications mode of serial port 1 or 2 to Serial PLC
Links (Polled Unit).
2. Set the unit number of the Serial PLC Link Polled Unit.
PLC Setup
Settings at the Polling Unit
Serial port
1 or 2
Item
Mode: Communications mode
Set value
PC Link (Master): PLC Link Polling Unit
Default
Host Link
Baud: Baud rate
PC link mode: PLC Link method
9,600 bps
ALL
Link words: No. of link words
38,400 bps, 115,200 bps
ALL: Complete link method
Masters: Polling Unit method
1 to 10 words
PC Link Unit No.: Max. unit No.
0 to 7
0 hex
Item
Mode: Communications mode
Set value
PC Link (Slave): PLC Link Polled Unit
Default
Host Link
Baud: Baud rate
Unit number
38,400 bps, 115,200 bps
0 to 7
9,600 bps
0
Refresh timing
Every cycle
10 words
Settings at the Polled Unit
Serial port
1 or 2
Refresh timing
Every cycle
Note Both serial ports cannot be used for PLC Links at the same time. If both ports
are set for PLC Links (either as polling node or polled node), a PLC Setup setting error (non-fatal error) will occur and the PLC Setup Setting Error Flag
(A402.10) will turn ON. If PLC Links is set for one serial port, set the other
serial port to a different mode.
381
Section 6-3
Serial Communications
Related Auxiliary Area Flags for Serial Port 1 of an M-type CPU Unit
Name
Serial Port 1
Communicating
with PT Flags
(See note.)
Address
A394.00 to
A394.07
Details
Read/write
When serial port 1 is
Read
being used in NT link
mode, the bit corresponding to the Unit performing
communications will be
ON. Bits 00 to 07 correspond to unit numbers 0
to 7, respectively.
ON: Communicating
OFF: Not communicating
Refresh timing
• Cleared when power is turned ON.
• Turns ON the bit corresponding to the
unit number of the PT/Polled Unit that is
communicating via serial port 1 in NT link
mode or Serial PLC Link mode.
• Bits 00 to 07 correspond to unit numbers
0 to 7, respectively.
Serial Port 1
Restart Bit
A526.01
Turn ON this bit to restart Read/write
serial port 1.
Serial Port 1
Error Flags
A528.08 to
A528.15
When an error occurs at
serial port 1, the corresponding error bit is
turned ON.
Bit 08: Not used.
Bit 09: Not used.
Bit 10: Parity error
Bit 11: Framing error
Bit 12: Overrun error
Bit 13: Timeout error
Bit 14: Not used.
Bit 15: Not used.
• Cleared when power is turned ON.
• Turn ON to restart serial port 1, (except
when communicating in peripheral bus
mode).
Note: The bit is automatically turned OFF
by the system when restart processing has been completed.
• Cleared when power is turned ON.
• When an error occurs at serial port 1, the
corresponding error bit is turned ON.
• The flag is automatically turned OFF by
the system when serial port 1 is
restarted.
• In NT link mode, only bit 05 (timeout
error) is enabled.
In Serial PLC Link mode, only the following
bits are enabled.
• Errors at the Polling Unit:
Bit 05: Timeout error
• Errors at Polled Units:
Bit 05: Timeout error
Bit 04: Overrun error
Bit 03: Framing error
Note: If the error occurred in Serial PLC link
mode, the console will retry before
communication establish. Rehabilitation of the communications is no need
for port restart. If user eliminates
error, the communication will automatically establish between console
and servo.
However, error flag will be saved as
the record. If you want to clear the
error flag, please restart port.
• Cleared when power is turned ON.
• Turns ON while communications conditions settings for serial port 1 are being
changed.
• Turns ON when the CHANGE SERIAL
PORT SETUP instruction (STUP(237)) is
executed.
• Turns OFF when the changes to settings
are completed.
Serial Port 1 Set- A619.01
tings Changed
Flag
Read/write
Turns ON when the com- Read/write
munications conditions of
serial port 1 are being
changed.
ON: Changed
OFF: No change
Note In the same way as for the existing 1:N NT Link, the status (communicating/not communicating) of PTs in Serial PLC Links can be checked from the
Polling Unit (CPU Unit) by reading the Serial Port 1 Communicating with PT
Flag (A394 bits 00 to 07 for unit numbers 0 to 7).
382
Section 6-3
Serial Communications
Related Auxiliary Area Flags for Serial Port 2 of an M-type CPU Unit
Name
Serial Port 2
Communicating
with PT Flags
(See note.)
Address
A393.00 to
A393.07
Details
Read/write
When Serial Port 2 is
Read
being used in NT link
mode, the bit corresponding to the Unit performing
communications will be
ON. Bits 00 to 07 correspond to unit numbers 0
to 7, respectively.
ON: Communicating
OFF: Not communicating
Refresh timing
• Cleared when power is turned ON.
• Turns ON the bit corresponding to the
unit number of the PT/Polled Unit that is
communicating via Serial Port 2 in NT
link mode or Serial PLC Link mode.
• Bits 00 to 07 correspond to unit numbers
0 to 7, respectively.
Serial Port 2
Restart Bit
A526.00
Turn ON this bit to restart Read/write
Serial Port 2.
Serial Port 2
Error Flags
A528.00 to
A528.07
When an error occurs at
Serial Port 2, the corresponding error bit is
turned ON.
Bit 00: Not used.
Bit 01: Not used.
Bit 02: Parity error
Bit 03: Framing error
Bit 04: Overrun error
Bit 05: Timeout error
Bit 06: Not used.
Bit 07: Not used.
• Cleared when power is turned ON.
• Turn ON to restart Serial Port 2, (except
when communicating in peripheral bus
mode).
Note: The bit is automatically turned OFF
by the system when restart processing has been completed.
• Cleared when power is turned ON.
• When an error occurs at Serial Port 2, the
corresponding error bit is turned ON.
• The flag is automatically turned OFF by
the system when Serial Port 2 is
restarted.
• In NT link mode, only bit 05 (timeout
error) is enabled.
In Serial PLC Link mode, only the following
bits are enabled.
• Errors at the Polling Unit:
Bit 05: Timeout error
• Errors at Polled Units:
Bit 05: Timeout error
Bit 04: Overrun error
Bit 03: Framing error
Note: If the error occurred in Serial PLC link
mode, the console will retry before
communication establish. Rehabilitation of the communications is no need
for port restart. If user eliminates
error, the communication will automatically establish between console
and servo.
However, error flag will be saved as
the record. If you want to clear the
error flag, please restart port.
• Cleared when power is turned ON.
• Turns ON while communications conditions settings for Serial Port 2 are being
changed.
• Turns ON when the CHANGE SERIAL
PORT SETUP instruction (STUP(237)) is
executed.
• Turns OFF when the changes to settings
are completed.
Serial Port 2 Set- A619.02
tings Changed
Flag
Read/write
Turns ON when the com- Read/write
munications conditions of
Serial Port 2 are being
changed.
ON: Changed
OFF: No change
Note In the same way as for the existing 1:N NT Link, the status (communicating/not communicating) of PTs in Serial PLC Links can be checked from the
Polling Unit (CPU Unit) by reading the Serial Port 2 Communicating with PT
Flag (A393 bits 00 to 07 for unit numbers 0 to 7).
383
Section 6-3
Serial Communications
Related Auxiliary Area Flags for Serial Port 1 of an L-type CPU Unit
Name
Serial Port 1
Communications Error Flag
Serial Port 1
Communicating
with PT Flags
(See note.)
Address
A392.04
A393.00 to
A393.07
Details
Turns ON when a communications error occurs
at Serial Port 1.
ON: Error
OFF: Normal
Read/write
Read
•
•
When Serial Port 1 is
Read
being used in NT link
mode, the bit corresponding to the Unit performing
communications will be
ON. Bits 00 to 07 correspond to unit numbers 0
to 7, respectively.
ON: Communicating
OFF: Not communicating
•
•
• Cleared when power is turned ON.
• Turn ON to restart Serial Port 1, (except
when communicating in peripheral bus
mode).
Note: The bit is automatically turned OFF
by the system when restart processing has been completed.
• Cleared when power is turned ON.
• When an error occurs at Serial Port 1, the
corresponding error bit is turned ON.
• The flag is automatically turned OFF by
the system when Serial Port 1 is
restarted.
• Disabled during peripheral bus mode.
• In NT link mode, only bit 05 (timeout
error) is enabled.
In Serial PLC Link mode, only the following
bits are enabled.
• Errors at the Polling Unit:
Bit 05: Timeout error
• Errors at Polled Units:
Bit 05: Timeout error
Bit 04: Overrun error
Bit 03: Framing error
Serial Port 1
Restart Bit
A526.00
Turn ON this bit to restart Read/write
Serial Port 1.
Serial Port 1
Error Flags
A528.00 to
A528.07
When an error occurs at
Serial Port 1, the corresponding error bit is
turned ON.
Bit 00: Not used.
Bit 01: Not used.
Bit 02: Parity error
Bit 03: Framing error
Bit 04: Overrun error
Bit 05: Timeout error
Bit 06: Not used.
Bit 07: Not used.
Serial Port 1 Set- A619.02
tings Changed
Flag
•
•
Refresh timing
Cleared when power is turned ON.
Turns ON when a communications error
occurs at Serial Port 1.
Turns OFF when the port is restarted.
Disabled in peripheral bus mode and NT
link mode.
Cleared when power is turned ON.
Turns ON the bit corresponding to the
unit number of the PT/Polled Unit that is
communicating via Serial Port 1 in NT
link mode or Serial PLC Link mode.
Bits 00 to 07 correspond to unit numbers
0 to 7, respectively.
Read/write
Turns ON when the com- Read/write
munications conditions of
Serial Port 1 are being
changed.
ON: Changed
OFF: No change
•
• Cleared when power is turned ON.
• Turns ON while communications conditions settings for Serial Port 1 are being
changed.
• Turns ON when the CHANGE SERIAL
PORT SETUP instruction (STUP(237)) is
executed.
• Turns OFF when the changes to settings
are completed.
In the same way as for the existing 1:N NT Link, the status (communicating/not communicating) of PTs in Serial PLC Links can be checked from the
Polling Unit (CPU Unit) by reading the Serial Port 1 Communicating with PT
Flag (A393 bits 00 to 07 for unit numbers 0 to 7).
384
Section 6-3
Serial Communications
6-3-6
1:1 Links
Two PLCs can be connected through their RS-232C ports to create Link
Areas.
Applicable PLCs
A 1:1 Link can be create between any of the following SYSMAC PLCs:
CP1L, CQM1H, C200HX/HG/HE(-Z), CPM1A-V1, CPM2A, CPM2B, CPM2C,
and SRM1(-V2)
Connections
To create a 1:1 Link, connect the RS-232C ports on the two PLCs.
Master
Slave
CP1L PLC
RS-232C
C-series PLC
CPM1A-V1
CPM2
CQM1H
C200HX/HG/HE
Etc.
1:1 Link
PLC Setup
Set the PLC to a 1:1 Link Master or a 1:1 Link Slave in the PLC Setup. Set the
other PLC to the opposite setting.
Link Area Size
The 1:1 Link Area in the CP1L is from CIO 3000 to CIO 3015 (16 words).
Even if a 1:1 Link is created with a CQM1H or C200HX/HG/HE(-Z) PLC, the
1:1 Link Area will be only 16 words on both sides of the link, and only LR 00 to
LR 15 will be used in the CQM1H or C200HX/HG/HE(-Z) PLC. LR 16 to LR 63
cannot be used for 1:1 Links
Operation
Here, operation is described assuming that the master is the CP1L and the
slave is the CPM2A.
385
Section 6-3
Serial Communications
Link Master: CP1L CPU Unit
Link Slave: CPM2A CPU Unit
RS-232C
1:1 Link
1:1 Link Area
Link Master:
CP1L CPU Unit
CIO 3000
CIO 3007
CIO 3008
Link Slave:
CPM2A CPU Unit
Write area
Read area
Read area
Write area
CIO 3015
CIO 3016
LR 00
LR 07
LR 08
LR 15
Not used.
CIO 3063
CP1L is set as the link master, so CIO 3000 to CIO 3007 are its write area.
Any data written to these words with the OUT or MOV instructions will be
automatically transferred to LR 00 to LR 07 in the CPM2A. The CPM2A will
use these words as its read area.
CIO 3008 to 3015 are the read area of the CP1L. The contents of LR 08 to
LR 15 in the CPM2A will automatically be transferred to CIO 3008 to 3015 in
the CP1L. The words in the PLC’s read area cannot be written using the OUT,
MOV, or any other write instructions.
386
Section 6-3
Serial Communications
6-3-7
1:N NT Links
In the CP Series, communications are possible with PTs (Programmable Terminals) using NT Links in 1:N mode.
NS-series or NT31/NT631(C)-V2 PT
NS-series or NT31/NT631(C)-V2 PT
RS-422A/485
RS-232C
1:N NT Link
CP1L CPU Unit
1:N NT Links
CP1L CPU Unit
Note Communications are not possible using the 1:1-mode NT Link protocol.
High-speed NT Links are possible in addition to the previous standard NT
Links by using the PT system menu and the following PLC Setup. High-speed
NT Links are possible, however, only with NS-series PTs or with the NT31(C)V2 or NT631(C)-V2 PTs.
PLC Setup
Port
Serial port
1 or 2
Name
Settings contents
Default values
Mode: Communications mode NT Link (1:N): 1:N NT Links Host Link
Baud: Baud rate
38,400 (standard)
9,600
115,200 (high speed)
(disabled)
NT/PC Link Max:
Highest unit number
PT System Menu
0 to 7
0
Other conditions
Turn OFF pin 4 on the CPU
Unit DIP switch hen using
serial port 1 and turn OFF pin
5 when using serial port 2.
---
Set the PT as follows:
1,2,3...
1. Select NT Link (1:N) from Comm. A Method or Comm. B Method on the
Memory Switch Menu under the System Menu on the PT Unit.
2. Press the SET Touch Switch to set the Comm. Speed to High Speed.
387
Section 6-3
Serial Communications
6-3-8
1:1 NT Links
The NT Link communications protocol was developed to enable high-speed
communications between PLC and Programmable Terminals (PTs). There are
two communications modes supported by the NT Link protocol: 1:1 NT Links,
in which one PLC is connected to one PT, and 1:N NT Links, in which one
PLC is connected to more than one PT.
Connections
With the NT Link protocol, the PLC automatically responds to commands sent
from the PT, so no communications programming is required in the CP1L.
OMRON PT
RS-232C
CP1L
NT Link
PLC Setup
388
Select “NT Link (1:1) as the serial communications mode.
Section 6-3
Serial Communications
6-3-9
Host Link Communications
The following table shows the host link communication functions available in
CP1L PLCs. Select the method that best suits your application.
Command
flow
Host computer
Command type
Host link command
(C Mode)
Host link command
Communications method
Configuration
Create frame in the host comDirectly connect the host computer in a 1:1
puter and send the command to or 1:N system.
the PLC. Receive the response
from the PLC.
Application:
OR
Use this method when commuCommand
nicating primarily from the host
computer to the PLC.
SYSMAC
CP1L
IN
L1
L2/N
COM
01
00
03
05
02
07
04
09
06
IN
L1
L2/N
COM
01
00
03
02
05
04
07
06
09
11
08
10
01
00
03
02
05
04
07
06
09
08
10
01
00
03
05
02
04
00
01
COM
07
09
06
11
10
08
COMM
00
11
01
COM
10
11
08
COMM
SYSMAC
CP1L
02
COM
03
COM
04
COM
06
05
07
03
02
04
COM
06
05
07
OUT
COMM
COMM
00
01
COM
02
COM
03
COM
04
COM
06
05
00
07
01
COM
03
02
04
COM
06
07
05
OUT
SYSMAC
CP1L
SYSMAC
CP1L
IN
L1
L2/N
COM
01
00
03
05
02
07
04
09
06
11
08
10
COMM
01
00
03
05
02
04
00
01
COM
07
06
09
08
IN
11
L1
L2/N
COM
10
01
COM
02
COM
03
COM
04
COM
01
00
COMM
00
03
05
02
07
04
09
06
07
03
02
04
COM
06
10
01
COM
OUT
01
00
03
05
02
04
00
01
COM
07
06
09
08
11
10
COMM
00
07
05
11
08
COMM
06
05
02
COM
03
COM
04
COM
06
05
07
03
02
04
COM
06
05
07
OUT
Create frame in the host comDirectly connect the host computer in a 1:1
puter and send the command to or 1:N system.
the PLC. Receive the response
from the PLC.
FINS
Application:
OR
Use these methods when comCommand
Header Terminator municating primarily from the
host computer to PLCs in the
network.
Remarks:
The FINS command must be
placed between a Host Link
header and terminator and then
sent by the host computer.
FINS command (with
Host Link header and
terminator) sent.
SYSMAC
CP1L
IN
L1
L2/N
COM
01
00
03
02
05
04
07
06
09
11
08
COMM
10
01
00
03
05
02
04
00
01
COM
07
09
06
08
11
10
COMM
00
01
COM
02
COM
03
COM
04
06
COM
05
07
03
02
04
COM
06
07
05
OUT
SYSMAC
CP1L
SYSMAC
CP1L
IN
L1
L2/N
COM
01
00
03
02
05
04
07
06
09
01
COM
IN
L1
L2/N
COM
01
00
03
02
05
04
07
06
09
11
08
COMM
10
01
00
03
05
02
04
00
01
COM
07
06
09
11
10
08
COMM
00
01
COM
02
COM
03
COM
04
COM
06
05
07
03
02
04
COM
06
05
07
OUT
10
01
00
03
05
02
04
00
01
COM
07
06
09
08
11
10
02
COM
03
COM
04
COM
L1
L2/N
COM
01
03
02
05
04
07
06
09
07
03
02
04
COM
06
05
10
01
00
03
05
02
04
00
01
COM
07
06
09
11
10
08
COMM
00
07
11
08
COMM
06
05
IN
00
COMM
00
SYSMAC
CP1L
11
08
COMM
OUT
01
COM
02
COM
03
COM
04
COM
06
05
07
03
02
04
COM
06
05
07
OUT
Send the command frame with Directly connect the host computer in a 1:1
the CPU Unit’s SEND, RECV, or system.
CMND instruction. Receive
response from the host comSEND/RECV/
puter.
CMND
FINS
Application:
Use this method when commuHeader Terminator
nicating primarily from the PLC
to the host computer to transmit
status information, such as error
information.
Remarks:
The FINS command will be
placed between a Host Link
header and terminator when it is
sent. The FINS command must
be interpreted at the host computer and then the host computer must return a response.
FINS command (with
Host Link header and
terminator) is sent.
SYSMAC
CP1L
IN
L1
L2/N
COM
01
00
03
02
05
04
07
06
09
11
08
COMM
10
01
00
03
05
02
04
00
01
COM
07
06
09
08
11
10
COMM
00
01
COM
02
COM
03
COM
04
COM
06
05
07
03
02
04
COM
06
05
07
OUT
Host computer
389
Section 6-3
Serial Communications
Procedure
Set the PLC Setup from the CXProgrammer.
(Set the communications mode to
Host Link and set the parameters.)
Power OFF
Connect the CPU Unit and external device
via RS-232C. (Mount the RS-232C Option
Board in option slot 1 or 2.)
Set the DIP switch on the front of
the CPU Unit.
Turn pin 4 OFF when suing serial port 1.
Turn pin 5 OFF when suing serial port 2.
Power ON
PLC to Host computer
Host computer to PLC
Send FINS
commands from
the host computer.
Send Host Link
commands from
the host computer.
Execute SEND/RECV/CMND
instructions in the PLC’s program.
Return a response from the host
computer. (A program is required in
the host computer.)
Host Link Commands
Type
Header
code
I/O memRR
ory read
commands RL
Name
Function
CIO AREA READ
Reads the contents of the specified number of CIO Area words starting from
the specified word.
LINK AREA READ
Reads the contents of the specified number of Link Area words starting from
the specified word.
RH
HR AREA READ
Reads the contents of the specified number of Holding Area words starting
from the specified word.
RC
PV READ
RG
RD
RJ
390
The following table lists the host link commands. Refer to the SYSMAC
CS/CJ-series Communications Commands Reference Manual (W342) for
more details.
Reads the contents of the specified number of timer/counter PVs (present
values) starting from the specified timer/counter.
T/C STATUS READ Reads the status of the Completion Flags of the specified number of timers/counters starting from the specified timer/counter.
DM AREA READ
Reads the contents of the specified number of DM Area words starting from
the specified word.
AR AREA READ
Reads the contents of the specified number of Auxiliary Area words starting
from the specified word.
Section 6-3
Serial Communications
Type
Header
Name
code
WR
CIO AREA WRITE
I/O memory write
commands WL
WH
Function
Writes the specified data (word units only) to the CIO Area, starting from the
specified word.
LINK AREA WRITE Writes the specified data (word units only) to the Link Area, starting from the
specified word.
HR AREA WRITE
Writes the specified data (word units only) to the Holding Area, starting from
the specified word.
WC
PV WRITE
Writes the PVs (present values) of the specified number of timers/counters,
starting from the specified timer/counter.
WD
DM AREA WRITE
Writes the specified data (word units only) to the DM Area, starting from the
specified word.
WJ
AR AREA WRITE
Writes the specified data (word units only) to the Auxiliary Area, starting from
the specified word.
Reads the 4-digit BCD constant or word address in the SV of the specified
timer/counter instruction.
Searches for the specified timer/counter instruction beginning at the specified program address and reads the 4-digit constant or word address in the
SV.
Searches for the specified timer/counter instruction beginning at the specified program address and reads the 4-digit BCD constant or word address in
the SV.
Timer/
R#
counter SV
read
R$
commands
R%
Timer/
W#
counter SV
write
W$
commands
W%
SV READ 1
SV READ 2
SV READ 3
SV CHANGE 1
SV CHANGE 2
Changes the 4-digit BCD constant or word address in the SV of the specified
timer/counter instruction.
Searches for the specified timer/counter instruction beginning at the specified program address and changes the 4-digit constant or word address in
the SV.
SV CHANGE 3
Searches for the specified timer/counter instruction beginning at the specified program address and changes the 4-digit constant or word address in
the SV.
MS
CPU Unit
status commands
SC
MF
STATUS READ
Reads the operating status of the CPU Unit (operating mode, force-set/reset
status, fatal error status).
STATUS CHANGE
ERROR READ
Changes the CPU Unit’s operating mode.
Reads and clears errors in the CPU Unit (non-fatal and fatal).
Forceset/forcereset commands
KS
KR
FORCE SET
FORCE RESET
Force-sets the specified bit.
Force-resets the specified bit.
FK
MULTIPLE FORCE Force-sets, force-resets, or clears the forced status of the specified bits.
SET/RESET
KC
FORCE
SET/RESET CANCEL
Cancels the forced status of all force-set and force-reset bits.
Model read MM
command
PLC MODEL READ Reads the model type of the PLC.
TS
Test command
Program
RP
area
access
WP
commands
TEST
I/O memQQMR
ory compound read QQIR
commands
Returns, unaltered, one block of data transmitted from the host computer.
PROGRAM READ
Reads the contents of the CPU Unit’s user program area in machine language (object code).
PROGRAM WRITE Writes the machine language (object code) program transmitted from the
host computer into the CPU Unit’s user program area.
Registers the desired bits and words in a table.
COMPOUND
COMMAND
COMPOUND
READ
Reads the registered words and bits from I/O memory.
391
Section 6-3
Serial Communications
Type
Header
Name
code
Host Link
XZ
ABORT (command
communionly)
cations
**
INITIALIZE (comprocessing
mand only)
commands
IC
Undefined command
(response only)
FINS Commands
Type
I/O Memory
Area Access
Commands
Function
Aborts the host link command that is currently being processed.
Initializes the transmission control procedure of all PLCs connected to the
host computer.
This response is returned if the header code of a command was not recognized.
The following table lists the FINS commands. Refer to the FINS Commands
Reference Manual (W227) for more details.
Command
Name
code
01
01
MEMORY AREA READ
Function
Reads consecutive data from the I/O memory area.
01
01
02
03
MEMORY AREA WRITE
MEMORY AREA FILL
Writes consecutive data to the I/O memory area.
Fills the specified range of I/O memory with the same
data.
01
04
MULTIPLE MEMORY AREA
READ
Reads non-consecutive data from the I/O memory area.
01
05
MEMORY AREA TRANSFER
Copies and transfers consecutive data from one part of
the I/O memory area to another.
02
02
01
02
PARAMETER AREA READ
PARAMETER AREA WRITE
Reads consecutive data from the parameter area.
Writes consecutive data to the parameter area.
02
03
PARAMETER AREA FILL
Program Area 03
Access Com- 03
mands
03
Execution
04
Control Com- 04
mands
Configuration 05
Read Com05
mands
Status Read
06
Commands
06
06
PROGRAM AREA READ
Fills the specified range of the parameter area with the
same data.
Reads data from the user program area.
07
PROGRAM AREA WRITE
Writes data to the user program area.
08
01
PROGRAM AREA CLEAR
RUN
Clears the specified range of the user program area.
Switches the CPU Unit to RUN or MONITOR mode.
02
STOP
Switches the CPU Unit to PROGRAM mode.
01
CONTROLLER DATA READ
Reads CPU Unit information.
02
CONNECTION DATA READ
Reads the model numbers of the specified Units.
01
CONTROLLER STATUS READ
Reads the CPU Unit’s status information.
20
CYCLE TIME READ
Reads the average, maximum, and minimum cycle
times.
Clock Access
Commands
07
07
01
02
CLOCK READ
CLOCK WRITE
Reads the clock.
Sets the clock.
Message
Access Commands
09
20
MESSAGE READ/CLEAR
Reads/clears messages and FAL (FALS) messages.
Access Right
Commands
0C
0C
01
02
0C
03
ACCESS RIGHT ACQUIRE
ACCESS RIGHT FORCED
ACQUIRE
ACCESS RIGHT RELEASE
Error Access
Commands
21
01
ERROR CLEAR
Acquires the access right if no other device holds it.
Acquires the access right even if another device currently holds it.
Releases the access right regardless of what device
holds it.
Clears errors and error messages.
21
21
02
03
ERROR LOG READ
ERROR LOG CLEAR
Reads the error log.
Clears the error log pointer to zero.
Forced Status
Commands
23
01
FORCED SET/RESET
23
02
Parameter
Area Access
Commands
392
Force-sets, force-resets, or clears the forced status of
the specified bits.
FORCED SET/RESET CANCEL Cancels the forced status of all force-set and force-reset
bits.
Section 6-4
Analog Adjuster and External Analog Setting Input
6-4
6-4-1
Analog Adjuster and External Analog Setting Input
Analog Adjuster
By turning the analog adjuster on the CP1L CPU Unit with a Phillips screwdriver, the PV in the Auxiliary Area (A642) can be changed to any value within
a range of 0 to 255.
Phillips screwdriver
Analog adjuster
Application Example
Setting the value for timer T100 in A642 makes it possible to use T100 as a
variable timer with a range of 0 to 25.5 s (0 to 255). A change in the set value
is reflected with the next scan.
Start input
TIMX
0100
A642
T0100
100.00
Note
6-4-2
Set values from the analog adjuster may vary with changes in the ambient
temperature and the power supply voltage. Do not use it for applications that
require highly precise set values.
External Analog Setting Input
When a voltage of 0 to 10 V is applied to the CP1L CPU Unit's external analog
setting input terminal, the voltage is converted from analog to digital and the
PV in A643 can be changed to any value within a range of 0 to 256 (0000 to
0100 hex).
External analog settings
input connector
Potentiometer, external
temperature sensor, etc.
0 to 10 V
External Analog Setting
Input Wiring
Use the 1-m lead wire (included) for wiring to the external analog setting input
connector on the CP1L CPU Unit.
393
Section 6-5
Battery-free Operation
External analog
settings input
connector
White (+)
0 to 10 V
Black (-)
Relationship between
Input Voltage and PV in
A643
A643 PV (BCD)
281
256
0
0
10
11
Input voltage (V)
The maximum input voltage is 11 VDC. Do not apply a voltage greater than
that.
Application Example
Setting the value for timer T101 in A643 makes it possible to use T101 as a
variable timer with a range of 0 to 25.6 s (0 to 256). A change in the set value
is reflected with the next scan.
Start input
T0101
TIMX
0101
A 643
100.01
Note
6-5
6-5-1
External analog setting input values may vary with changes in the ambient
temperature. Do not use the external analog setting input for applications that
require highly precise set values.
Battery-free Operation
Overview
With the CP1L CPU Unit, saving backup data in the built-in flash memory
(non-volatile memory) enables operation with no battery mounted (i.e., battery-free operation).
I/O memory (such as CIO), however, is constantly refreshed during operation,
so backup data is not saved in the built-in flash memory. When battery-free
operation is used, therefore, programs must be created assuming that I/O
memory data will not be saved.
For example, if a battery is mounted, then HR, CNT, and DM data is saved
during power interruptions if a battery is mounted but not when battery-free
operation is used.
394
Section 6-5
Battery-free Operation
In that case it is necessary to set the required values in the ladder program. It
is also possible to save to the built-in flash memory in advance the DM initial
values that are to be set for the DM on RAM at startup.
6-5-2
Using Battery-free Operation
Precautions when
Creating Programs
for Battery-free
Operation
Be careful of the following points, and create programs for which it will not be
a problem even if the correct I/O memory values are not held.
• For unstable parts of I/O memory, include programming at the start of
operation to set required data.
• When battery-free operation is used, the Output OFF Flag (A500.15) in
the Auxiliary Area becomes unstable. When the Output OFF Flag turns
ON, all outputs turn OFF, so include the following program for clearing the
Output OFF Flag at the start of operation.
First Cycle Flag
RSET
A200.11
A500.15
• Do not reference the clock function, (the clock data in words A351 to A354
of the Auxiliary Area, or the various kinds of time data).
Saving DM Initial
Values (Only when
Required)
1,2,3...
Use the following procedure to save to the built-in flash memory the DM initial
values that are to be set at startup.
1. First set in the DM Area the data that is to be set as initial values at startup.
2. Execute a backup to flash memory from the CX-Programmer's Memory
Cassette Transfer/Data Memory Backup Dialog Box.
The procedure is as follows:
a. Select PLC - Edit - Memory Cassette/DM.
The following Memory Cassette Transfer/DM Backup Dialog Box will
be displayed.
395
Section 6-6
Memory Cassette Functions
b.
Note
Select the Data Memory Option in the Backup to Flash Memory Area
and click the Backup Button.
The DM data will be written to the built-in flash memory.
The DM data that is saved and written at startup is the entire DM Area (D0 to
D32767).
PLC Setup
1,2,3...
1. Set Do not detect Low Battery (run without battery) to Do not detect.
2. Set IOM Hold Bit Status at Startup and Forced Status Hold Bit Status at
Startup to Clear (OFF).
3. Set Read DM from flash memory to Read. (Only when DM initial values
have been saved as described above.)
!Caution The CP1L CPU Units automatically back up the user program and parameter
data to flash memory when these are written to the CPU Unit. Also, the CXProgrammer can be used to save all of the data in the DM Area to the flash
memory for use as initial values when the power supply is turned ON. Neither
of these functions saves the I/O memory data (including HR Area data,
counter PVs and Completion Flags, and DM Area data other than initial values). The HR Area data, counter PVs and Completion Flags, and DM Area
data other than initial values are held during power interruptions with a battery. If there is a battery error, the contents of these areas may not be accurate after a power interruption. If HR Area data, counter PVs and Completion
Flags, and DM Area data other than initial values are used to control external
outputs, prevent inappropriate outputs from being made whenever the Battery
Error Flag (A402.04) is ON.
6-6
6-6-1
Memory Cassette Functions
Overview
CP1L CPU Units have Memory Cassette functions that enable data in the
CPU Unit to be stored on and read from a special CP1W-ME05M Memory
Cassette. These functions can be used for the following applications.
• Copying data to other CPU Units to produce duplicate devices.
• Backing up data in case the CPU Unit needs to be replaced due to any
malfunction.
• Writing and updating data when existing device versions are upgraded.
Note
Memory Cassette
Specifications
Memory Cassette cannot be used in CP1L-J CPU Unit.
Use the following Memory Cassette.
Model
CP1W-ME05M
Specifications
• Memory size
512 Kwords
• Storage capacity The following CPU Unit data (for each Unit)
• User programs
• Parameters
• Comment memory
• Function Block (FB) sources
• DM initial values in the built-in flash memory
• DM in RAM
• Write method
• Read method
396
Operations from the CX-Programmer
Powering up with DIP switch pin SW2 set to
ON, or operations from the CX-Programmer
Section 6-6
Memory Cassette Functions
Data that Can be
Stored on a Memory
Cassette
The following data can be stored on a Memory Cassette.
Data stored on Memory Cassette
User programs
Parameters
Comment data
for user programs
Location in CPU Unit
Built-in RAM, built-in flash
memory (User Program Area)
PLC Setup, CPU Bus Unit set- Built-in RAM, built-in flash
tings, routing tables
memory (Parameter Area)
Variable tables
Built-in flash memory (Comment Memory Area)
(I/O comments, rung comBuilt-in flash memory (Comments, program comments)
ment Memory Area)
Program indexes (section
names, section comments,
program comments)
Function Block (FB) sources
Built-in flash memory (Comment Memory Area)
Built-in flash memory (FB
Source Memory Area)
DM
Built-in RAM (D0 to D32767 in
DM Area)
DM initial values (See note.)
Built-in flash memory (DM Initial Values Area)
The areas for storing various types of data have fixed allocations in the Memory Cassette, and a single Memory Cassette corresponds to a single CPU
Unit.
Therefore it is not possible to simultaneously store multiple items of the same
type of data (e.g., two user programs).
Also, the data can only be read to a CPU Unit. It cannot be directly managed
from a personal computer like files.
The only data that can be stored on a Memory Cassette is the data from a
CPU Unit.
Note
6-6-2
The CX-Programmer's function for saving DM initial values is used for saving
the values in the DM Area (D0 to D32767) to the built-in flash memory as initial values. By means of a setting in the PLC Setup, these initial values can
then be automatically written to the DM Area (D0 to D32767) when the power
is turned ON.
Mounting and Removing a Memory Cassette
Mounting
1,2,3...
1. Turn OFF the power supply to the PLC and removed the cover to the Memory Cassette socket.
CPU Units with 10, 14 or 20 I/O Points
CPU Units with 30, 40 or 60 I/O Points
397
Section 6-6
Memory Cassette Functions
2. Holding the Memory Cassette with the side with the nameplate facing upwards, insert the Memory Cassette all the way into the slot.
CPU Units with 10, 14 or 20 I/O Points
CPU Units with 30, 40 or 60 I/O Points
MEMORY
MEMORY
Removal
1,2,3...
1. Turn OFF the power supply to the PLC.
2. Grasp the end of the Memory Cassette between the thumbnail and index
finger, and slide it upwards to remove it.
CPU Units with 10, 14 or 20 I/O Points
CPU Units with 30, 40 or 60 I/O Points
MEMORY
MEMORY
Note
(1) Turn OFF the power supply before mounting or removing the Memory
Cassette.
(2) Absolutely do not remove the Memory Cassette while the BKUP indicator
is flashing (i.e., during a data transfer or verification). Doing so could
make the Memory Cassette unusable.
(3) The Memory Cassette is small, so be careful to not let it be dropped or
lost when it is removed.
398
Section 6-6
Memory Cassette Functions
6-6-3
Operation Using the CX-Programmer
Use the following procedure for the Memory Cassette function.
1,2,3...
1. Select PLC - Edit - Memory Cassette/DM.
The following Memory Cassette Transfer/Data Memory Backup Dialog Box
will be displayed.
2. Under Transfer Data Area, check whatever types of data are to be transferred.
Click the Valid Area Check Button to check the valid areas in the Memory
Cassette mounted in the CPU Unit and the operating mode after automatic
transfer at startup. If the user program is specified to be written, select the
operating mode after automatic transfer at startup.
• PROGRAM mode (default): Used, e.g., to copy the system.
• Use PLC Setup: Used, e.g., for operation with the Memory Cassette.
3. Execute any of the following operations.
• To write data from the CPU Unit to the Memory Cassette:
Click the PLC ⇒ Memory Cassette Button.
• To read data from the Memory Cassette to the CPU Unit:
Click the Memory Cassette ⇒ PLC Button.
• To verify data transferred between the CPU Unit and the Memory Cassette:
Click the Compare Button. This will cause all areas to be verified regardless of the items checked under Transfer Area.
• To format the Memory Cassette:
Click the Format Button. This will cause all areas to be formatted regardless of the items checked under Transfer Area.
399
Section 6-6
Memory Cassette Functions
6-6-4
Memory Cassette Data Transfer Function
Writing from the CPU
Unit to the Memory
Cassette
The CX-Programmer’s Memory Cassette function can be used to write data
from the CPU Unit to the Memory Cassette. The data to be written can be
individually specified.
CX-Programmer
CP1L CPU Unit
Data in CPU
Unit
Writing from CPU Unit
to Memory Cassette
Backup
CP1W-ME05M
Memory Cassette
Programs, parameters, DM initial
values, comment memory, etc.
(Can be specified individually.)
• When creating a Memory Cassette for a device version upgrade, select
and save only the required data (such as the user program and DM).
• When creating a Memory Cassette for backup or duplication, save all of
the data to the Memory Cassette.
CPU Unit and Memory
Cassette Verification
When using the CX-Programmer’s Memory Cassette function to store data in
the Memory Cassette, verify that data by comparing it to the data in the CPU
Unit.
CX-Programmer
CP1L CPU Unit
Data in CPU
Unit
Verification of CPU Unit
and Memory Cassette data
Verification
User program, parameters, data
memory, symbol table, comment,
program index, DM initial value
This function can be used for operations such as confirmation after data has
been written to the Memory Cassette, or confirming that the data in the
backup matches the data in the CPU Unit.
400
Section 6-6
Memory Cassette Functions
Automatic Transfer
from the Memory
Cassette at Startup
With just a simple DIP switch setting, data stored in advance in the Memory
Cassette can be automatically read when the power is turned ON, and written
to the corresponding areas in the CPU Unit.
Mount a Memory Card and set DIP switch pin SW2 to ON, and then turn the
power OFF and back ON.
All valid data in the Memory Card will be automatically transferred to the CPU
Unit.
Note
When this function is executed, at least the user program must be stored on
the Memory Cassette.
CP1L CPU Unit
Data in CPU
Unit
Power turned ON.
DIP switch SW2 set to ON.
Data automatically transferred from Memory
Cassette to CPU Unit.
Programs, parameters, DM initial values,
comment memory, etc. (Can be specified
individually.)
This function can be used to copy data to another CPU Unit without using the
CX-Programmer.
Another CPU Unit
CP1L CPU Unit
Data in CPU
Unit
CP1W-ME05M
Memory Cassette
Can be automatically
transferred at startup.
Programs, parameters, DM initial
values, comment memory, etc.
User programs can be overwritten to upgrade equipment versions without
using the CX-Programmer.
If writing data from the CPU Unit to the Memory Cassette and the CPU Unit is
set to use the operating mode specified in the PLC Setup as the operating
mode after automatic transfer at startup, operation can be started without
cycling the power, enabling operation from the Memory Cassette.
401
Section 6-6
Memory Cassette Functions
Reading Data from
the Memory Cassette
to the CPU Unit
The CX-Programmer’s Memory Cassette function can be used to read data
stored on the Memory Cassette, and transfer it to the corresponding areas in
the CPU Unit. The data to be read can be individually specified.
CX-Programmer
CP1L CPU Unit
Data in CPU
Unit
Reading from Memory
Cassette to CPU Unit
Reading
CP1W-ME05M
Memory Cassette
Programs, parameters, DM initial
values, comment memory, etc.
(Can be specified individually.)
This function can be used for operations such as writing the required backup
data to the CPU Unit for maintenance.
Precautions when
Using the Memory
Cassette Data
Transfer Function
• In order for Memory Cassette data to be transferred, the Memory Cassette must be mounted in the CPU Unit.
• The BKUP indicator will light while data is being transferred to or verified
in a Memory Cassette. Never turn OFF the power to the PLC or remove
the Memory Cassette while the BKUP indicator is lit. Doing either may
make it impossible to use the Memory Cassette.
• Memory Cassette data transfers and verification are possible only when
the CPU Unit operating mode is PROGRAM mode. The Memory Cassette
transfer function cannot be used in either RUN or MONITOR mode.
• When using automatic transfer from a Memory Cassette at startup, be
sure to transfer the data to the Memory Cassette if any changes are made
using online editing.
• The operating mode cannot be switched from PROGRAM mode to RUN
or MONITOR mode while a Memory Cassette data transfer or verification
is in progress.
• The following table shows whether data transfers are enabled when the
CPU Unit is protected in various ways.
Type of protection
402
Transfer from CPU Unit Transfer from Memory
to Memory Cassette
Cassette to CPU Unit
Not protected.
Yes
System protected by DIP switch Yes
pin SW1 set to ON.
Yes
No
Protected by password. OverYes
writing and duplication both permitted.
Protected by password. OverYes
writing prohibited and duplication permitted.
Yes
Transfer enabled only at
startup.
Section 6-6
Memory Cassette Functions
Type of protection
Protected by password. Overwriting permitted and duplication prohibited.
Transfer from CPU Unit Transfer from Memory
to Memory Cassette
Cassette to CPU Unit
No
Yes
Protected by password. OverNo
writing and duplication both prohibited.
Transfer enabled only at
startup.
• If a Memory Cassette is not mounted, data will be read from the flash
memory built into the CPU Unit to start operation regardless of the setting
of DIP switch pin SW2.
• CP1L CPU Units with 10, 14 or 20 I/O points. do not have D10000 to
D31999. These words will be treated as follows when data from a CPU
Unit with 10, 14 or 20 I/O points is transferred to a CPU Unit with 30, 40 or
60 I/O points or visa versa.
Transferring data from a CPU Unit with
10, 14 or 20 I/O points to one with 30,
40 or 60 I/O points
Transferring data from a CPU Unit with
30, 40 or 60 I/O points to one with 10,
14 or 20 I/O points
6-6-5
“0000” will be written to D10000 to D31999
in the CPU Unit with 30, 40 or 60 I/O points.
D10000 to D31999 in the CPU Unit with 30,
40 or 60 I/O points will be ignored.
Procedures for Automatic Transfer from the Memory Cassette at
Startup
Copying the System
1,2,3...
Use the following procedure to enable automatic transfer at startup.
1. Prepare a Memory Cassette containing the required data.
When transferring the data to the Memory Cassette, set the operating
mode after automatic transfer at startup to PROGRAM mode (default).
2. With the power supply turned OFF to the CPU Unit, remove the cover from
the Memory Cassette slot and insert the Memory Cassette.
3. Open the cover for the CPU Unit's PERIPHERAL section and set DIP
switch pin SW2 to ON.
DIP switch pin
SW2 set to ON.
MEMORY
4. Turn ON the power supply to the CPU Unit.
5. The automatic transfer from the Memory Cassette will begin. The rest of
the procedure assumes that the operating mode after automatic transfer at
startup to PROGRAM mode (default).
6. After the automatic transfer has been completed, turn OFF the power supply to the CPU Unit.
7. Remove the Memory Cassette, and replace the Memory Cassette slot cover.
8. Return the setting of DIP switch pin SW2 to OFF, and close the cover.
403
Section 6-7
Program Protection
9. Turn the power supply to the CPU Unit back ON.
Note
After the automatic transfer from the Memory Cassette at startup has been
completed with the operating mode after automatic transfer at startup set to
PROGRAM mode (default), the transfer will not start again automatically
(regardless of the Startup Mode setting in the PLC Setup). As described in the
procedure above, to start operation turn the power supply OFF, return the setting of DIP switch SW2 to OFF, and then turn the power supply back ON. If the
the operating mode specified in the PLC Setup is set as the operating mode
after automatic transfer at startup, operation will start without changing the
DIP switch SW2 or Memory Cassette.
1,2,3...
1. Prepare a Memory Cassette containing the required data.
When transferring the data to the Memory Cassette, set the operating
mode after automatic transfer at startup to PROGRAM mode (default).
Operating from a
Memory Cassette
2. With the power supply turned OFF to the CPU Unit, remove the cover from
the Memory Cassette slot and insert the Memory Cassette.
3. Open the cover for the CPU Unit's PERIPHERAL section and set DIP
switch pin SW2 to ON.
4. Turn ON the power supply to the CPU Unit.
Note
6-7
If, when the data is transferred to the Memory Cassette, the operating mode
specified in the PLC Setup is set as the operating mode after automatic transfer at startup, operation will start automatically after data transfer, even if the
power is not cycled. Be sure that starting operation will cause no problems
before using automatic transfer at startup.
Program Protection
The following protection functions are supported by the CP1L CPU Units.
• Read protection from the CX-Programmer
• Write protection using a DIP switch setting
• Write protection setting from the CX-Programmer
• Write protection against FINS commands sent to the CPU Unit via networks
• Prohibiting creating a program file for file memory
6-7-1
Read Protection
Overview
It is possible to read-protect individual program tasks (called task read protection) or the entire user program (called UM read protection).
Read protection prevents anyone from displaying or editing the read-protected
set of tasks or entire user program from CX-Programmer without inputting the
correct password. If the password is input incorrectly five times consecutively,
password input will be disabled for two hours, providing even better security
for PLC data.
Operating Procedure
1,2,3...
404
1. Go online and select PLC - Protection - Release Password. The following Release Read Protection Dialog Box will be displayed.
Section 6-7
Program Protection
2. Input the password. If the password is incorrect, one of the following messages will be displayed and protection will not be released.
UM Read Protection
Task Read Protection
3. If an incorrect password is input five times consecutively, read protection
will not be released even if the correct password is input on the sixth attempt and displaying and editing the entire user program or the specified
tasks will be disabled for two hours.
Read Protection for Individual Tasks Using Passwords
Overview
It is possible to read-protect individual program tasks (referred to as “task
read protection” below) or the entire PLC. The same password controls
access to all of the read-protected tasks.
Task read protection prevents anyone from displaying or editing the read-protected set of tasks from CX-Programmer without inputting the correct password. In this case, the entire program can be uploaded, but the read-protected
tasks cannot be displayed or edited without inputting the correct password.
Tasks that are not read-protected can be displayed, edited, or modified with
online editing.
Note Task read protection cannot be set if UM read protection is already set. However, it is possible to set UM read protection after task read protection has
been set.
405
Section 6-7
Program Protection
CX-Programmer
Set a password for particular tasks in the project directory.
Password?
Those tasks cannot be displayed without inputting the password.
CP1L CPU Unit
Read
END
The entire user program can be uploaded, but passwordprotected tasks will not be displayed until the password is input.
END
The other tasks can be displayed/edited and are also accessible
through online editing.
END
Operating Procedure
1,2,3...
1. Right-click the tasks that will be password-protected, select Properties
from the pop-up menu, and select the Task read protect Option on the Protection Tab Page.
2. Display the Protection Tab of the PLC Properties Dialog Box and register
a password in the Task read protection Box.
3. Connect online and select PLC - Transfer - To PLC to transfer the program. The tasks registered in step 2 will be password-protected.
Note
406
The program can be transferred after step 1, above, and then password protection be set by selecting PLC - Protection - Set Password. The tasks registered in step 1 will be password-protected.
Section 6-7
Program Protection
Usage
Apply read protection to tasks when you want to convert those task programs
to “black box” programs.
Task 0
Accessible
END
Task 1
Not accessible
END
Password applied.
Task converted to "black box."
Task 2
Accessible
END
Note
1. If the CX-Programmer is used to read a task with task read protection applied, an error will occur and the task will not be read. Likewise, if the PT
Ladder Monitor function is used to read a password protected task, an error will occur and the task will not be read.
2. The entire program can be transferred to another CPU Unit even if individual tasks in the program are read-protected. The task read protection will
remain in effective for the password-protected tasks.
3. When the CX-Programmer is used to compare a user program in the computer’s memory with a user program in the CPU Unit, password-protected
tasks will be compared too.
Restrictions to Function
Block Use
Function block definitions can be read even if the entire program or individual
tasks in a program containing function blocks are read-protected. If required,
set read protection individually for each function block.
Prohibiting Backing Up
the Programs to a Memory
Cassette
Overview
When a password is set for the entire user program or for a task from the CXProgrammer, prohibiting backing up the user program can be set as an option.
Doing so will make it impossible to upload PLC data to the CX-Programmer
and make it impossible to save PLC data offline to a storage device.
CX-Programmer
Password?
When a password is set for the entire user program, or for one or more tasks,
backing up the user program (i.e., creating an OBJ program file) can be prohibited.
Creating a backup to a Memory
Cassette online can be prohibited.
CPU Unit
CX-Programmer
No PLC data
can be uploaded.
Memory Cassette
A program file (.OBJ) cannot be created with file memory operations.
Operating Procedure
1,2,3...
1. When registering a password in the UM read protection password Box or
Task read protection Box, select the Prohibit from saving to a memory
card, and transferring program from PLC Option.
407
Section 6-7
Program Protection
2. Go online and then either select PLC - Transfer - To PLC to transfer the
program or select PLC - Protection - Set Password and click the OK button.
Application
The above procedure enables using a password to protect against disclosure
of the program to unauthorized persons.
Note
(1) Copying the program is possible if read protection is not set.
(2) The setting to prohibit backing up the program is not effective until the
program is transferred to the PLC. Always transfer the program after
changing the setting.
Prohibiting Creating
Program Files in File
Memory
When a password is set for the entire user program or for a task from the CXProgrammer, prohibiting creating a program file (.OBJ) as a backup can be
set as an option. Doing so will make it impossible to create a program file in
file memory using the file memory operations. (This setting will also prohibit
uploading PLC data to the CX-Programmer and saving PLC data to a storage
device.)
CX-Programmer
Password?
When a password is set for the entire user program, or for one or more tasks,
backing up the user program (i.e., creating an OBJ program file) can be prohibited.
Creating a program file as a backup using online
operations can be prohibited.
CPU Unit
CX-Programmer
No PLC data
can be uploaded.
Memory Cassette
A program file (.OBJ) cannot be created with file memory operations.
Operating Procedure
1,2,3...
408
1. When registering a password in the UM read protection password Box or
Task read protection Box, select the Prohibit from saving to a memory
card, and transferring program from PLC Option.
Section 6-7
Program Protection
▲
Properties
2. Go online and then either select PLC - Transfer - To PLC to transfer the
program or select PLC - Protection - Set Password and click the OK button.
Application
The above procedure enables using a password to protect against disclosure
of the program to unauthorized persons.
Note
(1) Copying the program is possible if read protection is not set.
(2) The setting to prohibit backing up the program is not effective until the
program is transferred to the PLC. Always transfer the program after
changing the setting.
Auxiliary Area Flags and Bits Related to Password Protection
Name
UM Read Protection
Flag
Task Read Protection
Flag
Bit
Description
address
A99.00
Indicates whether or not the PLC (the entire user
program) is read-protected.
OFF: UM read protection is not set.
ON: UM read protection is set.
A99.01
Program Write Protec- A99.02
tion for Read Protection
Enable/Disable Bit for
Program Backup
A99.03
UM Read Protection
Release Enable Flag
A99.12
Task Read Protection
Release Enable Flag
A99.13
Indicates whether or not selected program tasks
are read-protected.
OFF: Task read protection is not set.
ON: Task read protection is set.
Indicates whether or not the write protection
option has been selected to prevent overwriting of
password-protected tasks or programs.
OFF: Overwriting allowed
ON: Overwriting prohibited (write-protected)
Indicates whether or not a backup program file
(.OBJ file) can be created when UM read protection or task read protection is set.
OFF: Creation of backup program file allowed
ON: Creation of backup program file prohibited
Indicates when UM read protection cannot be
released because an incorrect password was
input five times consecutively.
OFF: Protection can be released
ON: Protection cannot be released
Indicates when task read protection cannot be
released because an incorrect password was
input five times consecutively.
OFF: Protection can be released
ON: Protection cannot be released
409
Section 6-7
Program Protection
6-7-2
Write Protection
Write-protection
Using the DIP Switch
The user program can be write-protected by turning ON pin 1 of the CPU
Unit’s DIP switch. When this pin is ON, it won’t be possible to change the user
program or parameter area (e.g., PLC Setup and routing tables) from the CXProgrammer. This function can prevent the program from being overwritten
inadvertently at the work site.
It is still possible to read and display the program from the CX-Programmer
when it is write-protected.
CPU Unit DIP Switch
Pin
SW1
Name
User Program Memory Write Protection
Settings
ON: Protected
OFF: Not protected
Confirming the User Program Date
The dates the program and parameters were created can be confirmed by
checking the contents of A90 to A97.
Auxiliary Area Words
Name
User Program
Date
Parameter Date
410
Address
A90 to A93
A94 to A97
Description
The time and date the user program was last overwritten in memory is given in BCD.
A90.00 to A90.07
Seconds (00 to 59 BCD)
A90.08 to A90.15
A91.00 to A91.07
Minutes (00 to 59 BCD)
Hour (00 to 23 BCD)
A91.08 to A91.15
A92.00 to A92.07
Day of month (01 to 31 BCD)
Month (01 to 12 BCD)
A92.08 to A92.15
A93.00 to A93.07
Year (00 to 99 BCD)
Day (00 to 06 BCD)
Day of the week:
00: Sunday, 01: Monday,
02: Tuesday, 03: Wednesday,
04: Thursday, 05: Friday,
06: Saturday
The time and date the parameters were last overwritten in memory is given in BCD. The format is the
same as that for the User Program Date given above.
Program Protection
Section 6-7
Write-protection
Using Passwords
The program (or selected tasks) can also be write-protected if the write protection option is selected from the CX-Programmer when a password is being
registered for the entire program or those selected tasks. The write protection
setting can prevent unauthorized or accidental overwriting of the program.
CX-Programmer
Password?
When a password is being registered for the entire user
program or selected tasks, program write-protection can be
enabled/disabled with an option setting.
The user program cannot be overwritten.
CPU Unit
Overwriting can be prohibited with password protection,
regardless of the DIP switch setting.
Memory Cassette
The user program cannot be overwritten.
Note
1. If the selected tasks are write-protected by selecting this option when registering a password, only the tasks (program) that are password-protected
will be protected from overwriting. It will still be possible to overwrite other
tasks with operations such as online editing and task downloading.
2. All tasks (programs) can be overwritten when program read protection is
not enabled.
Operating Procedure
1,2,3...
Table 1 When registering a password in the UM read protection password Box or
Task read protection Box, select the Prohibit from overwriting to a protected
program Option.
3. Either select PLC - Transfer - To PLC to transfer the program or select
PLC - Protection - Set Password and click the OK button.
Note
The setting to enable/disable creating file memory program files will not take
effect unless the program is transferred to the CPU Unit. Always transfer the
program after changing this setting.
411
Section 6-7
Program Protection
Write Protection
against FINS
Commands Sent to
the CPU Unit via
Networks
It is possible to prohibit write operations and other editing operations sent to
the PLC's CPU Unit as FINS commands through a network (including write
operations from CX-Programmer, CX-Protocol, CX-Process, and other applications using Fins Gateway). Read processes are not prohibited.
FINS write protection can disable write processes such as downloading the
user program, PLC Setup, or I/O memory, changing the operating mode, and
performing online editing.
It is possible to exclude selected nodes from write protection so that data can
be written from those nodes.
An event log in the CPU Unit automatically records all write processes sent
through the network and that log can be read with a FINS command.
6-7-3
Protecting Program Execution Using the Lot Number
The lot number is stored in A310 and A311 and can be used to prevent the
program from being executed on a CPU Unit with the wrong lot number.
The following instructions can be added to the program to create a fatal error
and thus prevent program execution if an attempt is made to execute the program on a CPU Unit with the incorrect lot number. A password can also be set
to read-protect the program so that it cannot be copied, e.g., using a Memory
Cassette.
The lot number stored in A310 and A311 cannot be changed by the user.
The upper digits of the lot number are stored in A311 and the lower digits are
stored in A310, as shown below.
Manufacturing lot
number (5 digits)
A311
A310
X, Y, and Z in the lot number are converted to 10, 11, and 12, respectively, in
A310 and A311. Some examples are given below.
Ladder Programming
Example
Lot number
01805
A311
0005
A310
0801
30Y05
0005
1130
• The following instructions will create a fatal error to prevent the program
from being executed when the lot number is not 23905.
First Cycle Flag
ANDL(610)
A310
#00FFFFFF
D0
<>L(306)
412
FALS(007)
D0
1
#050923
D100
Section 6-8
Failure Diagnosis Functions
• The following instructions will create a fatal error to prevent the program
from being executed when the lot number does not end in 05.
First Cycle Flag
ANDL(610)
A310
#00FF0000
D0
<>L(306)
D0
#050000
FALS(007)
1
D100
• The following instructions will create a fatal error to prevent the program
from being executed when the lot number does not begin with 23Y.
First Cycle Flag
ANDL(610)
A310
#0000FFFF
D0
<>L(306)
D0
#1123
6-8
FALS(007)
1
D100
Failure Diagnosis Functions
This section introduces the following functions.
• Failure Alarm Instructions: FAL(006) and FALS(007)
• Failure Point Detection: FPD(269)
• Output OFF Bit
6-8-1
Failure Alarm Instructions: FAL(006) and FALS(007)
The FAL(006) and FALS(007) instructions generate user-defined errors.
FAL(006) generates a non-fatal error that allows program execution to continue and FALS(007) generates a fatal error that stops program execution.
When the user-defined error conditions (i.e., the execution conditions for
FAL(006) or FAL(007)) are met, the instruction will be executed and the following processing will be performed.
1,2,3...
1. The FAL Error Flag (A402.15) or FALS Error Flag (A401.06) is turned ON.
2. The corresponding error code is written to A400.
3. The error code and time of occurrence are stored in the Error Log.
4. The error indicator on the front of the CPU Unit will flash or light.
5. If FAL(006) has been executed, the CPU Unit will continue operating.
If FALS(007) has been executed, the CPU Unit will stop operating. (Program execution will stop.)
413
Section 6-8
Failure Diagnosis Functions
Operation of FAL(006)
A
FAL
002
#0000
When execution condition A goes ON, an error with FAL number 002 is generated, A402.15 (FAL Error Flag) is turned ON, and A360.02 (FAL Number 002
Flag) is turned ON. Program execution continues.
Errors generated by FAL(006) can be cleared by executing FAL(006) with FAL
number 00 or performing the error read/clear operation from the CX-Programmer.
Operation of FALS(007)
B
FALS
003
#0000
When execution condition B goes ON, an error with FALS number 003 is generated, and A401.06 (FALS Error Flag) is turned ON. Program execution is
stopped.
Errors generated by FAL(006) can be cleared by eliminating the cause of the
error and performing the error read/clear operation from the CX-Programmer.
6-8-2
Failure Point Detection: FPD(269)
FPD(269) performs time monitoring and logic diagnosis. The time monitoring
function generates a non-fatal error if the diagnostic output isn’t turned ON
within the specified monitoring time. The logic diagnosis function indicates
which input is preventing the diagnostic output from being turned ON.
Time Monitoring
Function
FPD(269) starts timing when it is executed and turns ON the Carry Flag if the
diagnostic output isn’t turned ON within the specified monitoring time. The
Carry Flag can be programmed as the execution condition for an error processing block. Also, FPD(269) can be programmed to generate a non-fatal
FAL error with the desired FAL number.
When an FAL error is generated, a preset message will be registered and can
be displayed on the CX-Programmer. FPD(269) can be set to output the
results of logic diagnosis (the address of the bit preventing the diagnostic output from being turned ON) just before the message.
The teaching function can be used to automatically determine the actual time
required for the diagnostic output to go ON and set the monitoring time.
Logic Diagnosis
Function
FPD(269) determines which input bit is causing the diagnostic output to
remain OFF and outputs the result. The output can be set to bit address output (PLC memory address) or message output (ASCII).
If bit address output is selected, the PLC memory address of the bit can be
transferred to an Index Register and the Index Register can be indirectly
addressed in later processing.
414
Section 6-8
Failure Diagnosis Functions
If the message output is selected, an error message can be displayed on the
CX-Programmer at the same time as a FAL error is generated for time monitoring.
FPD
FPD(269)
execution condition A
#0004
&100
D01000
Carry Flag
(ON for timeout)
Control data
(FAL 004, bit address output for failure)
Monitoring time (0.1-s units): 10 s
First register word of diagnostics output
Error-processing block
C (Diagnostic output)
Logic diagnosis
execution condition B
Time Monitoring
Monitors whether output C goes ON with 10 seconds after input A. If C
doesn’t go ON within 10 seconds, a failure is detected and the Carry Flag
is turned ON. The Carry Flag executes the error-processing block. Also, an
FAL error (non-fatal error) with FAL number 004 is generated.
Logic Diagnosis
FPD(269) determines which input bit in block B is preventing output C from
going ON. That bit address is output to D1000 and D1001.
Auxiliary Area Flags and Words
Name
Address
Operation
Error Code
A400
When an error occurs, the error code is stored in
A400.
FAL Error Flag
FALS Error Flag
A402.15
A401.06
Turns ON when FAL(006) is executed.
Turns ON when FALS(007) is executed.
Executed FAL Number Flags
A360 to
A391
The corresponding flag turns ON when an
FAL(006) error occurs.
Error Log Area
A100 to
A199
A300
The Error Log Area contains information on the
most recent 20 errors.
When an error occurs, the Error Log Pointer is
incremented by 1 to indicate where the next error
record will be recorded as an offset from the
beginning of the Error Log Area (A100).
Error Log Pointer
Reset Bit
A500.14
Turn this bit ON to reset the Error Log Pointer
(A300) to 00.
FPD Teaching Bit
A598.00
Turn this bit ON when you want the monitoring
time to be set automatically when FPD(269) is
executed.
Error Log Pointer
415
Section 6-8
Failure Diagnosis Functions
6-8-3
Simulating System Errors
FAL(006) and FALS(007) can be used to intentionally create fatal and nonfatal system errors. This can be used in system debugging to test display
messages on Programmable Terminals (PTs) or other operator interfaces.
Use the following procedure.
1,2,3...
1. Set the FAL or FALS number to use for simulation in A529. A529 is used
when simulating errors for both FAL(006) and FALS(007).
2. Set the FAL or FALS number to use for simulation as the first operand of
FAL(006) or FALS(007).
3. Set the error code and error to be simulated as the second operand (two
words) of FAL(006) or FALS(007). Indicate a nonfatal error for FAL(006)
and a fatal error for FALS(007).
To simulate more than one system error, use more than one FAL(006) or
FALS(007) instruction with the same value in A529 and different values for the
second operand.
Auxiliary Area Flags and Words
Name
FAL/FALS Number
for System Error
Simulation
Address
A529
Operation
Set a dummy FAL/FALS number to use to simulate a system error.
0001 to 01FF hex: FAL/FALS numbers 1 to 511
0000 or 0200 to FFFF hex: No FAL/FALS number
for system error simulation.
Example for a Battery Error
Execution condition
a
MOV
&100
A529
Set FAL number 100 in A529.
MOV
#00F7
D10
Set error code for battery error
(#00F7) in D10.
FAL
100
D10
Generate a battery error using FAL
number 100.
Note Use the same methods as for actual system errors to clear the simulated system errors. Refer to the 11-2 Troubleshooting for details. All system errors
simulated with FAL(006) and FALS(007) can be cleared by cycling the power
supply.
416
Section 6-9
Clock
6-8-4
Output OFF Bit
As an emergency measure when an error occurs, all outputs from Output
Units can be turned OFF by turning ON the Output OFF Bit (A500.15). The
operating mode will remain in RUN or MONITOR mode, but all outputs will be
turned OFF.
Note Normally (when IOM Hold Bit = OFF), all outputs from Output Units are turned
OFF when the operating mode is changed from RUN/MONITOR mode to
PROGRAM mode. The Output OFF Bit can be used to turn OFF all outputs
without switching to PROGRAM mode.
6-9
Clock
A clock is built into the CP1L CPU Unit and is backed up by a battery. The current data is stored in the following words and refreshed each cycle.
Name
Clock data:
A351 to A354
Addresses
A351.00 to A351.07
Function
Second: 00 to 59 (BCD)
A351.08 to A351.15
A352.00 to A352.07
Minute: 00 to 59 (BCD)
Hour: 00 to 23 (BCD)
A352.08 to A352.15
A353.00 to A353.07
Day of the month: 00 to 31 (BCD)
Month: 00 to 12 (BCD)
A353.08 to A353.15
A354.00 to A354.07
Year: 00 to 99 (BCD)
Day of the week:
00: Sunday, 01: Monday,
02: Tuesday, 03: Wednesday,
04: Thursday, 05: Friday, 06: Saturday
Note The clock cannot be used if a battery is not installed or the battery voltage is
low.
417
Section 6-9
Clock
Auxiliary Area Flags and Words
Name
Start-up Time
Addresses
A510 and
A511
Contents
The time at which the power was
turned ON (year, month, day of month,
hour, minutes, and seconds).
Power Interruption Time
A512 and
A513
The time at which the power was last
interrupted (year, month, day of month,
hour, minutes, and seconds).
Power ON Clock Data 1
Power ON Clock Data 2
A720 to A722
A723 to A725
Power ON Clock Data 3
Power ON Clock Data 4
A726 to A728
A729 to A731
Consecutive times at which the power
was turned ON (year, month, day of
month, hour, minutes, and seconds).
The times are progressively older from
number 1 to number 10.
Power ON Clock Data 5
Power ON Clock Data 6
A732 to A734
A735 to A737
Power ON Clock Data 7
Power ON Clock Data 8
A738 to A740
A741 to A743
Power ON Clock Data 9
Power ON Clock Data 10
A744 to A746
A747 to A749
Operation Start Time
A515 to A517
The time that operation started (year,
month, day of month, hour, minutes,
and seconds).
Operation End Time
A518 to A520
User Program Date
A90 to A93
Parameter Date
A94 to A97
The time that operation stopped (year,
month, day of month, hour, minutes,
and seconds).
The time when the user program was
last overwritten (year, month, day of
month, hour, minutes, and seconds).
The time when the parameters were
last overwritten (year, month, day of
month, hour, minutes, and seconds).
Time-related Instructions
Name
HOURS TO SECONDS
Mnemonic
Function
SEC(065)
Converts time data in hours/minutes/seconds format to an equivalent time in seconds
only.
SECONDS TO HOURS
HMS(066)
Converts seconds data to an equivalent time
in hours/minutes/seconds format.
CALENDAR ADD
CADD(730) Adds time to the calendar data in the specified words.
CALENDAR SUBTRACT CSUB(731) Subtracts time from the calendar data in the
specified words.
CLOCK ADJUSTMENT DATE(735) Changes the internal clock setting to the setting in the specified source words.
418
SECTION 7
Using Expansion Units and Expansion I/O Units
This section describes how to use CP-series Expansion Units and Expansion I/O Units.
7-1
Connecting Expansion Units and Expansion I/O Units . . . . . . . . . . . . . . . . .
420
7-2
Analog Input Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
421
7-3
Analog Output Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
434
7-4
Analog I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
445
7-4-1
CP1W-MAD11 Analog I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . .
445
7-4-2
CP1W-MAD42/CP1W-MAD44 Analog I/O Units . . . . . . . . . . . . .
458
Temperature Sensor Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
475
7-5-1
CP1W-TS01/TS02 Temperature Sensor Units . . . . . . . . . . . . .
475
7-5-2
CP1W-TS003 Temperature Sensor Units . . . . . . . . . . . . . . . . . . . . .
489
7-5-3
CP1W-TS004 Temperature Sensor Units . . . . . . . . . . . . . . . . . . . . .
497
CompoBus/S I/O Link Units. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
508
7-5
7-6
419
Section 7-1
Connecting Expansion Units and Expansion I/O Units
7-1
Connecting Expansion Units and Expansion I/O Units
CP-series Expansion Units and Expansion I/O Units can be connected to the
CP1L. Up to three Expansion Units or Expansion I/O Units can be connected
to a CPU Unit with 30, 40 or 60 I/O points and one Expansion Unit or Expansion I/O Unit can be connected to a CPU Unit with 20 or 14 I/O points.
Number of I/O Words
Unit name
Model
Current
consumption (mA)
5 VDC
Expansion
Units
Analog Input Unit
Analog Output Unit
Input
Output
CP1W-AD041
100
90
4
2
CP1W-AD042
100
50
4
2
CP1W-DA021
40
95
---
2
CP1W-DA041
80
124
---
4
70
160
---
4
CP1W-MAD11
83
110
2
1
CP1W-MAD42
120
120
4
2
CP1W-MAD44
120
170
4
4
CP1W-TS001
40
59
2
---
CP1W-TS101
54
73
CP1W-TS002
40
59
4
---
CP1W-TS102
54
73
CP1W-TS003
70
30
4
---
CP1W-TS004
80
50
2
1
CompoBus/S I/O Link Unit
CP1W-SRT21
29
---
1
1
40-point I/O Unit
CP1W-40EDR
80
90
2
2
CP1W-40EDT
160
---
CP1W-40EDT1
160
---
CP1W-32ER
49
131
---
2
CP1W-32ET
113
---
CP1W-32ET1
113
--1
1
---
2
Temperature Control Unit
32-point Output Unit
20-point I/O Unit
CP1W-20EDR1
103
44
CP1W-20EDT
130
---
CP1W-20EDT1
130
---
CP1W-16ER
42
90
CP1W-16ET
76
---
CP1W-16ET1
76
---
8-point Input Unit
CP1W-8ED
18
---
1
---
8-point Output Unit
CP1W-8ER
26
44
---
1
CP1W-8ET
75
---
CP1W-8ET1
75
---
16-point Output Unit
Note
420
24 VDC
CP1W-DA042
Analog I/O Unit
Expansion
I/O Units
I/O words
CP1W-32ER/32ET/32ET1’s maximum number of simultaneously ON points is
24 (75%).
Section 7-2
Analog Input Units
Allocation of I/O Words
Input bits
Expansion Units and Expansion I/O Units are allocated I/O bits in the order
the Units are connected starting from the CPU Unit. When the power to the
CPU Unit is turned ON, the CPU Unit checks for any Expansion Units and
Expansion I/O Units connected to it and automatically allocates I/O bits.
40-point I/O Unit
CPU Unit
First Unit:
Temperature Control Unit
Second Unit:
Analog I/O Unit
CIO 0.00 to CIO 0.11
CIO 1.00 to CIO 1.11
CIO 2 to CIO 5
None
24 input points
7-2
CIO 6.00 to CIO 6.11
CIO 7.00 to CIO 7.11
24 input points
TS002
DA041
16 output points
Output bits
Third Unit:
40-point I/O Unit
16 output points
None
CIO 100.00 to CIO 100.07
CIO 101.00 to CIO 101.07
CIO 102 to CIO 105
CIO 106.00 to CIO 106.07
CIO 107.00 to CIO 107.07
Analog Input Units
Each CP1W-AD041/CP1W-AD042 Analog Input Unit provides four analog
inputs.
• The analog input signal ranges are 0 to 5 V, 1 to 5 V, 0 to 10 V, −10 to +10
V, 0 to 20 mA, and 4 to 20 mA.
The resolution of CP1W-AD041 is 1/6,000.
The resolution of CP1W-AD042 is 1/12,000.
The open-circuit detection function is activated in the ranges of 1 to 5 V
and 4 to 20 mA.
• The Analog Input Unit uses four input words and two output words, so a
maximum of three Units can be connected.
Part Names
CP1W-AD041/CP1W-AD042
(3) Expansion connector
IN
CH
I IN1 VIN2 COM2 I IN3 VIN4 COM4 AG
VIN1 COM1 I IN2 VIN3 COM3 I IN4
NC
(2) Expansion I/O
connecting cable
(1) Analog input terminals
(Terminal block is not removable)
1. Analog Input Terminals
Connected to analog output devices.
421
Section 7-2
Analog Input Units
■ Input Terminal Arrangement
IN
CH
I IN1 VIN2 COM2 I IN3 VIN4 COM4 AG
VIN1 COM1 I IN2 VIN3 COM3 I IN4
NC
I IN1 VIN2 COM2 I IN3 VIN4 COM4 AG
VIN1 COM1 I IN2 VIN3 COM3 I IN4
NC
Note
V IN1
I IN1
COM1
V IN2
I IN2
COM2
V IN3
I IN3
COM3
V IN4
I IN4
COM4
Voltage input 1
Current input 1
Input common 1
Voltage input 2
Current input 2
Input common 2
Voltage input 3
Current input 3
Input common 3
Voltage input 4
Current input 4
Input common 4
When using current inputs, voltage input terminals must be short-circuited
with current input terminals.
2. Expansion I/O Connecting Cable
Connected to the CPU Unit or Expansion Unit expansion connector. The
cable is attached to the Analog Input Unit and cannot be removed.
Note
Do not touch the cables during operation. Static electricity may cause operating errors.
3. Expansion Connector
Connected to the next Expansion Unit or Expansion I/O Unit to enable expansion.
Main Analog Input
Unit Specifications
Analog Input Units are connected to a CP1L CPU Unit. For CP1L M-type CPU
Units, a maximum of three Units can be connected, including other Expansion
Units and Expansion I/O Units. For CP1L L-type CPU Units, a maximum of
one Unit can be connected.
For CP1L M-type CPU Units, a
maximum of 3 Expansion Units or
Expansion I/O Units can be connected.
CP1L M-type CPU Unit
SYSMAC
CP1L
CP1W-20EDR1
Expansion I/O Unit
CP1W-8ED
Expansion I/O Unit
CP1W-AD041/AD042
Analog Input Unit
IN
L1
L2/N
COM
01
00
03
02
05
04
07
06
09
08
11
10
01
00
03
02
05
04
07
06
09
08
11
10
C OM
C OM
01
03
05
07
09
11
00
02
04
06
08
10
NC
01
00
CH
IN
03
02
IN
C H 00 01 02 03 04 05 06 07
C H 00 01 02 03
08 09 10 11
08 09 10 11
20EDR1
8ED
OUT
00
01
COM
02
COM
03
COM
04
COM
06
05
00
07
01
COM
03
02
04
COM
06
05
07
C H 00 01 02 03 04 05 06 07
CH
00
01
02
04
05
07
NC
N C C OM
06
CO M C OM
03
CO M
EXP
EXP
04
C OM
06
05
07
IN
CH
I IN1 VIN2 COM2 I IN3 VIN4 COM4 AG
VIN1 COM1 I IN2 VIN3 COM3 I IN4
NC
4 analog inputs
OUT
422
Section 7-2
Analog Input Units
Item
CP1W-AD041
CP1W-AD042
Voltage Input
Current Input
4 inputs (4 words allocated)
Number of inputs
Input signal range
0 to 20 mA
or 4 to 20 mA
Max. rated input
0 to 5 VDC,
1 to 5 VDC,
0 to 10 VDC,
or –10 to 10 VDC
±15 V
External input impedance
Resolution
1 MΩ min.
1/6000 (full scale)
Overall accuracy
0.3% full scale
0.6% full scale
25°C
0 to 55°C
Voltage Input
Current Input
0 to 5 VDC,
1 to 5 VDC,
0 to 10 VDC,
or –10 to 10 VDC
±15 V
0 to 20 mA
or 4 to 20 mA
Approx. 250 Ω
1 MΩ min.
1/12000 (full scale)
Approx. 250 Ω
0.4% full scale
0.8% full scale
0.2% full scale
0.5% full scale
0.3% full scale
0.7% full scale
±30 mA
±30 mA
16-bit binary (4-digit hexadecimal)
16-bit binary (4-digit hexadecimal)
Full scale for –10 to 10 V: F448 to 0BB8 Hex Full scale for –10 to 10 V: E890 to 1770 Hex
Full scale for other ranges: 0000 to 1770 Hex Full scale for other ranges: 0000 to 2EE0 Hex
A/D conversion data
Averaging function
Supported (Set in output words n+1 and n+2.)
Open-circuit detection function Supported
Conversion time
Isolation method
2 ms/point (8 ms/all points)
1 ms/point (4 ms/all points)
Photocoupler isolation between analog I/O terminals and internal circuits. No isolation
between analog I/O signals.
5 VDC: 100 mA max.; 24 VDC: 90 mA max. 5 VDC: 100 mA max.; 24 VDC: 50 mA max.
Current consumption
Analog Input Signal
Ranges
Note
Analog input data is digitally converted according to the input signal range as
shown below.
When the input exceeds the specified range, the A/D conversion data will be
fixed at either the lower limit or upper limit.
Analog Input Signal
Ranges
■ −10 to 10 V Inputs
When the resolution is 1/6,000, the –10 to 10 V range corresponds to hexadecimal values F448 to 0BB8 (–3,000 to 3,000). The range of data that can be
converted is F31C to 0CE4 hex (–3,300 to 3,300).
A negative voltage is expressed as two’s complement.
Converted data
Hexadecimal (Decimal)
0CE4 (3300)
0BB8 (3000)
−11 V −10 V
0000 (0)
0V
10 V 11 V
F448 (−3000)
F31C (−3300)
When the resolution is 1/12,000, the –10 to 10 V range corresponds to hexadecimal values E890 to 1770 (–6,000 to 6,000). The entire data range is E638
to 19C8 hex (–6,600 to 6,600).
A negative voltage is expressed as a two’s complement.
423
Section 7-2
Analog Input Units
Converted Data
Hexadecimal (Decimal)
19C8 (6600)
1770 (6000)
−11V −10V
0000 (0)
10V 11V
0V
E890 (−6000)
E638 (−6600)
■ 0 to 10 V Inputs
When the resolution is 1/6,000, the 0 to 10 V range corresponds to hexadecimal values 0000 to 1770 (0 to 6,000). The range of data that can be converted
is FED4 to 189C hex (–300 to 6,300).
A negative voltage is expressed as two’s complement.
Converted data
Hexadecimal (Decimal)
189C (6300)
1770 (6000)
−0.5 V 0000 (0)
0V
10 V 10.5 V
FED4 (−300)
When the resolution is 1/12,000, the 0 to 10 V range corresponds to hexadecimal values 0000 to 2EE0 (0 to 12,000). The entire data range is FDA8 to
3138 hex (–600 to 12,600).
A negative voltage is expressed as a two’s complement.
Converted Data
Hexadecimal (Decimal)
3138 (12600)
2EE0 (12000)
−0.5 V 0000 (0)
0V
10 V
10.5 V
FDA8 (−600)
■ 0 to 5 V Inputs
When the resolution is 1/6,000, the 0 to 5 V range corresponds to hexadecimal values 0000 to 1770 (0 to 6,000). The range of data that can be converted
is FED4 to 189C hex (–300 to 6,300).
A negative voltage is expressed as two’s complement.
424
Section 7-2
Analog Input Units
Converted data
Hexadecimal (Decimal)
189C (6300)
1770 (6000)
−0.25V 0000 (0)
0V
5V
5.25 V
FED4 (−300)
When the resolution is 1/12,000, the 0 to 5 V range corresponds to hexadecimal values 0000 to 2EE0 (0 to 12,000). The entire data range is FDA8 to 3138
hex (–600 to 12,600).
A negative voltage is expressed as a two’s complement.
Converted Data
Hexadecimal (Decimal)
3138 (12600)
2EE0 (12000)
−0.25 V 0000 (0)
0V
5V
5.25 V
FDA8 (−600)
■ 1 to 5 V Inputs
When the resolution is 1/6,000, the 1 to 5 V range corresponds to hexadecimal values 0000 to 1770 (0 to 6,000). The range of data that can be converted
is FED4 to 189C hex (–300 to 6,300).
Voltage in the range of 0.8 to 1 V is expressed as two’s complement.
If an input is below the range (i.e., less than 0.8 V), the open-circuit detection
function is activated and the data becomes 8,000.
Converted data
Hexadecimal (Decimal)
189C (6300)
1770 (6000)
0000 (0)
0.8 V
1V
5 V 5.2 V
FED4 (−300)
When the resolution is 1/12,000, the 1 to 5 V range corresponds to hexadecimal values 0000 to 2EE0 (0 to 12,000). The entire data range is FDA8 to 3138
hex (–600 to 12,600).
Voltage in the range of 0.8 to 1 V is expressed as two’s complement.
If an input is below the range (i.e., less than 0.8 V), the open-circuit detection
function is activated and the data becomes 8,000.
Converted Data
Hexadecimal (Decimal)
3138 (12600)
2EE0 (12000)
0000 (0)
0.8 V
1V
5 V 5.2 V
FDA8 (−600)
425
Section 7-2
Analog Input Units
■ 0 to 20 mA Inputs
When the resolution is 1/6,000, the 0 to 20 mA range corresponds to hexadecimal values 0000 to 1770 (0 to 6,000). The range of data that can be converted is FED4 to 189C hex (–300 to 6,300).
A negative current is expressed as two’s complement.
Converted data
Hexadecimal (Decimal)
189C (6300)
1770 (6000)
−1 mA 0000 (0)
20 mA 21 mA
0 mA
FED4 (−300)
When the resolution is 1/12,000, the 0 to 20 mA range corresponds to hexadecimal values 0000 to 2EE0 (0 to 12,000). The entire data range is FDA8 to
3138 hex (–600 to 12,600).
A negative current is expressed as a two’s complement.
Converted Data
Hexadecimal (Decimal)
3138 (12600)
2EE0 (12000)
−1 mA 0000 (0)
0 mA
20 mA
21 mA
FDA8 (−600)
■ 4 to 20 mA Inputs
When the resolution is 1/6,000, the 4 to 20 mA range corresponds to hexadecimal values 0000 to 1770 (0 to 6,000). The range of data that can be converted is FED4 to 189C hex (–300 to 6,300).
Current in the range of 3.2 to 4 mA is expressed as two’s complement.
If an input is below the range (i.e., less than 3.2 mA), the open-circuit detection function is activated and the data becomes 8,000.
Converted data
Hexadecimal (Decimal)
189C (6300)
1770 (6000)
0000 (0)
3.2 mA
0 mA
4 mA
20 mA 20.8 mA
FED4 (−300)
When the resolution is 1/12,000, the 4 to 20mA range corresponds to hexadecimal values 0000 to 2EE0 (0 to 12,000). The entire data range is FDA8 to
3138 hex (–600 to 12,600).
Current in the range of 3.2 to 4 mA is expressed as two’s complement.
If an input is below the range (i.e., less than 3.2 mA), the open-circuit detection function is activated and the data becomes 8,000.
426
Section 7-2
Analog Input Units
Converted Data
Hexadecimal (Decimal)
3138 (12600)
2EE0 (12000)
0000 (0)
3.2 mA
0 mA
4 mA
20 mA
20.8 mA
FDA8 (−600)
Averaging Function
For analog inputs, the averaging function operates when the averaging bit is
set to 1. The averaging function outputs the average (a moving average) of
the last eight input values as the converted value. If there is only a slight variation in inputs, it is handled by the averaging function as a smooth input.
The averaging function stores the average (a moving average) of the last eight
input values as the converted value. Use this function to smooth inputs that
vary at a short interval.
Open-circuit Detection
Function
The open-circuit detection function is activated when the input range is set to
1 to 5 V and the voltage drops below 0.8 V, or when the input range is set to 4
to 20 mA and the current drops below 3.2 mA. When the open-circuit detection function is activated, the converted data will be set to 8,000.
The time for enabling or clearing the open-circuit detection function is the
same as the time for converting the data. If the input returns to the convertible
range, the open-circuit detection is cleared automatically and the output
returns to the normal range.
Procedure
Connect and wire Units.
Create a ladder program.
• Connect Analog Input Units.
• Wire to analog output devices.
• Write set data to output words (n+1, n+2).
• Set use of inputs.
• Select input signals using range codes.
• Set use of averaging.
• Read A/D converted values from input words
(m+1 to m+4).
• For current inputs, confirm that there is no open
circuit.
Writing Set Data and
Reading A/D Converted
Values
Analog Input Unit
CPU Unit
Ladder program
MOV(021)
Word (n+1)
Set data (inputs 1, 2)
Word (n+2)
Set data (inputs 3, 4)
Word (m+1) Analog input 1 converted value
Word (m+2) Analog input 2 converted value
Writes the set data.
Reads the converted
value.
Word (m+3) Analog input 3 converted value
Word (m+4) Analog input 4 converted value
“m” is the last input word and “n” is
the last output word allocated to the
CPU Unit or previous Expansion
Unit or Expansion I/O Unit.
Analog devices
Temperature sensor
Pressure sensor
Speed sensor
Flow sensor
Voltage/current meter
Other devices
427
Section 7-2
Analog Input Units
1. Connecting the Analog Input Unit
Connect the Analog Input Unit to the CPU Unit.
Analog Input Unit
CP1W-AD041/AD042
CPU Unit
SYSMAC
CP1L
IN
L1
L2/N
COM
01
00
03
05
02
04
07
06
09
08
11
10
01
00
03
05
02
04
00
01
COM
07
06
09
08
11
10
IN
00
01
COM
02
COM
03
COM
04
COM
06
05
07
03
02
04
COM
06
05
07
CH
I IN1 VIN2 COM2 I IN3 VIN4 COM4 AG
VIN1 COM1 I IN2 VIN3 COM3 I IN4
NC
OUT
2. Wiring Analog Inputs
Internal Circuits
510 kΩ
V IN1
250 Ω
Internal circuits
I IN1
Analog input 1
COM1(−)
510 kΩ
to
to
V IN4
510 kΩ
250 Ω
I IN4
510 kΩ
Analog input 4
COM4(−)
AG
Analog ground
■ Wiring for Analog Inputs
2-core shielded
twisted-pair
cable
+
V IN
Analog
device with
voltage
output
I IN
−
COM
FG
Note
+
Analog
Input 2, 3
Analog
device with
current
output
2-core shielded
twisted-pair cable
V IN
I IN
−
COM
Analog
Input 2, 3
FG
(1) Connect the shield to the FG terminal to prevent noise.
(2) When an input is not being used, short the + and – terminals.
(3) Separate wiring from power lines (AC power supply lines, high-voltage
lines, etc.)
(4) When there is noise in the power supply line, install a noise filter on the
input section and the power supply.
(5) Refer to the following information on open circuits when using voltage inputs.
428
Section 7-2
Analog Input Units
A
Analog
output
device
1
B
C
Analog
output
device
2
24 VDC
For example, if analog input device 2 is outputting 5 V and the same power
supply is being used as shown above, about 1/3, or 1.6 V, will be applied at
the input for input device 1.
Consider the following information on open input circuits when using voltage
inputs. Either use separate power supplies, or install an isolator at each input.
If the same power supply is used as shown in the following diagram and an
open circuit occurs at point A or B, an unwanted current flow will occur as
shown by the dotted lines in the diagram, creating a voltage at the other input
of about 1/3 to 1/2. If the 1 to 5 V range is being used, the open-circuit detection function will not operate. Also, if there is an open circuit at C, the open-circuit detection function will not operate because the negative sides are the
same.
3. Creating the Ladder Program
Allocating I/O Words
Four input words and two output words are allocated from the next words following the last I/O words allocated to the CPU Unit or an existing Expansion
Unit or Expansion I/O Unit.
Words (m+1) to (m+4)
Analog Input Unit
Words (n+1), (n+2)
Writing Set Data
Write the settings for input use, averaging use, and range codes for words n+1
and n+2. When the set data is transferred from the CPU Unit to the Analog I/O
Unit, the A/D conversion will be started.
429
Section 7-2
Analog Input Units
15
Wd (n+1)
1
8
0
0
0
0
0
0
7
6
5
4
Even if analog inputs are not Analog input 2
used, bits 15 in words n+1
and n+2 must be set to 1.
15
Wd (n+2)
1
8
0
0
0
0
0
0
3
2
1
0
0
7
6
5
4
Analog input 1
3
2
1
0
0
Even if analog inputs are not
used, bits 15 in words n+1
and n+2 must be set to 1.
Analog input 4
Analog input 3
■ Set Data
Range code
00
01
10
11
Analog input range
−10 to 10 V
0 to 10 V
1 to 5 V or 4 to 20 mA
0 to 5 V or 0 to 20 mA
Averaging
0
No
1
Yes
Input Use
0
No
1
Yes
• The Analog Input Unit will not start converting analog input values until
the set data has been written.
• Once the range code has been set, it is not possible to be changed while
power is being supplied to the CPU Unit. To change the range code, turn
the CPU Unit OFF then ON again.
Averaging
Set whether averaging is to be used for set data. When the averaging bit is set
to 1, the average (moving average) for the past eight inputs is output as conversion data.
Reading Analog Input
Conversion Values
Read the conversion value storage area with the ladder program. With word m
as the last input word allocated to the CPU Unit or an already-connected
Expansion Unit, the A/D conversion data will be output to the following words
m+1 to m+4.
Startup Operation
After the power is turned ON, it will require two cycle times plus approximately
50 ms before the first conversion data is stored in the input words. Therefore,
create a program as shown below, so that the ladder can start to operate with
valid conversion data in input words.
The analog input data will be 0000 until the first conversion data is stored in
the input words.
Always ON Flag
P_On
TIM
0005
#0002
T0005
MOV(021)
2
D0
430
TIM0005 is started when the power is
turned ON. After 0.2 s (200 ms) elapses,
the TIM0005 contact turns ON and the
analog input 1 conversion data stored in
word 2 is transferred to D0.
Analog Input Units
Section 7-2
Handling Unit Errors
• When an error occurs in an Analog Input Unit, the analog input conversion
data becomes 0000.
• CP-series Expansion Unit errors are output to bits 0 to 6 of word A436.
The bits are allocated from A436.00 in order starting with the Unit nearest
the CPU Unit. Use these flags in the program when it is necessary to
detect errors.
Ladder Program Example
Analog
input
Input 1
Input range Range code
0 to 10 V
01
Yes
Destination
word
1101 (D hex) n+1
Input 2
Input 3
4 to 20 mA
10
−10 to +10 V 00
Yes
No
1110 (E hex) n+1
1000 (8 hex) n+2
Input 4
Not used.
---
0000 (0 hex) n+2
−(00)
Averaging
Set data
First Cycle Flag
A200.11
MOV(021)
#80ED
102
←Writes set data E and D.
MOV(021)
#8008
Always ON
P_On
103
←Writes set data 0 and 8.
TIM
0005
Execution
#0002
T0005 condition
CMP(020)
3
#8000
P_EQ
100.00
Analog input 2 open circuit alarm
Execution
T0005 condition
MOV(021)
2
T0005
Execution
condition
D100
←Reads analog input 1 converted value.
MOV(021)
3
T0005
Execution
condition
D101
←Reads analog input 2 converted value.
MOV(021)
4
D102
←Reads analog input 3 converted value.
431
Section 7-2
Analog Input Units
■ Example: Scaling analog input values
When a 0 to 10V voltage is input to the analog input word (CIO 3) of CP1WAD042 as 0 to 12,000, convert the value into a value between 0 and 24,000
and output the result to D200.
24,000
Scaled
value
(0 to
(D200)
24,000)
0
(Data in CIO3) 12,000
(10V)
0
(0V)
Data input to Analog Input Unit
(Unscaled: 0 to 12,000)
Data Memory Settings
Setting
Address
D100
Data
#0800
Unscaled minimum value (0)
Scaled minimum value (0)
D101
D102
&0
&0
Unscaled maximum value (12,000)
Scaled maximum value (24,000)
D103
D104
&12,000
&24,000
Control word
Ladder Program
Always ON Flag
P_On
APR(069)
Use APR instruction for scaling.
D100
3
D200
Descriptions of APR Instruction
APR
C
C:Control word
S
S:Source word
D
D:Result word
Scaled
data
Y1
D
Scaled
result
Y0
X0
S
Input data
Unscaled data
432
X1
Section 7-2
Analog Input Units
C: Control word
Set for “Signed Integer Data (Binary)”.
Control word setting
#0800: Binary numeral (0000 1000 0000 0000)
15 14 13 12 11 10 9
C
0
0
0
0
1
0
8
7
6
5
4
3
2
1
0
The number of coordinates is 1 (m=1), so
set bit 0 to 7 to “0” (=m-1).
0
Number of coordinates minus one (m+1),
00 to FF hex (1İmİ256)
Floating-point specification for S and D
0: Integer data
Data length specification for S and D
0: 16-bit signed binary data
1: 32-bit signed binary data
Signed data specification for S and D
1: Signed binary data
Setting
Control word
Unscaled minimum value (X0)
Address
Data
C
C+1
#0800
X0
Scaled minimum value (Y0)
C+2
Y0
Unscaled maximum value (Xm = X1)
C+3
X1
Scaled maximum value (Ym = Y1)
C+4
Y1
S: Source data
Specify the word address of the input data before scaling.
R: Result word
Specify the word address where the data will be output after scaling.
433
Section 7-3
Analog Output Units
7-3
Analog Output Units
Each CP1W-DA021 Analog Output Unit provides two analog outputs.
Each CP1W-DA041/CP1W-DA042 Analog Output Unit provides four analog
outputs.
• The analog output signal ranges are 1 to 5 V, 0 to 10 V, −10 to +10 V, 0 to
20 mA, and 4 to 20 mA.
The resolution of CP1W-DA041 is 1/6,000.
The resolution of CP1W-DA042 is 1/12,000.
• The CP1W-DA021 uses two output words, so a maximum of seven Units
can be connected.
• The CP1W-DA041/CP1W-DA042 uses four output words, so a maximum
of three Units can be connected.
Part Names
CP1W-DA021/CP1W-DA041/CP1W-DA042
(3) Expansion connector
OUT
CH
I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 AG
VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC
(2) Expansion I/O
connecting cable
(1) Analog output terminals
(Terminal block is not removable)
1. Analog Output Terminals
Connected to analog input devices.
■ Output Terminal Arrangement for CP1W-DA041/CP1W-DA042
OUT
CH
I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 NC
VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC
I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 NC
VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC
V OUT1
I OUT1
COM1
V OUT2
I OUT2
COM2
V OUT3
I OUT3
COM3
V OUT4
I OUT4
COM4
Voltage output 1
Current output 1
Output common 1
Voltage output 2
Current output 2
Output common 2
Voltage output 3
Current output 3
Output common 3
Voltage output 4
Current output 4
Output common 4
■ Output Terminal Arrangement for CP1W-DA021
OUT
CH
NC
I OUT1 VOUT2 COM2
NC
NC
NC
NC
NC
VOUT1 COM1 I OUT2
NC
NC
NC
I OUT1 VOUT2 COM2
NC
NC
NC
NC
VOUT1 COM1 I OUT2
NC
NC
NC
434
V OUT1
I OUT1
COM1
V OUT2
I OUT2
COM2
Voltage output 1
Current output 1
Output common 1
Voltage output 2
Current output 2
Output common 2
Section 7-3
Analog Output Units
2. Expansion I/O Connecting Cable
Connected to the CPU Unit or previous Expansion Unit. The cable is provided with the Unit and cannot be removed.
Note
Do not touch the cables during operation. Static electricity may cause operating errors.
3. Expansion Connector
Connected to the next Expansion Unit or Expansion I/O Unit.
Main Analog Output
Unit Specifications
Analog Output Units are connected to a CP1L CPU Unit. For CP1L M-type
CPU Units, a maximum of three Units can be connected, including other
Expansion Units and Expansion I/O Units. For CP1L L-type CPU Units, a
maximum of one Unit can be connected.
For CP1L M-type CPU Units, a maximum
of 3 Expansion Units or Expansion I/O
Units can be connected.
CP1W-20EDR1
Expansion I/O Unit
CP1L M-type CPU Unit
CP1W-DA021
CP1W-DA041/DA042
Analog Output Unit
IN
COM
01
00
03
02
05
04
07
06
09
08
11
10
01
00
03
02
05
04
07
06
09
11
10
08
C OM
C OM
01
03
05
07
09
11
00
02
04
06
08
10
NC
01
00
CH
IN
03
02
IN
C H 00 01 02 03 04 05 06 07
C H 00 01 02 03
08 09 10 11
08 09 10 11
20EDR1
8ED
OUT
CH
00
01
COM
02
COM
03
COM
04
COM
06
05
00
07
01
COM
03
02
04
COM
06
05
07
00 01 02 03 04 05 06 07
CH
07
00
01
02
04
05
NC
N C C OM
06
CO M C OM
03
CO M
EXP
EXP
04
C OM
06
05
07
OUT
CH
I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 AG
VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC
4 analog outputs
OUT
CP1W-DA041/DA042
L2/N
2 analog outputs
L1
CP1W-DA021
SYSMAC
CP1L
CP1W-8ED
Expansion I/O Unit
435
Section 7-3
Analog Output Units
Item
CP1W-DA021/CP1W-DA041
CP1W-DA042
Voltage Output
Current Output
Voltage Output
Current Output
CP1W-DA021: 2 outputs (2 words allocated) 4 outputs (4 words allocated)
CP1W-DA041: 4 outputs (4 words allocated)
Number of outputs
1 to 5 VDC,
0 to 10 VDC,
or –10 to 10 VDC
2 kΩ min.
0 to 20 mA
or 4 to 20 mA
External output impedance
Resolution
0.5 Ω max.
1/6000 (full scale)
---
Overall accuracy
0.4% full scale
0.8% full scale
0.3% full scale
0.7% full scale
16-bit binary (4-digit hexadecimal)
Full scale for –10 to 10 V: F448 to 0BB8 Hex
Full scale for other ranges: 0000 to 1770 Hex
CP1W-DA021: 2 ms/point (4 ms/all points)
CP1W-DA041: 2 ms/point (8 ms/all points)
16-bit binary (4-digit hexadecimal)
Full scale for –10 to 10 V: E890 to 1770 Hex
Full scale for other ranges: 0000 to 2EE0 Hex
1 ms/point (4 ms/all points)
Output signal range
External output allowable load
resistance
25°C
0 to 55°C
D/A conversion data
Conversion time
1 to 5 VDC,
0 to 10 VDC,
or –10 to 10 VDC
2 kΩ min.
350 Ω max.
0.5 Ω max.
1/12000 (full scale)
0 to 20 mA
or 4 to 20 mA
350 Ω max.
---
Isolation method
Photocoupler isolation between analog I/O terminals and internal circuits. No isolation
between analog I/O signals.
Current consumption
CP1W-DA021: 5 VDC 40 mA max.; 24 VDC 5 VDC: 70 mA max.; 24 VDC: 160 mA max.
95 mA max.
CP1W-DA041: 5 VDC 80 mA max.; 24 VDC
124 mA max.
Analog Output Signal
Ranges
Note
The analog values depend on the output signal ranges, as shown in the following diagrams.
When the output exceeds the specified range, the output signal will be fixed at
either the lower limit or upper limit.
Analog Output Signal
Ranges
■ −10 to 10 V
When the resolution is 1/6,000, the hexadecimal values F448 to 0BB8 (–3000
to 3000) correspond to an analog voltage range of –10 to 10 V.
The entire output range is –11 to 11 V.
Specify a negative voltage as a two’s complement.
11 V
10 V
8000
F31C
(3300)
F448
(3000)
0000 (0)
0V
−10 V
−11 V
436
0BB8 0CE4
(3000) (3300)
7FFF
Conversion
Data
Hexadecimal
(Decimal)
Section 7-3
Analog Output Units
When the resolution is 1/12,000, the hexadecimal values E890 to 1770 (–6000
to 6000) correspond to an analog voltage range of –10 to 10 V.
The entire output range is –11 to 11 V.
Specify a negative voltage as a two’s complement.
11 V
10 V
8000
E638
(−6600)
E890
(−6000)
0000 (0)
0V
1770
(6000)
19C8
(6600)
7FFF
Conversion Data
Hexadecimal (Decimal)
−10 V
−11 V
■ 0 to 10 V
When the resolution is 1/6,000, the hexadecimal values 0000 to 1770 (0 to
6000) correspond to an analog voltage range of 0 to 10 V.
The entire output range is –0.5 to 10.5 V.
Specify a negative voltage as a two’s complement.
10.5 V
10 V
8000
FED4
(−300)
0000 (0)
0V
1770
(6000)
189C
(6300)
7FFF
Conversion
Data
Hexadecimal
(Decimal)
−0.5 V
When the resolution is 1/12,000, the hexadecimal values 0000 to 2EE0 (0 to
12000) correspond to an analog voltage range of 0 to 10 V.
The entire output range is –0.5 to 10.5 V.
Specify a negative voltage as a two’s complement.
10.5 V
10 V
8000
FDA8
(−600) 0000 (0)
0V
2EE0
(12000)
3138
(12600)
7FFF
Conversion Data
Hexadecimal (Decimal)
−0.5 V
437
Section 7-3
Analog Output Units
■ 1 to 5 V
When the resolution is 1/6,000, the hexadecimal values 0000 to 1770 (0 to
6000) correspond to an analog voltage range of 1 to 5 V.
The entire output range is 0.8 to 5.2 V.
5.2 V
5V
1V
0.8 V
8000
FED4
(−300)
0V
1770
(6000)
189C
(6300)
7FFF
Conversion
Data
Hexadecimal
(Decimal)
When the resolution is 1/12,000, the hexadecimal values 0000 to 2EE0 (0 to
12000) correspond to an analog voltage range of 1 to 5 V.
The entire output range is 0.8 to 5.2 V.
5.2 V
5V
1V
0.8 V
8000
FDA8
(−600)
0V
2EE0
(12000)
3138
(12600)
7FFF
Conversion Data
Hexadecimal (Decimal)
■ 0 to 20 mA
When the resolution is 1/6,000, the hexadecimal values 0000 to 1770 (0 to
6000) correspond to an analog current range of 0 to 20 mA.
The entire output range is 0 to 21 mA.
21 mA
20 mA
8000
0000 (0)
0 mA
1770
(6000)
189C
(6300)
7FFF
Conversion
Data
Hexadecimal
(Decimal)
When the resolution is 1/12,000, the hexadecimal values 0000 to 2EE0 (0 to
12000) correspond to an analog voltage range of 0 to 20 mA.
The entire output range is 0 to 21 mA.
21 mA
20 mA
8000
0000 (0)
0 mA
438
2EE0
(12000)
3138
(12600)
7FFF
Conversion Data
Hexadecimal (Decimal)
Section 7-3
Analog Output Units
■ 4 to 20 mA
When the resolution is 1/6,000, the hexadecimal values 0000 to 1770 (0 to
6000) correspond to an analog current range of 4 to 20 mA.
The entire output range is 3.2 to 20.8 mA.
20.8 mA
20 mA
4 mA
3.2 mA
FED4
(−300)
8000
1770
(6000)
0 mA
189C
(6300)
7FFF
Conversion
Data
Hexadecimal
(Decimal)
When the resolution is 1/12,000, the hexadecimal values 0000 to 2EE0 (0 to
12000) correspond to an analog voltage range of 4 to 20 mA.
The entire output range is 3.2 to 20.8 mA.
20.8 mA
20 mA
4 mA
3.2 mA
FDA8
(−600)
8000
0 mA
2EE0
(12000)
3138
(12600)
7FFF
Conversion Data
Hexadecimal (Decimal)
Procedure
Connect and wire Units.
Create a ladder program.
• Connect Analog Output Units.
• Wire to analog input devices.
• Write set data to output words
CP1W-DA041/DA042: Words (n+1, n+2)
CP1W-DA021: Word (n+1)
• Set use of outputs.
• Select output signals using range codes.
• Write D/A conversion values to output words
CP1W-DA041/DA042: Words (n+1 to n+4)
CP1W-DA021: Words (n+1, n+2)
Writing Set Data and
Writing D/A Conversion
Data
■ CP1W-DA041/CP1W-DA042
Analog Output Unit
CPU Unit
Ladder program
Word (n+1) Set data (outputs 1, 2)
Word (n+2) Set data (outputs 3, 4)
MOV(021)
Word (n+1) Analog output 1 conversion value
Word (n+2) Analog output 2 conversion value
Writes the set data.
Writes the conversion
values.
Word (n+3) Analog output 3 conversion value
Word (n+4) Analog output 4 conversion value
Where “n” is the last output word
allocated to the CPU Unit, or
previous Expansion Unit or
Expansion I/O Unit.
Analog devices
Adjustment equipment
Servo Controller
Variable speed device
Recorder
Other
439
Section 7-3
Analog Output Units
■ CP1W-DA021
Analog Output Unit
CPU Unit
Word (n+1) Set data (outputs 1, 2)
Ladder program
MOV(021)
Word (n+1) Analog output 1 conversion value
Word (n+2) Analog output 2 conversion value
Writes the set data.
Writes the conversion
values.
Where “n” is the last output word
allocated to the CPU Unit, or
previous Expansion Unit or
Expansion I/O Unit.
Analog devices
Adjustment equipment
Servo Controller
Variable speed device
Recorder
Other
1. Connecting the Analog Output Unit
Connect the Analog Output Unit to the CPU Unit.
CP1W-DA021
CP1W-DA041/DA042
Analog Output Unit
CPU Unit
SYSMAC
CP1L
IN
L1
L2/N
COM
01
00
03
02
05
04
07
06
09
08
11
10
01
00
03
05
02
04
00
01
COM
07
06
09
08
11
10
OUT
00
01
COM
02
COM
03
COM
04
COM
06
05
07
03
02
04
COM
06
05
CH
I OUT1 VOUT2 COM2 I OUT3 VOUT4 COM4 AG
VOUT1 COM1 I OUT2 VOUT3 COM3 I OUT4 NC
07
OUT
2. Wiring Analog Outputs
Internal Circuits
The following diagram shows the internal circuit using CP1W-DA041/DA042
as an example, which wires analog outputs 1 to 4. In the case of CP1WDA021, analog outputs 1 to 2 can be used.
V OUT1
Analog output 1
Internal circuits
I OUT1
COM1 (−)
to
I OUT4
COM4 (−)
Analog ground
440
to
V OUT4
NC
Analog output 4
Section 7-3
Analog Output Units
■ Wiring for Analog Outputs
2-core shielded
twisted-pair cable
+
V OUT
Analog
output
unit
2-core shielded
twisted-pair cable
I OUT
−
COM
+
V OUT
Analog
device
with
voltage
input
Analog
output
unit
I OUT
−
COM
FG
Note
Analog
device
with
current
input
FG
(1) Connect the shield to the FG terminal to prevent noise.
(2) Separate wiring from power lines (AC power supply lines, high-voltage
lines, etc.)
(3) When there is noise in the power supply line, install a noise filter on the
input section and the power supply.
(4) When external power is supplied (when range codes are set), or when the
power is interrupted, there may be a pulse status analog output of up to
1 ms. If this status is a problem, take the following measures.
• Turn ON the power to the CP1L CPU Unit, check the operation status,
and then turn ON the power at the load.
• Turn OFF the power to the load and then turn OFF the power to the
CP1L CPU Unit.
3. Creating the Ladder Program
Allocating Output Words
Four output words (n+1 to n+4) are allocated, beginning from the first word following the last I/O word allocated to the CPU Unit or already-connected
Expansion I/O Unit or Expansion Unit. For CP1W-DA021, two output words
(n+1, n+2) are allocated.
CP1W-DA041/DA042
Analog Output Unit
Words n+1 to n+4
Writing Set Data
Write the output use and the range code to words n+1 and n+2. For CP1WDA021, only word n+1 can be used. The D/A conversion will start when the
set data is transferred from the CPU Unit to the Analog Output Unit.
15
0
Wd (n+1) 1 0 0 0 0 0 0
8
0
6
5
4
3
2
1
0
Even if analog outputs are not
used, bits 15 in words n+1
and n+2 must be set to 1.
15
7
8
Analog output 2
Analog output 1
7
3
6
5
4
2
1
Wd (n+2) 1 0 0 0 0 0 0 0
Even if analog outputs are not
used, bits 15 in words n+1
and n+2 must be set to 1.
Analog output 4
Analog output 3
441
Section 7-3
Analog Output Units
■ Set Data
Range code
000
001
010
011
100
Analog output range
−10 to 10 V
0 to 10 V
1 to 5 V
0 to 20 mA
4 to 20 mA
Output use
0
1
No
Yes
• The Analog Output Unit will not start converting analog output values until
the set data has been written.
• Before the range code is written, 0 V or 0 mA will be output in the 0 to 10 V,
−10 to +10 V, and 0 to 20 mA ranges, and 1 V or 4 mA will be output in the
1 to 5 V and 4 to 20 mA ranges.
• Once the range code has been set, it is not possible to be changed while
power is being supplied to the CPU Unit. To change the range code, turn
the CPU Unit OFF then ON again.
Writing Analog Output
Conversion Values
The ladder program can be used to write conversion data to the output words.
The output word starts from “n+1” where “n” is the last output word allocated
to the CPU Unit, or previous Expansion Unit or Expansion I/O Unit.
Startup Operation
After power is turned ON, it will require two cycle times plus approximately
50 ms before the first conversion data is output.
The following table shows the output status after the initial processing is completed.
Output type
Voltage output
Output range
0 to 10 V,
−10 to +10 V
Before range
code is written
0V
After range
code is written
0V
1 to 5 V
Current output
0 to 20 mA
4 to 20 mA
0 mA
1V
0 mA
4 mA
Therefore, create a program as shown below, so that when operation begins
simultaneously with startup it will wait for valid set data.
Always ON Flag
P_On
TIM
0005
#0002
T0005
MOV(021)
D100
102
442
TIM0005 is started when the power is
turned ON. After 0.2 s (200 ms) elapses,
the TIM0005 contact turns ON, and the
data stored in D100 will be moved to
102 as the conversion data for analog
output 1.
Section 7-3
Analog Output Units
Handling Unit Errors
• When an error occurs at the Analog Output Unit, the analog output will be
0 V or 0 mA. If a CPU Unit fatal error occurs when analog outputs are set
in the 1 to 5 V or 4 to 20 mA range, 0 V or 0 mA will be output for a CPU
error I/O bus error, and 1 V or 4 mA will be output for all other errors.
• CP-series Expansion Unit errors are output to bits 0 to 6 of word A436.
The bits are allocated from A436.00 in order starting with the Unit nearest
the CPU Unit. Use these flags in the program when it is necessary to
detect errors.
Program Example
■ CP1W-DA041/CP1W-DA042
Analog output
Output range
Range code
Set data
Destination
word
Output 1
Output 2
0 to 10 V
4 to 20 mA
001
100
1001 (9 hex)
1100 (C hex)
n+1
n+1
Output 3
Output 4
−10 to 10 V
Not used.
000
−(000)
1000 (8 hex)
0000 (0 hex)
n+2
n+2
Operation start 1 cycle ON
A200.11
MOV(021)
#80C9
102
←Writes set data C and 9.
MOV(021)
#8008
Always ON Flag
P_On
←Writes set data 0 and 8.
103
TIM
0005
T0005
Execution
condition
#0002
MOV(021)
D200
T0005
Execution
condition
102
←Writes analog output 1 conversion data.
MOV(021)
D201
T0005
Execution
condition
103
←Writes analog output 2 conversion data.
MOV(021)
D202
104
←Writes analog output 3 conversion data.
443
Section 7-3
Analog Output Units
■ Example: Scaling analog output values
Convert a value between 200 and 500 in D300 into 2 to 5 V to output the voltage from the analog output word (CIO 102) of CP1W-DA042.
Unscaled 500
data
(200 to
500) (D300) 㩷
200
3,000 (Data in CIO102) 12,000
(2V)
(5V)
Value output to Analog Output Unit
(Scaled: 3,000 to 12,000)
Data memory settings
Setting
Address
D110
Data
#0800
Unscaled minimum value (200)
Scaled minimum value (3,000)
D111
D112
&200
&3,000
Unscaled maximum value (500)
Scaled maximum value (12,000)
D113
D114
&500
&12,000
Control word
Ladder program
Always ON Flag
P_On
APR(069)
Use APR instruction for scaling.
D110
D300
102
Refer to 7-2 Example: Scaling analog input values for the descriptions of APR
instruction.
444
Section 7-4
Analog I/O Units
7-4
7-4-1
Analog I/O Units
CP1W-MAD11 Analog I/O Units
Each CP1W-MAD11 Analog I/O Unit provides 2 analog inputs and 1 analog
output.
• The analog input range can be set to 0 to 5 VDC, 1 to 5 VDC, 0 to
10 VDC, −10 to 10 VDC, 0 to 20 mA, or 4 to 20 mA. The inputs have a
resolution of 1/6000.
An open-circuit detection function is activated in the ranges of 1 to 5 VDC
and 4 to 20 mA.
• The analog output range can be set to 1 to 5 VDC, 0 to 10 VDC, −10 to
10 VDC, 0 to 20 mA, or 4 to 20 mA. The outputs have a resolution of
1/6000.
Part Names
CP1W-MAD11
(4) DIP switch
(3) Expansion connector
NC
NC
(2) Expansion I/O connecting cable
(1) Analog I/O terminals
(Terminal block is not removable)
(1) Analog I/O Terminals
Connected to analog I/O devices.
NC
I OUT
NC
V OUT COM
Note
NC
NC
NC
V IN0
NC
COM0 I IN1
I IN0
AG
V IN1 COM1
For current inputs, short V IN0 to I IN0 and V IN1 to I IN1.
V OUT
Voltage output
I OUT
COM
Current output
Output common
V IN0
I IN0
Voltage input 0
Current input 0
COM0
V IN1
Input common 0
Voltage input 1
I IN1
COM1
Current input 1
Input common 1
445
Section 7-4
Analog I/O Units
(2) Expansion I/O Connecting Cable
Connected to the expansion connector of a CP1L CPU Unit or a CPseries Expansion Unit or Expansion I/O Unit. The cable is provided with
the Analog I/O Unit and cannot be removed.
!Caution Do not touch the cables during operation. Static electricity may cause operating errors.
(3) Expansion Connector
Used for connecting CP-series Expansion Units or Expansion I/O Units.
(4) DIP Switch
Used to enable or disable averaging.
Pin1: Average processing for analog input 0
(OFF: Average processing not performed; ON: Average processing performed)
Pin2: Average processing for analog input 1
(OFF: Average processing not performed; ON: Average processing performed)
Main Analog I/O Unit
Specifications
Analog I/O Units are connected to the CP1L CPU Unit. For CP1L M-type CPU
Units, up to three Units can be connected, including any other Expansion
Units and Expansion I/O Units. For CP1L L-type CPU Units, one unit can be
connected.
For CP1L M-type CPU Units, a maximum of
3 Expansion Units or Expansion I/O Units
can be connected.
CP1W-20EDR1
Expansion I/O Unit
CP1L M-type CPU Unit
SYSMAC
CP1L
CP1W-8ED
Expansion I/O Unit
CP1W-MAD11
Analog I/O Unit
IN
L1
L2/N
COM
01
00
03
02
05
04
07
06
09
08
11
10
01
00
03
02
05
04
07
06
09
08
11
10
C OM
C OM
01
03
05
07
09
11
00
02
04
06
08
10
NC
01
00
CH
IN
03
02
IN
C H 00 01 02 03 04 05 06 07
C H 00 01 02 03
08 09 10 11
08 09 10 11
20EDR1
8ED
OUT
CH
00
01
COM
02
COM
03
COM
04
COM
06
05
00
07
01
COM
03
02
04
COM
06
05
07
00 01 02 03 04 05 06 07
CH
00
01
02
04
05
07
NC
N C C OM
CO M C OM
03
CO M
06
EXP
EXP
04
C OM
06
05
NC
07
NC
446
2 analog inputs
1 analog output
OUT
Section 7-4
Analog I/O Units
Analog
Input
Section
Item
Number of inputs
Voltage I/O
2 inputs (2 words allocated)
Input signal range
Max. rated input
0 to 5 VDC, 1 to 5 VDC,
0 to 20 mA or 4 to 20 mA
0 to 10 VDC, or −10 to 10 VDC
±15 V
±30 mA
External input impedance
Resolution
1 MΩ min.
1/6000 (full scale)
Approx. 250 Ω
0.3% full scale
0.6% full scale
0.4% full scale
0.8% full scale
Overall accuracy
25°C
0 to 55°C
A/D conversion data
Analog
Output
Section
Current I/O
Averaging function
16-bit binary (4-digit hexadecimal)
Full scale for −10 to 10 V: F448 to 0BB8 hex
Full scale for other ranges: 0000 to 1770 hex
Supported (Settable for individual inputs via DIP switch)
Open-circuit detection function
Number of outputs
Supported
1 output (1 word allocated)
Output signal range
Allowable external output load resistance
1 to 5 VDC, 0 to 10 VDC, or
−10 to 10 VDC,
1 kΩ min.
External output impedance
Resolution
0.5 Ω max.
1/6000 (full scale)
Overall accuracy
25°C
0 to 55°C
Set data (D/A conversion)
Conversion time
0 to 20 mA or 4 to 20 mA
600 Ω max.
0.4% full scale
0.8% full scale
16-bit binary (4-digit hexadecimal)
Full scale for −10 to 10 V: F448 to 0BB8 hex
Full scale for other ranges: 0000 to 1770 hex
2 ms/point (6 ms/all points)
Isolation method
Photocoupler isolation between analog I/O terminals and internal
circuits.
No isolation between analog I/O signals.
Current consumption
5 VDC: 83 mA max., 24 VDC: 110 mA max.
Analog I/O Signal
Ranges
Analog I/O data is digitally converted according to the analog I/O signal range
as shown below.
Note
When the input exceeds the specified range, the AD converted data will be
fixed at either the lower limit or upper limit.
447
Section 7-4
Analog I/O Units
Analog Input Signal
Ranges
−10 to 10 V
The −10 to 10 V range corresponds to the hexadecimal values F448 to 0BB8
(−3000 to 3000). The entire data range is F31C to 0CE4 (−3300 to 3300).
A negative voltage is expressed as a two’s complement.
Converted Data
Hexadecimal (Decimal)
0CE4 (3300)
0BB8 (3000)
−11V −10V
0000 (0)
0V
10 V 11 V
F448 (−3000)
F31C (−3300)
0 to 10 V
The 0 to 10 V range corresponds to the hexadecimal values 0000 to 1770 (0
to 6000). The entire data range is FED4 to 189C (−300 to 6300). A negative
voltage is expressed as a two’s complement.
Converted Data
Hexadecimal (Decimal)
189C (6300)
1770 (6000)
−0.5 V 0000 (0)
0V
10 V 10.5 V
FED4 (−300)
0 to 5 V
The 0 to 5 V range corresponds to the hexadecimal values 0000 to 1770 (0 to
6000). The entire data range is FED4 to 189C (−300 to 6300). A negative voltage is expressed as a two’s complement.
Converted Data
Hexadecimal (Decimal)
189C (6300)
1770 (6000)
−0.25 V 0000 (0)
0V
FED4 (−300)
448
5 V 5.25 V
Section 7-4
Analog I/O Units
1 to 5 V
The 1 to 5 V range corresponds to the hexadecimal values 0000 to 1770 (0 to
6000). The entire data range is FED4 to 189C (−300 to 6300). Inputs between
0.8 and 1 V are expressed as two’s complements. If the input falls below 0.8 V,
open-circuit detection will activate and converted data will be 8000.
Converted Data
Hexadecimal (Decimal)
189C (6300)
1770 (6000)
0000 (0)
0.8 V
5 V 5.2 V
1V
FED4 (−300)
0 to 20 mA
The 0 to 20 mA range corresponds to the hexadecimal values 0000 to 1770 (0
to 6000). The entire data range is FED4 to 189C (−300 to 6300). A negative
voltage is expressed as a two’s complement.
Converted Data
Hexadecimal (Decimal)
189C (6300)
1770 (6000)
−1 mA 0000 (0)
0 mA
20 mA 21 mA
FED4 (−300)
4 to 20 mA
The 4 to 20 mA range corresponds to the hexadecimal values 0000 to 1770 (0
to 6000). The entire data range is FED4 to 189C (−300 to 6300). Inputs
between 3.2 and 4 mA are expressed as two’s complements. If the input falls
below 3.2 mA, open-circuit detection will activate and converted data will be
8000.
Converted Data
Hexadecimal (Decimal)
189C (6300)
1770 (6000)
0000 (0)
3.2 mA
0 mA
4 mA
20 mA 20.8 mA
FED4 (−300)
449
Section 7-4
Analog I/O Units
Analog Output Signal
Ranges
−10 to 10 V
The hexadecimal values F448 to 0BB8 (−3000 to 3000) correspond to an analog voltage range of −10 to 10 V. The entire output range is −11 to 11 V. Specify a negative voltage as a two’s complement.
11 V
10 V
F31C F448
8000 (−3300) (−3000) 0000 (0)
0V
0BB8 0CE4
(3000) (3300)
Conversion Data
7FFF Hexadecimal (Decimal)
−10 V
−11 V
0 to 10 V
The hexadecimal values 0000 to 1770 (0 to 6000) correspond to an analog
voltage range of 0 to 10 V. The entire output range is −0.5 to 10.5 V. Specify a
negative voltage as a two’s complement.
10.5 V
10 V
8000
FED4
(−300) 0000 (0)
0V
1770 189C
(6000) (6300)
Conversion Data
7FFF Hexadecimal (Decimal)
−0.5 V
1 to 5 V
The hexadecimal values 0000 to 1770 (0 to 6000) correspond to an analog
voltage range of 1 to 5 V. The entire output range is 0.8 to 5.2 V.
5.2 V
5V
1V
0.8 V
8000
450
FED4 0 V
(−300)
1770 189C
(6000) (6300)
7FFF
Conversion Data
Hexadecimal (Decimal)
Section 7-4
Analog I/O Units
0 to 20 mA
The hexadecimal values 0000 to 1770 (0 to 6000) correspond to an analog
current range of 0 to 20 mA. The entire output range is 0 to 21 mA.
21 mA
20 mA
8000
0000 (0)
0 mA
1770 189C
(6000) (6300)
7FFF
Conversion Data
Hexadecimal (Decimal)
4 to 20 mA
The hexadecimal values 0000 to 1770 (0 to 6000) correspond to an analog
current range of 4 to 20 mA. The entire output range is 3.2 to 20.8 mA.
20.8 mA
20 mA
4 mA
3.2 mA
8000
FED4
(−300)
0 mA
1770 189C
(6000) (6300)
7FFF
Conversion Data
Hexadecimal (Decimal)
Averaging Function for
Analog Inputs
The averaging function can be enabled for inputs using the DIP switch. The
averaging function stores the average (a moving average) of the last eight
input values as the converted value. Use this function to smooth inputs that
vary at a short interval.
Open-circuit Detection
Function for Analog
Inputs
The open-circuit detection function is activated when the input range is set to
1 to 5 V and the voltage drops below 0.8 V, or when the input range is set to 4
to 20 mA and the current drops below 3.2 mA. When the open-circuit detection function is activated, the converted data will be set to 8,000.
The time for enabling or clearing the open-circuit detection function is the
same as the time for converting the data. If the input returns to the convertible
range, the open-circuit detection is cleared automatically and the output
returns to the normal range.
451
Section 7-4
Analog I/O Units
Using Analog I/O
Connect and wire the Unit.
Create a ladder program.
Writing Set Data and
Reading A/D Converted
Values
• Connect the Analog I/O Unit.
• Wire to analog I/O devices.
• Analog inputs: 0 to 5 VDC, 1 to 5 VDC, 0 to 10 VDC, –10 to
10 VDC, 0 to 20 mA, or 4 to 20 mA
• Analog outputs: 1 to 5 VDC, 0 to 10 VDC, –10 to 10 VDC, 0 to
20 mA, or 4 to 20 mA
• Set analog inputs as voltage or current inputs and set the
averaging function.
• Write set data to output words.
CPU Unit
Analog I/O Unit
Ladder program
Word (n+1)
Word (m+1)
MOV(021)
Word (m+2)
• Writes the set data.
• Reads the converted
values.
“m” is the last input word and “n” is the last
output word allocated to the CPU Unit or
previous Expansion Unit or Expansion I/O Unit.
Writing D/A Conversion
Data
CPU Unit
Set data
Analog input 0
converted value
Analog input 1
converted value
Analog devices
• Temperature sensor
• Pressure sensor
• Speed sensor
• Flow sensor
• Voltage/current meter
• Other
Analog I/O Unit
Ladder program
(See note.)
Word (n+1)
Analog output
conversion value
MOV(021)
Writes the conversion
values.
“n” is the last output word allocated to the CPU
Unit or previous Expansion Unit or Expansion I/O
Unit.
Note
452
Analog devices
• Adjustment equipment
• Servo Controller
• Variable speed device
• Recorder
• Other
Word (n+1) can be used for either the set data or the analog output conversion
value.
Section 7-4
Analog I/O Units
Connecting the Analog I/O
Unit and Setting the DIP
Switch
This section describes how to connect an Analog I/O Unit to the CPU Unit.
CP1W-MAD11
Analog I/O Unit
CPU Unit
SYSMAC
CP1L
IN
L1
L2/N
COM
01
00
03
02
05
04
00
01
COM
07
06
02
COM
09
08
03
COM
11
10
04
COM
01
00
06
05
03
05
02
04
00
01
COM
07
07
06
03
02
09
04
COM
11
10
08
06
05
NC
NC
07
OUT
Setting the Averaging Function
DIP switch pins 1-1 and 1-2 are used to set the averaging function. When
averaging is enabled, a moving average of the last eight input values is output
as the converted value. The averaging function can be set separately for analog inputs 1 and 2.
DIP switch
pin
1-1
Function
Setting
Averaging
Analog input 0
OFF: Disabled; ON: Enabled
Analog input 1
OFF: Disabled; ON: Enabled
1-2
Wiring Analog I/O Devices
OFF
OFF
Internal Circuits
Analog Inputs
Analog Outputs
I IN0
COM0 (−)
510 kΩ
Input 1
V IN1
510 kΩ
250 kΩ
I IN1
COM1 (−)
V OUT
Internal circuits
250 kΩ
510 kΩ
Output
Input 0
V IN0
510 kΩ
Internal circuits
Default
COM (−)
I OUT
NC
AG
Analog ground
NC
Analog ground
453
Section 7-4
Analog I/O Units
Terminal Arrangements
NC
I OUT
NC
V OUT COM
Note
NC
NC
NC
V IN0
COM0 I IN1
I IN0
NC
AG
V IN1 COM1
For current inputs, short V IN0 to I IN0 and V IN1 to I IN1.
V OUT
Voltage output
I OUT
COM
Current output
Output common
V IN0
I IN0
Voltage input 0
Current input 0
COM0
V IN1
Input common 0
Voltage input 1
I IN1
COM1
Current input 1
Input common 1
Wiring for Analog Inputs
2-core shielded
twisted-pair cable
2-core shielded
twisted-pair cable
Analog
device
with
voltage
output
+
V IN
I IN
−
COM
Analog
Input
Unit
FG
Analog
device
with
current
output
+
V IN
I IN
−
COM
Analog
Input
Unit
FG
Wiring for Analog Outputs
2-core shielded
twisted-pair cable
V OUT
Analog
Output
Unit
+
I OUT
COM
−
2-core shielded
twisted-pair cable
Analog
device
with
voltage
input
V OUT
Analog
Output
Unit
I OUT
COM
FG
Note
+
−
Analog
device
with
current
input
FG
(1) Connect the shield to the FG terminal to prevent noise.
(2) When an input is not being used, short the + and − terminals.
(3) Separate wiring from power lines (AC power supply lines, high-voltage
lines, etc.)
(4) When there is noise in the power supply line, install a noise filter on the
input section and the power supply terminals.
454
Section 7-4
Analog I/O Units
(5) Refer to the following diagram regarding wiring disconnections when voltage input is being used.
A
Analog
input
device 1
B
C
Analog
input
device 2
24 VDC
Example: If analog input device 2 is outputting 5 V and the same power
supply is being used for both devices as shown above, approximately 1/3,
or 1.6 V, will be applied to the input for input device 1.
If a wiring disconnection occurs when voltage input is being used, the
situation described below will result. Either separate the power supplies
for the connected devices, or use an isolator for each input.
If the same power supply is being used by the connected devices and a
disconnection occurs at points A or B in the above diagram, an
unwanted circuit path will occur as shown along the dotted line in the
diagram. If that occurs, a voltage of approximately 1/3 to 1/2 of the output voltage of the other connected device will be generated. If that voltage is generated while the setting is for 1 to 5 V, open-circuit detection
may not be possible. Also, if a disconnection occurs at point C in the diagram, the negative (-) side will be used in for both devices and open-circuit detection will not be possible.
This problem will not occur for current inputs even if the same power
supply is used.
(6) When external power is supplied (when setting the range code), or when
there is a power interruption, pulse-form analog output of up to 1 ms may
be generated. If this causes problems with operation, take countermeasures such as those suggested below.
• Turn ON the power supply for the CP1L CPU Unit first, and then turn
ON the power supply for the load after confirming correct operation.
• Turn OFF the power supply for the load before turning OFF the power
supply for the CP1L CPU Unit.
455
Section 7-4
Analog I/O Units
Creating a Ladder
Program
I/O Allocation
Two input words and one output word are allocated to the Analog I/O Unit
starting from the next word following the last word allocated to the CPU Unit or
previous Expansion Unit or Expansion I/O Unit.
Analog I/O Unit
Word m+1
Word m+2
32 inputs
16 outputs
Word n+1
Writing Set Data
Write the set data to word (n+1). A/D or D/A conversion begins when the set
data is transferred from the CPU Unit to the Analog I/O Unit. There are five
range codes, 000 to 100, that combine the analog input 1 and 2 and analog
output signal ranges, as shown below.
Range
code
Analog input 0 range
Analog input 1 range
000
001
−10 to 10 V
0 to 10 V
−10 to 10 V
0 to 10 V
−10 to 10 V
0 to 10 V
010
011
1 to 5 V/4 to 20 mA
0 to 5 V/0 to 20 mA
1 to 5 V/4 to 20 mA
0 to 5 V/0 to 20 mA
1 to 5 V
0 to 20 mA
100
---
---
4 to 20 mA
15
n+1
1
8
0 0
0 0 0
7 6 5
4 3
2
1
Analog output range
0
0
Analog
output
Analog
input 1
Analog
input 0
Example
The following instructions set analog input 0 to 4 to 20 mA, analog input 1 to 0
to 10 V, and the analog output to −10 to 10 V.
First Cycle Flag
A200.11
MOV(021)
#800A
n+1
Analog input 0: 4 to 20 mA
Analog input 1: 0 to 10 V
Analog output: −10 to 10 V
• The Analog I/O Unit will not start converting analog I/O values until the
range code has been written. Until conversion starts, inputs will be 0000,
and 0 V or 0 mA will be output.
• After the range code has been set, 0 V or 0 mA will be output for the 0 to
10 V, −10 to 10 V, or 0 to 20 mA ranges, and 1 V or 4 mA will be output for
the 1 to 5 V and 4 to 20 mA ranges until a convertible value has been written to the output word.
• Once the range code has been set, it is not possible to change the setting
while power is being supplied to the CPU Unit. To change the I/O range,
turn the CPU Unit OFF then ON again.
456
Section 7-4
Analog I/O Units
Reading Analog Input Converted Values
The ladder program can be used to read the memory area words where the
converted values are stored. Values are output to the next two words (m + 1,
m + 2) following the last input word (m) allocated to the CPU Unit or previous
Expansion Unit or Expansion I/O Unit.
Writing Analog Output Converted Values
The ladder program can be used to write data to the memory area where the
set value is stored. The output word will be “n+1,” where “n” is the last output
word allocated to the CPU Unit or previous Expansion Unit or Expansion I/O
Unit.
Startup Operation
After power is turned ON, it will require two cycle times plus approx. 50 ms
before the first data is converted. The following instructions can be placed at
the beginning of the program to delay reading converted data from analog
inputs until conversion is actually possible.
Analog input data will be 0000 until initial processing has been completed.
Analog output data will be 0 V or 0 mA until the range code has been written.
After the range code has been written, the analog output data will be 0 V or
0 mA if the range is 0 to 10 V, −10 to 10 V, or 0 to 20 mA, or it will be 1 V or
4 mA if the range is 1 to 5 V or 4 to 20 mA.
Always ON Flag
P_On
TIM
0005
#0002
T0005
MOV(021)
TIM 0005 will start as soon as power turns
ON. After 0.2 s (200 ms), the input for TIM
0005 will turn ON, and the converted data
from analog input 0 that is stored in word 2
will be transferred to D0.
2
D0
Handling Unit Errors
• When an error occurs in the Analog I/O Unit, analog input data will be
0000 and 0 V or 0 mA will be output as the analog output.
If a CPU error or an I/O bus error (fatal errors) occurs at the CPU Unit and
the analog output is set to 1 to 5 V or 4 to 20 mA, 0 V or 0 mA will be output. For any other fatal errors at the CPU Unit, 1 V or 4 mA will be output.
• CP-series Expansion Unit or Expansion I/O Unit errors are output to bits
0 to 6 of word A436. The bits are allocated from A436.00 in order starting
with the Unit nearest the CPU Unit. Use these flags in the program when
it is necessary to detect errors.
Program Example
This programming example uses these ranges:
Analog input 0: 0 to 10 V
Analog input 1: 4 to 20 mA
Analog output: 0 to 10 V
457
Section 7-4
Analog I/O Units
First Cycle ON Flag
A200.11
MOV(021)
#8051
← Writes the range code (8051) to the Unit.
102
Always ON Flag
P_On
TIM
0005
#0002
T0005
Execution
condition
MOV(021)
2
← Reads analog input 0's converted value.
D0
T0005
Execution
condition
MOV(021)
3
← Reads analog input 1's converted value.
D1
T0005
Execution
condition
MOV(021)
D10
← The content of D10 is written to the output
word as the analog output set value.
102
T0005
Execution
condition
CMP(020)
3
#8000
(P_EQ)
100.00
7-4-2
Open-circuit alarm
CP1W-MAD42/CP1W-MAD44 Analog I/O Units
Each CP1W-MAD42 Analog I/O Unit provides 4 analog inputs and 2 analog
outputs.
Each CP1W-MAD44 Analog I/O Unit provides 4 analog inputs and 4 analog
outputs.
• The analog input range can be set to 0 to 5 VDC, 1 to 5 VDC, 0 to
10 VDC, −10 to 10 VDC, 0 to 20 mA, or 4 to 20 mA. The inputs have a
resolution of 1/12000.
An open-circuit detection function is activated in the ranges of 1 to 5 VDC
and 4 to 20 mA.
• The analog output range can be set to 1 to 5 VDC, 0 to 10 VDC, −10 to
10 VDC, 0 to 20 mA, or 4 to 20 mA. The outputs have a resolution of
1/12000.
458
Section 7-4
Analog I/O Units
Part Names
CP1W-MAD42/CP1W-MAD44
(1) Analog Input terminals
(Terminal block is not removable)
(4) Expansion connector
(3) Expansion I/O connecting cable
(2) Analog Output terminals
(Terminal block is not removable)
(1) Analog Input Terminals
Connected to analog output devices.
Input Terminal Arrangement for CP1W-MAD42/MAD44
V IN1
I IN1
COM1
V IN2
I IN2
COM2
V IN3
I IN3
COM3
V IN4
I IN4
COM4
Note
Voltage input 1
Current input 1
Input common 1
Voltage input 2
Current input 2
Input common 2
Voltage input 3
Current input 3
Input common 3
Voltage input 4
Current input 4
Input common 4
When using current inputs, voltage input terminals must be short-circuited
with current input terminals.
(2) Analog Output Terminals
Connected to analog input devices.
Output Terminal Arrangement for CP1W-MAD42
V OUT1
I OUT1
COM1
V OUT2
I OUT2
COM2
Voltage output 1
Current output 1
Output common 1
Voltage output 2
Current output 2
Output common 2
459
Section 7-4
Analog I/O Units
Output Terminal Arrangement for CP1W-MAD44
V OUT1
I OUT1
COM1
V OUT2
I OUT2
COM2
V OUT3
I OUT3
COM3
V OUT4
I OUT4
COM4
Voltage output 1
Current output 1
Output common 1
Voltage output 2
Current output 2
Output common 2
Voltage output 3
Current output 3
Output common 3
Voltage output 4
Current output 4
Output common 4
(3) Expansion I/O Connecting Cable
Connected to the expansion connector of a CP1L CPU Unit or a CPseries Expansion Unit or Expansion I/O Unit. The cable is provided with
the Analog I/O Unit and cannot be removed.
!Caution Do not touch the cables during operation. Static electricity may cause operating errors.
(4) Expansion Connector
Used for connecting CP-series Expansion Units or Expansion I/O Units.
Main Analog I/O Unit
Specifications
Analog I/O Units are connected to the CP1L CPU Unit. For CP1L M-type CPU
Units, up to three Units can be connected, including any other Expansion
Units and Expansion I/O Units. For CP1L L-type CPU Units, one Unit can be
connected.
For CP1L M-type CPU Units, a maximum
of 3 Expansion Units or Expansion I/O
Units can be connected.
CP1W-20EDR1
Expansion I/O Unit
CP1W-8ED
Expansion I/O Unit
CP1W-MAD42/MAD44
Analog I/O Unit
4 analog inputs
CP1L M-type CPU Unit
SYSMAC
CP1L
IN
L1
L2/N
COM
01
00
03
02
05
04
07
06
09
08
11
10
01
00
03
02
05
04
07
06
09
11
10
08
C O M 01
03
00
02
C O M 01
09
11
03
05
07
00
02
04
06
08
10
NC
CH
IN
IN
C H 00 01 02 03 04 05 06 07
C H 00 01 02 03
08 09 10 11
08 09 10 11
20EDR1
8ED
OUT
00
01
COM
02
COM
03
COM
04
COM
06
05
00
07
01
COM
03
02
04
COM
06
05
07
C H 00 01 02 03 04 05 06 07
CH
00
01
02
04
05
07
NC
NC COM COM COM
03
COM
06
EXP
EXP
04
COM
06
05
07
460
4 analog outputs
CP1W-MAD44
2 analog outputs
CP1W-MAD42
OUT
Section 7-4
Analog I/O Units
Analog
Input
Section
Item
Number of inputs
Voltage I/O
4 inputs (4 words allocated)
Input signal range
Max. rated input
0 to 5 VDC, 1 to 5 VDC,
0 to 20 mA or 4 to 20 mA
0 to 10 VDC, or −10 to 10 VDC
±15 V
±30 mA
External input impedance
Resolution
1 MΩ min.
1/12000 (full scale)
Approx. 250 Ω
0.2% full scale
0.5% full scale
0.3% full scale
0.7% full scale
Overall accuracy
25°C
0 to 55°C
A/D conversion data
16-bit binary (4-digit hexadecimal)
Full scale for −10 to 10 V: E890 to 1770 hex
Full scale for other ranges: 0000 to 2EE0 hex
Supported
Averaging function
Analog
Output
Section
Current I/O
Open-circuit detection function
Number of outputs
Supported
CP1W-MAD42: 2 outputs (2 words allocated)
CP1W-MAD44: 4 outputs (4 words allocated)
Output signal range
1 to 5 VDC, 0 to 10 VDC, or
−10 to 10 VDC,
0 to 20 mA or 4 to 20 mA
Allowable external output load resistance
External output impedance
2 kΩ min.
0.5 Ω max.
350 Ω max.
Resolution
Overall accuracy
1/12000 (full scale)
0.3% full scale
25°C
0 to 55°C
Set data (D/A conversion)
Conversion time
0.7% full scale
16-bit binary (4-digit hexadecimal)
Full scale for −10 to 10 V: E890 to 1770 hex
Full scale for other ranges: 0000 to 2EE0 hex
CP1W-MAD42: 1 ms/point (6 ms/all points)
CP1W-MAD44: 1 ms/point (8 ms/all points)
Photocoupler isolation between analog I/O terminals and internal
circuits.
No isolation between analog I/O signals.
Isolation method
Current consumption
CP1W-MAD42: 5 VDC: 120 mA max., 24 VDC: 120 mA max.
CP1W-MAD44: 5 VDC: 120 mA max., 24 VDC: 170 mA max.
Analog I/O Signal
Ranges
Analog I/O data is digitally converted according to the analog I/O signal range
as shown below.
Note
When the input exceeds the specified range, the AD converted data will be
fixed at either the lower limit or upper limit.
461
Section 7-4
Analog I/O Units
Analog Input Signal
Ranges
−10 to 10 V
The −10 to 10 V range corresponds to the hexadecimal values E890 to 1770
(−6000 to 6000). The entire data range is E638 to 19C8 (−6600 to 6600).
A negative voltage is expressed as a two’s complement.
Converted Data
Hexadecimal (Decimal)
19C8 (6600)
1770 (6000)
−11V −10V
0000 (0)
0V
10 V 11 V
E890 (−6000)
E638 (−6600)
0 to 10 V
The 0 to 10 V range corresponds to the hexadecimal values 0000 to 2EE0 (0
to 12000). The entire data range is FDA8 to 3138 (−600 to 12600). A negative
voltage is expressed as a two’s complement.
Converted Data
Hexadecimal (Decimal)
3138 (12600)
2EE0 (12000)
−0.5 V 0000 (0)
0V
10 V 10.5 V
FDA8 (−600)
0 to 5 V
The 0 to 5 V range corresponds to the hexadecimal values 0000 to 2EE0 (0 to
12000). The entire data range is FDA8 to 3138 (−600 to 12600). A negative
voltage is expressed as a two’s complement.
Converted Data
Hexadecimal (Decimal)
3138 (12600)
2EE0 (12000)
−0.25 V 0000 (0)
0V
FDA8 (−600)
462
5 V 5.25 V
Section 7-4
Analog I/O Units
1 to 5 V
The 1 to 5 V range corresponds to the hexadecimal values 0000 to 2EE0 (0 to
12000). The entire data range is FDA8 to 3138 (−600 to 12600). Inputs
between 0.8 and 1 V are expressed as two’s complements. If the input falls
below 0.8 V, open-circuit detection will activate and converted data will be
8000.
Converted Data
Hexadecimal (Decimal)
3138 (12600)
2EE0 (12000)
0000 (0)
0.8 V
5 V 5.2 V
1V
FDA8 (−600)
0 to 20 mA
The 0 to 20 mA range corresponds to the hexadecimal values 0000 to 2EE0
(0 to 12000). The entire data range is FDA8 to 3138 (−600 to 12600). A negative current is expressed as a two’s complement.
Converted Data
Hexadecimal (Decimal)
3138 (12600)
2EE0 (12000)
−1 mA 0000 (0)
0 mA
20 mA 21 mA
FDA8 (−600)
4 to 20 mA
The 4 to 20 mA range corresponds to the hexadecimal values 0000 to 2EE0
(0 to 12000). The entire data range is FDA8 to 3138 (−600 to 12600). Inputs
between 3.2 and 4 mA are expressed as two’s complements. If the input falls
below 3.2 mA, open-circuit detection will activate and converted data will be
8000.
Converted Data
Hexadecimal (Decimal)
3138 (12600)
2EE0 (12000)
0000 (0)
3.2 mA
0 mA
4 mA
20 mA 20.8 mA
FDA8 (−600)
463
Section 7-4
Analog I/O Units
Analog Output Signal
Ranges
−10 to 10 V
The hexadecimal values E890 to 1770 (−6000 to 6000) correspond to an analog voltage range of −10 to 10 V. The entire output range is −11 to 11 V. Specify a negative voltage as a two’s complement.
11 V
10 V
E638 E890
8000 (−6600) (−6000) 0000 (0)
0V
1770 19C8
(6000) (6600)
Conversion Data
7FFF Hexadecimal (Decimal)
−10 V
−11 V
0 to 10 V
The hexadecimal values 0000 to 2EE0 (0 to 12000) correspond to an analog
voltage range of 0 to 10 V. The entire output range is −0.5 to 10.5 V. Specify a
negative voltage as a two’s complement.
10.5 V
10 V
8000
FDA8
(−600) 0000 (0)
0V
Conversion Data
2EE0 3138
7FFF Hexadecimal (Decimal)
(12000) (12600)
−0.5 V
1 to 5 V
The hexadecimal values 0000 to 2EE0 (0 to 12000) correspond to an analog
voltage range of 1 to 5 V. The entire output range is 0.8 to 5.2 V.
5.2 V
5V
1V
0.8 V
8000
464
FDA8 0 V
(−600)
2EE0 3138
(12000) (12600)
7FFF
Conversion Data
Hexadecimal (Decimal)
Section 7-4
Analog I/O Units
0 to 20 mA
The hexadecimal values 0000 to 2EE0 (0 to 12000) correspond to an analog
current range of 0 to 20 mA. The entire output range is 0 to 21 mA.
21 mA
20 mA
8000
0000 (0)
0 mA
2EE0 3138
7FFF
(12000) (12600)
Conversion Data
Hexadecimal (Decimal)
4 to 20 mA
The hexadecimal values 0000 to 2EE0 (0 to 12000) correspond to an analog
current range of 4 to 20 mA. The entire output range is 3.2 to 20.8 mA.
20.8 mA
20 mA
4 mA
3.2 mA
8000
Averaging Function for
Analog Inputs
FDA8
(−600)
0 mA
2EE0 3138
7FFF
(12000) (12600)
Conversion Data
Hexadecimal (Decimal)
For analog inputs, the averaging function operates when the averaging bit is
set to 1. The averaging function outputs the average (a moving average) of
the last eight input values as the converted value. If there is only a slight variation in inputs, it is handled by the averaging function as a smooth input.
The averaging function stores the average (a moving average) of the last eight
input values as the converted value. Use this function to smooth inputs that
vary at a short interval.
Open-circuit Detection
Function for Analog
Inputs
The open-circuit detection function is activated when the input range is set to
1 to 5 V and the voltage drops below 0.8 V, or when the input range is set to 4
to 20 mA and the current drops below 3.2 mA. When the open-circuit detection function is activated, the converted data will be set to 8,000.
The time for enabling or clearing the open-circuit detection function is the
same as the time for converting the data. If the input returns to the convertible
range, the open-circuit detection is cleared automatically and the output
returns to the normal range.
465
Section 7-4
Analog I/O Units
Using Analog I/O
Connect and wire the Unit.
Create a ladder program.
Writing Set Data and
Reading A/D Converted
Values
• Connect the Analog I/O Unit.
• Wire to analog I/O devices.
• Analog inputs: 0 to 5 VDC, 1 to 5 VDC, 0 to 10 VDC, –10 to
10 VDC, 0 to 20 mA, or 4 to 20 mA
• Analog outputs: 1 to 5 VDC, 0 to 10 VDC, –10 to 10 VDC, 0 to
20 mA, or 4 to 20 mA
• Set analog inputs as voltage or current inputs and set the
averaging function.
• Write set data to output words.
CPU Unit
CP1W-MAD42
Word (n+1)
Ladder program
Word (n+2)
Word (m+1)
MOV(021)
Word (m+2)
• Writes the set data.
• Reads the converted
values.
Word (m+3)
Word (m+4)
“m” is the last input word and “n” is the last
output word allocated to the CPU Unit or
previous Expansion Unit or Expansion I/O Unit.
CPU Unit
Analog devices
• Temperature sensor
• Pressure sensor
• Speed sensor
• Flow sensor
• Voltage/current meter
• Other
CP1W-MAD44
Word (n+1)
Ladder program
Word (n+2)
Word (n+3)
MOV(021)
Word (n+4)
• Writes the set data.
• Reads the converted
values.
Word (m+1)
Word (m+2)
Word (m+3)
Word (m+4)
“m” is the last input word and “n” is the last
output word allocated to the CPU Unit or
previous Expansion Unit or Expansion I/O Unit.
466
Set data (input 1, 2
and output 1)
Set data (input 3, 4
and output 2)
Analog input 1
converted value
Analog input 2
converted value
Analog input 3
converted value
Analog input 4
converted value
Set data
(input 1, 2)
Set data
(input 3, 4)
Set data
(output 1, 2)
Set data
(output 3, 4)
Analog input 1
converted value
Analog input 2
converted value
Analog input 3
converted value
Analog input 4
converted value
Analog devices
• Temperature sensor
• Pressure sensor
• Speed sensor
• Flow sensor
• Voltage/current meter
• Other
Section 7-4
Analog I/O Units
Writing D/A Conversion
Data
CPU Unit
CP1W-MAD42
Ladder program
(See note.)
Word (n+1)
Word (n+2)
MOV(021)
Analog output 1
conversion value
Analog output 2
conversion value
Writes the conversion
values.
“n” is the last output word allocated to the CPU
Unit or previous Expansion Unit or Expansion I/O
Unit.
Note
Analog devices
• Adjustment equipment
• Servo Controller
• Variable speed device
• Recorder
• Other
Words (n+1, n+2) can be used for either the set data or the analog output
conversion value.
CPU Unit
CP1W-MAD44
Ladder program
(See note.)
Word (n+1)
Word (n+2)
MOV(021)
Writes the conversion
values.
Word (n+3)
Word (n+4)
“n” is the last output word allocated to the CPU
Unit or previous Expansion Unit or Expansion I/O
Unit.
Note
Analog output 1
conversion value
Analog output 2
conversion value
Analog output 3
conversion value
Analog output 4
conversion value
Analog devices
• Adjustment equipment
• Servo Controller
• Variable speed device
• Recorder
• Other
Words (n+1 to n+4) can be used for either the set data or the analog output
conversion value.
467
Section 7-4
Analog I/O Units
Wiring Analog I/O Devices
Internal Circuits
Analog Inputs
510 kΩ
250 Ω
V IN1
Analog input 1
Internal circuits
I IN1
COM1 (−)
to
510 kΩ
510 kΩ
250 Ω
510 kΩ
to
V IN4
Analog input 4
I IN4
COM4 (−)
AG
Analog ground
Analog Outputs (CP1W-MAD42)
Analog Outputs (CP1W-MAD44)
V OUT1
V OUT1
COM1 (−)
Analog
output 1
COM1 (−)
I OUT1
Internal circuits
Internal circuits
I OUT1
Analog
output 1
to
to
V OUT2
COM2 (−)
Analog
output 2
to
to
V OUT4
COM4 (−)
I OUT2
I OUT4
NC
NC
NC
NC
Analog ground
Analog
output 4
Analog ground
Wiring for Analog Inputs
2-core shielded
twisted-pair cable
2-core shielded
twisted-pair cable
Analog
device
with
voltage
output
+
V IN
I IN
−
COM
Analog
Input
Unit
FG
Analog
device
with
current
output
+
V IN
I IN
−
COM
Analog
Input
Unit
FG
Wiring for Analog Outputs
2-core shielded
twisted-pair cable
V OUT
Analog
Output
Unit
+
I OUT
COM
−
FG
468
2-core shielded
twisted-pair cable
Analog
device
with
voltage
input
V OUT
Analog
Output
Unit
+
I OUT
COM
−
FG
Analog
device
with
current
input
Section 7-4
Analog I/O Units
Note
(1) Connect the shield to the FG terminal to prevent noise.
(2) When an input is not being used, short the + and − terminals.
(3) Separate wiring from power lines (AC power supply lines, high-voltage
lines, etc.)
(4) When there is noise in the power supply line, install a noise filter on the
input section and the power supply terminals.
(5) Refer to the following diagram regarding wiring disconnections when voltage input is being used.
A
Analog
output
device
1
B
C
Analog
output
device
2
24 VDC
For example, if analog input device 2 is outputting 5 V and the same
power supply is being used as shown above, about 1/3, or 1.6 V, will be
applied at the input for input device 1.
Consider the following information on open input circuits when using voltage inputs. Either use separate power supplies, or install an isolator at
each input.
If the same power supply is used as shown in the following diagram and
an open circuit occurs at point A or B, an unwanted current flow will occur
as shown by the dotted lines in the diagram, creating a voltage at the
other input of about 1/3 to 1/2. If the 1 to 5 V range is being used, the
open-circuit detection function will not operate. Also, if there is an open
circuit at C, the open-circuit detection function will not operate because
the negative sides are the same.
(6) When external power is supplied (when range codes are set), or when the
power is interrupted, there may be a pulse status analog output of up to
1 ms. If this status is a problem, take the following measures.
• Turn ON the power to the CP1L CPU Unit, check the operation status,
and then turn ON the power at the load.
• Turn OFF the power to the load and then turn OFF the power to the
CP1L CPU Unit.
469
Section 7-4
Analog I/O Units
Creating a Ladder
Program
I/O Allocation
Four input words and two output words are allocated to the CP1W-MAD42,
starting from the next word following the last word allocated to the CPU Unit or
previous Expansion Unit or Expansion I/O Unit.
Four input words and four output words are allocated to the CP1W-MAD44,
starting from the next word following the last word allocated to the CPU Unit or
previous Expansion Unit or Expansion I/O Unit.
CP1W-MAD42
CP1W-MAD44
Word m+1
Word m+2
Word m+3
Word m+4
Word m+1
Word m+2
Word m+3
Word m+4
Word n+1
Word n+2
Word n+1
Word n+2
Word n+3
Word n+4
Writing Set Data
CP1W-MAD42
Write the set data to words (n+1 to n+2). A/D or D/A conversion begins when
the set data is transferred from the CPU Unit to the Analog I/O Unit. Setting
contents are shown as the following table.
Word (n+1) 15 14 13 12 11 10 9 8
Value
1 0 0 0 Analog output 1
7 6 5 4
Analog input 2
3 2 1 0
Analog input 1
Word (n+2) 15 14 13 12 11 10 9 8
Value
1 0 0 0 Analog output 2
7 6 5 4
Analog input 4
3 2 1 0
Analog input 3
CP1W-MAD44
Write the set data to words (n+1 to n+4). A/D or D/A conversion begins when
the set data is transferred from the CPU Unit to the Analog I/O Unit. Setting
contents are shown as the following table.
Word (n+1) 15 14 13 12 11 10
9
8
7
Value
1 0 0 0 0 0
Word (n+2) 15 14 13 12 11 10
0
9
0
8
Analog input 2
7 6 5 4
Analog input 1
3 2 1 0
Value
1 0 0 0 0 0
Word (n+3) 15 14 13 12 11 10
0
9
0
8
Analog input 4
7 6 5 4
Analog input 3
3 2 1 0
Value
1 0 0 0 0 0
Word (n+4) 15 14 13 12 11 10
0
9
0
8
Analog output 2
7 6 5 4
Analog output 1
3 2 1 0
0
0
Analog output 4
Analog output 3
Value
1
0
0
0
0
0
6
5
4
3
2
1
0
Even if analog inputs are not used, bit 15 in word (n+1) and (n+2) must be set
to 1.
Set Data of Analog Inputs
7
Value
6
5
Enable Bit
0 : Disable channel
1 : Enable channel
470
4
3
2
1
0
Enable Average AD Range Code Enable Average AD Range Code
Average Bit
0 : Disable
1 : Enable
AD Range Code
00 : −10 to 10V
01 : 0 to 10V
10 : 1 to 5V (4 to 20mA)
11 : 0 to 5V (0 to 20mA)
Section 7-4
Analog I/O Units
Range Code
00
Analog input range
−10 to 10 V
01
10
0 to 10 V
1 to 5 V (4 to 20 mA)
11
0 to 5 V (0 to 20 mA)
Set Data of Analog Outputs
7
Value
6
5
DA Range Code
Enable
4
3
2
Enable
1
Enable Bit
0 : Disable channel
1 : Enable channel
Range Code
0
DA Range Code
DA Range Code
000 : −10 to 10V
001 : 0 to 10V
010 : 1 to 5V
011 : 0 to 20mA
100 : 4 to 20mA
Analog output range
000
001
−10 to 10 V
0 to 10 V
010
011
1 to 5 V
0 to 20 mA
100
4 to 20 mA
• The Analog I/O Unit will not start converting analog I/O values until the set
data has been written.
• Before range code is written, 0 V or 0 mA will be output in the 0 to 10 V,
−10 to +10 V, and 0 to 20 mA ranges, and 1 V or 4 mA will be output in
the 1 to 5 V and 4 to 20 mA ranges.
• Once the range code has been set, it is not possible to be changed while
power is being supplied to the CPU Unit. To change the code range, turn
the CPU Unit OFF then ON again.
Averaging
Set whether averaging is to be used for set data. When the averaging bit is set
to 1, the average (moving average) for the past eight inputs is output as conversion data.
Reading Analog Input Converted Values
Read the conversion value storage area with the ladder program. With word m
as the last input word allocated to the CPU Unit or an already-connected
Expansion Unit, the A/D conversion data will be output to the following words
m+1 to m+4.
Writing Analog Output Converted Values
The ladder program can be used to write conversion data to the output words.
The output word start from “n+1” where “n” is the last output word allocated to
the CPU Unit, or previous Expansion Unit or Expansion I/O Unit.
Startup Operation
After power is turned ON, it will require two cycle times plus approximately
50ms before the first conversion data is output.
Analog input data will be 0000 until the first conversion data is stored in the
input words.
471
Section 7-4
Analog I/O Units
The following table shows the output status after the initial processing is completed.
Output type
Output range
Before range
code is written
After range
code is written
Voltage output
0 to 10 V,
1 to 5 V
−10 to +10 V
0V
Current output
0 to 20 mA
4 to 20 mA
0V
0 mA
0 mA
1V
4 mA
Therefore, create a program as shown below, so that the ladder can start to
operate with valid conversion data in input words.
Always ON Flag
P_On
TIM0005 is started when the power is
turned ON. After 0.2 s (200 ms) elapses,
the TIM0005 contact turns ON and the
analog input 1 conversion data stored in
word 2 is transferred to D0.
TIM
0005
#0002
T0005
MOV(021)
2
D0
Handing Unit Errors
When an error occurs in the Analog I/O Unit, analog input data will be 0000
and 0 V or 0 mA will be output as the analog output.
If a CPU error or an I/O bus error (fatal errors) occurs at the CPU Unit and the
analog output is set to 1 to 5 V or 4 to 20 mA, 0 V or 0 mA will be output. For
any other errors at the CPU Unit, 1 V or 4 mA will be output.
Program Example
CP1L
CP1W-MAD42
CIO 0
CIO 1
Input word
addresses
Output word
addresses
CIO 100
CIO 101
CP1W-MAD44
CIO 2
CIO 3
CIO 4
CIO 5
CIO 6
CIO 7
CIO 8
CIO 9
CIO 102
CIO 103
CIO 104
CIO 105
CIO 106
CIO 107
This programming example uses these ranges:
CP1W-MAD42
472
Analog
input
Input 1
Input
range
4 to 20 mA
Range
code
10
Averaging
Set data
Yes
1110 (E hex)
Destination
word
n+1
Input 2
Input 3
0 to 10 V
0 to 5 V
01
11
Yes
Yes
1101 (D hex)
1111 (F hex)
n+1
n+2
Input 4
Output 1
−10 to 10 V
−10 to 10 V
00
000
Yes
---
1100 (C hex)
1000 (8 hex)
n+2
n+1
Output 2
4 to 20 mA
100
---
1100 (C hex)
n+2
Section 7-4
Analog I/O Units
CP1W-MAD44
Analog
input
Input
range
Range
code
Averaging
Set data
Destination
word
Input 1
Input 2
4 to 20 mA
0 to 10 V
10
01
Yes
No
1110 (E hex)
1001 (9 hex)
n+1
n+1
Input 3
Input 4
0 to 5 V
−10 to 10 V
11
00
Yes
Yes
1111 (F hex)
1100 (C hex)
n+2
n+2
Output 1
Output 2
−10 to 10 V
4 to 20 mA
000
100
-----
1000 (8 hex)
1100 (C hex)
n+3
n+3
Output 3
Output 4
0 to 10 V
Not use
001
---
-----
1001 (9 hex)
0000 (0 hex)
n+4
n+4
First Cycle Flag
A200.11
MOV(021)
#88DE
102
← Writes the range code of CP1W-MAD42 to the Unit.
A200.11
MOV(021)
#8CCF
103
A200.11
MOV(021)
#809E
104
← Writes the range code of CP1W-MAD44 to the Unit.
A200.11
MOV(021)
#80CF
105
A200.11
MOV(021)
#80C8
106
A200.11
MOV(021)
#8009
107
473
Section 7-4
Analog I/O Units
Always ON Flag
P_On
TIM
0005
#0002
T0005
Execution
condition
MOV(021)
2
D0
T0005
← Reads analog input 1's of CP1W-MAD42 converted value.
Execution
condition
MOV(021)
3
D1
T0005
Execution
condition
← Reads analog input 2's of CP1W-MAD42 converted value.
MOV(021)
6
D4
T0005
← Reads analog input 1's of CP1W-MAD44 converted value.
Execution
condition
MOV(021)
7
D5
T0005
Execution
condition
← Reads analog input 2's of CP1W-MAD44 converted value.
MOV(021)
D10
102
T0005
Execution
condition
← The content of D10 is written to the output
word as the analog output set value.
CMP(020)
2
Open-circuit detection (4-20 mA)
#8000
(P_EQ)
100.00
T0005
Execution
condition
Open-circuit alarm
MOV(021)
D12
104
T0005
Execution
condition
← The content of D10 is written to the output
word as the analog output conversion value.
CMP(020)
6
Open-circuit detection (4-20 mA)
#8000
(P_EQ)
100.01
474
Open-circuit alarm
Section 7-5
Temperature Sensor Units
7-5
7-5-1
Temperature Sensor Units
CP1W-TS01/TS02 Temperature Sensor Units
CP1W-TS002/TS102 Temperature Sensor Units each provide up to four input
points, and CP1W-TS001/TS101 Temperature Sensor Units each provide up
to two input points. The inputs can be from thermocouples or platinum resistance thermometers.
CP1W-TS002/TS102 Temperature Sensor Units are each allocated four input
words, so no more than three Units can be connected.
Part Names
Temperature Sensor Units:
CP1W-TS001/002/101/102
(3) Rotary Switch
(2) DIP Switch
(5) Expansion Connector
(4) Expansion I/O
Connector Cable
(1) Temperature Sensor Input Terminals
(Terminal block is not removable)
(1) Temperature Sensor Input Terminals
Used to connect temperature sensors such as thermocouples or platinum resistance thermometers.
(2) DIP Switch
Used to set the temperature unit (°C or °F) and the number of decimal
places used.
(3) Rotary Switch
Used to set the temperature input range. Make the setting according to
the specifications of the temperature sensors that are connected.
(4) Expansion I/O Connecting Cable
Connected to the expansion connector of a CP1L CPU Unit or a CPseries Expansion Unit or Expansion I/O Unit.The cable is included with
the Temperature Sensor Unit and cannot be removed.
Note
Do not touch the cables during operation. Static electricity may
cause operating errors.
(5) Expansion Connector
Used for connecting CP-series Expansion Units or Expansion I/O Units.
475
Section 7-5
Temperature Sensor Units
Main Specifications
For CP1L M-type CPU Units, a
maximum of 3 Expansion Units or
Expansion I/O Units can be connected
CP1W-20EDR1
Expansion I/O Unit
CP1L M-type CPU Unit
SYSMAC
CP1L
CP1W-8ED
Expansion I/O Unit
[email protected]/[email protected]
Temperature Sensor Unit
IN
L1
L2/N
COM
01
00
03
02
05
04
07
06
09
11
08
10
01
00
03
02
05
04
07
06
09
08
11
10
C OM
01
00
02
NC
03
05
04
07
06
09
08
C OM
11
03
01
00
10
CH
IN
02
IN
C H 00 01 02 03 04 05 06 07
C H 00 01 02 03
08 09 10 11
08 09 10 11
20EDR1
8ED
OUT
CH
00
01
COM
02
COM
03
COM
04
COM
06
05
00
07
01
COM
03
02
04
COM
06
05
07
00 01 02 03 04 05 06 07
CH
00
01
02
04
05
07
NC
N C C OM
CO M C OM
03
CO M
06
EXP
EXP
04
C OM
06
05
07
OUT
Thermocouples or
platinum resistance
thermometers
Item
CP1W-TS001
Temperature sensors
CP1W-TS002
Temperature inputs
CP1W-TS101
CP1W-TS102
Thermocouples
Switchable between K and J, but same type
must be used for all inputs.
2
4
Platinum resistance thermometer
Switchable between Pt100 and JPt100, but
same type must be used for all inputs.
2
4
2
4
(The larger of ±0.5% of converted value or
±1°C) ±1 digit max.
Conversion time
2
4
(The larger of ±0.5% of converted value or
±2°C) ±1 digit max. (See note.)
250 ms for 2 or 4 input points
Converted temperature data
Isolation
16-bit binary data (4-digit hexadecimal)
Photocouplers between all temperature input signals
Current consumption
5 VDC: 40 mA max., 24 VDC: 59 mA max.
Number of inputs
Allocated input words
Accuracy
Note
5 VDC: 54 mA max., 24 VDC: 73 mA max.
Accuracy for a K-type sensor at −100°C or less is ±4°C ±1 digit max.
Using Temperature Sensor Units
Connect the Temperature
Sensor Units.
Set the temperature ranges.
476
• Connect the Temperature Sensor Units to the
CPU Unit.
• Set the temperature unit, 2-decimal-place Mode
if required, and set the temperature input range.
Connect the temperature
sensors.
• Connect temperature sensors.
Operation in the ladder
program.
• Read temperature data stored in the input word.
Section 7-5
Temperature Sensor Units
Connecting Temperature
Sensor Units
For CP1L M-type CPU Units, a maximum of three CP1W-TS002 and CP1WTS102 Temperature Sensor Units can be connected, because each unit is
allocated four words. For CP1L L-type CPU Units, one Unit can be connected.
CP1W-20EDR1
Expansion I/O Unit
CP1L M-type CPU Unit
SYSMAC
CP1L
CP1W-8ED
Expansion I/O Unit
CP1W-TS01/TS02
Temperature Sensor Unit
IN
L1
L2/N
COM
01
00
03
02
05
04
07
09
06
08
11
10
01
00
03
02
05
04
07
06
09
11
10
08
C OM
C OM
01
03
05
07
09
11
00
02
04
06
08
10
NC
01
00
CH
IN
03
02
IN
C H 00 01 02 03 04 05 06 07
C H 00 01 02 03
08 09 10 11
08 09 10 11
20EDR1
8ED
OUT
CH
00
01
COM
02
COM
03
COM
04
COM
06
05
00
07
01
COM
03
02
04
COM
06
05
07
00 01 02 03 04 05 06 07
CH
07
00
01
02
04
05
NC
N C C OM
06
CO M C OM
03
CO M
EXP
EXP
04
C OM
06
05
07
OUT
Setting Temperature Ranges
Note
(1) Always turn OFF the power supply before setting the temperature range.
(2) Never touch the DIP switch or rotary switch during Temperature Sensor
Unit operation. Static electricity may cause operating errors.
The Temperature Sensor Unit’s DIP switch and rotary switch are used to set
the temperature unit, to select 2-decimal-place Mode is to be used, and to set
the temperature input range.
DIP Switch
Used to set the temperature
unit and the number of
decimal places used.
Rotary Switch
Used to set the
temperature input range.
Temperature input terminals
DIP Switch Settings
The DIP switch is used to set the temperature unit (°C or °F) and the number
of decimal places used.
ON
1
2
SW1
Note
Setting
1
Temperature unit
2
Number of decimal
places used (See note.)
(0.01 expression)
OFF
°C
ON
OFF
°F
Normal (0 or 1 digit after the decimal
point, depending on the input range)
ON
2-decimal-place Mode
For details on 2-decimal-place Mode, refer to Two-decimal-place Mode on
page 484.
477
Section 7-5
Temperature Sensor Units
Rotary Switch Setting
!Caution Set the temperature range according to the type of temperature sensor connected to the Unit. Temperature data will not be converted correctly if the temperature range does not match the sensor.
!Caution Do not set the temperature range to any values other than those for which
temperature ranges are given in the following table. An incorrect setting may
cause operating errors.
The rotary switch is used to set the temperature range.
Setting
CP1W-TS001/002
Input type
0
K
1
2
3
4 to F
CP1W-TS101/102
Range (°C)
−200 to 1,300
Range (°F)
−300 to 2,300
Input type
Pt100
Range (°C)
−200.0 to 650.0
0.0 to 500.0
0.0 to 900.0
JPt100
−200.0 to 650.0
Cannot be set.
J
−100 to 850
−100 to 1,500
---
0.0 to 750.0
---
0.0 to 400.0
Cannot be set.
-----
Connecting Temperature
Sensors
Range (°F)
−300.0 to
1,200.0
−300.0 to
1,200.0
Thermocouples
CP1W-TS001
Either K or J thermocouples can be connected, but both thermocouples must
be the same type and the same input range.
Input 0 Input 1
+
+
Input 0 Input 1
−
−
Temperature input 0
Temperature input 1
478
NC
NC
NC
NC
NC
NC
Cold junction compensator
NC
NC
Section 7-5
Temperature Sensor Units
CP1W-TS002
Either K or J thermocouples can be connected, but all four thermocouples
must be the same type and the same input range.
Input 0 Input 1
+
+
Input 2 Input 3
+
NC
Input 0 Input 1
−
−
Temperature input 0
NC
NC
Cold junction
compensator
Temperature input 1
Note
NC
+
Input 2 Input 3
−
−
Temperature input 2
Temperature input 3
When connecting a thermocouple input, observe the following precautions:
• Do not remove the cold junction compensator attached at the time of
delivery. If the cold junction compensator is removed, the Unit will not be
able to measure temperatures correctly.
• Each of the input circuits is calibrated with the cold junction compensator
attached to the Unit. If the Unit is used with the cold junction compensator
from other Units, the Unit will not be able to measure temperatures correctly.
• Do not touch the cold junction compensator. Doing so may result in incorrect temperature measurement.
Platinum Resistance Thermometers
CP1W-TS101
One or two Pt or JPt platinum resistance thermometers can be connected, but
both of the thermometers must be of the same type and the same input range
must be used for each.
Input 0 Input 1 Input 1
A
A
B
Input 0 Input 0 Input 1
B
B
B
Pt
NC
NC
NC
NC
NC
NC
NC
NC
Pt
Temperature input 0 Temperature input 1
479
Section 7-5
Temperature Sensor Units
CP1W-TS102
Up to four Pt100 or JPt100 platinum resistance thermometers can be connected, but all four of the thermometers must be of the same type and the
same input range must be used for each.
Input 0 Input 1 Input 1
A
A
B
Input 0 Input 0 Input 1
B
B
B
Pt
Pt
Temperature
input 0
Note
Creating a Ladder
Program
NC
Temperature
input 1
NC Input 2 Input 3 Input 3
A
A
B
Input 2 Input 2 Input 3
B
B
B
Pt
Pt
Temperature
input 2
Temperature
input 3
Do not connect anything to terminals not used for inputs.
Word Allocations
Temperature Sensor Units are allocated words in the same way as other CPseries Expansion Units or Expansion I/O Units, in order of connection. A Temperature Sensor Unit is allocated the next input words following the input
words of the CPU Unit or previous Expansion Unit or Expansion I/O Unit. Four
input words are allocated to the 2-input CP1W-TS001 or CP1W-TS101 and
four input words are allocated to the 4-input CP1W-TS002 or CP1W-TS102.
No output words are allocated.
Example 1
CP1L
Input word
addresses
CIO 0
CIO 1
Output word
addresses
CIO 100
CIO 101
CP1W-TS001/101
Temperature Sensor Unit
CIO 2
CIO 3
None
Example 2
CP1L
480
CP1W-TS002/102
Temperature Sensor Unit
Input word
addresses
CIO 0
CIO 1
CIO 2
CIO 3
CIO 4
CIO 5
Output word
addresses
CIO 100
CIO 101
None
Section 7-5
Temperature Sensor Units
Converted Temperature Data
The temperature data will be stored in the input words allocated to the Temperature Sensor Unit in 4-digit hexadecimal.
TS002/TS102
TS001/TS101
m+1
Converted temperature data from input 0
m+1
Converted temperature data from input 0
m+2
Converted temperature data from input 1
m+2
Converted temperature data from input 1
m+3
Converted temperature data from input 2
m+4
Converted temperature data from input 3
“m” is the last input word allocated to the CPU Unit, Expansion I/O Unit, or
Expansion Unit connected immediately before the Temperature Sensor Unit.
• Negative values are stored as 2’s complements.
• Data for range codes that include one digit after the decimal point are
stored without the decimal point, i.e., 10 times the actual value is stored.
Input
Data conversion examples
Unit: 1°C
K or J
850°C → 0352 hex
−200°C → FF38 hex
Unit: 0.1°C
K, J, Pt100 or
JPt100
×10
500.0°C → 5000 → 1388 hex
−20.0°C → −200 → FF38 hex
−200.0°C → −2000 → F830 hex
• If the input temperature exceeds the maximum or minimum value in the
temperature input range that has been set by ±20°C or ±20°F, the displayed value will be held.
• If the circuit is disconnected, the open-circuit detection function will operate and the converted temperature data will be set to 7FFF.
• The open-circuit detection function will be automatically cleared and normal input temperature conversion will begin automatically when the input
temperature returns to the convertible range.
Startup Operation
After power is turned ON, approximately 1 s is required for the first conversion
data to be stored in the input word. During that period, the data will be 7FFE.
Therefore, create a program as shown below, so that when operation begins
simultaneously with startup it will wait for valid conversion data.
Always ON
P_On
CMP(020)
2
#7FFE
Temperature input data
output word
(P_EQ)
1000.00
Initialization
Completed Flag
Handling Unit Errors
• CP-series Expansion Unit/Expansion I/O Unit errors are output to bits 0 to
6 of word A436. The bits are allocated from A436.00 in order starting from
the Unit nearest the CPU Unit. CP1W-TS002 and CP1W-TS102 Temperature Sensor Units are allocated two bits each. Use these flags in the program when it is necessary to detect Expansion Unit/Expansion I/O Unit
errors.
• When an error occurs, the Temperature Sensor Unit data becomes 7FFF
hex (the same as for an open-circuit detection). With an open-circuit
detection, it is not reflected in word A436.
481
Section 7-5
Temperature Sensor Units
Programming Example
1,2,3...
1. The following programming example shows how to convert the input data
from 2 temperature sensor inputs to BCD and store the result in D0 and
D1.
CP1L
Inputs
Outputs
CP1W-TS001/101
Temperature Sensor Unit
CIO 0
CIO 1
CIO 2
CIO 3
CIO 100
CIO 101
None
Always ON
P_On
Temperature unit setting:
Two-decimal-place Mode:
Input range setting:
Input 0:
Input 1:
CMP(020)
0 (°C)
0 (normal)
1 (K: 0.0 to 500.0°C)
CIO 2
CIO 3
Detects completion of input 0 initialization.
2
#7FFE
(P_EQ)
1000.00
Always ON
P_On
CMP(020)
ON when input 0 has been initialized
Detects completion of input 1 initialization.
3
#7FFE
(P_EQ)
1000.01
ON when input 1 has been initialized
1000.00 Execution condition
CMP(020)
2
#7FFF
(P_EQ)
100.00
CMP(020)
2
#1388
Detects an open-circuit alarm or Unit
error by checking converted temperature
data for the error code 7FFF.
ON when an open-circuit alarm or Unit
error has been detected for input 0.
Checks to see if the temperature data
in word 2 has exceeded 500.0°C (1388
hex without decimal point).
(P_GT)
100.01
ON for an input 0 temperature error
(P_LT)
BCD(024)
2
D0
Converts the temperature data for
input 0 to BCD and stores the result in
D0.
1000.01 Execution condition
CMP(020)
3
#7FFF
Detects an open-circuit alarm or Unit
error by checking whether the error
code 7FFF has been output
(P_EQ)
100.02
CMP(020)
3
#1388
ON when an open-circuit alarm or Unit
error has been detected for input 1.
Checks to see if the temperature data
in word 3 has exceeded 500.0°C
(1388 hex without decimal point).
(P_GT)
100.03
(P_LT)
BCD(024)
3
D1
482
ON for an input 1 temperature error
Converts the temperature data for
input 1 to BCD and stores the result in
D1.
Section 7-5
Temperature Sensor Units
2. The following programming example shows how to convert the data for
temperature input 0 to BCD and store the result in D0 and D1. “0001” is
stored in D1 when the input data is a negative value. The following system
configuration is used.
CP1L
Inputs
Outputs
CP1W-TS001/101
Temperature Sensor Unit
CIO 0
CIO 1
CIO 2
CIO 3
CIO 100
CIO 101
None
Temperature unit setting
0 (°C)
Two-decimal-place Mode
Input range setting
0 (normal)
1 (Pt100: −200.0 to 650.0°C)
Input 0
CIO 2
Programming with BCD(24) Instruction
Always ON
P_On
CMP(020)
Detects completion of input 0 initialization.
2
#7FFE
1000.00 ON when input 0 has been initialized
Execution
1000.00 condition
CMP(020)
2
Detects an open-circuit alarm or Unit
error by checking whether the error code
7FFF has been output.
#7FFF
P_EQ
P_EQ
ON when an open-circuit alarm or Unit
100.00 error has been detected for input 0.
2.15
BCD(024)
Stores positive BCD data in D0.
2
D0
MOV(021)
Stores #0000 in D1.
#0000
D1
2.15
−(410)
#0000
2
D0
When input 0 converted value is negative
(#0000 minus two's complement = actual
value)
BCD(024)
D0
Stores negative BCD data in D0.
D0
MOV(021)
#0001
D1
Stores #0001 in D1 to indicate a
negative number.
483
Section 7-5
Temperature Sensor Units
Programming with SCL2(−) Instruction
Always ON
P_On
CMP(020)
2
Detects completion of input 0
initialization.
#7FFE
1000.00 ON when initialization complete.
Execution
1000.00 condition
CMP(020)
2
Detects an open-circuit alarm or Unit
error by checking whether the error
code 7FFF has been output.
#7FFF
P_EQ
100.00 ON when an open-circuit alarm has
been detected.
P_EQ
SCL2(486)
2
D10
Parameter settings for data conversion:
D0
P_CY
MOV(021)
#0000
When the converted value is nonnegative, stores #0000 in D1.
D1
P_CY
MOV(021)
#0001
When the converted value is
negative, stores #0001 in D1.
D1
Operation
CIO 2
163 162 161 160
D1
0
0
0
Binary to BCD conversion
1/0
D0
103 102 101 100
CY
(when using SCL2 instruction)
1/0
1: Negative, 0: Non-negative
0: If data non-negative, "0000" stored in D1.
1: If data negative, "0001" stored in D1.
Two-decimal-place
Mode
Note
484
If pin 2 on the DIP switch is turned ON, values are stored to two decimal
places. In this case, temperature data is stored as 6-digit signed hexadecimal
(binary) data with 4 digits in the integer portion and 2 digits after the decimal
point. The actual data stored in memory is 100 times the actual value, i.e., the
decimal point is not indicated. Methods for handling this data are described in
this section.
When set to store values to two decimal places, temperature data as far as
two digits after the decimal point is converted to 6-digit binary data, but the
actual resolution is not 0.01°C (°F). For this reason, there may be skipping
and inaccuracies in the first digit after the decimal point (0.1). Treat any resolution above that specified for the normal data format as reference data.
Section 7-5
Temperature Sensor Units
Temperature Data Partitioning and Structure
Temperature Data (Actual Temperature x 100 Binary)
@@@@@@
Leftmost 3 Digits and Flags
15
14
13
Temperature
Leftmost/
Rightmost Flag Unit Flag
0: Leftmost
1: Rightmost
0: °C
1: °F
12
Open-circuit
Flag
Not used.
0: Normal
1: Error
Always 0
11
8 7
4
3
0
Temperature data
×165
×164
×163
Rightmost 3 Digits and Flags
15
14
13
Leftmost/
Temperature
Rightmost Flag Unit Flag
0: Leftmost
1: Rightmost
0: °C
1: °F
12
Open-circuit
Flag
Not used.
0: Normal
1: Error
Always 0
11
8 7
4
3
0
Temperature data
×162
×161
×160
Leftmost/Rightmost Flag: Indicates whether the leftmost or rightmost 3 digits are provided.
Temperature Unit Flag: Indicates whether the temperature is in °C or °F.
Open-circuit Flag:
Turns ON (1) when an open-circuit is detected. The temperature
data will be 7FF FFF if this flag is ON.
Data Conversion
Examples
Example 1
Temperature:
1,130.25°C
×100:
113025
Temperature Data: 01B981 (hexadecimal for 113025)
Leftmost 3 Digits and Flags
×165
Flags
Bits
Data
15 14 13 12
0 0 0 0
°C
Leftmost
11 to 08
0
×164
×163
07 to 04
1
03 to 00
B
Normal
0
0
1
B
Temperature
data
Flags
Rightmost 3 Digits and Flags
×162
×161
11 to 08
9
07 to 04
8
Flags
Bits
Data
15 14 13 12
1 0 0 0
Normal
°C
Rightmost
×160
0
1
8
Flags
9
8
1
Temperature
data
485
Section 7-5
Temperature Sensor Units
Example 2
Temperature:
−100.12°C
×100:
−10012
Temperature Data: FFD8E4 (hexadecimal for −10012)
Leftmost 3 Digits and Flags
×165
Flags
Bits
Data
15 14 13 12
0 0 0 0
11 to 08
F
×164
×163
07 to 04
F
03 to 00
D
Normal
°C
Leftmost
0
F
F
D
Temperature
data
Flags
Rightmost 3 Digits and Flags
×162
×161
×160
11 to 08
8
07 to 04
E
03 to 00
4
Flags
Bits
Data
15 14 13 12
1 0 0 0
Normal
°C
Rightmost
8
Flags
8
E
4
Temperature
data
Example 3
Temperature:
−200.12°F
×100:
−20012
Temperature Data: FFB1D4 (hexadecimal for −20012)
Leftmost 3 Digits and Flags
×165
Flags
Bits
Data
15 14 13 12
0 1 0 0
°F
Leftmost
11 to 08
F
×164
×163
107 to 04
F
03 to 00
B
Normal
4
F
F
B
Temperature
data
Flags
Rightmost 3 Digits and Flags
×162
Flags
Bits
Data
15 14 13 12
1 1 0 0
11 to 08
1
Normal
°F
Rightmost
486
×161
07 to 04
D
×160
03 to 00
4
C
Flags
1
D
4
Temperature
data
Section 7-5
Temperature Sensor Units
Example 4
Temperature:
Open circuit (°F)
Temperature Data: 7FFFFFFF
Leftmost 3 Digits and Flags
Flags
Bits
Data
15 14 13 12
0 1 1 0
°F
Leftmost
×165
×164
×163
11 to 08
7
07 to 04
F
03 to 00
F
6
Error
7
F
F
Temperature
data
Flags
Rightmost 3 Digits and Flags
Flags
Bits
Data
15 14 13 12
1 1 1 0
×162
×161
×160
11 to 08
F
07 to 04
F
03 to 00
F
E
Error
°F
Rightmost
Note
Flags
F
F
F
Temperature
data
(1) Leftmost digits are stored in the lower memory addresses. Treat the data
in the lower memory address as the leftmost digits when programming.
(2) Be sure that the data is read at least once every 125 ms to allow for the
CPU Unit’s cycle time and communications time. Correct data may not be
obtained if the read cycle is greater than 125 ms.
Programming Example
The following programming example shows how to use 2-decimal-place Mode
for the following PC configuration.
CPU Unit
CP1W-TS001
Temperature Sensor Unit
Inputs
CIO 0
CIO 1
Inputs
CIO 2
CIO 3
Outputs
CIO 100
CIO 101
Outputs
None
Temperature unit setting:
0 (°C)
Two-decimal-place Mode:
1 (2 digits after decimal point stored)
In this example, 100 times the temperature data for temperature input 0 is
stored in binary form in D100 to D102.
CIO 2
Temperature input 0
Leftmost data
CIO 200
Rightmost data
Bit
D100
D101
D102
15 14 13 12 11 10 9
×162
5
×161
×167
×166
×165
Always 0
Always 0
Always 0
8
7
6
×163
4
3
2
1
×160
0
×164
0
0
Temperature Unit Flag (0: °C, 1: °F)
Open-circuit Flag (0: Normal, 1: Error)
487
Section 7-5
Temperature Sensor Units
A200.11 (First Scan Flag)
MOV(021)
#0000
D102
(1)
Sets D103 and D102 to #0100 and
#0000, respectively.
MOV(021)
#0100
D103
P_On (Always ON Flag)
CMP(020)
2
#7FFE
Detects completion of input 0 initialization.
P_EQ
1000.00 ON when input 0 has been initialized.
1000.00 2.13 (open-circuit detected)
100.00
Open-circuit alarm output
2.15 (leftmost digits)
SET 02001
1000.01 2.15 (leftmost digits)
2.15 (rightmost digits)
MOV(021)
2
2000
MOVD(083) (3)
2
#0020
2001
(2)
Leftmost digits moved to CIO 2000.
Leftmost and rightmost digits
rearranged and moved to CIO 2002
and CIO 2001.
MOVD(083) (4)
2000
#0300
2001
MOVD(083) (5)
2000
#0011
2002
RSET 100.01
SET 1000.02
1000.02 2002.07 (non-negative data)
BCDL(059)
2001
D100
2002.07 (negative data)
−L(411)
D102
2001
H0
BCDL(059)
H0
D100
MOVD(083)
#0008
#0300
D101
RSET1000.02
488
Data rearrangement completed.
(6)
If the temperature data is non-negative, the
binary data in CIO 2002 and CIO 2001 is
converted to BCD and placed in D101 and
D100.
(7)
If the temperature data is negative, the 2's
complement data in CIO 2002 and CIO
2001 is converted to binary data
representing the absolute value of the
temperature input and placed in H1 and H0.
(8)
The binary data in H1 and H0 is
converted to BCD and placed in D101
and D100.
(9)
"1" is written to the bit in D101 indicating
negative data.
Section 7-5
Temperature Sensor Units
Description of Operation
CIO 2: Leftmost 3 digits of temperature data
CIO 2000
0
165
164 163
(2)
0
165
164 163
CIO 2: Rightmost 3 digits of temperature data
162
1
161 161
(3)
(4)
(5)
CIO 2002 0
D101
0/8
0 165
164
106 105 104
CIO 2001 164 163 161 160
D100
103 102 101 100
(9) If temperature data is negative, "8" is written here.
(1) #0100
D103
−
(1) #0000
1
0
0
CIO 2002 2's complement data
(7)
H1
Binary
subtraction
7-5-2
0
0
0 165
164
D102
(6)
If the temperature data is
non-negative, binary data is
converted to BCD data.
0
0
0
(8)
If the temperature data is negative,
binary data is converted to BCD data.
0
CIO 2001 2's complement data
H0
163 162 161 160
CP1W-TS003 Temperature Sensor Units
CP1W-TS003 Temperature Sensor Unit provides up to four input points.
The inputs can be from thermocouples or analog inputs.
CP1W-TS003 Temperature Sensor Unit is allocated four input words, so no
more than three Units can be connected.
Part Names
Temperature Sensor Units:
CP1W-TS003
(2) DIP Switch
(4) Expansion Connector
(3) Expansion I/O
Connector Cable
(1) Temperature Sensor or Analog Input Terminals
(Terminal block is not removable)
(1) Temperature Sensor Input Terminals
Used to connect temperature sensors such as thermocouples or analog
inputs.
(2) DIP Switch
Used to set the input type (temperature or analog input), the input thermocouple type (K or J) and the temperature unit (°C or °F). Make the setting according to the specifications of the temperature sensors or analog
inputs that are connected.
489
Section 7-5
Temperature Sensor Units
(3) Expansion I/O Connecting Cable
Connected to the expansion connector of a CP1L CPU Unit or a CPseries Expansion Unit or Expansion I/O Unit.The cable is included with
the Temperature Sensor Unit and cannot be removed.
Note
Do not touch the cables during operation. Static electricity may
cause operating errors.
(4) Expansion Connector
Used for connecting CP-series Expansion Units or Expansion I/O Units.
Main Specifications
Item
Temperature sensors
CP1W-TS003
Thermocouples or Analog input (See note1.)
Number of inputs
Switchable between K and J, but same type must be used for all
inputs.
4
Allocated input words
Max. number of Units
4
3
Accuracy at 25°C
Thermocouple inputs
(The larger of ±0.5% of converted value or ±2°C) ±1 digit max.
(See note2.)
Analog voltage inputs
Analog current inputs
0.5% full scale
0.6% full scale
Thermocouple inputs
(The larger of ±1% of converted value or ±4°C) ±1 digit max.
(See note3.)
Analog voltage inputs
Analog current inputs
1.0% full scale
1.2% full scale
Thermocouple inputs
K: −200.0 to 1300.0°C or −300.0 to 2300.0°F
J: −100.0 to 850.0°C or −100.0 to 1500.0°F
Analog voltage inputs
Analog current inputs
0 to 10V/1 to 5V
4 to 20mA
Resolution
Thermocouple inputs
Analog inputs
0.1°C or 0.1°F
1/12000 (full scale)
Max. rated input
Analog voltage inputs
Analog current inputs
±15V
±30mA
External input impedance
Analog voltage inputs
Analog current inputs
1MΩ min.
250 Ω
Accuracy at 0 to 55 °C
Input signal range
Open-circuit detection function
Averaging function
Supported
Unsupported
Conversion time
Converted temperature data
250 ms for 4 input points
16-bit binary data (4-digit hexadecimal)
2-decimal-place mode is not supported
Converted AD data
Isolation
16-bit binary data (4-digit hexadecimal)
Photocouplers between any two input signals
Current consumption
5 VDC: 70 mA max., 24 VDC: 30 mA max.
Note
(1) Only last two channels can be used as analog input.
(2) Accuracy for a K-type sensor at −100°C or less is ±4°C ±1 digit max.
(3) Accuracy for a K-type sensor at −100°C or less is ±10°C ±1 digit max.
490
Section 7-5
Temperature Sensor Units
Using Temperature Sensor Units
Connect the Temperature
Sensor Units.
• Set the input type (temperature or analog input),
the input thermocouple type (K or J) and the
temperature unit (˚C or ˚F).
Set the temperature or
analog ranges.
Connecting Temperature
Sensor Units
Connect the temperature
sensors or analog devices.
• Connect temperature sensors or analog devices.
Operation in the ladder
program.
• Read converted data stored in the input words.
For CP1L M-type CPU Units, a maximum of three CP1W-TS003 Temperature
Sensor Units can be connected, because each unit is allocated four words.
For CP1L L-type CPU Units, one Unit can be connected.
CP1L M-type CPU Unit
SYSMAC
CP1L
• Connect the Temperature Sensor Units to the
CPU Unit.
CP1W-20EDR1
Expansion I/O Unit
CP1W-TS003
CP1W-8ED
Expansion I/O Unit Temperature Sensor Unit
IN
L1
L2/N
COM
01
00
03
02
05
04
07
06
09
08
11
10
01
00
03
02
05
04
07
06
09
08
11
C O M 01
03
00
02
C O M 01
11
03
05
07
09
00
02
04
06
08
10
NC
10
CH
IN
IN
C H 00 01 02 03 04 05 06 07
C H 00 01 02 03
08 09 10 11
08 09 10 11
20EDR1
8ED
OUT
CH
00
01
COM
02
COM
03
COM
04
COM
06
05
00
07
01
COM
03
02
04
COM
00 01 02 03 04 05 06 07
CH
00
01
02
04
05
07
NC
NC COM COM COM
03
COM
06
06
05
07
EXP
EXP
04
COM
06
05
07
OUT
Setting Temperature or
Analog Ranges
Note
(1) Always turn OFF the power supply before setting the temperature or analog range.
(2) Never touch the DIP switch during Temperature Sensor Unit operation.
Static electricity may cause operating errors.
DIP Switch Settings
!Caution Set the temperature range according to the type of temperature sensor connected to the Unit. Temperature data will not be converted correctly if the temperature range does not match the sensor.
!Caution Do not set the temperature range to any values other than those for which
temperature ranges are given in the following table. An incorrect setting may
cause operating errors.
The DIP switch is used to set the input type (temperature or analog input), the
input thermocouple type (K or J) and the temperature unit (°C or °F).
SW 1
ON
2
3
4
5 6
OFF
491
Section 7-5
Temperature Sensor Units
SW
Thermocouple type of
temperature sensor
2
Temperature unit
J
OFF
ON
K
°F
OFF
°C
NC
4
Input type selection for
the third input (Input 2)
ON
OFF
Analog input
Thermocouple
5
Input type selection for ON
the fourth input (Input 3) OFF
Analog input
Thermocouple
6
Analog input signal
range
1 to 5V/4 to 20mA
0 to 10V
K
J
Connecting Temperature
Sensors
ON
3
Input type
Note
Setting
1
ON
OFF
Temperature input
Range (°C)
Range (°F)
−200.0 to 1300.0
−100.0 to 850.0
−300.0 to 2300.0
−100.0 to 1500.0
Voltage
Current
0 to 10V/1 to 5V
4 to 20mA
Fahrenheit temperature uses the following equation to convert the temperature unit from Celsius, but the temperature input range is different between
Fahrenheit and Celsius.
Fahrenheit temperature (°F) = Celsius temperature (°C) x 1.8 + 32
Thermocouples
Either K or J thermocouples can be connected, but all four thermocouples
must be the same type and the same input range. Only last two channels can
be used as analog inputs.
LOOP2+ LOOP3+
V IN2
V IN3
LOOP0+ LOOP1+
LOOP0− LOOP1−
Temperature input 0
Temperature input 1
Note
Analog input
Input type
Range
NC
NC
Cold junction
compensator
I IN2
I IN3
LOOP2− LOOP3−
COM2 COM3
Temperature input 2
Temperature input 3
When connecting a thermocouple input, observe the following precautions:
• Do not remove the cold junction compensator attached at the time of
delivery. If the cold junction compensator is removed, the Unit will not be
able to measure temperatures correctly.
• Each of the input circuits is calibrated with the cold junction compensator
attached to the Unit. If the Unit is used with the cold junction compensator
from other Units, the Unit will not be able to measure temperatures correctly.
• Do not touch the cold junction compensator. Doing so may result in incorrect temperature measurement.
492
Section 7-5
Temperature Sensor Units
Analog Inputs
Last two channels can be used as analog inputs, but two of the analog inputs
must be the same range.
LOOP2+ LOOP3+
V IN2
V IN3
LOOP0+ LOOP1+
LOOP0− LOOP1−
Temperature input 0
NC
NC
Cold junction
compensator
Temperature input 1
I IN2
I IN3
LOOP2− LOOP3−
COM2 COM3
Analog
device
with
current
output
Analog
device
with
voltage
output
Analog
input 2
Analog
input 3
Wiring for Analog Inputs
2-core shielded
+ twisted-pair cable V IN
Analog
device with
voltage
output
I IN
−
COM
+
Analog
Input 2, 3
Analog
device with
current
output
2-core shielded
twisted-pair cable
I IN
−
COM
Analog
Input 2, 3
FG
FG
Note
V IN
(1) When an input is not being used, short the + and – terminals.
(2) Separate wiring from power lines (AC power supply lines, high-voltage
lines, etc.)
(3) When there is noise in the power supply line, install a noise filter on the
input section and the power supply.
Analog Input Signal
Ranges
When the input exceeds the specified range, the AD converted data will be
fixed at either the lower limit or upper limit.
0 to 10 V
The 0 to 10 V range corresponds to the hexadecimal values 0000 to 2EE0 (0
to 12000). The entire data range is FDA8 to 3138 (−600 to 12600). A negative
voltage is expressed as a two’s complement.
Converted Data
Hexadecimal (Decimal)
3138 (12600)
2EE0 (12000)
−0.5 V 0000 (0)
0V
10 V 10.5 V
FDA8 (−600)
493
Section 7-5
Temperature Sensor Units
1 to 5 V
The 1 to 5 V range corresponds to the hexadecimal values 0000 to 2EE0 (0 to
12000). The entire data range is FDA8 to 3138 (−600 to 12600). Inputs
between 0.8 and 1 V are expressed as two’s complements. If the input falls
below 0.8 V, open-circuit detection will activate and converted data will be
8000.
Converted Data
Hexadecimal (Decimal)
3138 (12600)
2EE0 (12000)
0000 (0)
0.8 V
1V
5 V 5.2 V
FDA8 (−600)
4 to 20 mA
The 4 to 20 mA range corresponds to the hexadecimal values 0000 to 2EE0
(0 to 12000). The entire data range is FDA8 to 3138 (−600 to 12600). Inputs
between 3.2 and 4 mA are expressed as two’s complements. If the input falls
below 3.2 mA, open-circuit detection will activate and converted data will be
8000.
Converted Data
Hexadecimal (Decimal)
3138 (12600)
2EE0 (12000)
0000 (0)
3.2 mA
0 mA
4 mA
20 mA 20.8 mA
FDA8 (−600)
Open-circuit Detection
Function for Temperature
If the circuit is disconnected, the open-circuit detection function will operate
and the converted temperature data will be set to 7FFF.
Open-circuit Detection
Function for Analog
Inputs
The open-circuit detection function is activated when the input range is set to
1 to 5 V and the voltage drops below 0.8 V, or when the input range is set to 4
to 20 mA and the current drops below 3.2 mA. When the open-circuit detection function is activated, the converted data will be set to 8,000.
The time for enabling or clearing the open-circuit detection function is the
same as the time for converting the data. If the input returns to the convertible
range, the open-circuit detection is cleared automatically and the output
returns to the normal range.
Creating a Ladder
Program
494
Word Allocations
Temperature Sensor Units are allocated words in the same way as other CPseries Expansion Units or Expansion I/O Units, in order of connection. A Temperature Sensor Unit is allocated the next input words following the input
words of the CPU Unit or previous Expansion Unit or Expansion I/O Unit. Four
input words are allocated to CP1W-TS003.
Section 7-5
Temperature Sensor Units
Example
CP1L
CP1W-TS003
Temperature Sensor Unit
Input word
addresses
CIO 0
CIO 1
CIO 2
CIO 3
CIO 4
CIO 5
Output word
addresses
CIO 100
CIO 101
None
Converted Temperature Data
The converted temperature value will be stored in the input words allocated to
the Temperature Sensor Unit in 4-digit hexadecimal.
m+1
Converted temperature data from input 0
m+2
Converted temperature data from input 1
m+3
Converted temperature data from input 2
m+4
Converted temperature data from input 3
“m” is the last input word allocated to the CPU Unit, Expansion I/O Unit, or
Expansion Unit connected immediately before the Temperature Sensor Unit.
• Negative values are stored as 2’s complements.
• Data for range codes that include one digit after the decimal point are
stored without the decimal point, i.e., 10 times the actual value is stored.
Unit: 0.1°C
Input
K or J
×10
Data conversion examples
500.0°C → 5000 → 1388 hex
−20.0°C → −200 → FF38 hex
−200.0°C → −2000 → F830 hex
• If the input temperature exceeds the maximum or minimum value in the
temperature input range that has been set by ±20°C or ±20°F, the displayed value will be held.
• If the circuit is disconnected, the open-circuit detection function will operate and the converted temperature data will be set to 7FFF.
• The open-circuit detection function will be automatically cleared and normal input temperature conversion will begin automatically when the input
temperature returns to the convertible range.
Converted Analog Data
m+3
Converted analog data from input 2
m+4
Converted analog data from input 3
“m” is the last input word allocated to the CPU Unit, Expansion I/O Unit, or
Expansion Unit connected immediately before the Temperature Sensor Unit.
495
Section 7-5
Temperature Sensor Units
Startup Operation
After power is turned ON, approximately 1 s is required for the first conversion
data to be stored in the input word. During that period, the data will be 7FFE.
Therefore, create a program as shown below, so that the ladder can start to
operate with valid conversion data in input words.
Always ON
P_On
CMP(020)
Temperature input data
output word
2
#7FFE
(P_EQ)
Initialization
Completed Flag
1000.00
Programming Example
The following programming example shows how to store the input data of
CP1W-TS003 (4 inputs) in D0 to D3, and W10.00 to W10.03 turn ON at the
time of open-circuit detection.
CP1L
CP1W-TS003
Temperature Sensor Unit
Input word
addresses
CIO 0
CIO 1
CIO 2
CIO 3
CIO 4
CIO 5
Output word
addresses
CIO 100
CIO 101
None
Temperature unit setting: OFF(ºC)
Input range setting
Input 0: Thermocouple K(CIO2)
Input 1: Thermocouple K(CIO3)
Input 2: Thermocouple K(CIO4)
Input 3: Analog input 1 to 5V(CIO5)
DIP Switch Setting
SW1
SW2
OFF
OFF
K
°C
SW3
SW4
NC
OFF
Thermocouple
SW5
SW6
ON
ON
Analog
1 to 5V/4 to 20mA
Wiring Diagram
LOOP2+ LOOP3+
V IN2
V IN3
LOOP0+ LOOP1+
LOOP0− LOOP1−
Temperature input 0
Temperature input 1
NC
NC
Cold junction
compensator
I IN2
I IN3
LOOP2− LOOP3−
COM2 COM3
Temperature
input 2
Analog
device
with
voltage
output
Analog
input 3
(1 to 5 V)
496
Section 7-5
Temperature Sensor Units
Detects initialization complete
<>(305)
MOV(021)
#7FFE
2
2
D0
W10.00
=(300)
Stores input 0’s data in D0.
ON when an open-circuit alarm has been
detected for thermocouples input 2.
#7FFF
2
<>(305)
MOV(021)
#7FFE
3
3
D1
W10.01
=(300)
Stores input 1’s data in D1.
ON when an open-circuit alarm has been
detected for thermocouples input 2.
#7FFF
3
<>(305)
MOV(021)
#7FFE
4
4
D2
W10.02
=(300)
Stores input 2’s data in D2.
ON when an open-circuit alarm has been
detected for thermocouples input 2.
#7FFF
4
<>(305)
MOV(021)
#7FFE
5
5
D3
=(300)
W10.03
Stores input 3’s data in D3.
ON when an open-circuit alarm has been
detected for analog input 3.
#8000
5
7-5-3
CP1W-TS004 Temperature Sensor Units
CP1W-TS004 Temperature Sensor Unit provide up to twelve input points.
The inputs can be from thermocouples.
CP1W-TS004 Temperature Sensor Unit is allocated two input words and one
output word, so no more than seven Units can be connected.
Part Names
Temperature Sensor Units:
CP1W-TS004
(3) Expansion I/O
Connector Cable
(1) Temperature Sensor Input Terminals
(Terminal block is not removable)
(4) Expansion Connector
(2) DIP Switch
497
Section 7-5
Temperature Sensor Units
(1) Temperature Sensor Input Terminals
Used to connect temperature sensors such as thermocouples.
(2) DIP Switch
Used to set the temperature unit (°C or °F) and the temperature input
range. Make the setting according to the specifications of the temperature sensors that are connected.
(3) Expansion I/O Connecting Cable
Connected to the expansion connector of a CP1L CPU Unit or a CPseries Expansion Unit or Expansion I/O Unit.The cable is included with
the Temperature Sensor Unit and cannot be removed.
Note
Do not touch the cables during operation. Static electricity may
cause operating errors.
(4) Expansion Connector
Used for connecting CP-series Expansion Units or Expansion I/O Units.
Main Specifications
Item
CP1W-TS004
Temperature sensors
Thermocouples
Number of inputs
Switchable between K and J, but same type must be used for all
inputs.
12
Allocated input words
Allocated output words
2
1
Accuracy
25°C
(The larger of ±0.5% of converted value or ±2°C) ±1 digit max.
(See note1.)
0 to 55°C
(The larger of ±1% of converted value or ±4°C) ±1 digit max.
(See note2.)
Conversion time
Converted temperature data
Isolation
500 ms for 12 input points
16-bit binary data (4-digit hexadecimal)
2-decimal-place mode is not supported
Photocouplers between any two input signals
Current consumption
5 VDC: 80 mA max., 24 VDC: 50 mA max.
Note
(1) Accuracy for a K-type sensor at −100°C or less is ±4°C ±1 digit max.
(2) Accuracy for a K-type sensor at −100°C or less is ±10°C ±1 digit max.
Using Temperature Sensor Units
Connect the Temperature
Sensor Units.
Set the temperature ranges.
498
• Connect the Temperature Sensor Units to the
CPU Unit.
• Set the temperature unit and set the temperature
input range.
Connect the temperature
sensors.
• Connect temperature sensors.
Operation in the ladder
program.
• Read converted data stored in the input words.
Section 7-5
Temperature Sensor Units
Connecting Temperature
Sensor Units
A maximum of seven CP1W-TS004 Temperature Sensor Units can be connected, because each unit is allocated two input words and one output word.
CP1L M-type CPU Unit
SYSMAC
CP1L
CP1W-20EDR1
Expansion I/O Unit
CP1W-8ED
Expansion I/O Unit
CP1W-TS004
Temperature Sensor Unit
IN
L1
L2/N
COM
01
00
03
02
05
04
07
06
09
08
11
10
01
00
03
02
05
04
07
06
09
08
11
C OM
C OM
01
03
05
07
09
11
00
02
04
06
08
10
NC
10
01
00
CH
IN
03
02
IN
C H 00 01 02 03 04 05 06 07
C H 00 01 02 03
08 09 10 11
08 09 10 11
20EDR1
8ED
OUT
CH
00
01
COM
02
COM
03
COM
04
COM
06
05
00
07
01
COM
03
02
04
COM
00 01 02 03 04 05 06 07
CH
00
01
02
04
05
07
NC
N C C OM
CO M C OM
03
CO M
06
06
05
07
EXP
EXP
04
C OM
06
05
07
OUT
Setting Temperature Ranges
Note
(1) Always turn OFF the power supply before setting the temperature range.
(2) Never touch the DIP switch during Temperature Sensor Unit operation.
Static electricity may cause operating errors.
DIP Switch Settings
!Caution Set the temperature range according to the type of temperature sensor connected to the Unit. Temperature data will not be converted correctly if the temperature range does not match the sensor.
!Caution Do not set the temperature range to any values other than those for which
temperature ranges are given in the following table. An incorrect setting may
cause operating errors.
SW2
SW1
The DIP switch is used to set the temperature unit and to set the temperature
input range.
ON
OFF
SW
Setting
1
Input type
ON
OFF
J
K
2
Temperature unit
ON
OFF
°F
°C
Temperature input
Note
Input type
K
Range (°C)
−200.0 to 1300.0
Range (°F)
−300.0 to 2300.0
J
−100.0 to 850.0
−100.0 to 1500.0
Fahrenheit temperature uses the following equation to convert the temperature unit from Celsius, but the temperature input range is different between
Fahrenheit and Celsius .
Fahrenheit temperature (°F) = Celsius temperature (°C) × 1.8 + 32
499
Section 7-5
Temperature Sensor Units
Connecting Temperature
Sensors
Thermocouples
Either K or J thermocouples can be connected, but all twelve thermocouples
must be the same type and the same input range.
Temperature input 1
Cold junction
compensator
Temperature input 0
Note
Temperature input 11
When connecting a thermocouple input, observe the following precautions:
• Do not remove the cold junction compensator attached at the time of
delivery. If the cold junction compensator is removed, the Unit will not be
able to measure temperatures correctly.
• Each of the input circuits is calibrated with the cold junction compensator
attached to the Unit. If the Unit is used with the cold junction compensator
from other Units, the Unit will not be able to measure temperatures correctly.
• Do not touch the cold junction compensator. Doing so may result in incorrect temperature measurement.
• Use the thermocouple with metallic shield and connect the shield to
ground.
Open-circuit Detection
Function for Temperature
If the circuit is disconnected, the open-circuit detection function will operate
and the converted temperature data will be set to 7FFF.
Creating a Ladder
Program
Word Allocations
Temperature Sensor Units are allocated words in the same way as other CPseries Expansion Units or Expansion I/O Units, in order of connection. A Temperature Sensor Unit is allocated the next input words following the input
words of the CPU Unit or previous Expansion Unit or Expansion I/O Unit. Two
input words and one output word are allocated to CP1W-TS004.
Example
CP1L
Input word
addresses
CIO 0
CIO 1
Output word
addresses
CIO 100
CIO 101
CP1W-TS004
Temperature Sensor Unit
CIO 2
CIO 3
CIO 102
Temperature Data Read Operation
There are 12 temperature input data to be read, but only two input words are
allocated to CP1W-TS004. The operation is shown as the following.
500
Section 7-5
Temperature Sensor Units
Input Word
m+1
m+2
Response. Input words stored in CIO m+2
Temperature data of the specified input word
Output Word
n+1
Read command data (input word specified)
Read/Response Command and Temperature Data
Output
Word
Input Word
Command
n+1
m+1
m+2
Read
Response
Temperature data
command command (4-digit hexadecimal)
Read temperature data from input 0 #9901
9901
Input 0 temperature data
Read temperature data from input 1 #9902
Read temperature data from input 2 #9903
9902
9903
Input 1 temperature data
Input 2 temperature data
Read temperature data from input 3 #9904
Read temperature data from input 4 #9905
9904
9905
Input 3 temperature data
Input 4 temperature data
Read temperature data from input 5 #9906
Read temperature data from input 6 #9907
9906
9907
Input 5 temperature data
Input 6 temperature data
Read temperature data from input 7 #9908
Read temperature data from input 8 #9909
9908
9909
Input 7 temperature data
Input 8 temperature data
Read temperature data from input 9 #990A
Read temperature data from input 10 #990B
990A
990B
Input 9 temperature data
Input 10 temperature data
Read temperature data from input 11 #990C
Others
Others
990C
Input 11 temperature data
No response for other commands
• Negative values are stored as 2’s complements.
• The converted temperature data CIO m+2 is stored in 16-bit binary data
(4-digit hexadecimal).
• Data for range codes that include one digit after the decimal point are
stored without the decimal point, i.e., 10 times the actual value is stored.
Input
Unit: 0.1°C
K or J
Data conversion examples
×10
500.0°C → 5000 → 1388 hex
−20.0°C → −200 → FF38 hex
−200.0°C → −2000 → F830 hex
• If the input temperature exceeds the maximum or minimum value in the
temperature input range that has been set by ±20°C or ±20°F, the displayed value will be held.
• If the circuit is disconnected, the open-circuit detection function will operrate and the converted temperature data will be set to 7FFF.
• The open-circuit detection function will be automatically cleared and normal input temperature conversion will begin automatically when the input
temperature returns to the convertible range.
501
Section 7-5
Temperature Sensor Units
Creating Ladder Program
� Write temperature data command
Write temperature data command which read temperature data from input
word to CIO n+1.
� Response confirmation
After CP1W-TS004 receives CIO n+1 read command and CP1W-TS004’s
internally specified input temperature data is ready, the value which is the
same as the read command will be stored in CIO m+1. The temperature
data will be stored in CIO m+2 at the same time.
� Read temperature data
Store the temperature data from CIO m+2 in DM area.
The power is ON
CIO n+1
�Write temperature data
command
CIO m+1
�Response confirmation
Read command
and response are
unmatched
Read command
matches response
CIO m+2
�Read temperature data
Store in DM area
Response
CIO m+1
7FFE
Temperature data
CIO m+2
7FFE
#9901
Input 1
temperature data
Approx. 1s
Read command
CIO n+1
0000
Power ON
Note
#9902
Input 2
temperature data
Approx. 2ms
#9901
Write input 1
temperature data
command
2ms max. from writing read
command, response, to reading
temperature data
#9902
#9903
Write input 2
temperature data
command
(1) It takes about 2ms maximum until it is reflected to CIO m+1 and m+2 from
writing the read command to CIO n+1.
(2) It takes about 1s after the power is turned ON, till a read command initial
processing of CP1W-TS004 is completed, so a response to the read
command after power ON takes only about 1s. After the power is turned
ON, create a ladder program 1s later due to its control by temperature data.
(3) When writing a command other than that specified in the temperature
data read command, CIO m+1 and m+2 hold the previous value.
502
Section 7-5
Temperature Sensor Units
Programming Example
The temperature data of CP1W-TS004 (12 inputs, input type is J type and
temperature unit is °C) is stored in D0 to D11.
When it occurs open-circuit alarm, W10.00 to W10.11 is ON.
CP1L
CP1W-TS004
Temperature Sensor Unit
Input word
addresses
CIO 0
CIO 1
CIO 2
CIO 3
Output word
addresses
CIO 100
CIO 101
CIO 102
Temperature Data Storage Address
Input word
Input 0
Read command
CIO n+1
#9901
Temperature data Open-circuit alarm
storage address
D0
W0.00
Input 1
Input 2
#9902
#9903
D1
D2
W0.01
W0.02
Input 3
Input 4
#9904
#9905
D3
D4
W0.03
W0.04
Input 5
Input 6
#9906
#9907
D5
D6
W0.05
W0.06
Input 7
Input 8
#9908
#9909
D7
D8
W0.07
W0.08
Input 9
Input 10
#990A
#990B
D9
D10
W0.09
W0.10
Input 11
#990C
D11
W0.11
503
Section 7-5
Temperature Sensor Units
First Cycle ON Flag
SET
Start to read temperature data.
W0.00
W0.00
MOV(021)
#9901
Write input 0’s read command
(#9901) to CIO 102 (CIO n+1).
102
=(300)
MOV(021)
#9901
3
2
D0
=(300)
W10.00
If CIO 2 (CIO m+1) and read
command are matched, store
the temperature data (CIO
m+2) to D0.
Read Input 0’s
temperature data
W10.00 turns ONat the time of
open-circuit detection (7FFF).
#7FFF
3
SET
W0.01
RSET
W0.00
W0.01
MOV(021)
#9902
102
MOV(021)
=(300)
#9902
3
2
D1
=(300)
Read Input 1’s
temperature data
W10.01
#7FFF
3
SET
W0.02
RSET
W0.01
W0.02
MOV(021)
#9903
102
MOV(021)
=(300)
#9903
3
2
D2
=(300)
W10.02
#7FFF
3
SET
W0.03
RSET
W0.02
504
Read Input 2’s
temperature data
Section 7-5
Temperature Sensor Units
W0.03
MOV(021)
#9904
102
MOV(021)
=(300)
#9904
3
2
D3
=(300)
Read Input 3’s
temperature data
W10.03
#7FFF
3
SET
W0.04
RSET
W0.03
W0.04
MOV(021)
#9905
102
MOV(021)
=(300)
#9905
3
2
D4
=(300)
Read Input 4’s
temperature data
W10.04
#7FFF
3
SET
W0.05
RSET
W0.04
W0.05
MOV(021)
#9906
102
MOV(021)
=(300)
#9906
3
2
D5
=(300)
Read Input 5’s
temperature data
W10.05
#7FFF
3
SET
W0.06
RSET
W0.05
505
Section 7-5
Temperature Sensor Units
W0.06
MOV(021)
#9907
102
MOV(021)
=(300)
#9907
3
2
D6
=(300)
Read Input 6’s
temperature data
W10.06
#7FFF
3
SET
W0.07
RSET
W0.06
W0.07
MOV(021)
#9908
102
MOV(021)
=(300)
#9908
3
2
D7
=(300)
Read Input 7’s
temperature data
W10.07
#7FFF
3
SET
W0.08
RSET
W0.07
W0.08
MOV(021)
#9909
102
MOV(021)
=(300)
#9909
3
2
D8
=(300)
W10.08
#7FFF
3
SET
W0.09
RSET
W0.08
506
Read Input 8’s
temperature data
Section 7-5
Temperature Sensor Units
W0.09
MOV(021)
#990A
102
MOV(021)
=(300)
#990A
3
2
D9
=(300)
Read Input 9’s
temperature data
W10.09
#7FFF
3
SET
W0.10
RSET
W0.09
W0.10
MOV(021)
#990B
102
MOV(021)
=(300)
#990B
3
2
D10
=(300)
Read Input 10’s
temperature data
W10.10
#7FFF
3
SET
W0.11
RSET
W0.10
W0.11
MOV(021)
#990C
102
MOV(021)
=(300)
#990C
3
2
D11
=(300)
Read Input 11’s
temperature data
W10.11
#7FFF
3
SET
W0.00
RSET
W0.11
507
Section 7-6
CompoBus/S I/O Link Units
7-6
CompoBus/S I/O Link Units
The CP1L can function as a slave to a CompoBus/S Master Unit (or SRM1
CompoBus/S Master Control Unit) when a CP1W-SRT21 CompoBus/S I/O
Link Unit is connected. The CompoBus/S I/O Link Unit establishes an I/O link
of 8 inputs and 8 outputs between the Master Unit and the PLC. Up to three
CompoBus/S I/O Link Units, including other Expansion I/O Units, can be connected to a CP1L CPU Unit.
CompoBus/S Master Unit
(or SRM1 CompoBus/S
Master Control Unit)
CP1W-SRT21
CompoBus/S
I/O Link Unit
CP1L CPU Unit
SYSMAC
CP1L
ON
IN
1 2
L1
L2/N
COM
01
00
03
02
05
04
07
06
09
08
11
10
01
00
03
02
05
04
07
06
09
08
11
10
S
3 4 5 6
No.
COMM
ERR
SRT21
EXP
00
01
COM
02
COM
03
COM
04
COM
06
05
00
07
01
COM
03
02
04
COM
06
05
BD H
NC( BS+)
BD L NC( BS-) N C
07
OUT
Special flat cable or VCTF cable
From the standpoint of the CP1L CPU Unit, the 8 input bits and 8 output bits
allocated to the CompoBus/S I/O Link Unit are identical to input and output
bits allocated to Expansion I/O Units even though the CompoBus/S I/O Link
Unit does not control actual inputs and outputs. The input and output bits allocated to the CompoBus/S I/O Link Unit are one side of an I/O link between the
slave CPU Unit and the CPU Unit to which the Master Unit is connected.
Master PLC (CS Series)
CPU Unit
I/O memory
Output
CIO 2000
Input
CIO 2004
CP1L
CompoBus/S
Master Unit
Unit No. 0
I/O memory
8 bits
8 bits Input
CIO 2
8 bits
8 bits Output
CIO 102
CompoBus/S
I/O Link Unit
Node
number: 0
Specifications
508
Model number
Master/slave
CP1W-SRT21
CompoBus/S Slave
Number of I/O points
Number of words allocated in
CPU Unit I/O memory
8 input points, 8 output points
1 input word, 1 output word
(Allocated in the same way as Expansion Units and
Expansion I/O Units.)
Node number setting
Set using the DIP switch
(Set before turning on the CPU Unit’s power supply.)
Section 7-6
CompoBus/S I/O Link Units
LED Indicators
Indicator
Name
COMM
Communications
Indicator
Color
Yellow
Meaning
ON: Communications in progress.
OFF: Communications stopped or error
has occurred.
ERR
Red
ON:
Error indicator
A communications error has
occurred.
OFF: Indicates normal communications
or stand-by.
CP1W-SRT21 CompoBus/S I/O Link Unit
ON
1
S
(2) DIP Switch
2 3 4 5 6
No.
(3) LED Indicators
COMM
ERR
SRT21
(5) Expansion Connector
EXP
BD
BD
NC(BS+)
NC(BS-) NC
(1) CompoBus/S Terminals
(Terminal Block is not
removable)
(4) Expansion I/O Connecting Cable
(1) CompoBus/S Terminals
The following CompoBus/S terminals are provided: CompoBus/S communications data high/low terminals, NC terminals for communications
power supply plus (+) and minus (−), and an NC terminal. (Power is supplied internally for this Unit, so the NC terminals for communications
power supply can be used as relay terminals.)
(2) DIP Switch
Used to specify the node number for the CompoBus/S I/O Link Unit.
(Refer to the following table.)
Contents
Pin labels
1
2
4
8
DR
HOLD
NODE NUMBER
1
2
4
8
ON
SW1
Node Number
Setting
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
8
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
SW1
4 2
0 0
0 0
0 1
0 1
1 0
1 0
1 1
1 1
0 0
0 0
0 1
0 1
1 0
1 0
1 1
1 1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
1 = ON, 0 = OFF
Note: The long-distance communications
mode can be used only when one of
the following Master Units is
connected: C200HW-SRM21-V1,
CQM1-SRM21-V1, or [email protected]
ON
OFF
HOLD ON
OFF
DR
Long-distance communications mode (See note.)
High-speed communications mode
Retain inputs after a communications error.
Clear inputs after a communications error.
509
Section 7-6
CompoBus/S I/O Link Units
(3) LED Indicators
Used to show the CompoBus/S communications status.
Indicator
Name
COMM
Communications
indicator
Color
Yellow
Meaning
ON: Communications in progress.
OFF: Communications stopped or error
has occurred.
ERR
Red
ON:
Error indicator
A communications error has
occurred.
OFF: Indicates normal communications
or stand-by.
(4) Expansion I/O Connecting Cable
Connected to the expansion connector of a CP1L CPU Unit or a Expansion Unit or Expansion I/O Unit. The cable is provided with the CompoBus/S I/O Link Unit and cannot be removed.
Note
Do not touch the cables during operation. Static electricity may
cause operating errors.
(5) Expansion Connector
Used to connect Expansion Units or Expansion I/O Units.
Operating Procedure
• Connect the CompoBus/S I/O Link Unit.
Connect the Unit.
• The node number should be a unique number between
0 and 15.
• Use the DIP switch to set the CompoBus/S I/O Link
Unit fs node number, communications mode, and the
status of output data when a communications error
occurs.
Determine the node
address of the
CompoBus/S I/O Link Unit
and set the DIP switch.
• Connect the CompoBus/S I/O Link Unit to a
CompoBus/S transmission path.
Wire the CompoBus/S
transmission path.
Connecting the
CompoBus/S I/O Link Unit
CompoBus/S I/O Link Units are connected to the CP1L CPU Unit. For CP1L
M-type CPU Units, up to three Units can be connected, including any other
Expansion Units and Expansion I/O Units. The Units can be connected in any
order from the CPU Unit. For CP1L L-type CPU Units, one Unit can be connected.
CompoBus/S I/O Link Unit
CP1L CPU Unit
SYSMAC
CP1L
ON
IN
1 2
L1
L2/N
COM
01
00
03
02
05
04
07
06
09
08
11
10
01
00
03
02
05
04
07
06
09
11
10
08
S
3 4 5 6
No.
COMM
ERR
SRT21
EXP
00
01
COM
OUT
510
02
COM
03
COM
04
COM
06
05
00
07
01
COM
03
02
04
COM
06
05
07
BD H
NC( BS+)
BD L NC( BS-) N C
Section 7-6
CompoBus/S I/O Link Units
I/O Allocation
I/O words are allocated to the CompoBus/S I/O Link Unit in the same way as
to other Expansion Units and Expansion I/O Units, i.e., the next available input
and output words are allocated. As shown below, when “m” is the last allocated input word and “n” is the last allocated output word, the CompoBus/S I/
O Link Unit is allocated “m+1” as its input word and “n+1” as its output word.
CompoBus/S I/O Link Unit
Word m+1
8 inputs
8 outputs
Word n+1
In the following example, a CompoBus/S I/O Link Unit is connected as the first
Unit after the CP1L CPU Unit.
CP1L
CPU Unit
CompoBus/S
I/O LInk Unit
Input words
CIO 0
CIO 1
CIO 2
Output words
CIO 100
CIO 101
CIO 102
The input word (m+1) contains the 8 bits of data from the Master Unit and two
CompoBus/S communications flags.
09 08 07
15
00
Word m+1
CompoBus/S Communications Error Flag
0: Normal; 1: Error
Data from the Master Unit
CompoBus/S Communication Status Flag
0: Stopped; 1: Communicating
Write the data to be transmitted to the Master Unit in the output word (n+1).
15
07
00
Word n+1
Data to be transferred to the Master Unit
Note
(1) The 8 bits of I/O data are not always transmitted simultaneously. In other
words, 8 bits of data transmitted from the Master CPU Unit at the same
time will not always reach the Slave CPU Unit simultaneously, and 8 bits
of data transmitted from the Slave CPU Unit at the same time will not always reach the Master CPU Unit simultaneously.
When the 8 bits of input data must be read together, modify the ladder
program in the CPU Unit receiving the data. For example, read the input
data twice in succession and accept the data only when the two values
match.
(2) Unused bits in the CompoBus/S I/O Link Unit’s output word can be used
as work bits, but unused bits in the output slaves cannot be used as work
bits.
511
Section 7-6
CompoBus/S I/O Link Units
(3) Unused bits in input word cannot be used as work bits.
Determining the Node
Number and Making DIP
Switch Settings
Node Number
• The CompoBus/S I/O Link Unit is a Slave Unit with 8 input bits and 8 output bits. The node number setting is made using the DIP switch; the
inputs and outputs share the same node number.
• The range of possible node number settings is determined by the type of
PLC the Master Unit is mounted to and the settings on the Master Unit.
For details refer to the CompoBus/S Operation Manual.
DIP Switch Settings
Use the DIP switch to set the CompoBus/S I/O Link Unit’s node number, communications mode, and the status of output data when a communications
error occurs.
Contents
Pin labels
1
2
4
8
DR
HOLD
NODE NUMBER
1
2
4
8
ON
SW1
Node Number
Setting
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
8
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
SW1
4 2
0 0
0 0
0 1
0 1
1 0
1 0
1 1
1 1
0 0
0 0
0 1
0 1
1 0
1 0
1 1
1 1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
1 = ON, 0 = OFF
Note: The long-distance communications
mode can be used only when one of
the following Master Units is
connected: C200HW-SRM21-V1,
CQM1-SRM21-V1, or [email protected]
Note
Wiring the CompoBus/S
Communications Path
ON
OFF
HOLD ON
OFF
DR
Long-distance communications mode (See note.)
High-speed communications mode
Retain inputs after a communications error.
Clear inputs after a communications error.
Always turn OFF the power supply before changing the DIP switch settings.
Wire the CompoBus/S communications path as shown in the following diagrams.
BD H NC (BS+)
BD L NC (BS−) NC
These terminals are not used. They can
however be used as communications power
supply relay terminals.
BD L
BD H
512
Connect the CompoBus/S Communications Cable.
SECTION 8
LCD Option Board
This section gives an outline of the LCD Option Board, explains how to install and remove the LCD Option Board, and
describes the functions including how to monitor and make settings for the PLC. It also lists the errors during operation
and provides probable causes and countermeasures for troubleshooting.
8-1
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
514
8-2
Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
515
8-3
Part Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
516
8-4
Installation and Removing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
517
8-5
Basic Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
518
8-6
8-5-1 Startup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-5-2 Screen Transitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-5-3 Operation Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LCD Option Board Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
518
519
521
523
8-7
8-6-1 Function Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-6-2 PLC Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-6-3 I/O Memory Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-6-4 PLC Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-6-5 Analog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-6-6 Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-6-7 Memory Cassette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-6-8 User Monitor Screen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-6-9 Message Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-6-10 Timer Switch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-6-11 Data Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-6-12 Language Selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-6-13 PLC Cycle Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-6-14 PLC Clock Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-6-15 PLC System Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-6-16 LCD Backlight Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-6-17 LCD Contrast Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-6-18 LCD Factory Setting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Trouble Shooting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
523
526
527
532
534
535
538
542
551
556
562
565
566
567
568
569
570
571
572
8-7-1
8-7-2
8-7-3
572
572
573
Symptom at Power ON or during Operation . . . . . . . . . . . . . . . . . .
Communication Error Message during Operation . . . . . . . . . . . . . .
Deleting EEPROM Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
513
Section 8-1
Features
8-1
Features
LCD Option Board is small but has a wide range of functions and is easy to
use.
Powerful Display and Setting Functions
Equipped for easy display and set up of user-specified messages, time or
other data of the PLC.
User Monitor Screen
Preset the screen, including I/O memory and text string, which user will monitor frequently. So it is easy for user to acquire his necessary data. It is possible to register up to 16 screens.
Timer Switch
Preset the timer, including Day, Weekly and Calendar Timer. Each timer can
execute a trans-day, trans-week or trans-year operation. So a 24-hours control
will be effected by one-step setting. It is possible to register up to 16 timers for
each kind.
Easier to Identify with Backlight
When PLC error occurs, the red backlight of LCD display screen will begin to
blink, quickly altering you of the error.
Normally the backlight is green. The automatic cutout time for the backlight
can be set to occur from 2 to 30 minutes, or even set permanently to OFF or
ON position.
The contrast level can also be adjusted.
514
Section 8-2
Specifications
8-2
Specifications
Item
Specification
Model
CP1W-DAM01
Type
Built-in
Serial port
Only port 1
Communication protocol
Toolbus
DC consumption
5V : 40mA
24V : 0mA
Dimensions
43×36×23 mm (W×H×D)
Weight
20g max.
Screen size
2.6cm×1.45cm
Total characters on screen
4 lines×12 characters
Font size
5×7 dot
Backlight color
Green / Red
Display language
English / Japanese (Katakana)
Ambient operating temperature
0 to 55°C
Ambient operating humidity
10% to 90% (with no condensation)
Atmosphere
No corrosive gas.
Humidity[%]
100
90
(65 , 90%)
80
70
(70 , 60%)
60
50
40
(75 , 40%)
Temperature[˚C]
60
Ambient storage condition
70
80
(with no condensation)
515
Section 8-3
Part Names
8-3
Part Names
Front
a
Back
b
Corner Cut
ESC
Connector
c
d
OK
e
LCD
Operation Button
No.
Button
a
ESC
Function
Cancel the setting and return to the up-level menu.
ESC
b
Move the column cursor.
Forward Press and hold the button, the column cursor will move forward continuously.
c
Up
d
Move the line cursor up. Change numerals and parameters.
Press and hold the button, the line cursor will move up continuously and the parameters will increase continuously.
Down
e
OK
OK
Move the line cursor down. Change numerals and parameters.
Press and hold the button, the line cursor will move down
continuously and the parameters will decrease continuously.
Confirm the setting.
Backlight
Color
516
Meaning
Green
PLC is normal.
Red
PLC error has occurred.
Section 8-4
Installation and Removing
8-4
Installation and Removing
Installation
The following processing explains how to install and remove a LCD Option Board.
!Caution Always turn OFF the power supply to the CPU Unit and wait until all the operation indicators go out before installing or removing the LCD Option Board.
1,2,3...
1. Press the up/down lock levers on both sides of the Option Board slot cover
1 at the same time to unlock the cover, and then pull the cover out.
2. Check the alignment to make the corner cut of the LCD Option Board fit in
the Option Board slot 1, and firmly press the LCD Option Board in until it
snaps into place.
Option Board slot 1
Operation indicators
LCD Option Board
Corner Cut
ESC
OK
Back
Front
3. Switch DipSW4 of the CPU Unit to ON.
Note DipSW4 is OFF at shipment
ON
1
2
ESC
3
OK
4
DipSW4
5
6
Removing
Press the up/down lock levers on both sides of the LCD Option Board at the
same time to unlock the Option Board, and then pull it out.
Press
Lock lever
ESC
OK
Press
Lock lever
517
Section 8-5
Basic Operation
8-5
8-5-1
Basic Operation
Startup
According to the operation status of the LCD Option Board, it will display different screens when the CPU Unit power is turned ON.
Normal Startup
When the CPU Unit power is turned ON, the LCD Option Board will initialize
hardware and check EEPROM, then check communication between the LCD
Option Board and the CPU Unit. If startup is normal, LCD will display Clock
Screen as shown below.
Clock Screen
a
b
c
d
No.
Description
a
Type of the CPU Unit
b
Date of the CPU Unit
c
Time of the CPU Unit
d
Week abbreviation of the CPU Unit
Startup Failure
• If EEPROM is faulty, LCD will display EEPROM Error Screen and the red
backlight will blink. Refer to 8-7 Trouble Shooting.
EEPROM Error Screen
• If the communication between the LCD Option Board and the CPU Unit
has failed, LCD will display NG screen. Refer to 8-7 Trouble Shooting.
NG Screen
Note
518
If the LCD Option Board receives no response from the CPU Unit within 3
seconds during operation, it will also display NG screen.
Section 8-5
Basic Operation
8-5-2
Screen Transitions
The screen transition of the LCD Option Board as shown in the following diagram.
Monitor Mode
Setup Mode
Power to the CPU Unit turns ON
Display main menu
OK
+
ESC
ESC
Select the menu
Display User Monitor Screen
(See note1)
OK
ESC
Enter Data Change Screen
Enter the submenu
+
OK
ESC
OK
When control bit is ON
(See note1, 2)
ESC
Display Setup Screen
When PLC error occurs
ESC
Note
1. The screen will be displayed after making settings in the Setup Mode.
2. The Message Screen will disappeared automatically after control bit is
OFF.
3. In the Setup Mode, if there is no operation for 10 minutes, LCD will automatically switch to the Monitor Mode.
519
Section 8-5
Basic Operation
Screen Transition Example in the Monitor Mode
In this example, User Monitor Screen 1 and Message Screen 2, Message
Screen 6 have been set.
Control bit is OFF
Clock Screen
User Monitor Screen 1
Clock Screen
Clock Screen
User Monitor Screen 1
Control bit 1 is ON
Message Screen 2
Control bit 5 is ON during control bit 1 ON
Clock Screen
User Monitor Screen 1
Message Screen 2
Clock Screen
User Monitor Screen 1
Message Screen 6
Control bit 1 is OFF
Message Screen 6
Control bit 1 and bit 5 are ON at the same time
Message Screen 2
Note
Message Screen 6
Clock Screen
User Monitor Screen 1
1. When one control bit is ON, the Clock Screen or the User Monitor Screen
will switch to the Message Screen automatically.
2. If another control bit is ON when the Clock Screen or the User Monitor
Screen is diplayed, the display will switch to another Message Screen.
3. If another control bit is ON when one Message Screen is diplayed, the display will not change until one of the control bit is OFF.
520
Section 8-5
Basic Operation
4. If another control bit is bigger, the display will swtich to another Message
Screen after one of the control bit is OFF. If another control bit is smaller,
the display will swtich to the Clock Screen after one of the control bit is OFF.
5. When no less than one control bit are ON at the same time, the Message
Screen whose Screen No. is smaller will be displayed.
6. If one control bit is ON during the period that PLC error occurs, the display
remains the Error Screen. Even if the error is eliminated, the display will
not switch to the Message Screen, but return to the Clock Screen.
8-5-3
Operation Examples
With actual operation examples, the main operation flow of the LCD Option
Board as shown below.
Menu Selection
Display the Monitor Screen of I/O memory.
1,2,3...
1. Turn on the power to the CPU Unit. Clock Screen will be displayed.
2. Press the OK + ESC button simultaneously to switch to the main menu.
The line cursor ">" is always displayed on the first line of menu items.
3. Press the Down or Up button to select the menu item.
Move the line cursor to IO Memory.
4. Press the OK button to enter the submenu.
5. Press the Down or Up button to select the I/O memory type.
Move the line cursor to DM.
6. Press the OK button to enter the Monitor Screen of I/O memory.
521
Section 8-5
Basic Operation
Displaying I/O Memory
Display any data of I/O memory. In this example, two word data on D10001 to
D10002, D10003 to D10004 with unsigned decimal number will be displayed.
1,2,3...
1. Line 1 will display the default address D00000 in I/O memory, Line 2 to 4
will display one word data on D00000, D00001, D00002 with hex number
when entering the Monitor Screen of I/O memory.
The first digit of memory address "0" will flash. The column cursor is at the
flashing position.
The digit under the column cursor can be changed, otherwise it is read only.
2. Use the Forward button to move the column cursor to the digit to be set.
Use the Down or Up button to change the value of each digit.
The screen display will be updated immediately after the address is
changed.
3. Use the Forward button to move the column cursor to another parameter
to be set.
Use the Down or Up button to select the value of parameter.
The screen display will be updated immediately after the parameter is
changed.
Changing I/O Memory
Change any data of I/O memory. In this example, the data of I/O memory on
D10001 will be changed.
1,2,3...
1. Display I/O memory.
2. Press the OK button to enter the Change Screen of I/O memory.
The column cursor is at the "#" position.
Use the Down or Up button to select the value of parameter.
522
Section 8-6
LCD Option Board Function
3. Use the Forward button to move the column cursor to the data of I/O memory.
Use the Down or Up button to change the value of each digit.
ESC
OK
4. Press the OK button to save the setting.
Press the ESC button to return to the previous screen.
The data displayed in the Monitor Screen will be changed.
Press the ESC button to cancel the setting and return to the previous screen.
8-6
LCD Option Board Function
This section describes the functions of the LCD Option Board including how to
monitor and make settings for the PLC.
8-6-1
Function Overview
PLC Mode
Display the present PLC mode and change the PLC mode.
Refer to Page 526 for details.
I/O Memory Setting
Monitor and change the data of I/O Memory.
Refer to Page 527 for details.
PLC Setup
Monitor and change the PLC Setup, especially fast access the CPU Unit Operating
Mode.
Refer to Page 532 for details.
523
Section 8-6
LCD Option Board Function
Analog
Monitor the value from the analog adjuster and external analog setting input of
the PLC.
Refer to Page 534 for details.
Error History
Display the list of error history and the details of each error. It is possible to
display up to 20 screens. User can also monitor the occurring errors.
Refer to Page 536 for details.
Memory Cassette
The LCD Option Board can execute any of the following operations.
• Load data from memory cassette to PLC.
• Save data from PLC to memory cassette.
• Compare data between PLC and memory cassette.
• Clear data in memory cassette.
Refer to Page 538 for details.
User Monitor Screen
Set or delete User Monitor Screen, which includes some elements such as
I/O word memory, bit memory or text string. It is possible to register up to 16
screens. User can monitor his necessory data in the User Monitor Screen.
Refer to Page 542 for details.
Message Screen
524
Set or delete Message Screen. It is possible to register up to 16 screens.
User can monitor the text message in the Message Screen when control bit is
ON.
Refer to Page 551 for details.
Section 8-6
LCD Option Board Function
Timer Switch
Set day, weekly and calendar timers. It is possible to register up to 16 timers
for each kind. Each timer can execute a trans-day, trans-week or trans-year
operation.
Refer to Page 556 for details.
Data Backup
The LCD Option Board can execute any of the following operations.
• Load user settings from DM area.
• Save user settings to DM area.
So user can save the user settings to the DM area of the PLC from one LCD
Option Board and load to other LCD Option Boards from the DM area.
Refer to Page 562 for details.
Language
Change the language of the LCD display between English and Japanese.
Refer to page 565 for details.
Other
• PLC Cycle Time
• PLC Clock Setting
• PLC System Information
• LCD Backlight Setting
• LCD Contrast Setting
• LCD Factory Setting
Refer to Page 567 to 570 for details.
525
Section 8-6
LCD Option Board Function
8-6-2
PLC Mode
This function can display the present PLC mode and change the PLC mode.
Example
Change the PLC Mode from RUN to PRG.
1,2,3...
1. Switch to the Setup Mode.
2. Press the OK button to enter the Mode Screen.
There is a choice of 3 PLC modes-RUN/MON/PRG.
The line cursor will point to the present PLC mode.
The present mode is RUN.
3. Press the Down button to select PROGRAM.
4. Press the OK button, then LCD will update the present mode to PRG.
526
Section 8-6
LCD Option Board Function
8-6-3
I/O Memory Setting
Displaying I/O Memory
Example
Monitor two word data on D10001 to D10002, D10003 to D10004 with
unsigned decimal number.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select IO Memory.
3. Press the OK button to enter the I/O Memory menu.
4. Press the Down button to select DM.
a
b c
5. Press the OK button to enter the Monitor Screen of I/O memory DM.
The following table shows the setting items.
No.
Description
a
Leading word address
b
Display format
c
Data length
The first digit of the leading word address will be flashing.
The present setting is the default address.
Line 2 to 4 will display one word data on D00000, D00001, D00002 with
hex number.
6. Use the Forward button to move the column cursor to the digit to be set.
Use the Up button to change the leading word address to 10001.
527
Section 8-6
LCD Option Board Function
The following table shows the default address and the setting range for
each I/O memory type.
I/O memory type
Default address
Range
TIM
0000
0000 to 4095
CNT
0000
0000 to 4095
DM
00000
00000 to 32767
AR
000
000 to 959
IO
0000
0000 to 6143
WR
000
000 to 511
HR
000
000 to 511
DR
00
00 to 15
IR
00
00 to 15
TK
00
00 to 31
Note
LongWord has only five display types, DM, IO, WR, HR and AR.
7. Use the Forward button to move the column cursor to the display format
position.
Press the Down or Up button to select the display format &.
Select the display format in the following table.
Display format
Meaning
#
Hex number
+
Signed decimal number
&
Unsigned decimal number
8. Use the Forward button to move the column cursor to the data length position.
Press the Down or Up button to select the data length LW.
Select the data length in the following table.
Data length
Meaning
W
One word data
LW
Two word data
Then it will display two word data on D10001 to D10002, D10003 to
D10004 with unsigned decimal number.
Note
528
The screen display will be updated immediately after the address, display format or data length is changed.
Section 8-6
LCD Option Board Function
Changing I/O Memory
Example
First change two word data on W000 to 12345678, then change one word
data on W509 to 98F5 and set the control bit 509.05 to OFF.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select IO Memory.
3. Press the OK button to enter the I/O Memory menu.
4. Press the Down button to select WR.
5. Press the OK button to enter the Monitor Screen of I/O memory WR.
6. Use the Forward button to move the column cursor to the data length position.
Press the Down or Up button to select the data length LW.
1
2
7. Press the OK button to enter the Change Screen of I/O memory W000.
The following table shows the setting items.
3
No.
4
5
1
Attributes
Head channel address (Read only)
2
3
Display format (Read only)
Data length (Read only)
4
5
Data of I/O memory before change (Read only)
Data of I/O memory after change
529
Section 8-6
LCD Option Board Function
8. Press the Forward button to move the column cursor to the digit to be set.
Use the Down or Up button to change the data to 12345678.
9. Press the OK button to save the setting.
Press the ESC button to return to the previous screen.
Then the data on W000 displayed in the Monitor Screen will be 12345678.
10. Change the leading word address to 509 to update the screen display.
a d
b c
11. Press the OK button to enter the Change Screen of I/O memory W509.
The following table shows the setting items.
No.
e
g
h
f
Note
Description
a
Leading word address(Read only)
b
Display format(Read only)
c
Data length(Read only)
d
Data of I/O memory before change (Read only)
e
Data of I/O memory after change
f
Bit address
g
Bit flag
h
Bit state
If the display format is a decimal number (& or +), or the data length
is a LongWord, user cannot make a setting for bit.
12. Move the column cursor to the digit to be set.
Use the Up button to change the data to 98F5.
13. Use the Forward button to move the column cursor to the position of bit
address.
The present setting is the default address. The range is 00~15.
530
Section 8-6
LCD Option Board Function
14. Use the Up button to change the bit address to 05.
15. Use the Forward button to move the column cursor to the bit flag position.
The present setting is the default setting.
Select the bit flag in the following table.
Bit flag
Meaning
N
Normal
S
Force to SET
R
Force to RESET
16. Use the Forward button to move the column cursor to the bit state position.
The present state is ON. The state ON or OFF is according to PLC.
17. Press the Down or Up button to select the bit state OFF.
Note
If bit flag is S or R, the setting of bit state is invalid.
18. Press the OK button to save the setting.
Press the ESC button to return to the previous screen.
Then the data on W509 displayed in the Monitor Screen will be 98D5.
531
Section 8-6
LCD Option Board Function
8-6-4
PLC Setup
This function can display and change the settings in the PLC Setup.
Example 1
Change the CPU Unit Operating Mode from PRG to RUN.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select PLC Setup.
3. Press the OK button to enter the PLC Setup menu.
a
b
c
d
4. Press the OK button to enter the CPU Unit Operating Mode Screen.
The following table shows the setting items.
No.
a
b
c
d
Attributes
Address of CPU Unit Operating Mode (Read only)
Present PLC mode (Read only)
CPU Unit Operating Mode after change (Read only when PLC
mode is RUN or MON)
CPU Unit Operating Mode before change (Read only)
The address of CPU Unit Operating Mode is always 081, so there is no
need to change the address.
5. Use the Up button to select RUN.
Note
Before changing the CPU Unit Operating Mode, make sure that the
present PLC mode is PRG. If PLC is in RUN or MON mode, the CPU
Unit Operating Mode is unchangeable.
6. Press the OK button to save the setting.
7. Press the ESC or OK button to return to the previous menu.
532
Section 8-6
LCD Option Board Function
Example 2
Display the value of PLC Setup on 080. Then change the value to 0195.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select PLC Setup.
3. Press the OK button to enter the PLC Setup menu.
4. Press the Down button to select PLC Setup.
a
5. Press the OK button to enter the PLC Setup Screen
The following table shows the setting items.
No.
b
c
d
Description
a
Address of PLC Setup
b
PLC mode (Read only)
c
Value of PLC Setup after change
(Read only when PLC mode is RUN or MON)
d
Value of PLC Setup before change (Read only)
The first digit of PLC Setup address will be flashing. The range of the
address is 000 to 511.
6. Use the Up button to change the address to 080.
After the address is changed, the value of PLC Setup will be updated immediately.
7. Use the Forward button to move the column cursor to the value of PLC
Setup.
Use the Up button to change the value to 0195.
Note
Before changing the value of PLC Setup, make sure that the PLC
mode is PRG. If PLC is in RUN or MON mode, the value is unchangeable.
533
Section 8-6
LCD Option Board Function
8. Press the OK button to save the setting.
9. Press the ESC or OK button to return to the PLC Setup Screen.
8-6-5
Analog
Displaying Analog Settings
Example
Monitor the external analog setting input with unsigned decimal number.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select Analog.
3. Press the OK button to enter the Analog menu.
4. Press the OK button to enter the Monitor Screen of analog setting.
Line 2 will display the value from the analog adjuster.
Line 4 will display the external analog setting input value.
The display format on line 2 will be flashing.
5. Use the Forward button to move the column cursor to the display format
position on line 4.
6. Press the Down or Up button to change the display format to &.
534
Section 8-6
LCD Option Board Function
7. Press the ESC button to return to the previous screen.
8-6-6
Error
This function can display the list of error history and the details of each error. It
is possible to display up to 20 screens. User can also monitor the occurring
errors in the Error Monitor Screen.
Displaying and Clearing Error History
Example
Display the list of error history and then clear it.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select Error.
3. Press the OK button to enter the Error menu.
4. Press the OK button to enter the Error History Screen.
Error history will be displayed in this screen.
a
b
c
d
e
5. Press the OK button to enter the Error Screen details.
The following table shows the display items.
No.
Description
a
Error number(1 to 20)
b
Error type
c
The date error occurred
d
The time error occurred
e
Error code
535
Section 8-6
LCD Option Board Function
6. If there is more than one error, press the Down button to scroll the screen
and display the details of the next error.
7. Press the ESC button to return to the Error History Screen.
Press the Down button to select CLR ErrLog which is always below the
last error.
8. Press the OK button to enter the Error Clear Screen.
9. Press the Down button to select OK.
Note
Selecting Cancel will result in a return to the previous screen.
10. Press the OK button to clear the error history.
When the clearing is finished, it will display a complete screen.
11. Press the ESC button to return to the Error History Screen.
All the errors have been cleared.
Clearing Occurring Error List
Example
Clear memory error in the list that occurs at the present time.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select Error.
536
Section 8-6
LCD Option Board Function
3. Press the OK button to enter the Error menu.
4. Press the Down button to select ErrorMon.
5. Press the OK button to enter the Error Monitor Screen.
Max. 2 errors that occur the earliest will be displayed.
6. Press the Down button to select CLR Err.
7. Press the OK button to enter the Error Clear Screen.
8. Press the Down button to select OK.
9. Press the OK button to clear the memory error in the list.
Note
Only one error that occurs the earliest in the list will be cleared one
time.
10. If the memory error itself has not been eliminated, when the Error Monitor
Screen is updated, the error will be displayed again in the screen.
537
Section 8-6
LCD Option Board Function
8-6-7
Memory Cassette
Before Operation
• Memory Cassette should be equipped into the PLC. Otherwise LCD cannot operate Memory Cassette.
• Make sure that the PLC mode is PRG. If the PLC is in RUN or MON
mode, the operation of Memory Cassette cannot be executed.
Loading Data from Memory Cassette to PLC
Example
Load data from Memory Cassette to the PLC.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select MC.
a
3. Press the OK button to enter the Memory Cassette menu.
The following table shows the setting items.
Description
No.
b
a
PLC mode (Read only)
b
Operation mode
Select the operation mode in the following table.
Operation Mode
Meaning
MC->PLC
Load data from memory cassette to PLC
PLC->MC
Save data from PLC to memory cassette
Compare
Compare data between PLC and MC
Clear
Format memory cassette
4. Press the OK button to enter the "MC->PLC" Operation Screen.
5. Press the Down button to select OK.
Note
538
Selecting Cancel will result in a return to the previous menu.
Section 8-6
LCD Option Board Function
6. Press the OK button to start loading.
A rate of loading will be displayed in the screen.
7. When the rate comes up to 0%, the loading is finished. Then it will display
a complete screen.
Saving Data from PLC to Memory Cassette
Example
Save data from the PLC to Memory Cassette.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select MC.
3. Press the OK button to enter the Memory Cassette menu.
4. Press the Down button to select PLC->MC.
5. Press the [OK] button to enter the "PLC->MC" menu.
Select the saving mode in the following table.
Saving Mode
Meaning
Autoboot PRG
If the power turns ON, the operation cannot be
executed.
Autoboot RUN
Even if the power turns ON, the operation can be
executed.
539
Section 8-6
LCD Option Board Function
6. Press the OK button to enter the "PLC->MC" Operation Screen.
7. Press the Down button to select OK.
Note
Selecting Cancel will result in a return to the previous menu.
8. Press the OK button to start saving.
A rate of saving will be displayed in the screen.
9. When the rate comes up to 0%, the saving is finished. Then it will display
a complete screen.
Comparing Data between PLC and MC
Example
Compare the data between the PLC and Memory Cassette.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select MC.
3. Press the OK button to enter the Memory Cassette Screen.
4. Press the Down button to select Compare.
540
Section 8-6
LCD Option Board Function
5. Press the OK button to enter the Compare Operation Screen.
6. Press the Down button to select OK.
Note
Selecting Cancel will result in a return to the previous menu.
7. Press the OK button to start comparing.
A rate of comparison will be displayed in the screen.
8. When the rate comes up to 0%, the comparing is finished. Then it will display a result of comparison.
Clearing Memory Cassette
Example
Clear the data in Memory Cassette.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select MC.
3. Press the OK button to enter the Memory Cassette menu.
4. Press the Down button to select Clear.
541
Section 8-6
LCD Option Board Function
5. Press the OK button to enter the Clear Operation Screen.
6. Press the Down button to select OK.
Note
Selecting Cancel will result in a return to the previous menu.
7. Press the OK button to start clearing.
A rate of clearance will be displayed in the screen.
8. When the rate comes up to 0%, the clearing is finished. Then it will display
a complete screen.
8-6-8
User Monitor Screen
This function can set or delete User Monitor Screen. It is possible to register
up to 16 screens. User can monitor his necessary data in the User Monitor
Screen. Each User Monitor Screen includes 4 lines of content. Each line has
three kinds of display type including word memory, bit memory and text string.
Creating New User Monitor Screen
Example 1
Monitor one word data on the word address D09000 with unsigned decimal
number through User Monitor Screen 2, displayed on Line 1.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select UserMonitor.
3. Press the OK button to enter the User Monitor menu.
542
Section 8-6
LCD Option Board Function
c
a
b
d
g
f
h
e
4. Press the OK button to enter the User Monitor Setup Screen.
The final digit of the Screen No. will be flashing.
The following table shows the setting items for each display type.
Display type
No.
Description
Word
Bit
Text
string
a
Monitor flag
Yes
Yes
Yes
b
User Monitor Screen No. (01 to 16)
Yes
Yes
Yes
c
Line No. (1 to 4) of the User Monitor
Screen
Yes
Yes
Yes
d
Display type
Yes
Yes
Yes
e
I/O memory address
Yes
Yes
No
f
Display format
Yes
No
No
g
Date length
Yes
No
No
h
I/O memory name
Yes
Yes
Yes
5. Use the Up button to change the Screen No. to 2.
6. Use the Forward button to move the column cursor to the monitor flag position.
Select the monitor flag in the following table.
Monitor flag
Y
N
Meaning
User Monitor Screen in use
User Monitor Screen not in use
7. Press the Up button to select the monitor flag Y.
Then user can monitor this screen after the setting is complete.
8. Use the Forward button to move the column cursor to the Line No. position.
The present setting is Line 1.
9. Use the Forward button to move the column cursor to the display type position.
The following table shows the display types which can be selected, including the default address and the setting range for each type.
543
Section 8-6
LCD Option Board Function
Display type
Word
Bit
Text string
Default address
Range
IO
0000
0000 to 6143
WR
000
000 to 511
HR
000
000 to 511
AR
000
000 to 959
TIM
0000
0000 to 4095
CNT
0000
0000 to 4095
DM
00000
00000 to 32767
DR
00
00 to 15
IR
00
00 to 15
TK
00
00 to 31
TMF(Timer flag)
0000
0000 to 4095
CTF(Timer flag)
0000
0000 to 4095
IOB
0000.00
0000.00 to 6143.15
WRB
000.00
000.00 to 511.15
HRB
000.00
000.00 to 511.15
ARB
000.00
000.00 to 959.15
STR
-
-
10. Press the Up button to select DM.
11. Use the Forward button to move the column cursor to the memory address
position.
The present setting is the default address.
12. Move the column cursor to the digit to be set.
Use the Up button to change the memory address to 09000.
13. Use the Forward button to move the column cursor to the display format
position.
Select the display format in the following table.
Display format
544
Meaning
#
Hex number
+
Signed decimal number
&
Unsigned decimal number
Section 8-6
LCD Option Board Function
14. Press the Down or Up button to select the display format &.
15. Use the Forward button to move the column cursor to the data length position.
The present setting is W.
Select the data length in the following table.
Data length
Meaning
W
One word data
LW
Two word data
16. Use the Forward button to move the column cursor to the position of
Name.
17. Use the Down or Up button to select the character of each digit.
Name the word to Counter.
Note
1. When selecting the character of the next digit, the leading character will be the character of the digit before.
2. The max length of word or bit name is 7 characters.
18. Press the OK button to save the setting.
19. Press the ESC or OK button to return to the User Monitor Setup Screen.
20. Press the ESC button three times to return to the Monitor Mode.
Switch to the User Monitor Screen 2 with the Down button.
Note
1. Setting of word or bit name is not necessary. The default name is NULL,
and the memory address will be displayed at the name position in the User
Monitor Screen.
2. One line setting will take 1 or 2 lines of space. If word or bit name length is
more than 5 characters or data length is a LongWord, it will take 2 lines of
space.
3. One screen only has 4 lines of space available. If one line setting has already taken 2 lines of space, the next line setting will be invalid. If the setting of line 4 takes 2 lines of space, its setting will be invalid.
545
Section 8-6
LCD Option Board Function
Example 2
Display a text string "elevator" on the User Monitor Screen 2, Line 4, after the
setting in example 1.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select UserMonitor.
3. Press the OK button to enter the User Monitor menu.
4. Press the OK button to enter the User Monitor Setup Screen.
5. Use the Up button to change the Screen No. to 2.
The setting in example 1 will be displayed.
6. Use the Forward button to move the column cursor to the Line No. position.
Use the Up button to change the Line No. to 4.
7. Use the Forward button to move the column cursor to the display type position.
Press the Up button to select STR.
8. Use the Forward button to move the column cursor to the position of String
Name.
546
LCD Option Board Function
Section 8-6
9. Use the Down or Up button to select the character of each digit.
Name the text string to elevator.
10. Press the OK button to save the setting.
11. Press the ESC or OK button to return to the User Monitor Setup Screen.
12. Press the ESC button three times to return to the Monitor Mode.
Switch to the User Monitor Screen 2.
Note
1. The default text string is NULL.
2. The max length of text string is 12 characters.
Changing User Monitor Screen
User can not only change the date displayed in the User Monitor Screen in the
Setup Mode, but also in the Monitor Mode.
Example 1
Change the average to 0100 and the minimum to -00123.
1,2,3...
1. Display the User Monitor Screen.
2. Press the Forward + OK button simultaneously to enter the Data Change
Screen.
The column cursor will be flashing on the digit before the value.
3. Use the Forward button to move the column cursor to the digit to be set.
547
Section 8-6
LCD Option Board Function
4. Use the Up button to change the value to 0100.
5. Press the OK button to save the setting.
The column cursor will return to the digit before the value.
6. Use the Down button to move the cursor to line 2.
Note
Only when the cursor is on the digit before the value, press the
Down or Up button to b move the cursor to other lines.
7. Use the Forward button to move the column cursor to the sign position.
Press the Down or Up button to change the sign to -.
8. Press the OK button to save the setting.
If the setting is invalid, the screen display will have no change.
9. Press the ESC button to return to the User Monitor Screen.
The average has been changed to 0100, but the minimum is still +00123.
548
LCD Option Board Function
Example 2
Section 8-6
Change bit0 from OFF to ON.
1,2,3...
1. Press the Forward + OK button simultaneously to enter the Data Change
Screen.
2. Use the Down button to move the cursor to line 2.
3. Use the Forward button to move the column cursor to the bit state position.
4. Press the Down or Up button to change the bit state to ON.
5. Press the OK button to save the setting.
Press the ESC button to return to the User Monitor Screen.
Deleting User Monitor Screen
Example
Delete the User Monitor Screen 2.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select UserMonitor.
3. Press the OK button to enter the User Monitor menu.
549
Section 8-6
LCD Option Board Function
4. Press the Down button to select Delete.
5. Press the OK button to enter the User Monitor Delete Screen.
The final digit of the Screen No. will be flashing.
6. Use the Up button to change the Screen No. to 2.
Note
Press and hold the UP button until the Screen No. changes to ALL,
all the User Monitor Screen will be deleted if the setting is confirmed.
7. Press the OK button to delete the screen.
8. Press the ESC or OK button to return to the previous menu.
550
Section 8-6
LCD Option Board Function
8-6-9
Message Screen
This function can set or delete Message Screen. It is possible to register up to
16 screens. User can monitor the text message in the Message Screen when
control bit is ON.
Creating New Message Screen
Example
When control bit W100.01 is ON, the Message Screen 2 will display the data
on the word adress D09040 to D09075.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select Message.
3. Press the OK button to enter the Message menu.
a
b
c
4. Press the OK button to enter the Message Setup Screen.
The final digit of the Screen No. will be flashing.
The following table shows the setting items.
No.
d
Description
a
Message Screen No. (01 to 16)
b
Leading word (Only DM) address
c
Message flag
d
Word (Only WR) address of control bit
5. Use the Up button to change the Screen No. to 2.
The following table shows the relation between the Screen No. and the
control bit when the word address is W000.
Screen No.
Control bit
01
02
W000.00
W000.01
03
04
W000.02
W000.03
…
16
…
W000.15
551
Section 8-6
LCD Option Board Function
6. Use the Forward button to move the column cursor to the position of leading word address.
The present setting is the default address.
The following table shows the default address and the setting range for
each screen when the leading word address is D09000.
Screen No.
Default address
01
09000 to 09035
02
09040 to 09075
03
09080 to 09115
04
09120 to 09155
…
…
16
09600 to 09635
Range
00000 to 32732
7. Use the Forward button to move the column cursor to the message flag position.
Select the message flag in the following table.
Message flag
Y
N
Meaning
Message Screen in use
Message Screen not in use
8. Press the Up button to select the message flag Y.
The setting is available for all the screens.
9. Use the Forward button to move the column cursor to the position of word
address.
The present setting is the default address. The range of the address is 000
to 511.
10. Use the Up button to change the word address to 100.
11. Press the OK button to save the setting.
12. Press the ESC or OK button to return to the Message Setup Screen.
13. Press the ESC button three times to return to the Monitor Mode.
Switch to the Message Screen 2 when control bit W100.01 is ON.
552
Section 8-6
LCD Option Board Function
DM Area Settings
The text message is stored in the DM area. One character is 1 byte and one
DM word is 2 bytes, so 24 DM words need to be used to store one screen
message. But not all of the area can be used.
The following table shows the setting area for each screen when the leading
word address is D09000..
Screen No.
Word
01
D09000
02
0
1
2
1
3
4
2
5
6
3
7
8
4
9
5
10 11
12
6
D09010
D09020
13 14
25 26
15 16
27 28
17
29
18
30
19
31
20 21
32 33
22 23
34 35
24
36
D09030
D09040
37 38
1
2
39 40
3
4
41
5
42
6
43
7
44 45
8
9
46 47
10 11
48
12
D09050
D09060
13 14
25 26
15 16
27 28
17
29
18
30
19
31
20 21
32 33
22 23
34 35
24
36
D09070
37 38
39 40
41
42
43
44 45
46 47
48
D09600
D09610
1
2
13 14
3
4
15 16
5
17
6
18
7
19
8
9
20 21
10 11
22 23
12
24
D09620
D09630
25 26
37 38
27 28
39 40
29
41
30
42
31
43
32 33
44 45
34 35
46 47
36
48
7
8
9
Do not use.
···
16
In this example, “Elevator Stop at 1F” is displayed on the Message Screen 2.
The data can be set in the DM area with the CX-Programmer.
The settings show as below.
Line No.
1
2
3
4
Word
D09040
Setting
2020
Character
D09041
D09042
2020
2020
D09043
D09044
2020
2020
D09045
D09050
2020
456C
E
l
D09051
D09052
6576
6174
e
a
v
t
D09053
D09054
6F72
2020
o
r
D09055
D09060
2020
2053
D09061
D09062
746F
7020
t
p
o
D09063
D09064
6174
2031
a
t
1
D09065
D09070
4620
2020
F
D09071
D09072
2020
2020
D09073
D09074
2020
2020
D09075
2020
S
553
Section 8-6
LCD Option Board Function
Select the character codes in the following table.
Upper
Lower bits
bits
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
554
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
Section 8-6
LCD Option Board Function
Deleting Message Screen
Example
Delete the Message Screen 1.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select Message.
3. Press the OK button to enter the Message menu.
4. Press the Down button to select Delete.
5. Press the OK button to enter the Message Delete Screen.
The present setting is Screen 01.
Note
Press and hold the UP button until the Screen No. changes to ALL,
all the User Monitor Screen will be deleted if the setting is confirmed.
6. Press the OK button to delete the screen.
7. Press the ESC or OK button to return to the previous menu.
555
Section 8-6
LCD Option Board Function
8-6-10 Timer Switch
There are 3 kinds of timer, including Day, Weekly and Calendar Timer.
It is possible to register up to 16 timers for each kind.
Type
Description
Day timer
Sometime in a day, set the related control bit to ON.
Weekly timer
Sometime in a week, set the related control bit to ON.
Calendar timer
Sometime in a year, set the related control bit to ON.
Setting Day Timer
Example
8:30 to 17:15 from Monday to Friday, control bit W509.15 is ON.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select Timer.
3. Press the OK button to enter the Timer Switch menu.
a
b
c
d
e
4. Press the OK button to enter the Day Timer Screen.
The final digit of the Timer No. will be flashing.
The following table shows the setting items.
No.
f
Description
a
Timer flag
b
Timer No. (01 to 16)
c
ON time of PLC
d
OFF time of PLC
e
Word type
f
Word address
5. Use the Up button to change the Timer No. to 16.
The following table shows the relation between the Timer No. and the control bit when the word address is W001.
Timer No.
556
Control bit
01
W001.00
02
03
W001.01
W001.02
04
…
W001.03
…
16
W001.15
Section 8-6
LCD Option Board Function
6. Use the Forward button to move the column cursor to the timer flag position.
Press the Up button to select the timer flag Y.
Select the timer flag in the following table.
Timer flag
Meaning
Y
Timer in use
N
Timer not in use
7. Use the Forward button to move the column cursor to the ON time position.
Use the Up button to change time to 08:30.
8. Use the Forward button to move the column cursor to the ON week position.
The present setting is Monday.
9. Use the Forward button to move the column cursor to the OFF time position.
Use the Up button to change time to 17:15.
10. Use the Forward button to move the column cursor to the OFF week position.
Press the Down or Up button to select Friday.
11. Use the Forward button to move the column cursor to the position of control bit.
12. Press the Up button to select WR.
The following table shows the word type which can be selected, including
the default address and the setting range for each type.
Timer
Word
Default address
Range
All
IO
0100
0100 to 6143
Day timer
WR
001
001 to 511
Weekly timer
WR
002
002 to 511
Calender timer
WR
003
003 to 511
All
HR
000
000 to 511
All
AR
448
448 to 959
557
Section 8-6
LCD Option Board Function
13. Use the Forward button to move the column cursor to the position of
word address.
The present setting is the default address.
14. Move the column cursor to the digit to be set.
Use the Up button to change the word address to 509.
15. Press the OK button to save the setting.
16. Press the ESC or OK button to return to the Day Timer Screen.
Setting Calendar Timer
Example
From 1st June to 1st October, control bit H209.05 is ON.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select Timer.
3. Press the OK button to enter the Timer menu.
4. Press the Down button to select Cal Timer.
558
Section 8-6
LCD Option Board Function
a
b
c
d
e
f
5. Press the OK button to enter the Calendar Timer Screen.
The final digit of the Timer No. will be flashing.
The following table shows the setting items.
No.
Description
a
Timer flag
b
Timer No. (01 to 16)
c
ON date of PLC
d
OFF date of PLC
e
Word type
f
Word address
6. Use the Up button to change the Timer No. to 6.
7. Use the Forward button to move the column cursor to the timer flag position.
Press the Up button to select the timer flag Y.
8. Use the Forward button to move the column cursor to the ON date position.
Use the Up button to change the date to 06/01.
9. Use the Forward button to move the column cursor to the OFF date position.
Use the Up button to change the date to 10/01.
10. Use the Forward button to move the column cursor to the position of control bit.
Press the Up button to select HR.
11. Use the Forward button to move the column cursor to the position of word
address.
The present setting is default address.
12. Move the column cursor to the digit to be set.
Use the Up button to change the word address to 209.
559
Section 8-6
LCD Option Board Function
13. Press the OK button to save the setting.
14. Press the ESC or OK button to return to the Calander Timer Screen.
Note
1. If a timer is in use, when the timer switch turns ON, the LCD Option Board
will send command to PLC one time every 1 second to make control bit
ON, when the timer switch turns OFF, the LCD Option Board will send command to PLC one time every 1 second to make control bit OFF.
2. Move the LCD Option Board from one PLC to another, the result of timer
operation will be different if the time of two PLCs is not the same.
Timing Curve
Each timer can execute a trans-day, trans-week or trans-year operation. The
operation period will be shown in the following curve.
Day Timer
㪪㪬㪥
㪤㪦㪥
㪫㪬㪜
㪮㪜㪛
㪫㪟㪬
㪝㪩㪠
㪪㪘㪫
㩷㩷㩷㪏㪑㪇㪇 㩷㩷㩷㪈㪎㪑㪇㪇 㩷㩷㩷㪏㪑㪇㪇 㩷㩷㩷㪈㪎㪑㪇㪇 㩷㩷㩷㪏㪑㪇㪇 㩷㩷㩷㪈㪎㪑㪇㪇 㩷㩷㩷㪏㪑㪇㪇 㩷㩷㩷㪈㪎㪑㪇㪇 㩷㩷㩷㪏㪑㪇㪇 㩷㩷㩷㪈㪎㪑㪇㪇 㩷㩷㩷㪏㪑㪇㪇 㩷㩷㩷㪈㪎㪑㪇㪇 㩷㩷㩷㪏㪑㪇㪇 㩷㩷㩷㪈㪎㪑㪇㪇
㪏㪑㪇㪇 㪦㪥 㪤㫆㫅
㪈㪎㪑㪇㪇 㪦㪝㪝 㪝㫉㫀
㪈㪎㪑㪇㪇 㪦㪥 㪤㫆㫅
㪏㪑㪇㪇 㪦㪝㪝 㪝㫉㫀
㪏㪑㪇㪇 㪦㪥 㪤㫆㫅
㪈㪎㪑㪇㪇 㪦㪝㪝 㪤㫆㫅
㪈㪎㪑㪇㪇 㪦㪥 㪤㫆㫅
㪏㪑㪇㪇 㪦㪝㪝 㪤㫆㫅
㪏㪑㪇㪇 㪦㪥 㪤㫆㫅
㪏㪑㪇㪈 㪦㪝㪝 㪤㫆㫅
㪏㪑㪇㪇 㪏㪑㪇㪈
㪏㪑㪇㪇 㪦㪥 㪤㫆㫅
㪎㪑㪌㪐 㪦㪝㪝 㪤㫆㫅
㪏㪑㪇㪇
㪎㪑㪌㪐
㪏㪑㪇㪇
㪏㪑㪇㪇
㪏㪑㪇㪇 㪦㪥 㪤㫆㫅
㪏㪑㪇㪇 㪦㪝㪝 㪤㫆㫅
㪏㪑㪇㪇 㪦㪥 㪤㫆㫅
㪏㪑㪇㪇 㪦㪝㪝 㪪㫌㫅
560
LCD Option Board Function
Section 8-6
Weekly Timer
Calendar Timer
Note
Set the OFF date to 1st October, the Calendar Timer will turn OFF at 24:00
31st September.
561
Section 8-6
LCD Option Board Function
8-6-11 Data Backup
User can save the user settings to DM memory area from one LCD Option
Board and load to other LCD Option Boards from the DM memory area.
Note
Please do not take the DM area (D8000 to D8999) for other use.
User settings which can be backed up as shown below.
User setting
Quantity
User Monitor screen
16 screens
Message screen
16 screens
Timer Switch
Other
16 × 3 timers
Language
1
Backlight
1
Contrast
1
Loading User Setting
Example
Load user settings from DM memory area.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select DataBackup.
3. Press the OK button to enter the Data Backup menu.
4. Press the OK button to enter the Load Operation Screen.
Select the operation mode in the following table.
Operation Mode
Meaning
Load
Load user setting from DM area
Save
Save user setting into DM area
5. Press the Down button to select OK.
Note
562
Selecting Cancel will result in a return to the previous menu.
LCD Option Board Function
Section 8-6
6. Press the OK button to display a load confirming screen.
7. Press the OK button to start loading.
A rate of loading will be displayed in the screen.
8. When the rate comes up to 100%, the loading is finished. Then it will display a complete screen.
9. Press the ESC or OK button to restart the LCD Option Board.
Saving User Setting
Example
Save user settings to DM memory area.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select DataBackup.
3. Press the OK button to enter the Data Backup menu.
4. Press the Down button to select Save.
563
Section 8-6
LCD Option Board Function
5. Press the OK button to enter the Save Operation Screen.
6. Press the Down button to select OK.
Note
Selecting Cancel will result in a return to the previous menu.
7. Press the OK button to display a save confirming screen.
8. Press the OK button to start saving.
A rate of saving will be displayed in the screen.
9. When the rate comes up to 100%, the saving is finished. Then it will display
a complete screen.
564
Section 8-6
LCD Option Board Function
8-6-12 Language Selection
Display for the LCD Option Board is available in 2 languages - English and
Japanese.
Example
Change the display language from English to Japanese.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select
.
3. Press the OK button to enter the Language Setup Screen.
The present language is English.
4. Press the Down button to select
.
5. Press the OK button to save the setting.
6. Press the ESC or OK button return to the previous menu.
The display language will change to Japanese.
565
Section 8-6
LCD Option Board Function
8-6-13 PLC Cycle Time
This function can display the cycle time of the CPU Unit. The operation
method will be shown in the following example.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select Other.
3. Press the OK button to enter the Other menu.
4. Press the OK button to enter the Cycle Time Screen.
The average cycle time of the CPU Unit will be displayed.
5. Press the Down button to display the max. cycle time of the CPU Unit.
6. Press the Down button to display the min. cycle time of the CPU Unit.
566
LCD Option Board Function
Section 8-6
8-6-14 PLC Clock Setting
This function can change the setting of the built-in clock in the CPU Unit.
Example
Change PLC time to 12:00:00, PLC week to Saturday.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select Other.
3. Press the OK button to enter the Other menu.
4. Press the Down button to select ClockSet.
5. Press the OK button to enter the Clock Setup Screen.
The present date, time and week of the CPU Unit will be displayed.
6. Use the Forward button to move the column cursor to the position of PLC
time.
Use the Down or Up button to change the time to 12:00:00.
7. Use the Forward button to move the column cursor to the position of PLC
week.
Use the Down or Up button to select Sat.
8. Press the OK button to save the setting.
9. Press the ESC or OK button to return to the previous menu.
567
Section 8-6
LCD Option Board Function
10. Press the ESC button to return to the Monitor Mode.
8-6-15 PLC System Information
This function can display the system information of the CPU Unit. The operation method will be shown in the following example.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select Other.
3. Press the OK button to enter the Other menu.
4. Press the Down button to select SystemInfo.
5. Press the OK button to enter the System Information Screen.
Line 1 to 3 will display the CPU Unit model, line 4 the lot No.
6. Press the Down button to display the CPU Unit version.
568
Section 8-6
LCD Option Board Function
8-6-16 LCD Backlight Setting
This function can make a setting for the LCD backlight.
Example
The backlight turns off after LCD has not been used for 5 minutes.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select Other.
3. Press the OK button to enter the Other menu.
4. Press the Down button to select BackLight.
5. Press the OK button to enter the Backlight Screen.
The following table shows the setting items.
a
No.
b
a
b
Description
Timer interval
Backlight mode
Meaning
The range is 02 to 30 minutes.
Timer
Backlight will turn OFF if LCD has not
been used for the timer interval.
ON
Backlight is always ON.
OFF
Backlight is always OFF.
6. Use the Forward button to move the column cursor to the position of timer
inerval.
Use the Up button to change the timer interval to 05.
7. Press the OK button to save the setting.
8. Press the ESC or OK button to return to the previous menu.
569
Section 8-6
LCD Option Board Function
8-6-17 LCD Contrast Setting
This function can make a setting for the LCD contrast.
Example
Change the contrast of LCD display to 8.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select Other.
3. Press the OK button to enter the Other menu.
4. Press the Down button to select Contrast.
5. Press the OK button to enter the Contrast Screen.
The contrast level of LCD display is 1 to 16.
6. Use the Up button to change the level to 08.
7. Press the OK button to save the setting.
8. Press the ESC or OK button to return to the previous menu.
570
LCD Option Board Function
Section 8-6
8-6-18 LCD Factory Setting
This function can initialize the factory setting of the LCD Option Board. The
operation method will be shown in the following example.
1,2,3...
1. Switch to the Setup Mode.
2. Press the Down button to select Other.
3. Press the OK button to enter the Other menu.
4. Press the Down button to select FactorySet.
5. Press the OK button to enter the Factory Setting Screen.
6. Press the Down button to select OK.
Note
Selecting Cancel will result in a return to the previous menu.
7. Press the OK button to start initializing.
8. When the initializing is finished, it will display a complete screen.
9. Press the ESC or OK button to restart the LCD Option Board.
571
Section 8-7
Trouble Shooting
8-7
8-7-1
Trouble Shooting
Symptom at Power ON or during Operation
Symptom
Probable cause
No LCD display
Possible solution
LCD connection error or no power supply
from PLC.
Check if LCD is connected correctly and the
PLC power supply is normal.
Still in startup waiting time.
It's not error. Just wait a moment.
Display EEPROM Error
Screen and blinking red backlight
EEPROM is damaged.
Replace the LCD Option Board.
User settings in EEPROM are corrupted.
Press the ESC button to exit the screen.
User settings backed up in EEPROM will be
replaced by default settings. Then proceed
to reset the screens. (See 8-7-3 for details.)
Display NG Screen
LCD connection error.
Check if LCD is connected correctly.
Communication error between LCD and
PLC.
Check the communication setting of PLC,
switching DipSW4 to ON.
PLC error
Check PLC according to error code and
eliminate the error.
Button is damaged.
Replace the LCD Option Board.
Display Error Screen and
blinking red backlight
Button unresponsing
Display too faint
Note
8-7-2
User setting error.
Check the settings and change it.
Noise disturbing.
Retry after the noise is reduced.
Backlight is damaged.
Replace the LCD Option Board.
Contrast level is too low or too high.
Reset the contrast level.
Do not repair the LCD Option Board by yourself.
Communication Error Message during Operation
When communication error occurs, the error message will be displayed at the
LCD Option Board and the red backlight will blink.
Error message
Parity Error or Framing Error
or Overrun Error
Probable cause
Possible solution
Communication parameters or conditions of Check the communication setting of PLC.
PLC are changed.
LCD connection error.
Check if LCD is still connected correctly.
Noise disturbing.
FCS Error(Sum check)
Noise disturbing.
Buffer overflow
The length of receiving data is beyond the
range of receiving memory.
Noise disturbing.
Connecting Host...
Response code Error
572
LCD connection error.
• Return to normal automatically when the
noise is reduced.
• If the display cannot return to normal,
press the ESC button to restart LCD.
• Return to normal automatically when the
noise is reduced.
• If the display cannot return to normal,
press the ESC button to restart LCD.
Press the ESC button to restart LCD.
Check if LCD is still connected correctly.
The communication between PLC and LCD Check if PLC is running normally.
is out of service.
Operation mistake.
Refer to CJ/CS Communication Manual for
solutions according to an end code.
Noise disturbing.
• Return to normal automatically if the noise
is reduced.
• Press the ESC button to exit the screen.
CX-Programmer and LCD execute some
Press the ESC button to exit the screen.
function at the same time.
Execute this function by either CX-Programmer or LCD.
Section 8-7
Trouble Shooting
8-7-3
Deleting EEPROM Error
1,2,3...
1. A flashing error screen will be displayed when an error occurs.
The following table shows the display items.
a
c
No.
a
Description
Error type
User Monitor setting error
Message setting error
Timer Switch setting error
b
Language setting error
Backlight setting error
Contrast setting error
b
Screen No.
c
Line No.
According to the error message, the setting of User Monitor Screen 2, line
4 is corrupted.
2. Press the ESC button to exit the screen. Once the EEPROM Error Screen
has disappeared, the display will return to normal.
3. Enter the User Monitor Setup Screen 2, line 4.
User settings backed up in EEPROM are replaced by default settings.
Then reset the screen.
573
Trouble Shooting
574
Section 8-7
SECTION 9
Ethernet Option Board
This section gives an outline of the Ethernet Option Board, explains how to install and remove the Ethernet Option Board,
and how to monitor and make settings required for operation. It also lists the errors during operation and provides
countermeasures for troubleshooting.
9-1
9-2
9-3
9-4
9-5
9-6
9-7
9-8
9-9
9-10
9-11
9-12
9-13
Ethernet Option Board Function Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-1-1 Overall system configuration example . . . . . . . . . . . . . . . . . . . . . . .
9-1-2 Connecting the CX-Programmer to PLCs Online via Ethernet . . . .
9-1-3 Receiving Data from OMRON PLCs using Ethernet . . . . . . . . . . . .
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-3-1 System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-3-2 Devices Required for Constructing a Network. . . . . . . . . . . . . . . . .
Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FINS Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-5-1 FINS Communications Service Specifications. . . . . . . . . . . . . . . . .
9-5-2 Overview of FINS Communication Service. . . . . . . . . . . . . . . . . . .
Part Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Comparison with Previous Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installation and Initial Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-8-1 Overview of Startup Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-8-2 Installation and Removing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-8-3 Network Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-8-4 Web Browser Setting Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Memory Allocations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-9-1 CIO Area Allocation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-9-2 DM Area Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Web Browser Setup and Display. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-10-1 Multi-language Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-10-2 Overview of Web Browser Function . . . . . . . . . . . . . . . . . . . . . . . .
9-10-3 System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-10-4 HTTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-10-5 IP Address Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-10-6 IP Router Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-10-7 FINS/TCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-10-8 Unit Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-10-9 Unit Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-10-10 FINS Status. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-10-11 Error Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Trouble Shooting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-11-1 Error Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-11-2 Trouble-shooting with Indicators and Error Code Display . . . . . . .
9-11-3 Error Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Buffer Configuration (CP1W-CIF41) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
576
576
577
578
579
580
580
580
581
582
582
583
584
585
587
587
588
590
592
595
595
597
601
601
601
602
604
605
606
607
608
609
610
611
612
612
615
615
616
620
575
Section 9-1
Ethernet Option Board Function Guide
9-1
Ethernet Option Board Function Guide
9-1-1
Overall system configuration example
Ethernet Option Board provides receiving commands by OMRON standard
protocol FINS for CP1L and CP1H programmable controllers. The Ethernet
Network Interface allows you to easily connect CP1L and CP1H Programmable Controllers onto new or existing Ethernet network and upload/download
programs, communicate between controllers (do not support real-time scanning I/O on Ethernet Option Board).
Connecting through multiple segments, such as over the Internet:
Use FINS/TCP.
FINS
Internet
IP router
Intranet
Firewall
(Server room)
(Office floor)
CX-Programmer
FINS
Ethernet
Ethernet
Router
Router
(Production line)
Ethernet
NS-series PT
FINS
Connecting within the same segment:
Use FINS/UDP.
FINS
Wireless
PLC
PLC
FINS
Ethernet Option Board
Note
Using media with unreliable
connections, such as wireless
LAN: Use FINS/TCP.
Ethernet Option Board
1. Please use CX-Programmer version 8.1 or higher (CX-ONE version 3.1 or higher).
2. Please use CX-Integrator version 2.33 or higher (CX-ONE version 3.1 or higher) to make the
routing table. Except making the routing table for CP1W-CIF41, other functions, such as transferring the parameters and network structure, are not supported by CX-Integrator.
3. Use the Web browser to set the CP1W-CIF41.
4. NS-series HMI version 8.2 or higher can use CP1W-CIF41 through Ethernet.
5. Expect for CX-Programmer and CX-Integrator (only set FINS routing table function), other tools
do not support CP1W-CIF41.
576
Section 9-1
Ethernet Option Board Function Guide
9-1-2
Connecting the CX-Programmer to PLCs Online via Ethernet
Connecting within the
Same Segment
Use the UDP/IP version of the FINS communications service (i.e.,
FINS/UDP). FINS/UDP is supported by many OMRON products and is compatible with earlier Ethernet Units (CS1W-ETN01/ETN11/ETN21 and CJ1WETN11/ETN21). The CX-Programmer can be connected and used with
FINS/UDP.
Connecting through
Multiple Segments
Use the TCP/IP version of the FINS communications service (i.e., FINS/TCP).
It provides automatic recovery at the TCP/IP layer from communications
errors (such as packet loss) that occur during multilevel routing. For CX-Programmer, FINS/TCP can be used to directly connect to the PLC online.
Using Media with
Unreliable Connections,
Such as a Wireless LAN
Use the TCP/IP version of the FINS communications service (i.e., FINS/TCP).
It provides automatic recovery at the TCP/IP layer from communications
errors (such as packet loss) resulting from unreliable connections. For CXProgrammer, FINS/TCP can be used to directly connect to the PLC online.
Connecting from a
Personal Computer with a
Dynamic Private IP
Address
Depending on whether or not the connection will be within the same segment,
either use an IP address conversion method for dynamic IP addresses in the
UDP/IP version of the FINS communications service or use the TCP/IP version of the FINS communications service.
It is possible to connect online to a PLC using the CX-Programmer from a
computer serving as a temporarily connected node or a permanent DHCP client.
For CX-Programmer, FINS/TCP can be used to directly connect to the PLC
online.
Connecting through multiple segments, such as over the Internet:
Use FINS/TCP.
CX-Programmer
FINS
Internet
IP router
Connecting from a computer with a dynamic private IP address:
Use FINS/TCP or FINS/UDP.
Intranet
Firewall
(Office floor)
CX-Programmer
FINS
Ethernet
Ethernet
Router
Router
(Production line)
CX-Programmer
Connecting within the same segment:
Use FINS/UDP.
FINS
Ethernet
PLC
PLC
Wireless
CX-Programmer
FINS
Ethernet Option Board
Using media with unreliable
connections, such as wireless
LAN: Use FINS/TCP.
Ethernet Option Board
577
Section 9-1
Ethernet Option Board Function Guide
9-1-3
Receiving Data from OMRON PLCs using Ethernet
The CP1W-CIF41 Ethernet Option Board can only support receiving FINS
commands from OMRON PLCs using Ethernet.
Connecting within the
Same Segment
Use the UDP/IP version of the FINS communications service (i.e.,
FINS/UDP), and construct applications using the SEND(090), RECV(098),
and CMND(490) instructions in the ladder program. FINS/UDP is supported
by many OMRON products, and is compatible with earlier Ethernet Units
(CS1W-ETN01/ETN11/ETN21 and CJ1W-ETN11/ETN21). The protocol processing for FINS/UDP is simpler than for FINS/TCP, giving FINS/UDP certain
advantages in terms of performance. Another feature of FINS/UDP is that it
can be used for broadcasting.
On the other hand, with FINS/UDP it is necessary to provide measures, such
as retries, for handling communications errors.
Connecting through
Multiple Segments
Use the TCP/IP version of the FINS communications service (i.e., FINS/TCP),
and construct applications using the SEND(090), RECV(098), and
CMND(490) instructions in the ladder program. FINS/TCP is the initial function supported by this Ethernet Option Board (CP1W-CIF41). It provides automatic recovery at the TCP/IP layer from communications errors (such as
packet loss) that occur during multilevel routing.
Intranet
Production line A
Ethernet Unit
Ethernet
Router
FINS message
communications
Connecting through multiple segments:
Use FINS/TCP.
Router
Production line B
Ethernet Option Board
PLC
Only receiving FINS commands via
Ethernet from OMRON PLCs
578
Ethernet Option Board
PLC
Section 9-2
Features
9-2
Features
Compatibility and Speed
The transmission medium of Ethernet side has been upgraded to 100BaseTX, while compatibility with some functions and application interfaces of the
existing Ethernet Unit models for CS/CJ series has been maintained.
Limited by the Toolbus protocol used on the serial side, the processing speed
is only 115.2kbps, slower than the existing Ethernet Unit. The FINS frame
length is less than 1,004 bytes, so the system response performance for the
same FINS message applications is longer than the existing Ethernet Unit.
Various Protocols Available on Ethernet
A variety of protocols make a wide range of applications for use on an Ethernet network. The protocols that can be selected include receiving commands
by OMRON’s standard protocol FINS and reading Ethernet Option Board settings and status by HTTP.
A communications service can be selected according to need, allowing the
PLC to be flexibly integrated with the Ethernet information network.
Improved FINS Message Communications
The following functions have been maintained according to the existing Ethernet Unit models for CS/CJ series.
• The maximum number of nodes is 254.
• Communications are enabled even if the host computer’s IP address is
dynamic.
• An automatic client FINS node address allocation function makes it possible to connect online to the PLC even if no FINS node address has been
set for the host computer.
• FINS message communications are enabled in both UDP/IP and TCP/IP,
but it are only enabled in TCP/IP with up to 2 simultaneous connections .
→Previously it are enabled in TCP/IP with up to 16 simultaneous connections and all can be set to client.
• Multiple FINS applications, such as the CX-Programmer, on the same
computer can be connected online to the PLC via Ethernet.
Use Web Function to Read Ethernet Option Board Settings and Status
A Web function is provided in Ethernet Option Board.
This enables use of a Web browser to read the Ethernet Option Board’s system settings and statuses.
Full Range of Functions for Handling Troubles
A full range of functions is provided for promptly handling any troubles.
• Self-diagnostic function when power is turned ON.
• Error log for recording error information when an error occurs.
579
Section 9-3
System Configuration
9-3
9-3-1
System Configuration
System Configuration
CX-Programmer
CX-Integrator
(3) Hub
(2) Twisted pair cable
(1) CP1W-CIF41
CP1L/CP1H Series PLC
9-3-2
Devices Required for Constructing a Network
The basic configuration for a 100Base-TX Ethernet System consists of one
hub to which nodes are attached in star form using twisted-pair cable. The
devices shown in the following table are required to configure a network with
100Base-TX-type CP1W-CIF41, so prepared them in advance.
Recommended Hubs
580
Network device
(1) Ethernet Option Board
(CP1W-CIF41)
Contents
The Ethernet Option Board is a Communication Unit
that connects a CP1H series or CP1L series PLC to
100Base-TX Ethernet networks.
(They can also be used as 10Base-T.)
(2) Twisted-pair cable
This is twisted-pair cable for connecting 100Base-TX
type Ethernet Option Board to the hub, with an RJ45
Modular Connector at each end.
Use a category 3, 4, 5, or 5e UTP (unshielded twisted
pair) or STP (shielded twisted-pair) cable.
(3) Hub
This is a relay device for connecting multiple nodes in a
star LAN.
For detail on recommended devices for constructing a network, refer to 9-8-3
Network Installation.
Section 9-4
Specifications
9-4
Specifications
Item
Specifications
Model number
CP1W-CIF41
Type
100/10Base-TX (Auto-MDIX)
Applicable PLCs
CP1L and CP1H PLCs
Unit classification
CP1 option port unit
Mounting location
CP1L and CP1H micro PLC option port
Max. number of Units that can be
mounted
Size of Buffers
2 sets (See note.)
8K bytes
Transfer
Media access method
CSMA/CD
Modulation method
Baseband
Transmission paths
Star form
Baud rate
100 Mbit/s (100Base-TX)
10 Mbit/s (10Base-T)
• Half/full auto-negotiation for each port
• Link speed auto-sensing for each port
Transmission media
• Unshielded twisted-pair (UDP) cable
Categories: 5, 5e
• Shielded twisted-pair (STP) cable
Categories: 100Ω at 5, 5e
Transmission Distance
• Unshielded twisted-pair (UDP) cable
Categories: 3, 4, 5, 5e
• Shielded twisted-pair (STP) cable
Categories: 100Ω at 3, 4, 5, 5e
100 m (distance between hub and node)
Current consumption (Unit)
130 mA max. at 5 V DC
Vibration resistance
Conforms to JIS 0040.
10 to 57Hz: 0.075-mm amplitude, 57 to 150 Hz: acceleration 9.8 m/s2 in X, Y, and Z
directions for 80 minutes each (sweep time: 8 minutes×10 sweeps = 80 minutes)
Shock resistance
Conforms to JIS 0041.
Ambient operating temperature
147m/s2, 3 times each in X, Y, and Z directions
0 to 55°C
Ambient humidity
10% to 90% (with no condensation)
Atmosphere
Must be free of corrosive gas.
Ambient storage temperature
-20 to 75°C
Weight
23 g max.
Dimensions
36.4×36.4×28.2 mm (W×H×D)
Note
1. Two CP1W-CIF41 (unit version 2.0) can be mounted in the CP1L/CP1H system.
2. One CP1W-CIF41 (unit version 2.0) and one CP1W-CIF41 (unit version 1.0) can be mounted in
the CP1L/CP1H system.
3. Only one CP1W-CIF41 (unit version 1.0) can be mounted in the CP1L/CP1H system.
If two CP1W-CIF41 are mounted, the CP1W-CIF41 mounted on option board slot 1 will be
abnormal and ERR indicator will be ON, the CP1W-CIF41 on option board slot 2 will work normally.
4. CP1W-CIF41 only supports 32 bytes PING command. If PING command's length is larger than
32 bytes, there is no response.
581
Section 9-5
FINS Communications
9-5
FINS Communications
9-5-1
FINS Communications Service Specifications
Item
Number of nodes
254
Message Length
Date Length
1016 bytes max.
1004 bytes max. (See note)
Number of buffer
Protocol name
14 (1016 bytes×6+240 bytes×8)
FINS/UDP method
Protocol used
UDP/IP
TCP/IP
The selection of UDP/IP or TCP/IP is made from the FINS/TCP Tab by Web browser function.
Number of connections
Port number
--9600 (default)
Can be changed.
No
Protection
Other
Internal table
Note
Specification
FINS/TCP method
2
9600 (default)
Can be changed.
Yes (Specification of client IP
addresses when unit is used as a server)
Items set for each UDP port
Items set for each connection
• Broadcast
• Server specification
• Address conversion method
• Remote IP address spec.
Server: specify IP addresses of clients permitted to
connect.
• Automatic FINS node address allocation
Specify automatic allocation of client FINS node
addresses
This is a table of correspondences for remote FINS node addresses, remote IP
addresses, TCP/UDP, and remote port numbers. It is created automatically when power is
turned ON to the PLC or when the unit is restarted, and it is automatically changed when
a connection is established by means of the FINS/TCP method or when a FINS command
received.
The following functions are enabled by using this table.
• IP address conversion using the FINS/UDP method
• Automatic FINS node address conversion after a connection is established using the
FINS/TCP method
• Automatic client FINS node address allocation using the FINS/TCP method
• Simultaneous connection of multiple FINS applications
Refer to the following diagram for the relation between message length and date length.
10 bytes
FINS header
2 bytes
1004 bytes max.
Command code
Date length
Message length: 1016 bytes max.
582
Section 9-5
FINS Communications
9-5-2
Overview of FINS Communication Service
Basic Functions
FINS commands can be received from other PLCs or computers on the same
Ethernet network by executing SEND(090), RECV(098), or CMND
(490) instructions in the ladder diagram program. This enables various control
operations such as the reading and writing of I/O memory between PLCs,
mode changes, and file memory operations.
Ethernet
IP
UDP or TCP
FINS
CP1L/H CPU Unit
Ethernet Option Board
Ethernet Option Board
Ethernet Option Board
Executing, from the host computer, FINS commands with UDP/IP or TCP/IP
headers enables various control operations, such as the reading and writing
of I/O memory between PLCs, mode changes, and file memory operations.
For example, it is possible to connect online via Ethernet from FINS communications applications such as the CX-Programmer, and to perform remote programming and monitoring.
Upgraded Functions
With the CP1W-CIF41, the following functions have been upgraded.
• The FINS communications service can be executed not only with UDP/IP
but also with TCP/IP, and it is even possible to use FINS communications
with both UDP/IP and TCP/IP together on the same network. Using
TCP/IP makes FINS communications highly reliable.
• Even if the IP address and UDP port number of the host computer (a
DHCP client computer) are changed, it is still possible for the host computer to send FINS commands to PLCs on the Ethernet network and to
receive responses. When UDP is used, either the automatic generation
(dynamic) method or the IP address table method must be selected for IP
address conversion. When TCP is used, changes in IP address and TCP
port numbers are handled automatically.
• Multiple FINS applications (CX-Programmer and user-created application
programs) at the same computer can be connected online to a PLC via
Ethernet (using either TCP/IP or UDP/IP).
Note The message service does not guarantee that a message will reach the destination node. A message may be lost during transmission due to factors such
as noise. To prevent this from occurring when using message services, it is
common to set up retry processing at the node from which instructions are
issued. With the SEND(090), RECV(098), and CMND(490) instructions, retry
processing is executed automatically by specifying the number of retries, so
specify a number other than 0.
583
Section 9-6
Part Names
9-6
Part Names
Label
Attach the label here to show IP address
and subnet mask.
Ethernet Connector
Used to connect the Ethernet twisted-pair
cable.
LED Indicators
Display the operating status of the Option Board.
LED Indicators
Indicator
COMM
ERR
584
Color
Yellow
Status
Not lit
Meaning
Not sending or receiving data.
Red
Flashing
Not lit
Sending or receiving data.
Unit normal.
Lit
Flashing
An fatal error has occurred at the Unit.
An no-fatal error has occurred at the unit.
Section 9-7
Comparison with Previous Models
9-7
Comparison with Previous Models
Model
CP1L-EL/EM
CP1W-CIF41
CS1W-ETN21
CJ1W-ETN21
Local IP address
192.168.250.FINS node
address
192.168.250.1
192.168.250.FINS node
address
FINS node address
Physical layer
Set in PLC setup
100/10Base-TX
(Auto-MDIX)
Set in system settings
100/10Base-TX
(Auto-MDIX)
Set by rotary switch
100/10Base-TX
Number of nodes
Data length of FINS message
254
1004 bytes (Max)
254
1004 bytes (Max)
254
2012 bytes (Max)
FINS buffer size
Driver buffer number
16K bytes
Input: 55×592 bytes
Output: 55×592 bytes
The last packet will be
dropped.
3 for user
1 for CX-Programmer auto
connection
Not supported
8K bytes
Input: 16×256 bytes
Output: 8×256 bytes
Restart Ethernet function
2 (only server)
392K bytes
Input: 50×1.5K bytes
Output: 50×1.5K bytes
The last packet will be
dropped.
16
Not supported
Not supported
Server specification
Specification by IP
address or by host name
(DNS Client Function)
Not supported
Specification by IP
address or by host name
(DNS Client Function)
FINS
comm.
service
A computer automatically
acquiring IP addresses
can send commands to
the PLC and receive
responses.
A computer automatically
acquiring IP addresses
can send commands to
the PLC and receive
responses.
A computer automatically
acquiring IP addresses
can send commands to
the PLC and receive
responses.
FINS communication with Possible (with automatic
computer without fixed
allocation) (Client FINS
node address
automatic node address
allocation function, TCP/IP
only)
Possible (with automatic
allocation) (Client FINS
automatic node address
allocation function, TCP/IP
only)
Possible (with automatic
allocation) (Client FINS
automatic node address
allocation function, TCP/IP
only)
Handling TCP/IP
With FINS communications, both UDP/IP and
TCP/IP (16 max.) possible.
Possible (with both UDP/
IP and TCP/IP)
Process of driver buffer overflow
Connection number (FINS/TCP)
PLC maintenance via the Internet
Automatic IP address
acquisition
With FINS communications, both UDP/IP and
TCP/IP (3 max.) possible.
Simultaneous connection
of multiple applications in
a computer
Mail function
Possible (with both UDP/
IP and TCP/IP)
With FINS communications, both UDP/IP and
TCP/IP (2 max.) possible.
(Only can be set to server)
Possible (with both UDP/
IP and TCP/IP)
Not supported
Not supported
E-mail attachments with I/
O memory data are possible for the mail send function. (SMTP, file
attachment) With the mail
receive function, commands can be received
from the PLC. (POP3, mail
receive)
FTP server function
Socket services function
Not supported
Supported
Not supported
Not supported
Supported
Supported
Automatic clock information
adjustment
IP conflict (GARP)
Supported
Not supported
Supported
Supported
Not supported
Supported
TCP keep-alive function
Multicast function
Supported
Not supported
Not supported
Not supported
Supported
Not supported
Web function
Not supported
Supported
Supported
585
Comparison with Previous Models
Section 9-7
Improved FINS Message Communications from CP1W-CIF41
The following functions have been maintained according to the existing Ethernet Unit models for CP1W-CIF41.
• The maximum number of nodes is 254.
• Communications are enabled even if the host computer's IP address is
dynamic.
• An automatic client FINS node address allocation function makes it possible to connect online to the PLC even if no FINS node address has been
set for the host computer.
• FINS message communications are enabled in both UDP/IP and TCP/IP,
and it is enabled in TCP/IP with up to 3 simultaneous connections.
→Previously CP1W-CIF41 is enabled in TCP/IP with up to 2 simultaneous
connections and all can only be set to server.
• Multiple FINS applications, such as the CX-Programmer, on the same
computer can be connected online to the PLC via Ethernet.
586
Section 9-8
Installation and Initial Setup
9-8
Installation and Initial Setup
9-8-1
Overview of Startup Procedure
The following procedure is the same for the CS Series and CJ Series.
Refer to Ethernet Unit Construction of Networks Operation
Determine the local IP address Manual for CS/CJ Series (Cat. No. W420-E1-05) SECTION 5
and address conversion method. Determining IP Addresses.
Refer to 9-8-2 Installation and Removing.
Mount the Unit to the PLC.
Refer to 9-8-3 Network Installation.
Connect to the network
using twisted-pair cable.
Turn ON power to the CPU Unit.
Connecting to the Ethernet Unit
without making any settings.
Set only the IP address for simple
application.
(See note 1.)
Use the default IP address.
Set local IP address in DM Area
words allocated for CPU Unit.
Refer to 9-8-4 Web Browser Setting Function.
Set the IP address freely with
Web function.
Refer to 9-9-2 DM Area Allocations.
(See note 2.)
Refer to Ethernet Unit Construction of Networks Operation Manual for CS/CJ Series
(Cat. No. W420-E1-05) 6-4 Creating Routing Tables.
Create the routing tables.
(See note 3.)
Perform Unit setup.
(Create IP router tables.)
Refer to 9-10 Web Browser Setup and Display.
(See note 4.)
Note
1. When using this method, always leave the local IP address of system setup in the Ethernet
Option Board set to the value of 0.0.0.0. If this area contains any other value, any setting made
in the allocated CIO words will be overwritten with it.
2. The local IP address and other parameters can be set from the Web browser.
3. It is not necessary step, and the CX-Integrator version 2.33 or higher (CX-ONE version 3.1 or
higher) is required.
When the FINS communications service is used, routing tables must be created in advance.
Routing tables are required in the following circumstances.
• When communicating with a PLC or computer on another network (e.g. remote programming
or monitoring using FINS message or a CX-programmer)
• When multiple Communications Units are mounted to a single PLC (e.g. CPU unit)
• When routing tables are used for one or more other nodes on the same network
4. It is not necessary step, and the Web browser is required.
587
Section 9-8
Installation and Initial Setup
9-8-2
Installation and Removing
The following processing explains how to install and remove an Ethernet
Option Board.
!Caution Always turn OFF the power supply to the CPU unit and wait until all the operation indicators go out before installing or removing the Ethernet Option
Board.
Installation
1,2,3...
1. Press the up/down lock-levers on both sides of the Option Board slot cover
at the same time to unlock the cover, and then pull the cover out.
2. Check the alignment to make the corner cut of the Ethernet Option Board
fit in the Option Board slot, and firmly press the Ethernet Option Board in
until it snaps into place.
Option Board slot 2
Option Board slot 1
Operation indicators
Corner Cut
Front
Back
Ethernet Option Board
Note
588
If two CP1W-CIF41 (unit version 1.0) Ethernet Option Boards are
mounted on the CP1L/CP1H PLC, the CP1W-CIF41 mounted on Option Board slot1 (left side) will run in abnormal status and ERR indicator
will be ON. If the ladder program operates the with CP1W-CIF41 fatal
error, the PLC will generate the non-fatal error.
Section 9-8
Installation and Initial Setup
3. For CPU Units with 30, 40 or 60 I/O points, switch DipSW4 of the CPU unit
to ON, if the Ethernet Option Board is mounted on the Option Board slot 1
(left side). Switch DipSW5 of the CPU unit to ON, if the Ethernet Option
Board is mounted on the Option Board slot 2 (right side).
For CPU Units with 14 or 20 I/O points, switch DipSW4 of the CPU unit to
ON.
Note
DipSW4 and DipSW5 are OFF at shipment.
ON
1
2
3
DipSW4
4
DipSW5
5
6
!Caution In CP1H or CP1L system, option board setting should be set to Toolbus 115K
to ensure the work normally.
There are two methods to set this setting. One is to turn DipSW4 or DipSW5
to ON, and another is to set option board setting to Toolbus 115K by CX-Programmer.
Removing
Press the up/down lock-levers on both sides of the Ethernet Option Board at
the same time to unlock the Ethernet Option Board, and then pull it out.
Press
Press
Lock lever
Lock lever
589
Section 9-8
Installation and Initial Setup
9-8-3
Network Installat