OMRON CS1 Series Programmable Controllers User Manual
PDF
ドキュメント
広告
広告
Cat.No. W339–E1–3
SYSMAC CS1 Series
CS1G/H-CPU**-EV1
Programmable Controllers
OPERATION MANUAL
SYSMAC CS1 Series
CS1G/H-CPU-EV1
Programmable Controllers
Operation Manual
Revised May 2000
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.
! WARNING
Indicates a potentially hazardous situation which, if not avoided, could result in death or
serious injury.
! 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 “PC” means Programmable Controller and is not used as an abbreviation for anything else.
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, 1999
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
TABLE OF CONTENTS
PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 General Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3 Safety Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4 Operating Environment Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5 Application Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6 Conformance to EC Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SECTION 1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-1
1-2
1-3
1-4
1-5
1-6
1-7
1-8
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
New Functions in Version-1 CS1-series CPU Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Special Features and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Function Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Comparison of CS1 and C200HX/HG/HE Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Checking the Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Initial Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the Internal Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SECTION 2
Specifications and System Configuration . . . . . . . . . . . .
2-1
2-2
2-3
2-4
2-5
2-6
Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CPU Unit Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Basic System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Expanded System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Unit Current Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SECTION 3
Nomenclature, Functions, and Dimensions . . . . . . . . . . .
3-1
3-2
3-3
3-4
3-5
3-6
3-7
3-8
3-9
3-10
CPU Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
File Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Programming Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Power Supply Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Backplanes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Basic I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C200H High-density I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Standard B7A Interface Unit C200H-B7AI1/B7AO1 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Group-2 B7A Interface Units (C200H-B7A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Analog Timer Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SECTION 4
Operating Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4-1
4-2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SECTION 5
Installation and Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-1
5-2
5-3
Fail-safe Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xiii
xiv
xiv
xiv
xvi
xvi
xx
1
2
2
4
12
18
23
24
27
29
30
36
41
54
67
82
91
92
99
106
115
117
122
140
145
147
156
161
162
164
175
176
177
192
vii
TABLE OF CONTENTS
SECTION 6
CPU Unit Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-1
6-2
6-3
6-4
Internal Structure of the CPU Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Programs and Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Description of Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SECTION 7
Memory Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-1
7-2
7-3
7-4
7-5
7-6
7-7
7-8
7-9
7-10
7-11
7-12
7-13
7-14
7-15
7-16
7-17
7-18
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
I/O Memory Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Precautions in Using C200H Special I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CIO Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Work Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Holding Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Auxiliary Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TR (Temporary Relay) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Timer Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Counter Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Memory (DM) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Extended Data Memory (EM) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Task Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Condition Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Clock Pulses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Parameter Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SECTION 8
I/O Allocations and Initial Settings . . . . . . . . . . . . . . . . .
8-1
8-2
8-3
8-4
8-5
I/O Allocations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Exchange with CPU Bus Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DIP Switch Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PC Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Explanations of PC Setup Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SECTION 9
Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-1
9-2
9-3
Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Checking Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SECTION 10
Instruction Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-1
10-2
10-3
10-4
10-5
10-6
10-7
10-8
viii
Sequence Input Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sequence Output Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sequence Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Timer and Counter Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Comparison Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Movement Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Shift Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Increment/Decrement Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
215
216
218
220
222
227
228
229
236
237
252
253
254
266
267
268
268
270
272
277
278
278
280
281
285
286
299
303
306
314
325
326
358
367
373
374
376
378
381
384
386
389
393
TABLE OF CONTENTS
10-9 Symbol Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-10 Conversion Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-11 Logic Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-12 Special Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-13 Floating-point Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-14 Table Data Processing Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-15 Data Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-16 Subroutine Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-17 Interrupt Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-18 Step Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-19 Basic I/O Unit Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-20 Serial Communications Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-21 Network Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-22 File Memory Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-23 Display Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-24 Clock Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-25 Debugging Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-26 Failure Diagnosis Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-27 Other Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-28 Block Programming Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-29 Text String Processing Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-30 Task Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SECTION 11
Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-1
11-2
11-3
11-4
Task Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Interrupt Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Programming Device Operations for Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SECTION 12
File Memory Functions . . . . . . . . . . . . . . . . . . . . . . . . . . .
12-1 File Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12-2 Manipulating Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12-3 Using File Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SECTION 13
Advanced Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13-1
13-2
13-3
13-4
13-5
13-6
Cycle Time/High-speed Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Serial Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Startup Settings and Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Diagnostic and Debugging Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Other Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SECTION 14
Program Transfer, Trial Operation, and Debugging . . .
14-1 Program Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14-2 Trial Operation and Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SECTION 15
CPU Unit Operation and the Cycle Time . . . . . . . . . . . .
15-1
15-2
15-3
15-4
15-5
CPU Unit Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CPU Unit Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Power OFF Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Computing the Cycle Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Instruction Execution Times and Number of Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
394
399
405
407
408
411
414
418
419
420
421
422
423
424
425
425
426
427
428
428
433
437
439
440
446
454
464
467
468
480
503
509
510
513
522
530
535
539
541
542
542
549
550
551
553
557
568
ix
TABLE OF CONTENTS
SECTION 16
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16-1 Error Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16-2 Error Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16-3 Troubleshooting Racks and Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SECTION 17
Inspection and Maintenance . . . . . . . . . . . . . . . . . . . . . . .
17-1 Inspections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17-2 Replacing User-serviceable Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
595
596
597
613
617
618
620
Appendices
A
B
C
D
E
F
G
H
Specifications of Basic I/O Units and High-density I/O Units . . . . . . . . . . . . . . . . . . . . . . . .
Auxiliary Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Comparison Charts: CS1-series, CV-series, C200HG/HE/HX PCs . . . . . . . . . . . . . . . . . . . .
Memory Map of PC Memory Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PC Setup Coding Sheets for Programming Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting to the RS-232C Port on the CPU Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Restrictions in Using C200H Special I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Changes from Previous Host Link Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
x
629
727
763
783
785
795
803
809
813
825
About this Manual:
This manual describes the installation and operation of the CS1G/H-CPU-EV1 CPU Units for
CS1-series Programmable Controllers (PCs) and includes the sections described on the following page.
Please read this manual and all related manuals listed in the following table and be sure you understand
information provided before attempting to install or use CS1G/H-CPU-EV1 CPU Units in a PC System.
Name
Cat. No.
Contents
SYSMAC CS1-series
CS1G/H-CPU-EV1
Programmable Controllers
Operation Manual
SYSMAC CS1-series
CS1G/H-CPU-EV1
Programmable Controllers
Programming Manual
SYSMAC CS1-series
C200H-PRO27-E, CQM1-PRO01-E
Programming Consoles
Operation Manual
SYSMAC CS1-series
CS1G/H-CPU-EV1,
CS1W-SCB21/41, CS1W-SCU21
Communications Commands
Reference Manual
W339
Describes the installation and operation of the CS1-series PCs.
(This manual)
W340
Describes the ladder diagram programming instructions
supported by CS1-series PCs.
W341
Provides information on how to program and operate
CS1-series PCs using a Programming Console.
W342
Describes the C-series (Host Link) and FINS communications
commands used with CS1-series PCs.
SYSMAC WS02-CXP-E
CX-Programmer User Manual
W361
SYSMAC WS02-CXP-E
CX-Server User Manual
W362
Provide information on how to use the CX-Programmer, a
programming device that supports the CS1-series PCs, and
the CX-Server contained within CX-Programmer.
SYSMAC CS1-series
CS1W-SCB21/41, CS1W-SCU21
Serial Communications Boards and
Serial Communications Unit
Operation Manual
W336
Describes the use of Serial Communications Unit and Boards
to perform serial communications with external devices,
including the usage of standard system protocols for OMRON
products.
SYSMAC WS02-PSTC1-E
CX-Protocol Operation Manual
W344
Describes the use of the CX-Protocol to create protocol
macros as communications sequences to communicate with
external devices.
SYSMAC CS1-series
CS1W-ETN01 Ethernet Unit
Operation Manual
W343
Describes the installation and operation of CS1W-ETN01
Ethernet Unit.
! WARNING Failure to read and understand the information provided in this manual may result in
personal injury or death, damage to the product, or product failure. Please read each
section in its entirety and be sure you understand the information provided in the section
and related sections before attempting any of the procedures or operations given.
xi
About this Manual, Continued
This manual contains the following sections.
Section 1 introduces the special features and functions of the CS1-series PCs and describes the differences between these PCs and the earlier C200HX/HG/HE PCs.
Section 2 provides tables of standard models, Unit specifications, system configurations, and a comparison between different Units.
Section 3 provides names of Unit components and their functions. Dimensions are also provided.
Section 4 outlines the steps required to assemble and operate a CS1 PC system.
Section 5 describes how to install a PC System, including mounting and wiring Units. Follow instructions
carefully. Improper installation can cause the PC to malfunction, resulting in very dangerous situations.
Section 6 describes the basic structure and operation of the CPU Unit.
Section 7 describes the structure and functions of the I/O Memory Areas and Parameter Areas.
Section 8 describes I/O allocation to Basic I/O Units and Special Units, data exchange with CPU Bus
Units, and initial hardware and software settings.
Section 9 describes basic information required to write, check, and input programs.
Section 10 outlines the instructions that can be used to write user programs.
Section 11 describes the operation of tasks.
Section 12 describes the functions used to manipulate file memory.
Section 13 provides details on advanced functions: Cycle time/high-speed processing, index registers,
serial communications, startup and maintenance, diagnostic and debugging, Programming Devices, and
CS1 Basic I/O Unit input response time settings.
Section 14 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 15 describes the internal operation of CPU Units and the cycle used for internal processing.
Section 16 provides information on hardware and software errors that occur during PC operation.
Section 17 provides information on hardware maintenance and inspections.
The Appendices provide Unit specifications, current/power consumptions, Auxiliary Area words and
bits, a comparison of CS1 and previous PCs, internal I/O addresses, and PC Setup settings.
xii
PRECAUTIONS
This section provides general precautions for using the CS1-series Programmable Controllers (PCs) 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 PC
system.
1 Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 General Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3 Safety Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4 Operating Environment Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5 Application Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6 Conformance to EC Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-1
Applicable Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-2
Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-3
Conformance to EC Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-4
Relay Output Noise Reduction Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xiv
xiv
xiv
xvi
xvi
xx
xx
xx
xx
xx
xiii
3
Safety Precautions
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 PC and all PC 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 PC System to the above-mentioned
applications.
3
Safety Precautions
! WARNING The CPU Unit refreshes I/O even when the program is stopped (i.e., even in
PROGRAM mode). Confirm safety thoroughly in advance before changing the
status of any part of memory allocated to I/O Units, Special I/O Units, or CPU Bus
Units. Any changes to the data allocated to any Unit may result in unexpected
operation of the loads connected to the Unit. Any of the following operation may
result in changes to memory status.
• Transferring I/O memory data to the CPU Unit from a Programming Device.
• Changing present values in memory from a Programming Device.
• Force-setting/-resetting bits from a Programming Device.
• Transferring I/O memory files from a Memory Card or EM file memory to the
CPU Unit.
• Transferring I/O memory from a host computer or from another PC on a network.
! 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.
xiv
Safety Precautions
3
! 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 Do not touch the Power Supply Unit while power is being supplied or
immediately after power has been turned OFF. Doing so may result in 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 PC or another external factor
affecting the PC 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.
• The PC will turn OFF all outputs when its self-diagnosis function detects any
error or when a severe failure alarm (FALS) instruction is executed. As a countermeasure for such errors, external safety measures must be provided to ensure safety in the system.
• The PC outputs may remain ON or OFF due to deposition 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-VDC output (service power supply to the PC) 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.
! Caution
Confirm safety before transferring data files stored in the file memory (Memory
Card or EM file memory) to the I/O area (CIO) of the CPU Unit using a peripheral
tool. Otherwise, the devices connected to the output unit may malfunction regardless of the operation mode of the CPU Unit.
! 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 changing contents of the I/O memory 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 Unit to the
torque specified in the operation manual. The loose screws may result in burning
or malfunction.
xv
5
Application Precautions
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.
! 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
5
The operating environment of the PC 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 PC System. Be
sure that the operating environment is within the specified conditions at installation and remains within the specified conditions during the life of the system.
Application Precautions
Observe the following precautions when using the PC System.
• You must use the CX-Programmer (programming software that runs on Windows) if you need to program more than one task. A Programming Console
can be used to program only one cyclic task plus interrupt tasks. A Programming Console can, however, be used to edit multitask programs originally
created with the CX-Programmer.
• There are restrictions in the areas and addresses that can be accessed in I/O
memory of the CS1-series CPU Units when using the C200H Special I/O Units
in combination with the following functions.
• There are restrictions in data transfer with the CPU Unit when programming transfers inside an ASCII Unit using the PC READ, PC WRITE, and
similar commands.
• There are restrictions in data transfer with the CPU Unit for allocated bits
and DM area specifications (areas and addresses for source and destination specifications).
• The CompoBus/D output area for a CompoBus/D Master Unit (CIO 0050
to CIO 0099) overlaps with the I/O bit area (CIO 0000 to CIO 0319). Do not
use automatic allocations for I/O in any system where allocations to the
CompoBus/D system will overlap with allocations to I/O Units. Instead,
use a Programming Device or the CX-Programmer to manually allocate
I/O for the CompoBus/D devices, being sure that the same words and bits
are not allocated more than once, and transfer the resulting I/O table to the
CPU Unit. If CompoBus/D communications are attempted when the same
xvi
5
Application Precautions
bits are allocated to both CompoBus/D devices and I/O Units (which can
occur even if automatic allocation is used), the CompoBus/D devices and
I/O Units may both exhibit faulty operation.
• Special bits and flags for PC Link Units (CIO 0247 to CIO 0250) overlap
with the I/O bit area (CIO 0000 to CIO 0319). Do not use automatic allocations for I/O in any system where allocations to the I/O Units will overlap
with allocations to I/O Units. Instead, use a Programming Device or the
CX-Programmer to manually allocate I/O to I/O Units, being sure that the
the special bits and flags for PC Link Units are not used, and transfer the
resulting I/O table to the CPU Unit. If operation is attempted when the special bits and flags for PC Link Units are also allocated to I/O Units (which
can occur even if automatic allocation is used), the PC Link Units and I/O
Units may both exhibit faulty operation.
! WARNING Always heed these precautions. Failure to abide by the following precautions
could lead to serious or possibly fatal injury.
• Always connect to a ground of 100 Ω or less when installing the Units. Not connecting to a ground of 100 Ω or less may result in electric shock.
• A ground of 100 Ω or less must be installed when shorting the GR and LG terminals on the Power Supply Unit.
• Always turn OFF the power supply to the PC before attempting any of the following. Not turning OFF the power supply may result in malfunction or electric
shock.
• Mounting or dismounting I/O Units, CPU Units, Inner Boards, or any other
Units.
• Assembling the Units.
• Setting DIP switches or rotary switches.
• Connecting cables or wiring the system.
• Connecting or disconnecting the connectors.
! Caution
Failure to abide by the following precautions could lead to faulty operation of the
PC or the system, or could damage the PC or PC Units. Always heed these precautions.
• When using a CPU Unit for the first time, install the CS1W-BAT1 Battery provided with the Unit and clear all memory areas from a Programming Device
before starting to program.
• When using the internal clock, turn ON power after installing the battery and
set the clock from a Programming Device or using the DATE(735) instruction.
The clock will not start until the time has been set.
• When creating an AUTOEXEC.IOM file from a Programming Device (a Programming Console or the CX-Programmer) to automatically transfer data at
startup, set the first write address to D20000 and be sure that the size of data
written does not exceed the size of the DM Area. When the data file is read
from the Memory Card at startup, data will be written in the CPU Unit starting at
D20000 even if another address was set when the AUTOEXEC.IOM file was
created. Also, if the DM Area is exceeded (which is possible when the CX-Programmer is used), the remaining data will be written to the EM Area.
• Always turn ON power to the PC before turning ON power to the control system. If the PC 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 PC.
xvii
5
Application Precautions
• 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.
• 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.
• Interlock circuits, limit circuits, and similar safety measures in external circuits
(i.e., not in the Programmable Controller) must be provided by the customer.
• Do not turn OFF the power supply to the PC when data is being transferred. In
particular, do not turn OFF the power supply when reading or writing a Memory
Card. Also, do not remove the Memory Card when the BUSY indicator is lit. To
remove a Memory Card, first press the memory card power supply switch and
then wait for the BUSY indicator to go out before removing the Memory Card.
• If the I/O Hold Bit is turned ON, the outputs from the PC will not be turned OFF
and will maintain their previous status when the PC 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.)
• When supplying power at 200 to 240 VAC, always remove the metal jumper
from the voltage selector terminals. The product will be destroyed if 200 to
240 VAC is supplied while the metal jumper is attached.
• Always use the power supply voltages 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.
• Install external breakers and take other safety measures against short-circuiting in external wiring. Insufficient safety measures against short-circuiting may
result in burning.
• Do not apply voltages to the Input Units in excess of the rated input voltage.
Excess voltages may result in burning.
• Do not apply voltages or connect loads to the Output Units in excess of the
maximum switching capacity. Excess voltage or loads may result in burning.
• Disconnect the functional ground terminal when performing withstand voltage
tests. Not disconnecting the functional ground terminal may result in burning.
• Install the Units properly as specified in the operation manuals. Improper
installation of the Units may result in malfunction.
• Be sure that all the mounting screws, terminal screws, and cable connector
screws are tightened to the torque specified in the relevant manuals. Incorrect
tightening torque may result in malfunction.
• Leave the label attached to the Unit when wiring. Removing the label may result in malfunction if foreign matter enters the Unit.
• 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.
• Wire all connections correctly.
• Double-check all wiring and switch settings before turning ON the power supply. Incorrect wiring may result in burning.
• Mount Units only after checking terminal blocks and connectors completely.
xviii
Application Precautions
5
• Be sure that the terminal blocks, Memory Units, expansion cables, and other
items with locking devices are properly locked into place. Improper locking
may result in malfunction.
• Check switch settings, the contents of the DM Area, and other preparations
before starting operation. Starting operation without the proper settings or data
may result in an unexpected 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.
• 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 PC.
• Force-setting/force-resetting any bit in memory.
• Changing the present value of any word or any set value in memory.
• Resume operation only after transferring to the new CPU Unit the contents of
the DM Area, HR Area, and other data required for resuming operation. Not
doing so may result in an unexpected operation.
• 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 or other wiring lines. 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 a Unit, be sure to first touch a grounded metallic object in order
to discharge any static build-up. Not doing so may result in malfunction or damage.
• When transporting or storing circuit boards, cover them in antistatic material to
protect them from static electricity and maintain the proper storage temperature.
• Do not touch circuit boards or the components mounted to them with your bare
hands. There are sharp leads and other parts on the boards that may cause
injury if handled improperly.
• Do not short the battery terminals or charge, disassemble, heat, or incinerate
the battery. Do not subject the battery to strong shocks. 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.
• UL standards required that batteries be replaced only by experienced technicians. Do not allow unqualified persons to replace batteries.
xix
Conformance to EC Directives
6
Conformance to EC Directives
6-1
Applicable Directives
6
• 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 Applicable EMC (Electromagnetic Compatibility) standards are as follows:
EMS (Electromagnetic Susceptibility): EN61131-2
EMI (Electromagnetic Interference):
EN50081-2
(Radiated emission: 10-m regulations)
Low Voltage Directive
Always ensure that devices operating at voltages of 50 to 1,000 VAC and 75 to
1,500 VDC meet the required safety standards for the PC (EN61131-2).
6-3
Conformance to EC Directives
The CS1-series PCs comply with EC Directives. To ensure that the machine or
device in which the CS1-series PC is used complies with EC Directives, the PC
must be installed as follows:
1, 2, 3...
1. The CS1-series PC must be installed within a control panel.
2. You must use reinforced insulation or double insulation for the DC power
supplies used for the communications power supply and I/O power supplies.
3. CS1-series PCs complying with EC Directives also conform to the Common
Emission Standard (EN50081-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.
6-4
Relay Output Noise Reduction Methods
The CS1-series PCs conforms to the Common Emission Standards
(EN50081-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 PC.
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.
xx
6
Conformance to EC Directives
Countermeasures
(Refer to EN50081-2 for more details.)
Countermeasures are not required if the frequency of load switching for the
whole system with the PC included is less than 5 times per minute.
Countermeasures are required if the frequency of load switching for the whole
system with the PC included is more than 5 times per minute.
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
Power
supply
Yes
Yes
Inductive
load
CR method
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.
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.
DC
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 dielectric strength of the capacitor
must be 200 to 300 V. If the circuit is
an AC circuit, use a capacitor with no
polarity.
Power
supply
No
Yes
Inductive
load
Varistor method
Power
supply
Yes
Inductive
load
Diode method
Yes
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.
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.
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 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.
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.
xxi
6
Conformance to EC Directives
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
Providing a dark current of
approx. one-third of the rated
value through an incandescent
lamp
xxii
COM
Providing a limiting resistor
SECTION 1
Introduction
This section introduces the special features and functions of the CS1-series PCs and describes the differences between these
PCs and the earlier C200HX/HG/HE PCs.
1-1
1-2
1-3
1-4
1-5
1-6
1-7
1-8
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
New Functions in Version-1 CS1-series CPU Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Special Features and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-3-1 Special Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-3-2 Versatile Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Function Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Comparison of CS1 and C200HX/HG/HE Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Checking the Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Initial Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the Internal Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
2
4
4
8
12
18
23
24
27
1
Section
Overview
1-1
1-2
Overview
The CS1-series PCs are medium-sized Programmable Controllers that provide
improved programming efficiency by dividing the program into tasks. The
CS1-series PCs also feature faster processing, higher capacities, multiple ports
supporting protocol macros, improved seamless communications across three
network levels, and much more, enabling them to flexibly handle advanced information capabilities as core FA controllers.
CS1-series PC
Improvements in Basic
Performance
CPU Unit
Structured Programming
The program is divided into tasks.
Faster instruction execution
and peripheral servicing
Symbols can be used in programming.
Faster I/O bus operation
The overall performance of the system is improved by executing only the required tasks.
Larger memory capacity
Modification and debugging are simplified.
Instruction operands can be
specified binary or BCD
Programs from earlier PCs
are compatible
The program arrangement can be changed.
Serial
Communications
Unit
Serial
Memory
Communications Card
Board
Step control and block programming instructions can be used.
Comments can be added to make the program easier to understand.
Program
Protocol Macro Function Serves
Multiple Ports
Task
Task
Up to 34 ports can be connected (Serial
Communications Boards + Serial Communications Units).
Remote Programming, Monitoring
and Seamless Links between Networks
Different Protocol Macros can be allocated
to each port.
Programmable
Terminal or
other device
Generalpurpose
I/O device
Task
Programming
Console
FINS commands allow communications between nodes in different networks.
Remote programming and monitoring can be
performed.
Personal
computer
Full Complement of Versatile Functions
Memory Card and file processing functions
Simplify programs with specialized instructions such as
the table data and text string processing instructions
Troubleshooting functions
Data tracing function
Minimum (fixed) cycle time function
I/O refreshing method selection
PC Setup functions
Use Windows tools to create multiple environments in a
single personal computer.
1-2
New Functions in Version-1 CS1-series CPU Units
The CS1-series CPU Units functions have been upgraded as listed in the following table for the CS1G/H-CPU-EV1. Refer to the relevant section page for
details.
Functions supported only by the CS1G/H-CPU-EV1 are indicated by “(-EV1
only).”
2
Section
Overview
Function
Content
Data files supported
It is now possible to read hexadecimal
in CSV format and as data within I/O memory in CSV format
text files (.txt)
and as text files by using the FREAD
and FWRIT instructions.
(Previously, only binary data format
was possible.)
File manipulation
(format, delete, etc.)
using instructions
The CPU Unit can manipulate its own
file memory using the CMND
instruction.
Program
replacement during
operation
(Previously, the CPU Unit could not
send FINS commands for file memory
manipulation using the CMND
instruction.)
It is now possible to read (replace) the
entire user program from the Memory
Card to the CPU Unit during operation.
(Previously, it was possible to replace
program files only when the power was
turned ON by using AUTOEXEC.OBJ.)
DM files and EM files
for automatic transfer
when power is turned
ON
Easy backup
It is now possible to read DM files and
EM files for automatic transfer to the
CPU Unit when the power is turned
ON.
(Previously, it was possible to store
only DM area data allocated to Special
I/O Units and Inner Boards (starting
with D20000). When reading
general-purpose DM or EM area data,
a FREAD instruction was necessary
and could not be done when the power
was turned ON.)
It is now possible to back up all data
(user programs, parameters, and I/O
memory) on the Memory Card by
pressing the Memory Card power
supply switch when the simple backup
setting has been made with the DIP
switch.
Application
1-2
Reference
Production results and other data in the Section 12
CPU Unit I/O memory can be logged in File Memory
the Memory Card in CSV or text format, Functions
and can then be read and edited using
spreadsheet software via a Memory
Card Adapter.
Conversely, settings stored in CSV or
text format in the Memory Card by
spreadsheet software can be read into
the CPU Unit I/O memory.
Operations such as format file, delete,
copy, change name, and create
directory can be manipulated on the
Memory Card from the ladder program
during operation.
Switching control operations without
stopping the PC.
Replacing programs without using
Programming Devices.
Storing data settings in data memory
when the power is turned ON.
Reading data when the power is turned
ON instead of requiring a FREAD
instruction.
If a malfunction occurs, all data in the
CPU Unit at the time can be recorded
without using a Programming Device.
(Previously, it was necessary to back
up all data by writing it to the Memory
Card using a Programming Device.)
Faster online editing
If part of the program is changed by the
Programming Device when the CPU
Unit is in MONITOR mode, the amount
the cycle time is extended for
overwriting has been reduced.
The effects on equipment operation
due to changes in the program during
operation for program maintenance
have been reduced.
14-2 Trial
Operation
and
Debugging
Monitoring equipment and making
equipment settings using a PT
(Programmable Terminal) can now be
performed faster.
2-5-2
Systems
(Previously, the maximum extension to
the cycle time was 90 ms. It is now
12 ms.)
Faster NT Links
High-speed NT Links (1:N mode) are
now supported.
Faster communications with PTs than
the previous standard NT Links (1:N
mode) is now possible. (High-speed NT
Links are possible with the following
PTs only: NT31-V2 and NT631-V2.)
13-3 Serial
Communications
3
Section
Special Features and Functions
1-3
1-3
Special Features and Functions
1-3-1 Special Features
Improvements in Basic Performance
The CS1 Series provides higher speed, greater capacity, and more functions in
a package as compact as the C200H PCs.
Faster Cycle Times
Instruction processing times have been reduced to 0.04 µs min. for basic
instructions, 0.12 µs min. for special instructions, and 10.2 µs min. for floatingpoint calculations. The time required for overseeing (overhead), I/O refreshing,
and peripheral servicing has also been reduced dramatically.
Extra Capacity for High
Value-added Programs
With capacity for 250,000 program steps, up to 448,000 words of Data Memory,
and up to 5,120 I/O points, there is plenty of memory for complex programs, intricate interfaces, communications, and data processing.
Binary Operand Settings
Increase Setting Ranges
In earlier PCs, most instruction operands had to be specified in BCD (0 to 9,999),
but in the CS1 they can be specified in binary (0 to FFFF hexadecimal or 0 to
65,535 decimal). As an example, the BLOCK TRANSFER instruction can now
transfer data from up to 65,535 words rather than 9,999 words. Also the maximum DM address that can be indirectly addressed is now D32767 rather than
the maximum DM address of D09999 in C200HX/HG/HE PCs.
Program Compatibility
Programs from earlier OMRON PCs (such as the C200H, C200HS, C200HX/
HG/HE, and CV Series) can be imported into the CS1 Series.
C200H and CS1 Units
Supported
The wide variety of C200H Units (about 90 varieties) can be used in the CS1
Series as well as the High-density CS1 Units, such as the 96-point I/O Units and
8-point Analog I/O Units (4 inputs and 4 outputs).
Structured Programming
Division of the Program
into Tasks
When the program is divided into tasks that handle separate functions, control
systems, or processes, several programmers can develop these separate tasks
simultaneously.
There can be up to 32 regular (cyclically executed) tasks and 256 interrupt tasks.
There are four types of interrupts: Power OFF Interrupts, Scheduled Interrupts,
I/O Interrupts, and External I/O Interrupts. (External I/O Interrupts are generated
from Special I/O Units or Serial Communications Boards.)
Task
Earlier program
Task
Task
Task
4
Section
Special Features and Functions
1-3
When a new program is being created, standard programs can be combined as
tasks to create an entire program.
Standard programs
Program ABC
Using Symbols
Program ABD
Task 1 (A)
Task 1 (A)
Task 2 (B)
Task 2 (B)
Task 3 (C)
Task 3 (D)
Arbitrary symbols (names up to 32 characters) that are independent of I/O terminal allocations can be used in programming. Standard programs created with
symbols are more general and easier to reuse as tasks in different programs.
Symbols specified for bit address:
SW1
Global and Local
Symbols Supported
VALVE
I/O names are handled as symbols which can be defined as global symbols,
which apply to all of the programs in all tasks, or as local symbols, which apply to
just the local task.
When the symbols are defined, you can choose to have the local symbols allocated to addresses automatically.
Improve Overall System
Response Performance
The response performance of the system can be improved by dividing the program into a system-management task and tasks used for control and executing
only those control tasks that need to be executed.
Simplify Program Modification
• Debugging is more efficient when the job of modifying and debugging the tasks
can be divided among several individuals.
• Program maintenance is easier because only the tasks affected by changes
have to to be modified when there are changes (such as changes in specifications).
• Several consecutive program lines can be modified with online editing.
• The amount the cycle time is extended during online editing has been reduced
(-EV1 only).
Change Program
Arrangement Easily
When separate tasks have been programmed for different production models,
the task control instructions can be used to switch the program quickly from production of one model to another.
Step Control and Block
Programming
The step control and block programming instructions can be used to control repetitive processes that are difficult to program with ladder programming alone.
Comments
Several types of comments can be added to the program to make it easier to
understand, including Rung comments, and I/O comments.
5
Section
Special Features and Functions
1-3
Port-specific Protocol Macro Function
The protocol macro function can be used to create versatile communications
functions for any of the PC’s communications ports. The communications functions can have host link, NT Link, or protocol macro configurations and can be
directed to RS-232C and RS-422/485 ports on any of the Units.
Create Protocol
Functions for All Ports
1, 2, 3...
1. One Serial Communications Board can be mounted in the CPU Unit. (A Serial Communications Board has two serial communications ports.)
2. Up to 16 Serial Communications Units can be connected to a CPU Unit.
(Each Serial Communications Unit has two serial communications ports.)
All together, a CPU Unit can support a maximum of 34 ports. In addition, up to 16
ASCII Units can be connected. The ASCII Units can be used to create protocol
functions with BASIC programs.
Programming Device
PT
Host Computer
Serial Communications Unit
CPU Unit
Serial Communications Board
Up to 36 ports
are possible
External device
with serial port
Standard Serial Communications with External Devices
Messages can be transferred to and from standard serial devices with the protocol macro function (according to preset parameter settings). The protocol macro
function supports processing options such as retries, timeout monitoring, and
error checks.
Symbols that read and write data to the CPU Unit can be included in the communications frames, so data can be exchanged with the CPU Unit very easily.
OMRON components (such as Temperature Controllers, ID System Devices,
Bar Code Readers, and Modems) can be connected to a Serial Communications Board or Serial Communications Unit with the standard system protocol. It
is also possible to change the settings if necessary.
Note The Serial Communications Board or Serial Communications Unit must be purchased separately to take advantage of this function.
Transmit or receive data
with just one instruction.
External device
6
Section
Special Features and Functions
1-3
Multilevel Network Configurations
Different network levels can be connected as shown in the following diagram.
The multilevel configuration provides more flexibility in networking from the
manufacturing site to production management. In particular, the DeviceNet network makes it very easy to connect devices from other manufacturers.
OA Network:
FA Network:
DeviceNet*:
High-speed ON/OFF bus:
Ethernet
Controller Link
CompoBus/D (DeviceNet)
CompoBus/S
Note *Units that conform to JEMANET standards are also available.
Remote Monitoring and Programming
1, 2, 3...
1. The host link function can operate through a modem, which allows monitoring of a distant PC’s operation, data transfers, or even online editing of a distant PC’s program by phone.
2. PCs in a network can be programmed and monitored through the Host Link.
3. It is possible to communicate through 3 network levels even with different
types of networks.
Remote programming/monitoring
of a distant PC
Modem
Remote programming/monitoring of a
PC on the network through Host Link
Modem
Controller Link Network
7
Section
Special Features and Functions
1-3
Remote programming/monitoring of a PC on a network up to 3 levels away (including the local network) for the same or different types of networks is possible through Host Link.
Network 3
Network 1
Network 2
Message transfer between PCs on a network 3 levels away (including the local network) for the same or
different types of networks.
Network 3
Network 1
Network 2
Note NT Link communications between an NT31/NT631-V2 PT and a CS1-series PC
are now possible at high speed (-EV1 only).
1-3-2 Versatile Functions
Memory Card and File Management Functions
Transfer Data to and from
Memory Cards
Data area data, program data, and PC Setup data can be transferred as files
between the Memory Card (compact flash memory) and a Programming Device, program instructions, a host computer, or via FINS commands. Memory
Cards are available with capacities 8, 15, 30, and 48 Mbytes.
I/O Memory, program,
and parameter areas
stored as files.
Convert EM Area Banks
to File Memory
Part of the EM Area can be converted to file memory to provide file management
capabilities without a Memory Card and with much faster access time than a
Memory Card. (The EM Area can be very useful for storing data such as trend
data as files.)
Automatic File Transfer
at Start-up
The PC can be set up to transfer the program and/or PC Setup files from the
Memory Card when the PC is turned ON. With this function, the Memory Card
provides a flash-ROM transfer. This function can also be used to store and
change PC configurations quickly and easily.
Version-1 Features
I/O Memory Files in CSV
and Text Format
(-EV1 Only)
8
It is now possible to save production results and other data (hexadecimal) from
the CPU Unit I/O memory in a Memory Card in CSV or text format. The data can
Section
Special Features and Functions
1-3
then be read and edited using personal computer spreadsheet software by
means of a Memory Card Adapter.
I/O memory data stored
in CSV or text format
Spreadsheet software
Via Memory Card Adapter
Memory Card
File Operations (Format,
Delete, etc.) from Ladder
Programs (-EV1 Only)
It is possible to format files, delete, copy, change file names, create new directories, and perform similar operations on a Memory Card from the ladder program
during PC operation.
Program Replacement
During Operation
(-EV1 Only)
It is now possible to replace the entire user program in the CPU Unit from the
Memory Card during operation. In this way, it is possible to switch PC operation
without stopping the PC.
PC operation
.OBJ
Replacement
Easy Backups
(-EV1 Only)
It is now possible to back up all data (user programs, parameters, and I/O
memory) to the Memory Card by pressing the Memory Card power supply
switch. In this way, if a malfunction arises, it is possible to back up all data in the
CPU Unit at the time without using a Programming Device.
Specialized Instructions Simplify Programming
Text String Instructions
The text string instructions allow text processing to be performed easily from the
ladder program. These instructions simplify the processing required when creating messages for transmission or processing messages received from external
devices with the protocol macro function.
Processing of text string
data
External device with
standard serial port
Loop Instructions
The FOR(512), NEXT(513), and BREAK(514) instructions provide a very powerful programming tool that takes up little program capacity.
Index Registers
Sixteen Index Registers are provided for use as pointers in instructions. An Index Register can be used to indirectly address any word in I/O memory. The
CS1-series PCs also support the auto-increment, auto-decrement, and offset
functions.
The Index Registers can be a powerful tool for repetitive processing (loops)
when combined with the auto-increment, auto-decrement, and offset functions.
Index Registers can also be useful for table processing operations such as
changing the order of characters in text strings.
Table Data Processing Instructions
Stack Instructions
A region of I/O memory can be defined as a stack region. Words in the stack are
9
Section
Special Features and Functions
1-3
specified by a stack pointer for easy FIFO (first-in first-out) or LIFO (last-in firstout) data processing.
Stack region
Pointer
Range Instructions
These instructions operate on a specified range of words to find the maximum
value or minimum value, search for a particular value, calculate the sum or FCS,
or swap the contents of the leftmost and rightmost bytes in the words.
Range specified
in the instruction
Data
Search, find maximum,
find minimum, etc.
Record-table Instructions
Record-table instructions operate on specially defined data tables. The record
table must be defined in advance with DIM(631), which declares the number of
words in a record and the number of records in the table. Up to 16 record tables
can be defined.
Record tables are useful when data is organized in records. As an example, if
temperatures, pressures, or other set values for various models have been combined into a table, the record-table format makes it easy to store and read the set
values for each model.
The SETR(635) can be used to store the first address of the desired record in an
Index Register. Index Registers can then be used to simplify complicated processes such as changing the order of records in the record table, searching for
data, or comparing data.
Record 2
Table
Record 2
Set values for model A
Temperature setting
Pressure setting
Record 3
Time setting
Troubleshooting Functions
Failure Diagnosis:
FAL(006) and FALS(007)
The FAL(006) and FALS(007) can be used to generate a non-fatal or fatal error
when the user-defined conditions are met. Records of these errors are stored in
the error log just like system-generated errors.
User-defined
error condition
10
FAL(006) or FALS(007) error
Section
Special Features and Functions
Failure Point Detection:
FPD(269)
1-3
Diagnoses a failure in an instruction block by monitoring the time between
execution of FPD(269) and execution of a diagnostic output and finding which
input is preventing an output from being turned ON.
FPD
Input preventing
diagnostic output
from going ON
Error Log Functions
The error log contains the error code and time of occurrence for the most recent
20 errors (user-defined or system-generated errors).
Maintenance Functions
The CS1-series PCs record information useful for maintenance, such as the
number of power interruptions and the total PC ON time.
Other Functions
Data Trace Function
The content of the specified word or bit in I/O memory can be stored in trace
memory by one of the following methods: scheduled sampling, cyclic sampling,
or sampling at execution of TRSM(045).
Trace memory
Specified address
in I/O memory
Fixed Cycle Time
Function
A fixed (minimum) cycle time can be set to minimize variations in I/O response
times.
I/O Refreshing Methods
I/O refreshing can be performed cyclically and immediately by programming the
immediate-refreshing variation of the instruction.
PC Setup Functions
PC operation can be customized with PC Setup settings, such as the maximum
cycle time setting (watch cycle time) and the instruction error operation setting,
which determines whether instruction processing errors and access errors are
treated as non-fatal or fatal errors.
The PC’s initial settings can be
customized with the PC Setup.
Windows Tools
The single-port multiple-access (SPMA) function can be used to program and
monitor other CPU Bus Units on the same bus (CPU Rack or Expansion Racks)
11
Section
Function Tables
1-4
or other CPU Units on the same network from a serial port on the CPU Unit or a
Serial Communications Board.
Programming Device
Controller Link
1-4
Several CPU Bus Units on the same
bus or other CPU Units on the same
network can be accessed from a
single port.
Function Tables
Functions Arranged by Purpose
Purpose
Improving
Program
Structure
Simplifying the
Program
Reference
Standardizing programs as modules.
Developing a program with several
programmers working in parallel.
Making the program easier to
understand.
Creating step programs.
Using BASIC-like mnemonic
instructions to program processes
that are difficult to enter in the ladder
diagram format (such as conditional
branches and loops).
Program with tasks to divide the
program, specify symbols, and
define local and global symbols.
Section 11
Tasks
Use the step instructions.
Use the block programming
instructions.
Programming
Manual
(W340)
Creating looped program sections.
Use FOR(512) and NEXT(513) or
JMP(004) and JME(005).
Programming
Manual
(W340)
Indirectly addressing DM words.
All words in the DM and EM Areas
can be indirectly addressed.
Use Index Registers as pointers to
indirectly address data area
addresses.
9-1 Basic
Concept
13-2 Index
Registers
Simplifying the program by switching
to PC memory address specification.
Consolidating instruction blocks with
the same pattern but different
addresses into a single instruction
block.
12
Function
The Index Registers are very useful
in combination with loops, increment
instructions, and table data
processing instructions. The
auto-increment, auto-decrement, and
offset functions are also supported.
Use MCRO(099).
Programming
Manual
(W340)
Section
Function Tables
Purpose
Managing the
Cycle Time
Reducing the cycle time.
Function
1-4
Reference
• Use tasks to put parts of the program Section 11
that don’t need to be executed into Tasks
“standby” status.
• Use JMP(004) and JME(005) to
jump parts of the task that don’t need
to be executed.
• Convert parts of the task to subroutines if they are executed only under
particular conditions.
Setting a fixed (minimum) cycle time.
Setting a maximum cycle time.
(Generating an error for a cycle time
exceeding the maximum.)
Reducing the I/O response time for
particular I/O points.
Receiving input pulses shorter than
the cycle time.
Using Interrupt
Tasks
Monitoring operating status at regular
intervals.
Performing interrupt processing when
an input goes ON.
Issuing an interrupt to the CPU when
data is received through serial
communications.
Executing an emergency interrupt
program when the power supply fails.
Data
Processing
Operating a FIFO or LIFO stack.
Performing basic operations on
tables made up of 1-word records.
Performing complex operations on
tables made up of 1-word records.
Performing operations on tables
made up of records longer than 1
word.
• Disable a Unit’s Special I/O Unit refreshing in the PC Setup if it isn’t necessary to exchange data with that
Special I/O Unit every cycle.
8-4 PC Setup
Set a minimum cycle time in the PC
Setup.
Set a maximum cycle time (watch
cycle time) in the PC Setup. If the
cycle time exceeds this value, the
Cycle Time Too Long Flag (A40108)
will be turned ON and PC operation
will be stopped.
Use an I/O interrupt task, immediate 11-3 Interrupt
refreshing, or IORF(097).
Tasks, 9-1
Basic Concept
Use a quick-response input in a
3-7 C200H
High-density I/O Unit (a Special I/O
High-density
Unit).
I/O Units
11-3 Interrupt
Use a scheduled interrupt task.
Tasks
Use an I/O interrupt task.
Use a Serial Communications Board
and external interrupt task or an
ASCII Unit.
Use a power OFF interrupt task.
Enable the power OFF interrupt task
in the PC Setup.
Use the stack instructions
(FIFO(633) and LIFO(634)).
Use range instructions such as
MAX(182), MIN(183), and
SRCH(181).
Use Index Registers as pointers in
special instructions.
Use Index Registers and the
record-table instructions.
Programming
Manual
(W340)
13-2 Index
Registers
(For example, the temperature,
pressure, and other manufacturing
settings for different models of a
product could be stored in separate
records.)
13
Section
Function Tables
Purpose
System
Configuration
Monitoring several different kinds of
devices through the RS-232C port.
Changing protocol during operation
(from a modem connection to host
link, for example).
Connecting
Programming
Devices
Function
Multiple serial ports can be installed
with Serial Communications Units
(protocol macro) and ASCII Units
(BASIC).
Use STUP(237), the CHANGE
SERIAL PORT SETUP instruction.
Connecting a Programming Console.
Connect to the peripheral port with
pin 4 of the CPU Unit’s DIP switch
OFF.
Connecting a Programming Device
(e.g., the CX-Programmer).
Connect to the peripheral port with
pin 4 of the CPU Unit’s DIP switch
OFF or with pin 4 ON and the
communications mode set to
“peripheral bus” under Peripheral
Port settings in the PC Setup.
Connecting a host computer.
Connecting a PT.
Connect to the RS-232C port with
pin 5 of the CPU Unit’s DIP switch
ON or with pin 5 OFF and the
communications mode set to
“peripheral bus” under RS-232C Port
settings in the PC Setup.
Connect to the RS-232C port or
peripheral port. (Set the
communications mode to “host link”
in the PC Setup.)
Connect to the RS-232C port or
peripheral port. (Set the
communications mode to “NT Link”
in the PC Setup.)
1-4
Reference
2-3 Basic
System Configuration
Programming
Manual
(W340)
3-3 Programming Devices
2-5 Expanded System
Configuration
Set the PT communications settings
for a 1:N NT Link.
Controlling
Outputs
Controlling
I/O Memory
14
Connecting a standard serial device
to the CPU Unit (no-protocol mode).
Connect to the RS-232C port.
(Set the communications mode to
“no-protocol” in the PC Setup.)
Turning OFF all outputs on basic
Output Units and High-density Output
Units (a type of Special I/O Unit).
Turn ON the Output OFF Bit
(A50015).
Maintaining the status of all outputs
on Output Units when PC operation
stops (hot start).
Turn ON the IOM Hold BIt (A50012).
Maintaining the previous contents of
all I/O Memory at the start of PC
operation (hot start).
Turn ON the IOM Hold BIt (A50012).
Maintaining the previous contents of
all I/O Memory when the PC is turned
on.
Turn ON the IOM Hold BIt (A50012)
and set the PC Setup to maintain the
status of the IOM Hold Bit at start-up.
(IOM Hold Bit Status at Startup)
14-2 Trial
Operation
and Debugging
14-2 Trial
Operation
and Debugging
Section
Function Tables
Purpose
File Memory
Text string
processing
Function
Automatically transferring the
program, I/O Memory, and PC Setup
from the Memory Card when the PC
is turned on.
Creating a library of programs for
different program arrangements.
Creating a library of parameter
settings for various PC Racks and
models.
Enable the “automatic transfer at
start-up” function by turning ON pin 2
of the CPU Unit’s DIP switch and
create an AUTOEXEC file.
Memory Card functions (Program
Files)
Memory Card functions (Parameter
Files)
Creating a library of data files with
settings for various PC Racks, CPU
Bus Units, and the Inner Board Area.
Memory Card functions (Data Files)
Storing I/O Comment data within the
Memory Card.
Storing operating data (trend and
quality data) within the CPU Unit
during program execution.
Memory Card functions
(Symbol Table Files)
EM File Memory Functions and the
FREAD(700)/FWRIT(701)
instructions
Switching PC operation.
Memory Card functions (Program
Replacement during PC Operation)
(-EV1 only)
Reading and writing I/O memory data
with a spreadsheet.
Read/write data files using
instructions in CSV or text format
(-EV1 only).
Performing string processing at the
PC which was performed at the host
computer previously and reducing
the program load at the host
computer (operations such as read,
insert, search, replace, and
exchange).
Combine the Host Link function with
the text string processing
instructions.
Performing string processing
operations such as rearranging text
strings.
Use the string comparison
instructions and index registers.
Receiving data from external devices
(such as bar code readers) through
serial communications, storing the
data in DM, and reading just the
required string when it is needed.
Combine the protocol macro function
with the text string processing
instructions.
1-4
Reference
12 File
Memory
Functions
Programming
Manual
(W340)
15
Section
Function Tables
Purpose
Maintenance
and Debugging
Changing the program while it is
being executed.
Function
Use the online editing function from a
Programming Device.
(Several instruction blocks can be
changed with CX-Programmer.)
1-4
Reference
14-2 Trial
Operation
and Debugging
Sampling I/O Memory data.
• Periodic sampling
• Sampling at the end of each cycle
• Sampling
at
execution
of
TRSM(045)
Data trace at regular intervals
Data trace at the end of each cycle
Data trace each time that
TRSM(045) is executed
Specifying the start-up operating
mode.
Set the PC Setup to specify the
desired operating mode at start-up.
(Startup Mode)
Recording the time that power was
turned on, the last time that power
was interrupted, the number of power
interruptions, and the total PC on
time.
These items are recorded
automatically in the Auxiliary Area.
Stopping the program for instruction
execution errors.
Set the PC Setup so that instruction
errors are treated as fatal errors.
(Instruction Error Operation)
Programming/monitoring the PC
remotely.
• Programming or monitoring a PC on
the network through Host Link.
Host Link → Network Gateway
function
13-4 Startup
Settings and
Maintenance
9-3 Checking
Programs
2-5 Expanded System
Configuration
• Programming or monitoring a PC
through modems.
Programming/monitoring PCs in
other networks
Error
Generating a non-fatal or fatal error
Processing and for user-defined conditions.
Troubleshooting
• Non-fatal errors (Operation continues.)
• Fatal errors (PC operation stops.)
Analyzing time and logic in execution
of an instruction block.
Record information about errors,
including user-defined errors, in the
error log.
Other Functions Protecting the program.
16
Host Link through modems
Communicate with PCs up to 2
network levels away through
Controller Link or Ethernet.
FAILURE ALARM: FAL(006)
13-5 Diagnostic and
Debugging
Functions
SEVERE FAILURE ALARM:
FALS(007)
FAILURE POINT DETECTION:
FPD(269)
Use the error log function. Up to 20
error records can be stored.
Write-protect the user program
memory.
Allocating words in the I/O Area by
specifying the first word allocated to
each Rack.
Set the first word allocated to each
Rack by registering the I/O table
from the CX-Programmer. (Words
must be allocated to Racks in the
order that the Racks are connected.)
Reducing input chattering and the
effects of noise.
Specify the input response times for
Basic I/O Units in the PC Setup.
(Basic I/O Unit Input Response Time)
13-4 Startup
Settings and
Maintenance
13-6 Other
Functions
Section
Function Tables
1-4
Communications Functions (Serial/Network)
Purpose
Monitoring from
the Host
Computer
Protocol: Required Equipment
RS-232C or RS-422/485
Host Link communications from
the PC
Network communications
through RS-232C or
RS-422/485
Network
Connecting to a
Standard Serial
Device
Control system
Information
system
Creating a custom, user-defined
protocol
Creating a simple protocol
HIgh-speed data exchange
Communicating
with a PT
Ethernet: Ethernet Unit
Protocol written in BASIC: ASCII
Unit
Protocol Macro:
Serial Communications Board or
Serial Communications Unit
No protocol:
CPU Unit’s RS-232C port, ASCII
Unit, or Protocol Macro
Direct access
NT Link:
Port in the CPU Unit, Serial
Communications Board, or Serial
Communications Unit
Controller Link: Controller Link Unit
PC Link: PC Link Unit
High capacity or free word allocation
Low capacity and fixed word
allocation
Data Link between PC and computer
Message
communications
between PCs
Normal or high capacity
Information system
Remote I/O system
Message
communications
between PC and
computer
Control system
Reference
2-5 Expanded System
Configuration
Controller Link:
Controller Link Unit or Controller Link
Board
No protocol
Data Link
between PCs
Remote I/O
between PC and
Slaves
Host Link:
Port in the CPU Unit, Serial
Communications Board, or Serial
Communications Unit
Enclose a FINS command with a
Host Link header and terminator and
issue it from the PC as a network
communications instruction.
Controller Link and Ethernet
communications are possible
through the Host Link. (Enclose a
FINS command with a Host Link
header and terminator and issue it
from the PC as a network
communications instruction.)
Controller Link:
Controller Link Unit or Controller Link
Board
Controller Link: Controller Link Unit
Ethernet: Ethernet Unit
CompoBus/D: CompoBus/D Master
Unit
2-5 ExpandController Link:
Controller Link Unit or Controller Link ed System
Configuration
Board
Information system
High-density I/O
Free word allocation
Multi-vendor capability
Analog I/O capability
Multi-level architecture
High-speed Remote I/O
Ethernet: Ethernet Unit
CompoBus/D:
CompoBus/D Master Unit and
required Slave Units
Remote I/O Slave Rack connection
SYSMAC BUS Wired Remote I/O:
SYSMAC BUS Master Unit and
required Slave Units
CompoBus/S:
CompoBus/S Master Unit and
required Slave Units
17
Section
Comparison of CS1 and C200HX/HG/HE Operation
1-5
1-5
Comparison of CS1 and C200HX/HG/HE Operation
Operation of the CS1-series PCs differs from that of the C200HX/HG/HE PCs in
several basic points, which are outlined in the following table. Refer to Appendix
D PC Comparison for differences between the CS1-series PCs and the CV-series PCs.
Item
Program
Structure
C200HX/HG/HE
Single program vs.
multiple tasks
The program is executed as a single
unit each cycle.
Interrupt programs are executed as
subroutines with subroutine numbers
00 to 15 (I/O interrupts) and 99
(scheduled interrupt).
Both I/O interrupt (up to 16) and
scheduled interrupt (just 1) programs
are supported.
I/O
allocation
I/O Table Registration
is supported in
CS1-series PCs.
I/O allocation is determined solely by
the slot location of Basic I/O Units and
the unit number settings on Special I/O
Units. IR Area words are automatically
allocated to I/O Units and Special I/O
Units without performing the I/O Table
Registration operation.
(The I/O Table Registration operation is
used to prevent Units from being
installed in the wrong slots.)
Data Areas
CIO
Area
I/O Area
IR 000 to IR 029,
IR 300 to IR 309
(Unlike the CS1 Series, word allocation
is fixed.)
Group-2
High-density
I/O Unit and
B7A Interface
Unit Area
IR 030 to IR 049,
IR 330 to IR 341
Special I/O
Unit Area
CompoBus/D
Area and
SYSMAC
BUS Area
IR 100 to IR 199,
IR 400 to IR 459
IR 050 to IR 099
IR 350 to IR 399
PC Link
Words
Optical I/O
Unit and I/O
Terminal Area
Work/Internal
I/O Area
18
(These words are allocated to C200H
Group-2 High-density I/O Units.)
(Can be used as the CompoBus/D
Area or SYSMAC BUS Area, but not
both.)
SR 247 to SR 250 (in SR Area)
CS1
In CS1-series PCs, the program is
divided into tasks (cyclic tasks) that are
executed in order when they are
enabled. Interrupt programs are also
entered as tasks (interrupt tasks).
The operation of a CS1 PC is the same
as a C200HX/HG/HE PC when just
one cyclic task is enabled.
CS1-series PCs support up to 32 cyclic
tasks, 32 I/O interrupt tasks, 2
scheduled interrupt tasks, 1 power
OFF interrupt task, and 256 external
interrupt tasks.
In CS1-series PCs, word allocation
doesn’t depend only on slot position,
and it isn’t necessary to allocate words
to an empty slot. If a Unit requires
several words, those words can be
allocated.
When a CS1-series PC is being used,
the I/O Table Registration operation
must be executed. If it isn’t executed,
the CPU Unit won’t recognize each
Basic I/O Unit, Special I/O Unit, and
CS1 CPU Bus Unit that has been
installed.
CIO 0000 to CIO 0319
(Unlike the C200HX/HG/HE PCs, word
allocation is flexible.)
None
(These words are allocated in the I/O
Area.)
CIO 2000 to CIO 2959
CompoBus/D Area:
CIO 0050 to CIO 0099,
CIO 0350 to CIO 0399
SYSMAC BUS Area:
CIO 3000 to CIO 3049
CIO 0247 to CIO 0250 and A442
Optical I/O Unit and I/O Terminal Area:
IR 200 to IR 231
I/O Terminal Area:
CIO 3100 to CIO 3131
Work Areas:
IR 310 to IR 329, IR 342 to IR 349, and
IR 460 to IR 511
Internal I/O Area:
CIO 1200 to CIO 1499
CIO 3800 to CIO 6143
Section
Comparison of CS1 and C200HX/HG/HE Operation
Item
Data
Areas,
continued
C200HX/HG/HE
1-5
CS1
Work Area (WR)
None
Work Area: W000 to W511
(No new functions will be assigned to
this area in future CPU versions; this
area has been set aside for use as
work words and bits.)
Temporary Relay Area
(TR)
Holding Relay Area
(HR)
Special Relay Area
(SR)
TR 00 to TR 07
TR 00 to TR 15
HR 00 to HR 99
H 000 to H 511
Special Relay Area:
SR 236 to SR 255,
SR 256 to SR 299
Auxiliary Area:
A 000 to A 959
Auxiliary Relay Area
(AR)
Link Relay Area (LR)
DM Area
Auxiliary Relay Area:
AR 00 to AR 27
Link Relay Area: LR 00 to LR 63
DM 0000 to DM 6143 (Normal DM):
Words in this range can be read and
written by instructions and
Programming Devices, although
DM 6000 to DM 6030 are used for the
Error Log and DM 1000 to DM 2599
are used by Special I/O Units.
EM Area
Timer Area
Counter Area
Task Flag Area
Index Registers
Data Registers
DM 6144 to DM 6655 (Fixed DM):
Words in this range are read-only for
instructions and can be read or written
by Programming Devices.
DM 6550 to DM 6559 and DM 6600 to
DM 6655 are used for the PC Setup.
The Programming Console can be
used to convert up to 3,000 words from
the user program area (UM) to Fixed
DM words (DM 7000 to DM 9999).
EM 0000 to EM 6143
(3 banks max., 16 banks max. for
ZE-version PCs)
The EM Area cannot be accessed
directly by most instructions (only the
special EM Area instructions).
Basically, those EM Area instructions
access the current bank, which can be
changed.
Timer/Counter Area:
T/C 000 to T/C 511
Link Area: CIO 1000 to CIO 1199
D00000 to D32767
D20000 to D29599 are used by Special
I/O Units, D30000 to D31599 are used
by CS1 CPU Bus Units, and D32000 to
D32099 are used by Inner Boards.
The Error Log is stored in A100 to
A199 and the PC Setup is stored in the
Parameter Area (not a part of I/O
Memory).
E00000 to E32767
(13 banks max.)
The EM Area can be accessed directly
by most instructions. Regular
instructions can access data in the
current bank or any other bank.
Part of the EM Area can be converted
for use as file memory.
T0000 to T4095
(Timers and counters share the same
numbers.)
C0000 to C4095
(Timer and counter numbers are
independent.)
None
None
None
TK00 to TK31
IR0 to IR15
DR0 to DR15
19
Comparison of CS1 and C200HX/HG/HE Operation
Item
Flags and
Clock
Pulses
C200HX/HG/HE
Arithmetic Flags
(such as ER, EQ, and
CY)
Part of the SR Area
Clock pulses
Part of the SR Area
PC Setup
C200HX/HG/HE: DM
Area
CS1: Special Area
The PC Setup is stored in the DM Area
(DM 6550 to DM 6559 and DM 6600 to
DM 6655), so PC Setup settings are
made directly by specifying DM
addresses.
Instruction
variations
Up-differentiation
Down-differentiation
Available
Available
Immediate refreshing
Not available
Up-differentiation and
immediate refreshing
Down-differentiation
and immediate
refreshing
Not available
Not available
Section
1-5
CS1
Condition Flags:
In the CS1 Series these Flags are in a
separate area and are specified by
labels rather than addresses. With the
CX-Programmer, these are specified
using global symbols, such as “P_ER “
and “P_EQ.” With a Programming
Console, they are specified using “ER,”
“=,” etc.
Clock Pulses:
In the CS1 Series these pulses are in a
separate area and are specified by
labels such as “P_1s” and “P_0_1s”
rather than addresses.
In the CS1 Series, the PC Setup isn’t
stored in the DM Area, but a separate
area (the Parameter Area) which isn’t a
part of I/O memory. The PC Setup is
edited with CX-Programmer in a table
format and user-friendly dialogue.
Individual PC Setup addresses can
also be edited with a Programming
Console.
Available
Available for LD, AND, OR, RSET, and
SET
Available for LD, LD NOT, AND, AND
NOT, OR, OR NOT, OUT, OUT NOT,
RSET, SET, KEEP, DIFU, DIFD, CMP,
CPS, and MOV
Available for LD, AND, OR, RSET,
SET, and MOV
Available for LD, AND, OR, RSET, and
SET
Instruction operand data format
Basically operands are specified in
BCD. In XFER(070), for example, the
number of words is specified in BCD
(0001 to 9999).
Basically operands are specified in
binary. In XFER(070), for example, the
number of words is specified in binary
(0001 to FFFF or 1 to 65,535 decimal).
Specifying data in binary increases the
setting range about six-fold.
Specifying operands requiring
multiple words
If an operand requiring multiple words
is specified at the end of an area so
that there are not enough words left in
the area for the operand, the instruction
will not be executed and the Error Flag
will turn ON.
If an operand requiring multiple words
is specified at the end of an area so
that there are not enough words left in
the area for the operand, the instruction
can be executed and the Error Flag will
not turn ON. The program, however, is
checked when transferred from the
CX-Programmer to the CPU Unit and
cannot be transferred with incorrect
operand specifications. Such programs
also cannot be read from the CPU Unit.
20
Section
Comparison of CS1 and C200HX/HG/HE Operation
Item
Instructions Sequence Input
Sequence Output
Sequence Control
Timer/Counter
Comparison
Data Movement
Data Shift
Increment/Decrement
Symbol Math
Conversion
Logic
Special Math
Floating-point Math
Table Data Processing
Data Control
Subroutines
Interrupt Control
Step
Basic I/O Unit
Network
File Memory
Display
Clock
Debugging
Failure Diagnosis
Special
Block Programming
Text String Processing
Task Control
1-5
C200HX/HG/HE
CS1
Up and down-differentiated versions of
LD, AND, and OR are not available.
Up and down-differentiated versions of
LD, AND, and OR are available.
TST and TSTN not available.
TST and TSTN available.
SETA and RSTA not available.
SETA and RSTA available.
CJP and CJPN not available.
CJP and CJPN available.
TIML, MTIM, TMHH, and CNR not
TIML, MTIM, TMHH, and CNTR
available.
available.
Input Comparison Instructions not
Input Comparison Instructions
available.
available. ZCP and ZCPL not available.
MOVL, MVNL, and XCGL not
MOVL, MVNL, and XCGL available.
available.
NSFL/NSFR, NASL/NASR,
NSFL/NSFR, NASL/NASR,
NSLL/NSRL, ASLL/ASRL,
NSLL/NSRL, ASLL/ASRL,
ROLL/RORL, RLNC/RRNC, and
ROLL/RORL, RLNC/RRNC, and
RLNL/RRNL not available.
RLNL/RRNL available.
++, ++L, – –, – –L, ++BL, and – –BL
++, ++L, – –, – –L, ++BL, and – –BL
not available.
available.
The same in both series.
SIGN, BINS, BCDS, BISL, and BDSL
SIGN, BINS, BCDS, BISL, and BDSL
not available.
available.
ANDL, ORWL, XORL, XNRL, and
ANDL, ORWL, XORL, XNRL, and
COML not available.
COML available.
ROTB not available.
ROTB available.
Not available.
Available.
SSET, PUSH, LIFO, and FIFO not
SSET, PUSH, LIFO, and FIFO
available.
available.
SCL2 and SCL3 not available.
SCL2 and SCL3 available.
The same in both series.
Interrupts controlled using one
Interrupts controlled using CLI, MSKS,
instruction (INT).
and MSKR.
The same in both series, although the specified control bit must be in the WR
Area in CS1-series PCs.
TKY, HKY, DSW, and CMCR available. TKY, HKY, DSW, and CMCR not
available.
CMND not available.
CMND available.
Not available.
Available.
LMSG (32-character message display) MSG (32-character message display)
available.
available, but only 16 characters
displayed on a Programming Console.
CADD, CSUB, and DATE not available.
The same in both series.
The same in both series.
XDMR and IEMS available.
Not available.
Not available.
Not available.
CADD, CSUB, and DATE available.
I/O Comment storage
A Programming Device can be used to
divide the UM Area (user program
memory area) into a program area, I/O
comment area, and Expansion DM
area. I/O comments can be stored in
that I/O comment area.
In the CS1-series PCs, I/O comments
can be stored in Memory Cards as I/O
comment files.
Battery installation
A battery is installed in the CPU Unit
when it is shipped from the factory.
The battery is not installed when the
PC is shipped from the factory. Install
the provided battery before using the
PC.
SCAN not available
Available.
Available.
Available.
21
Comparison of CS1 and C200HX/HG/HE Operation
Item
C200HX/HG/HE
Section
1-5
CS1
Clock function
The internal clock is set when the PC is When the battery is installed in the PC,
shipped from the factory.
the clock will begin from an arbitrary
value. Set the clock with a
Programming Device or the DATE(735)
instruction.
Memory
Cards and
Memory
Cassettes
I/O Memory
All of I/O Memory can be saved to an
EEPROM Memory Cassette by turning
ON a control bit in the SR Area. A
Programming Device (other than a
Programming Console) can be used to
read the data back from the Memory
Cassette.
Memory
Cards and
Memory
Cassettes
User program
The entire program can be saved to an
EEPROM Memory Cassette by turning
ON a control bit in the SR Area. A
Programming Device (other than a
Programming Console) can be used to
read the data back from the Memory
Cassette.
Serial com- Mode
munications (peripheral
port or
RS-232C
ports)
Peripheral
port
Peripheral
port
RS-232C port
22
The entire program can be saved as a
file in a Memory Card (flash ROM) or
EM file memory with a Programming
Device (including Programming
Consoles) or the instruction provided
for this operation. A Programming
Device or instruction can be used to
A standard EPROM Writer can be used read the program back from file
memory.
to save the entire program to an
These operations can also be
EPROM Memory Cassette. A
performed with FINS commands.
Programming Device can be used to
read the data back from the Memory
The PC can be set to automatically
Cassette.
read the entire program from the
Memory Card when the PC is turned
The PC can be set to automatically
on.
read the entire program from the
Memory Cassette (EEPROM or
EPROM) when the PC is turned on.
With the -EV1 or later, it is also
possible to read (i.e., replace) the
entire user program from the Memory
Card during PC operation.
Host link, customer (Programming
Console and peripheral bus are
automatically recognized.)
Host Link, peripheral bus, NT Link
(1:N), (Programming Console and
peripheral bus are automatically
recognized.)
Custom protocols are not possible for
the peripheral port.
RS-232C port
Baud
rate
Any range of I/O Memory can be saved
as a file in a Memory Card (flash ROM)
or EM file memory with a Programming
Device (including Programming
Consoles) or the instruction provided
for this operation. (With the -EV1 or
later, these files can also be saved in
CSV or text format.) A Programming
Device or instruction can be used to
read the data from file memory. These
operations can also be performed with
FINS commands.
Host Link, NT Link (1:1), NT Link (1:N),
custom, 1:1 link master, 1:1 link slave
1,200/2,400/4,800/9,600/19,200 bps
Host Link, peripheral bus, NT Link
(1:N), custom
1:1 links and Programming Console
are not supported for the RS-232C
port.
300/600/1,200/2,400/4,800/9,600/
19,200/38,400/57,600/115,200 bps
Baud rates of 38,400/57,600/
115,200 bps are not standard for
RS-232C. Your computer may not
support these speeds. Use slower
baud rates if necessary.
Section
Checking the Package
Item
Interrupt control modes
1-6
C200HX/HG/HE
CS1
There are two interrupt modes in
C200HX/HG/HE PCs: normal interrupt
mode and high-speed interrupt mode.
CS1-series PCs operate in high-speed
interrupt mode only. If an interrupt
occurs during Host Link servicing,
Remote I/O servicing, Special I/O Unit
servicing, or execution of an
instruction, that process will be stopped
immediately and the task will be
executed instead.
Normal Interrupt Mode:
In this mode, the interrupt is not
executed until the current process
(Host Link servicing, Remote I/O
servicing, Special I/O Unit servicing, or
execution of an instruction) is
completed.
High-speed Interrupt Mode:
In this mode, the interrupt stops the
current process (Host Link servicing,
Remote I/O servicing, Special I/O Unit
servicing, or execution of an
instruction) and executes the interrupt
immediately.
Startup mode
1-6
RUN mode was entered if the Startup
Mode was set in the PC Setup to 00:
Switch Setting on Programming
Console and the CPU Unit was started
without a Programming Console
connected.
The CS1 will start in PROGRAM mode
if the Startup Mode is set in the PC
Setup to PRCH: Switch Setting on
Programming Console (default setting)
and the CPU Unit is started without a
Programming Console connected.
Checking the Package
Check to be sure that the CPU Unit and Battery Unit are in good shape without
any damage.
One CS1S-BAT01 Battery Set (See note.)
CPU Unit
Note The Battery Set is required to backup the user program in the RAM memory, the
contents of the PC Setup, the I/O memory holding areas, etc., when the power
supply is turned OFF.
23
Section
Initial Setup
1-7
Initial Setup
Battery Installation
Before using the CPU Unit, you must install the Battery Set in the CPU Unit using
the following procedure.
1, 2, 3...
24
1-7
1. Insert a flat-blade screwdriver in the small gap at the bottom of the battery
compartment and flip the cover upward to open it.
Section
Initial Setup
1-7
2. Hold the Battery Set with the cable facing outward and insert it into the battery compartment.
Battery compartment
3. Connect the battery connector to the battery connector terminals. Connect
the red wire to the top and the black wire to the bottom terminal. There are
two sets of battery connector terminals; connect the battery to either one. It
does not matter whether the top terminals or bottom terminals are used.
Red
Black
Battery connector terminals
(Connect to either set of terminals.)
25
Section
Initial Setup
1-7
4. Fold in the cable and close the cover.
After installing the battery, clear memory using the memory clear operation to
initialize the RAM inside the CPU Unit.
Clearing Memory
Programming Console
Use the following procedure from a Programming Console.
Initial display
SET
NOT
RESET
MON
0
0
(or
1
)
MON
Note You cannot specify more than one cyclic task when clearing memory from a Programming Console. You can specify one cyclic task and one interrupt task, or
one cyclic task and no interrupt task. Refer to 1-2 Examples for more information
on the memory clear operation. Refer to Section 6 CPU Unit Operation and Section 11 Tasks for more information on tasks.
CX-Programmer
Memory can also be cleared from the CX-Programmer. Refer to the CX-Programmer Operation Manual for the actual procedure.
Clearing Errors
After clearing memory, clear any errors from the CPU Unit, including the low battery voltage error.
Programming Console
Use the following procedure from a Programming Console.
Initial display
FUN
MON
MON
(Displayed error will be cleared.)
MON
(Returns to the initial display.)
CX-Programmer
Errors can also be cleared from the CX-Programmer. Refer to the CX-Programmer Operation Manual for the actual procedure.
Note When an Inner Board is mounted, an Inner Board routing table error may continue even after you have cancelled the error using the CX-Programmer. (A42407
will be ON for a Serial Communications Board.) If this occurs, either reset the
power or restart the Inner Board, then cancel the error again.
26
Section
Using the Internal Clock
1-8
1-8
Using the Internal Clock
The internal clock of the CPU Unit is set to “00 year, 01 month, 01 day
(00-01-01), 00 hours, 00 minutes, 00 seconds (00:00:00), and Sunday (SUN)”
when the Battery Set is mounted in the CPU Unit.
When using the internal clock, turn ON the power supply after mounting the Battery Set and 1) use a Programming Device (Programming Console or CX-Programmer) to set the clock time, 2) execute the CLOCK ADJUSTMENT (DATE)
instruction, or 3) send a FINS command to start the internal clock from the correct current time and date.
The Programming Console operation used to set the internal clock is shown below.
Key Sequence
Initial display
FUN
SHIFT
MON
0
CHG
↑
Data
WRITE
↓
Specify: Yr Mo Day Hr Min S
27
SECTION 2
Specifications and System Configuration
This section provides tables of standard models, Unit specifications, system configurations, and a comparison between different Units.
2-1
2-2
2-3
2-4
2-5
2-6
Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-1-1 General Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CPU Unit Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-2-1 CPU Unit Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-2-2 Unit Classifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-2-3 Data Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Basic System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-3-1 CPU Rack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-3-2 Expansion Racks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-3-3 SYSMAC BUS Slave Racks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-4-1 Basic I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-4-2 Special I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-4-3 CS1 CPU Bus Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Expanded System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-5-1 Serial Communications System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-5-2 Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-5-3 Communications Network System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Unit Current Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-6-1 CPU Racks and Expansion Racks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-6-2 SYSMAC BUS Remote I/O Slave Racks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-6-3 Example Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-6-4 Current Consumption Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
30
34
36
39
39
40
41
43
47
51
54
54
59
67
67
67
69
76
82
82
82
83
84
29
Section
Specifications
2-1
2-1
Specifications
Performance Specifications
CPU Unit Comparison
CPU
CS1HCPU67EV1
CS1HCPU66EV1
I/O bits
5120
User
program
memory
(steps)
(See note)
250K
Data
memory
Extended
data
memory
32K words
Current
consumption
1.10 A at 5 VDC
CS1HCPU65EV1
CS1HCPU64EV1
CS1HCPU63EV1
CS1GCPU45EV1
CS1GCPU44EV1
CS1GCPU43EV1
1280
960
CS1GCPU42EV1
120K
60K
30K
20K
60K
30K
20K
10K
32K words
x 13 banks
32K words
x 7 banks
32K words
x 3 banks
32K words
x 1 banks
Not
supported
32K words
x 3 banks
32K words
x 1 banks
Not
supported
Not
supported
E0_00000
to
E6_32767
E0_00000
to
E6_32767
E0_00000
to
E2_32767
E0_00000
to
E0_32767
E0_00000
to
E2_32767
E0_00000
to
E2_32767
0.95 A at 5 VDC
Note The number of steps in a program is not the same as the number of instructions.
For example, LD and OUT require 1 step each, but MOV(021) requires 3 steps.
The program capacity indicates the total number of steps for all instructions in
the program. Refer to 15-5 Instruction Execution Times and Steps for the number of steps required for each instruction.
Common Specifications
Item
Specification
Control method
Stored program
I/O control method
Cyclic scan and immediate processing are both possible.
Programming
Ladder diagram
Instruction length
1 to 7 steps per instruction
Ladder instructions
Execution time
Approx. 400 (3-digit function codes)
Basic instructions:
0.04 µs
µ min.
Special instructions:
Number of tasks
0.12 µs min.
288 (cyclic tasks: 32, interrupt tasks: 256)
Note Cyclic tasks are executed each cycle and are controlled with TKON(820) and
TKOF(821) instructions.
Note The following 4 types of interrupt tasks are supported.
Power OFF interrupt tasks:1 max.
Scheduled interrupt tasks: 2 max.
I/O interrupt tasks:
32 max.
External interrupt tasks:
256 max.
Interrupt types
Scheduled Interrupts:
Interrupts generated at a time scheduled by the CPU Unit’s built-in timer.
I/O Interrupts:
Interrupts from Interrupt Input Units.
Power OFF Interrupts:
Interrupts executed when the CPU Unit’s power is turned OFF.
External I/O Interrupts:
Interrupts from the Special I/O Units, CS1 CPU Bus Units, or the Inner Board.
30
Section
Specifications
Item
CIO
(Core
I/O)
Area
I/O Area
Specification
5,120 : CIO 000000 to CIO 031915 (320 words from CIO 0000 to
CIO 0319 )
The setting of the first word can be changed from the default (CIO 0000)
so that CIO 0000 to CIO 0999 can be used.
CompoBus/D
Area
PC Link Area
2-1
I/O bits are allocated to Basic I/O Units, such as CS1 Basic I/O Units,
C200H Basic I/O Units, and C200H Group-2 High-density I/O Units.
1,600 (100 words):
Outputs: CIO 005000 to CIO 009915 (words CIO 0050 to CIO 0099)
Inputs: CIO 035000 to CIO 039915 (words CIO 0350 to CIO 0399)
The CIO
Area can
be used
as work
bits if the
the bits
are not
used as
shown
here.
CompoBus/D bits are allocated to Slaves according to CompoBus/D
remote I/O communications.
80 bits (5 words): CIO 024700 to CIO 025015 (words CIO 0247 to
CIO 0250 and CIO A442)
When a PC Link Unit is used in a PC Link, use these bits to monitor PC
Link errors and the operating status of other CPU Units in the PC Link.
Link Area
3,200 (200 words): CIO 10000 to CIO 119915 (words CIO 1000 to
CIO 1199 )
Link bits are used for data links and are allocated to Units in Controller
Link Systems and PC Link Systems.
CS1 CPU Bus Unit
Area
6,400 (400 words): CIO 150000 to CIO 189915 (words CIO 1500 to
CIO 1899 )
CS1 CPU Bus Unit bits store the operating status of CS1 CPU Bus
Units.
(25 words per Unit, 16 Units max.)
Special I/O Unit Area
15,360 (960 words): CIO 200000 to CIO 295915 (words CIO 2000 to
CIO 2959 )
Special I/O Unit bits are allocated to CS1 Special I/O Units and C200H
Special I/O Units. (See Note.)
(10 words per Unit, 96 Units max.)
Note Special I/O Units are I/O Units that belong to a special group called
“Special I/O Units.” Examples: C200H-ID215/0D215/MD215
Inner Board Area
SYSMAC BUS Area
1,600 (100 words): CIO 190000 to CIO 199915 (words CIO 1900 to
CIO 1999 )
Inner Board bits are allocated to Inner Boards. (100 I/O words max.)
800 (50 words): CIO 300000 to CIO 304915 (words CIO 3000 to
CIO 3049 )
SYSMAC BUS bits are allocated to Slave Racks connected to SYSMAC
BUS Remote I/O Master Units. (10 words per Rack, 5 Racks max.)
I/O Terminal Area
Internal I/O Area
512 (32 words): CIO 310000 to CIO 313115 (words CIO 3100 to
CIO 3131 )
I/O Terminal bits are allocated to I/O Terminal Units (but not to Slave
Racks) connected to SYSMAC BUS Remote I/O Master Units. (1 word
per Terminal, 32 Terminals max.)
4,800 (300 words): CIO 120000 to CIO 149915 (words CIO 1200 to CIO 1499)
37,504 (2,344 words): CIO 380000 to CIO 614315 (words CIO 3800 to CIO 6143)
These bits in the CIO Area are used as work bits in programming to control program
execution. They cannot be used for external I/O.
Work Area
8,192 bits (512 words): W00000 to W51115 (W000 to W511)
Controls the programs only. (I/O from external I/O terminals is not possible.)
Note When using work bits in programming, use the bits in the Work Area first before
using bits from other areas.
Holding Area
8,192 bits (512 words): H00000 to H51115 (H000 to H511)
Holding bits are used to control the execution of the program, and maintain their
ON/OFF status when the PC is turned OFF or the operating mode is changed.
31
Section
Specifications
Item
Auxiliary Area
2-1
Specification
Read only: 7,168 bits (448 words): A00000 to A44715 (words A000 to A447)
Read/write: 8,192 bits (512 words): A44800 to A95915 (words A448 to A959)
Auxiliary bits are allocated specific functions.
Temporary Area
8 bits (TR0 to TR7)
Timer Area
Temporary bits are used to temporarily store the ON/OFF execution conditions at
program branches.
4,096: T0000 to T4095 (used for timers only)
Counter Area
4,096: C0000 to C4095 (used for counters only)
DM Area
32K words: D00000 to D32767
Used as a general-purpose data area for reading and writing data in word units
(16 bits). Words in the DM Area maintain their status when the PC is turned OFF or
the operating mode is changed.
Internal Special I/O Unit DM Area: D20000 to D29599 (100 words
Used to set parameters for Special I/O Units.
CS1 CPU Bus Unit DM Area: D30000 to D31599 (100 words
Used to set parameters for CS1 CPU Bus Units.
96 Units)
16 Units)
Inner Board DM Area: D32000 to D32099
Used to set parameters for Inner Boards.
EM Area
32K words per bank, 13 banks max.: E0_00000 to EC_32767 max. (Not available on
some CPU Units.)
Used as a general-purpose data area for reading and writing data in word units
(16 bits). Words in the EM Area maintain their status when the PC is turned OFF or
the operating mode is changed.
The EM Area is divided into banks, and the addresses can be set by either of the
following methods.
Changing the current bank using the EMBC(281) instruction and setting addresses
for the current bank.
Setting bank numbers and addresses directly.
EM data can be stored in files by specifying the number of the first bank.
Data Registers
DR0 to DR15
Store offset values for indirect addressing. Data registers can be used independently
in each task. One register is 16 bits (1 word).
Index Registers
IR0 to IR15
Store PC memory addresses for indirect addressing. Index registers can be used
independently in each task. One register is 32 bits (2 words).
Task Flag Area
Trace Memory
32 (TK0000 to TK0031)
Task Flags are read-only flags that are ON when the corresponding cyclic task is
executable and OFF when the corresponding task is not executable or in standby
status.
40,000 words (trace data: 31 bits, 6 words)
File Memory
Memory Cards: Compact flash memory cards can be used (MS-DOS format).
EM file memory: Part of the EM Area can be converted to file memory (MS-DOS
format).
OMRON Memory Cards with 8-MB, 15-MB, or 30-MB capacities can be used.
Function Specifications
Item
Specification
Constant cycle time
1 to 32,000 ms (Unit: 1 ms)
Cycle time monitoring
Possible (Unit stops operating if the cycle is too long): 1 to 40,000 ms (Unit: 10 ms)
I/O refreshing
Cyclic refreshing, immediate refreshing, refreshing by IORF(097).
I/O memory holding when
changing operating modes
Load OFF
Depends on the ON/OFF status of the IOM Hold Bit in the Auxiliary Area.
32
All outputs on Output Units can be turned OFF when the CPU Unit is operating in
RUN, MONITOR, or PROGRAM mode.
Section
Specifications
Item
2-1
Specification
Input response time setting
Time constants can be set for inputs from Basic I/O Units. The time constant can be
increased to reduce the influence of noise and chattering or it can be decreased to
detect shorter pulses on the inputs.
Mode setting at power-up
Memory Card functions
Possible
Automatically reading programs
(autoboot) from the Memory Card when
the power is turned ON.
Possible
Program replacement during PC
operation (-EV1 only)
Format in which data is stored in Memory
Card
Possible
User program: Program file format
PC Setup and other parameters: Data file
format
I/O memory: Data file format (binary
format), text format, or CSV format (text
and CSV formats are only available with
-EV1 or later)
Functions for which Memory Card
read/write is supported
Filing
Debugging
Online editing
Program protection
User program instructions, Programming
Devices (including Programming
Consoles), Host Link computers, AR
Area control bits, easy backup operation
Memory Card data and the EM (Extended Data Memory) Area can be handled as
files.
Control set/reset, differential monitoring, data tracing (scheduled, each cycle, or when
instruction is executed), instruction error tracing.
User programs can be overwritten in program-block units when the CPU Unit is in
MONITOR or PROGRAM mode. This function is not available for block programming
areas. With the CX-Programmer, more than one program block can be edited at the
same time.
Overwrite protection: Set using DIP switch.
Copy protection:
Error check
Error log
Serial communications
Password set using Programming Device.
User-defined errors (i.e., user can define fatal errors and non-fatal errors)
The FPD(269) instruction can be used to check the execution time and logic of each
programming block.
Up to 20 errors are stored in the error log. Information includes the error code, error
details, and the time the error occurred.
Built-in peripheral port: Programming Device (including Programming Console)
connections, Host Links, NT Links
Built-in RS-232C port: Programming Device (excluding Programming Console)
connections, Host Links, no-protocol communications, NT Links
Clock
Serial Communications Board (sold separately): Protocol macros, Host Links, NT
Links
Provided on all models. Accuracy: ± 30 s/mo. at 25°C (accuracy varies with the
temperature)
Note Used to store the time when power is turned ON and when errors occur.
Power OFF detection time
10 to 25 ms (not fixed)
Power OFF detection delay
time
Memory protection
0 to 10 ms (user-defined, default: 0 ms)
Held Areas: Holding bits, contents of Data Memory and Extended Data Memory, and
status of the counter Completion Flags and present values.
Note If the IOM Hold Bit in the Auxiliary Area is turned ON, and the PC Setup is set to
maintain the IOM Hold Bit status when power to the PC is turned ON, the contents
of the CIO Area, the Work Area, part of the Auxiliary Area, timer Completion Flag
and PVs, Index Registers, and the Data Registers will be saved for up to 20 days.
Sending commands to a Host
Link computer
Remote programming and
monitoring
FINS commands can be sent to a computer connected via the Host Link System by
executing Network Communications Instructions from the PC.
Host Link communications can be used for remote programming and remote
monitoring through a Controller Link System or Ethernet network.
33
Section
Specifications
Item
2-1
Specification
Three-level communications
Host Link communications can be used for remote programming and remote
monitoring from devices on networks up to two levels away (Controller Link Network,
Ethernet Network, or other network).
Storing comments in CPU
Unit
Program check
I/O comments can be stored in the CPU Unit in Memory Cards or EM file memory.
Control output signals
Program checks are performed at the beginning of operation for items such as no
END instruction and instruction errors.
CX-Programmer can also be used to check programs.
RUN output: The internal contacts will turn ON (close) while the CPU Unit is
operating.
These terminals are provided only on the C200HW-PA204R and C200HW-PA209R
Power Supply Units.
Battery life
Refer to 17-2 Replacing User-serviceable Parts.
Battery Set: CS1W-BAT01
Self-diagnostics
CPU errors (watchdog timer), I/O verification errors, I/O bus errors, memory errors,
and battery errors.
Storage of number of times power has been interrupted. (Stored in A514.)
Other functions
2-1-1 General Specifications
Item
Specifications
Power Supply
Unit
Supply voltage
C200HW-PA204
C200HW-PA204S
C200HW-PA204R C200HW-PA209R C200HW-PD024
100 to 120 VAC or 200 to 240 VAC, 50/60 Hz
24 VDC
Operating
voltage range
Power
consumption
Inrush current
Output capacity
85 to 132 VAC or 170 to 264 VAC
19.2 to 28.8 VDC
120 VA max.
180 VA max.
30 A max.
30 A max.
4.6 A, 5 VDC
0.625 A, 26 VDC
40 W max.
0.625 A, 26 VDC
0.625 A, 26 VDC
9 A, 5 VDC
(including the
CPU Unit power
supply)
1.3 A, 26 VDC
4.6 A, 5 VDC
(including the
CPU Unit power
supply)
0.625 A, 26 VDC
Total: 45 W max.
Total: 30 W max.
0.8 A, 24 VDC
Total: 30 W max.
Total: 30 W max.
Total: 30 W max.
Output terminal
(service supply)
Not provided
Provided.
At consumption of
less than 0.3 A,
24-VDC supply
will be
+17%/–11%; at
0.3 A or greater,
+10%/–11% (lot
0197 or later)
Not provided
RUN output
(See Note 2.)
Not provided
34
Not provided
Contact
configuration:
SPST-NO
Contact
configuration:
SPST-NO
Switch capacity:
250 VAC, 2A
(resistive load)
250 VAC, 0.5 A
(induction load),
24 VDC, 2A
Switch capacity:
240 VAC, 2A
(resistive load)
120 VAC, 0.5 A
(induction load)
24 VDC, 2A
(resistive load)
24 VDC, 2 A
(induction load)
Not provided
Section
Specifications
Item
2-1
Specifications
Insulation
resistance
20 MΩ min. (at 500 VDC) between AC external and GR terminals (See Note.)
Dielectric
strength
2,300 VAC 50/60 Hz for 1 min between AC external and GR terminals (See
Note.)
Leakage current: 10 mA max.
1,000 VAC 50/60 Hz for 1 min between AC external and GR terminals (See
Note.)
20 MΩ min. (at
500 VDC)
between DC
external and GR
terminals (See
Note.)
1,000 VAC
50/60 Hz for 1
min between DC
external and GR
terminals, leakage
current: 10 mA
max.
Noise immunity
Leakage current: 10 mA max.
2 kV on power supply line (conforming to IEC61000-4-4)
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 (Time coefficient: 8 minutes coefficient factor 10 = total time 80 min.)
Shock
resistance
Ambient
operating
temperature
CPU Unit mounted to a DIN track: 2 to 55 Hz, 2.94 m/s2 in X, Y, and Z directions for 20 minutes
147 m/s2 3 times each in X, Y, and Z directions (according to JIS 0041)
0 to 55C
Ambient
operating
humidity
10% to 90% (with no condensation)
Atmosphere
Must be free from corrosive gases.
Ambient storage
temperature
Grounding
–20 to 70C (excluding battery)
Enclosure
Mounted in a panel.
Weight
All models are each 6 kg max.
CPU Rack
dimensions
(mm)
(See Note 3.)
2 slots: 198.5
Safety measures
Less than 100 Ω
157
123 (W x H x D)
3 slots: 260
130
123 (W x H x D)
5 slots: 330
130
123 (W x H x D)
8 slots: 435
130
123 (W x H x D)
10 slots: 505
130
123 (W x H x D)
Conforms to UL, CSA, NK, and EC directives.
Note
1. Disconnect the Power Supply Unit’s LG terminal from the GR terminal when
testing insulation and dielectric strength.
Testing the insulation and dielectric strength with the LG terminal and the
GR terminals connected will damage internal circuits in the CPU Unit.
2. Supported only when mounted to CPU Backplane.
3. The depth is 153 mm for the C200HW-PA209R Power Supply Unit.
35
Section
CPU Unit Components
2-2
CPU Unit Components
8. Inner Board
connector
compartment
1. Indicators
9. Peripheral port
2. Memory Card
indicators
10. RS-232C port
3. Memory Card
power supply
switch
4. Memory Card
eject button
6. Memory Card
connector
7. Memory Card
Battery compartment cover lifted
Inner Board
(e.g., Serial Communications Board)
5. DIP switch
36
2-2
Section
CPU Unit Components
1, 2, 3...
2-2
1. Indicators
The following table describes the LED indicators on the front panel of the
CPU Unit.
Indicator
RUN (green)
ERR/ALM (red)
INH (orange)
PRPHL
(orange)
COMM
(orange)
MCPWR
(green)
BUSY (orange)
Meaning
Lights when the PC is operating normally in MONITOR or
RUN mode.
Flashes if a non-fatal error occurs that does not stop the
CPU Unit. If a non-fatal error occurs, the CPU Unit will
continue operating.
Lights if a fatal error occurs that stops the CPU Unit or if a
hardware error occurs. If a fatal or hardware error occurs, the
CPU Unit will stop operating, and the outputs from all Output
Units will turn OFF.
Lights when the Output OFF Bit (A50015) turns ON. If the
Output OFF Bit is turned ON, the outputs from all Output
Units will turn OFF.
Flashes when the CPU Unit is communicating via the
peripheral port.
Flashes when the CPU Unit is communicating via the
RS-232C port.
Flashes when power is being supplied to the Memory Card.
Flashes when the Memory Card is being accessed.
2. Memory Card Indicators
The MCPWR indicator flashes green when power is being supplied to the
Memory Card and the BUSY indicator flashes orange when the Memory
Card is being accessed.
3. Memory Card Power Supply Switch
Press the Memory Card power supply switch to disconnect power before removing the Memory Card. Also, press the Memory Card Power Supply
Switch to perform an easy backup operation (i.e., to write to or verify the
Memory Card), or to stop the MCPWR indicator flashing due to a write or
verify malfunction when performing an easy backup to the Memory Card.
4. Memory Card Eject Button
Press the Memory Card eject button to remove the Memory Card from the
CPU Unit before turning the power OFF or to perform an easy backup operation.
5. DIP Switch
The CS1 CPU Unit has an 8-pin DIP switch that is used to set basic operational parameters for the CPU Unit. The DIP switch is located under the cover of the battery compartment. The DIP switch pin settings are described in
the following table.
37
Section
CPU Unit Components
Pin No.
1
2
3
Setting
ON
OFF
ON
OFF
ON
OFF
4
ON
OFF
5
ON
6
7
8
OFF
ON
OFF
ON
OFF
OFF
2-2
Function
Writing disabled for user program memory.
Writing enabled for user program memory.
The user program is automatically transferred and executed when power is turned ON.
The user program is automatically transferred but not executed when power is turned ON.
Programming Console messages displayed in English.
Programming Console messages displayed in the language stored in system ROM.
(Messages displayed in Japanese with the Japanese version of system ROM.)
Use peripheral port communications parameters set in the PC Setup.
Auto-detect Programming Console or CX-Programmer communications parameters at the
peripheral port.
Auto-detect Programming Console or CX-Programmer communications parameters at the
RS-232C port.
Use RS-232C port communications parameters set in the PC Setup.
User-defined pin. Turns OFF the User DIP Switch Pin Flag (A39512).
User-defined pin. Turns ON the User DIP Switch Pin Flag (A39512).
Easy backup by reading/writing to Memory Card.
Easy backup by verifying contents of Memory Card.
Always OFF.
6. Memory Card Connector
The Memory Card connector connects the Memory Card to the CPU Unit.
7. Memory Card
Memory Cards fit into the slot located on the lower right side of the CPU Unit.
Memory Cards are not provided with the PC and must be ordered separately
and installed in the CPU Unit.
8. Inner Board Connector Compartment
The Inner Board connector compartment is used to connect Inner Boards
such as the Serial Communications Board.
9. Peripheral Port
The peripheral port is connected to Programming Devices, such as a Programming Console or Host Computers. Refer to 3-1 CPU Units for details.
10. RS-232C Port
The RS-232C port is connected to Programming Devices (excluding Programming Console), Host Computers, general-purpose external devices,
Programmable Terminals, and other devices. Refer to 3-1 CPU Units for details.
38
Section
CPU Unit Components
2-2
2-2-1 CPU Unit Capabilities
Model
I/O bits
Program
capacity
Data memory
capacity
(See Note.)
CS1H-CPU67-EV1
CS1H-CPU66-EV1
CS1H-CPU65-EV1
CS1H-CPU64-EV1
CS1H-CPU63-EV1
CS1G-CPU45-EV1
5120 bits
(Up to 7
Expansion
Racks)
5120 bits
250K steps
120K steps
60K steps
30K steps
20K steps
60K steps
448K words
256K words
128K words
64K words
32K words
128K words
Ladder
instruction
processing
speed
0.04 µs
µ
Internal communications
ports
Peripheral
port and
RS-232C port.
Optional
products
Memory
Cards
Inner Boards
such as Serial
Communications Boards
0.08 µs
(Up to 7
Expansion
Racks)
CS1G-CPU44-EV1
1280 bits
30K steps
64K words
CS1G-CPU43-EV1
(Up to 3
Expansion
Racks)
960 bits
20K steps
32K words
10K steps
32K words
CS1G-CPU42-EV1
(Up to 2
Expansion
Racks)
Note The available Data Memory capacity is the sum of the Data Memory (DM) and
the Extended Data Memory (EM).
2-2-2 Unit Classifications
The CS1-series CPU Units can exchange data with Basic I/O Units, Special I/O
Units, and CS1 CPU Bus Units as shown in the following diagram.
Basic I/O Units
C200H Basic I/O Units
C200H Interrupt Input Units
C200H Group-2 High-density I/O Units
CS1 Basic I/O Units
CS1CPU Units
Special I/O Units
I/O Units
C200H High-density I/O Units
(classified as C200H Special I/O Units)
C200H Special I/O Units
CS1 Special I/O Units
CS1 CPU Bus Units
CS1 CPU Bus Units
39
Section
CPU Unit Components
2-2
2-2-3 Data Communications
CPU Unit Data Communications
Unit
CS1 Basic I/O Units
C200H Basic I/O
Units
C200H Group-2
High-density I/O
Units (classified as
Basic I/O Units)
CS1 Special I/O
Units
Data Exchange during cyclic servicing
(allocations)
According to I/O
allocations
I/O refreshing
Event service data
communications
(IORD/IOWR
instruction)
Not provided.
(Words are allocated
in order according to
the position the Unit is
mounted.)
I/O refreshing using
IORF instruction
Yes
Yes
Yes
Unit No. allocations
Special I/O Unit Area
(CIO): 10 words/Unit
Special I/O Unit Area
(DM): 100 words/Unit
C200H Special I/O
Units
CS1 CPU Bus Units
CS1 CPU Bus Unit
Area (CIO):
25 words/ Unit
Yes
Yes
(Not available for
some Units.)
Yes
(Not available for
some Units.)
Yes
(Not available for
some Units.)
Not provided.
(Not available for
some Units.)
No
CS1 CPU Bus Unit
Area (DM):
100 words/Unit
CPU Unit Connections
Unit
CS1 Basic I/O Units
C200H Basic I/O
Units
C200H Group-2
High-density I/O
Units (classified as
Basic I/O Units)
CS1 Special I/O
Units
C200H Special I/O
Units
CS1 CPU Bus Units
Maximum
Number of Units
on CPU Racks
and Expansion
Racks
CPU Rack
C200H
Expansion I/O
Racks
CS1 Expansion
Racks
SYSMAC BUS
Slave Racks
80
(See Note 1.)
80
(See Note 1.)
80
(See Note 1.)
Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
80
(See Note 2 and
4.)
Yes
No
Yes
No
16
Yes
Yes
Yes
16
Yes
No
Yes
(See Note 3.)
Yes (See Note 3
and 4.)
No
Note
40
Racks to which Unit can be mounted
1. The maximum number of Units on CPU Racks and Expansion Racks is 80
because there is a maximum of 80 slots.
2. There is a maximum of 80 slots
3. Some CS1 CPU Bus Units cannot be mounted to a CS1 Expansion Rack.
4. Up to 89 Special I/O Units can be mounted as follows: Up to 79 CS1 Special
I/O Units can be mounted to the CPU Rack and CS1 Expansion Racks and
up to 10 C200H Special I/O Units can be mounted to the SYSMAC BUS
Slave Racks. The C200H Special I/O Units must be assigned unit numbers
0 to 9, and each Remote I/O Master Unit must be counted as a CS1 Special
I/O Unit.
Section
Basic System Configuration
2-3
2-3
Basic System Configuration
A CPU Rack consists of a CPU Unit, a Power Supply Unit, a CPU Backplane,
Basic I/O Units, Special I/O Units, and CPU Bus Units. A Serial Communications
Board and Memory Card are optional.
Note
1. The Backplanes required depend on which CPU Racks, Expansion I/O
Racks, and Slave Racks are used.
2. Expansion Racks cannot be connected to a 2-slot CPU Rack.
3. A maximum of four C200HS-INT01 Interrupt Input Units can be connected
to one CPU Unit.
The Expansion Racks required for the C200H CPU Units and CS1 CPU Units
are different.
• C200H Expansion I/O Racks can be connected to CPU Racks, CS1 Expansion Racks, or other C200H Expansion I/O Racks.
• CS1 Expansion Racks can be connected to CPU Racks or other CS1 Expansion Racks. A CS1 Expansion Rack consists of a Power Supply Unit, a CS1
Expansion Backplane or C200H Expansion I/O Backplane, a Basic I/O Unit, a
Special I/O Unit, and a CS1 CPU Bus Unit.
Note a) CS1 Expansion Racks cannot be connected after C200H Expansion I/O Racks.
b) CS1 Basic I/O Units, CS1 Special I/O Units and CS1 CPU Bus
Units cannot be mounted to C200H Expansion I/O Racks.
c) Interrupt Input Units cannot be mounted to CS1 Expansion Racks
or C200H Expansion I/O Racks.
Up to 5 SYSMAC BUS Slave Racks can be connected to one SYSMAC BUS
Remote I/O Master Unit. A maximum of 5 Units, however, can be connected to
one CPU Unit.
A SYSMAC BUS Slave Rack consists of a Remote I/O Slave Unit, a Remote I/O
Slave Rack Backplane, a Basic I/O Unit, and a Special I/O Unit.
Note
1. C200H Group-2 High-density I/O Units, Interrupt Input Units, CS1 Basic I/O
Units, CS1 Special I/O Units and CS1 CPU Bus Units cannot be mounted to
SYSMAC BUS Slave Racks.
41
Section
Basic System Configuration
2-3
2. SYSMAC BUS Slave Racks can be connected to C200H Expansion I/O
Racks using C200H I/O Connecting Cables.
CPU Rack
CPU Backplane
Power Supply Unit
I/O Units
Special I/O Units
CS1 CPU Bus Units
Memory Card
Serial Communications Board
Remote I/O Master Unit
Expansion Rack
I/O Backplane
I/O Connecting
Cables
I/O Units
Special I/O Units
CS1 CPU Bus Units
Power Supply Unit
Optical fiber cables
Two-core cables
SYSMAC BUS Slave Rack
Backplane
I/O Units
Special I/O Units
Remote I/O Slave Unit
42
Section
Basic System Configuration
2-3
2-3-1 CPU Rack
A CPU Rack consists of a CPU Backplane, a Power Supply Unit, and various
other Units.
CPU Backplane (2, 3, 5, 8, or 10 slots)
CPU Unit
Power Supply Unit
Peripheral port
Serial Communications Board
Memory Card compartment
Other Units
Inner Board
connector
(Depending on the CPU Backplane, 2, 3, 5, 8,
or 10 Units can be mounted)
Memory Card
Name
Configuration
CPU Rack CPU Backplane
CPU Unit
Remarks
One of each Unit required for every CPU
Rack.
Power Supply Unit
Refer to the following table for details on
applicable models.
Memory Card
Install as required.
Serial Communications
Board
Refer to the following table for details on
applicable models.
43
Section
Basic System Configuration
2-3
Units
Name
CPU Units
Model
CS1H-CPU67-EV1
Specifications
I/O bits: 5,120
Program capacity: 250K steps
CS1H-CPU66-EV1
Data Memory: 448K words (DM: 32K words, EM: 32K words
13 banks)
I/O bits: 5,120
Program capacity: 120K steps
CS1H-CPU65-EV1
Data Memory: 256K words (DM: 32K words, EM: 32K words
banks)
I/O bits: 5,120
7
Program capacity: 60K steps
CS1H-CPU64-EV1
Data Memory: 128K words (DM: 32K words, EM: 32K words
banks)
I/O bits: 5,120
3
Program capacity: 30K steps
CS1H-CPU63-EV1
Data Memory: 64K words (DM: 32K words, EM: 32K words
banks)
I/O bits: 5,120
1
Program capacity: 20K steps
Data Memory: 32K words (DM: 32K words, EM: None)
CS1G-CPU45-EV1
I/O bits: 5,120
Program capacity: 60K steps
CS1G-CPU44-EV1
Data Memory: 128K words (DM: 32K words, EM: 32K words
banks)
I/O bits: 1,280
3
Program capacity: 30K steps
CS1G-CPU43-EV1
Data Memory: 64K words (DM: 32K words, EM: 32K words
banks)
I/O bits: 960
1
Program capacity: 20K steps
Data Memory: 32K words (DM: 32K words, EM: None)
CS1G-CPU42-EV1
I/O bits: 960
Program capacity: 10K steps
Data Memory: 32K words (DM: 32K words, EM: None)
CPU Backplanes
CS1W-BC023
CS1W-BC033
CS1W-BC053
CS1W-BC083
CS1W-BC103
2 slots
3 slots
5 slots
8 slots
10 slots
Power Supply Units
C200HW-PA204
C200HW-PA204S
100 to 120 VAC or 200 to 240 VAC
100 to 120 VAC or 200 to 240 VAC (with 0.8 A 24 VDC service
power supply)
C200HW-PA204R
Output capacity: 4.6 A, 5 VDC
100 to 120 VAC or 200 to 240 VAC (with RUN output)
C200HW-PD024
C200HW-PA209R
Output capacity: 4.6 A, 5 VDC
24 VDC
100 to 120 VAC or 200 to 240 VAC (with RUN output)
Output capacity: 9A, 5 VDC
44
Section
Basic System Configuration
Name
Memory Cards
Serial Communications
Boards
Programming Consoles
Programming Console
Connecting Cables
Model
HMC-EF861
HMC-EF171
HMC-EF371
HMC-EF571
HMC-AP001
CS1W-SCB21
CS1W-SCB41
CQM1-PRO01-E
C200H-PRO27-E
CS1W-CN114
CS1W-CN224
CS1W-CN624
Programming Device
Connecting Cables (for
peripheral port)
CS1W-CN118
2-3
Specifications
Flash memory, 8 MB
Flash memory, 15 MB
Flash memory, 30 MB
Flash memory, 48 MB
Memory Card Adapter
2
RS-232C ports, protocol macro function
1
RS-232C port + 1
RS-422/485 port, protocol macro
function
An English Keyboard Sheet (CS1W-KS001-E) is required.
Connects the CQM1-PRO01-E Programming Console.
(Length: 0.05 m)
Connects the CQM1-PRO27-E Programming Console.
(Length: 2.0 m)
Connects the CQM1-PRO27-E Programming Console.
(Length: 6.0 m)
Connects DOS computers
D-Sub 9-pin receptacle (For converting between RS-232C cable
and peripherals)
(Length: 0.1 m)
CS1W-CN226
Connects DOS computers
CS1W-CN626
D-Sub 9-pin (Length: 2.0 m)
Connects DOS computers
D-Sub 9-pin (Length: 6.0 m)
Programming Device
Connecting Cables (for
RS-232C port)
XW2Z-200S-CV
Connects DOS computers
XW2Z-500S-CV
D-Sub 9-pin (Length: 2.0 m), Static-resistant connector used.
Connects DOS computers
XW2Z-200S-V
D-Sub 9-pin (Length: 5.0 m), Static-resistant connector used.
Connects DOS computers
D-Sub 9-pin (Length: 2.0 m) (see note)
Battery Set
XW2Z-500S-V
Connects DOS computers
CS1W-BAT01
D-Sub 9-pin (Length: 5.0 m) (see note)
For CS1 Series only.
Note A peripheral bus connection is not possible when connecting the CX-Programmer via an RS-232C Connecting Cable. Use the Host Link (SYSMAC WAY) connection.
45
Section
Basic System Configuration
2-3
Connecting Programming Devices
When using a Programming Console, connect the Programming Console to the
peripheral port of the CPU Unit and set pin 4 of the DIP switch on the front panel
of the Unit to OFF (automatically uses default communications parameters for
the peripheral port).
CQM1-PRO01-E
The Programming Console can be connected only to the peripheral port.
Programming Console
The following cable is included with the
CQM1-PRO01-E Programming Console
CS1W-KS001-E
English Keyboard
Sheet required.
Programming Console
Cable
CS1W-CN114
CQM1-PRO01-E
CQM1-PRO01-E
Programming
Console
Length
0.05 m
Note Set pin 4 of the DIP switch on the
front panel of the CPU Unit to OFF.
Peripheral port
C200H-PRO27-E
The Programming Console can be connected only to the peripheral port.
CS1W-KS001-E
English Keyboard
Sheet required.
Programming Console
CQM1-PRO27-E
C200H-PRO27-E
Programming
Console
Cable
CS1W-CN224
CS1W-CN624
Length
2.0 m
6.0 m
Note Set pin 4 of the DIP switch on the
front panel of the CPU Unit to OFF.
Peripheral port
Note When an OMRON Programmable Terminal (PT) is connected to the RS-232C
port and Programming Console functions are being used, do not connect the
Programming Console at the same time.
46
Section
Basic System Configuration
2-3
Connecting Personal Computers Running Support Software
Connecting to Peripheral Port
RS-232C
Connecting Cables for Peripheral Port
Computer
DOS computer
(RS-232C, 9-pin)
DOS
Peripheral
port
Cable
Length
Computer
connector
CS1W-CN118
0.1 m
CS1W-CN226
2.0 m
D-Sub,
9-pin
CS1W-CN626
6.0 m
Note The CS1W-CN118 Cable is used with an RS-232C
cable to connect to the peripheral port on the CPU
Unit as shown below. The CS1W-CN118 Cable cannot be used with an RS-232C cable whose model
number ends in -V for a peripheral bus connection
and must be used for a Host Link (SYSMAC WAY)
connection.
RS-232C Cable
XW2Z-200S-: 2 m
XW2Z-500S-: 5 m
CS1W-CN118 Cable
Peripheral
port
Connecting to RS-232C Port
Connecting Cables for RS-232C Port
Computer
RS-232C Cable
XW2Z-200S-CV
or XW2Z-200S-V: 2 m
DOS version
(RS-232C, 9-pin)
DOS
XW2Z-500S-CV
or XW2Z-500S-V: 5 m
Cable
Length
Computer
connector
XW2Z-200S-CV
or XW2Z-200S-V
2.0 m
D-Sub,
9-pin
XW2Z-500S-CV
or XW2Z-500S-V
5.0 m
Note The XW2Z-200S-CV and XW2Z-500S-CV use static-resisRS-232C port
tant connectors and can be connected to the peripheral bus
or the Host Link. The XW2Z-200S-V and XW2Z-500S-V,
however, can only be connected to the Host Link, not the
peripheral bus.
Programming Software
OS
Windows
Name
CX-Programmer
CD-ROM
2-3-2 Expansion Racks
To expand the number of Units in the system, other Expansion Racks can be
connected to CPU Racks. The other Expansion Racks that can be connected to
the CPU Racks are CS1 Expansion Racks and C200H Expansion I/O Racks.
Note
1. C200H Expansion I/O Racks can be connected after CS1 Expansion
Racks, however, the CS1 Expansion Racks cannot be connected after
C200H Expansion I/O Racks.
47
Section
Basic System Configuration
2-3
CPU Unit
Power Supply Unit
2. Expansion Racks cannot be connected to a 2-slot CPU Backplanes.
CPU Rack
(Other than a 2-slot CPU Rack)
CS1 I/O Connecting Cables
CS1 I/O Connecting Cables
(30 cm, 70 cm, 2 m, 3 m,
5 m, 10 m, or 12 m)
Power Supply Unit
Cable
CS1W-CN313
CS1W-CN713
CS1W-CN223
CS1W-CN323
CS1W-CN523
CS1W-CN133
CS1W-CN133B2
CS1Expansion Backplane
(3, 5, 8, 10 slots)
Power Supply Unit
CS1 to C200H I/O Connecting
Cables (30 cm, 70 cm, 2 m,
3 m, 5 m, 10 m, or 12 m)
C200H Expansion I/O Backplane
(3, 5, 8, 10 slots)
CS1 I/O
Connecting
Cable
CPU Rack
(Excluding the
2-slot Rack.)
CS1 to C200H
I/O Connecting
Cable
CS1 Ex* pansion
Rack
*
CPU Rack
(Excluding the
2-slot Rack.)
CS1 I/O Connecting Cable
C200H
* Expansion I/O
Rack
C200H I/O Connecting Cable
CS1 Ex* pansion
Rack
7 Expansion Racks
max.
C200H
* Expansion I/O
Rack
C200H I/O Connecting Cable
CS1 I/O
Connecting
Cable
CS1 Ex* pansion
Rack
* Power Supply Unit
48
3. CPU Rack connected to CS1
Expansion Rack connected to
C200H Expansion I/O Rack
C200H
* Expansion I/O
Rack
CPU Unit
2. CPU Rack connected to C200H
Expansion I/O Rack
CPU Unit
CPU Unit
1. CPU Rack connected to CS1
Expansion Rack
CS1 I/O
Connecting
Cable
CS1 to C200H I/O Connecting Cables
Length
Cable
0.3 m
CS1W-CN311
0.7 m
CS1W-CN711
2m
CS1W-CN221
3m
CS1W-CN321
CS1W-CN521
5m
CS1W-CN131
10 m
CS1W-CN131B2
12 m
The following diagrams show the 3 possible expansion patterns.
Expansion Patterns
*
Length
0.3 m
0.7 m
2m
3m
5m
10 m
12 m
*
*
CS1 to C200H
I/O Connecting
Cable
3 Expansion
Racks max.
*
C200H I/O Connecting Cable
C200H I/O Connecting Cable
*
CPU Rack
(Excluding the
2-slot Rack.)
CS1 Expansion
Rack
C200H
Expansion I/O
Rack
C200H
Expansion I/O
Rack
7 Expansion
Racks max. (3
C200H Expansion
I/O Racks max.)
Section
Basic System Configuration
2-3
Power Supply Unit
Note CS1 Expansion Racks must be connected before C200H Expansion I/O Racks.
The following configuration is not allowed.
C200H Expansion I/O Rack
Power Supply Unit
Not Allowed
CS1 Expansion Rack
Maximum Expansion Racks
Expansion pattern
CPU Racks with CS1
Expansion Racks
CPU Racks with CS1
Expansion Racks and
C200H Expansion I/O
Racks
CPU Racks with C200H
Expansion I/O Racks
Rack
Maximum No. of Racks
CS1 Expansion Racks
7 Racks
CS1 Expansion Racks and
C200H Expansion I/O
Racks
7 Racks (with 3 C200H
Expansion I/O Racks max.)
C200H Expansion I/O
Racks
3 Racks
Remarks
The total cable length must
be 12 m or less.
Rack Configurations
Rack
CS1 Expansion Racks
C200H Expansion I/O
Racks
Configuration
Remarks
CS1 Expansion Backplane
One of each Unit is
required.
Power Supply Unit
Note CS1
Expansion
Racks can be connected to C200H Expansion I/O Racks,
however, C200H Expansion I/O Racks
must be connected
after CS1 Expansion
Racks.
CPU Backplane or CS1
Expansion Backplane
CS1 I/O Connecting Cables
C200H Expansion I/O
Backplane
CS1 to C200H I/O
Connecting Cables
C200H Expansion I/O Backplane
Power Supply Unit
CS1 Expansion Backplane
CS1 to C200H I/O
Connecting Cables
C200H Expansion I/O
C200H I/O Connecting
Backplane
Cables
One of each Unit is
required.
49
Section
Basic System Configuration
Configuration Device List
Name
CS1 Expansion Backplanes
C200H Expansion I/O
Backplanes
Power Supply Units
Model
CS1W-BI033
CS1W-BI053
CS1W-BI083
CS1W-BI103
C200HW-BI031
C200HW-BI051
C200HW-BI081
C200HW-BI101
C200HW-PA204
Specifications
3 slots
5 slots
8 slots
10 slots
3 slots
5 slots
8 slots
10 slots
100 to 120 VAC or 200 to
240 VAC
Cable Length
---
Output capacity: 4.6 A, 5
VDC
C200HW-PA204S
C200HW-PA204R
100 to 120 VAC or 200 to
240 VAC (with service
supply: 0.8 A, 24 VDC)
Output capacity: 4.6 A, 5
VDC
100 to 120 VAC or 200 to
240 VAC (with RUN output)
Output capacity: 4.6 A, 5
VDC
C200HW-PD024
C200HW-PA209R
CS1 I/O Connecting Cables
CS1 to C200H I/O
Connecting Cables
C200H I/O Connecting
Cables
50
CS1W-CN313
CS1W-CN713
CS1W-CN223
CS1W-CN323
CS1W-CN523
CS1W-CN133
CS1W-CN133B2
CS1W-CN311
CS1W-CN711
CS1W-CN221
CS1W-CN321
CS1W-CN521
CS1W-CN131
CS1W-CN131B2
CS1W-CN311
CS1W-CN711
CS1W-CN221
CS1W-CN521
CS1W-CN131
24 VDC
100 to 120 VAC or 200 to
240 VAC (with RUN output)
Output capacity: 9 A, 5 VDC
Connects CS1 Expansion
0.3 m
Backplanes to CPU
0.7 m
Backplanes or other CS1
2m
Expansion Backplanes.
3m
5m
10 m
12 m
Connects C200H Expansion 0.3 m
I/O Backplanes to CPU
0.7 m
Backplanes or CS1
2m
Expansion Backplanes.
3m
5m
10 m
12 m
Connects C200H Expansion 0.3 m
I/O Backplanes to other
0.7 m
C200H Expansion I/O
2m
Backplanes.
5m
10 m
2-3
Section
Basic System Configuration
2-3
The following table shows the Units that can be connected to CPU Racks, CS1
Expansion Racks, and C200H Expansion I/O Racks.
Refer to 2-4 Units for details on the limitations on each particular Unit.
Connectable Units
Unit
CS1 Basic I/O
Units
CPU Rack
Yes
Yes
Yes
Yes
Yes
Yes
CS1
Expansion
Racks
Yes
Yes
Yes
Yes
Yes
Yes
C200H
Expansion I/O
Racks
No
Yes
Yes
No
Yes
No
Note
C200H Basic
I/O Units
C200H
Group-2
High-density
I/O Units
(Basic I/O
Units)
CS1 Special
I/O Units
C200H
Special I/O
Units
(see note 2)
CS1 CPU Bus
Units
(see note 3)
1. The C200HS-INT01 Interrupt Input Unit is a Basic I/O Unit, but it can be
mounted only to the CPU Rack.
2. Up to 16 C200H Special I/O Units can be mounted.
3. Up to 16 CS1 CPU Bus Units can be mounted.
Maximum Number of
Units
The maximum number of expansion slots is 80, so the maximum number of
Units that can be connected is 80. The total number of each type of Unit is not
limited in the mounting location.
Unit
CS1 Basic I/O
Units
C200H Basic
I/O Units
C200H
Group-2
High-density
I/O Units
(Basic I/O
Units)
CS1 Special
I/O Units
C200H
Special I/O
Units
CS1 CPU Bus
Units
CPU Rack
CS1
Expansion
Racks
The total number of Units that can be connected to a Network is not limited by the location of the
Racks.
C200H
Expansion I/O
Racks
Note C200HS-INT01 Interrupt Input Units are Basic I/O Units but can be connected to
CPU Racks only (4 Units max. per CPU Rack).
2-3-3 SYSMAC BUS Slave Racks
SYSMAC BUS Slave Racks are used to perform basic CS1 remote I/O communications. The SYSMAC BUS Slave Rack allows comparatively small-scale
(512 bits max.) remote I/O communications using Basic I/O Units and Special
I/O Units. The Slave Racks are connected using two-core cable or optical fiber
cables. Units such as Basic I/O Units and Special I/O Units can be mounted to
some Slave Racks. I/O Terminals can also be connected.
51
Section
Basic System Configuration
2-3
Configuration
Rack
SYSMAC BUS Slave
Racks
Configuration
Remarks
One of each required per
Rack.
Backplane
Remote I/O Slave Unit
SYSMAC BUS Remote I/O Master Unit (two-conductor or optical fiber cables)
SYSMAC BUS (two-conductor or optical fiber cables)
Remote I/O
Slave Rack
Slave Rack
SYSMAC BUS
Remote I/O Slave
Unit
SYSMAC BUS
Remote I/O Slave
Unit
Maximum No. of Racks
CPU Units
Master Units
2 Units max.
Slave Racks
5 Racks max.
Master Units
Slave Units
Slave Racks
Maximum Units
5 Racks max.
10 Units max.
(depending on the
Backplane used)
Configuration Devices
Master Units
Unit
SYSMAC BUS
Wired Remote
I/O Master
Units
SYSMAC BUS
Optical
Remote I/O
Master Units
Model
Maximum Slave Racks and I/O
Maximum
Units per CPU bits per CPU Unit and Master
Unit
Unit
C200H-RM201
2 Units
Slave Racks
5
C200H-RM001
-PV1
2 Units
5
I/O bits
800 (50 words)
800 (50 words)
APF: All Plastic Optical Fiber Cable.
Transmission
distance (total
extension)
Two-core cable 200 m
Optical fiber
cable (PCF or
APF)
(See note.)
Note PCF: Plastic Clad Optical Fiber Cable
52
Slave Rack
communications cables
PCF: 200 m
APF: 20 m
Section
Basic System Configuration
2-3
Slave Racks
Name
SYSMAC BUS Slave Rack
Backplanes
SYSMAC BUS Wired
Remote I/O Master Units
SYSMAC BUS Optical
Remote I/O Master Units
Model
Specifications
Remarks
C200H-BC101-V2
C200H-BC081-V2
C200H-BC051-V2
C200H-BC031-V2
C200H-RT201
10 Units
8 Units
5 Units
3 Units
Power supply voltage: 100
to 120 VAC or 200 to
240 VAC
C200H-RT202
Power supply voltage:
24 VDC
Power supply voltage: 100
to 120 VAC or 200 to
240 VAC
C200H-RT001-P
C200H-RT002-P
---
Power Supply Unit is not
required.
Power supply voltage:
24 VDC
Note Words are allocated to Units on SYSMAC BUS Slave Racks from the SYSMAC
BUS Area and not from the I/O Bit Area.
Connectable Units
Unit
CS1 Basic I/O
Units
SYSMAC BUS
Wired Slave
Racks
No
SYSMAC BUS
Optical Slave
Racks
No
C200H Basic
I/O Units
Yes
C200H
Group-2
High-density
I/O Units
(Basic I/O
Units)
No
CS1 Special
I/O Units
No
C200H
Special I/O
Units
Yes
CS1 CPU Bus
Units
No
(See Note.)
Yes
No
No
Yes
No
(See Note.)
Note
1. CompoBus/D Master Units, CompoBus/S Master Units, PC Link Units, and
SYSMAC BUS Remote I/O Master Units cannot be connected to C200H
Special I/O Units.
2. Special I/O Unit words (CIO 2000 to CIO 2959) are allocated to C200H Special I/O Units according to unit numbers.
3. Up to a total of 10 C200H Special I/O Units can be mounted to all Slave
Racks in a SYSMAC BUS Remote I/O System. Only unit numbers 0 to 9 can
be used. The number of C200H Special I/O Units that can be mounted to any
one Slave Rack depends on the specific Units that are used, as shown in the
following table. For the purpose of calculating the maximum number of
Units, Units are classified into four groups, A to D.
Group
A
B
Units
High-speed Counter Units,
NC111/NC112/NC113/NC213
Position Control Units , ASCII
Units, Analog I/O Units, ID
Sensor Units, Fuzzy Logic Units
High-density I/O Units,
Temperature Controller
Units, Heating/Cooling
Control Units, PID Control
Units, Cam Positioner Units
Temperature
Sensor Units,
Voice Units
C
NC211/NC413
Position
Control Units,
Motion Control
Units
D
Maximum Units in
each group for
each Slave Rack
4 Units max.
8 Units max.
6 Units max.
2 Units max.
Maximum Units
for all groups for
each Slave Rack
3A + B + 2C + 6D ≤ 12 and A + B + C + D ≤ 8
Note I/O READ/WRITE instructions (IORD/IOWR) cannot be used with C200H Special I/O Units that are mounted to a Slave Rack.
53
Section
Units
2-4
2-4
Units
2-4-1 Basic I/O Units
Input Units
Category
C200H
Basic
Input
Units
C200H
Highdensity
Input
Units
(Group
2)
CS1
Basic
Input
Units
Name
Specifications
AC Input 100 to 120 VAC,
Units
8 inputs
100 to 120 VAC,
16 inputs
100 to 120 VAC,
16 inputs
200 to 240 VAC,
8 inputs
200 to 240 VAC,
16 inputs
200 to 240 VAC,
16 inputs
AC/DC
12 to 24 VAC/VDC,
Input
8 inputs
Units
24 VAC/VDC,
16 inputs
DC Input 12 to 24 VDC, 8 inUnits
puts
24 VDC, 16 inputs
Interrupt 12 to 24 VDC, 8 inInput
puts
Units
DC Input 24 VDC, 32 inputs
Units
24 VDC, 32 inputs
Mountable Racks
C200H-IA121
Number
of bits
CPU
allocated
Rack
(CIO 0000
to
CIO 0319)
16
Yes
Yes
Yes
Yes
C200H-IA122
16
Yes
Yes
Yes
Yes
C200H-IA122V 16
Yes
Yes
Yes
Yes
C200H-IA221
16
Yes
Yes
Yes
Yes
C200H-IA222
16
Yes
Yes
Yes
Yes
C200H-IA222V 16
Yes
Yes
Yes
Yes
C200H-IM211
16
Yes
Yes
Yes
Yes
C200H-IM212
16
Yes
Yes
Yes
Yes
C200H-ID211
16
Yes
Yes
Yes
Yes
C200H-ID212
C200HSINT01
16
16
Yes
Yes
Yes
Yes
Yes
Yes (See
note 1.)
Yes
No
C200H-ID216
32
Yes
Yes
Yes
No
C200H
Expansion I/O
Racks
CS1 Expansion
Racks
SYSMAC
BUS
Slave
Racks
C200H-ID218
32
Yes
Yes
Yes
No
12 VDC, 64 inputs
C200H-ID111
32
Yes
Yes
Yes
No
24 VDC, 64 inputs
C200H-ID217
64
Yes
Yes
Yes
No
24 VDC, 64 inputs
C200H-ID219
64
Yes
Yes
Yes
No
DC Input 24 VDC, 16 inputs
Units
Interrupt 24 VDC, 16 inputs
Input
Units
CS1W-ID211
16
Yes
No
Yes
No
CS1W-INT01
16
Yes
No
Yes (See
notes 1,
2.)
No
High24 VDC, 16 inputs
speed
Input
Units
DC Input 24 VDC, 32 inputs
Units
24 VDC, 64 inputs
24 VDC, 96 inputs
CS1W-IDP01
16
Yes
No
Yes (See
note 1.)
No
CS1W-ID231
CS1W-ID261
CS1W-ID291
32
64
96
Yes
Yes
Yes
No
No
No
Yes
Yes
Yes
No
No
No
Note
54
Model
1. The interrupt function can be used only when the Unit is mounted to the CPU
Rack. (The Interrupt Input Unit can be used as a regular I/O Unit on Expansion Racks.)
2. Can be used only with CPU Units with model numbers ending in “-V1,” i.e.,
CS1W-CPU4-V1 or CS1W-CPU6-V1.
3. The C200H-ID001 (8 no-voltage contact inputs, NPN) cannot be used with
CS1-series PCs.
Section
Units
2-4
Output Units
Category
C200H
Output
Units
Name
Relay
Output
Units
Triac
Output
Units
Specifications
Model
Mountable Racks
250 VAC/24 VDC,
2 A, independent
contacts, 5 outputs max.
250 VAC/24 VDC,
2 A, independent
contacts, 8 outputs max.
250 VAC/24 VDC,
2 A, independent
contacts, 8 outputs max.
250 VAC/24 VDC,
2 A, independent
contacts, 8 outputs max.
250 VAC/24 VDC,
2 A, 8 outputs
max.
C200H-OC223
Number
of bits
CPU
allocated
Rack
(CIO 0000
to
CIO 0319)
16
Yes
C200H-OC224
16
Yes
Yes
Yes
Yes
C200H-OC224V
(no longer
manufactured)
16
Yes
Yes
Yes
Yes
C200H-OC224N
16
Yes
Yes
Yes
Yes
C200H-OC221
16
Yes
Yes
Yes
Yes
250 VAC/24 VDC,
2 A, 12 outputs
max.
C200H-OC222
16
Yes
Yes
Yes
Yes
250 VAC/24 VDC,
2 A, 12 outputs
max.
C200H-OC222V
(no longer
manufactured)
16
Yes
Yes
Yes
Yes
250 VAC/24 VDC,
2 A, 12 outputs
max.
C200H-OC222N
16
Yes
Yes
Yes
Yes
250 VAC/24 VDC,
2 A, 16 outputs
max.
C200H-OC226
(no longer
manufactured)
16
Yes
Yes
Yes
Yes
250 VAC/24 VDC,
2 A, 16 outputs
max.
C200H-OC226N
(under development)
16
Yes
Yes
Yes
Yes
250 VAC/24 VDC,
2 A, 16 outputs
max.
C200H-OC225
16
Yes
Yes
Yes
Yes
250 VAC, 1 A,
8 outputs, with
fuse burnout
detection circuit
250 VAC, 1.2 A,
8 outputs, with
fuse burnout
detection circuit
250 VAC, 0.3 A,
12 outputs
250 VAC, 0.5 A,
12 outputs
C200H-OA221
(no longer
manufactured)
16
Yes
Yes
Yes
Yes
C200H-OA223
16
Yes
Yes
Yes
Yes
C200H-OA222V
16
Yes
Yes
Yes
Yes
C200H-OA224
16
Yes
Yes
Yes
Yes
C200H
Expansion I/O
Racks
CS1 Expansion
Racks
SYSMAC
BUS
Slave
Racks
Yes
Yes
Yes
55
Section
Units
Category
Name
C200H
Output
Units,
contd.
Transistor Output
Units,
Sinking
56
C200H-OD213
Number
of bits
CPU
allocated
Rack
(CIO 0000
to
CIO 0319)
16
Yes
Yes
Yes
Yes
C200H-OD411
16
Yes
Yes
Yes
Yes
C200H-OD211
16
Yes
Yes
Yes
Yes
C200H-OD212
16
Yes
Yes
Yes
Yes
C200H-OD214
16
Yes
Yes
Yes
Yes
C200H-OD216
16
Yes
Yes
Yes
Yes
C200H-OD217
16
Yes
Yes
Yes
Yes
C200H-OD21A
16
Yes
Yes
Yes
Yes
C200H-OD218
32
Yes
Yes
Yes
No
4.5 VDC/16 mA to C200H-OD219
26.4 V/100 mA,
64 sinking outputs
64
Yes
Yes
Yes
No
24 VDC, 0.5 A, 32 C200H-OD21B
outputs, sourcing
outputs, load
short-circuit
protection
32
Yes
Yes
Yes
No
Specifications
24 VDC, 2.1 A,
8 outputs
12 to 48 VDC,
1 A, 8 outputs
24 VDC, 0.3 A,
12 outputs
24 VDC, 0.3 A,
16 outputs
Transis- 24 VDC, 0.8 A,
tor Out- 8 outputs, load
put
short-circuit
Units,
protection.
Sourcing 5 to 24 VDC,
0.3 A, 8 outputs
5 to 24 VDC,
0.3 A, 12 outputs
24 VDC, 1 A,
16 outputs, load
short-circuit
protection.
Transis- 4.5 VDC/16 mA to
tor Out- 26.4 V/100 mA,
put Units 32 sinking outputs
Model
2-4
Mountable Racks
C200H
Expansion I/O
Racks
CS1 Expansion
Racks
SYSMAC
BUS
Slave
Racks
Section
Units
Category
CS1 Ba- Transis- 12 to 24 VDC,
sic Out- tor Out- 0.5 A, 16 sinkput Units put Units ing outputs
CS1W-OD211
Number
of bits
CPU
allocated
Rack
(CIO 0000
to
CIO 0319)
16
Yes
12 to 24 VDC,
0.5 A, 32 sinking outputs
CS1W-OD231
32
Yes
No
Yes
No
12 to 24 VDC,
0.3 A, 64 sinking outputs
CS1W-OD261
64
Yes
No
Yes
No
12 to 24 VDC,
0.1 A, 96 sinking outputs, with
fuse burnout
detection circuit
CS1W-OD291
96
Yes
No
Yes
No
24 VDC, 0.5 A,
16 sourcing outputs, load shortcircuit protection
24 VDC, 0.3 A,
32 sourcing outputs, load shortcircuit protection
24 VDC, 0.3 A,
64 sourcing outputs, load shortcircuit protection
24 VDC, 0.1 A,
96 sourcing outputs, with fuse
burnout detection
circuit
CS1W-OD212
16
Yes
No
Yes
No
CS1W-OD232
32
Yes
No
Yes
No
CS1W-OD262
64
Yes
No
Yes
No
CS1W-OD292
96
Yes
No
Yes
No
Name
Specifications
Model
2-4
Mountable Racks
C200H
Expansion I/O
Racks
CS1 Expansion
Racks
SYSMAC
BUS
Slave
Racks
No
Yes
No
57
Section
Units
2-4
Mixed I/O Units
Category
Name
CS1
DC
Basic
Input/
I/O Units Transistor Output Units
Specifications
Model
Number
of bits
CPU
allocated
Rack
(CIO 0000
to
CIO 0319)
64-point
Yes
I/O
24 VDC, 32 inputs
12 to 24 VDC,
0.3 A, 32 sinking
outputs
CS1W-MD261
24 VDC, 48 inputs
12 to 24 VDC,
0.1 A, 48 sinking
outputs, with fuse
burnout detection
circuit
CS1W-MD291
96-point
I/O
24 VDC, 32 inCS1W-MD262
puts
24 VDC, 0.3 A, 32
sourcing outputs,
load short-circuit
protection.
24 VDC, 48 inCS1W-MD292
puts
12 to 24 VDC,
0.1 A, 48 sourcing
outputs, with fuse
burnout detection
circuit
Mountable Racks
C200H
Expansion I/O
Racks
CS1 Expansion
Racks
SYSMAC
BUS
Slave
Racks
No
Yes
No
Yes
No
Yes
No
64-point
I/O
Yes
No
Yes
No
96-point
I/O
Yes
No
Yes
No
B7A Interface Units
Category
Name
Specifications
Model
Mountable Racks
B7A Input Units
16 inputs
C200H-B7AI1
Number
of bits
CPU
allocated
Rack
(CIO 0000
to
CIO 0319)
16
Yes
Yes
Yes
No
B7A Output Units
C200H
B7A InHighput Units
density
B7A
Input
Output
Units
Units
(Group
B7A I/O
2)
Units
16 outputs
C200H-B7A01
16
Yes
Yes
Yes
No
32 inputs
C200H-B7AI2
32
Yes
Yes
Yes
No
32 outputs
C200H-B7A02
32
Yes
Yes
Yes
No
16 inputs, 16 outputs
32 inputs, 32 outputs
C200H-B7A21
32-point
I/O
64-point
I/O
Yes
Yes
Yes
No
Yes
Yes
Yes
No
C200H-B7A22
C200H
Expansion I/O
Racks
CS1 Expansion
Racks
SYSMAC
BUS
Slave
Racks
Analog Timer Unit
Category
Name
C200H
Basic
Unit
Analog
Timer
Units
58
Specifications
4-point timer
Model
C200H-TM001
Number
of bits
CPU
allocated
Rack
(CIO 0000
to
CIO 0319)
16 points
Yes
Mountable Racks
C200H
Expansion I/O
Racks
Yes
CS1 Expansion
Racks
Yes
SYSMAC
BUS
Slave
Racks
Yes
Section
Units
2-4
2-4-2 Special I/O Units
C200H High-density I/O Units
Name
Specifications
C200H-ID215
10 words
C200H-ID501
10 words
None
Yes
Yes
Yes
Yes
C200H-OD215
10 words
None
Yes
Yes
Yes
Yes
TTL Output Units
TTL I/O
Units
5 VDC, 32 sink- C200H-OD501
ing outputs
5 VDC, 16 inC200H-MD501
puts, 16 sinking
outputs
10 words
None
Yes
Yes
Yes
Yes
10 words
None
Yes
Yes
Yes
Yes
DC Input/Transistor
Output
Units
24 VDC, 16 inputs, 16 sinking
outputs
C200H-MD215
10 words
None
Yes
Yes
Yes
Yes
0 to
9
12 VDC, 16 inputs, 16 sinking
outputs
C200H-MD115
10 words
None
Yes
Yes
Yes
Yes
0 to
9
24 VDC, 32 inputs
5 VDC, 32 inputs
24 VDC,
32 sinking outputs
Number
of words
allocated
(CIO 2000
to
CIO 2959)
Mountable Racks
Number
of
words
CPU
alloRack
cated
(D20000
to
D29599)
None
Yes
DC Input
Units
TTL Input Units
Transistor Output Units
Model
Unit
No.
C200H
Expansion I/O
Racks
CS1 Expansion
Racks
SYSMAC
BUS
Slave
Racks
Yes
Yes
Yes
0 to
9
0 to
9
0 to
9
0 to
9
0 to
9
59
Section
Units
2-4
C200H Special I/O Units
Name
Temperature Control Units
60
Specifications
Model
Mountable Racks
Thermocouple
input, time-proportioning PID,
or ON/OFF
transistor output
Thermocouple
input, time-proportioning PID,
or ON/OFF
voltage output
C200H-TC001
Number
Number
of words of words
allocated allocated CPU
(CIO 2000 (D20000 Rack
to
to
CIO 2959) D29599)
10 words
None
Yes
Unit
No.
C200H-TC002
10 words
None
Yes
Yes
Yes
Yes
0 to
9
Thermocouple
input, PID current output
C200H-TC003
10 words
None
Yes
Yes
Yes
Yes
0 to
9
Temperatureresistance thermometer input,
time-proportioning PID, or
ON/OFF transistor output
C200H-TC101
10 words
None
Yes
Yes
Yes
Yes
0 to
9
Temperatureresistance thermometer input,
time-proportioning PID, or
ON/OFF voltage output
C200H-TC102
10 words
None
Yes
Yes
Yes
Yes
0 to
9
Temperatureresistance thermometer input,
PID current
output
C200H-TC103
10 words
None
Yes
Yes
Yes
Yes
0 to
9
C200H
Expansion I/O
Racks
CS1 Ex- SYSMAC
pansion
BUS
Racks
Slave
Racks
Yes
Yes
Yes
0 to
9
Section
Units
Name
Heat/Cool
Temperature Control Units
Temperature Sensor Units
Thermocouple
input, time-proportioning PID,
or ON/OFF
transistor output
Thermocouple
input, time-proportioning PID,
or ON/OFF
voltage output
C200H-TV001
Number
Number
of words of words
allocated allocated CPU
(CIO 2000 (D20000 Rack
to
to
CIO 2959) D29599)
10 words
None
Yes
C200H-TV002
10 words
None
Yes
Yes
Yes
Yes
0 to
9
Thermocouple
input, PID current output
C200H-TV003
10 words
None
Yes
Yes
Yes
Yes
0 to
9
Temperatureresistance thermometer input,
time-proportioning PID, or
ON/OFF transistor output
C200H-TV101
10 words
None
Yes
Yes
Yes
Yes
0 to
9
Temperatureresistance thermometer input,
time-proportioning PID, or
ON/OFF voltage output
C200H-TV102
10 words
None
Yes
Yes
Yes
Yes
0 to
9
Temperatureresistance thermometer input,
PID current
output
Thermocouple
input, K(CA) or
J(IC), selectable
C200H-TV103
10 words
None
Yes
Yes
Yes
Yes
0 to
9
C200H-TS001
10 words
None
Yes
Yes
Yes
Yes
C200H-TS002
10 words
None
Yes
Yes
Yes
Yes
Temperatureresistance thermometer,
JPt 100 Ω
Temperatureresistance thermometer,
Pt 100 Ω
C200H-TS101
10 words
None
Yes
Yes
Yes
Yes
0 to
9
0 to
9
0 to
9
C200H-TS102
10 words
None
Yes
Yes
Yes
Yes
Specifications
Model
Mountable Racks
2-4
Unit
No.
C200H
Expansion I/O
Racks
CS1 Ex- SYSMAC
BUS
pansion
Slave
Racks
Racks
Yes
Yes
Yes
0 to
9
0 to
9
61
Section
Units
Name
PID Control Units
Cam Positioner
Units
Voltage output/
current input,
time-proportioning PID, or
ON/OFF transistor output
Voltage output/
current input,
time-proportioning PID, or
ON/OFF voltage output
Voltage output/
current input,
PID current
output
C200H-PID01
Number
Number
of words of words
allocated allocated CPU
(CIO 2000 (D20000 Rack
to
to
CIO 2959) D29599)
10 words
None
Yes
C200H-PID02
10 words
None
Yes
Yes
Yes
Yes
0 to
9
C200H-PID03
10 words
None
Yes
Yes
Yes
Yes
0 to
9
48 cam outputs
(16 external
outputs and 32
internal outputs)
C200H-CP114
10 words
11 words
Yes
Yes
Yes
Yes
0 to
9
24-Kbyte RAM
C200H-ASC02
10 words
None
Yes
Yes
Yes
Yes
200-Kbyte
RAM,
2 RS-232C
ports
200-Kbyte
RAM, RS-232C
port,
RS-422/485
port
C200H-ASC11
10 words
100
words
Yes
Yes
Yes
Yes
0 to
9
0 to
F
C200H-ASC21
10 words
100
words
Yes
Yes
Yes
Yes
0 to
F
200-Kbyte
RAM,
3 RS-232C
ports
C200H-ASC31
10 words
100
words
Yes
Yes
Yes
Yes
0 to
F
4 to 20 mA, 1
to 5/0 to 10 V
(selectable), 4
inputs, 1/4,000
resolution
C200H-AD001
10 words
100
words
Yes
Yes
Yes
Yes
0 to
9
4 to 20 mA, 1
to 5/0 to 10 V/
–10 to +10 V
(selectable); 8
inputs; 1/4,000
resolution
4 to 20 mA, 1
to 5/0 to 10 V/
–10 to +10 V
(selectable); 8
inputs; 1/4,000
resolution
C200H-AD002
10 words
100
words
Yes
Yes
Yes
Yes
0 to
F
C200H-AD003
10 words
100
words
Yes
Yes
Yes
Yes
0 to
F
Specifications
Model
Mountable Racks
2-4
Unit
No.
C200H
Expansion I/O
Racks
CS1 Ex- SYSMAC
BUS
pansion
Slave
Racks
Racks
Yes
Yes
Yes
0 to
9
Resolver
speed: 20 µs
(5 kHz)
ASCII
Units
Analog
Input
Units
62
Section
Units
Name
Analog
Output
Units
Analog
I/O Units
Specifications
Model
4 to 20 mA, 1
to 5/0 to 10 V
(selectable); 2
outputs;
1/4,000 resolution
4 to 20 mA,
–10 to +10 V
(selectable),
4 outputs
1 to 5 V, 0 to
10 V,
–10 to +10 V
(selectable), 8
outputs;
1/4,000 resolution
C200H-DA001
4 to 20 mA, 8
outputs;
1/4,000 resolution
2 inputs (4 to
20 mA,
1 to 5 V, etc.)
Number
Number
of words of words
allocated allocated CPU
(CIO 2000 (D20000 Rack
to
to
CIO 2959) D29599)
10 words
100
Yes
words
Mountable Racks
2-4
Unit
No.
C200H
Expansion I/O
Racks
CS1 Ex- SYSMAC
BUS
pansion
Slave
Racks
Racks
Yes
Yes
Yes
0 to
9
C200H-DA002
10 words
None
Yes
Yes
Yes
Yes
0 to
F
C200H-DA003
10 words
100
words
Yes
Yes
Yes
Yes
0 to
F
C200H-DA004
10 words
100
words
Yes
Yes
Yes
Yes
0 to
F
C200H-MAD01
10 words
100
words
Yes
Yes
Yes
Yes
0 to
F
One-axis pulse
input, counting
rate: 50 kcps
max.
One-axis pulse
input, counting
rate: 75 kcps
max., line driver compatible
C200HCT001-V1
10 words
100
words
Yes
Yes
Yes
Yes
0 to
9
C200H-CT002
10 words
100
words
Yes
Yes
Yes
Yes
0 to
9
Two-axis pulse
input, counting
rate: 75 kcps
max., line driver compatible
C200H-CT021
20 words
100
words
Yes
Yes
Yes
Yes
0 to
F
G-language
C200H-MC221
programmable,
two-axis analog
outputs
20 words
100
words
(Uses
first 2
words.)
Yes
Yes
Yes
Yes
0 to
F
2 outputs (4 to
20 mA,
1 to 5 V, etc.)
Highspeed
Counter
Units
Motion
Control
Units
63
Section
Units
Name
Position
Control
Units
Specifications
Model
Number
Number
of words of words
allocated allocated CPU
(CIO 2000 (D20000 Rack
to
to
CIO 2959) D29599)
20 words
200
Yes
words
Mountable Racks
2-4
Unit
No.
C200H
Expansion I/O
Racks
CS1 Ex- SYSMAC
BUS
pansion
Slave
Racks
Racks
Yes
Yes
Yes
0 to
9
Two axes,
pulse output for
each axis,
speeds: 1 to
250,000 pps,
directly connects to servomotor driver
One axis, pulse
output, speed:
1 to 99990 pps
C200H-NC211
C200H-NC111
10 words
100
words
Yes
Yes
Yes
Yes
0 to
9
One axis, pulse
output, speeds
1 to 250,000
pps,directly
connects to
servomotor
driver, line driver compatible
(Z level)
One axis, pulse
output, speeds
1 to 500,000
pps,directly
connects to
servomotor
driver
C200H-NC112
10 words
100
words
Yes
Yes
Yes
Yes
0 to
9
C200H-NC113
10 words
100
words
Yes
Yes
Yes
Yes
0 to
F
Two axes,
pulse output for
each axis,
speeds 1 to
500,000 pps,directly connects
to servomotor
driver
Four axes,
pulse output for
each axis,
speeds 1 to
500,000 pps,directly connects
to servomotor
driver
C200H-NC213
10 words
100
words
Yes
Yes
Yes
Yes
0 to
F
C200H-NC413
20 words
200
words
Yes
Yes
Yes
Yes
0 to
F
ID Sensor Electromagnet- C200H-IDS01Units
ic coupling
V1
Microwave type C200H-IDS21
10 words
None
Yes
Yes
Yes
Yes
10 words
None
Yes
Yes
Yes
Yes
0 to
9
0 to
9
Voice
Unit (See
note 6.)
Adaptive differential pulsecode modulation
C200H-OV001
10 words
100
words
Yes
Yes
Yes
Yes
0 to
9
Fuzzy
8 inputs, 4 outLogic Unit puts
C200H-FZ001
10 words
100
words
Yes
Yes
Yes
Yes
0 to
9
JPCN-1
Unit
C200H-JRM21
10 words
100
words
Yes
Yes
Yes
No
0 to
F
64
Settable as
master or slave
Section
Units
Name
Specifications
Model
Number
Number
of words of words
allocated allocated CPU
(CIO 2000 (D20000 Rack
to
to
CIO 2959) D29599)
(See note None
Yes
1.)
Mountable Racks
2-4
Unit
No.
C200H
Expansion I/O
Racks
CS1 Ex- SYSMAC
BUS
pansion
Slave
Racks
Racks
Yes
Yes
No
0 to
F
CompoBus/D
Master
Units
CompoBus/D
Remote I/O,
1,600 bits max.
C200HWDRM21-V1
C200H
I/O Link
Units
CompoBus/D
Slave, 512 inputs/512 outputs max.
C200HWDRT21
10 words
None
Yes
Yes
Yes
No
0 to
F
CompoBus/S
Master
Units
CompoBus/S
Remote I/O,
256 bits max.
C200HWSRM21
10 words
or 20
words
None
Yes
Yes
Yes
No
0 to
F
PC Link
Units
PC Link, single
level: 32 units,
multilevel:
16 Units
C200H-LK401
(See note
2.)
None
Yes
Yes
Yes
No
0 to
9
SYSMAC
BUS Remote I/O
Master
Units
Wired
C200H-RM201
(See note
3.)
---
Yes
Yes
Yes
No
0 to
3
Optical
C200HRM001-PV1
---
Yes
Yes
Yes
No
0 to
3
Note
1. The CompoBus/D Slaves are allocated up to 1,600 I/O bits (100 words) in
the CompoBus/D Area.
2. PC Link Units are allocated up to 1,024 bits (64 words) in the Link Area.
3. Each Slave Rack connected to a Remote I/O Master Unit is allocated
10 words in the SYSMAC BUS Area. Each I/O Terminal is allocated 1 word
in the I/O Terminal Area.
4. The C200HW-CLK21 Controller Link Unit (C200HX/HG/HE) cannot be
used. Use the CS1W-CLK21 Controller Link Unit (CS1 CPU Bus Unit). Data
links and message services are supported between C200HX/HG/HE and
CS1-series PCs.
5. The C200H-LK- Host Link Unit (C200H, C200HS, C200HX/HG/
HE) cannot be used. Use the CS1W-SCU21 Serial Communications Unit
(CS1 CPU Bus Unit).
6. Observe the following precautions when using the C200H-OV001 Voice
Unit.
• The Voice Unit cannot be used if an OMRON Programmable Terminal (PT)
set for NT Link Mode is connected to the peripheral port or RS-232C port
on the CPU Unit.
• When using both a Voice Unit and an OMRON PT, connect the PT to a
CS1W-SCB Serial Communications Board or to a
CS1W-SCU Serial Communications Unit.
• When a Voice Unit is mounted, set to baud rate for the peripheral port or
RS-232C port on the CPU Unit to 9,600 bps or less when communicating
with a computer or other external device.
65
Section
Units
2-4
CS1 Special I/O Units
Name
Analog
I/O Unit
Specifications
4 inputs
(4 to 20 mA,
1 to 5 V, etc.)
Model
Number
of words
allocated
(CIO 2000
to
CIO 2959)
Number
of
words
CPU
alloRack
cated
(D20000
to
D29599)
100
Yes
words
Mountable Racks
Unit
No.
C200H
Expansion I/O
Racks
CS1 Expansion
Racks
SYSMAC
BUS
Slave
Racks
No
Yes
No
0 to
95
CS1W-MAD44
10 words
4 inputs
(4 to 20 mA,
1 to 5 V, etc.)
CS1W-AD041
10 words
100
words
Yes
No
Yes
No
0 to
95
8 inputs
(4 to 20 mA,
1 to 5 V, etc.)
CS1W-AD081
10 words
100
words
Yes
No
Yes
No
0 to
95
4 outputs
(1 to 5 V,
4 to 20 mA,
etc.)
8 outputs
(1 to 5 V, etc.)
8 outputs
(4 to 20 mA)
Two axes, analog output for
each axis, supports G-language
CS1W-DA041
10 words
100
words
Yes
No
Yes
No
0 to
95
CS1W-DA08V
10 words
Yes
No
Yes
No
CS1W-DA08C
10 words
Yes
No
Yes
No
CS1W-MC221
30 words
100
words
100
words
None
Yes
No
Yes
No
0 to
95
0 to
95
0 to
95
(See
note
1)
Four axes, analog output for
each axis, supports G-language
CS1W-MC421
50 words
None
Yes
No
Yes
No
4 outputs
(1 to 5 V,
0 to 10 V, etc.)
Analog
Input
Unit
Analog
Output
Unit
Motion
Control
Unit
Note
66
1. Allocated three unit numbers.
2. Allocated five unit numbers.
0 to
95
(See
note
2)
Section
Expanded System Configuration
2-5
2-4-3 CS1 CPU Bus Units
Name
Specifications
Controller
Link Units
Serial
Communications
Unit
Ethernet
Unit
Loop Control Unit
Model
Mountable Racks
Wired
CS1W-CLK21
Number
of words
allocated
(CIO 1500
to
CIO 1899)
25 words
Optical
CS1W-CLK11
25 words
Yes
No
Yes
No
Two
RS-232C
Ports
CS1W-SCU21
25 words
Yes
No
Yes
No
0 to
F
FINS com- CS1W-ETN01
munications, socket service,
FTP server, and
mail communications
4 inputs
CS1W-LC001
(1 to 5 V,
4 to 20 mA,
etc.)
25 words
Yes
No
Yes
No
0 to
F
(See
note
1)
25 words
Yes
No
Yes
No
0 to
F
(See
note
2)
Note
CS1 Expansion
Racks
Unit
No.
CPU Rack
C200H Expansion
I/O Racks
SYSMAC
BUS Slave
Racks
Yes
No
Yes
No
0 to
F
(See
note
1)
1. A maximum of four Units can be mounted.
2. A maximum of three Units can be mounted.
2-5
Expanded System Configuration
2-5-1 Serial Communications System
The CS1 system configuration can be expanded by using the following serial
communications ports.
• CPU Unit built-in ports
2 (peripheral port and RS-232C port)
• Serial Communications Board ports
• Serial Communications Unit ports
• ASCII Unit ports
1, 2, 3...
2 (RS-232C or RS-422/485)
2 (RS-232C)
2 (RS-232C or RS-422/485)
1. If the CPU Unit built-in ports, the Serial Communications Board ports, or Serial Communications Unit ports are used, words can be allocated to various
protocols, such as Host Link and protocol macro.
2. Up to 16 Serial Communications Units and 16 ASCII Units can be connected
to one CPU Unit. The system configuration can then be expanded by connecting devices with RS-232C or RS-422/485 ports, such as Temperature
67
Section
Expanded System Configuration
2-5
Sensor Units, Bar Code Readers, ID Systems, personal computers, Board
Computers, Racks, and other companies’ PCs.
ASCII Unit (16 Units max.)
Serial Communications Unit (16 Units max.)
CPU Unit
Serial Communications Board
Communications ports 1
Peripheral port
RS-232C port
Communications ports 2
Expanding the system configuration as shown above allows a greater number of
serial communications ports, and greater flexible and simpler support for different protocols.
System Configuration Example
Programming Device
CX Programmer
Programming
OR
Host computer
Console
Programmable
Terminal
NT Link
Serial Communications Board
Serial Communications Unit
CPU Unit
Default communications parameters
Peripheral
port
RS-232C port
RS-232C port
Protocol macro
General-purpose External devices
(such as other companies’ PCs)
Host Link
RS-232C port
Protocol macro
General-purpose External devices
(such as Temperature Sensor
Units, Bar Code Readers)
Refer to page 73 for a table showing which communications protocols are supported by each Unit.
68
Section
Expanded System Configuration
2-5
2-5-2 Systems
The serial communications port mode (protocol) can be switched in the CPU
Unit’s PC Setup. Depending on the protocol selected, the following systems can
be configured.
Protocols
Protocol
Host Link (SYSMAC WAY)
The following protocols support serial communications.
Main connection
Personal computer
OMRON Programmable
Terminals
Use
Applicable commands,
communications
instructions
Communications between
the Host computer and the
PC. Commands can be sent
to a computer from the PC.
No-protocol
communications with
general-purpose devices.
Host Link commands/ FINS
commands. Commands can
be sent to a computer from
the PC.
TXD(236) instruction,
RXD(235) instruction
No-protocol (customer)
communications
General-purpose external
devices
Protocol macro
General-purpose external
devices
Sending and receiving
messages (communications
frames) according to the
communications
specifications of external
devices. (SYSMAC-PST is
used to create protocols by
setting various parameters.)
PMCR(260) instruction
NT Links (1: N)
OMRON Programmable
Terminals
None
Peripheral bus (See note.)
Programming Devices
CX-Programmer
High-speed
communications with
Programmable Terminals
via direct access.
Communications between
Programming Devices and
the PC from the computer.
General-purpose (BASIC
languages)
General-purpose external
devices
Free communications with
general-purpose external
devices using BASIC
commands.
BASIC program
None
Note The peripheral bus mode is used for Programming Devices excluding Programming Console. If Programming Console is to be used, set pin 4 of the DIP switch
on the front panel of the Unit to OFF so that the default peripheral port communications parameters are used instead of those specified in the PC Setup.
69
Section
Expanded System Configuration
2-5
The Host Link System allows the I/O memory of the PC to be read/written, and
the operating mode to be changed from a Host computer (personal computer or
Programmable Terminal) by executing Host Link commands or FINS commands that are preceded by a header and followed by a terminator. Alternatively,
FINS commands (preceded by a header and followed by a terminator) can be
sent to a computer connected via the Host Link System by executing Network
Communications Instructions (SEND(090)/RECV(098)/CMND(490)) from the
PC.
Host Link System
(SYSMAC WAY Mode 1:N)
Host computer
FINS commands sent via
SEND/RECV/CMND
instructions from the PC
Applicable port
CPU Unit
Peripheral port RS-232C port
Host Link commands or FINS
commands
Note
Yes
Yes
(See note 1.)
(See note 2.)
Serial
Communications
Board
Serial
Communications
Unit
Yes
Yes
1. Set pin 4 of the DIP switch on the front panel of the CPU Unit to ON, and set
the serial communications mode in the PC Setup to Host Link.
2. Set pin 5 of the DIP switch on the front panel of the CPU Unit to OFF, and set
the serial communications mode in the PC Setup to Host Link.
No-protocol (Custom)
Communications System
No-protocol communications allow simple data transmissions, such as inputting
bar code data and outputting printer data using communications port I/O instructions TXD(236) and RXD(235). The start and completion codes can be set and,
RS and CS signal control is also possible with no-protocol communications.
Applicable port
CPU Unit
Peripheral port RS-232C port
Serial
Communications
Board
Serial
Communications
Unit
Yes
No
(See note)
No
No
RXD(235) instruction
TXD(236)
instruction
General-purpose external device
Note Set pin 5 of the DIP switch on the front panel of the CPU Unit to OFF, and set the
serial communications mode in the PC Setup to no-protocol communications.
70
Section
Expanded System Configuration
2-5
If the PC and Programmable Terminal (PT) are connected together using
RS-232C ports, the allocations for the PT’s status control area, status notify
area, objects such as touch switches, indicators, and memory maps can be allocated in the I/O memory of the PC. The NT Link System allows the PT to be controlled by the PC, and the PT can periodically read data from the status control
area of the PC, and perform necessary operations if there are any changes in the
area. The PT can communicate with the PC by writing data to the status notify
area of the PC from the PT. The NT Link system allows the PT status to be controlled and monitored without using PC ladder programs. The ratio of PCs to PTs
is 1: n (n y 1).
NT Link System
(1:N Mode)
Set the PT communications settings for a 1:N NT Link. Either one or up to eight
PTs can be connected to each PC.
Version-1 CPU Units support high-speed NT Links (1:N mode). In this way,
equipment monitoring and settings can be made faster from the PT. The applicable PTs are the NT31(C)-V2 and NT631(C)-V2.
1:N Mode
1:N Mode
Applicable port
CPU Unit
RS-232C
RS-232C
RS-232C to RS-422/485
Conversion Adapter
Programmable
Terminal
RS-422A/485
Peripheral port
RS-232C port
Yes
Yes
(See note 1.)
(See note 2.)
Serial
Communications
Board
Serial
Communications
Unit
Yes
Yes
Note 1. Turn ON pin 4 on the DIP switch on
the front of the CPU Unit and set the
serial communications mode in the
PC Setup for an NT Link.
2. Turn OFF pin 5 on the DIP switch on
the front of the CPU Unit and set the
serial communications mode in the
PC Setup for an NT Link.
Programmable Programmable Programmable
Terminal
Terminal
Terminal
Note
1. The PC can be connected to any PT port that supports 1:N NT Links. It cannot be connected to the RS-232C ports on the NT30 or NT30C, because
these ports support only 1:1 NT Links.
2. The NT20S, NT600S, NT30, NT30C, NT620S, NT620C, and NT625C cannot be used if the CPU Unit’s cycle time is 800 ms or longer (even if only one
of these PTs is connected).
3. The Programming Console functionality of a PT (Expansion Function) can
be used only when the PT is connected to the RS-232C or peripheral port on
the CPU Unit. It cannot be used when connected to an RS-232C or
RS-422A/485 port on a Serial Communications Board or Serial Communications Unit.
4. A PT implementing Programming Console functionality and a PT implementing normal PT functionality cannot be used at the same time.
5. When more than one PT is connected to the same PC, be sure that each PT
is assigned a unique unit number. Malfunctions will occur if the same unit
number is set on more than one PT.
6. The 1:1 and 1:N NT Link protocols are not compatible with each other, i.e.,
they are separate serial communications protocols.
71
Section
Expanded System Configuration
Protocol Macros
2-5
The CX-Protocol is used to create data transmission procedures (protocols) for
general-purpose external devices according to the communications specifications (half-duplex or full-duplex, asynchronous) of the general-purpose external
devices. The protocols that have been created are then recorded in a Serial
Communications Board, enabling data to be sent to and received from the external devices by simply executing the PMCR(260) instruction in the CPU Unit. Protocols for data communications with OMRON devices, such as Temperature
Controller, Intelligent Signal Processors, Bar Code Readers, and Modems, are
supported as standard protocols. (See note.)
Note The standard protocols are provided with the CX-Protocol, Serial Communications Boards, and Serial Communications Units.
Host computer
CX-Protocol or PSS Support
Software for protocol macro
function
Protocol
Applicable port
CPU Unit
Peripheral port RS-232C port
No
No
Serial
Communications
Board
Yes
Serial
Communications
Unit
Yes
Messages
Messages
CompoWay/F
(Host Function)
General-purpose external device
The CS1-series CPU Unit can operate as a host to send CompoWay/F commands to OMRON components connected in the system. CompoWay/F commands are executed by using the CompoWay/F send/receive sequences in the
standard protocols of the protocol macro function.
Protocol macro
CompoWay/F command
CompoWay/F
OMRON
device
72
Section
Expanded System Configuration
2-5
Unit/Protocol Compatibility
Unit
Model
CPU Units
CS1G/HCPU-E
Serial
Communications
Boards
CS1W-SCB21
Serial
Communications
Units
CS1W-SCU21
ASCII
Units
C200H-ASC11
CS1W-SCB41
Port
Peripheral
bus
(See
Note.)
Host Link
No-protocol (customer)
communications
Peripheral
RS-232C
RS-232C
RS-232C
RS-232C
RS-422/485
RS-232C
Yes
Yes
-----------
Yes
Yes
Yes
Yes
Yes
Yes
Yes
--Yes
-----------
----Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
---------------
RS-232C
---
Yes
---
Yes
Yes
---
---------------
---------------
---------------
---------------
---------------
Yes
Yes
Yes
Yes
Yes
Yes
Yes
RS-232C
RS-232C
C200H-ASC21 RS-232C
RS-422/485
C200H-ASC31 RS-232C
RS-232C
RS-232C
(Terminal
port)
Protocol
macro
NT Link
(1:N
Mode)
Generalpurpose
(using
BASIC)
Note The peripheral bus mode is used for Programming Devices excluding Programming Console. If Programming Console is to be used, set pin 4 of the DIP switch
on the front panel of the Unit to OFF so that the default peripheral port communications parameters are used instead of those specified in the PC Setup.
Host Link System
The following system configurations are possible for a Host Link System.
C-mode Commands
Host Link
Host Link commands
FINS Commands
Host Link
FINS
Host Link terminator
Host Link header
73
Section
Expanded System Configuration
2-5
Note In Host Link mode, FINS commands contained between a header and terminator can be sent from the host computer to any PC on the Network. Communications are possible with PCs on the same or different types of interconnected Networks up to two levels away (three levels including the local level but not including the Host Link connection).
Host Link
FINS
FINS
Host Link
terminator
Host Link header
Controller Link Network
or Ethernet
Bridge
Host Link
Ethernet
Controller Link Network
Controller Link
Network
Gateway
Communications from Host Computer
SEND(090)/
RECV(098)
CMND(490)
SEND(090): Sends data to the Host computer.
RECV(098): Receives data from the Host computer.
CMND(490): Executes a specified FINS command.
Host Link
FINS
Host Link terminator
Host Link header
74
Section
Expanded System Configuration
2-5
Note In Host Link mode, FINS commands contained between a header and terminator can be sent from the host computer to any PC on the Network. Communications are possible with PCs on the same or different types of interconnected Networks up to two levels away (three levels including the local level but not including the Host Link connection).
SEND(090)/
RECV(098)
CMND(490)
Host Link
Controller
Link Network
FINS
Host Link
terminator
FINS
Host Link header
Bridge
Host Link
Ethernet
SEND(090)/
RECV(098)
CMND(490)
Controller Link Network
Controller Link Network
Gateway
75
Section
Expanded System Configuration
2-5
2-5-3 Communications Network System
Information Systems
The following network systems can be configured when using CS1-series Units.
Ethernet
Message Communications
Host computer to PC
PC to PC or Host computer
FTP Server Function
Host computer to PC
Transmission of files to Memory
Card installed in CPU Unit
Ethernet Unit
Socket Service
Sends/receives data using TCP
or UDP protocol
Controller Link Unit
Controller Link Support Board
Controller Link
Configurator
Simple Network configuration
(twisted-pair cables/ optical
fiber cables)
Data link and message communications
DeviceNet
(CompoBus/D)
Message communications
and large-capacity data
transmission
Links between PC and personal computer
Optical Controller Link Units
provide a bypass function
when a node fails.
CompoBus/S
Multi-vendor network
DeviceNet
Remote I/O message
communications
Remote I/O: Many points,
free allocation
Message communications
between PCs, DeviceNet
and Explicit messages
Multi-level network
Various connection
methods
Superior Slaves
Remote I/O Terminals,
Remote Adapters, Analog
I/O Terminals, Sensor
Terminals, I/O Link Units,
Temperature Input
Terminals, High-density
I/O Terminals
High-speed remote I/O
Various connection methods
Superior Master Units
Serial Communications Units
CPU Units
Many Types of Slaves
Remote I/O Terminals, Remote I/O Modules, Sensor
Amp Terminals, Sensor Terminals, Bit Chain Terminals
SYSMAC BUS Remote I/O
Remote I/O via I/O Units
Multiple and optical fiber
cables
Slave Racks, I/O Terminals, I/O Relay Terminals
76
Control Systems
Large-capacity, flexible, and
effective data links
Section
Expanded System Configuration
Ethernet
2-5
If an Ethernet Unit is connected to the system, FINS messages can be used to
communicate between the Host computer connected to the Ethernet and the
PC, or between PCs. By executing FTP commands for the PC from the Host
computer connected to the Ethernet, the contents of the files on the Memory
Card installed in the CPU Unit can be read or written (transferred). Data can be
sent and received using UDP and TCP protocols. These functions enable a
greater compatibility with information networks.
Host computer
FTP command
Ethernet
FINS
FINS
Ethernet Unit
Controller Link
Ethernet Unit
The Controller Link Network is the basic framework of the OMRON PC FA Network. Connecting a Controller Link Unit to the network enables data links between PCs, so that data can be shared without programming, and FINS message communications between PCs, which enable separate control and data
transfer when required. The Controller Link Network connections use either
twisted-pair cables or optical fiber cables. Data links and message communications are also possible between the PC and personal computer. Data links enable large-capacity and free allocations. FINS message communications also
allow large-capacity data transfer.
Controller Link Unit
Messages
Controller Link Unit
Controller Link
Support
Board
Controller Link
Free
allocation
Data link
77
Section
Expanded System Configuration
CompoBus/D (DeviceNet)
2-5
CompoBus/D is a multi-vendor network consisting of multi-bit control and information systems and conforms to the Open Field DeviceNet specification.
Connecting a CompoBus/D Master Unit to the network enables remote I/O communications between the PC and the Slaves on the network. Remote I/O communications enable large-capacity I/O and user-set allocations. Analog I/O Terminals are used for the Slaves. Message communications are possible between
PCs and between the PC and DeviceNet devices manufactured by other companies.
CompoBus/D
Master Unit
CompoBus/D
Master Unit
Messages
Remote I/O
CompoBus/S
CompoBus/D Slaves
CompoBus/S is a high-speed ON/OFF bus for remote I/O communications.
Connecting a CompoBus/S Master Unit to the network allows remote I/O communications between the PC and Slaves. High-speed communications are performed with 256 points in a cycle time of 1 ms max.
CompoBus/S Master Unit
CompoBus/S
Remote I/O
78
Section
Expanded System Configuration
2-5
Communications Network Overview
System
Information networks
Network
Ethernet
Controller Link
RS-232C →
Controller Link
Control networks
Controller Link
Function
Between Host
computer and PC.
Between PCs.
Between Host
computer and
Memory Card
installed in CPU Unit.
Between PC and
nodes with socket
service, such as UNIX
computers.
Between PC and
personal computer
directly connected to
the Network.
Between Host Link
computer and PC on
the Network.
Between PCs.
PC Link
DeviceNet
(CompoBus/D)
DeviceNet
(CompoBus/D)
CompoBus/S
PC and Network
devices (Slaves).
Communications
FINS message
communications
Communications
Device
Ethernet Unit
FTP servo
Socket service
FINS message
communications
Data link (offset,
simple settings)
Host Link commands
and gateway.
Controller Link
Support Board and
Controller Link Unit
FINS message
communications
Data link (offset,
simple settings)
Simple data link
FINS message
communications in an
open network.
Controller Link Unit
RS-232C cables and
Controller Link Unit
PC Link Unit
CompoBus/D Master
Unit and Configurator
Large-capacity
remote I/O (fixed or
free allocation) in an
open network
High-speed remote
CompoBus/S Master
I/O in a network with
Unit
OMRON devices only.
79
Section
Expanded System Configuration
2-5
Communications Specifications
Network
Communications
Max.
baud
rate
Communications
distance
Max.
No. of
Units
Communications
medium
Data
Max.
Connectlink careable depacity
mote
vices
(per netI/O
work)
points
----Host
computer-to
-PC,
PC-to-PC
32000
--PC-to-PC,
words
personal
computer-to
-PC
Messages
Data
link
Remote
I/O
Ethernet
Yes
---
---
10 Mbps
2.5 km
---
Same
axis
Controller Link
Yes
Yes
---
2 Mbps
Twistedpair
cables:
500 m
32
Special
(twistedpair)
cables
or optical
fiber
cables
32
RS-232
C,
RS-422,
optical
fiber
cables
64
words
---
---
63
Special
cables
---
2,048
PC-to-Slave
Two-cor
e wires,
special
flat
cables
---
Yes
---
128 Kbps
Optical
cables:
20 km
500 m
DeviceNet
Yes
(CompoBus/D)
---
Yes
500 Kbps
100 m
CompoBus/S
---
PC Link
---
---
Communi
cations
cycle:
Approx. 5
ms (128
inputs,
128
outputs)
Yes
750 Kbps
Communi
cations
cycle:
Approx. 1
ms max.
(128
inputs,
128
outputs)
80
100 m
32
(Slaves:
Remote I/O
Terminals,
Remote
Adapters.
Sensor
Terminals,
CQM1 I/O
Link Units,
Analog
Output
Terminals,
Analog
Input
Terminals)
256
PC-to-Slave
(Slaves:
Remote I/O
Terminals,
Remote I/O
Modules.
Sensor
Terminals,
Sensor Amp
Terminals,
Bit Chain
Terminals)
Section
Expanded System Configuration
FINS Messages
2-5
FINS (Factory Interface Network Service) messages are commands and responses that are used as a message service in an OMRON Network. FINS messages enable the user to control operations such as sending and receiving data
and changing operating modes when necessary. The features of FINS messages are as follows:
Flexible Communications
FINS messages are defined in the application layer and do not rely on the physical layer, data link layer, or other lower-level layers. This enables flexible communications on the CPU bus and different types of networks. Basically, communications with Ethernet, SYSMAC NET, SYSMAC LINK, Controller Link, CompoBus/D, or Host Link Networks, and between the CPU Unit and CS1 CPU Bus
Units or Inner Boards is possible via the CPU bus.
CS1 CPU Bus Unit
Inner Board
Ethernet
FINS
TCP/IP FINS
Host Link
FINS
FINS
Controller Link
Note A TCP/IP header must be attached to the FINS command for an Ethernet Network, and a Host Link header must be attached to the FINS command for a Host
Link Network
Supports Network Relay
Up to three network levels, including the local network, can be bypassed to access other Racks.
Network 2
Network 1
Network 3
Access to CPU Unit Plus Other Devices on Racks
The CPU Unit, CS1 CPU Bus Units, personal computers (boards), Inner Boards,
and other devices can be identified and specified using unit addresses.
CS1 CPU Bus Unit
Inner Board
CPU Unit
Personal
computer
board
81
Section
Unit Current Consumption
2-6
2-6
Unit Current Consumption
The amount of current/power that can be supplied to the Units mounted in a
Rack is limited by the capacity of the Rack’s Power Supply Unit. Refer to the following tables when designing your system so that the total current consumption
of the mounted Units does not exceed the maximum current for each voltage
group and the total power consumption does not exceed the maximum for the
Power Supply Unit.
2-6-1 CPU Racks and Expansion Racks
The following table shows the maximum currents and power that can be supplied by Power Supply Units in CPU Racks and Expansion Racks (both CS1 Expansion Racks and C200H Expansion I/O Racks).
When calculating current/power consumption in a CPU Rack, be sure to include
the power required by the CPU Rack and CPU Unit themselves. Likewise, be
sure to include the power required by the Expansion Rack itself When calculating current/power consumption in an Expansion Rack.
Power Supply
Unit
Max. Current Consumption
Max. Total
Power
Consumption
C200HW-PA204
5-V group
26-V group
(Internal logic)
(Relays)
4.6 A
0.6 A
24-V group
(Service)
None
30 W
C200HW-PA204S
4.6 A
0.6 A
0.8 A
30 W
C200HW-PA204R
4.6 A
0.6 A
None
30 W
C200HW-PD204
4.6 A
0.6 A
None
30 W
C200HW-PA209R
9A
1.3 A
None
45 W
2-6-2 SYSMAC BUS Remote I/O Slave Racks
The following table shows the maximum currents and power that can be supplied by Power Supply Units in SYSMAC BUS Remote I/O Slave Racks. Be sure
to include the power required by the Rack itself When calculating current/power
consumption.
Max. Current Consumption
Slave Unit
C200H-RT201
(Wired)
C200H-RT202
(Wired)
C200H-RT001-P
(Optical)
C200H-RT002-P
(Optical)
Max. Total
Power
Consumption
5-V group
26-V group
(Internal logic)
(Relays)
2.7 A
0.6 A
24-V group
(Service)
0.8 A
28 W
2.7 A
0.6 A
None
23 W
2.7 A
0.6 A
0.8 A
28 W
2.7 A
0.6 A
None
23 W
The current consumed by each voltage group must not exceed the maximum
current shown in the table above.
1, 2, 3...
1. Current required at 5 VDC by all Units (A) ≤ Max. Current shown in table
2. Current required at 26 VDC by all Units (B) ≤ Max. Current shown in table
3. Current required at 24 VDC by all Units (C) ≤ Max. Current shown in table
Also, the power consumed by all Units must not exceed the maximum shown in
the table above.
A × 5 VDC + B × 26 VDC + C × 24 VDC ≤ Max. Power shown in table
82
Section
Unit Current Consumption
2-6
2-6-3 Example Calculations
Example 1
In this example, the following Units are mounted to a CPU Rack with a C200HWPA204S Power Supply Unit.
Unit
Model
Voltage group
Quantity
CS1W-BC083
1
5-VDC
0.11 A
26-VDC
---
24-VDC
---
CS1H-CPU66
1
1.10 A
---
---
Output Units
C200H-ID216
CS1W-ID291
C200H-OC221
2
2
2
0.10 A
0.20 A
0.01 A
----0.075 A
-------
Special I/O Unit
C200H-NC213
1
0.30 A
---
---
CS1 CPU Bus Unit
CS1W-CLK21
1
0.33 A
---
---
0.3 A used
---
---
0.3 A
CPU Backplane
(8 slots)
CPU Unit
Input Units
Service power supply (24 VDC)
Current Consumption
Group
Current consumption
5 VDC
0.11 A + 1.10 A + 0.10 A × 2 + 0.20 A × 2 + 0.01 A × 2 + 0.30 A + 0.33 A
= 2.46 A (x4.6 A)
26 VDC
0.075 A × 2 = 0.15 A (x0.6 A)
24 VDC
0.3 A
Power Consumption
2.46 A × 5 V + 0.15 A × 26 V + 0.3 A × 24 V
= 12.3 W + 3.9 W + 7.2 W
= 23.4 W (x30 W)
Example 2
In this example, the following Units are mounted to a CS1 Expansion Rack with a
C200HW-PA209R Power Supply Unit.
Unit
Model
Voltage group
Quantity
CS1 Expansion
Backplane
(10 slots)
CS1W-BI103
1
5-VDC
0.23 A
26-VDC
---
24-VDC
---
Input Units
CS1W-ID291
2
0.20 A
---
---
Output Units
CS1W-OD291
8
0.48 A
---
---
Current Consumption
Group
Current consumption
5 VDC
0.23 A + 0.20 A × 2 + 0.48 A × 8 = 4.47 A (x9 A)
26 VDC
---
24 VDC
---
Power Consumption
4.47 A × 5 V = 22.35 W (x45 W)
Example 3
In this example, the following Units are mounted to a SYSMAC BUS Remote I/O
Slave Rack with a C200H-RT201 Slave Unit.
Unit
Model
Voltage group
Quantity
Input Units
C200H-ID211
2
5-VDC
0.11 A
Output Units
C200H-OD411
3
0.14 A
26-VDC
---
24-VDC
---
---
---
83
Section
Unit Current Consumption
2-6
Current Consumption
Group
Current consumption
5 VDC
0.11 A × 2 + 0.14 A × 3 = 0.64 A (x2.7A)
26 VDC
---
24 VDC
---
Power Consumption
0.64 A × 5 V = 3.2 W (x28 W)
2-6-4 Current Consumption Tables
5-VDC Voltage Group
Name
Model
CPU Units
Current consumption (A)
CS1H-CPU67-EV1
(These values include current CS1H-CPU66-EV1
consumption by a
CS1H-CPU65-EV1
Programming Console or
CX-Programmer connection.) CS1H-CPU64-EV1
CS1H-CPU63-EV1
CS1H-CPU45-EV1
CS1H-CPU44-EV1
CS1H-CPU43-EV1
CS1H-CPU42-EV1
Serial Communications
CS1W-SCB21
Boards
CS1W-SCB41
CPU Backplanes
CS1 Expansion Backplanes
C200H Expansion I/O
Backplanes
CS1W-BC023
CS1W-BC033
CS1W-BC053
CS1W-BC083
CS1W-BC103
CS1W-BI033
CS1W-BI053
CS1W-BI083
CS1W-BI103
C200HW-BI031
C200HW-BI051
C200HW-BI081
C200HW-BI101
1.10 (See note.)
1.10 (See note.)
1.10 (See note.)
1.10 (See note.)
1.10 (See note.)
0.95 (See note.)
0.95 (See note.)
0.95 (See note.)
0.95 (See note.)
0.28 + 0.15 x (No. of points)
(See note.)
0.37 + 0.15 x (No. of points)
(See note.)
0.11
0.11
0.11
0.11
0.11
0.23
0.23
0.23
0.23
0.15
0.15
0.15
0.15
Note NT-AL001 Link Adapters consume 0.15/Unit when used.
Basic I/O Units
Category
CS1 Basic Input
Units
Name
DC Input Units
Interrupt Input Unit
High-speed Input
Unit
DC Input Units
84
Model
CS1W-ID211
CS1W-ID231
CS1W-ID261
CS1W-INT01
CS1W-IDP01
Current
consumption (A)
0.10
0.15
0.15
0.10
0.10
CS1W-ID291
0.20
Section
Unit Current Consumption
Category
C200H Input Units
Name
DC Input Units
AC Input Units
AC/DC Input Units
B7A Interface Units
C200H Group-2
High-density Input
Units
CS1 Basic Output
Units
Interrupt Input Unit
DC Input Units
Transistor Output
Units
Transistor Output
Units
Model
C200H-ID211
C200H-ID212
C200H-IA121
C200H-IA122
C200H-IA122V
C200H-IA221
C200H-IA222
C200H-IA222V
C200H-IM211
C200H-IM212
C200H-B7AI1
C200H-B7A12
C200HS-INT01
C200H-ID216
C200H-ID217
C200H-ID218
C200H-ID219
C200H-ID111
CS1W-OD211
CS1W-OD212
CS1W-OD231
CS1W-OD232
CS1W-OD261
CS1W-OD262
CS1W-OD291
CS1W-OD292
2-6
Current
consumption (A)
0.11
0.01
0.01
0.01
0.01
0.01
0.01
0.01
0.01
0.01
0.10
0.10
0.02
0.10
0.12
0.10
0.12
0.12
0.17
0.17
0.27
0.27
0.39
0.39
0.48
0.48
85
Section
Unit Current Consumption
Category
Name
C200H Output Units Relay Output Units
Transistor Output
Units
B7A Interface Units
Triac Output Units
C200H Group-2
High-density Output
Units
Transistor Output
Units
CS1 Mixed I/O
Units
DC Input/Transistor
Output Units
DC Input/Transistor
Output Units
B7A Interface Units
Analog Timer Unit
Model
C200H-OC221
C200H-OC222
C200H-OC222V
(no longer
manufactured)
2-6
Current
consumption (A)
0.01
0.01
0.008
C200H-OC222N
C200H-OC225
C200H-OC226
(See note.)
C200H-OC226N
C200H-OC223
C200H-OC224
C200H-OC224V
(no longer
manufactured)
0.008
0.05
0.03
C200H-OC224N
C200H-OD411
C200H-OD213
C200H-OD214
C200H-OD216
C200H-OD211
C200H-OD217
C200H-OD212
C200H-OD21A
C200H-B7AO1
C200H-B7A02
C200H-OA223
C200H-OA222V
C200H-OA224
C200H-OD218
C200H-OD21B
C200H-OD219
CS1W-MD261
CS1W-MD262
CS1W-MD291
CS1W-MD292
C200H-B7A21
C200H-B7A22
C200H-TM001
0.01
0.14
0.14
0.14
0.01
0.16
0.01
0.18
0.10
0.10
0.18
0.27
0.18
0.27
0.18
0.18
0.27
0.27
0.27
0.35
0.35
0.10
0.10
0.06
0.03
0.01
0.01
0.01
Note No longer manufactured.
Special I/O Units
Category
C200H
High-density I/O
Units
(Special I/O Units)
86
Name
DC Input Unit
TTL Input Unit
Transistor Output
Unit
TTL Output Unit
TTL I/O Unit
DC Input/
Transistor Output
Units
Model
C200H-ID215
C200H-ID501
C200H-OD215
Current
consumption (A)
0.13
0.13
0.22
C200H-OD501
C200H-MD501
C200H-MD215
0.22
0.18
0.18
C200H-MD115
0.18
Section
Unit Current Consumption
Category
C200H Special I/O
Units
Name
Temperature
Control Units
Heat/Cool
Temperature
Control Units
Temperature
Sensor Units
PID Control Units
Cam Positioner
Unit
ASCII Units
Analog Input Units
Analog Output
Units
Analog I/O Unit
High-speed
Counter Units
Motion Control
Unit
Model
C200H-TC001
C200H-TC002
C200H-TC003
C200H-TC101
C200H-TC102
C200H-TC103
C200H-TV001
C200H-TV002
C200H-TV003
C200H-TV101
C200H-TV102
C200H-TV103
C200H-TS001
C200H-TS002
C200H-TS101
C200H-TS102
C200H-PID01
C200H-PID02
C200H-PID03
C200H-CP114
C200H-ASC02
C200H-ASC11
C200H-ASC31
C200H-AD001
C200H-AD002
C200H-AD003
C200H-DA001
C200H-DA002
C200H-DA003
C200H-DA004
C200H-MAD01
C200H-CT001-V1
C200H-CT002
C200H-CT021
C200H-MC221
2-6
Current
consumption (A)
0.33
0.33
0.33
0.33
0.33
0.33
0.33
0.33
0.33
0.33
0.33
0.33
0.45
0.45
0.45
0.45
0.33
0.33
0.33
0.30
0.20
0.25
0.30
0.55
0.45
0.10
0.65
0.60
0.10
0.10
0.10
0.30
0.30
0.45
0.65
(0.85 with
Teaching Box)
87
Section
Unit Current Consumption
Category
C200H Special I/O
Units
Name
Position Control
Units
ID Sensor Units
Voice Unit
CompoBus/D
Master Unit
CompoBus/S
Master Unit
PC Link Unit
SYSMAC BUS
Remote I/O Slave
Units
CS1 Special I/O
Units
CS1 CPU Bus Units
Category
CS1 CPU Bus
Units
Analog I/O Unit
Analog Input Unit
Analog Output
Unit
Motion Control
Unit
Name
Controller Link
Unit
Serial
Communications
Units
Ethernet Unit
Loop Control Unit
2-6
Model
Current
consumption (A)
C200H-NC211
0.50
C200H-NC111
0.15
C200H-NC112
0.15
C200HW-NC113
0.30
C200HW-NC213
0.30
C200HW-NC413
0.50
C200H-IDS01-V1
0.25
C200H-IDS21
0.25
C200H-OV001
0.30
C200HW-DRM21-V1 0.25
C200HW-SRM21-V1 0.15
C200H-LK401
C200H-RM201
0.35
0.20
C200H-RM001-PV1
0.20
CS1W-MAD44
CS1W-AD041/081
CS1W-DA041/08V/
08C
CS1W-MC221
0.20
0.13
0.13
CS1W-MC421
0.7 (1.00 when
connected to a
Teaching Box)
Model
0.6 (0.80 when
connected to a
Teaching Box)
CS1W-CLK21
CS1W-CLK11
CS1W-SCU21
Current
consumption (A)
0.33
0.47
0.30 (See note.)
CS1W-ETN01
CS1W-LC001
0.40
0.36
Note NT-AL001 Link Adapters consume 0.15/Unit when used.
Current Consumptions
for 26-V Supply
Category
C200H Output
Units
Name
Relay Contact
Output Unit
Transistor Output
Units
88
Model
C200H-OC221
C200H-OC222
C200H-OC223
C200H-OC224
C200H-OC225
C200H-OC222V/N
C200H-OC226(N)
C200H-OC224V/N
C200H-OD216
C200H-OD217
Current
consumption (A)
0.075 for 8 points
when ON
simultaneously
0.09 for 8 points
when ON
simultaneously
0.075 for 8 points
when ON
simultaneously
Section
Unit Current Consumption
Category
Name
C200H Special I/O
Units
Analog Input Units
Analog Output
Units
Analog I/O Units
ID Sensor Units
CS1 Special I/O
Unit
Analog I/O Unit
Analog Input Unit
Analog Output
Unit
Model
C200H-AD003
C200H-DA003
C200H-DA004
C200H-MAD01
C200H-IDS01-V1
C200H-IDS21
CS1W-MAD44
CS1W-AD041/081
CS1W-DA041/08V
CS1W-DA08C
2-6
Current
consumption (A)
0.10
0.20
0.25
0.2
0.12
0.12
0.20
0.10
0.18
0.25
89
SECTION 3
Nomenclature, Functions, and Dimensions
This section provides the names of components and their functions for various Units. The Unit dimensions are also provided.
3-1
CPU Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-1-1 Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-1-2 Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-1-3 CPU Unit Memory Block Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-1-4 Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-2 File Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-2-1 Files Handled by CPU Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-2-2 Initializing File Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-2-3 Using File Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-2-4 Memory Card Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-2-5 Installing and Removing the Memory Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-3 Programming Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-3-1 Programming Consoles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-3-2 CX-Programmer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-3-3 Peripheral Port Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-3-4 RS-232C Port Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-4 Power Supply Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-4-1 Power Supply Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-4-2 Components and Switch Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-4-3 Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-4-4 Selecting a Power Supply Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-5 Backplanes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-5-1 CPU Backplanes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-5-2 Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-5-3 CS1 Expansion Backplanes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-5-4 C200H Expansion I/O Backplanes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-6 Basic I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-6-1 C200H Basic I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-6-2 Interrupt Input Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-6-3 Units with High-speed Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-6-4 CS1 Basic I/O Units with Connectors (32-, 64-, and 96-pt Units) . . . . . . . . . . . .
3-6-5 C200H Group-2 High-density I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-7 C200H High-density I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-8 Standard B7A Interface Unit C200H-B7AI1/B7AO1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-9 Group-2 B7A Interface Units (C200H-B7A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-9-1 Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-9-2 Connectable B7A Link Terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-9-3 Comparison between Standard and Group-2 B7A Interface Units . . . . . . . . . . . .
3-9-4 Parts and Names (C200H-B7A22 shown below) . . . . . . . . . . . . . . . . . . . . . . . . .
3-9-5 Indicator Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-9-6 I/O Number Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-9-7 DIP Switch Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-9-8 Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-9-9 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-9-10 Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-10 Analog Timer Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
92
92
92
96
99
99
100
101
101
103
104
106
108
109
112
112
115
115
115
116
117
117
117
118
119
120
122
122
128
133
135
138
140
145
147
148
148
148
149
150
150
151
152
156
156
156
91
Section
CPU Units
3-1
3-1
CPU Units
3-1-1 Models
I/O points
5,120
1,280
960
Expansion
Racks
7 max.
3 max.
2 max.
Programming
Data Memory
(DM + EM)
448K words
256K words
128K words
64K words
32K words
128K words
64K words
32K words
32K words
250K steps
120K steps
60K steps
30K steps
20K steps
60K steps
30K steps
20K steps
10K steps
LD instruction
processing time
0.04 µs
µ
0.08 µs
µ
Model
CS1H-CPU67-EV1
CS1H-CPU66-EV1
CS1H-CPU65-EV1
CS1H-CPU64-EV1
CS1G-CPU63-EV1
CS1G-CPU45-EV1
CS1G-CPU44-EV1
CS1G-CPU43-EV1
CS1G-CPU42-EV1
3-1-2 Components
1. LED indicators
2. Battery compartment
3. DIP switch (under battery cover)
4. Memory Card indicators
10. Peripheral port
5. Memory Card power supply switch
9. RS-232C port
PORT
6. Memory Card eject button
8. Inner Board connector compartment
7. Memory Card connector
92
Section
CPU Units
1, 2, 3...
Indicator
RUN
Color
Green
ERR/ALM
Red
Status
ON
Flashing
OFF
ON
3-1
1. Indicators
The following table describes the LED indicators located on the front panel
of the CPU Units.
Meaning
PC is operating normally in MONITOR or RUN mode.
System download mode error or DIP switch settings error.
PC has stopped operating while in PROGRAM mode, or has stopped operating
due to a fatal error, or is downloading data from the system.
A fatal error has occurred (including FALS instruction execution), or a hardware
error (watchdog timer error) has occurred.
The CPU Unit will stop operating, and the outputs from all Output Units will turn
OFF.
Flashing
A non-fatal error has occurred (including FAL instruction execution)
The CPU Unit will continue operating.
INH
Orange
PRPHL
Orange
COMM
Orange
MCPWR
Green
BUSY
Orange
OFF
ON
OFF
Flashing
OFF
Flashing
OFF
ON
Flashing
OFF
Flashing
OFF
CPU Unit is operating normally.
Output OFF Bit (A50015) has been turned ON. The outputs from all Output Units
will turn OFF.
Output OFF Bit (A50015) has been turned OFF.
CPU Unit is communicating (sending or receiving) via the peripheral port.
CPU Unit is not communicating via the peripheral port.
CPU Unit is communicating (sending or receiving) via the RS-232C port.
CPU Unit is not communicating via the RS-232C port.
Power is being supplied to the Memory Card.
Flashes once: Easy backup read, write, or verify normal
Flashes five times: Easy backup write malfunction
Flashes three times: Easy backup write warning
Flashes continuously: Easy backup read or verify malfunction
Power is not being supplied to the Memory Card.
Memory Card is being accessed.
Memory Card is not being accessed.
2. Battery Compartment
The battery compartment is located under the battery compartment cover
with the DIP switch.
3. DIP Switch
The CS1 CPU Unit has an 8-pin DIP switch that is used to set basic operational parameters for the CPU Unit. The DIP switch is located under the cover of the battery compartment. The DIP switch pin settings are described in
the following table.
4. Memory Card Indicators
The MCPWR indicator flashes green when power is being supplied to the
Memory Card and the BUSY indicator flashes orange when the Memory
Card is being accessed.
5. Memory Card Power Supply Switch
Press the Memory Card power supply switch to disconnect power before removing the Memory Card. Also, press the Memory Card Power Supply
Switch to perform an easy backup operation (i.e., to write to or verify the
Memory Card), or to stop the MCPWR indicator flashing due to a write or
verify malfunction when performing an easy backup to the Memory Card.
6. Memory Card Eject Button
Press the Memory Card eject button to remove the Memory Card from the
CPU Unit.
7. Memory Card Connector
The Memory Card connector connects the Memory Card to the CPU Unit.
Insert the Memory Card with the label facing to the right.
93
CPU Units
Section
3-1
8. Inner Board Connector Compartment
The Inner Board connector compartment is used to connect Inner Boards
such as the Serial Communications Board.
9. RS-232C Port
The RS-232C port is connected to Programming Devices (excluding Programming Console), Host Computers, general-purpose external devices,
Programmable Terminals, and other devices.
10. Peripheral Port
The peripheral port is connected to Programming Devices, such as a Programming Console or Host Computers.
94
Section
CPU Units
3-1
DIP Switch Settings
Pin
no.
Setting
1
ON
2
OFF
ON
3
The user program is not automatically
transferred from the Memory Card when
power is turned ON.
ON
Programming Console messages displayed
in English.
Programming Console messages displayed
in the language stored in system ROM.
(Messages displayed in Japanese with the
Japanese version of system ROM.)
Peripheral port communications parameters
set in the PC Setup are used.
Peripheral port communications parameters
set using Programming Console or
CX-Programmer (Peripheral bus only) are
used.
RS-232C port communications parameters
set using a CX-Programmer (Peripheral bus
only) are used.
ON
OFF
5
ON
OFF
6
ON
OFF
7
8
Writing disabled for user program memory.
(See Note.)
Writing enabled for user program memory.
The user program is automatically
transferred from the Memory Card when
power is turned ON.
OFF
OFF
4
Function
ON
RS-232C port communications parameters
set in the PC Setup are used.
User-defined pin. Turns OFF the User DIP
Switch Pin Flag (A39512).
User-defined pin. Turns ON the User DIP
Switch Pin Flag (A39512).
Writing from the CPU Unit to the Memory
Card.
Restoring from the Memory Card to the
CPU Unit.
OFF
Verifying contents of Memory Card.
OFF
Always OFF.
Usage
Default
Used to prevent programs from being
accidently overwritten from Programming
Devices (including Programming Console).
OFF
Used to store the programs in the Memory
Card to switch operations, or to
automatically transfer programs at power-up
(Memory Card ROM operation).
OFF
Note When pin 7 is ON and pin 8 is OFF,
easy backup reading from the
Memory Card is given priority, so even
if pin 2 is ON, the user program is not
automatically transferred from the
Memory Card when power is turned
ON.
Turn ON to display Programming Console
ON
messages in English.
Turn ON to use the peripheral port for a
device other than Programming Console or
CX-Programmer (Peripheral bus only).
OFF
Turn ON to use the RS-232C port for a
Programming Device.
OFF
Set pin 6 to ON or OFF and use A39512 in
the program to create a user-defined
condition without using an I/O Unit.
OFF
Press and hold the Memory Card Power
Supply Switch for three seconds.
To read from the Memory Card to the CPU
Unit, turn ON the PC power.
OFF
This operation is given priority over
automatic transfer (pin 2 is ON) when power
is ON.
Press and hold the Memory Card Power
Supply Switch for three seconds.
OFF
95
Section
CPU Units
3-1
Note The following data cannot be overwritten when pin 1 is ON:
• All parts of the user program (programs in all tasks)
• All data in the parameter area (such as the PC Setup and I/O table)
When pin 1 is ON, the user program and parameter area will not be cleared when
the memory clear operation is performed from a Programming Device.
3-1-3 CPU Unit Memory Block Map
The memory of CS1-series CPU Units is configured in the following blocks.
• Memory: Parameter Area and I/O Memory Area (See Note 1.)
Refer to Appendix E Memory Map for details on the memory.
• User memory: Ladder programs
The memory block and user memory block have battery back-up using the
CS1W-BAT01 Battery Set. If the battery voltage is low, the data in these areas
will be erased.
Note Always install the included CS1W-BAT01 Battery Set before first using the CPU
Unit.
CPU Unit
Built-in RAM
Memory
Parameter Area
(See Note 1.)
I/O Memory Area
Drive 1: EM file
memory (See Note 2.)
Backup
Battery
The battery life is 5 years at an
ambient temperature of 25°C.
User program memory
(Ladder program)
Drive 0: Memory Card
(flash memory)
File memory
96
Section
CPU Units
Note
3-1
1. The Parameter Area stores system information for the CPU Unit, such as
the PC Setup. An attempt to access the Parameter Area by an instruction
will generate an illegal access error.
2. Part of the EM (Extended Data Memory) Area can be converted to file
memory to handle data files and program files in RAM memory format,
which has the same format as Memory Cards.
Opening the Battery
Compartment Cover
Insert a small flat-blade screwdriver into the opening at the bottom of the battery
compartment cover and lift open the cover.
Insert a small flat-blade
screwdriver into the opening
at the bottom of the battery
compartment cover and lift
open the cover.
Battery
DIP switch
Opening the Peripheral Port Cover and Connecting Cables
Insert a small flat-blade
screwdriver into the
opening at the top of the
port cover and pull open.
Make sure the connector is
in facing the correct direction
Hold the grips on the side of the
connector and push into the port.
97
Section
CPU Units
3-1
Installing Inner Boards
1, 2, 3...
1. Press in the lever at the top of the Inner Board connector compartment and
pull out.
Press in the lever on the top of the
cover and pull out.
Press in the lever on the bottom of
the cover and pull out.
2. Remove the cover of the Inner Board connector compartment.
Inner Board connector
3. Insert the Inner Board into the compartment.
Note
1. Always make sure the power is OFF before instaling the Inner Board. Installing the Inner Board when the power is ON may cause CPU Unit malfunction, damage to internal components, and improper communications.
2. Before installing the Inner Board, be sure to touch a grounded metal object
to discharge static electricity from your body.
98
Section
File Memory
3-2
3-1-4 Dimensions
CS1H-CPU-EV1 and CS1G-CPU-EV1
3-2
File Memory
For CS1-series CPU Units, the Memory Card and a specified part of the EM Area
can be used to store files. All user programs, the I/O Memory Area, and the Parameter Area can be stored as files.
File memory
Memory Card
EM file memory
Bank 0
Bank n
Bank C
Note
EM file
memory
Memory
type
Flash
memory
RAM
Memory capacity
Model
8 Mbytes
15 Mbytes
30 Mbytes
48 Mbytes
The maximum
capacity of the CPU
Unit’s EM Area (e.g.,
the maximum
capacity for a CPU67
is 832 Kbytes)
HMC-EF861
HMC-EF171
HMC-EF371
HMC-EF571
The specified bank
(set in the PC Setup)
to the last bank of
the EM Area in the
I/O Memory.
1. A Memory Card can be written up to approximately 100,000 times.
2. The HMC-AP001 Memory Card Adapter is shown below.
99
Section
File Memory
3-2
3-2-1 Files Handled by CPU Unit
Files are ordered and stored in the Memory Card or EM file memory according to
the file name and the extension attached to it.
General-use Files
File type
Data files
Program files
Parameter
files
Files Transferred
Automatically at Startup
File type
Data files
Contents
Specified
range in I/O
memory
Binary
Text (-EV1 only)
CSV (-EV1 only)
All user programs
PC Setup, registered I/O tables,
routing tables, CS1 CPU Bus Unit
settings, etc.
Contents
File name
********
(See note 1.)
File name
Extension
.IOM
.TXT
.CSV
.OBJ
.STD
Extension
DM area data (stores data for
specified number of words
starting from D20000)
AUTOEXEC
.IOM
DM area data (stores data for
specified number of words
starting from D00000) (-EV1
only)
EM area for bank No. (stores
data for specified number of
words starting from E_00000)
ATEXECDM
.IOM
ATEXECE
.IOM
AUTOEXEC
.OBJ
AUTOEXEC
.STD
(-EV1 only)
Program files
All user programs
Parameter files PC Setup, registered I/O tables,
routing tables, CS1 CPU Bus
Unit settings, etc.
Easy Backup Files
(-EV1 Only)
File type
Data files
Contents
CIO area
General-purpose DM area
General-purpose EM area
Program files
All user programs
Parameter files PC Setup, registered I/O tables,
routing tables, CS1 CPU Bus
Unit settings, etc.
Note
File name
Words allocated to Special I/O
BACKUP
Units, CPU Bus Units, and Inner
Boards in the DM area
BACKUPIO
BACKUPDM
BACKUPE
BACKUP
Extension
.IOM
.IOR
.IOM
.IOM
.OBJ
.STD
1. Specify 8 ASCII characters. For a file name with less than 8 characters, add spaces
(20 Hex).
2. Always specify the name of files to be transferred automatically at power-up
as AUTOEXEC.
3. Easy backup file names must be named BACKUP.
100
Section
File Memory
3-2
3-2-2 Initializing File Memory
File memory
Memory Card
EM file memory
Initializing
procedure
1. Install Memory
Card into CPU Unit.
2. Initialize the
Memory Card using
a Programming
Device (including
Programming
Console).
1. Convert the part
of the EM Area
from the specified
bank No. to the last
bank No. to file
memory in the PC
Setup.
Data capacity after initialization
HMC-EF861: Approx. 7.6 Mbytes
HMC-EF171: Approx. 15.3 Mbytes
HMC-EF371: Approx. 30.6 Mbytes
1 bank:
Approx. 61 KB
13 banks: Approx. 825 KB
2. Initialize the EM
file memory using a
Programming
Device (excluding
Programming
Console).
3-2-3 Using File Memory
Note For details on using file memory, refer to the Section 12 File Memory Functions.
Memory Card
Reading/Writing Files
Using Programming
Device
File
Program files
I/O memory files
Parameter files
1, 2, 3...
File name and extension
∗∗∗∗∗∗∗∗.OBJ
∗∗∗∗∗∗∗∗.IOM
∗∗∗∗∗∗∗∗.STD
Data transfer direction
Between CPU Unit and
Memory Card,
1. Install the Memory Card into the CPU Unit.
2. Initialize the Memory Card if necessary.
3. Name the file containing the data in the CPU Unit and save the contents in
the Memory Card.
4. Read the file that is saved in the Memory Card to the CPU Unit.
Automatically
Transferring Memory
Card Files to the CPU
Unit at Power-up
File
Program files
I/O memory files
Parameter files
1, 2, 3...
File name and extension
AUTOEXEC.OBJ
AUTOEXEC.IOM
ATEXECDM.IOM
ATEXECE.IOM
AUTOEXEC.STD
Data transfer direction
From Memory Card to
CPU Unit
1. Install the Memory Card into the CPU Unit.
2. Set pin 2 of the DIP switch to ON.
3. The files are read automatically when the power is turned ON.
101
Section
File Memory
Reading/Writing I/O
Memory Files Using
FREAD(700)and
FWRIT(701)
File
I/O memory files
1, 2, 3...
File name and extension
∗∗∗∗∗∗∗∗.IOM
∗∗∗∗∗∗∗∗.TXT
∗∗∗∗∗∗∗∗.CSV
3-2
Data transfer direction
Between CPU Unit and
Memory Card
1. Install the Memory Card into the CPU Unit.
2. Initialize the Memory Card using a Programming Device.
3. Using the FWRIT(701) instruction, name the file of the specified I/O memory
area, and save to the Memory Card.
4. Using the FREAD(700) instruction, read the I/O memory files from the
Memory Card to the I/O memory in the CPU Unit.
Note When using spreadsheet software to read data that has been written to the
Memory Card in CSV or text format, it is now possible to read the data using Windows applications by mounting a Memory Card in the personal computer card
slot using a HMC-AP001 Memory Card Adapter (-EV1 only).
Reading and Replacing
Program Files during
Operation (-EV1 Only)
File
Program files
1, 2, 3...
File name and extension
∗∗∗∗∗∗∗∗.OBJ
Data transfer direction
Memory Card to CPU Unit
1. Install a Memory Card into the CPU Unit.
2. Set the following information: Program File Name (A654 to A657) and Program Password (A651).
3. Next, from the program, turn ON the Replacement Start Bit (A65015).
Backing Up or Restoring
CPU Unit Data (-EV1
Only)
File
Program files
Data files
Parameter files
1, 2, 3...
File name and extension
BACKUP.OBJ
BACKUP.IOM
BACKUPIO.IOR
BACKUPDM.IOM
Data transfer direction
CPU Unit to Memory Card
(when backing up)
Memory Card to CPU Unit
(when restoring)
BACKUPE.IOM
BACKUP.STD
1. Install a Memory Card into the CPU Unit.
2. Turn ON pin 7 on the DIP switch.
3. To back up data, press and hold the Memory Card Power Supply Switch for
three seconds. To restore data, turn ON the PC power.
Transferring Files
between Memory Cards
and the CX-Programmer
The following files can be transferred between a Memory Card and the CX-Programmer.
File
Symbols file
Comment file
1, 2, 3...
File name and extension
SYMBOLS.SYM
COMMENTS.CNT
Data transfer direction
Between CX-Programmer
and Memory Card
1. Insert a formatted Memory Card into the CPU Unit.
2. Place the CX-Programmer online and use the file transfer operations to
transfer the above files from the personal computer to the PC or from the PC
to the personal computer.
102
Section
File Memory
3-2
Reading/Writing EM File Memory Files Using Programming Device
File
Program files
I/O memory files
Parameter files
1, 2, 3...
File name and extension
∗∗∗∗∗∗∗∗.OBJ
∗∗∗∗∗∗∗∗.IOM
∗∗∗∗∗∗∗∗.STD
Data transfer direction
Between CPU Unit and
EM file memory
1. Convert the part of the EM Area specified by the first bank number into file
memory in the PC Setup.
2. Initialize the EM file memory using a Programming Device.
3. Name the data in the CPU Unit and save in the EM file memory using the
Programming Device.
4. Read the EM file memory files to the CPU Unit using the Programming Device.
Reading/Writing I/O Memory Files in EM File Memory Using FREAD(700)and FWRIT(701)
File
I/O memory files
1, 2, 3...
File name and extension
∗∗∗∗∗∗∗∗.IOM
Data transfer direction
Between CPU Unit and
EM file memory
1. Convert the part of the EM Area specified by the first bank number into file
memory in the PC Setup.
2. Initialize the EM file memory using a Programming Device.
3. Using the FWRIT(701) instruction, name the specified area in I/O memory
with a file name and save in the EM file memory.
4. Using the FREAD(700) instruction, read the I/O memory files from the EM
file memory to the I/O memory in the CPU Unit.
Note The following files can be transferred between EM file memory and the CX-Programmer.
File
Symbols file
Comment file
1, 2, 3...
File name and extension
SYMBOLS.SYM
COMMENTS.CNT
Data transfer direction
Between CX-Programmer
and EM file memory
1. Format the EM Area in the CPU Units as file memory.
2. Place the CX-Programmer online and use the file transfer operations to
transfer the above files from the personal computer to the PC or from the PC
to the personal computer.
3-2-4 Memory Card Dimensions
103
Section
File Memory
3-2
3-2-5 Installing and Removing the Memory Card
Installing the Memory Card
1, 2, 3...
1. Pull the top end of the Memory Card cover forward and remove from the
Unit.
n
2. Insert the Memory Card with the label facing to the right. (Insert with the n on
the Memory Card label and the on the CPU Unit facing each other.)
Product label
3. Push the Memory Card securely into the compartment. If the Memory Card
is inserted correctly, the Memory Card eject button will be pushed out.
Removing the Memory Card
1, 2, 3...
1. Press the Memory Card power supply switch.
Memory Card power supply switch
104
Section
File Memory
3-2
2. Press the Memory Card eject button after the BUSY indicator is no longer lit.
BUSY indicator
Memory Card eject button
3. The Memory Card will eject from the compartment.
4. Remove the Memory Card cover when a Memory Card is not being used.
Note
1. Never turn OFF the PC while the CPU is accessing the Memory Card.
2. Never remove the Memory Card while the CPU is accessing the Memory
Card. Press the Memory Card power supply switch and wait for the BUSY
indicator to go OFF before removing the Memory Card. In the worst case,
the Memory Card may become unusable if the PC is turned OFF or the
Memory Card is removed while the Card is being accessed by the CPU.
3. Never insert the Memory Card facing the wrong way. If the Memory Card is
inserted forcibly, it may become unusable.
Installing the Memory Card into a Personal Computer
HMC-AP001 Memory Card Adapter
Memory Card
Personal computer PC card slot
Note When a Memory Card is inserted into a computer using a Memory Card Adapter,
it can be used as a standard storage device, like a floppy disk or hard disk.
105
Section
Programming Devices
3-3
3-3
Programming Devices
There are two types of Programming Devices that can be used: A Hand-held
Programming Console or the CX-Programmer that is operated on a Windows
computer. The CX-Programmer is usually used to write the programs, and the
Programming Console is then used to change the operating modes, edit the programs, and monitor a limited number of points.
106
Section
Programming Devices
3-3
The following table provides a comparison between the CX-Programmer functions and the Programming Console functions.
Function
Programming Console
CX-Programmer
Editing and referencing I/O tables
Yes
Yes
Selecting tasks
Writing
Inputting instructions
programs
Inputting addresses
I/O comment, rung
comment
Setting global/local
symbols
Editing programs
Yes
Yes
Writes instructions one at a time
using mnemonics
Addresses only
No
Writes multiple blocks using
mnemonics or ladder programs
Addresses or symbols
Yes
No
Yes (Automatic allocation of local
symbols)
Yes
Inserts instructions and searches for
program addresses
Checking programs
No
(Cutting, pasting, inserting within
programs; searching/exchanging
instructions, addresses, and symbols;
displaying cross-references)
Yes
Monitoring programs
Monitors in program address units
Monitors multiple blocks
Monitoring I/O memory
Simultaneous, 2 points max.
Monitors multiple points
Changing I/O memory present values
Changes 1 point at a time
Yes
Online editing
Debugging
Changing timer and
counter settings
Control set/ reset
Edits in instruction units
Edits multiple adjacent blocks
Yes
Yes
Executes 1 point at a time (or resets
all at once)
Differentiation monitoring Yes
Reading cycle time
Yes
Data tracing
No
Time chart monitoring
No
Reading error information
Yes (error message display)
Yes
Reading error log
No
Yes
Reading/setting timer information
Yes
Yes
Reading/setting PC parameters
Yes
Yes
Setting CS1 CPU Bus Unit parameters
File memory Initializing Memory Card
operations
Initializing EM file
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Between Host Link and
Network PC
No
Yes
Via modem
No
Yes
Setting password protection
No
Yes
Managing files
No
Manages files by project.
Printing
No
Yes
memory
Transferring files
between CPU Unit and
file memory
Remote
programmin
g and
monitoring
Yes
Yes
Yes
Yes
Yes
107
Section
Programming Devices
3-3
3-3-1 Programming Consoles
There are two Programming Consoles that can be used with the CS1-series
CPU Units: The C200H-PRO27-E and the CQM1-PRO01-E. Both Programming Consoles are shown here.
C200H-PRO27-E Programming Console
LCD area
Mode selector switch
Operation keys
(Install the CS1WKS001 Key Sheet
(See Note.)
CS1W-CN224 (Cable length: 2.0 m)
CS1W-CN624 (Cable length: 6.0 m)
Casette jacks
C200H-PRO27-E
Connect the CPU Unit to the Programming Console with the following cables.
CS1W-CN224 (Cable length: 2.0 m)
CS1W-CN624 (Cable length: 6.0 m)
Note The Key Sheet is not used with CS1-series CPU Units.
C200H-PRO01-E Programming Console
Connection
LCD area
Mode selector switch
Operation keys (Install the
CS1W-KS001 Key Sheet
(See Note.)
CS1W-CN114 (cable length: 0.05 m)
Cable included with CQM1-PRO01-E
Programming Console
CQM1-PRO01-E Programming Console
Connect the CPU Unit to the Programming Console with the following cables.
CS1W-CN114 (Cable length: 0.05 m)
108
Section
Programming Devices
3-3
3-3-2 CX-Programmer
Item
Details
Applicable PC
CS-series, CV-series, C200HX/HG/HE (-Z),
C200HS, CQM1, CPM1, CPM1A, SRM1,
C1000H/2000H
Personal computer
DOS version
OS
Microsoft Windows95 or Windows NT 4.0
Connection method
CPU Unit’s peripheral port or built-in RS-232C
port
Peripheral bus or Host Link
Communications protocol with PC
Offline operation
Programming, I/O memory editing, creating I/O
tables, setting PC parameters, printing,
program changing
Online operation
Transmitting, referencing, monitoring, creating
I/O tables, setting PC parameters
1. Programming: Creates and edits ladder
programs and mnemonic programs for the
applicable PC.
Basic functions
2. Creating and referencing I/O tables.
3. Changing the CPU Unit operating mode.
4. Transferring: Transfers programs, I/O
memory data, I/O tables, PC Setup, and I/O
comments between the personal computer and
the CPU Unit.
5. Program execution monitoring: Monitors I/O
status/present values on ladder displays, I/O
status/present values on mnemonic displays,
and present values on I/O memory displays
Connections
Personal computer
DOS
Peripheral port connection
RS-232C port connection
9-pin male
9-pin
male
9-pin
female
Peripheral port
10-pin female
CS1W-CN118 (0.1 m) (See note 1)
CS1W-CN226 (2.0 m)
CS1W-CN616 (6.0 m)
CS1W-CN118
CS1W-CN226
CS1W-CN616
9-pin
female
10-pin
9-pin
female
RS-232C port
9-pin female
XW2Z-200S-CV/200S-V (See note 2)
XW2Z-500S-CV/500S-V (See note 2)
XW2Z-200SCV/200S-V or
XW2Z-500SCV/500S-V
9-pin
female
9-pin
male
109
Section
Programming Devices
Note
3-3
1. The CS1W-CN118 Cable is used with one of the RS-232C Cables shown on
the right (XW2Z--) to connect to the peripheral port on the CPU
Unit.
Peripheral port
RS-232C Cable
CS1W-CN118 Cable
2. If cables with model numbers ending in -V instead of -CV are used to connect the computer running the CX-Programmer to the RS-232C port (including when using a CS1W-CN118 Cable), a peripheral bus connection cannot
be used. Use a Host Link (SYSMAC WAY) connection. To connect to the
port using a peripheral bus connection, prepare an RS-232C cable as described in 3-3-4 RS-232C Port Specifications.
3. The CX-Programmer can be used for remote programming and monitoring.
It can be used to program and monitor not only the PC to which it is directly
connected, but also to program and monitor any PC connected through a
Controller Link or Ethernet network to which the PC that the CX-Programmer is connected to is a part of. All programming and monitoring functionality for the directly connected PC is supported for remote programming and
monitoring, the PC can be connected though either the peripheral or an
RS-232C port, and either the peripheral bus or Host Link bus can be used.
Remote programming is possible for up to three levels of networks (counting
the local network but not counting the peripheral bus or Host Link connection between the CX-Programmer and the local PC).
CX-Programmer
Peripheral port
or RS-232C port
Peripheral bus
or Host Link
FINS
Remote programming
and monitoring
Controller Link or Ethernet Network
CX-Programmer
Peripheral bus
or Host Link
Bridge
Ethernet Network
Controller Link Network
Controller Link Network
Gateway
110
Section
Programming Devices
3-3
CX-Programmer Connecting Cables
Unit
CPU Units
Unit port
Computer
Built-in
DOS
peripheral
port
D-Sub, 9-pin,
male
Serial
communications
mode
Peripheral Bus or
Host Link
Built-in
RS-232C
port
D-Sub, 9-pin,
male
Peripheral Bus or
Host Link
DOS
Computer
port
D-Sub,
9-pin,
female
Serial
RS-232C
Communications Port
Boards/Units
D-Sub,
9-pin,
female
DOS
D-Sub, 9-pin,
male
Host Link
Model
Length
CS1W-CN226
2.0 m
CS1W-CN626
6.0 m
XW2Z-200S-CV
2m
XW2Z-500S-CV
5m
XW2Z-200S-CV
2m
XW2Z-500S-CV
5m
Cable notes
---
Use a staticresistant connector.
Use a staticresistant connector.
Note Before connecting a connector from the above table to a PC RS-232C port,
touch a grounded metal object to discharge static electricity from your body.
The XW2Z-S-CV Cables have been strengthened against static because
they use a static-resistant connector hood (XM2S-0911-E). Even so, always discharge static electricity before touching the connectors.
RS-232C Cables for a Peripheral Port
Unit
CPU Units
Unit port
Computer
Built-in
DOS
peripheral
port
Computer
port
D-Sub, 9-pin,
male
Serial
communications
mode
Peripheral Bus or
Host Link
Model
CS1W-CN118 +
XW2Z-200S-CV/
500S-CV
Length
0.1 m+
(2 m or
5 m)
Cable notes
XW2Z-
S-CV models
use a static resistant connector
Using a CQM1-CIF01/02 Cable for a Peripheral Port
Unit
CPU Units
Unit port
Computer
Built-in
DOS
peripheral
port
Computer
port
D-Sub, 9-pin,
male
Serial
communications
mode
Host Link
Model
CS1W-CN114 +
CQM1-CIF02
Length
0.05 m +
3.3 m
Cable notes
---
Using a RS-232C Cable for a IBM PC/AT or Compatible
Unit
Unit port
Computer
CPU Units
Built-in
RS-232C
port
DOS
Computer
port
D-Sub, 9-pin,
male
Serial
communications
mode
Host Link
D-Sub,
9-pin,
female
Serial
RS-232C
Communications port
Boards/Units
D-Sub,
9-pin,
female
DOS
D-Sub, 9-pin,
male
Host Link
Model
Length
XW2Z-200S-V
2m
XW2Z-500S-V
5m
XW2Z-200S-V
2m
XW2Z-500S-V
5m
Cable notes
---
111
Section
Programming Devices
3-3
Communications Modes when Connecting a CX-Programmer to a CS1-series CPU Unit
Serial communications
mode
Peripheral Bus
Characteristics
High-speed communications are possible.
Consequently, connecting via a peripheral bus is
recommended when using a CX-Programmer.
Only 1:1 connection is possible.
When using a CS1-series CPU Unit, the baud rate of
the communications devices can be automatically
recognized for connection.
This is a communications protocol with a
general-purpose host computer.
Host Link
Either 1:1 or 1:N connections are possible.
Host Link communications are slow compared with the
Peripheral Bus communications.
The following connections are possible: Via a modem
or optical fiber adapter, over long distance using a
RS-422A/485, and 1:N.
3-3-3 Peripheral Port Specifications
Protocol PC Setup and DIP Switch Settings
Peripheral port settings (in PC Setup)
Pin No. 4
OFF
ON
Default value: 0 Hex
NT Link: 2 Hex
Peripheral bus: 4 Hex
Host Link: 5 Hex
Programming Console or other CX-Programmer through peripheral bus (automatically detects the
Programming Device’s communications parameters)
Host computer or
PT
CX-Programmer
Host computer or
CX-Programmer
CX-Programmer
(NT Link))
(Peripheral bus)
(Host Link)
(Host Link)
3-3-4 RS-232C Port Specifications
Connector Pin Arrangement
Pin No.
112
Signal
Name
Direction
1
FG
Protection earth
---
2
SD (TXD)
Send data
Output
3
RD (RXD)
Receive data
Input
4
RS (RTS)
Request to send
Output
5
CS (CTS)
Clear to send
Input
6
5V
Power supply
---
7
DR (DSR)
Data set ready
Input
8
ER (DTR)
Output
9
SG (0 V)
Data terminal
ready
Signal ground
Connector hood
FG
Protection earth
---
---
Section
Programming Devices
3-3
Connection between CS1-series CPU Unit and Personal Computer
The following connections are in Host Link serial communications mode.
CS1-series
CPU Unit
Personal computer
Pin
Signal No.
Signal
Pin
No.
Shield
RS-232C
interface
RS-232C
interface
D-Sub, 9-pin connector
Male connector on cable
D-Sub, 9-pin connector
Female connector on cable
The following connections are in Peripheral Bus or Host Link serial communications mode.
CS1-series
CPU Unit
Personal computer
Pin
Signal No.
Pin
No.
Signal
RS-232C
interface
RS-232C
interface
D-Sub, 9-pin connector
Male connector on cable
Applicable Connectors
D-Sub, 9-pin connector
Female connector on cable
CPU Unit Connector
Item
Plug
Hood
Model
XM2A-0901
XM2S-0911-E
Specifications
Used together
(One of each
provided with CPU
Unit.)
9-pin male
9-pin, millimeter
screws,
static-resistant
113
Section
Programming Devices
3-3
Personal Computer Connector
Item
Model
Plug
Hood
Specifications
Used together
9-pin female
XM2D-0901
XM2S-0913
9-pin, inch screws
IBM PC/AT or compatible
(9-pin male connector)
CS1-series CPU Unit
Plug: XM2D-0901 (9-pin female)
RS-232C port
Hood: XM2S-0913
Recommended cable
Hood: XM2S-0911-E
Plug: XM2A-0901 (9-pin male)
Provided with CPU Unit
Recommended Cables
Fujikura Ltd.:
UL2464 AWG28
5P IFS-RVV-SB (UL product)
AWG 28
5P IFVV-SB (non-UL product)
Hitachi Cable, Ltd.: UL2464-SB(MA) 5P
28AWG (7/0.127) (UL product)
CO-MA-VV-SB 5P 28AWG (7/0.127) (non-UL product)
RS-232C Port Specifications
Item
Specification
Communications method
Half duplex
Synchronization
Start-stop
Baud rate
Transmission distance
0.3/0.6/1.2/2.4/4.8/9.6/19.2/38.4/57.6/115.2 kbps
(See note.)
15 m max.
Interface
EIA RS-232C
Protocol
Host Link, NT Link, 1:N, No-protocol, or Peripheral
Bus
Note Baud rates for the RS-232C are specified only up to 19.2 kbps. The CS1 Series
supports serial communications from 38.4 kbps to 115.2 kbps, but some computers cannot support these speeds. Lower the baud rate if necessary.
Protocol PC Setup and DIP Switch Settings
RS-232C port settings (in PC Setup)
Pin No. 5
Default value:
NT Link:
0 Hex
OFF
ON
114
2 Hex
Host computer
PT
(Host Link)
(NT Link)
No protocol:
3 Hex
General-purpose
external devices
Peripheral bus:
4 Hex
CX-Programmer
Host Link:
5 Hex
Host computer or
CX-Programmer
(Peripheral bus)
(No protocol)
(Host Link)
CX-Programmer (not a Programming Console) connected through the peripheral bus. (The Programming
Device’s communications parameters are detected automatically.)
Section
Power Supply Units
3-4
3-4
Power Supply Units
3-4-1 Power Supply Units
Power supply
voltage
100 to 120 VAC
or
Output
4.6 A at 5 VDC,
30 W
200 to 240 VAC
(selectable
using jumper)
24 VDC
9 A at 5 VDC,
45 W
4.6 A at 5 VDC,
30 W
Power output
terminals
No
Yes
RUN
output
No
No
Model
C200HW-PA204
C200HW-PA204S
0.8 A at
24 VDC
No
No
Yes
Yes
C200HW-PA204R
C200HW-PA209R
No
No
C200HW-PD024
3-4-2 Components and Switch Settings
POWER indicator
(Lights when 5 V is output
from Power Supply Unit)
External connection terminals
C200HW-PA204
C200HW-PA204S
AC input
AC input
Voltage
selector
Voltage
selector
24 VDC
power
output
C200HW-PA204R
C200HW-PA209R
AC input
AC input
Voltage
selector
Voltage
selector
RUN
output
RUN
output
C200HW-PD024
DC input
RESISTIVE
Note 100 to 120 VAC: Closed circuit
200 to 240 VAC: Open circuit
Always open the circuit (remove the metal jumper) before applying a voltage of
200 to 240 VAC.
AC Input
Either a power supply of 100 to 120 VAC or 200 to 240 VAC can be selected.
Voltage Selector
Before applying a voltage of 100 to 120 VAC, close the circuit using the metal
jumper.
Note Always remove the metal jumper before applying a voltage of 200 to 240 VAC.
Not doing so will damage the Unit.
LG
Ground to a resistance of 100 Ω or less to increase noise resistance and avoid
electric shock.
115
Section
Power Supply Units
3-4
GR
Ground to a resistance of 100 Ω or less to avoid electric shock.
24-VDC Power Output
This terminal outputs a service voltage of 24 VDC. Use this terminal to supply
power to DC Input Units (C200HW-PA204S only). The total current consumption
of the 5-V and 24-V outputs must be 30 W max.
DC Input
24-VDC power is supplied from this terminal.
RUN Output
The internal contact turns ON when the CPU Unit is operating (RUN or MONITOR mode).
Note The L2/N and L1 display on the AC power supply terminal is L1/N and L2 on
some products, however, the function and performance of the terminals are the
same.
3-4-3 Dimensions
C200HW-PA204
C200HW-PA204S
C200HW-PA204R
C200HW-PA209R
C200HW-PD204
C200HW-PA209R
116
Section
Backplanes
3-5
3-4-4 Selecting a Power Supply Unit
After determining what power supply voltage is required and whether power output terminals and a RUN output are required, calculate the current and power
requirements for each Rack.
Condition 1:
Current Requirements
There are three voltage groups for internal power consumption: 5 VDC, 26 VDC,
and 24 VDC.
Current Consumption at 5 VDC (Internal Logic Power Supply)
The following table shows the current that can be supplied to Units (including the
CPU Unit) and Backplanes that use 5-VDC power.
Power Supply Unit
C200HW-PA204/204S/204R
C200HW-PD204
C200HW-PA209R
Maximum current at 5 VDC
4.6 A
9A
Current Consumption at 26 VDC (Relay Driving Power Supply)
The following table shows the current that can be supplied to Units that use
26-VDC power.
Power Supply Unit
C200HW-PA204/204S/204R
C200HW-PD204
C200HW-PA209R
Maximum current at 26 VDC
0.6 A
1.3 A
Current Consumption at 24 VDC (Power Output Terminals)
The C200HW-PA204S Power Supply Unit can supply up to 0.8 A at 24 VDC
through its power output terminals.
Condition 2:
Power Requirements
The following table shows the maximum total power that can be supplied at
5 VDC, 26 VDC, and 24 VDC.
Power Supply Unit
C200HW-PA204/204S/204R
C200HW-PD204
C200HW-PA209R
Maximum total power output
30 W
45 W
Refer to 2-6 Unit Current Consumption for tables showing the current consumed
by each particular Unit as well as example calculations.
3-5
Backplanes
3-5-1 CPU Backplanes
CPU Backplane Models
Number of
slots
2 slots
Model
CS1W-BC023
3 slots
CS1W-BC033
5 slots
CS1W-BC053
8 slots
CS1W-BC083
10 slots
CS1W-BC103
117
Section
Backplanes
3-5
Components and Switch Settings
Unit mounting slot
(for mounting each Unit)
Backplane mounting screws
(4 M4 screws)
Unit connectors
Power Supply Unit connector
CPU Unit connector
Unit lock lever
(Fix each Unit securely. Press down on
the lock lever to remove the Unit)
I/O cable connector
(for connecting a CS1 Expansion Rack
or a C200H Expansion I/O Rack)
Note Always cover the connectors that are not being used with Connector Covers
(sold separately) as a measure against dust.
Name
3-5-2 Dimensions
CS1W-BC023 (2 Slots)
118
Model
C200H Unit Connector Cover
C500-COV01
CS1 Special I/O Unit Connector Cover
CV500-COV01
Section
Backplanes
3-5
CS1W-BC (3, 5, 8, or 10 Slots)
Model
Number of slots
L (mm)
W (mm)
CS1W-BC033
3
246
260
CS1W-BC053
5
316
330
CS1W-BC083
8
421
435
CS1W-BC103
10
491
505
3-5-3 CS1 Expansion Backplanes
CS1 Expansion Backplane Models
Number of slots
Model
3 slots
CS1W-BI033
5 slots
CS1W-BI053
8 slots
CS1W-BI083
10 slots
CS1W-BI103
Components and Switch Settings
Unit mounting slot
(for mounting each Unit)
Backplane mounting screws
(4 M4 screws)
Unit connectors
Power Supply Unit connector
I/O cable connector
(for connecting the following Rack)
Unit lock lever
(Fix each Unit securely. Press down
on the lock lever to remove the Unit)
I/O cable connector
(for connecting the previous Rack)
119
Section
Backplanes
3-5
Note Always cover the connectors that are not being used with Connector Covers
(sold separately) as a measure against dust.
Name
Model
C200H Unit Connector Cover
C500-COV01
CS1 CPU Bus Unit Connector Cover
CV500-COV01
Dimensions
CS1W-BI
Model
Number of slots
L (mm)
W (mm)
CS1W-BI033
3
246
260
CS1W-BI053
5
316
330
CS1W-BI083
8
421
435
CS1W-BI103
10
491
505
3-5-4 C200H Expansion I/O Backplanes
C200H Expansion I/O Backplane Models
Number of slots
Model
3 slots
C200HW-BI033
5 slots
C200HW-BI053
8 slots
C200HW-BI083
10 slots
C200HW-BI103
Components and Switch Settings
Unit mounting slots
(for mounting each Unit)
Backplane mounting screws
(4 M4 screws)
Unit connectors
I/O cable connector
(for connecting the previous Rack:
CPU Rack, CS1 Expansion Rack,
or C200H Expansion I/O rack)
Power Supply Unit connector
Unit lock lever
(Fix each Unit securely. Press down
on the lock lever to remove the Unit)
I/O cable connector
(for connecting the following Rack:
C200H Expansion I/O Rack)
120
Section
Backplanes
3-5
Note Always cover the connectors that are not being used with Connector Covers
(sold separately) as a measure against dust.
Name
Model
C200H Unit Connector Cover
C500-COV01
CS1 CPU Bus Unit Connector Cover
CV500-COV01
Dimensions
C200HW-BI
Model
Width
Number of slots
C200HW-BI031
189
3
C200HW-BI051
259
5
C200HW-BI081
364
8
C200HW-BI101
434
10
Product
Backplane
Insulation Plate
Specifications
Used to electrically
insulate the C200H
Expansion I/O
Rack from the
mounting surface
in the control panel
to improve noise
resistance.
Optional Products
(for C200H
Expansion I/O
Backplane)
Number of slots
Model
3 slots
C200HW-ATT32
5 slots
C200HW-ATT52
8 slots
C200HW-ATT82
10 slots
C200HW-ATTA2
121
Section
Basic I/O Units
3-6
3-6
Basic I/O Units
3-6-1 C200H Basic I/O Units
C200H Basic I/O Units are classified as Basic I/O Units.
Models
Name
Basic Input
Units (with
terminal
blocks)
AC Input Units
Specifications
100 to 120 VAC, 8 inputs
100 to 120 VAC, 16 inputs
200 to 240 VAC, 8 inputs
200 to 240 VAC, 16 inputs
AC/DC Input
Units
DC Input Units
Interrupt Input
Units
High-speed
Input Unit
122
12 to 24 VAC/VDC, 8 inputs
24 VAC/VDC, 16 inputs
12 to 24 VDC, 8 inputs
12 to 24 VDC, 16 inputs
24 VDC, 16 inputs
24 VDC, 16 inputs
12 to 24 VDC, 8 inputs
24 VDC, 16 inputs
Model
C200H-IA121
C200H-IA122
C200H-IA122V
C200H-IA221
C200H-IA222
C200H-IA222V
C200H-IM211
C200H-IM212
C200H-ID211
C200H-ID212
CS1W-ID211
CS1W-INT01
C200HS-INT01
CS1W-IDP01
External
view/dimensions
reference
No.
1
3
3
1
3
3
1
3
1
3
5
5
1
5
Section
Basic I/O Units
Name
C200H
Output
Units (with
terminal
blocks)
Relay Output
Units
Specifications
2 A at 250 VAC/24 VDC max., independent contacts,
5 outputs
2 A at 250 VAC/24 VDC max., independent contacts,
8 outputs
2 A at 250 VAC/24 VDC max., 8 outputs
2 A at 250 VAC/24 VDC max., 12 outputs
2 A at 250 VAC/24 VDC max., 16 outputs
Triac Output
Units
Transistor
Output Units,
Sinking
Transistor
Output Units,
Sourcing
1 A at 250 VAC max., 8 outputs, with fuse burnout
detection circuit
1.2 A at 250 VAC max., 8 outputs, with fuse burnout
detection circuit
0.3 A at 250 VAC max., 12 outputs
0.5 A at 250 VAC max., 12 outputs
2.1 A at 24 VDC, 8 outputs
1 A at 12 to 48 VDC, 8 outputs
0.3 A at 24 VDC, 12 outputs
0.3 A at 24 VDC, 16 outputs
0.5 A at 12 to 24 VDC, 16 outputs
0.8 A at 24 VDC, load short-circuit protection, 8
outputs
0.3 A at 5 to 24 VDC common, 8 outputs
0.3 A at 5 to 24 VDC common, 12 outputs
0.5 A at 24 VDC, load short-circuit protection, 16
outputs
1 A at 24 VDC, load short-circuit protection, 16
outputs
Model
3-6
External
view/dimensions
reference
No.
C200H-OC223
1
C200H-OC224
C200H-OC224V/N
C200H-OC124N
(under development)
C200H-OC221
C200H-OC222
C200H-OC222V
C200H-OC222N
C200H-OC225
C200H-OC226
C200H-OC226N
C200H-OA221
3
3
3
C200H-OA223
2
C200H-OA222V
C200H-OA224
C200H-OD213
C200H-OD411
C200H-OD211
C200H-OD212
CS1W-OD211
C200H-OD214
3
3
1
1
3
3
5
1
C200H-OD216
C200H-OD217
CS1W-OD212
1
3
5
C200H-OD21A
3
1
3
3
3
3
4
4
1
Note Immediate refreshing (!) or refreshing using IORF(097) is possible for all C200H
Basic I/O Units.
123
Section
Basic I/O Units
Optional Products
Name
Model
I/O Unit Cover
Cover for 10-pin terminal
block; 8-point
Input/5-point Output Unit
Terminal Block Covers
Short protection for 10-pin C200H-COV02
terminal block (package of
10 covers); 8 inputs, 8
outputs
Short protection for 19-pin C200H-COV03
terminal block (package of
10 covers); 12 inputs, 12
outputs
Protective cover for
CV500-COV01
unused connectors on
Backplane
CS1 Special I/O Unit
Connector Cover
124
Specifications
C200H-COV11
C200H Unit Connector
Cover
Protective cover for
unused connectors on
Backplane
C200H-COV01
Relay
24 VDC,
C200H-OC221/OC222/O
C223/OC224/OC225
G6B-1174P-FD-US
3-6
Section
Basic I/O Units
3-6
Components and Switch Settings
C200H 10-pin/19-pin Terminal Block
10-pin terminal block
19-pin terminal block
Unit mounting hooks
Hooked onto Backplane to mount Unit.
Model label
I/O indicator
I/O indicator
Terminal block
connector
(10-pin)
Terminal block
connector
(10-pin)
10-pin Terminal Block
Model label
I/O indicator
Terminal block
connector
10-pin Terminal Block (C200H-OA223)
10-pin terminal block
19-pin Terminal Block
(C200H-OC226 19-pin
Terminal Block)
19-pin terminal block
16-point Unit
C200H-ID212,
C200H-IA122,
C200H-IA222,
C200H-IM212,
C200H-IA122V,
C200H-IA222V,
C200H-OD21A,
C200H-OD212,
C200H-OC225,
C200H-OC226N,
C200H-OC226
(illustrated above)
8-point Unit
C200H-ID211,
C200H-IM211,
C200H-IA121,
C200H-IA221,
C200H-OC221,
C200H-OD216
8-point Unit
F indicator (fuse
burnt out)
C200H-OD213,
C200H-OD411,
C200H-OA221,
C200H-OA223
(illustrated above)
8-point Unit
C200H-OD214
12-point Unit
C200H-OC222,
C200H-OC222V,
C200H-OD211,
C200H-OD217,
C200H-OA224,
C200H-OA222V
C200H-OC222N
C200H-OC223
8-point Unit
C200H-OC224,
C200H-224V,
C200H-224N
ALARM indicator
5-point Unit
125
Section
Basic I/O Units
3-6
CS1-series Basic Input Units
(20-pin Terminal Block)
10-pin terminal block
16-point Unit
19-pin terminal block
CS1W-ID211
INT01
IDP01
OD211
ERR
16-point Units
with error
indicator (load
short-circuit)
CS1W-OD212
Dimensions
C200H Units with 10-pin Terminal Blocks
Backplane
C200H-IA121
C200H-IA221
C200H-ID211
C200H-IM211
C200H-OA221
C200H-OC221
C200H-OC223
C200H-OD216
C200H-OD213
C200H-OD411
C200H-OD214
(See note.)
Backplane
C200H-OA223
(See note.)
Note The heights of the Units including the Backplane are 5 mm greater on the CPU
Backplane and CS1 Expansion Backplane (123 and 143 mm).
126
Section
Basic I/O Units
3-6
Units with 19-pin Terminal Blocks
Backplane
C200H-IA122
C200H-IA122V
C200H-IA222
C200H-IA222V
C200H-ID212
C200H-IM212
C200H-OA222V
C200H-OA224
C200H-OC222
C200H-OC222V
C200H-OC224
C200H-OC224V
C200H-OC225
C200H-OD211
C200H-OD212
C200H-OD217
C200H-OD21A
C200H-OC222N
C200H-OC224N
(See Note.)
Terminal Dimensions
Backplane
C200H-OC226
C200H-OC226N
(See Note.)
Note The heights of the Units including the Backplane are 5 mm greater on the CPU
Backplane and CS1 Expansion Backplane (150 and 174 mm).
127
Section
Basic I/O Units
3-6
CS1-series Basic I/O Units (20-pin Terminal Blocks)
Backplane
CS1W-ID211
CS1W-INT01
CS1W-IDP01
CS1W-OD211
CS1W-OD212
Terminal Dimensions
3-6-2 Interrupt Input Units
Interrupt Input Units are used to execute interrupt programs on the rising or falling edge of an input signal (see note). When the specified interrupt input turns
ON (or OFF), execution of the cyclic program in the CPU Unit is interrupted and
an I/O interrupt task (task number 100 to 131) is executed. When execution of
the I/O interrupt task has been completed, the cyclic program is again executed
starting from the instruction after which it was interrupted.
Functions
Note Only the CS1W-INT01 can detect falling edges. The interrupt control instructions, however, can be used to switch between upward and downward differentiation.
Interrupt Input Unit
CPU Unit
1 cyclic task
MSKS(690)
Input
(rising or
falling
edge)
Applicable Units
128
Immediate
interrupt
I/O interrupt task is
executed when the input turns ON (or OFF).
I/O interrupt task
Either of the following Interrupt Input Units can be used.
Section
Basic I/O Units
Model
Specifications
3-6
CS1W-INT01
24 VDC 16 inputs
No. of Units mountable
to CPU Rack
2 max.
C200HS-INT01
24 VDC 8 inputs
4 max.
Application Precautions
All Interrupt Input Units must be mounted to the CPU Rack. The interrupt input
function will not be supported if an Interrupt Input Unit is mounted to an Expansion Rack. If mounted to an Expansion Rack, the Unit can be used as a normal
I/O Unit.
There are limits to the number of Interrupt Input Units that can be mounted. (See
table, above.)
Use only CS1-series or only C200H Interrupt Input Units on the same CPU
Rack. The CS1-series and C200H Interrupt Input Units cannot be used together.
Can be used only with CPU Units with model numbers ending in “-V1,” i.e.,
CS1W-CPU4-V1 or CS1W-CPU6-V1.
The input response time cannot be changed for the CS1W-INT01, and the
related portions of the Basic I/O Unit input time constants in the PC Setup, and
the setting status in A220 to A259 will not be valid.
Use CX-Programmer Version 2.0 or later when using the CS1W-INT01 Interrupt
Input Unit. Earlier versions of CX-Programmer do not support this Unit. (The
Programming Consoles, however, can be used for this Unit.)
Input Signal Width
Input signals must meet the following conditions.
ON
Unit
OFF
ON time
OFF time
CS1W-INT01
0.1 ms min.
0.5 ms min.
C200HS-INT01
0.2 ms min.
0.5 ms min.
129
Section
Basic I/O Units
3-6
Components
CS1W-INT01
Input indicators
C200HS-INT01
Unit lock notch
(fit into the Backplane)
Input indicators
Model label
01
I/O indicator
10-pin Terminal
Block connector
Using I/O Interrupts
1, 2, 3...
1. Mount the Input Interrupt Unit to the CPU Rack and create the I/O tables.
2. Create the I/O task (see note 1).
3. Use the SET INTERRUPT MASK Instruction (MSKS(690)) in the cyclic program to enable the required interrupt input numbers (see note 1).
4. Turn ON or OFF the inputs on the Interrupt Input Unit for the interrupt input
numbers that have been enabled.
Note
1. The relationship between Interrupt Input Unit numbers, interrupt input numbers, and I/O interrupt tasks is shown in the following table.
Model
CS1W-INT01
C200HS-INT01
Interrupt Input
Unit number
0
1
0
1
2
3
Interrupt input
number
0 to 15
0 to 7
I/O interrupt task
number
100 to 115
116 to 131
100 to 107
108 to 115
116 to 123
124 to 131
2. The CS1W-INT01 can set to detect either rising or falling edges.
130
Section
Basic I/O Units
3-6
MSKS(690) Instruction
Specifying Rising/Falling Edge for CS1W-INT01
MSKS(690)
N:
Control data 1 (Interrupt Input Unit No.)
S:
Control data 2 (rising/falling edge designations)
The MSKS(690) instruction is used to set rising edge or falling edge detection for
each interrupt input number.
• The value of N will determine which Interrupt Input Unit will perform the I/O interrupt processing.
• The value of S will determine rising or falling edge detection for each interrupt
input number.
Operand
N
Value
CS1WINT01
2, 3
Details
C200HSINT01
---
Interrupt Input Unit Number
Numbers 2 and 3 are assigned to the Units in
order from left to right.
2: Interrupt Input Unit 0 (interrupt task
numbers 100 to 115)
3: Interrupt Input Unit 1 (interrupt task
numbers 116 to 131)
S
0000 to
FFFF Hex
---
Rising/Falling Edge Designation
Bits 00 to 15 correspond to the interrupt input
numbers (interrupt tasks 100 to 115 or 116 to
131).
0: Rising edge
1: Falling edge
Specifying I/O Interrupt Processing
MSKS(690)
N:
Control data 1 (Interrupt Input Unit No.)
S:
Control data 2 (interrupt mask data)
The MSKS(690) instruction is used to set I/O interrupt processing or scheduled
interrupt processing.
• The value of N will determine which Interrupt Input Unit will perform the I/O interrupt processing.
• The value of S will determine which interrupt number will be enabled.
131
Section
Basic I/O Units
Operand
N
Value
CS1WINT01
0, 1
C200HSINT01
0 to 3
3-6
Details
Interrupt Input Unit Number
Numbers are assigned to the Units in order
from left to right.
CS1W-INT01 (unit numbers 0 and 1)
0: Interrupt Input Unit 0 (interrupt task
numbers 100 to 115)
1: Interrupt Input Unit 1 (interrupt task
numbers 116 to 131)
CS1W-INT01 (unit numbers 0 to 3)
0: Interrupt Input Unit 0 (interrupt task
numbers 100 to 107)
1: Interrupt Input Unit 1 (interrupt task
numbers 108 to 115)
2: Interrupt Input Unit 2 (interrupt task
numbers 116 to 123)
S
0000 to
FFFF Hex
0000 to
00FF Hex
3: Interrupt Input Unit 3 (interrupt task
numbers 123 to 131)
Interrupt Mask Data
Bits 00 to 15 for the CS1W-INT01 and the
rightmost 8 bits for the C200H-INT01are used
for the Interrupt Input Unit’s interrupt input
number.
1: Interrupt masked
(interrupt input disabled)
0: Interrupt valid
(interrupt input enabled)
132
Section
Basic I/O Units
3-6
Dimensions
CS1W-INT01
Backplane
C200HS-INT01
(See Note.)
Note The height of the Unit including the Backplane is 5 mm greater on the CPU Backplane and CS1 Expansion Backplane (123 mm).
3-6-3 Units with High-speed Inputs
The CS1W-IDP01 enables inputting pulse signals that are shorted than the
cycle time of the CPU Unit. C200H High-density I/O Units (Special I/O Units)
also supported high-speed inputs.
Functions
I/O Units with High-speed
Inputs
Model
Name
Specifications
CS1W-IDP01
High-speed Input Unit
24 VDC, 16 inputs
C200H-ID501
TTL Input Unit
5 VDC, 32 inputs
C200H-ID215
DC Input Unit
24 VDC, 32 inputs
C200H-MD501
TTL I/O Unit
DC Input/Transistor
Output Unit
5 VDC,16 inputs/16 outputs
C200H-MD115
C200H-MD215
12 VDC,16 inputs/16 outputs
24 VDC,16 inputs/16 outputs,
Note Refer to 3-7 C200H High-density I/O Units for details on C200H High-density I/O
Units
133
Section
Basic I/O Units
3-6
Components
CS1W-IDP01
Input indicators
Input Signal Width
High-speed input signals must meet the following conditions for the ON time.
ON time
Model
Dimensions
134
ON time
CS1W-INT01
0.1 ms min.
C200H-ID501/215
C200H-MD501/215/115
1.0/4.0 ms min. (switchable)
The High-speed Input Unit has the same dimensions as the Interrupt Input Unit.
Refer to page 133.
Section
Basic I/O Units
3-6
3-6-4 CS1 Basic I/O Units with Connectors (32-, 64-, and 96-pt Units)
CS1 Basic I/O Units are classified as Basic I/O Units (in the CS1 Basic I/O Unit
sub-group).
Models
Name
DC Input Unit
Transistor Output Unit,
Sinking
Transistor Output Unit,
Sourcing
DC Input/Transistor
Output Unit, Sinking
DC Input/Transistor
Output Unit, Sourcing
Specifications
Model
24 VDC, 32 inputs
24 VDC, 64 inputs
24 VDC, 96 inputs
0.5 A at 12 to 24 VDC, 32 outputs
0.3 A at 12 to 24 VDC, 64 outputs
0.1 A at 12 to 24 VDC, with fuse
burnout detection circuit, 96 outputs
0.5 A at 24 VDC, load short-circuit
protection, 16 outputs
0.5 A at 24 VDC, load short-circuit
protection, 32 outputs
0.3 A at 24 VDC, load short-circuit
protection, 64 outputs
0.1 A at 24 VDC, with fuse burnout
detection circuit, 96 outputs
24 VDC input, 0.3 A output at 12 to
24 VDC, 32 inputs/32 outputs
24 VDC input, 0.1 A output at 12 to
24 VDC, with fuse burnout detection
circuit, 48 inputs/48 outputs
CS1W-ID231
CS1W-ID261
CS1W-ID291
CS1W-OD231
CS1W-OD261
CS1W-OD291
24 VDC input, 0.3 A output at 24 VDC,
load short-circuit protection, 32
inputs/32 outputs
CS1W-MD262
24 VDC input, 0.1 A output at 24 VDC,
with fuse burnout detection circuit, 48
inputs/48 outputs
CS1W-MD292
CS1W-OD212
CS1W-OD232
CS1W-OD262
CS1W-OD292
CS1W-MD261
CS1W-MD291
135
Section
Basic I/O Units
3-6
Note Immediate refreshing (!) or refreshing using IORF(097) is possible for CS1 Highdensity I/O Units.
Unit mounting hooks
Hooked onto Backplane to
mount Unit.
Model label
I/O indicators
Display Switch
for 64-point I/O Units
56-pin I/O wiring
connectors
2
Area 1
Area 2
Unit lock notch
(Attach Unit to Backplane
and fix securely)
32-point Units
CS1W-ID231
CS1W-OD231
32-point Units with ERR indicator
(load short-circuit indicator)
CS1W-OD232
64-point Units
CS1W-ID261
CS1W-OD261
CS1W-MD261
62-point Units with ERR indicator
(load short-circuit indicator)
CS1W-OD262
CS1W-MD262
Display Switch
for 96-point I/O Units
Display switch (3-level selection)
Display switch
0, 1
2, 3
4, 5
Area 1
m
m+2
m+4
Area 2
m+1
m+3
m+5
CS1W-ID291/OD291/OD292/MD291/MD292
F (fuse burnt out) indicator
• Available on Output Units.
• Lights when one or more fuses in the Unit blows.
• Lights when external power is OFF.
136
Display switch
0, 1
2, 3
m
m+2
m+1
m+3
Section
Basic I/O Units
3-6
Dimensions
Indicator switch
Indicator switch
Units with Two
40-pin connectors
CS1W-ID261
CS1W-0D261
CS1W-OD262
CS1W-MD261
CS1W-MD262
Units with 56-pin
connectors
CS1W-ID291
CS1W-OD291
CS1W-OD292
CS1W-MD291
CS1W-MD292
Using Pressure-welded Connector
Connecting Cables:
G79-C--
XW2Z-
Backplane
Using Soldered or Crimped Connector
Backplane
Units with One
40-pin connector
CS1W-ID231
CS1W-0D231
CS1W-0D232
123
123
Approx. 169 for 32- and 64-pt Units
Approx. 179 for 96-pt Units
150
137
Section
Basic I/O Units
3-6
3-6-5 C200H Group-2 High-density I/O Units
C200H Group-2 High-density I/O Units are classified as Basic I/O Units.
Models
Name
Specifications
DC Input
Unit
Transistor
Output Unit
Note
Model
Appearance
/dimensions
reference No.
Specifications
page
24 VDC, input
current: 4.1 mA
typical, 32 inputs
C200H-ID216
1
644
24 VDC, input
current: 6 mA
typical, 32 inputs
C200H-ID218
1
646
12 VDC, 64 inputs C200H-ID111
24 VDC, input
C200H-ID217
current: 4.1 mA
typical, 64 inputs
2
2
647
650
24 VDC, input
current: 6 mA
typical, 64 inputs
C200H-ID219
2
651
16 mA at 4.5 V to
100 mA at 26.4 V,
32 outputs
C200H-OD218
1
676
16 mA at 4.5 V to
100 mA at 26.4 V,
64 outputs
C200H-OD219
2
679
24 VDC, 0.5 A,
sourcing, 32
inputs
C200H-OD21B
1
694
1. C200H Group-2 High-density I/O Units cannot be mounted to SYSMAC
BUS Slave Racks.
2. Immediate refreshing (!) is not possible for C200H Group-2 High-density I/O
Units, but refreshing using IORF (097) is possible for these Units.
Components and Switch Settings
Unit mounting hooks
Hooked onto Backplane to mount Unit.
Model label
Model label
I/O indicators
I/O No. setting switch
I/O indicators
I/O No. setting switch
(Cannot be used with
the CS1-series)
Indicator selector switch
(Cannot be used with
the CS1-series)
40-pin I/O wiring
connector
2
I/O wiring connector
1. Units with One 40-pin Connector
(Select whether the I/O
indicator is CN1 or CN2.)
2. Units with Two 40-pin Connectors
Note The I/O number setting switch on the front panel of C200H Group-2 High-density
I/O Units is not used for the CS1 Series, i.e., the I/O number setting will not affect
allocations. Words are allocated to the Units according to their position on the
Rack in the same way as for Basic I/O Units.
138
Section
Basic I/O Units
Units with One 40-pin Connector
3-6
Units with Two 40-pin Connectors
32-point Unit
C200H-ID216
64-point Unit
C200H-ID111
C200H-ID217
32-point Unit
C200H-OD218
64-point Unit
C200H-OD219
F (fuse burnt out)
indicator
F (fuse burnt out)
indicator
Dimensions
1. Units with 40-pin
Connector
2. Units with Two 40-pin
Connectors
Backplane
Unit Dimensions with Backplane and Connector
(See Note.)
Approx. 143 (See Note.)
Note The height of the Unit including the Backplane is 5 mm greater on the CPU Backplane and CS1 Expansion Backplane (123 and 148 mm).
139
Section
C200H High-density I/O Units
3-7
3-7
C200H High-density I/O Units
C200H High-density I/O Units are classified as C200H Special I/O Units and
have the following functions.
Dynamic I/O Mode
The High-density I/O Units (other than the C200H-ID501 and C200H-ID215)
can provide high-density I/O rather than the normal output (static output mode)
and I/O (static I/O mode). High-density I/O (dynamic output and dynamic input
modes: 128 points) is achieved by combining the I/O signals with a strobe signal
output. The High-density I/O Units require less wiring, use a numeric display device in dynamic output mode with large number capacity, and use keyboard
switches in dynamic input mode.
High-speed Inputs
The High-density I/O Units (other than the C200H-OD501 and C200H-OD502)
also provide high-speed inputs. High-speed inputs are possible with 8 input
points. This function enables accurate reading of short pulse inputs from photomicroswitches and other devices.
C200H High-density I/O Units
Name
Specifications
Model
Dynamic I/O mode
Static I/O mode
TTL Input Unit
5 VDC, 32 inputs
C200H-ID501
---
High-speed inputs
DC Input Unit
24 VDC, 32 inputs
C200H-ID215
---
High-speed inputs
TTL Output Unit
5 VDC, 32 outputs
C200H-OD501
128 outputs
---
Transistor Output Unit
24 VDC, 32 outputs
C200H-OD215
128 outputs
---
TTL I/O Unit
5 VDC, 16 inputs/16
outputs
12 VDC, 16 inputs/16
outputs
24 VDC, 16 inputs/16
outputs
C200H-MD501
128 inputs
High-speed inputs
C200H-MD115
128 inputs
High-speed inputs
C200H-MD215
128 inputs
High-speed inputs
DC Input/Transistor
Output Unit
Note Immediate refreshing (!) is not possible for C200H High-density I/O Units (classified as Special I/O Units), but refreshing using IORF (097) is possible for these
Units.
Components and Switch Settings
Unit lock notch
Model label
I/O indicators
Unit number setting switch
24-pin I/O wiring
connectors
2
Note
Set the unit number between 0 and
9. Ten words are allocated per Unit
in the Special I/O Unit Area (words
2000 to 2959) according to the unit
number setting.
1. Be sure to turn OFF the power supply before setting the unit number.
2. Set the unit number using a flat-blade screwdriver.
3. Do not stop in the middle of setting the value (between 0 and 9) or the setting
will not be complete.
140
Section
C200H High-density I/O Units
3-7
4. Make sure that the groove in the unit number setting switch does not become damaged.
Model
RUN mode
High-speed
inputs
SW1
SW2
ON
OFF
HighNormal
speed
input
input
function
enabled
ON
High-speed input
minimum
response pulse
Normal input
response time
SW3
OFF
1 ms
Normal
input
4 ms
SW4
ON
SW5
C200H-ID501
---
OFF
---
C200H-ID215
---
---
C200H-OD501
128
32 static --dynamic outputs
outputs
---
---
---
---
---
Positive
logic
output
(See
Note.)
Negative logic output
(See
Note.)
C200H-OD215
128
32 static --dynamic outputs
outputs
---
---
---
---
---
Positive
logic
output
(See
Note.)
Negative logic output
(See
Note.)
C200H-MD501
128
16 static
dynamic inputs,
inputs
16 static
outputs
Highspeed
input
function
enabled
Normal
input
4 ms
1 ms
15 ms
max.
2.5 ms
max.
---
---
C200H-MD115
128
16 static
dynamic inputs,
inputs
16 static
outputs
Highspeed
input
function
enabled
Normal
input
4 ms
1 ms
15 ms
max.
2.5 ms
max.
---
---
C200H-MD215
128
16 static
dynamic inputs,
inputs
16 static
outputs
Highspeed
input
function
enabled
Normal
input
4 ms
1 ms
15 ms
max.
2.5 ms
max.
---
---
Highspeed
input
function
enabled
ON
4 ms
Dynamic data
output logic
---
OFF
---
ON
15 ms
max.
OFF
2.5 ms
max.
1 ms
---
---
15 ms
max.
2.5 ms
max.
Note Negative and positive logic output are only available with 128-point dynamic output mode.
141
Section
C200H High-density I/O Units
3-7
Dynamic I/O Mode
Dynamic Output Mode
C200H-OD501/OD215
Data output
:
Numeric display
:
Strobe output
:
:
Data output
:
Numeric display
:
Strobe output
:
:
By combining data signals (DATA 0 to 7 and DATA 8 to 15) with strobe signals
(STB 0 to 7/ STB 8 to 15, 128 bits (8 words) can be output to a numerical display
device as shown in the following diagram.
Word n
Word n
Word n + 1
Word n + 3
Rightmost
byte
Leftmost
byte
Rightmost
byte
Leftmost
byte
Data output
DATA 0 to 7
Strobe output
STB 0
STB 1
STB 2
to
STB 7
DATA 8 to 15 can also be output as STB 8 to 15 at the same time.
142
Section
C200H High-density I/O Units
3-7
Dynamic Input Mode
C200H-MD501/MD115/MD215
Keyboard switch,
thumbwheel
switch, etc.
Strobe
output
Data input
Strobe
output
Keyboard switch,
thumbwheel
switch, etc.
Data input
Using strobe signals STB 0 to 7 as outputs, data signals DATA 0 to 7 as inputs,
strobe signals STB 8 to 15 as outputs, and data signals DATA 8 to 15 as inputs,
128 bits (8 words) can be input from strobe input keyboard switches or thumbwheel switches as shown in the following diagram.
Word n
Word n
Word n + 1 Word n + 3
Rightmost
bytes
Leftmost
bytes
Rightmost
bytes
Leftmost
bytes
Data input
DATA 0 to 7
Strobe output
STB 0
STB 1
STB 2
to
STB 7
DATA 8 to 15 can also be output as STB 8 to 15 at the same time.
143
Section
C200H High-density I/O Units
3-7
High-speed Inputs
The inputs 8 to 15 from the CN2 connector can be used for pulse input. The minimum pulse width is 1 ms or 4 ms (selectable).
A High-density I/O Unit will recognize a pulse input when the pulse input occurs
(i.e., the inputs turns ON and then OFF again), and the pulse width is greater
than 1 ms or 4 ms (according to the selected minimum pulse width). The data is
refreshed in the Special I/O Unit Area (word n + 1, bits 8 to 15) of I/O memory
during the CPU Unit’s I/O refresh period.
High-density I/O Unit
CPU Unit
I/O refresh
1 ms or 4 ms
+
High-speed
input buffer
The High-density I/O Unit data in the high-speed input buffer can also be refreshed during program execution by executing the IORF(097) instruction for
the desired Special I/O Unit.
High-density I/O Unit
CPU Unit
I/O refresh
1 ms or 4 ms
144
High-speed
input buffer
+
+
Section
Standard B7A Interface Unit C200H-B7AI1/B7AO1
3-8
Backplane
Dimensions
Fujitsu connection
cable
123
Backplane
Approx. 168
G79-C Connecting Cable
123
150
3-8
Standard B7A Interface Unit C200H-B7AI1/B7AO1
The Standard B7A Interface Unit used with the B7A Link Terminal allows the
transmission and reception of 16-point I/O data over two wires.
The following Standard B7A Interface Unit and B7A Link Terminal models are
available.
B7A Interface Unit
16-point input: C200H-B7AI1
16-point output: C200H-B7AO1
B7A Link Terminals
B7A-T61 (Screw terminal models)
B7A-T6D2 (Modular models)
B7A-R61 (Screw terminal models)
B7A-R6A52 (Modular models)
Note If the B7A Interface Unit is mounted to a Rack with a C200HW-PD024 24-VDC
Power Supply Unit, supply 24 VDC from an independent power supply to the
B7A Interface Unit or use a transformer to separate the power supply line to the
B7A Interface Unit from the power supply lines to the CPU Unit and I/O Power
Supply Unit.
145
Section
Standard B7A Interface Unit C200H-B7AI1/B7AO1
3-8
I/O indicator
ERR indicator
Connection terminals
Connection terminals for the B7A Link Terminal:
Connect this terminal to the SIG terminal of the
B7A Link Terminal.
Connect this terminal to the negative power terminal of the B7A Link Terminal.
Supply 12 to 24 VDC.
12 to 24 VDC
I/O Indicator
Indicates the ON or OFF status of input from the B7A Link Terminal or the ON
and OFF status of output to the B7A Link Terminal.
ERR Indicator
Incorporated by the B7AI1 and lit when the B7AI1’s data transmission or reception is abnormal.
Connection Terminals
SIG:
V–:
! Caution
Note
Input Mode Selector
Connects to the SIG terminal of the B7A Link Terminal.
Connects to the negative power terminal of the B7A Link Terminal.
If the terminals are not connected correctly, the internal circuitry of the B7A Link
Terminal will be damaged.
1. The transmission cable must be a VCTF cable with a thickness of 0.75 mm2
minimum.
2. Do not wire power lines or high-tension lines along with the transmission
cable in the same conduit.
The B7AI1 incorporates an input mode selector on the back panel of the Unit,
with which the following modes can be set.
Input mode
15 points + 1 error
16 points
Function
Fifteen-point input from the B7A Link
Terminal is effective. Bit 15 is used as
transmission error bit.
Sixteen-point input from the B7A Link
Terminal is effective.
Switch setting
Bit no.
allocation
Upper side
Lower side
00 to 14
15
Status of input indicator lamp 15
Status of the ERR indicator
Input 00 to input 14
Transmission error bit
Not used
Input 00 to input 14
Input 15
Lit when input 15 is ON. Not lit when
input 15 is OFF.
Lit when there is a transmission error and OFF during normal transmission
The ERR indicator is lit when an error occurs. If the error is corrected, the ERR
indicator is OFF at the next transmission cycle.
When there is a transmission error, the B7A Link Terminal will hold the data just
before the occurrence of the transmission error. If there is a transmission error
because the B7A Link Terminal is turned off, however, data 0 is transmitted in the
first transmission cycle when the B7A Link Terminal is turned on again.
Transmission errors between the C200H-B7AO1 and B7A Link Terminal are detected by the B7A Link Terminal only. Check the ERR indicator and error bit for
any error.
146
Section
Group-2 B7A Interface Units (C200H-B7Ajj)
3-9
Performance Specifications
Item
C200H-B7AI1
I/O points
C200H-B7AO1
Transmission distance
16 points or 15 points and 1 error
16 output points
input
500 m max. if power is supplied to the Interface Unit and B7A Link Terminal
separately.
100 m max. if power is supplied to the Interface Unit and B7A Link Terminal
from a single power supply. (24 VDC±10%)
Transmission delay
Typ. 19.2 ms, 31 ms max.
Minimum input time (see note 1)
–––
Internal current consumption
5 VDC, 100 mA max.
External power supply (see note 2)
12 to 24 VDC ±10%, 10 mA min.
Weight
200 g max.
Note
3-9
16 ms
12 to 24 VDC ±10%, 30 mA min.
1. The minimum input time refers to the minimum time required for reading the
input signals from the CPU Unit. The ON/OFF width of the signal transmitted
from the CPU Unit to the Output Relay of the B7A Interface Unit should be
set to a value larger than the minimum input time.
2. The value of the external power supply does not include the value required
by the B7A Link Terminal.
Group-2 B7A Interface Units (C200H-B7A)
A Group-2 B7A Interface Unit used with two or four B7A Link Terminals allows
the transmission and reception of 32-point or 64-point I/O data over two-conductor cables.
Group-2 B7A Interface Unit
CPU
Unit
Input B7A Link Terminal
Sensor
Transmission
distance: 500 m
max.
Switch
Output B7A Link Terminal
Lamps and other loads
Group-2 B7A Interface Units can be mounted to a CPU Rack or an Expansion
I/O Rack. They cannot be mounted to Slave Racks.
The words allocated to Group-2 B7A Interface Units are determined by I/O number set on the Units. Units with 32 I/O points are allocated two words; Units with
64 I/O points are allocated four words.
147
Section
Group-2 B7A Interface Units (C200H-B7Ajj)
3-9
Refer to the B7A Link Terminals Datasheet for more information on B7A Link Terminals.
3-9-1 Models
The following Group-2 B7A Interface Units are available.
B7A Interface Unit
Inputs
Outputs
C200H-B7A12
32 points
None
C200H-B7A02
None
32 points
C200H-B7A21
16 points
16 points
C200H-B7A22
32 points
32points
3-9-2 Connectable B7A Link Terminals
Only 16-point B7A Link Terminals can be connected to a B7A Interface Unit.
These are listed in the following tables.
Input Terminals
Type
Screw terminals
Modular
PC connectors
Output Terminals
Type
Screw terminals
Modular
PC connectors
Note
Model
B7A-T61
B7AS-T61
B7A-T66
B7AS-T66
B7A-T6D2
B7A-T6D7
B7A-TE3
B7A-TE8
Model
B7A-R61
B7AS-R61
B7A-R66
B7AS-R66
B7A-R6A52
B7A-R6A57
B7A-RA3
B7A-RA8
Transmission delay
Standard (19.2 ms)
High-speed (3 ms)
Standard (19.2 ms)
High-speed (3 ms)
Standard (19.2 ms)
High-speed (3 ms)
Transmission delay
Standard (19.2 ms)
High-speed (3 ms)
Standard (19.2 ms)
High-speed (3 ms)
Standard (19.2 ms)
High-speed (3 ms)
1. Do not connect Terminals with different transmission delays to the same Interface Unit. Doing so will cause a transmission error.
2. Only 16-point or 32-point B7A Link Terminals can be connected to B7A Interface Units. Mixed I/O B7A Link Terminals and 10-point B7A Link Terminals cannot be connected.
3-9-3 Comparison between Standard and Group-2 B7A Interface Units
Type
Standard
Models
C200H-B7AI1
C200H-B7AO2
Group 2
C200H-B7A12
C200H-B7A02
C200H-B7A21
C200H-B7A22
148
Word allocations
Same as I/O Units (in order
mounted).
Words 030 to 049 allocated
according to I/O number setting
(same as Group-2 High-density I/O
Units)
Connectable B7A Link Terminals
Transmission Transmission
Points
delay
errors
Standard
Input status
16-point
types only
held
Terminals only
(19.2 ms)
automatically
(10-point,
32–point, and
Standard
Switch setting
mixed I/O
(19.2 ms) and to hold or
Terminals cannot
high-speed
reset Input
be connected.
(3 ms) types
status.
(set via
switch)
Section
Group-2 B7A Interface Units (C200H-B7Ajj)
3-9
Note Words CIO 0030 to CIO 0049 are allocated to Group-2 B7A Interface Units
according to the setting of the I/O number switch on the front panel of the
Unit as shown in the following table. For Mixed I/O Units, output words are
allocated first, and then input words.
Unit
Model
Words
allocated
per Unit
32-point
C200H-B7A12
Input Unit
32-point
C200H-B7A02
Output Unit
16-point
C200H-B7A21
Input/
16-point
Output Unit
2
32-point
C200H-B7A22
Input/
32-point
Output Unit
4
Order of
allocation
Examples for I/O
number 0
2 words for
inputs
2 words for
outputs
1 word for
outputs then 1
word for inputs
CIO 0030: Inputs
2 word for
outputs then 2
word for inputs
CIO 0030: Outputs
CIO 0030: Outputs
CIO 0030: Outputs
CIO 0031: Inputs
CIO 0031: Outputs
CIO 0032: Inputs
CIO 0033: Inputs
3-9-4 Parts and Names (C200H-B7A22 shown below)
Front
I/O number switch
This switch determines the words allocated to the
Unit.
Status indicators
The indicators depend on the model of B7A Interface Unit.
Connection terminals
Connect to the SIG terminal of the B7A Link Terminal
and to the negative power terminal of the B7A Link
Terminal. The actual use of these terminals depends
on the B7A Interface Unit.
External Power Supply Terminals
Supply 12 to 24 VDC.
12
VDC
12toto2424
VDC
149
Section
Group-2 B7A Interface Units (C200H-B7Ajj)
3-9
Back
DIP switch
Used to set the transmission delay,
transmission error processing mode, input mode, and ERROR indicator operation.
3-9-5 Indicator Operation
The indicators depend on the model of B7A Interface Unit, as shown below.
Name
Color
Function
ERROR 1
ERROR 2
ERROR
Input
transmission
error
Red
Lights when an error occurs in transmissions from an Input B7A Link Terminal.
For the B7A12/22, ERROR 1 is for the first word allocated to the B7A Interface
Unit; ERROR 2 is for the second word.
3ms
Transmission
delay setting
Orange
Lit when the transmission delay is set to the high-speed setting (3 ms).
LOAD OFF
Transmission
error process
Orange
15IN+ERR
Input mode
setting
Orange
Not lit when the transmission delay is set to the standard setting (19.2 ms).
Lit when the processing for transmission errors is set to reset input status.
Not lit when the processing for transmission errors is set to hold input status.
Lit when the input mode mode is set to use 15 inputs and 1 error input.
Not lit when the input mode mode is set to use 16 inputs.
3-9-6 I/O Number Setting
The setting of the I/O number determines the words allocated to the Interface
Unit. Set the I/O number to between 0 and 9.
Setting in direction
of notch
Note
150
1. Turn off the power supply to the PC before changing the I/O number setting.
Any new setting will not be effective until the next time the power supply is
turned on.
Section
Group-2 B7A Interface Units (C200H-B7Ajj)
3-9
2. Use a flat-blade screw driver to change the I/O number setting. Be careful
not to leave the switch halfway between settings and be careful not to damage the switch.
The following table shows the words allocated according to the I/O number. The
32-point Units are the C200H-B7A12, C200H-B7A02, and C200H-B7A21. The
64-point Unit is the C200H-B7A22.
Words
I/O No.
Note
0
32-point Units
IR 030 and IR 031
64-point Unit
IR 030 to IR 033
1
IR 032 and IR 033
IR 032 to IR 035
2
IR 034 and IR 035
IR 034 to IR 037
3
IR 036 and IR 037
IR 036 to IR 039
4
IR 038 and IR 039
IR 038 to IR 041
5
IR 040 and IR 041
IR 040 to IR 043
6
IR 042 and IR 043
IR 042 to IR 045
7
IR 044 and IR 045
IR 044 to IR 047
8
IR 046 and IR 047
IR 046 to IR 049
9
IR 048 and IR 049
Do not use.
1. Be sure that the same words are not allocated to more than one Unit. For
example, if you set a 64-point Unit to I/O number 0, you cannot use I/O number 1 for any Unit.
2. The above words are also allocated to Group-2 High-density I/O Units. Be
sure that the same words are not allocated to more than one Unit.
3-9-7 DIP Switch Settings
Set the DIP switch as described before for the various models of B7A Interface
Units.
C200H-B7A22/12
Pin
Factory setting
(pins 4 and 5 ON)
Function
OFF
ON
1
Transmission delay
Standard (19.2 ms)
High-speed (3 ms)
2
Transmission error process
Hold status
Reset Inputs
3
Input mode
16 inputs
15 inputs + error input
4
ERROR 1 indicator enable
Disabled
Enabled
5
ERROR 2 indicator enable
Disabled
Enabled
6
Not used.
NA
NA
C200H-B7A21
Pin
Factory setting
(pin 5 ON)
Function
OFF
ON
1
Transmission delay
Standard (19.2 ms)
High-speed (3 ms)
2
Transmission error process
Hold status
Reset Inputs
3
Input mode
16 inputs
15 inputs + error input
4
ERROR indicator enable
Disabled
Enabled
5
Not used.
NA
NA
6
Not used.
NA
NA
151
Section
Group-2 B7A Interface Units (C200H-B7Ajj)
3-9
C200H-B7A02
Pin
Factory setting
(all pins OFF)
Transmission Delay
Function
OFF
ON
1
Transmission delay
Standard (19.2 ms)
High-speed (3 ms)
2
Not used.
NA
NA
3
Not used.
NA
NA
4
Not used.
NA
NA
5
Not used.
NA
NA
6
Not used.
NA
NA
Pin 1 is used to set the transmission delay. The same delay is used for all words
allocated to the Unit.
Set the transmission delay to match that of the B7A Link Terminal. A transmission error will occur if the same transmission delay is not set.
The “3ms” indicator will be lit whenever the high-speed (3 ms) transmission
delay is set.
Transmission Error
Process
Pin 2 is used to turned ON to specify resetting input status when transmission
errors occur. If pin 2 is turned OFF, input status will be held when transmission
errors occur.
The LOAD OFF indicator will be lit whenever pin 2 is turned ON.
Input Mode
Pin 3 is turned ON to specify use of only 15 inputs and the use of bit 15 as a
Transmission Error Flag. If pin 3 is OFF, 16 normal inputs can be used.
The “15IN+ERR” indicator will be lit whenever pin 3 is turned ON.
ERROR Indicators
Pin 4 or pins 4 and 5 are turned ON to enable the ERROR, ERROR 1, and/or
ERROR 2 indicators. These indicators will not light even if a transmission error
occurs if the corresponding pin is turned OFF.
Transmission Error Precautions
Startup
The Transmission Error Flag for the B7A Interface Unit will be OFF when power
is turned on to the CS1. If normal transmissions with the B7A Link Terminal are
not possible within about 10 ms, the Transmission Error Flag (bit 15) will turn ON
(i.e., if its operation is enabled by the input mode setting).
All input bits will remain OFF until normal transmissions are achieved.
Inputs
When a transmission error occurs, input status will be either held or all inputs will
be reset according to the setting for the transmission error process, and the
Transmission Error Flag (bit 15) will turn ON (i.e., if its operation is enabled by the
input mode setting). The Transmission Error Flag will go OFF and the input status will return to normal when normal transmissions are achieved again.
Outputs
Transmission errors for Output B7A Link Terminals are not detected at the B7A
Interface Unit and must be confirmed using the error indicators or error outputs
on the Link Terminal.
3-9-8 Wiring
Terminal Names and Allocations
The use of the terminals depends on the model of the B7A Interface Unit. “m”
indicates the first word allocated to the Unit according to the I/O number setting
and can be calculated as follows:
m = 030 + (2 x I/O number)
152
Section
Group-2 B7A Interface Units (C200H-B7Ajj)
3-9
C200H-B7A22
Terminal
C200H-B7A21
C200H-B7A12
Name
Function
B0
B1
SIG OUT1
– OUT1
B2
B3
SIG OUT2
– OUT2
B4
B5
SIG IN1
– IN1
B6
B7
SIG IN2
– IN2
B8
A0 to A7
B9
A8
NC
Connect to SIG terminal on Output B7A Link Terminal.
Connect to – power supply terminal on Output B7A Link
Terminal.
Connect to SIG terminal on Output B7A Link Terminal.
Connect to – power supply terminal on Output B7A Link
Terminal.
Connect to SIG terminal on Input B7A Link Terminal.
Connect to – power supply terminal on Input B7A Link
Terminal.
Connect to SIG terminal on Input B7A Link Terminal.
Connect to – power supply terminal on Input B7A Link
Terminal.
Not used.
+V
–V
Connect to + terminal on external power supply.
Connect to – terminal on external power supply.
Terminal
Name
Function
B0
B1
SIG OUT1
– OUT1
B2, B3
NC
B4
B5
SIG IN1
– IN1
B6 to B8
A0 to A7
B9
A8
NC
Connect to SIG terminal on Input B7A Link Terminal.
Connect to – power supply terminal on Input B7A Link
Terminal.
Not used.
+V
–V
Connect to + terminal on external power supply.
Connect to – terminal on external power supply.
Terminal
Name
Connect to SIG terminal on Output B7A Link Terminal.
Connect to – power supply terminal on Output B7A Link
Terminal.
Not used.
Function
B0
B1
SIG IN1
– IN1
Connect to SIG terminal on Input B7A Link Terminal.
Connect to – power supply terminal on Input B7A Link
Terminal.
Not used.
B2, B3
NC
B4
B5
SIG IN2
– IN2
B6 to B8
A0 to A7
B9
A8
NC
Connect to SIG terminal on Input B7A Link Terminal.
Connect to – power supply terminal on Input B7A Link
Terminal.
Not used.
+V
–V
Connect to + terminal on external power supply.
Connect to – terminal on external power supply.
Word
m
m+1
m+2
m+3
NA
Word
m
NA
m+1
NA
Word
m
NA
m+1
NA
153
Section
Group-2 B7A Interface Units (C200H-B7Ajj)
C200H-B7A02
Terminal
Name
Function
B0
B1
SIG OUT1
– OUT1
Connect to SIG terminal on Output B7A Link Terminal.
Connect to – power supply terminal on Output B7A Link
Terminal.
Not used.
B2, B3
NC
B4
B5
SIG OUT2
– OUT2
B6 to B8
A0 to A7
B9
A8
NC
Connect to SIG terminal on Output B7A Link Terminal.
Connect to – power supply terminal on Output B7A Link
Terminal.
Not used.
+V
–V
Connect to + terminal on external power supply.
Connect to – terminal on external power supply.
3-9
Word
m
NA
m+1
NA
Recommended Cables and Transmission Distance
The following cables are recommended to connect the B7A Interface Unit to B7A
Link Terminals. The wiring method and transmission distance depend on the
transmission delay and on whether or not a common power supply is being used
for the B7A Link Terminal and the Interface Unit.
Standard Transmission
Delays (19.2 ms):
Cap-tire Cable
High-speed Transmission
Delays (3 ms): Shielded
Cable
Power supply
Cable
Transmission distance
Common
VCTF, 0.75 mm2 x 3 conductors
100 m max.
Separate
VCTF ,0.75 mm2 x 2 conductors
500 m max.
Power supply
Common
Separate
Cable
mm2
Shielded cable, 0.75
x3
conductors
Shielded cable, 0.75 mm2 x 2
conductors
Transmission distance
50 m max.
100 m max.
Terminal Construction
Use hook-type crimp connectors with a line thickness of 0.25 to 1.65 mm2. The
construction of the terminals is shown in the illustration.
Wiring Method
Standard Transmission Delays (19.2 ms)
Common Power Supply
B7A Link Terminal
B7A Interface Unit
Transmission distance: 100 m max.
B7A Link Terminal
Transmission cable: VCTF 0.75 mm2 or higher
12 to 24 VDC
154
Section
Group-2 B7A Interface Units (C200H-B7Ajj)
Separate Power Supplies
3-9
B7A Link Terminal
B7A Interface Unit
12 to 24 VDC
Transmission distance: 500 m max.
B7A Link Terminal
12 to 24 VDC
Transmission cable: VCTF 0.75 mm2 or higher
12 to 24 VDC
High-speed Transmission Delays (3 ms): Shielded Cable
B7A Link Terminal
Common Power Supply
B7A Interface Unit
Transmission distance: 50 m max.
B7A Link Terminal
Shielded cable: 0.75 mm2 or higher
GND
Shielded cable: 0.75 mm2 or higher
24 VDC±10%
GND
Separate Power Supplies
B7A Link Terminal
B7A Interface Unit
12 to 24 VDC
Transmission distance: 100 m max.
Shielded cable: 0.75 mm2 or higher
B7A Link Terminal
GND
12 to 24 VDC
12 to 24 VDC
Note
Shielded cable: 0.75 mm2 or higher
GND
1. We recommend grounding the shielded cable.
2. If shielded cable is not used, the maximum transmission distance is 10 m
regardless of whether a common or separate power supplies are used. (Use
0.75 mm2 or higher VCTF cable.)
3. To prevent noise on the transmission cable, do not lay it near power cables
or high-voltage lines.
155
Section 3-10
Analog Timer Units
3-9-9 Specifications
Item
C200H-B7A12
C200H-B7A02
I/O points
32 input points or
30 input points and 2
error inputs
32 output points
Transmission
method
Transmission
distance (see
note 1)
One-way distributed multiplex transmission
Standard:
500 m max.
High-speed:
100 m max.
Transmission
delay
Standard:
Typ. 19.2 ms, 31 ms max.
High-speed:
Typ. 3 ms, 5 ms max.
Minimum input
time (see note
2, 3)
Standard:
16 ms
High-speed:
2.4 ms
Internal current
consumption
External power
supply (see
note 4)
5 VDC, 100 mA max.
Weight
300 g max.
Dimensions
35 x 130 x 128 mm (W x H x D)
C200H-B7A21
C200H-B7A22
16 output points and
16 input points or
15 input points + 1
error input
32 output points and
32 input points or
30 input points + 2
error inputs
0.05 A min.
0.08 A min.
12 to 24 VDC ±10%
0.05 A min.
Note
0.06 A min.
1. The transmission distance also depends on whether a common or separate
power supplies are used.
2. The minimum input time refers to the minimum time required for reading the
input signals from the CPU Unit.
3. The ON/OFF width of the signal transmitted from the CPU Unit to the Output
Relay of the B7A Interface Unit should be set to a value larger than the minimum input time.
4. The capacity of the external power supply does not include the capacity required by the B7A Link Terminal.
3-9-10 Dimensions
130
x
x
x
x
x
x
Backplane
x
x
128
35
145
3-10 Analog Timer Units
Analog Timer Units are classified as Basic I/O Units.
Analog Timer Units have 4 built-in timers (numbers 0 to 3). The timer settings
can be adjusted using the internal and external variable resistors without requiring a Programming Device. The timer can also be used as a accumulative register to temporarily pause the timer operation using a timer pause input.
156
Section 3-10
Analog Timer Units
Models
Name
Specifications
Analog Timer Unit
Model
4-point timer
C200H-TM001
Timer settings: 0.1 to 1.0 s, 1.0 to 10 s,
10 to 60 s, 1 to 10 min.
The Analog Timer Unit is classified as a Basic I/O Unit and is allocated one word
in the I/O Area. The word (16 bits) allocated to the Unit is used for the 4 timers’
start input, pause input, time-up output, and data transfer with the CPU Unit.
Allocated words
1 word (16 bits)
Bits
Details
4 (bits 0 to 3)
Set Bit
4 (bits 4 to 7)
Pause Inputs
4 (bits 8 to 11)
Time-up Outputs
Direction
CPU Unit to
Analog Timer Unit
CPU Unit to
Analog Timer Unit
Analog Timer Unit
to CPU Unit
The timer settings are adjusted using the internal and external variable resistors.
The timer settings can be selected using the DIP switch for each timer number
from one of the following four settings.
0.1 to 1 s, 1 to 10 s, 10 to 60 s, 1 to 10 min
Timer set input
Timer pause input
Analog Timer Unit
Timer up output
Setting value
Resistance
value
Setting value
Resistance
value
Setting value
Resistance
value
Setting value
Resistance
value
157
Section 3-10
Analog Timer Units
Components and Switch Settings
Timer status indicators
The SET indicators in the top row light when the corresponding
timer is operating and the TIME UP indicators in the bottom row
light when the corresponding time is up.
Internal variable resistor
Time range setting
• Sets variable resistance of specified
timer setting.
• The settings of these resistors are
only effective when the selector
switch on the Unit is ON (set to the
right).
•Numbers 0 to 3 correspond to timers
T0 to T3, respectively.
• Set or adjust times using the flatblade screwdriver supplied with the
Unit. turning the variable resistor
clockwise to increase the time value.
Each timer uses 2 pins. The upper 8 pins 8 to 1 are used for
timers T0 to T3 as follows:
(0: OFF, 1: ON)
Timer
Pin
T0
8
7
T1
6
5
T2
4
3
T3
2
1
0.1 to 1 s
0
0
0
0
0
0
0
0
1 to 10 s
10 to 60 s
1
0
1
0
1
0
1
0
0
1
0
1
0
1
0
1
1 to 10 m
1
1
1
1
1
1
1
1
Min.
External variable resistor connectors
• Cable connector for when timer is set with external volume
instead of internal volume.
• Turn OFF (set to left) the Internal/external volume selector
switch.
• Numbers 0 to 3 correspond to timers T0 to T3.
•The external volume resistance is 20 kΩ.
• Use the following connectors. The C4K-CN223 (2 m) connector
with cable can also be used.
Max.
INT/EXT selector switch
ON
OFF
T0
SW4
Internal variable resistor
External variable resistor
T1
SW3
T2
SW2
Note
T3
SW1
Name
Model
Connector
IL-2S-S3L-(N)
Contact
IL-C2-1-10000
Manufacturer
Japan Aviation
Electronics
Industry, Ltd.
1. When the internal variable resistor is used,make sure that the external variable resistor connector for the same timer number is open. Otherwise the
internal variable resistor settings will not function properly.
2. Use AWG 28 to AWG 22 lead wires for the external variable resistor connectors.
3. Soldering is not required to wire the external variable resistor connectors.
Wire the connector as shown in the following diagram.
Analog Timer Unit connector
External variable resistor: 20 kΩ
Diameter: 16
Shaft length: 15 mm
Check manufacturer’s specifications
158
Section 3-10
Analog Timer Units
Analog Timer Unit Specifications
Item
Oscillation
method
Number of
timer points
Time setting
range
Specifications
CR oscillation
4
Use the DIP switch to set any of the following four ranges.
0.1 to 1 s (typical)
1 to 10 s (typical)
10 to 60 s (typical)
1 to 10 min (typical)
Timer pause
function
Operation
indicators
External
variable resistor
Relay number
allocations
Internal current
consumption
Weight
The timing operation can be paused by the user program, so the timers can be used as cumulative
registers.
SET and TIME UP
Either the external variable resistor or the internal variable resistor can be selected using the INT/EXT
selector switch on the front panel of the Unit. External variable resistors are connected by wiring the
connector. Use 20 kΩ variable resistors
One word (16 bits) is allocated in the I/O Area.
Bit
I/O
Word n
00
Output
T0 Set Bit
01
Output
T1 Set Bit
02
Output
T2 Set Bit
03
Output
T3 Set Bit
04
Output
T0 Pause Input Bit
0: Operates
05
Output
T1 Pause Input Bit
1: Stops
06
Output
T2 Pause Input Bit
07
Output
T3 Pause Input Bit
08
Input
T0 Completion Flag
09
Input
T1 Completion Flag
10
Input
T2 Completion Flag
11
Input
T3 Completion Flag
12
---
Not Used
13
---
Not Used
14
---
Not Used
15
---
Not Used
“1” when time is running
“1” when time is up
60 mA 5 VDC max.
200 g max.
159
Section 3-10
Analog Timer Units
Timer Operation
• When the Timer Start Input turns ON, the Timer Set Bits allocated to the Analog
Timer Unit (word n bits 00 to 03) turn ON, and the Analog Timer will operate.
The timer set indicator (SET) on the Analog Timer Unit will light.
• After the time specified by the internal variable resistor or external variable resistor has elapsed, the Unit’s Completion Output (word n bits 08 to 11) will turn
ON, and the Time Up Output will turn ON. The TIME UP indicator on the Analog
Timer Unit will turn light.
Timer Start Input
Timer Set Bit
Word n bit 00 to 03
Word n bit 08 to 11
Time Up Output
Completion Flag
Timer Start Input
Time Up Output
Timer setting time
Dimensions
160
SECTION 4
Operating Procedures
This section outlines the steps required to assemble and operate a CS1-series PC system.
4-1
4-2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
162
164
161
Section
Introduction
4-1
4-1
Introduction
The following procedure outlines the recommended steps to follow when preparing CS1-series PCs for operation.
1, 2, 3...
1. Install the provided battery in the CPU Unit.
2. Installation
Set the DIP switches on the front of each Unit as required.
Mount the CPU Unit, Power Supply Unit, and other Units to the Backplane.
Install the Inner Board and Memory Card if required.
See 5-2 Installation for details.
3. Wiring
Connect the power supply wiring, I/O wiring, and Programming Device (CXProgrammer or Programming Console). Connect communications wiring
as required.
See 5-3 Wiring for details on power supply and I/O wiring.
See 2-3 Basic System Configuration for details on connecting Programming
Devices.
4. Initial Settings (Hardware)
Set the DIP switches an Rotary switches on the front of the CPU Unit and
other Units.
See 8-3 DIP Switch Settings for details.
5. Checking Initial Operation
a) Set the operating mode to PROGRAM mode and connect the Programming Console.
b) Turn the power on after checking the power supply wiring and voltage.
Check the Power Supply Unit’s POWER indicator and Programming
Console’s display.
6. Clearing Memory
Using the CX-Programmer:
a) Connect the system online. Online connection can also be made by selecting “Work Online” from the PLC menu.
b) Double-click Error Log and select the Error Log tab.
c) Click “Clear All” and then click Yes.
Using a Programming Console:
d) When only cyclic task 0 is being used, specify no interrupt tasks when
clearing memory.
e) When cyclic task 0 and one or more interrupt tasks are being used, specify interrupt tasks when clearing memory.
7. Registering the I/O Table
Check the Units to verify that they are installed in the right slots. With the PC
in PROGRAM mode, register the I/O table from the Programming Device
(CX-Programmer or Programming Console). (Another method is to create
the I/O table in CX-Programmer and transfer it to the CPU Unit.)
See 8-1 I/O Allocations for details.
8. PC Setup Settings
With the PC in PROGRAM mode, change the settings in the PC Setup as
necessary from the Programming Device (CX-Programmer or Programming Console). (Another method is to change the PC Setup in CX-Programmer and transfer it to the CPU Unit.)
See 8-4 PC Setup for details.
162
Section
Introduction
4-1
9. DM Area Settings
a) Use a Programming Device (CX-Programmer or Programming Console) to make any necessary settings in the parts of the DM Area that are
allocated to Special I/O Units, CS1 CPU Bus Units, and Inner Boards.
b) Reset the power (ON → OFF → ON) or toggle the Restart Bit for each
Unit or Board. See the Unit’s or Board’s Operation Manual for details.
10. Writing the Program
Write the program with the CX-Programmer or a Programming Console.
11. Transferring the Program (CX-Programmer Only)
With the PC in PROGRAM mode, transfer the program from CX-Programmer to the CPU Unit.
See 14-1 Program Transfer for details.
12. Testing Operation
a) Checking I/O Wiring
Output wiring
Input wiring
With the PC in PROGRAM mode, force-set output bits and
check the status of the corresponding outputs.
Activate sensors and switches and either check the status
of the indicators on the Input Unit or check the status of
the corresponding input bits with the Programming
Device’s Bit/Word Monitor operation.
b) Auxiliary Area Settings (As Required)
Check operation of special Auxiliary Area Settings such as the following:
Output OFF
Bit
When necessary, turn ON the Output OFF Bit (A50015)
from the program and test operation with the outputs
forced OFF.
Hot Start
Settings
When you want to start operation (switch to RUN mode)
without changing the contents of I/O memory, turn ON the
IOM Hold Bit (A50012).
c) Trial Operation
Test PC operation by switching the PC to MONITOR mode.
d) Monitoring and Debugging
Monitor operation from the Programming Device. Use functions such as
force-setting/force-resetting bits, tracing, and online editing to debug the
program.
See Section 14 Program Transfer, Trial Operation, and Debugging for
details.
13. Saving and Printing the Program
14. Running the Program
Switch the PC to RUN mode to run the program.
163
Section
Examples
4-2
4-2
Examples
1. Battery Installation
Before using the PC, be sure to install the provided battery in the CPU Unit.
2. Installation
Mount the Backplane and install each Unit. When necessary, install the Inner
Board or Memory Card.
Make sure that the total power consumption of the Units is less than the maximum capacity of the Power Supply Unit.
3. Wiring
Connect the power supply and I/O wiring.
Note When 220-VAC power (200 VAC to 240 VAC) is being supplied, be sure to remove the jumper bar that shorts the voltage selector terminals. The Power Supply Unit will be damaged if 220 VAC is supplied with the jumper bar connected.
4. Initial Settings (Hardware)
Make necessary hardware settings such as the DIP switch settings on the CPU
Unit. In particular, be sure that the settings for the peripheral port and RS-232C
port are correct.
In the following example, a Programming Console is connected to the peripheral
port so pin 4 is turned OFF. A Programming Device other than a Programming
Console is connected to the RS-232C port, so pin 5 is turned ON.
164
Section
Examples
4-2
Note When devices other than a Programming Console and Programming Device are
connected to the peripheral port and RS-232C port, turn ON pin 4 and turn OFF
pin 5.
Programming Console
Programming Device
5. Checking Initial Operation
Use the following procedure to turn on the PC and check initial operation.
1, 2, 3...
1. Connect the Programming Console to the CPU Unit’s peripheral port (the
upper port).
OR
Programming
Console
CX-Programmer
2. Set the Programming Console’s Mode Switch to PROGRAM mode.
3. Check the power supply wiring and voltage and turn on the power.
In particular, check that the voltage selector terminals (just below the power
input terminals on the Power Supply Unit) are open when 220 VAC power is
being supplied. These terminals should be connected only when 110 VAC
power is being supplied.
! Caution
The Unit will be damaged if 220 VAC power is supplied and the voltage selector
terminals are connected.
165
Section
Examples
4-2
4. Check that the Power Supply Unit’s POWER indicator is lit.
5. Check that the Programming Console has the following display.
<PROGRAM>
PASSWORD!
6. Press the password (the Clear and Monitor Keys) and check that the Programming Console has the following display.
CLR
MON
<PROGRAM>
BZ
6. Clearing Memory
Clearing Memory with a Programming Console
Only one cyclic task can be created when programming with a Programming
Console, although it is possible to create two or more interrupt tasks with interrupt task numbers ranging from 1 to 3 or 100 to 131.
Note Data areas won’t be cleared if they are removed from the display. If no data
areas are removed, the entire I/O memory area and PC Setup will be cleared.
Connect to the PC (online) and perform the memory clear operation.
Programming Console
1, 2, 3...
1. Clear memory.
CLR
SET
NOT
RESET
000000 CT**
000000MEMORY CLR
CHWA TCDE
P
MON
000000CLR MEM?
0:ALL 1:TASK
0
000000CLR MEM?
INT 0:NO 1:YES
2. Indicate whether interrupt tasks will be created.
• If no interrupt tasks are being created, press the 0 and MON Keys.
0
MON
000000CLR'G MEM
INT 0:NO
000000CLR MEM
END 0:NO
• If one or more interrupt tasks are being created, press the 1 and MON
Keys.
1
MON
166
000000CLR'G MEM
INT
1:YES
000000CLR MEM
END
1:YES
Section
Examples
4-2
Clearing Memory with CX-Programmer
Multiple cyclic tasks and interrupt tasks can be created when CX-Programmer is
used. Connect the computer and PC, switch to online mode, and perform the
memory clear operation.
7. Registering the I/O Table
Registering the I/O table allocates I/O memory to the Units actually installed in
the PC. This operation is required in CS1-series PCs.
Using a Programming Console
Use the following procedure to register the I/O table with a Programming Console.
Programming Console
Install the Units.
1, 2, 3...
1. Install all of the Units in the PC.
2. Connect the Programming Console to the peripheral port.
(It can be connected with the power on.)
3. Register the I/O table.
CLR
FUN
SHIFT
CH
000000 CT00
000000 I/O TBL ?
DM
CHG
000000 I/O TBL
WRIT
????
000000 I/O TBL
WRIT
????
Password (9713)
WRITE
Specify holding or clearing
CPU Bus Unit information.
CLR
000000CPU BU ST?
0:CLR 1:KEEP
000000 I/O TBL
WRIT OK
000000 CT00
167
Section
Examples
4-2
Using the CX-Programmer Online
Use the following procedure to register the I/O table with the CX-Programmer
that is connected to the PC.
Install the Units.
1, 2, 3...
1. Install all of the Units in the PC.
2. Connect the host computer to the peripheral port or RS-232C port.
(The power must be OFF.)
Note If the host computer is being connected to the RS-232C port, pin 5 of
the CPU Unit’s DIP switch must be set to ON.
3. Double-click I/O Table on the project tree in the main window. The I/O Table
Window will be displayed.
4. Select Options and then Create. The models and positions of Units
mounted to the Racks will be written to the Registered I/O Table in the CPU
Unit.
Using the CX-Programmer Offline
Use the following procedure to create the I/O table offline with the CX-Programmer and later transfer the I/O table from to the CPU Unit.
Write the
I/O table.
1, 2, 3...
Transfer the
I/O table.
1. Double-click I/O Table on the project tree in the main window. The I/O Table
Window will be displayed.
2. Double-click the Rack to be edited. The slots for that Rack will be displayed.
3. Right-click the slots to be edited and select the desired Units from the pulldown menu.
4. Select Options and then Transfer to PLC to transfer the I/O table to the
CPU Unit.
Note The first word allocated to each Rack can be set in the PC Setup.
8. PC Setup Settings
These settings are the CPU Unit’s software configuration. See 8-4 PC Setup for
details on the settings.
The PC Setup settings are arranged by word addresses when a Programming
Console is used to make PC Setup settings. This example shows a Programming Console used to make the following settings:
• Set a Minimum Cycle Time in 1-ms units.
• Set a Watch Cycle Time (maximum cycle time) in 10-ms units.
Setting with a Programming Console
168
Section
Examples
Address
Bits
208
209
Setting
4-2
Setting range
0 to 15
Minimum cycle time setting
0001 to 7D00
15
Enable for Watch Cycle Time
setting
0:Use default
Watch Cycle Time setting
0001 to 0FA0
0 to 14
1:Use setting in
bits 0 to 14.
Note When a host computer or PT is connected to the peripheral port or RS-232C
port, the port must be set for Host Link or NT Link communications in the PC Setup. When a standard serial device is connected, the port must be set for no-protocol communications in the PC Setup.
CLR
FUN
VRFY
1
000000 CT00
PC SETUP
0:MODE1:PC SETUP
PC SETUP
+000 0000
Specifying a word address in the PC Setup.
(Example: 209)
2
0
↓
or
9
PC SETUP
+209
↑
PC SETUP
+209
0000
CHG
PC SETUP?
+209
0000 0000
Example: Input 8064.
8
0
6
4
WRITE
PC SETUP
+209
8064
9. DM Area Settings
The following table shows the parts of the DM Area are allocated to Special I/O
Units, CS1 CPU Bus Units, and Inner Boards for initial settings. The actual settings depend on the model of Unit or Inner Board being used.
Unit/Board
Allocated words
Special I/O Units
D20000 to D29599 (100 words × 96 Units)
CS1 CPU Bus Units
D30000 to D31599 (100 words × 16 Units)
Inner Board
D32000 to D32099 (100 words × 1 Board)
After writing the initial settings to the DM Area, be sure to restart the Units by
turning the PC off and then on again or toggling the Restart Bits for the affected
Units.
Special I/O Unit or
CS1 CPU Bus Unit
Restart
169
Section
Examples
4-2
10. Writing the Program
Write the program with the CX-Programmer or a Programming Console.
Unlike earlier OMRON PCs, the CS1-series PC’s program can be divided into
independently executable tasks. A single cyclic task can be written for program
execution like earlier PCs or several cyclic tasks can be written for a more flexible and efficient program. The following table shows the differences when programming with CX-Programmer or a Programming Console.
Programming
Device
Relationship between
Tasks and Program
Writing a new program
Cyclic tasks
Only one can be
written.
(Cyclic task 0)
Programming
Console
Task = program
(Cyclic task 0 is the
main program)
CX-Programmer
Specify the type of task All can be
and task number for
written.
each program.
(Cyclic tasks 0 to
31)
Interrupt tasks
Several can be
written.
(Interrupt tasks 1
to 3, 100 to 131)
All can be
written.
(Interrupt tasks 0
to 255)
Editing an existing program
Cyclic tasks
Interrupt tasks
All can be edited. All can be edited.
All can be edited. All can be edited.
Note When writing the program with a Programming Console, specify whether there
are interrupt tasks during the memory clear operation.
11. Transferring the Program
When the program has been created in a Programming Device other than a Programming Console, it must be transferred to the PC’s CPU Unit.
12. Testing Operation
Before performing a Trial Operation in MONITOR mode, check the I/O wiring.
Check Output Wiring
With the PC in PROGRAM mode, force-set and force-reset output bits and verify
that the corresponding outputs operate properly.
Force-reset
Check Input Wiring
Activate input devices such as sensors and switches and verify that the corresponding indicators on the Input Units light. Also, use the Bit/Word Monitor operation in the Programming Device to verify the operation of the corresponding
input bits.
Input Unit
13. Auxiliary Area Settings
Make any required Auxiliary Area settings, such as the ones shown below.
These settings can be made from a Programming Device (including a Programming Console) or instructions in the program.
170
Section
Examples
4-2
IOM Hold Bit (A50012)
Turning ON the IOM Hold Bit protects the contents of I/O memory (the CIO Area,
Work Area, Timer Completion Flags and PVs, Index Registers, and Data Registers) that would otherwise be cleared when the operating mode is switched from
PROGRAM mode to RUN/MONITOR mode or vice-versa.
Retained
I/O
memory
Operating mode changed
IOM Hold Bit Status at Startup
When the IOM Hold Bit has been turned ON and the PC Setup is set to protect
the status of the IOM Hold BIt at startup (PC Setup address 80 bit 15 turned ON),
the contents of I/O memory that would otherwise be cleared will be retained
when the PC is turned on.
Retained
I/O
memory
PC turned on.
Output Unit
Output Unit
Output OFF Bit (A50015)
Turning ON the Output OFF Bit causes all outputs on Basic I/O Units and Special
I/O Units to be turned OFF. The outputs will be turned OFF regardless of the PC’s
operating mode.
14. Trial Operation
Use the Programming Console or Programming Device (CX-Programmer) to
switch the CPU Unit to MONITOR mode.
171
Section
Examples
4-2
Using a Programming Console
Turn the Mode Switch to MONITOR for the Trial Operation. (Turn the switch to
RUN for full-scale PC operation.)
Trial Operation
Programming
Console
Actual operation
Using a Programming Console
The PC can be put into MONITOR mode with a host computer running CX-Programmer.
Trial Operation
Select PC, Mode, MONITOR.
Actual operation
CX-Programmer
Select PC, Mode, RUN.
15. Monitoring and Debugging
There are several ways to monitor and debug PC operation, including the forceset and force-reset operations, differentiation monitoring, time chart monitoring,
data tracing, and online editing.
Force-Set and Force-Reset
When necessary, the force-set and force-reset operations can be used to force
the status of bits and check program execution.
When a Programming Console is being used, monitor the bits with Bit/Word
Monitor or 3-word Monitor. Press the SHIFT+SET Keys to force-set a bit or press
the SHIFT+RESET Keys to force-reset a bit. The forced status can be cleared by
pressing the NOT Key.
Force-set:
SHIFT
SET
Force-reset:
SHIFT
SET
Bit/Word Monitor display
3-word Monitor display
Clear:
NOT
When CX-Programmer is being used, click the bit to be force-set or force-reset
and then select Force On or Off from the PLC menu.
Differentiation Monitor
The differentiation monitor operation can be used to monitor the up or down differentiation of particular bits.
172
Section
Examples
4-2
When a Programming Console is being used, monitor the bit with Bit/Word Monitor. Press the SHIFT+Up Arrow Keys to specify up differentiation or press the
SHIFT+Down Arrow Keys to specify down differentiation.
Detect up-differentiation:
SHIFT
↑
Detect down-differentiation:
SHIFT
↓
Bit/Word Monitor display
When CX-Programmer is being used, follow the procedure shown below.
1, 2, 3...
1. Click the bit for differential monitoring.
2. Click Differential Monitor from the PLC Menu. The Differential Monitor Dialog Box will be displayed.
3. Click Rising or Falling.
4. Click the Start button. The buzzer will sound when the specified change is
detected and the count will be incremented.
5. Click the Stop button. Differential monitoring will stop.
Time Chart Monitoring
The CX-Programmer’s time chart monitor operation can be used to check and
debug program execution.
Data Tracing
The CX-Programmer’s data trace operation can be used to check and debug
program execution.
Online Editing
When a few lines of the program in the CPU Unit have to be modified, they can be
edited online with the PC in MONITOR mode or PROGRAM mode. When more
extensive modifications are needed, upload the program from the CPU Unit to
the host computer, make the necessary changes, and transfer the edited program back to the CPU Unit.
When a Programming Console is being used, display the desired program address, input the new instruction, and press the WRITE Key twice. A single program address (instruction) can be edited.
Program address display
Input instruction
WRITE
WRITE
When CX-Programmer is being used, several instruction blocks can be edited.
16. Save and Print the Program
To save the program, select File and then Save (or Save As).
To print the program, select File and then Print.
17. Run the Program
Switch the PC to RUN mode to run the program.
173
SECTION 5
Installation and Wiring
This section describes how to install a PC System, including mounting the various Units and wiring the System. Be sure to
follow the instructions carefully. Improper installation can cause the PC to malfunction, resulting in very dangerous situations.
5-1
5-2
5-3
Fail-safe Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-2-1 Installation and Wiring Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-2-2 Installation in a Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-2-3 Mounting Height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-2-4 Mounting Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-2-5 Mounting Units to the Backplane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-2-6 DIN Track Mounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-2-7 I/O Connecting Cables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-2-8 Inner Board Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-3-1 Power Supply Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-3-2 Grounding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-3-3 Wiring CS1-series and C200H Basic I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-3-4 Wiring I/O Units with Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-3-5 Connecting I/O Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-3-6 Reducing Electrical Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
176
177
177
179
181
182
183
185
187
190
192
192
197
198
200
207
212
175
Section
Fail-safe Circuits
5-1
5-1
Fail-safe Circuits
Be sure to set up safety circuits outside of the PC to prevent dangerous conditions in the event of errors in the PC or external power supply.
Supply Power to the PC
before Outputs
If the PC’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 PC itself.
Managing PC Errors
When any of the following errors occurs, PC operation will stop and all outputs
from Output Units will be turned OFF.
• Operation of the Power Supply Unit’s overcurrent protection circuit
• A CPU error (watchdog timer error) or CPU on standby
• A fatal error* (memory error, I/O bus error, duplicate number error, Inner
Board stopped error, too many I/O points error, program error, cycle time
too long error, or FALS(007) error)
Be sure to add any circuits necessary outside of the PC to ensure the safety of
the system in the event of an error that stops PC 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 PC 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. Be sure to add
any circuits necessary outside of the PC to ensure the safety of the system in the
event that an output fails to go OFF.
Emergency Stop Circuit
The following emergency stop circuit controls the power supply to the controlled
system so that power is supplied to the controlled system only when the PC is
operating and the RUN output is ON.
An external relay (CR1) is connected to the RUN output from the Power Supply
Unit as shown in the following diagram.
MCB1
Power supply
MCB2
CR1
Controlled system
Transformer
or noise filter
CS1 PC
Twisted-pair wires
DC voltage
regulator
+ DC
– input/output
PC RUN
output*
CR1
176
Surge suppressor
Section
Installation
5-2
Note *This configuration is possible with the C200HW-PA204R and C200HWPA204R Power Supply Units only. When a Power Supply Unit without a RUN
output is used, program the Always ON Flag (A1) as the execution condition for
an output point from an Output Unit.
Interlock Circuits
When the PC controls an operation such as the clockwise and counterclockwise
operation of a motor, 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.
Interlock circuit
000501
MC2
MC1 Motor clockwise
PC
000502
MC1
MC2 Motor counterclockwise
This circuit prevents outputs MC1 and MC2 from both being ON at the same time
even if both CIO 000500 and CIO 000501 are both ON, so the motor is protected
even if the PC is programmed improperly or malfunctions.
5-2
Installation
5-2-1 Installation and Wiring Precautions
Be sure to consider the following factors when installing and wiring the PC to improve the reliability of the system and make the most of the PC’s functions.
Ambient Conditions
Do not install the PC in any of the following locations.
• Locations subject to ambient temperatures lower than 0C or higher than
55C.
• 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 PC to direct shock or vibration.
• Locations exposed to direct sunlight.
• Locations that would subject the PC to water, oil, or chemical reagents.
Be sure to enclose or protect the PC 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 PC is being installed in a cabinet or control panel, be sure to 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 0C to 55C. When necessary, take the following steps to maintain the
proper temperature.
• Provide enough space for good air flow.
177
Section
Installation
5-2
• Do not install the PC above equipment that generates a large amount of heat
such as heaters, transformers, or high-capacity resistors.
• If the ambient temperature exceeds 55C, install a cooling fan or air conditioner.
Fan
Control
panel
PC
Louver
• If a Programming Console will be left on the PC, the ambient temperature must
be within the Programming Console’s operating range of 0C to 45C.
Accessibility for Operation and Maintenance
• To ensure safe access for operation and maintenance, separate the PC as
much as possible from high-voltage equipment and moving machinery.
• The PC will be easiest to install and operate if it is mounted at a height of about
1.3 m (4 feet).
Improving Noise Resistance
• Do not mount the PC in a control panel containing high-voltage equipment.
• Install the PC at least 200 mm (6.5 feet) from power lines.
Power lines
200 mm min.
PC
200 mm min.
• Ground the mounting plate between the PC and the mounting surface.
• When I/O Connecting Cables are 10 m or longer, connect the control panels in
which Racks are mounted with heavier power wires (3 wires at least 2 mm2 in
cross-sectional area).
PC Orientation
• Each Rack must be mounted in an upright position to provide proper cooling.
Top
Bottom
178
Section
Installation
5-2
• Do not install a Rack in any of the following positions.
5-2-2 Installation in a Control Panel
• A typical installation is a CPU Rack mounted above an Expansion Rack on a
mounting plate in the control panel.
• The spacing between the CPU Rack and Expansion Rack (or between two Expansion Racks) should be sufficient to allow space for a wiring duct, wiring, air
circulation, and replacement of Units in the Racks.
Note If the C200HW-PA209R Power Supply Unit is to be used at an ambient temperature of 50 °C or higher, provide a minimum space of 80 mm between the top of
the Unit and any other objects, e.g., ceiling, wiring ducts, structural supports, devices, etc.
80 mm min.
Duct or other object
C200HW-PA209R
80 mm min.
80 mm min.
Duct or other object
C200HW-PA209R
80 mm min.
Duct or other object
• Up to 7 Expansion Racks can be connected.
Each I/O Connecting Cable can be up to 12 m long, but the sum total of all
cables between the CPU Rack and Expansion Racks must be 12 m or less.
• The mounting plate should be grounded completely and we recommend using
a mounting plate that has been plated with a good conductor to improve noise
resistance.
• If all of the Racks cannot be mounted to the same mounting plate, the individual plates should be securely connected together using 3 wires of at least 2 mm2
in cross-sectional area.
179
Section
Installation
5-2
• The Backplanes are mounted to the plate(s) with four M4 screws each.
• Whenever possible, route I/O wiring through wiring ducts or raceways. Install
the duct so that it is easy to fish wire from the I/O Units through the duct. It is
handy to have the duct at the same height as the Racks.
Duct
20 mm min.
Backplane
Phillips
screwdrivers
Unit
20 mm min.
Duct
Wiring Ducts
The following example shows the proper installation of wiring duct.
118 to 153 mm
CPU
Rack
30 mm
30 mm
Mounting
bracket
40 mm
Duct
Expansion
Rack
Note Tighten the Unit mounting screws, PC Rack mounting screws, terminal block
screws, and cable screws to the following torques.
Unit Mounting Screws
CPU Unit:
0.9 N m
Power Supply Unit: 0.9 N m
I/O Units:
0.4 N m
Backplane Mounting Screws: 0.9 N m
Terminal Screws
M3.5: 0.8 N m
M3: 0.5 N m
Cable Connector Screws
M2.6: 0.2 N m
180
Section
Installation
Routing Wiring Ducts
5-2
Install the wiring ducts at least 20 mm between the tops of the Racks and any
other objects, (e.g., ceiling, wiring ducts, structural supports, devices, etc.) to
provide enough space for air circulation and replacement of Units. If the
C200HW-PA209R Power Supply Unit is to be used at an ambient temperature of
50 °C or higher, provide a minimum space of 80 mm.
Power duct
Output duct
Input duct
200 mm min.
CPU Rack
Breakers,
fuses
Expansion Rack
Power
equipment
such as
transformers
and magnetic
relays
Fuses, relays, timers, etc.
(NOT heat-generating equipment, power equipment, etc.)
Terminal blocks
for PC
Terminal blocks for
power equipment
5-2-3 Mounting Height
The mounting height of CPU Racks, Expansion Racks, or Slave Racks is
118 mm to 153 mm depending on I/O Units mounted. If Programming Devices or
connecting cables are attached, the additional dimensions must be taken into
account. Allow sufficient clearance in the control panel in which the PC is
mounted.
118 to 153 mm
Approx. 180 to 223 mm
181
Section
Installation
5-2
5-2-4 Mounting Dimensions
Backplanes
CPU Backplane with 2 Slots
Four, M4
CS1W-BC023
CPU Backplane
145±0.3
172.3±0.3
Unit: mm
Note Expansion Backplanes cannot be connected to 2-slot CPU Backplanes.
CPU Backplane with 3, 5, 8, or 10 Slots
Unit: mm
A±0.2
Four, M4
CPU Backplane
130
68 to 108 min.
80 to 120 min.
130
I/O Backplane
Four, M4
118±0.2
W
Backplane
CPU Backplanes
Expansion
Backplanes
CS1 Expansion
Backplanes
C200H Expansion
I/O Backplanes
182
118±0.2
Model
CS1W-BC033
CS1W-BC053
CS1W-BC083
CS1W-BC103
CS1W-BI033
CS1W-BI053
CS1W-BI083
CS1W-BI103
C200HW-BI031
C200HW-BI051
C200HW-BI081
C200HW-BI101
A
246 mm
316 mm
421 mm
491 mm
246 mm
316 mm
421 mm
491 mm
245 mm
316 mm
350 mm
420 mm
W
260 mm
330 mm
435 mm
505 mm
260 mm
330 mm
435 mm
505 mm
259 mm
330 mm
364 mm
434 mm
Section
Installation
5-2
Backplane Insulation Plates
Backplane Insulation Plates can be installed on C200H I/O Backplanes only.
There are four models available, corresponding to the number of slots on the
Backplane. The dimensions at locations A, B, C, D, and E are shown below in
millimeters for each Backplane Insulation Plate.
Unit: mm
5-dia. holes for mounting
Base Insulation Plate
(4/6 places)
M4 screws for mounting to PC
(4/5 places)
(B)
6
12 dia.
5 dia.
135 (118) 110
C
D
(A)
(E)
10
Insulation Plates for I/O Backplanes
Specifications
Dimensions (mm)
Model
For 3 slots
C200HW-ATT32
E
190
D
140
C
---
B
---
A
175
For 5 slots
C200HW-ATT52
260
210
---
---
245
For 8 slots
C200HW-ATT82
365
315
---
---
350
For 10 slots
C200HW-ATTA2
435
385
---
---
420
5-2-5 Mounting Units to the Backplane
There are two methods for mounting or removing Units in the Backplane. The
following table shows which method to use for each type of Unit.
Group
Unit type
Installation method
Removal method
A
CS1 CPU Units,
Power Supply Units,
CS1 Basic I/O Units,
CS1 Special I/O Units,
CS1 CPU Bus Units,
and
SYSMAC BUS Remote
I/O Slave Units
Hook the top of the
Unit into the slot on
the Backplane and
tighten the screw on
the bottom of Unit.
Loosen the screw on
the bottom of the Unit
and rotate the Unit
upward.
B
C200H Basic I/O Units,
C200H Special I/O Units
Hook the top of the
Unit into the slot on
the Backplane and
secure the bottom of
the Unit with the
Backplane’s lock
lever.
Press and hold the
lock lever at the
bottom of the Unit and
rotate the Unit
upward.
183
Section
Installation
1, 2, 3...
5-2
1. Mount the Unit to the Backplane by hooking the top of the Unit into the slot on
the Backplane and rotating the I/O Unit downwards. (Groups A and B)
Hook
Backplane
Lock lever
2. Make sure that the connector on the back of the Unit is properly inserted into
the connector in the Backplane. (Groups A and B)
3. With the Group-A Units, use a Phillips-head screwdriver to tighten the screw
on the bottom of Unit. The screwdriver must be held at a slight angle, so be
sure to leave enough space below each Rack.
Note The screws at the bottoms of the Units must be tightened to the following torques.
CPU Unit:
0.9 N m
Power Supply Unit: 0.9 N m
I/O Units:
0.4 N m
Duct
20 mm min.
Phillips
screwdriver
Units in
group A
Backplane
20 mm min.
Duct
With Group-B Units, the lock lever will snap into place when the Unit is properly inserted. Check that the lock lever is engaged and the Unit is secure.
184
Section
Installation
5-2
4. To remove a Group-A Unit, use a phillips-head screwdriver to loosen the
screw at the bottom of the Unit, rotate the Unit upward, and remove it.
To remove a Group-B Unit, hold down the lock lever with a tool such as a
screwdriver, rotate the Unit upward, and remove it.
Lock lever
5-2-6 DIN Track Mounting
Do not use DIN Track to mount Backplane in locations subject to vibration; use
locking screws to attach the Backplane directly.
Mount the DIN Track in the control panel with M4 screws in at least three places.
Tighten the mounting screws to a torque of 1.2 N-m.
DIN Track Mounting
Bracket
Use DIN Track Mounting Brackets to mount Racks to the DIN Track.
C200H-DIN01
Mounting Bracket
DIN Track
185
Section
Installation
DIN Track
5-2
The following DIN Tracks are available.
Model
Specification
PFP-50N
50 cm long, 7.3 mm high
PFP-100N
1 m long, 7.3 mm high
PFP-100N2
1 m long, 16 mm high
DIN Track Installation
1, 2, 3...
1. Attach Mounting Brackets to each side (left and right) of the Backplane as
shown below.
Backplane (rear view)
DIN Track Mounting
Bracket
There are two Backplane mounting screws each on the left
and right sides of the Backplane. Use these screws to attach
the DIN Track Mounting Brackets to the Backplane.
(Tighten to a torque of 0.9 N-m.)
2. Mount the Backplane to the DIN Track so that the hooks on the Mounting
Brackets fit into the upper portion of the DIN Track as shown below.
These hooks fit into the DIN Track
Backplane
186
DIN Track
DIN Track Mounting Bracket
Section
Installation
5-2
3. Loosen the hold-down bracket’s screws and slide the Backplane upward so
that the Mounting Bracket and Backplane clamp securely onto the DIN
Track. Tighten the screws to a torque of 0.5 N-m.
DIN Track Mounting Bracket
DIN Track
Hold-down bracket
Projections Slide this screw to the top of the
projection and then tighten it.
5-2-7 I/O Connecting Cables
I/O Connecting Cables are used to connect the CPU Rack and Expansion
Racks. There are three types of I/O Connecting Cables.
Type
Model number
CS1 → CS1
I/O Connecting Cable
CS1W-CN3
CS1 → C200H
I/O Connecting Cable
C200H → C200H
I/O Connecting Cable
Connectors
Usage
CPU Rack side
Simple lock
connector
Expansion Rack side
Simple lock
connector
CS1W-CN1
Simple lock
connector
Two-screw
connector
C200H-CN1
Two-screw
connector
Two-screw
connector
CPU Rack →
CS1 Expansion Rack
CS1 Expansion Rack →
CS1 Expansion Rack
CPU Rack →
C200H Expansion I/O Rack
CS1 Expansion Rack →
C200H Expansion I/O Rack
C200H Expansion I/O Rack →
C200H Expansion I/O Rack
Available Models
CS1 → CS1 I/O Connecting Cable
Model number
Cable
length
CS1 → C200H I/O Connecting Cable
Model number
Cable
length
C200H → C200H I/O Connecting Cable
Model number
Cable
length
CS1W-CN313
0.3 m
CS1W-CN311
0.3 m
CS1W-CN311
0.3 m
CS1W-CN713
0.7 m
CS1W-CN711
0.7 m
CS1W-CN711
0.7 m
CS1W-CN223
2m
CS1W-CN221
2m
CS1W-CN221
2m
CS1W-CN323
3m
CS1W-CN321
3m
CS1W-CN521
5m
CS1W-CN523
5m
CS1W-CN521
5m
CS1W-CN131
10 m
CS1W-CN133
10 m
CS1W-CN131
10 m
CS1W-CN133B2
12 m
CS1W-CN131B2
12 m
• Install the Racks and select I/O Connecting Cables so that the total length of all
I/O Connecting Cables does not exceed 12 m.
• The following diagram shows where each I/O Connecting Cable must be connected on each Rack. The Rack will not operate if the cables aren’t connected
187
Section
Installation
5-2
properly. (The “up” direction is towards the CPU Unit and “down” is away from
the CPU Unit.)
CPU Rack
Up
Down
CS1 Expansion Rack
Down
Up
C200H Expansion I/O Rack
Down
• The following diagram shows two examples of proper Rack connections.
Total cable length: 12 m max.
CPU Rack
CS1 → CS1
I/O Connecting Cable
CS1 Expansion Rack
CS1 → CS1
I/O Connecting Cable
CS1 Expansion Rack
CS1 → C200H
I/O Connecting Cable
C200H Expansion I/O Rack
Total cable length: 12 m max.
CPU Rack
CS1 → C200H
I/O Connecting Cable
C200H Expansion I/O Rack
C200H → C200H
I/O Connecting Cable
C200H Expansion I/O Rack
C200H → C200H
I/O Connecting Cable
C200H Expansion I/O Rack
188
Section
Installation
Cable Connections
5-2
There are two types of connectors used in the I/O Connecting Cables: simple
locking connectors for CS1 Racks and screw-in connectors for C200H Racks.
CS1 → CS1
I/O Connecting Cable
This cable has simple locking
connectors on both ends.
CPU Rack or
CS1 Expansion Rack
CS1 → C200H
I/O Connecting Cable
This cable has a simple locking
connector on one end and a
screw-in connector on the other.
CPU Rack or
CS1 Expansion Rack
Simple locking
connector
CS1 Expansion Rack
C200H Expansion
I/O Rack
C200H → C200H
I/O Connecting Cable
This cable has screw-in
connectors on both ends.
C200H Expansion
I/O Rack
C200H Expansion
I/O Rack
Simple locking
connectors
Screw-in
connectors
Screw-in
connector
The connectors can be inserted only one way; they cannot be inserted upside
down. Be sure that the connectors fit properly as they are inserted.
Connecting the Simple Locking Connectors
Press the tabs on the end of the connector and insert the connector until it locks
in place. The PC will not operate properly if the connector isn’t inserted completely.
Connecting the Screw-in Connectors
Insert the connector and secure it by tightening the two screws to a torque of 0.2
N-m. The PC will not operate properly if the connector isn’t inserted completely.
To remove the connector, simply loosen the screws and pull it out.
189
Section
Installation
5-2
Do not route the I/O Connecting Cables through ducts that contain the I/O or
power wiring.
• An I/O bus error will occur and the PC will stop if an I/O Connecting Cable’s
connector separates from the Rack. Be sure that the connectors are secure.
• A 63-mm hole will be required if the I/O Connecting Cable must pass through a
hole. The cables can withstand a pulling force up to 5 kg (11 lbs), so be sure
that they aren’t pulled too forcefully.
• The I/O Connecting Cables mustn’t be bent too severely. The minimum bending radii are shown in the following diagram.
CS1 → CS1 I/O Connecting Cable
(Cable diameter: 8.6 mm)
C200H → C200H I/O Connecting Cable
(Cable diameter: 5.1 mm)
R y 69 mm
R y 41 mm
CS1 → C200H I/O Connecting Cable
(Cable diameter: 5.1 mm)
R y 41 mm
5-2-8 Inner Board Installation
Always turn the power off before installing or removing the Inner Board. Installing or removing the Inner Board with the power on can cause the CPU Unit to
malfunction, damage internal components, or cause communications errors.
Before installing the Inner Board, be sure to first touch a grounded metallic object, such as a metal water pipe, in order to discharge any static build-up.
CPU Unit
Inner Board
(such as a Serial
Communications
Board)
190
Section
Installation
1, 2, 3...
5-2
1. Press the catches at the top and bottom of the Inner Board compartment
cover and pull the cover forward.
Press the top catch.
Press the bottom catch.
2. Remove the Inner Board compartment cover.
3. Align the Inner Board with the groove and slide it into the compartment.
191
Section
Wiring
5-3
5-3
Wiring
5-3-1 Power Supply Wiring
AC Power Supply Units
When 220 VAC power (200 VAC to 240 VAC) is being supplied, be sure to remove the jumper bar that shorts the voltage selector terminals. The Unit will be
damaged if 220 VAC is supplied with the jumper bar connected.
Voltage selector
terminals
220 VAC
power
Voltage selector
terminals
Unit will be damaged
if connected.
Not connected
(OPEN)
CORRECT
220 VAC
power
INCORRECT!
(Unit will be damaged.)
Note If 110 VAC power is supplied but the jumper bar has been removed to select
220 VAC, the Unit will not operate because the power supply voltage will be below the 85% minimum level.
• 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.
C200HW-PA204 or C200HW-PA204S Power Supply Unit
Screws (3.5 mm head with
self-raising pressure plate)
1:1 isolation
transformer
Voltage selector:
Closed for 110 VAC
Open for 220 VAC*
24-VDC output
Note
192
The 24-VDC service power supply is provided on the C200HW-PA204S only.
AC power
source
100 to 200
VAC
Section
Wiring
5-3
Note To prevent damage, be sure that the jumper bar on the voltage selector terminals
has been removed before applying 220 VAC power.
C200HW-PA204R or C200HW-PA209R Power Supply Unit
Screws (3.5 mm head with
self-raising pressure plate)
1:1 isolation
transformer
Voltage selector:
Closed for 110 VAC
Open for 220 VAC1
RUN
OUTPUT
Note
AC Power Source
Power
supply
AC power
source
100 to 200
VAC
RUN output2
ON when the PC is in RUN or MONITOR mode.
OFF when the PC is in PROGRAM mode or a fatal
error has occurred.
1. To prevent damage, be sure that the jumper bar on the voltage selector terminals has been removed before applying 220 VAC power.
2. If a Power Supply Unit without a RUN output is being used, an output that
acts as a RUN output can be created by programming the Always ON Flag
(A1) as the execution condition for an output from an Output Unit.
• Supply 100 to 120 VAC or 200 to 240 VAC.
• Keep voltage fluctuations within the specified range:
Supply voltage
Allowable voltage fluctuations
100 to 120 VAC
85 to 132 VAC
200 to 240 VAC
170 to 264 VAC
• The terminal block indicator L2/N-L1 may appear as L1/N-L2 in some Units,
but the function of the terminals is the same.
• If one power supply phase of the equipment is grounded, connect the
grounded phase side to the L2/N (or L1/N if so indicated) terminal.
Voltage Selector
Shorted: 100 to 120 VAC
Open:
200 to 240 VAC
Short-circuit the voltage selector terminals with the jumper bar to select 100 to
120 VAC supply voltage. For 200 to 240 VAC leave them open.
Note The Power Supply Unit will be damaged if 200 to 240 VAC power is supplied and
the voltage selector terminals are connected with the jumper bar.
Isolation Transformer
The PC’s internal noise isolation circuits are sufficient to control typical noise in
power supply lines, but noise between the PC and ground can be significantly
reduced by connecting a 1-to-1 isolation transformer. Do not ground the secondary coil of the transformer.
Power Consumption
The power consumption will be 120 VA max. per Rack, but there will be a surge
current of at least 5 times the max. current when power is turned ON.
24-VDC Output
(C200HW-PA204S Only)
Use these terminals as the power supply for 24-VDC Input Units. Never externally short these terminals; PC operation will stop if these terminals are shorted.
193
Section
Wiring
5-3
Although the 24-VDC output can supply up to 0.8 A, the combined power consumption for both 5 VDC and 24 VDC must be 30 W or less, i.e., the capacity of
the 24-VDC output will be reduced if the Units mounted to the Rack consume a
lot of current. Refer to Appendix C Unit Current and Power Consumption for the
power consumption of each Unit.
The output voltage of the 24-VDC output will vary with the current consumption
of the load as shown in the following table. Be sure to check the current consumption and allowable voltage ranges of the devices connected before using
these terminals.
Load current on 24-VDC output
Less than 0.3 A
Accuracy of 24-VDC output for lot
No. 0197 or later
Accuracy of 24-VDC output for lot
No. 3187 or earlier
+17%
–11%
+10%
–20%
0.3 A or higher
+10%
–11%
Note Lot numbers are as shown in the following diagram.
0 1 9 7
1997 (Rightmost digit of year)
September (Month: 1 to 9 = Jan. to Sept, X/Y/Z = Oct/Nov/Dec
01 (Day: 01 to 31)
We recommend connecting a dummy load as shown in the following diagram if
the maximum operating voltage of the connected device is 26.4 V (24 V +10%).
IL
Connected
device
(Photoelectric
Switch, Sensor Input Unit,
etc.
Dummy
load
R
L
24 VDC
OUTPUT
• Resistance of the dummy load: 120 Ω when IL= 0.1 A
240 Ω when IL= 0.2 A
R + 24
Not necessary when IL= 0.3 A
0.3 * I L
(IL: Total current of connected devices)
• Power rating of the dummy load (with a safety factor of 5):
30 W (120 Ω) when IL= 0.1 A
W + (0.3 * I L) 26.4 5
15 W (240 Ω) when IL= 0.2 A
Note Since the dummy load will generate heat, be careful not to allow any combustible
materials to come in contact with the resistor.
194
Section
Wiring
5-3
This output is ON whenever the CPU Unit is operating in RUN or MONITOR
mode; it is OFF when the CPU Unit is in PROGRAM mode or a fatal error has
occurred.
The RUN output can be used to control external systems, such as in an emergency stop circuit that turns off the power supply to external systems when the
PC is not operating. (See 5-1 Fail-safe Circuits for more details on the emergency stop circuit.)
RUN Output
(C200HW-PA204R/209R)
C200HW-PA204R
Contact
form
Maximum
switching
capacity
Crimp Terminals
C200HW-PA209R
SPST-NO
SPST-NO
250 VAC: 2 A for resistive loads
0.5 A for inductive loads
240 VAC: 2 A for resistive loads
24 VDC: 2 A
24 VDC: 2 A for resistive loads
2 A for inductive loads
120 VAC:0.5 A for inductive loads
The terminals on the Power Supply Unit are M3.5, self-raising terminals with
screws. Use crimp terminals for wiring. Do not connect bare stranded wires directly to terminals. Tighten the terminal block screws to the torque of 0.8 N m.
Use round-type crimp terminals (M3.5) having the dimensions shown below.
7 mm max.
20 mm max.
M3.5 self-raising terminals
Torque to 0.8 N-m
! Caution
Note
Tighten the AC power supply terminal block screws to the torque of 0.8 N m.
Loose screws may result in short-circuit, malfunction, or fire.
1. Supply power to all of the Power Supply Units from the same source.
2. Be sure to check the setting of the voltage selector before supplying power.
3. Do not forget to remove the label from the top of the Power Supply Unit after
wiring the Unit. The label will block air circulation needed for cooling.
195
Section
Wiring
5-3
DC Power Supplies
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. (Remove the label after wiring has been
completed to allow air circulation needed for cooling.)
C200HW-PD024 Power Supply Unit
Screw (3.5 mm head with
self-raising pressure plate)
DC
power
source
DC Power Source
Supply 24 VDC. Keep voltage fluctuations within the specified range (19.2 to
28.8 VDC).
Power Supply Capacity
The maximum power consumption is 50 W per Rack, but there will be a surge
current of about 5 times that level when the power is turned on.
Crimp Terminals
The terminals on the Power Supply Unit are M3.5, self-raising terminals with
screws. Use crimp terminals for wiring. Do not connect bare stranded wires directly to terminals. Tighten the terminal block screws to the torque of 0.8 N-m.
Use crimp terminals (M3.5) having the dimensions shown below.
7 mm max.
7 mm max.
Be sure not reverse the positive and negative leads when wiring the power supply terminals.
Supply power to all of the Power Supply Units from the same source.
Do not forget to remove the label from the top of the Power Supply Unit after wiring the Unit. The label will block air circulation needed for cooling.
196
Section
Wiring
5-3
5-3-2 Grounding
The diagram below shows the location of the ground and line ground terminals.
LG (Noise-filter neutral terminal)
Ground this terminal to less than 100 Ω to improve
noise resistance and prevent electric shock.
GR (Ground terminal)
Ground this terminal to less than 100 Ω to prevent
electric shock.
• To help prevent electrical shock, ground the ground terminal (GR: ) with a
ground resistance of less than 100 Ω using a 14-gauge wire (minimum crosssectional area of 2 mm2).
• The line ground terminal (LG: ) is a noise-filtered neutral terminal. If noise is a
significant source of errors or electrical shocks are a problem, connect the line
ground terminal to the ground terminal and ground both with a ground resistance of less than 100 Ω.
• The ground wire should not be more than 20 m long.
• The following grounding configurations are acceptable.
• The CS1-series Backplanes are designed to be mounted so that they are isolated (separated) from the mounting surface to protect them from the effects of
noise in the installation environment (e.g., the control panel). (C200HX/HG/HE
and C200H Backplanes are mounted directly to the mounting surface. If Expansion I/O is being affected by control panel or other environmental noise,
use the C200HW-ATT or C200H-ATT Backplane Insulation Plates to
isolate the Backplanes.
CS1 PC
Other equipment
Ground
(100 Ω or less)
CS1 PC
Ground
(100 Ω or less)
Other equipment
Ground
(100 Ω or less)
Ground
(100 Ω or less)
197
Section
Wiring
5-3
• Do not share the PC’s ground with other equipment or ground the PC to the
metal structure of a building. The configuration shown in the following diagram
may worsen operation.
CS1 PC
Crimp Terminals
Other equipment
The terminals on the Power Supply Unit are M3.5, self-raising terminals with
screws. Use crimp terminals for wiring. Do not connect bare stranded wires directly to terminals. Tighten the terminal block screws to the torque of 0.8 N-m.
Use crimp terminals (M3.5) having the dimensions shown below.
7 mm max.
7 mm max.
5-3-3 Wiring CS1-series and C200H Basic I/O Units
I/O Unit 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, be sure to wire
them correctly.
Electric Wires
The following wire gauges are recommended.
Terminal Block Connector
Wire Size
10-terminal
AWG 22 to 18 (0.32 to 0.82 mm2)
19-terminal/20-terminal
AWG 22 (0.32 mm2)
Note 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.
Crimp Terminals
The terminals on the Power Supply Unit are M3.5, self-raising terminals with
screws. Use crimp terminals for wiring. Do not connect bare stranded wires directly to terminals. Tighten the terminal block screws to the torque of 0.8 N-m.
Use crimp terminals (M3.5) having the dimensions shown below.
10-terminal or 19-terminal Terminal Blocks
7 mm max.
7 mm max.
20-terminal Terminal Blocks
6.5 mm max.
198
7 mm max.
Section
Wiring
Wiring
5-3
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. (Remove the label after wiring has been
completed to allow air circulation needed for cooling.)
During wiring
After wiring
Remove the label.
• Wire the Units so that they can be easily replaced. In addition, make sure that
the I/O indicators are not covered by the wiring.
• Do not place the wiring for I/O Units in the same duct or raceway as power
lines. Inductive noise can cause errors in operation.
• Tighten the terminal screws to the torque of 0.8 N m.
• The terminals have screws with 3.5-mm diameter heads and self-raising pressure plates. Connect the lead wires to the terminals as shown below.
A
Terminal Blocks
Screw (3.5 mm screw with
self-raising pressure plate)
Terminal
block
A
10P
19P
20P
23 mm
14 mm
18 mm
The I/O Units are equipped with removable terminal blocks. The lead wires do
not have to be removed from the terminal block to remove it from an I/O Unit. The
terminal block on a C200H Basic I/O Units can be removed by pressing the terminal block locks. The terminal block on a CS1-series Basic I/O Units can be
removed by taking out the terminal block mounting screws.
Terminal block locks
C200H Basic I/O Units
Terminal block
mounting screws
(black screws
under cover)
CS1-series Basic I/O Units
(including Interrupt Input
Units and High-speed Input
Units)
199
Section
Wiring
I/O Unit Covers
5-3
The C200H-COV11 Cover is available to cover the terminal block on Units with
10-terminal terminal block connectors. These Covers can be purchased separately if extra protection is required.
Attach
Remove
C200H-COV11
I/O Unit cover
5-3-4 Wiring I/O Units with Connectors
This section describes wiring for the following Units:
• C200H Group-2 High-density I/O Units
• CS1 Basic I/O Units with Connectors (32-, 64-, and 96-point Units)
• C200H High-density I/O Units (Special I/O Units)
C200H High-density I/O Units and CS1 Basic I/O Units with connectors use special connectors to connector to external I/O devices. The user can combine a
special connector with cable or use a preassembled OMRON cable to connect a
High-density I/O Unit to a terminal block or Relay Terminal. The available OMRON cables are described later in this section.
CS1 Basic I/O Units with connectors have the same connector pin allocations as
the C200H High-density I/O Units to make them compatible.
• Be sure not to apply a voltage that exceeds the input voltage for Input Units or
the maximum switching capacity for Output Units.
• When the power supply has positive and negative terminals, be sure to wire
them correctly. Loads connected to Output Units may malfunction if the polarity
is reversed.
• Use reinforced insulation or double insulation on the DC power supply connected to DC I/O Units when required by EC Directives (low voltage).
• When connecting the connector to the I/O Unit, tighten the connector screws to
a torque of 0.2 N m.
• Turn on the power after checking the connector’s wiring. Do not pull the cable.
Doing so will damage the cable.
• Bending the cable too sharply can damage or break wiring in the cable.
Available Connectors
Use the following connectors when assembling a connector and cable.
C200H Group-2
High-density I/O Units
and CS1-series 32- and
64-point I/O Units
The following connectors are recommended for attachment to C200H Group-2
High-density I/O Units and CS1-series 32- and 64-point I/O Units.
Connection
Pins
OMRON set
Fujitsu parts
Solder-type
(included with Unit)
Crimp-type
40
C500-CE404
40
C500-CE405
Socket: FCN-361J040-AU
Connector bar: FCN-360C040-J2
Socket: FCN-363J040
Connector bar: FCN-360C040-J2
Contacts: FCN-363J-AU
Crimp-type
40
C500-CE403
FCN-367J040-AU
Note Solder-type connectors are included with each Unit.
200
Section
Wiring
CS1 96-point I/O Units
5-3
The following connectors are recommended for attachment to CS1 96-point I/O
Units.
Connection
Pins
OMRON set
Fujitsu parts
Solder-type
(included with Unit)
Crimp-type
56
CS1W-CE561
56
CS1W-CE562
Socket: FCN-361J056-AU
Connector bar: FCN-360C056-J2
Socket: FCN-363J056
Connector bar: FCN-360C056-J2
Contacts: FCN-363J-AU
Crimp-type
56
CS1W-CE563
FCN-367J056-AU
Note Solder-type connectors are included with each Unit.
C200H High-density I/O
Units
The following connectors are recommended for attachment to C200H High-density I/O Units.
Connection
Pins
OMRON set
Fujitsu parts
Solder-type
(included with Unit)
Crimp-type
24
C500-CE241
24
C500-CE242
Socket: FCN-361J024-AU
Connector bar: FCN-360C024-J2
Socket: FCN-363J024
Connector bar: FCN-360C024-J2
Contacts: FCN-363J-AU
Crimp-type
24
C500-CE243
FCN-367J024-AU/F
Note Solder-type connectors are included with each Unit.
Wire
We recommend using cable with wire gauges of AWG 24 or AWG 26 (0.2 mm2 to
0.13 mm2). Use cable with external wire diameters of 1.61 mm max.
Wiring Procedure
The wiring procedure is the same for the C200H Group-2 High-density I/O Units,
CS1 High-density I/O Units, and C200H High-density I/O Units (C200H Special
I/O Units).
1, 2, 3...
1. Check that each Unit is installed securely.
Note Do not force the cables.
2. 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. (Remove the label after wiring has been
completed to allow air circulation needed for cooling.)
Before wiring
After wiring
Remove label
after wiring
201
Section
Wiring
5-3
3. When solder-type connectors are being used, be sure not to accidentally
short adjacent terminals. Cover the solder joint with heat-shrink tubing
Solder-type connector
included with Unit.
Heat-shrink tubing
Wire (0.2 to 0.13 mm2)
Note Double-check to make sure that the Output Unit’s power supply leads haven’t
been reversed. If the leads are reversed, the Unit’s internal fuse will blow and the
Unit will not operate.
4. Assemble the connector (included or purchased separately) as shown in the
following diagram.
Small screws (3)
Connector bar
Small screws (2)
Socket
Connector-attaching
screws
Nuts (3)
Cable-securing
bracket
Nuts (2)
5. Insert the wired connector.
High-density I/O Unit
Connector
High-density I/O Unit
Connector
202
Section
Wiring
5-3
6. Remove the protective label after wiring has been completed to allow air circulation needed for cooling.
After wiring
Remove label after wiring.
Tighten the connector-attaching screws to a torque of 0.2 N-m.
Preassembled Cables
The following examples show applications for preassembled OMRON Cables.
Contact your OMRON dealer for more details.
The following cables are compatible with C200H Group-2 High-density I/O
Units.
C200H Group-2
High-density I/O Units
1, 2, 3...
1. Connecting to a terminal block.
C200H Group-2 High-density I/O Unit
C200H-ID216/218 (32 input points)
C200H-ID217/219 (64 input points)*
C200H-OD218/21B (32 output points)
C200H-OD219 (64 output points)*
*(Two sets needed for 64-point Units.)
XW2Z-B Connecting Cable
for Connector-Terminal Block
Conversion Unit
C200H Group-2 High-density Input Unit
C200H-ID216 (32 input points)
C200H-ID217 (64 input points)*
*(Two sets needed for 64-point Unit.)
XW2Z-D Connecting Cable
for Connector-Terminal Block
Conversion Unit
16 inputs
Connector-Terminal Block
Conversion Unit with Flat Cable
XW2B-40G5 (M3.5 terminal screws)
XW2B-40G4 (M2.5 terminal screws)
Connector-Terminal Block
16 inputs Conversion Unit (common-type)
XW2C-20G5-IN16
203
Section
Wiring
2. Connecting to a Relay Terminal.
C200H Group-2 High-density I/O Unit
C200H-ID216/218 (32 input points)
C200H-ID217/219 (64 input points)
G79-IC- Connecting Cable
for Relay Terminals
(For I/O Units with PC32/64-point
connectors.)
G79-I16 Input Relay Terminals
204
C200H Group-2 High-density I/O Unit
C200H-OD218/OD21B (32 output points)
C200H-OD219 (64 output points)
G79-OC- Connecting Cable
for Relay Terminals
(For I/O Units with PC32/64-point
connectors.)
G7TC-OC16, G70D-O16,
G70A-ZOC16-3
Output Relay Terminals
G70D-O16-1 (OD21B only)
G70A-ZOC16-1 (OD21B only)
5-3
Section
Wiring
CS1 Basic I/O Units with
Connectors
1, 2, 3...
The following cables are compatible with CS1 High-density I/O Units.
1. Connecting to a terminal block. (Two of the following Cables and Conversion Units are required.)
CS1 Basic I/O Unit
CS1W-ID291 (96 input points)
CS1W-OD291 (96 output points)
CS1W-OD292 (96 output points)
CS1W-MD291 (48 inputs, 48 outputs)
CS1W-MD292 (48 inputs, 48 outputs)
2 required
XW2Z-H-1 Connecting
Cable for Connector-Terminal
Block Conversion Unit
2 required
Connector-Terminal Block
Conversion Unit with Flat Cable
XW2B-60G4 or XW2B-60G5
CS1 Basic I/O Unit
CS1W-ID291 (96 input points)
CS1W-OD291 (96 output points)
CS1W-OD292 (96 output points)
CS1W-MD291 (48 inputs, 48 outputs)
CS1W-MD292 (48 inputs, 48 outputs)
XW2Z-H-2 Connecting
Cable for Connector-Terminal
Block Conversion Unit
2 required
5-3
Connector-Terminal Block Conversion
Unit with Flat Cable
XW2B-40G4 or XW2B-40G5
Connector-Terminal Block Conversion
Unit with Flat Cable
XW2B-20G4 or XW2B-20G5
CS1 Basic I/O Unit
CS1W-ID291 (96 input points)
CS1W-OD291 (96 output points)
CS1W-OD292 (96 output points)
CS1W-MD291 (48 inputs, 48 outputs)
CS1W-MD292 (48 inputs, 48 outputs)
XW2Z-H-3 Connecting
Cable for Connector-Terminal
Block Conversion Unit
Connector-Terminal Block Conversion Unit with Flat Cable
XW2B-20G5 or XW2B-20G4
CS1 Basic I/O Unit
CS1W-ID231
CS1W-ID261
CS1W-OD231
CS1W-OD232
CS1W-OD261
CS1W-OD262
CS1W-MD261
CS1W-MD262
Connecting Cable
XW2Z-B
XW2Z-D
Connector-Terminal Block
Conversion Unit
XW2B-40G4, XW2B-40G5, or
XW2C-20GB-IN16 (Connectable to Input Unit only.)
205
Section
Wiring
5-3
2. Connecting to a Relay Terminal. (Two of the following Cables and Relay Terminals are required.)
CS1 Basic I/O Unit
CS1W-ID291 (96 input points)
CS1W-OD291 (96 output points)
CS1W-OD292 (96 output points)
CS1W-MD291 (48 inputs, 48 outputs)
CS1W-MD292 (48 inputs, 48 outputs)
CS1 Basic I/O Unit
CS1W-ID231
CS1W-ID261
CS1W-MD261 (inputs)
CS1W-OD291
CS1W-OD261
CS1W-MD261 (outputs)
CS1W-OD292
CS1W-OD262
CS1W-MD262 (outputs)
#1
#2
#3
G79-C--
Connecting Cable for Relay Terminals
2 required
Connecting Cable
#1: G79-IC-
#2: G79-OC-
G7TC-I16 Input Relay Terminals or
G7TC-OC16 Output Relay Terminals
(CS1W-OD291/MD291)
G7TC-OC16-1 Output Relay Terminals
(CS1W-OD292/MD292)
#1: G7TC-I16
#2: G7TC-OC16
70D-O16
70A-ZOC16-3 and relays
#3: 70D-O16-1
70A-ZOC16-4
C200H High-density I/O
Units
1, 2, 3...
The following cables are compatible with C200H High-density I/O Units (a kind
of C200H Special I/O Unit).
1. Connecting to a terminal block.
C200H High-density Input Unit
C200H-ID215 (32 input points)
C200H-ID501 (32 input points)
C200H-OD215 (32 output points)
C200H-OD501 (32 output points)
C200H-MD215 (16 inputs/16 outputs)
C200H-MD115 (16 inputs/16 outputs)
C200H-MD501 (16 inputs/16 outputs)
XW2Z-A Connecting Cable for ConnectorTerminal Block Conversion Unit
(For I/O Units with PC32-point connectors.)
Connector-Terminal Block Conversion Unit
XW2B-20G4/20G5/20G5-D (all 16 points)
XW2B-40G5-T (32-point twin connector)
OR
Connector-Terminal Block Conversion Unit
XW2C-20G5-IN16 (16 input points, common-type)
206
Section
Wiring
5-3
2. Connecting to a Relay Terminal.
C200H High-density I/O Unit
C200H-OD215 (32 output points)
C200H-OD501 (32 output points)
C200H-MD215 (16 inputs/16 outputs)
C200H High-density I/O Unit
C200H-ID215 (32 input points)
C200H-ID501 (32 input points)
G79-C Connecting Cable
for Relay Terminals
(For I/O Units with
PC32/64-point connectors.)
G79-C Connecting Cable
for Relay Terminals
(For I/O Units with
PC32/64-point connectors.)
G79-I16
Input Relay Terminal
G7TC-OC
G70D, G70A
Output Relay Terminal
5-3-5 Connecting I/O Devices
Input Devices
Use the following information for reference when selecting or connecting input
devices.
DC Input Units
The following types of DC input devices can be connected.
Contact output
IN
DC Input Unit
COM
Two-wire DC output
IN
Sensor
Power
Supply
+
DC Input Unit
COM
NPN open-collector output
+
Output
7 mA
0V
Sensor
Power
Supply
IN
DC Input Unit
COM
207
Section
Wiring
5-3
NPN current output
+
Current
regulator
IN
Output
7 mA
0V
Sensor
Power
Supply
DC Input Unit
COM
PNP current output
+
Sensor
Power
Supply
Output
IN
7 mA
AC/DC Input Unit
COM
0V
Voltage current output
+
COM
Output
0V
IN
DC Input Unit
Sensor
Power
Supply
The circuit below should NOT be used for I/O devices having a voltage output.
Voltage output
+
Output
0V
208
Sensor
Power
Supply
IN
COM
DC Input Unit
Section
Wiring
5-3
The following types of AC input devices can be connected.
AC Input Units
Contact output
IN
AC Input Unit
COM
AC Switching
IN
AC Input Unit
Proximity
switch
main
circuit
COM
Note When using a reed switch as the input contact for an AC Input Unit, use a switch
with an allowable current of 1 A or greater. If Reed switches with smaller allowable currents are used, the contacts may fuse due to surge currents.
When using a two-wire sensor with a 12-VDC or 24-VDC input device, check
that the following conditions have been met. Failure to meet these conditions
may result in operating errors.
Precautions when
Connecting a Two-wire
DC Sensor
1, 2, 3...
1. Relation between voltage when the PC is ON and the sensor residual voltage:
VON x VCC – VR
2. Relation between voltage when the PC is ON and sensor control output
(load current):
IOUT (min) x ION x IOUT (max.)
ION = (VCC – VR – 1.5 [PC 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 x (VCC – VR)/(IOUT (min.) – ION)
Power W y (VCC – VR)2/R × 4 [allowable margin]
Note The residual voltage in the PC is 4.0 V for the following Units:
C200H-ID211/ID212/IM211/IM212/INT01
The residual voltage is 1.5 V for all other Units.
209
Section
Wiring
5-3
3. Relation between current when the PC is OFF and sensor leakage current:
IOFF y Ileak
Refer to Input Leakage Current later in this section for details.
The IOFF values differ for each Unit, but is always 1.3 mA for Input Units
whose OFF current specifications are not given.
DC Input Unit
Two-wire sensor
RIN
R
VR
VCC
VR:
VCC: Power voltage
VON: PC ON voltage
Sensor output residual current
IOUT: Sensor control current (load current)
ION: PC ON current
Ileak: Sensor leakage current
IOFF: PC OFF current
RIN: PC input impedance
R:
Bleeder resistance
4. Precautions on Sensor Surge Current
An incorrect input may occur if a sensor is turned ON after the PC 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.
Example
In this example, the sensor’s power supply voltage is used as the input to
CIO 000000 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 CIO 000001 will cause
output bit CIO 000100 to turn ON.
000000
TIM
0000
#0001
TIM0000
000001
000100
Input Leakage Current
When two-wire sensors, such as photoelectric sensors, proximity sensors, or
limit switches with LEDs, are used, the input bit may be turned ON erroneously
by leakage current. A leakage current below 1.0 mA won’t cause problems, but
connect a bleeder resistor across the input as shown below when the leakage
current exceeds 1.0 mA.
Input
power
supply
Sensor
210
Bleeder
resistor
R
PC
Section
Wiring
5-3
Determine the resistance (R) and power rating (W) for the bleeder resistor using
the following formulas.
R+
I
L C 5.0
L C * 5.0
W + 2.3
R
K max.
W min.
LC: Input impedance (KΩ)
I: Leakage current in mA
R: Bleeder resistance (KΩ)
W: Resistor power rating (W)
The equations above are based on the following relationships.
R
I
W w
R)
Input voltage (24)
Input current (I C)
Input voltage (24)
Input current (I C)
Input voltage (24)
R
v OFF voltage (E C : 5.0)
Input voltage (24)
IC: Input current (mA)
EC: OFF voltage (V)
Tolerance (4)
Note Check the Unit’s specifications to verify the actual values for LC, IC, and EC.
Output Wiring Precautions
Output Short-circuit
Protection
If a load connected to the output terminals is short-circuited, output components
and the and 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.
Transistor Output
Residual Voltage
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.
Output Leakage Current
If a Triac Output Unit is used to drive a low-current load, the leakage current may
prevent the output device from turning OFF. To prevent this, connect a bleeder
resistor in parallel with the load as shown in the following diagram.
OUT
L
R
Load power supply
PC
Bleeder resistor
COM
Use the following formula to determine the resistance and rating for the bleeder
resistor.
Rt
Output Surge Current
VON: ON voltage of the load (V)
I: Leakage current (mA)
R: Bleeder resistance (KΩ)
V ON
I
When connecting a transistor or triac output to an output device having a high
surge 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 surge current.
Method 1
Add a resistor that draws about 1/3 of the current consumed by the bulb.
OUT
L
R
+
COM
211
Section
Wiring
5-3
Method 2
Add a control resistor as shown in the following diagram.
R
OUT
L
+
COM
5-3-6 Reducing Electrical Noise
I/O Signal Wiring
Whenever possible, place I/O signal lines and power lines in separate ducts or
raceways both inside and outside of the control panel.
1 = I/O cables
2 = Power cables
Suspended duct
In-floor duct
Conduits
If the I/O wiring and power wiring must be routed in the same duct, use shielded
cable and connect the shield to the GR terminal to reduce noise.
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
L
Diode
DC input
COM
OUT
Relay output or
triac output
L
Surge suppressor
COM
OUT
Relay output or
transistor output
L
Diode
+
COM
Note Use surge suppressors and diodes with the following specifications.
Surge suppressor specifications
Resistor: 50 Ω
Capacitor: 0.47 µF
Voltage: 200 V
External Wiring
212
Diode specifications
Breakdown voltage: 3 times load voltage min.
Mean rectification current: 1 A
Observe the following precautions for external wiring.
• When multi-conductor signal cable is being used, avoid combining I/O wires
and other control wires in the same cable.
Section
Wiring
5-3
• If wiring racks are parallel, allow at least 300 mm (12 inches) between the
racks.
Low-current cables
PC I/O wiring
300 mm min.
Control cables
PC power supply and
general control circuit wiring
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.
PC I/O wiring
PC power supply
and general
control wiring
Steel sheet metal
Power lines
200 mm min.
Ground to 100 Ω or less
213
SECTION 6
CPU Unit Operation
This section describes the basic structure and operation of the CPU Unit.
6-1
6-2
6-3
6-4
Internal Structure of the CPU Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-2-1 Description of Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-2-2 Initialization of I/O Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-2-3 Startup Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Programs and Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Description of Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
216
218
218
219
219
220
222
215
Section
Internal Structure of the CPU Unit
6-1
6-1
Internal Structure of the CPU Unit
The following diagram shows the internal structure of the CPU Unit.
CPU Unit
Task 1
Task 2
The program is divided
into tasks and the tasks
are executed in order by
task number.
User program
Task n
Memory Card
I/O memory, PC Setup,
programs and the EM area
can be saved as files.
I/O memory
EM file memory
PC Setup and
other parameters
DIP switch
The User Program
The user program is created from up to 288 program tasks, including interrupt
tasks. The tasks are transferred to the CPU Unit from the CX-Programmer programming software.
There are two types of tasks. The first is a cyclic task that is executed once per
cycle (maximum of 32) and the other is an interrupt task that is executed only
when the interrupt conditions occur (maximum of 256). Cyclic tasks are
executed in numerical order.
Program instructions read and write to I/O memory and are executed in order
starting at the top of the program. After all cyclic tasks are executed, the I/O for all
Units are refreshed, and the cycle repeats again starting at the lowest cyclic task
number.
I/O Memory
I/O memory is the RAM area used for reading and writing from the user program.
It is comprised of one area that is cleared when power is turned ON and OFF,
and another area that will retain data.
I/O memory is also partitioned into an area that exchanges data with all units and
an area strictly for internal use. Data is exchanged with all units once per instruction execution cycle using one of two methods depending on the instruction that
is executed.
PC Setup
The PC Setup is used to set various initial or other settings through software
switches.
DIP Switches
DIP switches are used to set initial or other settings through hardware switches.
Memory Cards
Memory Cards are used as needed to store data such as programs, I/O memory
data, the PC Setup, and I/O comments created by Programming Devices. Programs and various system settings can be written automatically from the
Memory Card when power is turned ON (automatic transfer at startup).
216
Section
Internal Structure of the CPU Unit
6-1
Block Diagram of CPU Unit Memory
CPU Unit memory (RAM) is comprised of the following blocks in the CS1 Series:
• Parameter area (PC Setup, registered I/O table, routing table, and CS1 CPU
Bus Unit settings)
• I/O memory area
• The user program (including task information)
Data in the areas above is backed up by battery (model: CS1W-BAT01), but will
be lost if battery power is low.
CPU Unit
Parameter area (Note 1)
I/O memory area
Drive 1: EM file memory
(Note 2)
User program (Note 1)
Backup
Battery
A newly mounted battery will
be good up to five years at an
ambient temperature of 25°C.
Drive 0: Memory card
(flash memory)
File memory
Note
1. The parameter area and user program (i.e., the user memory) can be writeprotected by turning ON pin 1 of the DIP switch on the front of the CPU Unit.
2. EM file memory is part of the EM Area that has been converted to file
memory in the PC Setup. All EM banks from the specified bank to the end of
the EM Area can be used only as file memory for storage of data and program files.
3. Be sure to install the battery provided (CS1W-BAT01) before using the CPU
Unit for the first time. After installing the battery, use a Programming Device
to clear the PC’s RAM (parameter area, I/O memory area, and user program).
217
Section
Operating Modes
6-2
6-2
Operating Modes
6-2-1 Description of Operating Modes
The following operating modes are available in the CPU Unit. These modes control the entire user program and are common to all tasks.
PROGRAM Mode
Program execution stops in PROGRAM mode. This mode is used when editing
the program or making other preparations operation, such as the following:
• Registering the I/O table.
• Changing PC Setup and other settings.
• Transferring and checking programs.
• Force-setting and resetting bits to check wiring and bit allocation.
In this mode, all cyclic and interrupt tasks are non-executing (INI), that is they
stop. See 6-4 Description of Tasks for more details on tasks.
I/O refreshing is performed in PROGRAM mode.
! WARNING The CPU Unit refreshes I/O even when the program is stopped (i.e., even in
PROGRAM mode). Confirm safety thoroughly in advance before changing the
status of any part of memory allocated to I/O Units, Special I/O Units, or CPU Bus
Units. Any changes to the data allocated to any Unit may result in unexpected
operation of the loads connected to the Unit. Any of the following operation may
result in changes to memory status.
• Transferring I/O memory data to the CPU Unit from a Programming Device.
• Changing present values in memory from a Programming Device.
• Force-setting/-resetting bits from a Programming Device.
• Transferring I/O memory files from a Memory Card or EM file memory to the
CPU Unit.
• Transferring I/O memory from a host computer or from another PC on a network.
MONITOR Mode
The following operations can be performed through Programming Devices while
the program is executing in MONITOR mode. This mode is used to make test
runs or other adjustments.
• Online Editing.
• Force-setting and force-resetting bits.
• Changing values in I/O memory.
In this mode, cyclic tasks that are executable (READY) at the start of operation
or that are made executable by TKON(820) will be executed when program
execution reaches their task number. Interrupt tasks will be executed if their interrupt conditions occur.
RUN Mode
This mode is used for normal program execution. Some Programming Device
operations like online editing, force-set/force-reset, and changing I/O memory
values are disabled in this mode, but other Programming Device operations like
monitoring the status of program execution (monitoring programs and monitoring I/O memory) are enabled.
Cyclic tasks that are executable (READY) at the start of operation or that are
made executable by TKON(820) will be executed when program execution
reaches their task number. Interrupt tasks will be executed if their interrupt
conditions occur.
See 15-2 CPU Unit Operating Modes for more details on operations that are
available in each operating mode.
218
Section
Operating Modes
6-2
6-2-2 Initialization of I/O Memory
The following table shows which data areas will be cleared when the operating
mode is changed from PROGRAM mode to RUN/MONITOR mode or vice-versa.
Mode change
Note
RUN/MONITOR → PROGRAM
Non-held Areas
(Note 1)
Clear (Note 3)
Held Areas
(Note 2)
Retained
PROGRAM → RUN/MONITOR
Clear (Note 3)
Retained
RUN ↔ MONITOR
Retained
Retained
1. Non-held areas: CIO Area, Work Area, Timer PVs, Timer Completion Flags,
Index Registers, Data Registers, Task Flags, and Condition Flags.
(The statuses of some addresses in the Auxiliary Area are held and others
are cleared.)
2. Held areas: Holding Area, DM Area, EM Area, Counter PVs, and Counter
Completion Flags.
3. Data in I/O memory will be retained when the IOM Hold Bit (A50012) is ON.
When the IOM Hold Bit (A50012) is ON and operation is stopped due to a
fatal error (including FALS(007)), the contents of I/O memory will be retained but outputs on Output Units will all be turned OFF.
6-2-3 Startup Mode
Refer to 8-5 Explanations of PC Setup Settings for details on the Startup Mode
setting for the CPU Unit.
Note Change the PC Setup setting from the default value to change the Startup Mode
to MONITOR Mode or RUN Mode.
219
Section
Programs and Tasks
6-3
6-3
Programs and Tasks
Tasks specify the sequence and interrupt conditions under which individual programs will be executed. They are broadly grouped into the following types:
1, 2, 3...
1. Tasks executed sequentially that are called cyclic tasks.
2. Tasks executed by interrupt conditions that are called interrupt tasks.
Programs allocated to cyclic tasks will be executed sequentially by task number
and I/O will be refreshed once per cycle after all tasks (more precisely tasks that
are in executable status) are executed. If an interrupt condition goes into effect
during processing of the cyclic tasks, the cyclic task will be interrupted and the
program allocated to the interrupt task will be executed.
Program A
Cyclic
task 0
Allocation
Interrupt condition
goes into effect
Program B
Interrupt
task 100
Allocation
Cyclic
task 1
Program C
Allocation
Program D
Cyclic
task n
Allocation
I/O refreshing
With earlier OMRON PCs, one continuous program is formed from several
parts. The programs allocated to each task are single programs that terminate
with an END instruction, just like the single program in earlier PCs.
220
Section
Programs and Tasks
6-3
One feature of the cyclic tasks is that they can be enabled (executable status)
and disabled (standby status) by the task control instructions. This means that
several program components can be assembled as a task, and that only specific
programs (tasks) can then be executed as needed for the current product model
or process being performed (program step switching). Therefore performance
(cycle time) is greatly improved because only required programs will be
executed as needed.
CS1 Series
Earlier system
Task 1
One continuous
subprogram
Allocation
Tasks can be put into nonexecuting (standby) status.
Task 2
Task 3
I/O refreshing
I/O refreshing
A task that has been executed will be executed in subsequent cycles, and a task
that is on standby will remain on standby in subsequent cycles unless it is
executed again from another task.
Note Unlike earlier programs that can be compared to reading a scroll, tasks can be
compared to reading through a series of individual cards.
• All cards are read in a preset sequence starting from the lowest number.
• All cards are designated as either active or inactive, and cards that are inactive
will be skipped. (Cards are activated or deactivated by task control instructions.)
221
Section
Description of Tasks
6-4
• A card that is activated will remain activated and will be read in subsequent
sequences. A card that is deactivated will remain deactivated and will be
skipped until it is reactivated by another card.
Earlier program:
Like a scroll
CS1-series program:
Like a series of cards that can be activated
or deactivated by other cards.
Activated
6-4
Deactivated
Description of Tasks
Tasks are broadly grouped into the following types:
1, 2, 3...
222
1. Cyclic tasks (32 max.)
Tasks that will be executed once per cycle if executable.
2. Interrupt tasks
Tasks that are executed when the interrupt occurs whether or not a cyclic
task is being executed.
Interrupt tasks are grouped into the following types:
a) Power OFF interrupt task: Executed when power is interrupted.
(1 max.)
b) Scheduled interrupt task: Executed at specified intervals. (2 max.).
c) I/O interrupt task:
Executed when an Interrupt Input Unit contact turns ON (32 max.).
d) External interrupt task:
Executed when requested by an Intelligent
I/O Unit, CS1 CPU Bus Unit or Inner Board
(256 max.).
A total of 288 tasks with 288 programs can be created and controlled through the
CX-Programmer. These include up to 32 cyclic tasks and 256 interrupt tasks.
Section
Description of Tasks
6-4
Each program is allocated 1:1 to a task through individual program property settings set with the CX-Programmer.
Cyclic task 0
Interrupt task 5
Executed in order starting
from the lowest number.
Cyclic task 1
Interrupt occurs
Cyclic task 2
Note
Condition Flags (ER, >, =, etc.) and instruction
conditions (interlock ON, etc.) are cleared at the
beginning of each task.
I/O refreshing
Peripheral processing
Program Structure
Standard subroutine programs can be created and allocated to tasks as needed
to create programs. This means that programs can be created in modules (standard components) and that tasks can be debugged individually.
Standard subroutine programs
User program ABC
User program ABD
Task 1 (A)
Task 1 (A)
Task 2 (B)
Task 2 (B)
Task 3 (C)
Task 3 (D)
When creating modular programs, addresses can be specified by symbols to
facilitate standardization.
223
Section
Description of Tasks
Executable and Standby
Status
The TASK ON and TASK OFF instructions (TKON(820) and TKOF(821)) can be
executed in one task to place another task in executable or standby status.
Instructions in tasks that are on standby will not be executed, but their I/O status
will be maintained. When a task is returned to executable status, instructions will
be executed with the I/O status that was maintained.
Example: Programming with a Control Task
In this example, task 0 is a control task that is executed first at the start of operation. Other tasks can be set by Programming Devices (except Programming
Consoles) to start up at the start of operation.
Task 0
Program
Task 0 (control task)
Task 1
Task 2
Task 3
Example: Task 0 is set to be executed at the start of operation.
Task 1 is executable when a is ON.
Task 1 is put on standby when b is ON.
Tasks 2 and 3 are executable when c is ON.
Tasks 2 and 3 are put on standby when d is ON.
Task 0
Start task 1
when a is
ON.
Task 0
Put task 1 on
standby when
b is ON.
Task 0
Task 1
Task 1
Task 1
Task 2
Task 2
Task 2
Task 3
Task 3
Task 3
Task 0
224
6-4
Start tasks 2
and 3 when
c is ON.
Task 0
Put tasks 2
and 3 on
standby
when d is
ON.
Task 0
Task 1
Task 1
Task 2
Task 2
Task 2
Task 3
Task 3
Task 3
Task 1
Section
Description of Tasks
6-4
Example: Each Task Controlled by Another Task
In this example, each task is controlled by another task.
Program
Program for task 0
Task 0
Task 1
Task 2
Program for task 1
Example: Task 1 is set to be executed at the start of operation
unconditionally.
Task 1 executable when a is ON.
Task 1 put on standby when b is ON.
Task 2 is executable when c is ON and task 1 has
been executed.
Start task 1
when a is
ON.
Task 0
Task 0
Task 1
Task 1
Task 2
Task 2
Put task 1
on standby
when b is
ON.
Task 0
Task 1
Task 2
If task 1 executed
Note
TKOF(821) can be used in a task to put that
task itself on standby.
Start
task 2
when c
is ON.
Task 0
Task 1
Task 2
Task Execution Time
While a task is in standby, instructions in that task will not be executed so their
OFF instruction execution time will not be added to the cycle time.
Note From this standpoint, instructions in a task that is on standby are just like instructions in a jumped program section (JMP-JME).
Since instructions in a non-executed task do not add to the cycle time, the overall
system performance can be improved significantly by splitting the system into an
overall control task and individual tasks that are executed only when necessary.
Earlier system
Most instructions
are executed.
(Instructions in
subroutines and
jumps are
executed only
when necessary.)
CS1-series PCs
Task 0
Task 1
Instructions are
executed only
when necessary.
Task 2
Task 3
225
SECTION 7
Memory Areas
This section describes the structure and functions of the I/O Memory Areas and Parameter Areas.
7-1
7-2
7-3
7-4
7-5
7-6
7-7
7-8
7-9
7-10
7-11
7-12
7-13
7-14
7-15
7-16
7-17
7-18
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
I/O Memory Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-2-1 I/O Memory Area Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-2-2 Overview of the Data Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-2-3 Data Area Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Precautions in Using C200H Special I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CIO Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-4-1 CompoBus/D Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-4-2 PC Link Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-4-3 Data Link Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-4-4 CS1 CPU Bus Unit Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-4-5 Inner Board Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-4-6 Special I/O Unit Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-4-7 SYSMAC BUS Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-4-8 I/O Terminal Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Work Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Holding Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Auxiliary Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TR (Temporary Relay) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Timer Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Counter Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Memory (DM) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Extended Data Memory (EM) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Task Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Condition Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Clock Pulses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Parameter Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
228
229
229
231
235
236
237
243
244
245
247
248
249
250
251
252
253
254
266
267
268
268
270
272
277
278
278
280
281
227
Section
Introduction
7-1
7-1
Introduction
The CPU Unit’s memory (RAM with battery back-up) can be divided into three
parts: the User Program Memory, I/O Memory Area, and Parameter Area. This
section describes the I/O Memory Area and Parameter Area.
I/O Memory Area
This region of memory contains the data areas which can be accessed by
instruction operands. The data areas include the CIO Area, Work Area, Holding
Area, Auxiliary Area, DM Area, EM Area, Timer Area, Counter Area, Task Flag
Area, Data Registers, Index Registers, Condition Flag Area, and Clock Pulse
Area.
Instruction
Parameter Area
I/O Memory Area
This region of memory contains various settings that cannot be specified by
instruction operands; they can be specified from a Programming Device only.
The settings include the PC Setup, I/O Table, Routing Table, and CS1 CPU Bus
Unit settings.
Programming Device
Parameter Area
228
Section
I/O Memory Areas
7-2
7-2
I/O Memory Areas
7-2-1 I/O Memory Area Structure
The following table shows the basic structure of the I/O Memory Area.
Area
Size
Range
Task
usage
External
I/O allocation
Bit access
Access
Word
access
Read
CIO
Area
I/O Area
CompoBus/D
Areas
Write
Change
from
Programming
Device
Status at
startup
or mode
change
Forcing
bit status
5,120
bits (320
words)
CIO 0000
to
CIO 0319
(See Note
1)
Shared
by all
tasks
Basic
I/O Units
OK
OK
OK
OK
OK
Cleared
(See Note
3)
OK
1,600
bits (100
words)
Outputs:
CIO 0050
to
CIO 0099
Shared
by all
tasks
CompoBus/D
Slaves
OK
OK
OK
OK
OK
Cleared
(See Note
3)
OK
---
OK
OK
OK
OK
OK
Data link
or PC
Link
OK
OK
OK
OK
OK
Inputs:
CIO 0350
to
CIO 0399
PC Link
Words
32 bits (4
words)
CIO 0247
to
CIO 0250
A442
Data Link
Area
3,200
bits (200
words)
CIO 1000
to
CIO 1199
CS1 CPU
Bus Unit
Area
6,400
bits (400
words)
CIO 1500
to
CIO 1899
CS1
CPU
Bus
Units
OK
OK
OK
OK
OK
OK
Special I/O
Unit Area
15,360
bits (960
words)
CIO 2000
to
CIO 2959
Special
I/O Units
OK
OK
OK
OK
OK
OK
Inner Board
Area
1,600
bits (100
words)
CIO 1900
to
CIO 1999
Inner
Board
OK
OK
OK
OK
OK
OK
SYSMAC
BUS Area
800 bits
(50
words)
CIO 3000
to
CIO 3049
Slave
Racks
OK
OK
OK
OK
OK
OK
I/O Terminal
Area
512 bits
(32
words)
CIO 3100
to
CIO 3131
Slaves
other
than
Racks
OK
OK
OK
OK
OK
Internal I/O
Areas
37,504
bits
(2,344
words)
4,800
bits (300
words)
CIO 1200
to
CIO 1499
---
OK
OK
OK
OK
OK
Work Area
8,192
bits (512
words)
W000 to
W511
---
OK
OK
OK
OK
OK
Cleared
OK
Holding Area
8,192
bits (512
words)
H000 to
H511
---
OK
OK
OK
OK
OK
Maintained
OK
Auxiliary Area
15,360
bits (960
words)
A000 to
A959
---
OK
OK
OK
A000 to
A447 No
A000 to
A447 No
No
A448 to
A959
OK
A448 to
A959
OK
Varies
from address to
address.
TR Area
16 bits
TR0 to
TR15
---
OK
---
OK
OK
No
Cleared
No
DM Area
32,768
words
D00000 to
D32767
---
No (See
Note 2)
OK
OK
OK
OK
Maintained
No
Shared
by all
tasks
Shared
by all
tasks
OK
Cleared
(See Note
3)
Cleared
(See Note
3)
OK
OK
OK
CIO 3800
to
CIO 6143
Shared
by all
tasks
229
Section
I/O Memory Areas
Area
Size
Range
Task
usage
External
I/O allocation
Bit access
Word
access
Access
Read
EM Area
32,768
words
per bank
(0 to C,
13 max.)
E0_00000
to
EC_32767
Timer Completion
Flags
4,096
bits
Counter Completion
Flags
Shared
by all
tasks
Write
7-2
Change
from
Programming
Device
Status at
startup
or mode
change
Forcing
bit status
---
No (See
Note 2)
OK
OK
OK
OK
Maintained
No
T0000 to
T4095
---
OK
---
OK
OK
OK
Cleared
OK
4,096
bits
C0000 to
C4095
---
OK
---
OK
OK
OK
Maintained
OK
Timer PVs
4,096
words
T0000 to
T4095
---
---
OK
OK
OK
OK
Cleared
No (See
Note 3)
Counter PVs
4,096
words
C0000 to
C4095
---
---
OK
OK
OK
OK
Maintained
No (See
Note 4)
Task Flag Area
32 bits
TK00 to
TK31
---
OK
---
OK
No
No
Cleared
No
Index Registers
16 registers
IR0 to
IR15
---
OK
OK
Indirect
addressing only
Specific
instructions
only
No
Cleared
No
Data Registers
16 registers
DR0 to
DR15
---
No
OK
OK
OK
No
Cleared
No
Note
230
Used
separately in
each
task
1. The I/O Area can be expanded to CIO 0000 to CIO 0999 by changing the
first word allocated to Racks.
2. The status of bits in the DM and EM Areas can be used tested using
TST(350) and TSTN(351).
3. Timer PVs can be refreshed indirectly by forced setting/resetting Timer
Completion Flags.
4. Counter PVs can be refreshed indirectly by forced setting/resetting Counter
Completion Flags.
Section
I/O Memory Areas
7-2
7-2-2 Overview of the Data Areas
The data areas in the I/O Memory Area are described in detail below.
It isn’t 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 various Units. Words that aren’t allocated to Units may be used as
work words and work bits in the program only.
CIO Area
Bit
Word
15
CIO 0000
0
I/O Area
CIO 0319
(CIO 0320)
See note 1.
(Not used.)
(CIO 0999)
CIO 1000
Bit
Word
15
CIO 0000
0
Data Link Area
CIO 1199
CIO 1200
CIO 0050
CompoBus/D Area
(Outputs)
Internal I/O Area
CIO 1499
CIO 1500
See note 2.
CIO 0099
CS1 CPU Bus Unit Area
(25 words/Unit)
CIO 1899
CIO 1900
PC Link Area
CIO 0319
CIO 0320
Inner Board Area
(Not used.)
CIO 1999
CIO 2000
Special I/O Unit Area
(10 words/Unit)
CIO 2959
(CIO 2960)
CIO 0247
CIO 0250
CIO 0349
CIO 0350
CompoBus/D Area
(Input)
See note 2.
CIO 0399
CIO 0400
(Not used.)
(CIO 2999)
CIO 3000
(Not used.)
CIO 0999
SYSMAC BUS Area
CIO 3049
(CIO 3050)
(Not used.)
(CIO 3099)
CIO 3100
I/O Terminal Area
CIO 3131
(CIO 3132)
(Not used.)
(CIO 3799)
CIO 3800
Internal I/O Area
CIO 6143
Note
1. It is possible to use CIO 0320 to CIO 0999 for I/O words by making the appropriate settings for the first words on the Racks. Settings for the first words
on the Racks can be made using the CX-Programmer to set the first Rack
addresses in the I/O table. The settings range for the first Rack addresses is
from CIO 0000 to CIO 0900.
231
I/O Memory Areas
Section
7-2
2. When using a CompoBus/D Master Unit, be sure the same words are not
allocated to both Basic I/O Units and CompoBus/D I/O.
3. 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
These words are allocated to external I/O terminals on Basic I/O Units. Words
that aren’t allocated to external I/O terminals may be used only in the program.
CompoBus/D Area
These words are allocated to Slaves for CompoBus/D Remote I/O Communications. Allocations are fixed and cannot be changed. Be sure that allocates to not
overlap with those used for other I/O points.
PC Link Area
When PC Link Units are used to create a PC Link system, the PC Link Area contains flags that indicate PC Link errors and the operating status of CPU Units in
the PC Link. CIO 247 to CIO 250 are equivalent to SR 247 to SR 250 in the
C200HX/HG/HE PCs. (The PC Link Operating Level Flags, A44211 and
A44212, are equivalent to AR 2411 and AR 2412 in the C200HX/HG/HE PCs.)
Link Area
These words are used for data links in Controller Link Networks. Words that
aren’t used in data links may be used only in the program.
CS1 CPU Bus Unit Area
These words are allocated to CS1 CPU Bus Units to transfer status information.
Each Unit is allocated 25 words and up to 16 Units (with unit numbers 0 to 15)
can be used. Words that aren’t used by CS1 CPU Bus Units may be used only in
the program.
Special I/O Unit Area
These words are allocated to CS1 Special I/O Units and C200H Special I/O
Units. Each Unit is allocated 10 words and up to 96 Units (unit numbers 0 to 95)
can be used. (C200H Special I/O Units are limited to unit numbers 0 to F (15).)
Words that aren’t used by Special I/O Units may be used only in the program.
Inner Board Area
These words are allocated to Inner Boards such as Communications Boards. Up
to 100 words can be allocated for input and output.
SYSMAC BUS Area
These words are allocated to Slave Racks connected to SYSMAC BUS Remote
I/O Master Units. Each Rack is allocated 10 words and up to 5 Racks (rack numbers 0 to 4) can be used.
I/O Terminal Area
These words are allocated to Units other than Slave Racks (such as I/O Interfaces and I/O Terminals) that are connected to SYSMAC BUS Remote I/O Master Units. Each Unit is allocated 1 word except for Optical I/O Units which take 2
words; up to 32 Units (unit numbers 0 to 31) can be used.
Internal I/O Area
These words can be used only in the program; 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 (WR) before allocating 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 CS1 CPU Units, so the program may have to
be changed before being used in a new CS1-series PC if CIO Area words are
used as work words in the program.
Note CIO 25207 and CIO 25213 will be used for the M-Net Interface Network Restart
Bits when an T200H-MIF M-Net Interface Unit is connected to the CS1-series
232
Section
I/O Memory Areas
7-2
PC. Do not use these bits are work bits in programming. The M-Net Interface
Unit is restarted by turning ON these bits.
Work Area (WR)
Words in the Work Area can be used only in the program; they cannot be used for
I/O exchange with external I/O terminals. No new functions will be assigned to
this area in future versions of CS1 PCs, so use this area for work words and bits
before any words in the CIO Area.
Word 15
Bit
W511
Holding Area (HR)
Words in the Holding Area can be used only in the program. These words retain
their content when the PC is turned on or the operating mode is switched between PROGRAM mode and RUN or MONITOR mode.
Word 15
Bit
H511
Auxiliary Area (AR)
The Auxiliary Area contains flags and control bits used to monitor and control PC
operation. This area is divided into two parts: A000 to A447 are read-only and
A448 to A959 can be read or written. Refer to 7-7 Auxiliary Area 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.
The TR bits are used with mnemonics only.
233
Section
I/O Memory Areas
Data Memory Area (DM)
7-2
The DM Area is a multi-purpose data area that can be accessed in word-units
only. These words retain their content when the PC is turned on or the operating
mode is switched between PROGRAM mode and RUN or MONITOR mode.
Word
D00000
D20000
C200H Special I/O Unit Area
(10 words/Unit)
D29599
D30000
CS1 CPU Bus Unit Area
(100 words/Unit)
D31599
D32000
Inner Board Area
D32767
Extended Data Memory
Area (EM)
The EM Area is a multi-purpose data area that can be accessed in word-units
only. These words retain their content when the PC is turned on or the operating
mode is switched between PROGRAM mode and RUN or MONITOR mode.
The EM Area is divided into 32,767-word regions called banks. The number of
EM banks depends upon the model of CPU Unit, with a maximum of 13 banks (0
to C). Refer to 2-1 Specifications for details on the number of EM banks provided
in each model of CPU Unit.
Word
Word
E0_00000
EC_00000
E0_32767
EC_32767
Timer Area
There are two timer data areas, the Timer Completion Flags and the Timer Present Values (PVs). Up to 4,096 timers with timer numbers T0000 to T4095 can be
used. The same number is used to access a timer’s Completion Flag and PV.
Timer Completion Flags
These flags are read as bits. A Completion Flag is turned ON by the system
when the corresponding timer times out (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
There are two counter data areas, the Counter Completion Flags and the Counter Present Values (PVs). Up to 4,096 counters with counter numbers C0000 to
C4095 can be used. The same number is used to access a counter’s Completion Flag and PV.
Counter Completion Flags
These flags are read as bits. A Completion Flag is turned ON by the system
when the corresponding counter counts out (the set value is reached).
234
Section
I/O Memory Areas
7-2
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 labels (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 labels (symbols) rather than addresses.
Task Flag Area (TK)
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.
Index Registers (IR)
These registers (IR0 to IR15) are used to store PC memory addresses (absolute
memory addresses in RAM) to indirectly address words in I/O memory. The Index Registers are used separately in each task.
Data Registers (DR)
These registers (DR0 to DR15) are used together with the Index Registers.
When a Data Register is input just before an Index Register, the content of the
Data Register is added to the PC memory address in the Index Register to offset
that address. The Data Registers are used separately in each task.
7-2-3 Data Area Properties
Content After Fatal Errors, Forced Set/Reset Usage
Fatal Error Generated
Area
Forced Set/
Forced Reset
Functions
Usable?
Execution of FALS(007)
IOM Hold Bit IOM Hold Bit
OFF
ON
Retained
Retained
Other Fatal Error
IOM Hold Bit IOM Hold Bit
OFF
ON
Cleared
Retained
Yes
Retained
Retained
Cleared
Retained
Yes
Holding Area (H)
Retained
Retained
Retained
Retained
Yes
Auxiliary Area (A)
Status varies from address to address.
Data Memory Area (D)
Retained
Retained
Retained
Retained
No
Extended Data Memory Area (E)
Retained
Retained
Retained
Retained
No
Timer Completion Flags (T)
Retained
Retained
Cleared
Retained
Yes
Timer PVs (T)
Retained
Retained
Cleared
Retained
No
Counter Completion Flags (C)
Retained
Retained
Retained
Retained
Yes
Counter PVs (C)
Retained
Retained
Retained
Retained
No
Task Flags (TK)
Cleared
Cleared
Retained
Retained
No
Index Registers (IR)
Retained
Retained
Cleared
Retained
No
Data Registers (DR)
Retained
Retained
Cleared
Retained
No
CIO
Area
I/O Area
Link Area
CS1 CPU Bus Unit Area
Special I/O Unit Area
Inner Board Area
SYSMAC BUS Area
I/O Terminal Area
C200H Special I/O Unit Area
CompoBus/D Area
PC Link Area
Internal I/O Area
Work Area (W)
No
235
Section
Precautions in Using C200H Special I/O Units
7-3
Content After Mode Change or Power Interruption
Mode Changed1
Area
PC Power OFF to ON
IOM Hold
Bit OFF
Cleared
IOM Hold
Bit ON
Retained
IOM Hold Bit Cleared2
IOM Hold
IOM Hold
Bit OFF
Bit ON
Cleared
Cleared
Work Area (W)
Cleared
Retained
Cleared
Cleared
Cleared
Retained
Holding Area (H)
Retained
Retained
Retained
Retained
Retained
Retained
Auxiliary Area (A)
Status varies from address to address.
Data Memory Area (D)
Retained
Retained
Retained
Retained
Retained
Retained
Extended Data Memory Area (E)
Retained
Retained
Retained
Retained
Retained
Retained
Timer Completion Flags (T)
Cleared
Retained
Cleared
Cleared
Cleared
Retained
Timer PVs (T)
Cleared
Retained
Cleared
Cleared
Cleared
Retained
Counter Completion Flags (C)
Retained
Retained
Retained
Retained
Retained
Retained
Counter PVs (C)
Retained
Retained
Retained
Retained
Retained
Retained
Task Flags (TK)
Cleared
Cleared
Cleared
Cleared
Cleared
Cleared
Index Registers (IR)
Cleared
Retained
Cleared
Cleared
Cleared
Retained
Data Registers (DR)
Cleared
Retained
Cleared
Cleared
Cleared
Retained
CIO
Area
I/O Area
CompoBus/D Area
PC Link Area
Link Area
CS1 CPU Bus Unit Area
Special I/O Unit Area
Inner Board Area
SYSMAC BUS Area
I/O Terminal Area
Internal I/O Area
Note
IOM Hold Bit Held2
IOM Hold
IOM Hold
Bit OFF
Bit ON
Cleared
Retained
1. Mode changed from PROGRAM to RUN/MONITOR or vice-versa.
2. The PC Setup’s “IOM Hold Bit Status at Startup” setting determines whether
the IOM Hold Bit’s status is held or cleared when the PC is turned on.
7-3
Precautions in Using C200H Special I/O Units
Observe the following precautions when using C200H Special I/O Units.
Memory Areas
There are differences between the words allocated to Special I/O Units in the PC
memory areas, as shown in the following table.
PC
C200H/C200HS
IR/CIO
IR 100 to IR 199
Area
allocations
C200HX/HG/HE
IR 100 to IR 199
IR 400 to IR 459
CS1 Series
CIO 2000 to CIO 2959
(allocated CIO 2000 to
CIO 2159 for unit
numbers 0 up to 15)
DM Area
DM 1000 to DM 1999 DM 1000 to DM 1999 D20000 to D29599
allocations
DM 2000 to DM 2599 (allocated D20000 to
D21599 for unit
numbers 0 up to 15)
236
Section
CIO Area
7-4
There are special restrictions in programming, allocations, and data communications with the CPU Unit for the following C200H Special I/O Units. Refer to
Appendix G Restrictions in Using C200H Special I/O Units for details.
Restrictions
Unit
Model number
ASCII Units
C200H-ASC02/ASC11/ASC21/ASC31
High-speed Counter Units
C200H-CT001-V1/CT002
ID Sensor Units
C200H-IDS01-V1/IDS21
Position Control Units
C200H-NC111/NC112/NC211
Fuzzy Logic Units
C200H-FZ001
High-speed Counter Units
C200H-CT021
Motion Control Units
C200H-MC221
C200H I/O LInk Units
C200H-DRT21
There are no special restrictions for other C200H Special I/O Units.
7-4
CIO Area
I/O Area addresses range from CIO 0000 to CIO 0319 (CIO bits 000000 to
031915), but the area can be expanded to CIO 0000 to CIO 0999 by changing
the first Rack word with any Programming Device other than a Programming
Console. The maximum number of bits that can be allocated for external I/O will
still be 5,120 (320 words) even if the I/O Area is expanded.
Note The maximum number of external I/O points depends upon the CPU Unit being
used.
Words in the I/O Area can be allocated to I/O terminals on Basic I/O Units
(CS1 Basic I/O Units, C200H Basic I/O Units, and C200H Group-2 High-density I/O Units).
Words are allocated to Basic I/O Units based on the slot position (left to right) and
number of words required. The words are allocated consecutively and empty
slots are skipped. Words in the I/O Area that aren’t allocated to Basic I/O Units
can be used only in the program.
CIO 0000 to CIO 0319 include the CompoBus/D Output Area (CIO 0050 to
CIO 0099) and the PC Link Words CIO 0247 to CIO 0250. Be sure that word allocations do not overlap allocations for other I/O points when using a CompoBus/D Master Unit or when using a PC Link Unit.
The contents of the I/O Area will be cleared in the following cases:
I/O Area Initialization
1, 2, 3...
IOM Hold Bit Operation
1. The operating mode is changed from PROGRAM to RUN or MONITOR
mode or vice-versa and the IOM Hold Bit is OFF.
(See the following explanation of IOM Hold Bit Operation.)
2. The PC’s power supply is cycled and the IOM Hold Bit is OFF or not protected in the PC Setup.
(See the following explanation of IOM Hold Bit Operation.)
3. The I/O Area is cleared from a Programming Device.
4. PC operation is stopped when a fatal error other than an FALS(007) error
occurs. (The contents of the I/O Area will be retained if FALS(007) is
executed.)
If the IOM Hold Bit (A50012) is ON, the contents of the I/O Area won’t be cleared
when a fatal error occurs or the operating mode is changed from PROGRAM
mode to RUN or MONITOR mode or vice-versa.
If the IOM Hold BIt (A50012) is ON and the PC Setup’s “IOM Hold Bit Status at
Startup” setting is set to protect the IOM Hold Bit, the contents of the I/O Area
won’t be cleared when the PC’s power supply is cycled. All I/O bits, including
outputs, will retain the status that they had before the PC was turned off.
237
Section
CIO Area
7-4
Note If the I/O Hold Bit is turned ON, the outputs from the PC will not be turned OFF
and will maintain their previous status when the PC 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.)
Bits in the I/O Area can be force-set and force-reset.
Forcing Bit Status
Note When designating addresses in programming or allocations inside C200H Special I/O Units, “000” to “255” will specify CIO 0000 to CIO 0255 in the CPU Unit
and “000” to “511” will specify CIO 0000 to CIO 0511 in the CPU Unit. Other addresses in this area cannot be specified inside the C200H Special I/O Units.
Input Bits
A bit in the I/O Area is called an input bit when it is allocated to an Input Unit. Input
bits reflect the ON/OFF status of devices such as push-button switches, limit
switches, and photoelectric switches. There are three ways for the status of input points to be refreshed in the PC: normal I/O refreshing, immediate refreshing, and IORF(097) refreshing.
The status of I/O points on external devices is read once each cycle after program execution.
In the following example, CIO 000101 is allocated to switch 1, an external switch
connected to the input terminal of an Input Unit. The ON/OFF status of switch 1 is
reflected in CIO 000101 once each cycle.
Normal I/O Refreshing
Ladder symbol
Mnemonic
LD 000101
000101
CPU Unit
Input Unit
Bit allocation
CIO 000101
Switch 1
Once
each
cycle
When the immediate refreshing variation of an instruction is specified by inputting an exclamation point just before the instruction, and the instruction’s operand is an input bit or word, the word containing the bit or the word itself will be
refreshed just before the instruction is executed. This immediate refreshing is
performed in addition to the normal I/O refreshing performed once each cycle.
Immediate Refreshing
Note Immediate refreshing will be performed for input bits allocated to Basic I/O Units
only (excluding C200H Group-2 High-density I/O Units and Basic I/O Units
mounted in Remote I/O Slave Racks), not High-density I/O Units which are Special I/O Units.
1, 2, 3...
238
1. Bit Operand
Just before the instruction is executed, the ON/OFF status of the 16 I/O
points allocated to the word containing the specified bit will be read to the
PC.
Section
CIO Area
7-4
2. Word Operand
Just before the instruction is executed, the ON/OFF status of the 16 I/O
points allocated to the specified word will be read to the PC.
In the following example, CIO 000101 is allocated to switch 1, an external switch
connected to the input terminal of an Input Unit. The ON/OFF status of switch 1 is
read and reflected in CIO 000101 just before !LD 000101 is executed.
Ladder symbol
Mnemonic
000101
!LD 000101
Input Unit
CPU Unit
CIO 000101
Switch 0
Switch 1
Switch 7
Read
just before
instruction
execution.
IORF(097) Refreshing
When IORF(097) (I/O REFRESH) is executed, the input bits in the specified
range of words are refreshed. This I/O refreshing is performed in addition to the
normal I/O refreshing performed once each cycle.
Note IORF(097) refreshes input bits allocated to Basic I/O Units (excluding Basic I/O
Units mounted in Remote I/O Slave Racks), C200H Group-2 High-density I/O
Units, and other High-density I/O Units which are Special I/O Units.
The following IORF(097) instruction refreshes the status of all I/O points in I/O
Area words CIO 0000 to CIO 0003. The status of input points is read from the
Input Units and the status of output bits is written to the Output Units.
In the following example, the status of input points allocated to CIO 0000 and
CIO 0001 are read from the Input Unit. (CIO 0002 and CIO 0003 are allocated to
Output Units.)
CPU Unit
Input Unit
Switch 0
Switch 16
Switch 1
Switch 17
Switch 15
Switch 31
Read
when
IORF
(097)
is
exec
uted.
239
Section
CIO Area
Limitations on Input Bits
There is no limit on the number of times that input bits can be used as normally
open and normally closed conditions in the program and the addresses can be
programmed in any order.
An input bit cannot be used as an operand in an Output instruction.
00001
Input Response Time
Settings
7-4
000100
Not allowed if CIO 000100 is an input bit.
The input response times for each CS1 Input Unit can be set in the PC Setup.
Increasing the input response time will reduce chattering and the effects of noise
and decreasing the input response time allows higher speed input pulses to be
received.
The default value for input response times is 8 ms and the setting range is 0.5 ms
to 32 ms.
Note If the time is set to 0 ms, there will still be an ON delay time of 20 µs max. and an
OFF delay time of 300 µs due to delays caused by internal elements.
Pulses shorter than the time
constant are not received.
Input from switch
Input bit
Input time constant
Input time constant
Output Bits
A bit in the I/O Area is called an output bit when it is allocated to an Output Unit.
The ON/OFF status of an output bits are output to devices such as actuators.
There are three ways for the status of output bits to be refreshed to an Output
Unit: normal I/O refreshing, immediate refreshing, and IORF(097) refreshing.
Normal I/O Refreshing
The status of output bits are output to external devices once each cycle after program execution.
In the following example, CIO 000201 is allocated to an actuator, an external device connected to an output terminal of an Output Unit. The ON/OFF status of
CIO 000201 is output to that actuator once each cycle.
Ladder symbol
Mnemonic
OUT 000201
000201
CPU Unit
Bit allocation
CIO 000201
Output Unit
Actuator
Once
each
cycle
240
Section
CIO Area
7-4
When the immediate refreshing variation of an instruction is specified by inputting an exclamation point just before the instruction, and the instruction’s operand is an output bit or word, the content of the word containing the bit or the word
itself will be output just after the instruction is executed. This immediate refreshing is performed in addition to the normal I/O refreshing performed once each
cycle.
Immediate Refreshing
Note Immediate refreshing will be performed for output bits allocated to Basic I/O
Units only (excluding C200H Group-2 High-density I/O Units and Basic I/O Units
mounted in Remote I/O Slave Racks), not High-density I/O Units which are Special I/O Units.
1, 2, 3...
1. Bit Operand
Just after the instruction is executed, the ON/OFF status of the 16 I/O points
allocated to the word containing the specified bit will be output to the output
device(s).
2. Word Operand
Just after the instruction is executed, the ON/OFF status of the 16 I/O points
allocated to the specified word will be output to the output device(s).
In the following example, CIO 000201 is allocated to an actuator, an external device connected to the output terminal of an Output Unit. The ON/OFF status of
CIO 000201 is output to the actuator just after !OUT 000201 is executed.
Ladder symbol
Mnemonic
000201
OUT 000201
!
CPU Unit
Bit allocation
CIO 000201
Output Unit
Actuator
Output
just after
instruction
execution.
IORF(097) Refreshing
When IORF(097) (I/O REFRESH) is executed, the ON/OFF status of output bits
in the specified range of words is output to their external devices. This I/O refreshing is performed in addition to the normal I/O refreshing performed once
each cycle.
Note IORF(097) refreshes output bits allocated to Basic I/O Units (excluding Basic I/O
Units mounted in Remote I/O Slave Racks), C200H Group-2 High-density I/O
Units, and other High-density I/O Units which are Special I/O Units.
The following IORF(097) instruction refreshes the status of all I/O points in I/O
Area words CIO 0000 to CIO 0003. The status of input points is read from the
Input Units and the status of output bits is written to the Output Units.
241
Section
CIO Area
7-4
In this example, the status of input points allocated to CIO 0002 and CIO 0003
are output to the Output Unit. (CIO 0000 and CIO 0001 are allocated to Input
Units.)
CPU Unit
Bit allocation
CIO 0002
Output Unit
Actuator
CIO 0003
Output when
IORF (097)
is executed.
Limitations on Output
Bits
Output bits can be programmed in any order. Output bits can be used as operands in Input instructions and there is no limit on the number of times that an
output bit is used as a normally open and normally closed condition.
An output bit can be used in only one Output instruction that controls its status. If
an output bit is used in two or more Output instructions, only the last instruction
will be effective.
CIO 000000 is controlled
by CIO 000010.
Only this instruction is
effective.
Note All outputs on Basic I/O Units and Special I/O Units can be turned OFF by turning
ON the Output OFF Bit (A50015). The status of the output bits won’t be affected
even though the actual outputs are turned OFF.
242
Section
CIO Area
7-4
7-4-1 CompoBus/D Area
The CompoBus/D Area is divided into two parts:
1, 2, 3...
1. The CompoBus/D Output Area contains 50 words with addresses ranging
from CIO 0050 to CIO 0099.
2. The CompoBus/D Input Area contains 50 words with addresses ranging
from CIO 0350 to CIO 0399.
Words in the CompoBus/D Area are allocated to Slaves for CompoBus/D remote I/O communications. Data is exchanged regularly to Slaves in the network
(independent of the program) through the CompoBus/D Master Unit mounted in
the CPU Rack.
Words can be allocated to Slaves in two ways: fixed allocation (words allocated
by node number) or free allocation (user-set word allocation).
• With fixed allocations, words in the CompoBus/D Area are allocated automatically in node-number order.
• With user-set allocations, the user can allocate words to Slaves from the following words.
CIO 0000 to CIO 0235, CIO 0300 to CIO 0511, CIO 1000 to CIO 1063
H000 to H099
D00000 to D05999
The same ranges can be allocated for both CS1 and C200HX/G/E PCs except
that LR 00 to LR 63 in the C200HX/G/E PCs correspond to CIO 1000 to
CIO 1063 in the CS1 PCs.
Note If using a CS1 CompoBus/D Master Unit, use the following as the status area.
Data in this area is updated when the CompoBus/D Master Unit is used, so the
area cannot be used for other applications.
Master Status: D06032 + (2 x unit number)
Current Communications Cycle Time: D06033 + (2 x unit number)
For details on word allocation, refer to the CompoBus/D (DeviceNet) Operation
Manual (W267).
CompoBus/D
Master Unit
CPU Unit
CompoBus/D Area
CompoBus/D
Slaves
With fixed allocation, words are assigned according to node numbers.
(If a Slave requires two or more words, it will occupy as many node
numbers as words required.)
CompoBus/D Area
Initialization
The contents of the CompoBus/D Area will be cleared in the following cases:
1, 2, 3...
1. The operating mode is changed from PROGRAM to RUN or MONITOR
mode or vice-versa and the IOM Hold Bit is OFF.
2. The PC’s power supply is cycled and the IOM Hold Bit is OFF or not protected in the PC Setup.
3. The CompoBus/D Area is cleared from a Programming Device.
243
Section
CIO Area
7-4
4. PC operation is stopped when a fatal error other than an FALS(007) error
occurs. (The contents of the CompoBus/D Area will be retained when
FALS(007) is executed.)
If the IOM Hold BIt (A50012) is ON, the contents of the CompoBus/D Area won’t
be cleared when a fatal error occurs or the operating mode is changed from
PROGRAM mode to RUN or MONITOR mode or vice-versa.
IOM Hold Bit Operation
If the IOM Hold BIt (A50012) is ON and the PC Setup’s “IOM Hold Bit Status at
Startup” setting is set to protect the IOM Hold Bit, the contents of the CompoBus/
D Area won’t be cleared when the PC’s power supply is cycled.
Forcing Bit Status
Bits in the CompoBus/D Areas can be force-set and force-reset.
Note
1. The CompoBus/D Output Area overlaps the I/O Area. When using CompoBus/D communications with the default allocations, be sure that words are
not also allocated to other I/O points.
2. Words beginning at D06032 are allocated as follows for the CompoBus/D
Master Status and the Communications Cycle Present Value:
CompoBus/D Master Status:
D06032 + unit number x 2
Communications Cycle Present Value:
D06033 + unit number x 2
7-4-2 PC Link Area
The PC Link Area contains 5 words with addresses ranging from CIO 0247 to
CIO 0250. A442 is also used for PC Links. Use these words to monitor PC Link
errors, monitor CPU Unit operating status, and detect PC Link operating levels.
Note The Link Area (CIO 1000 to CIO 1199) is used to exchange data between PCs in
a PC Link system, just as the LR Area is used in other OMRON PCs. The flags in
the PC Link Area indicate the status of PC Link operations.
PC Link Error Flags
When a transmission error occurs or there is a power interruption at another Unit
after the PC link is established, the flag corresponding to the other Unit’s unit
number will be turned ON. These flags are read-only, although the PC Link Error
Flag will be turned ON if the CPU Unit is stopped by a FALS(007) error.
CPU Unit RUN Flags
The flag corresponding to the a CPU Unit’s unit number will be ON when the
CPU Unit is operating in RUN or MONITOR mode. The corresponding flag will
be OFF when the CPU Unit is in PROGRAM mode. These flags can be used to
determine another Unit’s operating status. These flags are read-only.
Operating Level Detection Flags
The flags in A442 can be used to determine whether a PC Link Unit is mounted to
the PC as well as the Unit’s operating level. A44211 will be ON if the PC Link Unit
is in operating level 1 and A44212 will be ON if the PC Link Unit is in operating
level 0.
CIO Area Flags
244
The following table shows the allocation of the CIO Area flags related to PC Link
operation. (The numbers in parentheses show the allocation for multilevel systems; operating level 0 is #0 and operating level 1 is #1.)
Section
CIO Area
Flag type
CPU Unit
RUN Flags
PC Link
Error Flags
Bit
00
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
CIO 0247
Unit 24 (#1, Unit 8)
Unit 25 (#1, Unit 9)
Unit 26 (#1, Unit 10)
Unit 27 (#1, Unit 11)
Unit 28 (#1, Unit 12)
Unit 29 (#1, Unit 13)
Unit 30 (#1, Unit 14)
Unit 31 (#1, Unit 15)
Unit 24 (#1, Unit 8)
Unit 25 (#1, Unit 9)
Unit 26 (#1, Unit 10)
Unit 27 (#1, Unit 11)
Unit 28 (#1, Unit 12)
Unit 29 (#1, Unit 13)
Unit 30 (#1, Unit 14)
Unit 31 (#1, Unit 15)
CIO 0248
Unit 16 (#1, Unit 0)
Unit 17 (#1, Unit 1)
Unit 18 (#1, Unit 2)
Unit 19 (#1, Unit 3)
Unit 20 (#1, Unit 4)
Unit 21 (#1, Unit 5)
Unit 22 (#1, Unit 6)
Unit 23 (#1, Unit 7)
Unit 16 (#1, Unit 0)
Unit 17 (#1, Unit 1)
Unit 18 (#1, Unit 2)
Unit 19 (#1, Unit 3)
Unit 20 (#1, Unit 4)
Unit 21 (#1, Unit 5)
Unit 22 (#1, Unit 6)
Unit 23 (#1, Unit 7)
CIO 0249
Unit 8 (#0, Unit 8)
Unit 9 (#0, Unit 9)
Unit 10 (#0, Unit 10)
Unit 11 (#0, Unit 11)
Unit 12 (#0, Unit 12)
Unit 13 (#0, Unit 13)
Unit 14 (#0, Unit 14)
Unit 15 (#0, Unit 15)
Unit 8 (#0, Unit 8)
Unit 9 (#0, Unit 9)
Unit 10 (#0, Unit 10)
Unit 11 (#0, Unit 11)
Unit 12 (#0, Unit 12)
Unit 13 (#0, Unit 13)
Unit 14 (#0, Unit 14)
Unit 15 (#0, Unit 15)
7-4
CIO 0250
Unit 0 (#0, Unit 0)
Unit 1 (#0, Unit 1)
Unit 2 (#0, Unit 2)
Unit 3 (#0, Unit 3)
Unit 4 (#0, Unit 4)
Unit 5 (#0, Unit 5)
Unit 6 (#0, Unit 6)
Unit 7 (#0, Unit 7)
Unit 0 (#0, Unit 0)
Unit 1 (#0, Unit 1)
Unit 2 (#0, Unit 2)
Unit 3 (#0, Unit 3)
Unit 4 (#0, Unit 4)
Unit 5 (#0, Unit 5)
Unit 6 (#0, Unit 6)
Unit 7 (#0, Unit 7)
A44211 will be ON when the PC Link Unit is in operating level #1. A44212 will be
ON when the Unit is in operating level #0 or a PC Link Unit isn’t mounted in the
PC. (The other bits in A442 are not used.)
Auxiliary Area Flags
Note Refer to 7-7 Auxiliary Area for more details on A422.
PC Link Area
Initialization
The contents of the PC Link Area will be cleared in the following cases:
1, 2, 3...
1. The operating mode is changed from PROGRAM mode to RUN/MONITOR
mode or vice-versa and the IOM Hold Bit is OFF.
2. The PC’s power supply is cycled and the IOM Hold Bit is OFF or not protected in the PC Setup.
3. The PC Link Area is cleared from a Programming Device.
4. PC operation is stopped when a fatal error other than an FALS(007) error
occurs. (The contents of the PC Link Area will be retained when FALS(007)
is executed.)
IOM Hold Bit Operation
If the IOM Hold BIt (A50012) is ON, the contents of the PC Link Area won’t be
cleared when a fatal error occurs or the operating mode is changed from PROGRAM mode to RUN/MONITOR mode or vice-versa.
If the IOM Hold BIt (A50012) is ON and the PC Setup’s “IOM Hold Bit Status at
Startup” setting is set to protect the IOM Hold Bit, the contents of the PC Link
Area won’t be cleared when the PC’s power supply is cycled.
Forcing Bit Status
Bits in the PC Link Area can be force-set and force-reset.
Note
1. The PC Link Area (CIO 0247 to CIO 0250) overlaps the I/O Area. When using PC Link Units, be sure that words are not also allocated to other I/O
points.
2. When designating addresses in programming or allocations inside C200H
Special I/O Units, “247” to “250” will actually specify CIO 0247 to CIO 0250 in
the CPU Unit. A422 cannot be specified inside a C200H Special I/O Unit.
7-4-3 Data Link Area
Data Link Area addresses range from CIO 1000 to CIO 1199 (CIO bits 100000
to 119915). Words in the Link Area can be used for data links in Controller Link
Networks or PC Links in a PC Link System.
A data link automatically (independently of the program) shares data with Link
Areas in other CS1 CPU Units in the network through a Controller Link Unit
mounted to the PC’s CPU Rack.
245
Section
CIO Area
7-4
Data links can be generated automatically (using the same number of words for
each node) or manually. When a user defines the data link manually, he can assign any number of words to each node and make nodes receive-only or transmit-only. Refer to the Controller Link Units Operation Manual (W309) for more
details.
Words in the Link Area that aren’t used for a data link or PC Link can be used only
in the program.
Link Areas
Controller
Link Unit
Controller
Link Unit
CPU Unit
Controller
Link Unit
CPU Unit
CPU Unit
Controller Link Network
Link Area words are also allocated to PC Link Systems when a PC Link is
created by connecting PC Link Units.
Link Areas
PC Link Unit
CPU Unit
PC Link
Unit
PC Link Unit
CPU Unit
CPU Unit
Links to C200HX/HG/HE,
C200HS, and C200H PCs
Link Area words CIO 1000 to CIO 1063 in CS1-series PCs correspond to Link
Relay Area words LR 00 to LR 63 for data links created in C200HX/HG/HE PCs
and PC Links created in C200HX/HG/HE, C200HS, or C200H PCs. When converting C200HX/HG/HE, C200HS, or C200H programs for use in CS1-series
PCs, change addresses LR 00 through LR 63 to their equivalent Link Area addresses CIO 1000 through CIO 1063.
Link Area Initialization
The contents of the Link Area will be cleared in the following cases:
1, 2, 3...
1. The operating mode is changed from PROGRAM mode to RUN/MONITOR
mode or vice-versa and the IOM Hold Bit is OFF.
2. The PC’s power supply is cycled and the IOM Hold Bit is OFF or not protected in the PC Setup.
3. The Link Area is cleared from a Programming Device.
4. PC operation is stopped when a fatal error other than an FALS(007) error
occurs. (The contents of the Link Area will be retained if FALS(007) is
executed.)
IOM Hold Bit Operation
If the IOM Hold BIt (A50012) is ON and the PC Setup’s “IOM Hold Bit Status at
Startup” setting is set to protect the IOM Hold Bit, the contents of the Link Area
won’t be cleared when the PC’s power supply is cycled.
If the IOM Hold BIt (A50012) is ON, the contents of the Link Area won’t be
cleared when a fatal error occurs or the operating mode is changed from PROGRAM mode to RUN/MONITOR mode or vice-versa.
Forcing Bit Status
Bits in the Link Area can be force-set and force-reset.
Note When designating addresses in programming or allocations inside C200H Special I/O Units, “LR 00” to “LR63” will actually specify CIO 1000 to CIO1063 in the
246
Section
CIO Area
7-4
CPU Unit. CIO 1064 to CIO 1199 in the CPU Unit cannot be specified in the
C200H Special I/O Unit.
7-4-4 CS1 CPU Bus Unit Area
The CS1 CPU Bus Unit Area contains 400 words with addresses ranging from
CIO 1500 to CIO 1899. Words in the CS1 CPU Bus Unit Area can be allocated to
CS1 CPU Bus Units to transfer data such as the operating status of the Unit.
Each Unit is allocated 25 words based on the Unit’s unit number setting.
Data is exchanged with CS1 CPU Bus Units once each cycle during I/O refreshing, which occurs after program execution. (Words in this data area cannot be
refreshed with immediate-refreshing or IORF(097).)
CS1 CPU Bus Unit
CPU Unit
CS1 CPU Bus Unit Area
(25 words/Unit)
I/O refreshing
Each CS1 CPU Bus Unit is allocated 25 words based on its unit number, as
shown in the following table.
Unit number
Allocated words
0
CIO 1500 to CIO 1524
1
CIO 1525 to CIO 1549
2
CIO 1550 to CIO 1574
3
CIO 1575 to CIO 1599
4
CIO 1600 to CIO 1624
5
CIO 1625 to CIO 1649
6
CIO 1650 to CIO 1674
7
CIO 1675 to CIO 1699
8
CIO 1700 to CIO 1724
9
CIO 1725 to CIO 1749
A
CIO 1750 to CIO 1774
B
CIO 1775 to CIO 1799
C
CIO 1800 to CIO 1824
D
CIO 1825 to CIO 1849
E
CIO 1850 to CIO 1874
F
CIO 1875 to CIO 1899
The function of the 25 words depends upon the CS1 CPU Bus Unit being used.
For details, refer to the Unit’s operation manual.
Words in the CS1 CPU Bus Unit Area that aren’t allocated to CS1 CPU Bus Units
can be used only in the program.
Note The addresses in the CS1 CPU Bus Unit Area cannot be designated directly in
programming or allocations inside C200H Special I/O Units.
CS1 CPU Bus Unit Area
Initialization
1, 2, 3...
The contents of the CS1 CPU Bus Unit Area will be cleared in the following
cases:
1. The operating mode is changed from PROGRAM to RUN or MONITOR
mode or vice-versa and the IOM Hold Bit is OFF.
2. The PC’s power supply is cycled and the IOM Hold Bit is OFF or not protected in the PC Setup.
247
Section
CIO Area
7-4
3. The CS1 CPU Bus Unit Area is cleared from a Programming Device.
4. PC operation is stopped when a fatal error other than an FALS(007) error
occurs. (The contents of the CS1 CPU Bus Unit Area will be retained when
FALS(007) is executed.)
IOM Hold Bit Operation
If the IOM Hold BIt (A50012) is ON, the contents of the CS1 CPU Bus Unit Area
won’t be cleared when a fatal error occurs or the operating mode is changed
from PROGRAM mode to RUN/MONITOR mode or vice-versa.
If the IOM Hold BIt (A50012) is ON and the PC Setup’s “IOM Hold Bit Status at
Startup” setting is set to protect the IOM Hold Bit, the contents of the CS1 CPU
Bus Unit Area won’t be cleared when the PC’s power supply is cycled.
Forcing Bit Status
Bits in the CS1 CPU Bus Unit Area can be force-set and force-reset.
7-4-5 Inner Board Area
The Inner Board Area contains 100 words with addresses ranging from
CIO 1900 to CIO 1999. Words in the Inner Board Area can be allocated to an
Inner Board to transfer data such as the operating status of the Unit. All 100
words must be allocated to just one Inner Board.
Data is exchanged with the Inner Board once each cycle during normal I/O refreshing, which occurs after program execution. Data can also be refreshed directly using settings in the protocol macro function in the Serial Communications
Board.
Inner Board
CPU Unit
I/O refreshing
Inner Board Area
(100 words/Board)
The function of the 100 words in the Inner Board Area depends upon the Inner
Board being used. For details, refer to the Board’s Operation Manual.
When the words in the Inner Board Area aren’t allocated to an Inner Board, they
can be used only in the program.
Inner Board Area
Initialization
The contents of the Inner Board Area will be cleared in the following cases:
1, 2, 3...
1. The operating mode is changed from PROGRAM mode to RUN/MONITOR
mode or vice-versa and the IOM Hold Bit is OFF.
2. The PC’s power supply is cycled and the IOM Hold Bit is OFF or not protected in the PC Setup.
3. The Inner Board Area is cleared from a Programming Device.
4. PC operation is stopped when a fatal error other than an FALS(007) error
occurs. (The contents of the Inner Board Area will be retained when
FALS(007) is executed.)
IOM Hold Bit Operation
If the IOM Hold BIt (A50012) is ON, the contents of the Inner Board Area won’t be
cleared when a fatal error occurs or the operating mode is changed from PROGRAM mode to RUN/MONITOR mode or vice-versa.
If the IOM Hold BIt (A50012) is ON and the PC Setup’s “IOM Hold Bit Status at
Startup” setting is set to protect the IOM Hold Bit, the contents of the Inner Board
Area won’t be cleared when the PC’s power supply is cycled.
Forcing Bit Status
Bits in the Inner Board Area can be force-set and force-reset.
Note The addresses in the Inner Board Area cannot be designated directly in programming or allocations inside C200H Special I/O Units.
248
Section
CIO Area
7-4
7-4-6 Special I/O Unit Area
The Special I/O Unit Area contains 960 words with addresses ranging from
CIO 2000 to CIO 2959. Words in the Special I/O Unit Area are allocated to CS1
and C200H Special I/O Units to transfer data such as the operating status of the
Unit. Each Unit is allocated 10 words based on its unit number setting.
Data is exchanged with Special I/O Units once each cycle during I/O refreshing,
which occurs after program execution. The words can also be refreshed with
IORF(097).
Special I/O Unit
CPU Unit
Special I/O Unit Area
(10 words/Unit)
I/O
refreshing or
IORF
(097)
Note The addresses in the Special I/O Unit Area cannot be designated directly in programming or allocations inside C200H Special I/O Units.
Each Special I/O Unit is allocated 25 words based on its unit number, as shown
in the following table.
Unit number
Allocated words
0
1
2
3
4
5
6
7
8
9
10 (A)
11 (B)
12 (C)
13 (D)
14 (E)
15 (F)
16
17
CIO 2000 to CIO 2009
CIO 2010 to CIO 2019
CIO 2020 to CIO 2029
CIO 2030 to CIO 2039
CIO 2040 to CIO 2049
CIO 2050 to CIO 2059
CIO 2060 to CIO 2069
CIO 2070 to CIO 2079
CIO 2080 to CIO 2089
CIO 2090 to CIO 2099
CIO 2100 to CIO 2109
CIO 2110 to CIO 2119
CIO 2120 to CIO 2129
CIO 2130 to CIO 2139
CIO 2140 to CIO 2149
CIO 2150 to CIO 2159
CIO 2160 to CIO 2169
CIO 2170 to CIO 2179
95
CIO 2950 to CIO 2959
C200H
Special I/O Units
Valid unit numbers
CS1
Special I/O Units
Valid unit numbers
Not available on
C200H Units
The function of the 10 words allocated to a Unit depends upon the Special I/O
Unit being used. For details, refer to the Unit’s Operation Manual.
Words in the Special I/O Unit Area that aren’t allocated to Special I/O Units can
be used only in the program.
Special I/O Unit Area
Initialization
The contents of the Special I/O Unit Area will be cleared in the following cases:
1, 2, 3...
1. The operating mode is changed from PROGRAM mode to RUN/MONITOR
mode or vice-versa and the IOM Hold Bit is OFF.
249
Section
CIO Area
7-4
2. The PC’s power supply is cycled and the IOM Hold Bit is OFF or not protected in the PC Setup.
3. The Special I/O Unit Area is cleared from a Programming Device.
4. PC operation is stopped when a fatal error other than an FALS(007) error
occurs. (The contents of the Special I/O Unit Area will be retained when
FALS(007) is executed.)
IOM Hold Bit Operation
If the IOM Hold BIt (A50012) is ON, the contents of the Special I/O Unit Area
won’t be cleared when a fatal error occurs or the operating mode is changed
from PROGRAM mode to RUN/MONITOR mode or vice-versa.
If the IOM Hold BIt (A50012) is ON and the PC Setup’s “IOM Hold Bit Status at
Startup” setting is set to protect the IOM Hold Bit, the contents of the Special I/O
Unit Area won’t be cleared when the PC’s power supply is cycled.
Forcing Bit Status
Bits in the Special I/O Unit Area can be force-set and force-reset.
7-4-7 SYSMAC BUS Area
The SYSMAC BUS Area contains 50 words with addresses ranging from
CIO 3000 to CIO 3049. Words in the SYSMAC BUS Area are allocated to Slave
Racks connected to Wired or Optical SYSMAC BUS Remote I/O Master Units
(C200H-RM201 or C200H-RM001-PV1). Up to two Masters can be mounted to
the CPU Rack or a C200H Expansion I/O Rack. A maximum of 5 Slave Racks
can be managed by one CPU Unit, whether one or two Masters are mounted.
Each Slave Rack is allocated 10 words based on the Rack’s rack number setting
(0 to 4).
Rack number
Allocated words
0
CIO 3000 to CIO 3009
1
CIO 3010 to CIO 3019
2
CIO 3020 to CIO 3029
3
CIO 3030 to CIO 3039
4
CIO 3040 to CIO 3049
Up to 10 C200H Basic I/O Units can be mounted in a Slave Rack. One word
(16 bits) is allocated to each slot in the Slave Rack from left to right. Allocations
are fixed by slot, e.g., if there is no Unit in a slot, the word normally allocated to
that slot will not be used.
Note
250
1. Up to two Masters can be mounted for any one CPU Unit A maximum of 5
Slave Racks can be managed by one CPU Unit, regardless of whether one
or two Masters are mounted.
2. C200H Special I/O Units can also be mounted to Slave Racks, but they will
be allocated words according to their unit number and will not be allocated
SYSMAC BUS Area words.
Section
CIO Area
7-4
3. SYSMAC BUS Units other than Slave Racks (such as I/O Terminals) can
also be connected. These other Units are allocated words in the I/O Terminal Area. Refer to 7-4-8 I/O Terminal Area for details.
Wired or Optical Master Unit
CPU Unit
SYSMAC BUS Area
Wired or Optical
Slave Unit
Slave Rack
1, 2, 3...
SYSMAC BUS Area
Initialization
Wired or Optical
Slave Unit
Total length 200 m max.,
2 conductors
Slave Rack
Slave Rack
1. Ten words are allocated to each Rack based on the rack number set on the
Slave Unit.
2. The ten words in each Rack are allocated to the slots in the Rack from left to
right (one word/slot).
The contents of the SYSMAC BUS Area will be cleared in the following cases:
1, 2, 3...
1. The operating mode is changed from PROGRAM mode to RUN/MONITOR
mode or vice-versa and the IOM Hold Bit is OFF.
2. The PC’s power supply is cycled and the IOM Hold Bit is OFF or not protected in the PC Setup.
3. The SYSMAC BUS Area is cleared from a Programming Device.
4. PC operation is stopped when a fatal error other than an FALS(007) error
occurs. (The contents of the SYSMAC BUS Area will be retained when
FALS(007) is executed.)
IOM Hold Bit Operation
If the IOM Hold BIt (A50012) is ON, the contents of the SYSMAC BUS Area won’t
be cleared when a fatal error occurs or the operating mode is changed from
PROGRAM mode to RUN/MONITOR mode or vice-versa.
If the IOM Hold BIt (A50012) is ON and the PC Setup’s “IOM Hold Bit Status at
Startup” setting is set to protect the IOM Hold Bit, the contents of the SYSMAC
BUS Area won’t be cleared when the PC’s power supply is cycled.
Forcing Bit Status
Bits in the SYSMAC BUS Area can be force-set and force-reset.
Note The addresses in the SYSMAC BUS Area cannot be designated directly in programming or allocations inside C200H Special I/O Units.
7-4-8 I/O Terminal Area
The I/O Terminal Area contains 32 words with addresses ranging from CIO 3100
to CIO 3131. Words in the I/O Terminal Area can be allocated to Slaves other
than Slave Racks (such as I/O Interfaces, I/O Terminals, and Optical I/O Units)
connected to a Wired or Optical SYSMAC BUS Remote I/O Master Units
(C200H-RM201 or C200H-RM001-PV1). Up to two Masters can be mounted to
the CPU Rack or a C200H Expansion I/O Rack. Up to 32 Slaves are allowed for
each CPU Unit.
251
Section
Work Area
7-5
Each Slave is allocated 1 word based on its unit number setting (0 to 31) except
for Optical I/O Units, which are allocated 2 words each. The words are allocated
according to unit numbers even when two Master Units are being used.
Unit number
Allocated word
0
CIO 3100
1
CIO 3101
31
CIO 3131
Both Slave Racks and SYSMAC BUS Slaves other than Slave Racks (such as
I/O Terminals) can be connected. Slave Racks are allocated words in the SYSMAC BUS Area. Refer to 7-4-7 SYSMAC BUS Area for details.
Wired or Optical Master Unit
CPU Unit
I/O Terminal Area
Words are allocated to Slaves other than Slave Racks
(such as I/O Interfaces, I/O Terminals, and Optical I/O
Units) according to their unit numbers.
Note The addresses in the I/O Terminal Area cannot be designated directly in programming or allocations inside C200H Special I/O Units.
I/O Terminal Area
Initialization
The contents of the I/O Terminal Area will be cleared in the following cases:
1, 2, 3...
1. The operating mode is changed from PROGRAM to RUN or MONITOR
mode or vice-versa and the IOM Hold Bit is OFF.
2. The PC’s power supply is cycled and the IOM Hold Bit is OFF or not protected in the PC Setup.
3. The I/O Terminal Area is cleared from a Programming Device.
4. PC operation is stopped when a fatal error other than an FALS(007) error
occurs. (The contents of the I/O Terminal Area will be retained when
FALS(007) is executed.)
IOM Hold Bit Operation
If the IOM Hold BIt (A50012) is ON, the contents of the I/O Terminal Area won’t
be cleared when a fatal error occurs or the operating mode is changed from
PROGRAM mode to RUN/MONITOR mode or vice-versa.
If the IOM Hold BIt (A50012) is ON and the PC Setup’s “IOM Hold Bit Status at
Startup” setting is set to protect the IOM Hold Bit, the contents of the I/O Terminal
Area won’t be cleared when the PC’s power supply is cycled.
Forcing Bit Status
Bits in the I/O Terminal Area can be force-set and force-reset.
7-5
Work Area
The Work Area contains 512 words with addresses ranging from W000 to W511.
These words can be used only in the program as work words.
252
Section
Holding Area
7-6
There are unused words in the CIO Area (CIO 1200 to CIO 1499 and 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 new functions in future versions of CS1 CPU Units.
Work Area Initialization
The contents of the Work Area will be cleared in the following cases:
1, 2, 3...
1. The operating mode is changed from PROGRAM to RUN or MONITOR
mode or vice-versa and the IOM Hold Bit is OFF.
2. The PC’s power supply is cycled and the IOM Hold Bit is OFF or not protected in the PC Setup.
3. The Work Area is cleared from a Programming Device.
4. PC 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.)
If the IOM Hold BIt (A50012) is ON, the contents of the Work Area won’t be
cleared when a fatal error occurs or the operating mode is changed from PROGRAM mode to RUN/MONITOR mode or vice-versa.
IOM Hold Bit Operation
If the IOM Hold BIt (A50012) is ON and the PC Setup’s “IOM Hold Bit Status at
Startup” setting is set to protect the IOM Hold Bit, the contents of the Work Area
won’t be cleared when the PC’s power supply is cycled.
Bits in the Work Area can be force-set and force-reset.
Forcing Bit Status
Note The addresses in the Work Area cannot be designated directly in programming
or allocations inside C200H Special I/O Units.
7-6
Holding Area
The Holding Area contains 512 words with addresses ranging from H000 to
H511 (bits H00000 to H51115). These words can be used only in the program.
Holding Area bits can be used in any order in the program and can be used as
normally open or normally closed conditions as often as necessary.
Holding Area
Initialization
Data in the Holding Area is not cleared when the PC’s power supply is cycled or
the PC’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).
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.
Self-maintaining Bits
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.
253
Section
Auxiliary Area
7-7
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.
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 PC’s internal power supply and the Holding Area bit will be
reset.
Set input
Input
Unit
Reset input
Instead, use a configuration like the one shown below.
Set input
Input
Unit
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.
Note When designating addresses in programming or allocations inside C200H Special I/O Units, “HR 00” to “HR 99” will actually specify H000 to H099 in the CPU
Unit and “AR 00” to “AR 27” will actually specify H100 to H127 in the CPU Unit.
Other addresses in this area cannot be specified inside the C200H Special I/O
Units.
7-7
Auxiliary Area
The Auxiliary Area contains 960 words with addresses ranging from A000 to
A959). These words are preassigned as flags and control bits to monitor and
control operation.
A000 through A447 are read-only, but A448 through A959 can be read or written
from the program or a Programming Device.
Note The addresses in the Auxiliary Area cannot be designated directly in programming or allocations inside C200H Special I/O Units.
Forcing Bit Status
Bits in the Auxiliary Area cannot be force-set and force-reset continuously.
Writing Auxiliary Area
Data
The following operations can be performed from a Programming Device to write
data in the Auxiliary Area.
• Using the CX-Programmer: Online set/reset (not force-set/force-reset) (-EV1
only), changing present values when monitoring programming addresses (set
254
Section
Auxiliary Area
7-7
values dialog box), or transferring data to the PC after editing the PC data
tables. Refer to the CX-Programmer User Manual (W361-E2).
• Using a Programming Console: Temporarily force-setting/force-resetting bits
from the Bit/Word Monitor or the 3-word Monitor operation (see Programming
Consoles Operation Manual).
The following table lists the functions of Auxiliary Area flags and control bits. The
table is organized according to the functions of the flags and bits. For more details or to look up a bit by its address, refer to Appendix B Auxiliary Area.
Function
Initial
Settings
Name
I/O Response Times in
Basic I/O Units
IOM Hold Bit
Read-only
Special I/O Unit
Initialization Flags
A33000 to These flags correspond to Special I/O Units 0 to 95.
A33515
A flag will be ON while the corresponding Unit is
initializing after the power is turned ON or the Unit’s
Restart Bit is turned ON. (Restart Bits A50200 to
A50715 correspond to Units 0 to 95.)
Read-only
Special I/O Unit Restart
Bits
A50200 to These bits correspond to Special I/O Units 0 to 95.
A50715
Turn a bit from OFF to ON to restart the
corresponding Unit.
Read/write
Inner Board Monitoring
Area
Inner Board Restart Bit
A35500 to The function of these words is defined in the Inner
A35915
Board.
A60800
Turn the bit from OFF to ON to restart the
corresponding Inner Board.
A60900 to This interface area can be used to transfer data
A61315
from the CPU Unit to the Inner Board. The function
of the data is defined in the Inner Board.
Read-only
First Cycle Flag
A20011
This flag is turned ON for one cycle when program
execution starts (the operating mode is switched
from PROGRAM to RUN/MONITOR).
Read-only
Initial Task Execution
Flag
A20015
When a task is in “executable status” for the first
time, this flag will be turned ON as long as the task
is being executed (has the execution token).
Read-only
Maximum Cycle Time
A262 to
A263
Present Cycle Time
A264 to
A265
These words contain the maximum cycle time in
Read-only
units of 0.1 ms. The time is updated every cycle and
is recorded in 32-bit binary. (A263 is the leftmost
word.)
These words contain the present cycle time in units Read-only
of 0.1 ms. The time is updated every cycle and is
recorded in 32-bit binary. (A265 is the leftmost
word.)
Status of DIP Switch Pin
6
Basic I/O Unit Status
Area
CS1 CPU
Bus Unit
Flags/Bits
CS1 CPU Bus Unit
Initialization Flags
CS1 CPU Bus Unit
Restart Bits
Inner Board User
Interface Area
Cycle
Information
Access
A30200 to These flags correspond to CS1 CPU Bus Units 0 to
A30215
15. A flag will be ON while the corresponding Unit is
initializing after the power is turned ON or the Unit’s
Restart Bit (in A501) is turned ON.
A50100 to These bits correspond to CS1 CPU Bus Units 0 to
A50115
15. Turn a bit from OFF to ON to restart the
corresponding Unit.
CPU Unit
Settings
Fuse
conditions
Inner Board
Flags/Bits
Description
Read-only
Forced Status Hold BIt
Special I/O
Unit
Flags/Bits
Address
A22000 to Contains the current I/O response times for CS1
A25915
Basic I/O Units.
A50012
Determines whether the contents of I/O memory are
retained when the PC’s power is reset or the PC’s
operating mode is changed (from PROGRAM to
RUN/MONITOR or vice-versa).
A50013
Determines whether the status of force-set and
force-reset bits is maintained when the PC’s power
is reset or the PC’s operating mode is changed
(from PROGRAM to RUN/MONITOR or vice-versa).
A39512
Contains the status set on pin 6 of the CPU Unit’s
DIP switch. (Refreshed every cycle.)
A05000 to Indicates whether fuses in Basic I/O Units are intact
A08915
or blown. The flags correspond to rack 0, slot 0
through rack 7, slot 9.
Read/write
Read/write
Read-only
Read-only
Read/write
Read/write
Read/write
255
Section
Auxiliary Area
Function
Task
Information
Debugging
Information
Name
Description
Access
Task Number when
Program Stopped
A294
This word contains the task number of the task that
was being executed when program execution was
stopped because of a program error.
Read-only
Maximum Interrupt Task
Processing Time
Interrupt Task with Max.
Processing Time
A440
Read-only
Online Editing Wait Flag
A20110
Contains the Maximum Interrupt Task Processing
Time in units of 0.1 ms.
Contains the task number of the interrupt task with
the maximum processing time. Hexadecimal values
8000 to 80FF correspond to task numbers 00 to FF.
Bit 15 is turned ON when an interrupt has occurred.
ON when an online editing process is waiting.
(An online editing request was received while online
editing was disabled.)
Online Editing Processing
Flag
Online Editing Disable Bit
Validator
Online Editing Disable Bit
A20111
ON when an online editing process is being
executed.
A52700 to The Online Editing Disable Bit (A52709) is valid only
A52707
when this byte contains 5A.
A52709
Turn this bit ON to disable online editing.
(A52700 to A52707 must be set to 5A.)
A50015
Turn this bit ON to turn OFF all outputs from Basic
I/O Units, Output Units, and Special I/O Units.
A50809
ON when the differentiate monitor condition has
been established during execution of differentiation
monitoring.
Read-only
Sampling Start Bit
A50815
When a data trace is started by turning this bit from
OFF to ON from a Programming Device, the PC will
begin storing data in Trace Memory by one of the
three following methods:
1) Periodic sampling (10 to 2,550 ms)
2) Sampling at execution of TRSM(045)
3) Sampling at the end of every cycle.
Read/write
Trace Start Bit
A50814
Read/write
Trace Busy Flag
A50813
Trace Completed Flag
A50812
Trace Trigger Monitor
Flag
A50811
Turn this bit from OFF to ON to establish the trigger
condition. The offset indicated by the delay value
(positive or negative) determines which data
samples are valid.
ON when the Sampling Start Bit (A50815) is turned
from OFF to ON. OFF when the trace is completed.
ON when sampling of a region of trace memory has
been completed during execution of a Trace. OFF
when the next time the Sampling Start Bit (A50815)
is turned from OFF to ON.
ON when a trigger condition is established by the
Trace Start Bit (A50814). OFF when the next Data
Trace is started by the Sampling Start bit (A50815).
Output OFF Bit
Differentiate Monitor
Completed Flag
256
Address
7-7
A441
Read-only
Read-only
Read/write
Read/write
Read/write
Read/write
Read/write
Read/write
Read/write
Section
Auxiliary Area
Function
Name
File Memory Memory Card Type
Information
Memory Card Format
Error Flag
File Transfer Error Flag
Address
Description
7-7
Access
A34300 to Indicates the type of Memory Card, if any, installed.
A34302
A34307
ON when the Memory Card is not formatted or a
formatting error has occurred.
A34308
ON when an error occurred while writing data to file
memory.
A34309
ON when data cannot be written to file memory
because it is write-protected or the data exceeds
the capacity of the file memory.
Read-only
File Read Error
A34310
Read-only
File Missing Flag
A34311
ON when a file could not be read because of a
malfunction (file is damaged or data is corrupted).
ON when an attempt is made to read a file that
doesn’t exist, or an attempt is made to write to a file
in a directory that doesn’t exist.
File Memory Operation
Flag
A34313
ON while any of the following operations is being
executed. OFF when none of them are being
executed.
Read-only
File Write Error Flag
Read-only
Read-only
Read-only
Read-only
CMND instruction sending a FINS command to the
local CPU Unit.
FREAD/FWRIT instructions.
Program replacement using the control bit in the
Auxiliary Area.
Memory Card Detected
Flag (-EV1 Only)
A34315
Number of Items to
Transfer
Accessing File Data Flag
EM File Memory Format
Error Flag
EM File Memory Starting
Bank
File Deletion Flags
A346 to
A347
A34314
A34306
A344
A38503
Easy backup operation.
ON when a Memory Card has been detected.
OFF when a Memory Card has not been detected.
These words contain the number of words or fields
remaining to be transferred (8-digit hexadecimal).
ON while file data is being accessed.
ON when a format error occurs in the first EM bank
allocated for file memory.
Contains the starting bank number of EM file
memory (bank number of the first formatted bank).
The system automatically deleted the remainder of
an EM file memory file that was being updated when
a power interruption occurred.
Read-only
Read-only
Read-only
Read-only
Read-only
Read-only
A38507
The system automatically deleted the remainder of
a Memory Card file that was being updated when a
power interruption occurred.
Read-only
Memory Card Start-up
Transfer Error Flag
A40309
ON when automatic transfer at start-up has been
selected and an error occurs during automatic
transfer. An error will occur if there is a transfer
error, the specified file does not exist, or the
Memory Card is not installed.
Read-only
Replacement Error Flag
A65014
ON when the Replacement Start Bit (A65015) has
been turned ON to replace the program, but there is
an error. If the Replacement Start Bit is turned ON
again, the Replacement Error Flag will be turned
OFF.
Read-only
257
Section
Auxiliary Area
Function
Name
File Memory Replacement Start Bit
Information, (-EV1 Only)
contd.
Address
A65015
7-7
Description
Access
Program replacement starts when the Replacement
Start Bit is turned ON if the Program Password
(A651) is valid (A5A5 Hex). Do not turn OFF the
Replacement Start Bit during program replacement.
Read-only
When the power is turned ON or program
replacement is completed, the Replacement Start
Bit will be turned OFF, regardless of whether
replacement was completed normally or in error.
It is possible to confirm if program replacement is
being executed by reading the Replacement Start
Bit using a Programming Device, PT, or host
computer.
Program Password
(-EV1 Only)
A651
Input the password to replace a program.
Read-only
A5A5 Hex: Replacement Start Bit (A65015) is
enabled.
Any other value: Replacement Start Bit (A65015) is
disabled.
When the power is turned ON or program
replacement is completed, the Replacement Start
Bit will be turned OFF, regardless of whether
replacement was completed normally or in error.
Program File Name
(-EV1 Only)
A654 to
A657
When program replacement starts, the program file
name will be stored in ASCII. File names can be
specified up to eight characters in length excluding
the extension.
File names are stored in the following order: A654 to
A657 (i.e., from the lowest word to the highest), and
from the highest byte to the lowest. If a file name is
less than eight characters, the lowest remaining
bytes and the highest remaining word will be filled
with spaces (20 Hex). Null characters and space
characters cannot be used within file names.
Example: File name is ABC.OBJ
258
Read-only
Section
Auxiliary Area
Function
Program
Error
Information
Error Log,
Error Code
FAL/FALS
Error
Information
Name
Address
Program Error Flag
(Fatal error)
Program Error Task
A40109
Instruction Processing
Error Flag
A29508
Indirect DM/EM BCD
Error Flag
A29509
Illegal Access Error Flag
A29510
No END Error Flag
A29511
Task Error Flag
A29512
Differentiation Overflow
Error Flag
Illegal Instruction Error
Flag
UM Overflow Error Flag
A29513
Program Address Where
Program Stopped
A298 and
A299
Error Log Area
A100 to
A199
Error Log Pointer
A300
Error Log Pointer Reset
Bit
Error code
A50014
FAL Error Flag
(Non-fatal error)
Executed FAL Number
Flags
A40215
FALS Error Flag
(Fatal error)
A40106
A294
A29514
A29515
A400
A360 to
A391
7-7
Description
Access
ON when program contents are incorrect. CPU Unit
operation will stop.
Provides the type and number of the tack that was
being executed when program execution stops as a
result of a program error.
Read-only
This flag and the Error Flag (ER) will be turned ON
when an instruction processing error has occurred
and the PC Setup has been set to stop operation for
an instruction error.
This flag and the Access Error Flag (AER) will be
turned ON when an indirect DM/EM BCD error has
occurred and the PC Setup has been set to stop
operation an indirect DM/EM BCD error.
This flag and the Access Error Flag (AER) will be
turned ON when an illegal access error has
occurred and the PC Setup has been set to stop
operation an illegal access error.
ON when there isn’t an END(001) instruction in
each program within a task.
ON when a task error has occurred. The following
conditions will generate a task error.
1) There isn’t an executable cyclic task.
2) There isn’t a program allocated to the task.
ON when the specified Differentiation Flag Number
exceeds the allowed value.
ON when a program that cannot be executed has
been stored.
ON when the last address in UM (user program
memory) has been exceeded.
These words contain the 8-digit hexadecimal
program address of the instruction where program
execution was stopped due to a program error.
(A299 contains the leftmost digits.)
When an error has occurred, the error code, error
contents, and error’s time and date are stored in the
Error Log Area.
Read-only
When an error occurs, the Error Log Pointer is
incremented by 1 to indicate the location where the
next error record will be recorded as an offset from
the beginning of the Error Log Area (A100).
Turn this bit ON to reset the Error Log Pointer
(A300) to 00.
When a non-fatal error (user-defined FALS(006) or
system error) or a fatal error (user-defined
FALS(007) or system error) occurs, the 4-digit
hexadecimal error code is written to this word.
ON when a non-fatal error is generated by
executing FAL(006).
The flag corresponding to the specified FAL number
will be turned ON when FAL(006) is executed. Bits
A36001 to A39115 correspond to FAL numbers 001
to 511.
ON when a fatal error is generated by the
FALS(007) instruction.
Read-only
Read-only
Read-only
Read-only
Read-only
Read-only
Read-only
Read-only
Read-only
Read-only
Read-only
Read/write
Read-only
Read-only
Read-only
Read-only
259
Section
Auxiliary Area
Function
Memory
Error
Information
Name
Address
Description
7-7
Access
Memory Error Flag
(Fatal error)
A40115
Memory Error Location
A40300 to When a memory error occurs, the Memory Error
A40308
Flag (A40115) is turned ON and one of the following
flags is turned ON to indicate the memory area
where the error occurred.
A40300: User program
A40304: PC Setup
A40305: Registered I/O Table
A40307: Routing Table
A40308: CS1 CPU Bus Unit Settings
A40309
ON when an error occurs in automatically
transferring a file from the Memory Card to the CPU
Unit at startup, including when a file is missing or a
Memory Card is not mounted.
Read-only
Startup Memory Card
Transfer Error Flag
ON when an error occurred in memory or there was Read-only
an error in automatic transfer from the Memory Card
when the power was turned on.
Read-only
PC Setup
Error
Information
PC Setup Error Flag
(Non-fatal error)
PC Setup Error Location
A40210
ON when there is a setting error in the PC Setup.
Read-only
A406
When there is a setting error in the PC Setup, the
location of that error is written to A406 in 4-digit
hexadecimal. The location is given as the address
set on the Programming Console.
Read-only
Interrupt
Task Error
Information
Interrupt Task Error Flag
(Non-fatal error)
A40213
ON when the Detect Interrupt Task Errors setting in
the PC Setup is set to “Detect” and one of the
following occurs.
Read-only
IORD(222) or IOWR(223) in a cyclic task are
competing with IORD(222) or IOWR(223) in an
interrupt task.
An interrupt task is executed for more than 10 ms
during I/O refreshing of a C200H Special I/O Unit or
a SYSMAC BUS I/O Unit.
IORD(222) or IOWR(223) was executed in an
interrupt task when I/O was being refreshed.
Interrupt Task Error
Cause Flag
Interrupt Task Error, Task
Number
A42615
Indicates the cause of an Interrupt Task Error.
A42600 to The function of these bits depends upon the status
A42611
of A42615 (the Interrupt Task Error Cause Flag).
Read-only
Read-only
A42615 OFF:
Contains the interrupt task number when an
interrupt task was executed for more than 10 ms
during I/O refreshing of a C200H Special I/O Unit or
a SYSMAC BUS Remote I/O Unit.
A42615 ON:
Contains the Special I/O Unit’s unit number when an
attempt was made to refresh a Special I/O Unit’s I/O
from an interrupt task with IORF(097) while the
Unit’s I/O was being refreshed by cyclic I/O
refreshing (duplicate refreshing).
I/O
Information
Basic I/O Unit Error Flag
(Non-fatal error)
A40212
Basic I/O Unit Error, Slot
Number
A40800 to Contains the binary slot number where the error
A40807
occurred when an error has occurred in a Basic I/O
Unit (including C200H Group-2 High-density I/O
Units and C200H Interrupt Input Units).
A40808 to Contains the binary rack number where the error
A40815
occurred when an error has occurred in a Basic I/O
Unit (including C200H Group-2 High-density I/O
Units and C200H Interrupt Input Units).
Basic I/O Unit Error, Rack
Number
260
ON when an error has occurred in a Basic I/O Unit
(including C200H Group-2 High-density I/O Units
and C200H Interrupt Input Units).
Read-only
Read-only
Read-only
Section
Auxiliary Area
Function
I/O
Information
Name
Address
Description
7-7
Access
I/O Setting Error Flag
(Fatal error)
A40110
ON when an Input Unit has been installed in an
Output Unit’s slot or vice-versa, so the Input and
Output Units clash in the registered I/O table.
Read-only
I/O Verification Error Flag
(Non-fatal error)
A40209
ON when a Basic I/O Unit registered in the I/O Table Read-only
does not match the Basic I/O Unit actually installed
in the PC because a Unit was added or removed.
Expansion I/O Rack
A40900 to The corresponding flag will be turned ON when an
Read-only
Number Duplication Flags A40907
Expansion I/O Rack’s starting word address was set
from a Programming Device and two Racks have
overlapping word allocations or a Rack’s starting
address exceeds CIO 0901. Bits 00 to 07
correspond to Racks 0 to 7.
Too Many I/O Points Flag A40111
ON when the number of I/O points being used in
Read-only
(Fatal error)
Basic I/O Units exceeds the maximum allowed for
the PC.
Too Many I/O Points,
Details
A40700 to The 6 possible causes of the Too Many I/O Points
A40712
Error are listed below. The 3-digit binary value in
A40713 to A40715 indicates the cause of the error.
(The causes corresponding to values 0 to 5 are
listed below.)
The 13-bit binary value in A40700 to A40712
indicates the details: the excessive value or the
duplicated unit number.
Read-only
1) The number of I/O points will be written here
when the total number of I/O points set in the I/O
Table (excluding Slave Racks) exceed the
maximum allowed for the CPU Unit.
2) The number of interrupt inputs will be written here
when there are more than 32 interrupt inputs.
3) The unit number of the Slave Unit will be written
here when a unit number is duplicated or the
number of I/O points on a C500 Slave Unit exceeds
320.
4) The unit number of the I/O Terminal (excluding
Slave Racks) will be written here when a unit
number is duplicated
5) The unit number of the Master Unit will be written
here when a unit number is duplicated or the unit
number is outside of the allowed setting range.
Too Many I/O Points,
Cause
6) The number of Racks will be written here when
the number of Expansion I/O Racks exceeds the
maximum.
A40713 to This binary value indicates the cause of the Too
A40715
Many I/O Points Error. (See A40700 to A40712.)
Read-only
000 (0): Too many I/O points.
001 (1): Too many Interrupt Input points.
010 (2): Slave Unit’s unit number duplicated or the
number of I/O points on a C500 Slave Unit exceeds
320.
011 (3): I/O Terminal’s unit number duplicated.
100 (4): Master Unit’s unit number duplicated or unit
number is out-of-range (not 0 or 1).
101 (5): Too many Expansion Racks connected.
261
Section
Auxiliary Area
Function
I/O
Information
Duplication
Information
CS1 CPU
Bus Unit
Information
Special I/O
Unit
Information
Name
I/O Bus Error Flag
(Fatal error)
I/O Bus Error Slot
Number
I/O Bus Error Rack
Number
Duplication Error Flag
(Fatal error)
Description
A40114
ON when an error occurs in a data transfer between
the CPU Unit and a Unit mounted to a slot.
A40400 to Contains the 8-bit binary slot number (00 to 09)
A40407
where an I/O Bus Error occurred.
A40408 to Contains the 8-bit binary rack number (00 to 07)
A40415
where an I/O Bus Error occurred.
A40113
ON in the following cases:
Access
Read-only
Read-only
Read-only
Read-only
Two CS1 CPU Bus Units have been assigned the
same unit number.
Two Special I/O Units have been assigned the
same unit number.
Two Basic I/O Units have been allocated the same
data area words.
The same rack number is set for more than one
Expansion Rack.
CS1 CPU Bus Unit
A410
Number Duplication Flags
The Duplication Error Flag (A40113) and the
corresponding flag in A410 will be turned ON when
a CS1 CPU Bus Unit’s unit number has been
duplicated.
Bits 00 to 15 correspond to unit numbers 0 to F.
Read-only
CS1 CPU Bus Unit Error,
Unit Number Flags
A417
When an error occurs in a data exchange between
the CPU Unit and a CS1 CPU Bus Unit, the CS1
CPU Bus Unit Error Flag (A40207) and the
corresponding flag in A417 are turned ON.
Bits 00 to 15 correspond to unit numbers 0 to F.
Read-only
CS1 CPU Bus Unit
Setting Error, Unit
Number Flags
A427
Read-only
CS1 CPU Bus Unit
Setting Error Flag
(Non-fatal error)
A40203
When a CS1 CPU Bus Unit Setting Error occurs,
A40203 and the corresponding flag in A27 are
turned ON.
Bits 00 to 15 correspond to unit numbers 0 to F.
ON when an installed CS1 CPU Bus Unit does not
match the CS1 CPU Bus Unit registered in the I/O
table.
CS1 CPU Bus Unit Error
Flag
(Non-fatal error)
A40207
ON when an error occurs in a data exchange
between the CPU Unit and a CS1 CPU Bus Unit
(including an error in the CS1 CPU Bus Unit itself).
Read-only
Special I/O Unit Number
Duplication Flags
A41100 to The Duplication Error Flag (A40113) and the
A41615
corresponding flag in A411 through A416 will be
turned ON when a Special I/O Unit’s unit number
has been duplicated. (Bits A41100 to A41615
correspond to unit numbers 0 to 95.)
Read-only
Special I/O Unit Setting
Error Flag
(Non-fatal error)
A40202
Read-only
Special I/O Unit Setting
Error, Unit Number Flags
A42800 to When a Special I/O Unit Setting Error occurs,
A43315
A40202 and the corresponding flag in these words
are turned ON. (Bits A42800 to A43315 correspond
to unit numbers 0 to 95.)
A40206
ON when an error occurs in a data exchange
between the CPU Unit and a Special I/O Unit
(including an error in the Special I/O Unit itself).
Read-only
A41800 to When an error occurs in a data exchange between
A42315
the CPU Unit and a Special I/O Unit, the Special I/O
Unit Error Flag (A40206) and the corresponding flag
in these words are turned ON. (Bits A42800 to
A43315 correspond to unit numbers 0 to 95.)
Read-only
Special I/O Unit Error
Flag
(Non-fatal error)
Special I/O Unit Error,
Unit Number Flags
262
Address
7-7
ON when an installed Special I/O Unit does not
match the Special I/O Unit registered in the I/O
table.
Read-only
Read-only
Section
Auxiliary Area
Function
Inner Board
Information
SYSMAC
BUS
Remote I/O
Information
Name
Address
Other PC
operating
information
Access
Inner Board Error Flag
(Non-fatal error)
A40208
ON when an error occurs in a data exchange
between the CPU Unit and the Inner Board
(including an error in the Inner Board itself).
Read-only
Inner Board Error
Information
A424
Read-only
Inner Board Stopped
Error Flag (Fatal error)
SYSMAC BUS Error Flag
(Non-fatal error)
A40112
When an error occurs in a data exchange between
the CPU Unit and the Inner Board, the Inner Board
Error Flag (A40208) and the appropriate error code
will be written to A424.
ON when there is an Inner Board Error (watchdog
timer error).
ON when an error occurs in a data transfer in the
SYSMAC BUS system. The number of the Master
involved is indicated with bits A40500 and A40501.
SYSMAC BUS Master
Error Flags
A40500 to When a transmission error occurs in the SYSMAC
A40501
BUS system, the flag for the affected Master Unit
will be turned ON.
A40500: Flag for Master Unit #0
A40501: Flag for Master Unit #1
A40205
Slave Number of
A42504 to
SYSMAC BUS Error After A42506
Start-up
A42504
only
PC Link
Information
Description
7-7
Read-only
Read-only
Read-only
When there is an error in a Slave Rack, these bits
contain the Slave’s unit number.
When there is an error in an Optical I/O Unit
(excluding Slave Racks), the status of A42504 (0 or
1) indicates whether the Unit is low or high.
Read-only
A42508 to When there is an error in a Slave Rack, this byte
A42515
contains the 2-digit hexadecimal unit number of the
Master to which the Slave is connected.
(0xB0 for Master Unit 0, 0xB1 for Master Unit 1)
When there is an error in an Optical I/O Unit, this
byte contains its 2-digit hexadecimal unit number
(00 to 1F, or 0 to 31 decimal).
Read-only
SYSMAC BUS Slave
Number Refresh Bit
A50900
Read/write
PC Link Operating Level
Flags
A44211 to These flags indicate whether a PC Link Unit is
A44212
mounted to the PC and the PC Link Unit’s operating
level.
Turn this bit ON to refresh the error information in
A425 (unit number of Slave where error occurred
after startup).
A44211: ON when the Unit is in operating level #1.
A44212: ON when the Unit is in operating level #0.
ON if the CPU Unit’s battery is disconnected or its
voltage is low and the PC Setup has been set to
detect this error. (Detect Low Battery)
Read-only
Read-only
Read-only
Battery Error Flag
(Non-fatal error)
A40204
Read-only
Cycle Time Too Long
Flag
(Fatal error)
A40108
ON if the cycle time exceeds the maximum cycle
time set in the PC Setup. (Watch Cycle Time)
Read-only
FPD Teaching Bit
A59800
Read/write
Memory Corruption
Detected Flag
A39511
Turn this bit ON to set the monitoring time in
FPD(269) automatically with the teaching function.
ON when memory corruption is detected when the
power supply is turned on.
Read-only
263
Section
Auxiliary Area
Function
Clock
Information
Name
Clock data
Start-up Time
Power Interruption Time
Number of Power
Interruptions
Total Power ON Time
Network
Communications Information
Communications Port
Enabled Flags
Communications Port
Completion Codes
Communications Port
Error Flags
SYSMAC
BUS Communications
Information
264
SYSMAC BUS Master 1
Restart Bit
SYSMAC BUS Master 0
Restart Bit
Address
Description
7-7
Access
A35100 to
A35107
A35108 to
A35115
A35200 to
A35207
A35208 to
A35215
A35300 to
A35307
A35308 to
A35315
A35400 to
A35407
Second: 00 to 59 (BCD)
Read-only
Minute: 00 to 59 (BCD)
Read-only
Hour: 00 to 23 (BCD)
Read-only
Day of the month: 01 to 31 (BCD)
Read-only
Month: 01 to 12 (BCD)
Read-only
Year: 00 to 99 (BCD)
Read-only
Day of the week: 00: Sunday, 01: Monday,
02: Tuesday, 03: Wednesday, 04: Thursday,
05: Friday, 06: Saturday
Read-only
A510 and
A511
These words contain the time (in BCD) at which the
power was turned on. The contents are updated
every time that the power is turned on.
Read/write
A512 and
A513
A51000 to A51007: Second (00 to 59)
A51008 to A51015: Minute (00 to 59)
A51100 to A51107: Hour (00 to 23)
A51108 to A51115: Day of the month (00 to 31)
These words contain the time (in BCD) at which the
power was interrupted. The contents are updated
every time that the power is interrupted.
A51200 to A51207: Second (00 to 59)
A51208 to A51215: Minute (00 to 59)
A51300 to A51307: Hour (00 to 23)
A51308 to A51315: Day of month (00 to 31)
A514
Contains the number of times (in binary) that power
has been interrupted since the power was first
turned on. To reset this value, overwrite the current
value with 0000.
A523
Contains the total time (in binary) that the PC has
been on in 10-hour units. The data is stored is
updated every 10 hours. To reset this value,
overwrite the current value with 0000.
A20200 to ON when a network instruction (SEND, RECV,
A20207
CMND, or PMCR) can be executed with the
corresponding port number. Bits 00 to 07
correspond to communications ports 0 to 7.
A203 to
These words contain the completion codes for the
A210
corresponding port numbers when network
instructions (SEND, RECV, CMND, or PMCR) have
been executed. Words A203 to A210 correspond to
communications ports 0 to 7.
Read/write
Read/write
Read/write
Read-only
Read-only
A21900 to ON when an error occurred during execution of a
A21907
network instruction (SEND, RECV, CMND, or
PMCR). Bits 00 to 07 correspond to
communications ports 0 to 7.
A52614
Turn this bit ON to restart SYSMAC BUS Remote
I/O Master Unit 1. (Turned OFF automatically when
restart processing is completed.)
Read-only
A52615
Read/write
Turn this bit ON to restart SYSMAC BUS Remote
I/O Master Unit 0. (Turned OFF automatically when
restart processing is completed.)
Read/write
Section
Auxiliary Area
Function
Peripheral
Port
Communica
tions
Information
RS-232C
Port
Communica
tions
Information
Serial
Device
Communica
tions
Information
Name
Address
Description
7-7
Access
Peripheral Port
Communications Error
Flag
A39212
ON when a communications error has occurred at
the peripheral port.
Read-only
Peripheral Port Restart
Bit
Peripheral Port Settings
Change Bit
Peripheral Port Error
Flags
Peripheral Port PT
Communications Flags
A52601
Turn this bit ON to restart the peripheral port.
Read/write
Peripheral Port PT
Priority Registered Flags
A39408 to The corresponding bit will be ON for the PT that has Read-only
A39415
priority when the peripheral port is communicating in
NT link mode. Bits 0 to 7 correspond to units 0 to 7.
RS-232C Port
Communications Error
Flag
A39204
A61901
ON while the peripheral port’s communications
settings are being changed.
A52808 to These flags indicate what kind of error has occurred
A52815
at the peripheral port.
A39400 to The corresponding bit will be ON when the
A39407
peripheral port is communicating with a PT in NT
link mode. Bits 0 to 7 correspond to units 0 to 7.
Read/write
Read/write
Read-only
ON when a communications error has occurred at
the RS-232C port.
Read-only
RS-232C Port Restart Bit A52600
RS-232C Port Settings
A61902
Change Bit
RS-232C Port Error Flags A52800 to
A52807
RS-232C Port Send
A39205
Ready Flag
(No-protocol mode)
Turn this bit ON to restart the RS-232C port.
ON while the RS-232C port’s communications
settings are being changed.
These flags indicate what kind of error has occurred
at the RS-232C port.
ON when the RS-232C port is able to send data in
no-protocol mode.
Read/write
Read/write
RS-232C Port Reception
Completed Flag
(No-protocol mode)
A39206
ON when the RS-232C port has completed the
reception in no-protocol mode.
Read-only
RS-232C Port Reception
Overflow Flag
(No-protocol mode)
A39207
ON when a data overflow occurred during reception
through the RS-232C port in no-protocol mode.
Read-only
RS-232C Port PT
Communications Flags
A39300 to The corresponding bit will be ON when the
A39307
RS-232C port is communicating with a PT in NT link
mode. Bits 0 to 7 correspond to units 0 to 7.
Read-only
RS-232C Port PT Priority
Registered Flags
A39308 to The corresponding bit will be ON for the PT that has
A39315
priority when the RS-232C port is communicating in
NT link mode. Bits 0 to 7 correspond to units 0 to 7.
Read-only
RS-232C Port Reception
Counter
(No-protocol mode)
A39300 to Indicates (in binary) the number of bytes of data
A39315
received when the RS-232C port is in no-protocol
mode.
Read-only
Communications Units 0
to 15, Ports 1 to 4
Settings Change Bits
A62001 to The corresponding flag will be ON when the settings Read/write
A63504
for that port are being changed.
(Bits 1 to 4 in A620 to A635 correspond to ports 1 to
4 in Communications Units 0 to 15.)
A63601 to The corresponding flag will be ON when the settings Read/write
A63604
for that port are being changed.
(Bits 1 to 4 correspond to ports 1 to 4.)
Communications Board
Ports 1 to 4 Settings
Change Bits
Read/write
Read-only
265
Section
TR (Temporary Relay) Area
Function
Instruction-r
elated
information
7-8
Name
Address
Step Flag
A20012
Current EM Bank
A301
Maximum Differentiation
Flag Number
A339 to
A340
Macro Area Input Words
Macro Area Output
Words
Description
7-8
Access
ON for one cycle when step execution is started
with STEP(008).
This word contains the current EM bank number in
4-digit hexadecimal.
These words contain the maximum value of the
differentiation flag numbers being used by
differentiation instructions.
Read-only
A600 to
A603
When MCRO(099) is executed, it copies the input
data from the specified source words (input
parameter words) to A600 through A603.
Read/write
A604 to
A607
After the subroutine specified in MCRO(099) has
been executed, the results of the subroutine are
transferred from A604 through A607 to the specified
destination words (output parameter words).
Read/write
Read-only
Read-only
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. 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.
TR bits cannot be changed from a Programming Device.
Examples
In this example, a TR bit is used when two outputs have been directly connected
to a branch point.
Instruction
Operand
LD
OR
000000
OUT
AND
OUT
LD
AND
OUT
000001
TR 0
000002
000003
TR 0
000004
000005
In this example, a TR bit is used when an output is connected to a branch point
without a separate execution condition.
Instruction
Operand
LD
000000
TR 0
OUT
AND
OUT
LD
OUT
266
000001
000002
TR 0
000003
Section
Timer Area
7-9
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.
Instruction
Operand
LD
000000
000001
OUT
OUT
Instruction
Operand
LD
OUT
000000
000001
000002
000003
AND
OUT
7-9
000002
Timer Area
The 4,096 timer numbers (T0000 to T4095) are shared by the TIM, TIMH(015),
TMHH(540), TTIM(087), TIMW(813), and TMHW(815) instructions. Timer
Completion Flags and present values (PVs) for these instructions are accessed
with the timer numbers. (The TIML(542) and MTIM(543) 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.
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.)
The following table shows when timer PVs and Completion Flags will be reset.
Effect on PV and Completion Flag
Instruction name
TIMER: TIM
HIGH-SPEED TIMER:
TIMH(015)
ONE-MS TIMER:
TMHH(540)
ACCUMULATIVE TIMER:
TTIM(087)
TIMER WAIT: TIMW(813)
HIGH-SPEED TIMER WAIT:
TMHW(815)
Mode change1
PC start-up1
PV → 0
PV → 0
PV → 9999
Flag → OFF
Flag → OFF
Flag → OFF
Note
CNR(545)
Operation in
Jumps and Interlocks
Jumps
(JMP-JME) or
Tasks on
standby
PVs refreshed in
operating timers
Interlocks
(IL-ILC)
PV → SV
(Reset to SV.)
Flag → OFF
PV Maintained
PV Maintained
PVs refreshed in
operating timers
-----
1. If the IOM Hold BIt (A50012) is ON, the PV and Completion Flag will be retained when a fatal error occurs 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.
267
Section 7-11
Data Memory (DM) Area
2. If the IOM Hold BIt (A50012) is ON and the PC 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 PC’s power is cycled.
3. Since the TIML(542) and MTIM(543) 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, TIMH(015), TMHH(540), TIMW(813), and
TMHW(815) 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.
Note When designating addresses in programming or allocations inside C200H Special I/O Units, “T000” to “T511” will actually specify T0000 to T0511 in the CPU
Unit. T0512 to T4095 cannot be specified inside the C200H Special I/O Units.
7-10 Counter Area
The 4,096 counter numbers (C0000 to C4095) are shared by the CNT,
CNTR(012), and CNTW(814) 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.
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.
Effect on PV and Completion Flag
Instruction name
Reset
COUNTER: CNT
REVERSIBLE
COUNTER: CNTR(012)
COUNTER WAIT:
CNTW(814)
PV → 0000
Mode
change
Maintained
PC startup
Maintained
Reset Input
Reset
CNR(545)
Reset
Interlocks
(IL-ILC)
Maintained
Flag → OFF
Note When designating addresses in programming or allocations inside C200H Special I/O Units, “C000” to “C511” will actually specify T0000 to T0511 in the CPU
Unit. C0512 to C4095 cannot be specified inside the C200H Special I/O Units.
7-11 Data Memory (DM) Area
The DM Area contains 32,768 words with addresses ranging from D00000 to
D32767. 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 PC’s power is cycled or the PC’s operating mode is changed from PROGRAM mode to RUN/MONITOR mode or viceversa.
268
Section 7-11
Data Memory (DM) Area
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).
Bits in the DM Area cannot be force-set or force-reset.
Note
1. If using a CS1 CompoBus/D Master Unit, use the following as the status
area. Data in this area is updated when the CompoBus/D Master Unit is
used, so the area cannot be used for other applications.
• Master Status: D06032 + (2 x unit number)
• Current Communications Cycle Time: D06033 + (2 x unit number)
2. When designating addresses in programming or allocations inside Group-I
and Group-II C200H Special I/O Units, DM 0000 to DM 0999 will actually
specify D00000 to D00999 in the CPU Unit and DM 10000 to DM19999 will
actually specify D20000 to D20999 (part of the Special I/O Unit Area) in the
CPU Unit. Other addresses in this area cannot be specified. When designating addresses in programming or allocations inside Group-III and Group-IV
C200H Special I/O Units, DM 0000 to DM 6655 will actually specify D00000
to D06655 in the CPU Unit. Other addresses in this area cannot be specified.
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 (D00000 to D32767) can be indirectly addressed
with hexadecimal values 0000 to 7FFF.
@D00100
0100
D00256
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 (D00000 to D09999) can be indirectly addressed with BCD values 0000 to 9999.
*D00100
DM Area Allocation to
Special Units Inner Board
1, 2, 3...
0100
D00100
Address actually used.
Parts of the DM Area are allocated to Special I/O Units, CS1 CPU Bus Units, and
Inner Boards for functions such as initial Unit settings. The timing for data transfers is different for these Units, but may occur at any of the three following times.
1. Transfer data when the PC’s power is turned on or the Unit is restarted.
2. Transfer data once each cycle.
3. Transfer data when required.
Refer to the Unit’s Operation Manual for details on data transfer timing.
269
Section 7-12
Extended Data Memory (EM) Area
Special I/O Units (D20000 to D29599)
Each Special I/O Unit is allocated 100 words (based on unit numbers 0 to 95).
Refer to the Unit’s Operation Manual for details on the function of these words.
Special I/O Unit
CPU Unit
Data transferred to the
Special I/O
Unit when the
PC is turned
on or the Unit
is restarted.
DM Area for Special I/O Units
(100 words/Unit)
Data transferred to the
CPU Unit at
cyclic refreshing or when
necessary.
CS1 CPU Bus Units (D30000 to D31599)
Each CS1 CPU Bus Unit is allocated 100 words (based on unit numbers 0 to F).
Refer to the Unit’s Operation Manual for details on the function of these words.
With some CS1 CPU Bus Units such as Ethernet Units, initial settings must be
registered in the CPU Unit’s Parameter Area; this data can be registered with a
Programming Device other than a Programming Console.
CS1 CPU Bus Unit
CPU Unit
Data transferred to the
CS1 Special
Unit when the
PC is turned on
or the Unit is
restarted.
DM Area for CS1 CPU Bus Units
(100 words/Unit)
Data transferred to the
CPU Unit at
cyclic refreshing or when
necessary.
Inner Board (D32000 to D32099)
The Inner Board is allocated 100 words. Refer to the Board’s Operation Manual
for details on the function of these words.
CPU Unit
DM Area for Inner Board
(100 words)
Data transferred to the Inner Board when the
PC is turned on or the Board is restarted.
7-12 Extended Data Memory (EM) Area
The EM Area is divided into 13 banks (0 to C) that each contain 32,768 words.
EM Area addresses range from E0_00000 to EC_32767. This data area is used
for general data storage and manipulation and is accessible only by word.
Data in the EM Area is retained when the PC’s power is cycled or the PC’s operating mode is changed from PROGRAM mode to RUN/MONITOR mode or viceversa.
270
Section 7-12
Extended Data Memory (EM) Area
Although bits in the EM Area cannot be accessed directly, the status of these bits
can be accessed with the BIT TEST instructions, TST(350) and TSTN(351).
Bits in the EM Area cannot be force-set or force-reset.
There are two ways to specify an EM address: the bank and address can be specified at the same time or an address in the current bank can be specified (after
changing the current bank, if necessary). In general, we recommend specifying
the bank and address simultaneously.
Specifying EM
Addresses
1, 2, 3...
1. Bank and Address Specification
With this method, the bank number is specified just before the EM address.
For example, E2_00010 specifies EM address 00010 in bank 2.
2. Current Bank Address Specification
With this method, just the EM address is specified. For example, E00010
specifies EM address 00010 in the current bank. (The current bank must be
changed with EMBC(281) to access data in another bank. A301 contains
the current EM bank number.)
The current bank will be reset to 0 when the operating mode is changed from
PROGRAM mode to RUN/MONITOR mode, unless the IOM Hold Bit
(A50012) is ON. The current bank is not changed as the program proceeds
through cyclic tasks and the current bank will be returned to its original value
(in the source cyclic task) if it has been changed in an interrupt task.
Indirect Addressing
Words in the EM Area can be indirectly addressed in two ways: binary-mode and
BCD-mode.
Binary-mode Addressing (@E)
When a “@” character is input before a EM address, the content of that EM word
is treated as binary and the instruction will operate on the EM word in the same
bank at that binary address. All of the words in the same EM bank (E00000 to
E32767) can be indirectly addressed with hexadecimal values 0000 to 7FFF
and words in the next EM bank (E00000 to E32767) can be addressed with hexadecimal values 8000 to FFFF.
@E1_00100
0200
@E00100
0200
E1_00512
Address actually used.
E0_00512
Address actually used.
(When the current
bank is bank 0.)
BCD-mode Addressing (*E)
When a “*” character is input before a EM address, the content of that EM word
is treated as BCD and the instruction will operate on the EM word in the same
bank at that BCD address. Only part of the EM bank (E00000 to E09999) can be
indirectly addressed with BCD values 0000 to 9999.
File Memory Conversion
*E1_00100
0200
*E00100
0200
E1_00200
Address actually used.
E0_00200
Address actually used.
(When the current
bank is bank 0.)
Part of the EM Area can be converted for use as file memory with settings in the
PC Setup. All EM banks from the specified bank (EM File Memory Starting Bank)
to the last EM bank will be converted to file memory.
Once EM banks have been converted to file memory, they cannot be accessed
(read or written) by instructions. An Illegal Access Error will occur if a filememory bank is specified as an operand in an instruction.
271
Section 7-13
Index Registers
The following example shows EM file memory when the EM File Memory Starting Bank has been set to 3 in the PC Setup.
EM bank number
0
1
2
3
.
.
.
B
C
Example:
EM File Memory Starting
Bank set to 3 in the PC Setup
EM file memory
(Cannot be accessed
from instructions.)
Note When designating addresses in programming or allocations inside C200H Special I/O Units, “EM 0000” to “EM 6143” will actually specify E0_00000 to
E0_06143 in the CPU Unit. Other addresses in this area cannot be specified.
7-13 Index Registers
The sixteen Index Registers (IR0 to IR15) are used for indirect addressing. Each
Index Register can hold a single PC 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 PC memory address and write that value to
the specified Index Register. (Use MOVRW(561) to set the PC memory address
of a timer/counter PV in an Index Register.)
Note Refer to Appendix E Memory Map for more details on PC 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 PC 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 PC memory addresses. It
isn’t necessary to specify the data area.
• In addition to basic indirect addressing, the PC 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).
Pointer
Note 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 PC memory addresses.
272
Section 7-13
Index Registers
The following table shows the variations available when indirectly addressing
I/O memory with Index Registers. (IR represents an Index Register from IR0 to
IR15.)
Variation
Function
Syntax
Example
Indirect addressing
The content of IR is treated as
the PC memory address of a bit
or word.
,IR
LD , IR0
Loads the bit at the PC
memory address
contained in IR0.
Indirect addressing
with constant offset
The constant prefix is added to
the content of IR and the result
is treated as the PC memory
address of a bit or word.
Constant ,IR
LD +5, IR0
Adds 5 to the contents of
IR0 and loads the bit at
that PC memory
address.
(Include a + or –
in the constant.)
The constant may be any integer
from –2,048 to 2,047.
Indirect addressing
with DR offset
The content of the Data Register
DR , IR
is added to the content of IR
and the result is treated as the PC
memory address of a bit or word.
LD DR0 , IR0
Adds the contents of
DR0 to the contents of
IR0 and loads the bit at
that PC memory
address.
Indirect addressing
with auto-increment
After referencing the content of
IR as the PC memory address
of a bit or word, the content is
incremented by 1 or 2.
LD , IR0++
Loads the bit at the PC
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 PC
memory address.
Indirect addressing
The content of IR is
with auto-decrement decremented by 1 or 2 and the
result is treated as the PC
memory address of a bit or word.
Increment by 1:
, IR+
Increment by 2:
, IR++
Decrement by 1:
,– IR
Decrement by 2:
,– – IR
This example shows how to store the PC memory address of a word (CIO 0002)
in an Index Register (IR0), use the Index Register in an instruction, and use the
auto-increment variation.
MOVR(560) 0002
IR0
Stores the PC memory address of
CIO 0002 in IR0.
MOV(021)
#0001
,IR0
Writes #0001 to the PC memory address contained in IR0.
MOV(021)
#0020
+1,IR0
Reads the content of IR0, adds 1, and
writes #0020 to that PC memory address.
Example
Regular
data area
address
PC memory address
MOVE TO REGISTER instruction
MOVR(560) 0002 IR0
I/O memory
Pointer
#0001
#0020
Note The PC memory addresses are listed in the diagram above, but it isn’t necessary
to know the PC memory addresses when using Index Registers.
273
Section 7-13
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)
D00000
IR2
, IR2
When the operand is treated as a word, the contents of the Index Register
are used “as is” as the PC memory address of a word.
In this example MOVR(560) sets the PC memory address of CIO 0002 in
IR2 and the MOV(021) instruction copies the contents of D00000 to
CIO 0002.
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 PC memory address of CIO 000013
(0C000D Hex) in IR2. The SET instruction adds +5 from bit 13 to this PC
memory address, so it turns ON bit CIO 000102.
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
Symbol Math
Instructions
Instruction name
Mnemonic
MOVE TO REGISTER
MOVE TIMER/COUNTER PV TO
REGISTER
DOUBLE MOVE
DOUBLE DATA EXCHANGE
SET RECORD LOCATION
GET RECORD NUMBER
DOUBLE INCREMENT BINARY
DOUBLE DECREMENT BINARY
DOUBLE EQUAL
DOUBLE NOT EQUAL
DOUBLE LESS THAN
DOUBLE LESS THAN OR EQUAL
DOUBLE GREATER THAN
DOUBLE GREATER THAN OR EQUAL
DOUBLE COMPARE
DOUBLE SIGNED BINARY ADD
WITHOUT CARRY
DOUBLE SIGNED BINARY SUBTRACT
WITHOUT CARRY
MOVR(560)
MOVRW(561)
MOVL(498)
XCGL(562)
SETR(635)
GETR(636)
++L(591)
– –L(593)
=L(301)
tuL(306)
tL(311)
t=L(316)
uL(321)
u=L(326)
CMPL(060)
+L(401)
–L(411)
The SRCH(181), MAX(182), and MIN(183) instructions can output the PC
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.
274
Section 7-13
Index Registers
Index Register
Initialization
The Index Registers will be cleared in the following cases:
1, 2, 3...
1. The operating mode is changed from PROGRAM mode to RUN/MONITOR
mode or vice-versa and the IOM Hold Bit is OFF.
2. The PC’s power supply is cycled and the IOM Hold Bit is OFF or not protected in the PC Setup.
IOM Hold Bit Operation
If the IOM Hold BIt (A50012) is ON, the Index 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 (A50012) is ON and the PC Setup’s “IOM Hold Bit Status at
Startup” setting is set to protect the IOM Hold Bit, the Index Registers won’t be
cleared when the PC’s power supply is reset (ON → OFF → ON).
Forcing Bit Status
Bits in Index Registers cannot be force-set and force-reset.
Precautions
Do not use Index Registers until a PC 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 PC
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 Programming Devices. If using Index Registers with the same
number to perform multiple tasks, it is only possible with the Programming Devices 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 Programming Devices.
• It is not possible to either read or write to the Index Registers using Host Link
commands or FINS commands.
• The Index Registers cannot share tasks between them.
Monitoring and Sharing Index Registers
It is possible to monitor or share 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 Programming Devices, Host Link commands, or FINS commands.
275
Section 7-13
Index Registers
Note Be sure to use PC memory addresses in Index Registers.
IR storage words for task 1
Task 1
D01001 and D01000
stored in IR0
or
or
Actual memory address of
CIO 0000 (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 0005 (0000C005 Hex)
stored in IR0
Contents of IR0 stored in
D02001 and D02000
Peripheral servicing
Read D01001
and D01000
Read D02001
and D02000
To share Index Register values between two or more tasks, set the storage
words for the Index Register values for each task to the same words. For example, in the example given above, you would use D01001 and D01000 for both
Task 1 and Task 2.
Note When switching tasks (ending one task and starting the next), data is exchanged
internally (storing and restoring IR values) between the Index Register temporary areas for each task. For example, if using IR0 for both Task 1 and Task 2, IR0
values are overwritten in the following way when switching tasks.
276
Section 7-14
Data Registers
At start of operation
Next cycle
Timing
Task 1
Value in Index Register 0
Before executing first
program address
Instruction executed
After END instruction
executed
Task 2
Before executing first
program address
Instruction executed
After END instruction
executed
Peripheral servicing
Task 1
Before executing first
program address
Instruction executed
After END instruction
executed
Task 2
Before executing lead
program address
Instruction executed
After END instruction
executed
Peripheral servicing
IR0 is undefined.
IR0 overwritten (e.g., overwritten as A)
Value in IR0 (A) is copied to Task 1 IR0 temporary
area.
IR0 is undefined.
IR0 overwritten (e.g., overwritten as B)
Value in IR0 (B) is copied to Task 2 IR0 temporary
area.
When reading the value in IR0 using the Programming
Devices, B is read.
Value (A), which was copied to Task 1’s IR0 temporary
area, is stored in IR0.
IR0 overwritten (e.g., overwritten as A’)
Value in IR0 (A’) is copied to Task 1 IR0 temporary
area.
Value in IR0 (B) is copied to Task 2 IR0 temporary
area.
IR0 overwritten (e.g., overwritten as B’)
Value in IR0 (B’) is copied to Task 2 IR0 temporary
area.
When reading the value in IR0 using the Programming
Devices, B’ is read.
Same for remaining cycles
7-14 Data Registers
The sixteen Data Registers (DR0 to DR15) are used to offset the PC memory
addresses in Index Registers when addressing words indirectly.
The value in a Data Register can be added to the PC 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.
I/O Memory
Set to a base value
with MOVR(560) or
MOVRW(561).
Pointer
Set with a regular
instruction.
Examples
The following examples show how Data Registers are used to offset the PC
memory addresses in Index Registers.
LD
DR0 ,IR0
Adds the contents of DR0 to the contents of IR0 and loads the bit at that PC
memory address.
MOV(021)
#0001
DR0 ,IR1 Adds the contents of DR0 to the contents of IR1 and writes #0001 to that
PC memory address.
Range of Values
The contents of data registers are treated as signed binary data and thus have a
range of –32,768 to 32,767.
277
Section 7-16
Condition Flags
Hexadecimal content
Data Register
Initialization
Decimal equivalent
8000 to FFFF
–32,768 to –1
0000 to 7FFF
0 to 32,767
The Data Registers will be cleared in the following cases:
1, 2, 3...
1. The operating mode is changed from PROGRAM mode to RUN/MONITOR
mode or vice-versa and the IOM Hold Bit is OFF.
2. The PC’s power supply is cycled and the IOM Hold Bit is OFF or not protected in the PC Setup.
IOM Hold Bit Operation
If the IOM Hold BIt (A50012) 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 (A50012) is ON and the PC 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 PC’s power supply is reset (ON → OFF → ON).
Forcing Bit Status
Bits in Data Registers cannot be force-set and force-reset.
Precautions
Data Registers are local to each task. For example, DR0 used in task 1 is different from DR0 used in task 2.
The content of Data Registers cannot be accessed (read or written) from a Programming Device.
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.
7-15 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, 2, 3...
Forcing Bit Status
1. The operating mode is changed from PROGRAM mode to RUN/MONITOR
mode or vice-versa.
2. The PC’s power supply is cycled.
The Task Flags cannot be force-set and force-reset.
7-16 Condition Flags
These flags include the Arithmetic Flags such as the Error Flag and Equals Flag
which indicate the results of instruction execution. In earlier PCs, these flags
were in the SR Area.
The Condition Flags are specified with labels, such as CY and ER, or with symbols, such as P_Carry and P_Instr_Error, rather than addresses. The status of
these flags reflects the results of instruction execution, but the flags are readonly; they cannot be written directly from instructions or Programming Devices.
Note The CX-Programmer treats condition flags as global symbols beginning with P_.
278
Section 7-16
Condition Flags
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.
The Condition Flags cannot be force-set and force-reset.
Summary of the
Condition Flags
Name
Error Flag
Access Error Flag
Carry Flag
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.
Label
ER
AER
CY
Symbol
P_ER
P_AER
P_CY
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 PC 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 PC 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.
Greater Than Flag
u
P_GT
Equals Flag
=
P_EQ
Less Than Flag
t
P_LT
Negative Flag
N
P_N
Overflow Flag
OF
P_OF
Underflow Flag
UF
P_UF
Greater Than or
Equals Flag
Not Equal Flag
u=
P_GE
tu
P_NE
Less Than or
Equals Flag
Always ON Flag
t=
P_LE
ON
P_On
Turned ON when the result of calculation overflows the capacity of
the result word(s).
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. (Always 1.)
Always OFF Flag
OFF
P_Off
Always OFF. (Always 0.)
279
Section 7-17
Clock Pulses
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.
Using the Condition
Flags
Instruction
Instruction A
Operand
LD
Instruction A
=
AND
The result from instruction A is
reflected in the Equals Flag.
Instruction B
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 9 Programming 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. (The flag’s status must be transferred to
a bit.)
Note The condition flags cannot be designated directly in programming or allocations
inside C200H Special I/O Units.
7-17 Clock Pulses
The Clock Pulses are flags that are turned ON and OFF at regular intervals by
the system.
Name
Label
0.02 s Clock Pulse 0.02s
Symbol
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
0.1s
P_0_1s
0.2 s Clock Pulse
0.2s
P_0_2s
1 s Clock Pulse
1s
P_1s
1 min Clock Pulse
1min
P_1min
ON for 0.05 s
OFF for 0.05 s
0.05 s
0.05 s
ON for 0.1 s
OFF for 0.1 s
0.1 s
0.1 s
0.5 s
ON for 0.5 s
OFF for 0.5 s
0.5 s
ON for 30 s
OFF for 30 s
30 s
30 s
The Clock Pulses are specified with labels (or 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
Programming Devices.
280
Section 7-18
Parameter Areas
The Clock Pulses are cleared at the start of operation.
The following example turns CIO 000000 ON and OFF at 0.5 s intervals.
Using the Clock Pulses
1s
000000
Instruction
LD
OUT
Operand
1s
000000
0.5 s
000000
0.5 s
Note The clock pulses cannot be designated directly in programming or allocations
inside C200H Special I/O Units.
7-18 Parameter Areas
Unlike the data areas in I/O memory which can be used in instruction operands,
the Parameter Area can be accessed only from a Programming Device. The Parameter Area is made up of the following parts.
• The PC Setup
• The Registered I/O Table
• The Routing Table
• The CS1 CPU Bus Unit Settings
The user can customize the basic specifications of the CPU Unit with the settings in the PC Setup. The PC Setup contains settings such as the serial port
communications settings and minimum cycle time setting.
PC Setup
Note Refer to 8-4 PC Setup for details on the PC Setup settings and refer to the Programming Device’s Operation Manual for details on changing these settings.
Registered I/O Table
The Registered I/O Table is a table in the CPU Unit that contains the information
on the model and slot location of all of the Units mounted to the CPU Rack, Expansion I/O Racks, and Slave Racks. The I/O Table is written to the CPU Unit
with a Programming Device operation.
The CPU Unit allocates I/O memory to actual I/O points (on Basic I/O Units or
Remote I/O Units) and CPU Bus Units based on the information in the Registered I/O Table. Refer to the Programming Device’s Operation Manual for details
on registering the I/O Table.
3
4
16-point Input
Communications
2
12-point Output
1
16-point Output
0
Analog
Programming Device
CPU Unit
Registered
I/O
Table
Analog
Communications
Output 12
Input 16
Output 16
The I/O Verification Error Flag (A40209) will be turned ON if the models and locations of the Units actually mounted to the PC (CPU Rack, Expansion I/O Racks,
and Slave Racks) do not match the information in the Registered I/O Table.
281
Section 7-18
Parameter Areas
When transferring data between networks, it is necessary to create a table in
each CPU Unit that shows the communications route from the local PC’s Communications Unit to the other networks. These tables of communications routes
are called “Routing Tables.”
Create the Routing Tables with a Programming Device or the Controller Link
Support Software and transfer the tables to each CPU Unit. The following diagram shows the Routing Tables used for a data transfer from PC #1 to PC #4.
Routing Table
Node number M
Network 2
Unit number n
Network 1
Network 3
Node number N
1, 2, 3...
1. Relay Network Table of PC #1:
Destination network
3
Relay network
1
Relay node
N
2. Relay Network Table of PC #2:
Destination network
3
Relay network
2
Relay node
M
3. Local Network Table of PC #3:
Local network
3
Unit number
n
Relay Network Table
This table lists the network address and node number of the first relay node to
contact in order to reach the destination network. The destination network is
reached through these relay nodes.
Local Network Table
This table lists the network address and unit number of the Communications Unit
connected to the local PC.
282
Parameter Areas
Section 7-18
CS1 CPU Bus Unit
Settings
These are settings for the CS1 CPU Bus Units which are controlled by the CPU
Unit. The actual settings depend on the model of CS1 CPU Bus Unit being used;
refer to the Unit’s Operation Manual for details.
These settings are not managed directly like the I/O memory’s data areas, but
are set from a Programming Device like the Registered I/O Table. Refer to the
Programming Device’s Operation Manual for details on changing these settings.
Programming Device
CS1 CPU Bus Unit
CPU Unit
CS1 CPU
Bus Unit
Settings
283
SECTION 8
I/O Allocations and Initial Settings
This section describes I/O allocations to Basic I/O Units and CPU Bus Units, data exchange with CPU Bus Units, and initial
settings. Initial hardware settings are made on the CPU Unit’s DIP switch and initial software settings are made in the PC
Setup.
8-1
8-2
8-3
8-4
8-5
I/O Allocations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-1-1 I/O Allocation to Basic I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-1-2 I/O Allocation to Special I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-1-3 I/O Allocation to CS1 CPU Bus Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-1-4 I/O Allocation to SYSMAC BUS Slave Racks . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-1-5 I/O Table Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Exchange with CPU Bus Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-2-1 Special I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-2-2 CS1 CPU Bus Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DIP Switch Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PC Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-4-1 Overview of the PC Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-4-2 PC Setup Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Explanations of PC Setup Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
286
287
295
296
297
298
299
299
301
303
306
306
308
314
285
Section
I/O Allocations
8-1
8-1
I/O Allocations
In CS1-series PCs, part of the I/O memory is allocated to each Unit. Memory is
allocated differently to Basic I/O Units, Special I/O Units, and CS1 CPU Bus
Units.
Basic I/O Units
Basic I/O Units
CS1 Basic I/O Units
I/O Area
CIO 0000 to CIO 0319 (See Note 1.)
(Memory is allocated in one-word
units based on mounting position in
the Racks.)
C200H Basic I/O Units
Allocation
Note 1. The Rack’s first word setting can be
changed from the default setting (CIO 0000)
to any word from CIO 0000 to CIO 0999.
The first word setting can be changed only
with a Programming Device other than a
Programming Console.
CS1/C200H Group-2 High-density I/O
Units (See Note 2.)
286
2. The unit number setting on the front of
C200H Group-2 High-density I/O Units is
ignored. Words are allocated to these Units
based on their location in the Rack, just like
Basic I/O Units.
Section
I/O Allocations
8-1
Special I/O Units
Special I/O Units
CS1 Special I/O Units
Special I/O Unit Area
CIO 2000 to CIO 2959
(Each Unit is allocated ten words
based on its unit number setting.)
Allocation
C200H Special I/O Units
(See Note 2.)
Note 1. Although there are 96 unit number settings,
a maximum of 80 Units can actually be
mounted to a PC because that is the
maximum number of slots possible.
2. Some Units classified as I/O Units (namely
C200H High-density I/O Units) are actually
treated as Special I/O Units.
CS1 CPU Bus Units
CS1 CPU Bus Unit Area
CS1 CPU Bus Units
CIO 1500 to CIO 1899
(Each Unit is allocated 25 words
based on its unit number setting.)
Allocation
8-1-1 I/O Allocation to Basic I/O Units
Basic I/O Units include CS1 Basic I/O Units, C200H Basic I/O Units, and C200H
Group-2 High-density I/O Units. These Units are allocated words in the I/O Area
(CIO 0000 to CIO 0319) and can be mounted to the CPU Rack, CS1 Expansion
Racks, and C200H Expansion I/O Racks.
Note
1. Refer to 2-4 Units for list of specific Basic I/O Units.
2. CS1 Basic I/O Units cannot be mounted to C200H Expansion I/O Racks.
287
Section
I/O Allocations
Basic I/O Units on the
CPU Rack
8-1
Basic I/O Units on the CPU Rack are allocated words from left to right and each
Unit is allocated as many words as it requires.
Note
1. Units that have 1 to 16 I/O points are allocated16 bits and Units that have 17
to 32 I/O points are allocated 32 bits. For example, an 8-point DC Input Unit
is allocated 16 bits (1 word) and bits 00 to 07 of that word are allocated to the
Unit’s 8 points.
2. I/O words are not allocated to empty slots. To allocate words to an empty
slot, change the I/O table with a Programming Device.
3. The unit number setting on the front of C200H Group-2 High-density I/O
Units is ignored. Words are allocated to these Units based on their location
on the Rack, just like Basic I/O Units.
CIO
0000
CPU Rack
Power Supply Unit
CPU Unit
Slot numbers 2, 3, 5, 8, and 10
IN
16
IN
64
OUT OUT
8
32
CIO CIO CIO CIO CIO
0000 0001 0002 0006 0007
to
to
0005
0008
Slot
288
Unit
Power Supply Unit
IN
8
CPU Unit
Example 1
The following example shows the I/O allocation to 5 Basic I/O Units in the CPU
Rack.
CPU Rack
0
C200H-ID211 8-point DC Input Unit
Words
required
1
Words
allocated
CIO 0000
1
C200H-ID212 16-point DC Input Unit
1
CIO 0001
2
C200H-ID217 64-point DC Input Unit
4
3
C200H-OD411 8-point Transistor Output Unit
1
CIO 0002 to
CIO 0005
CIO 0006
4
C200H-OD218 32-point Transistor Output Unit
2
CIO 0007 to
CIO 0008
Section
I/O Allocations
Slot 0
8-point DC Input Unit
Bit addresses
Slot 3
8-point Transistor
Output Unit
Bit addresses
Slot 1
16-point DC Input Unit
Bit addresses
8-1
Slot 2
64-point DC Input Unit
Bit addresses
Slot 4
32-point Transistor
Output Unit
Bit addresses
289
Section
I/O Allocations
8-1
Example 2
The following example shows the I/O allocation to 4 Basic I/O Units in the CPU
Rack with one empty slot.
IN
32
IN
96
CIO
0000
CIO
0001
to
0002
CIO
0003
to
0008
Slot
Empty
OUT
96
CIO
0009
to
0014
CPU Unit
IN
16
Power Supply Unit
CPU Rack
Unit
0
C200H-ID212 16-point DC Input Unit
Words
required
1
1
C200H-ID216 32-point DC Input Unit
2
2
CS1W-ID291 96-point DC Input Unit
6
3
Empty
0
4
CS1W-OD291 96-point Transistor Output Unit
6
Words
allocated
CIO 0000
CIO 0001 to
CIO 0002
CIO 0003 to
CIO 0008
None
CIO 0009 to
CIO 0014
Example 3
The following example shows the I/O allocation to 5 Basic I/O Units in the CPU
Rack. Two slots are filled with Dummy Units to reserve I/O words for those slots.
Slot
CIO
0000
to
0001
CIO
0002
ReReserved served
16
32
CIO
0003
CIO
0004
to
0005
IN
8
CIO
0006
Unit
CPU Unit
OUT
8
Power Supply Unit
CPU Rack
IN
32
0
C200H-ID216 32-point DC Input Unit
Words
required
2
1
C200H-OC221 8-point Relay Output Unit
1
Words
allocated
CIO 0000 to
CIO 0001
CIO 0002
2
Reserve one word. (See note.)
1
CIO 0003
3
Reserve two words. (See note.)
2
4
C200HS-INT01 8-point Interrupt Input Unit
1
CIO 0004 to
CIO 0005
CIO 0006
Note Use the CX-Programmer’s I/O table change operation to reserve words for the
empty slots.
290
Section
I/O Allocations
I/O allocation to Basic I/O Units continues from the CPU Rack to the Expansion
Rack (CS1 Expansion Rack or C200H Expansion I/O Rack) connected to the
CPU Rack. Words are allocated from left to right and each Unit is allocated as
many words as it requires, just like Units in the CPU Rack.
Power Supply Unit
CPU Unit
CIO
0000
Power Supply Unit
Words are allocated in order
beginning with the Expansion
Rack nearest the CPU Rack.
Power Supply Unit
Basic I/O Units in
Expansion Racks
8-1
CPU Rack
CS1 Expansion Rack
CS1 Expansion Rack
291
Section
I/O Allocations
8-1
OUT OUT
16 32
CIO CIO CIO CIO CIO
0000 0001 0003 0007 0008
and to
and
0002 0006
0009
IN
16
IN Empty OUT OUT
5
12
32
CIO CIO
0010 0011
and
0012
CIO CIO
0013 0014
Re-
IN OUT served IN
32
16
8
16
CIO CIO CIO CIO CIO
0015 0016 0017 0018 0019
and
0020
IN
8
Rack
CPU Rack
Slot
0
1
2
3
4
CS1 Expansion Rack 0
1
2
3
4
CS1 Expansion Rack 0
1
2
3
4
Unit
C200H-ID212 16-point DC Input Unit
C200H-ID216 32-point DC Input Unit
C200H-ID217 64-point DC Input Unit
C200H-OD212 16-point Transistor Output Unit
C200H-OD218 32-point Transistor Output Unit
C200H-ID212 16-point DC Input Unit
C200H-ID216 32-point DC Input Unit
Empty
C200H-OC223 5-point Relay Output Unit
C200H-OA224 12-point Triac Output Unit
C200H-IA121 8-point AC Input Unit
C200H-ID212 16-point DC Input Unit
C200H-OC222 12-point Relay Output Unit
Reserve one word. (See note.)
C200H-ID216 32-point DC Input Unit
Power Supply Unit
IN
64
CPU Rack
Power Supply Unit
IN
32
CS1 Expansion Rack
Power Supply Unit
IN
16
CPU Unit
Example
The following example shows the I/O allocation to Basic I/O Units in the CPU
Rack and two CS1 Expansion Racks.
CS1 Expansion Rack
Words
required
1
2
4
1
2
1
2
0
1
1
1
1
1
1
2
Words allocated
CIO 0000
CIO 0001 and CIO 0002
CIO 0003 to CIO 0006
CIO 0007
CIO 0008 and CIO 0009
CIO 0010
CIO 0011 and CIO 0012
None
CIO 0013
CIO 0014
CIO 0015
CIO 0016
CIO 0017
CIO 0018
CIO 0019 and CIO 0020
Note Use the CX-Programmer’s I/O table change operation to reserve a word for the
empty slot.
292
I/O Allocations
Allocating the First Word
to Each Rack
Section
8-1
In the CS1-series PCs, the first word allocated to each Rack can be set with a
Programming Device’s I/O table write operation.
Rack numbers 0 to 7 are determined by the order in which the Racks are connected by the I/O Connecting Cables. (The CPU Rack is always rack 0 and the
Expansion Racks are numbered in order from 1 to 7.) The rack numbers cannot
be changed to an order different from the order in which the Racks are connected.
For Racks in which the first word address has been set, words are allocated to
Units in the order that the Units are mounted (from left to right) beginning with
CIO 0000. Words are not allocated to empty slots.
For Racks in which the first word address has not been set, words are allocated
in rack-number order (lowest to highest) continuing from the last word allocated
to the previous rack.
Example: Setting the First Words for Racks
In this example, the first words have been set for racks 0 (the CPU Rack), 2, and
3.
293
Section
I/O Allocations
8-1
First word:
CIO 0120
Rack number 2
No first word
setting
Rack number 3
First word:
CIO 0140
CIO CIO CIO CIO
0100 0101 0103 0107
and to
0102 0106
IN
16
IN
32
IN
64
Empty
CIO CIO CIO
0120 0121 0123
and to
0122 0126
IN
8
IN
16
OUT
12
IN
16
OUT
5
CIO CIO CIO
0140 0141 0142
OUT
16
CIO
0127
Empty
CIO CIO CIO
0000 0001 0002
IN
16
CIO
0108
and
0109
OUT
32
CIO
0003
and
0004
Empty
OUT
32
CIO
0143
and
0144
Power Supply Unit
IN OUT OUT
64 16
32
CPU Rack
Power Supply Unit
Rack number 1
IN
32
CS1 Expansion Rack
Power Supply Unit
First word:
CIO 0100
IN
16
CS1 Expansion Rack
Power Supply Unit
Rack number 0
CPU Unit
Note This example shows a system consisting of a CPU Rack and CS1 Expansion
Racks, but I/O words are allocated in the same way in a system consisting of a
CPU Rack and C200H Expansion I/O Racks or a CPU Rack, CS1 Expansion
Racks, and C200H Expansion I/O Racks.
CS1 Expansion Rack
Rack 1
Rack 2
Rack 3
Be sure to make first word settings so that allocated words do not overlap. The
first word setting for a rack can be any address from CIO 0000 to CIO 0900. If a
word is allocated to two Racks or the first word setting exceeds CIO 0900, the
corresponding Expansion I/O Rack Number Duplication Flags (A40900 to
A40907: Racks 0 to 7) and the Duplication Error Flag (A40113) will be turned
ON.
Note
294
1. Always register the I/O table after installing an I/O Unit, after setting a rack
number, or after setting the first word allocation for a Rack. The I/O Table
Registration operation registers the I/O words allocated to the Racks.
Section
I/O Allocations
8-1
2. I/O words will not be allocated to empty slots. If an I/O Unit will be installed
later, reserve words for the empty slot by changing the I/O table with a Programming Device’s I/O Table Change Operation.
3. If the actual system configuration is changed after registering the I/O table
so that the number of words or I/O type does not match the I/O table, an I/O
verification error (A40209) or I/O setting error (A40110) will occur. A CS1
CPU Bus Unit Setting Error (A40203) or Special I/O Unit Setting Error
(A40202) may occur as well.
4. When a Unit is removed, words can be reserved for the missing Unit using
the I/O Table Change Operation. If a Unit is changed or added, all of the
words in the program following that Unit’s allocated words will be changed
and the I/O Table Registration Operation will have to be performed again.
Reserving I/O Words for
Expected Changes
If the system configuration will be changed at a later date, changes to the program can be minimized by reserving I/O words in advance for future Unit
changes or additions. To reserve I/O words, change the I/O table with CX-Programmer.
• After registering the I/O table, use CX-Programmer’s I/O table change operation to reserve words for empty slots in which Units may be mounted
later.
• If the I/O Table Registration operation is performed again after changing
the I/O table, the I/O table will revert to its original status with no words allocated to the empty slot.
• Refer to the CX-Programmer Operation Manual for details on these operations.
The following High-density I/O Units are not Basic I/O Units, but Special I/O
Units. These Units are allocated 10 words/Unit in the Special I/O Unit Area
(CIO 2000 to CIO 2959) based on their unit number settings. Refer to 8-1-2 I/O
Allocation to Special I/O Units for more details.
Name
High-density
I/O Units
Specifications
Model
32-point DC Input Unit
32-point TTL Input Unit
32-point Transistor Output Unit
32-point TTL Output Unit
16-point TTL Input/16-point TTL Output Unit
16-point DC Input/16-point Transistor Output Unit
16-point DC Input/16-point Transistor Output Unit
C200H-ID215
C200H-ID501
C200H-OD215
C200H-OD501
C200H-MD501
C200H-MD215
C200H-MD115
8-1-2 I/O Allocation to Special I/O Units
Special I/O Units include CS1 Special I/O Units and C200H Special I/O Units.
Each of these Units is allocated ten words in the Special I/O Unit Area (CIO 2000
to CIO 2959) according the unit number set on the Unit. Special I/O Units can be
mounted to the CPU Rack, CS1 Expansion Racks, and C200H Expansion I/O
Racks*.
Refer to 2-4 Units for more details on the available Special I/O Units.
Note *CS1 Special I/O Units cannot be mounted to C200H Expansion I/O Racks.
295
Section
I/O Allocations
8-1
The following table shows which words in the Special I/O Unit Area are allocated
to each Unit.
Word Allocation
Unit number
Words allocated
0
CIO 2000 to CIO 2009
1
CIO 2010 to CIO 2019
2
CIO 2020 to CIO 2029
15
CIO 2150 to CIO 2159
95
CIO 2950 to CIO 2959
Special I/O Units are ignored during I/O allocation to Basic I/O Units. Slots containing Special I/O Units are treated as empty slots and aren’t allocated any
words in the I/O Area.
Unit
Unit
CIO CIO CIO
0000 2000 0001
to
2009
Slot
Unit
CIO CIO
2010 0002
to
and
2019 0003
Words allocated
Power Supply Unit
IN Special OUT Special OUT
I/O
I/O
16
32
16
CPU Unit
The following example shows the I/O word allocation to Basic I/O Units and Special I/O Units in the CPU Rack.
Example
CPU Rack
0
C200H-ID212 16-point DC Input Unit
Words
required
1
CIO 0000
Unit
Group
number
--Basic I/O Unit
1
C200H-AD002 Analog Input Unit
10
CIO 2000 to CIO 2009
0
Special I/O Unit
2
C200H-OD21A 16-point Transistor Output Unit 1
CIO 0001
---
Basic I/O Unit
3
C200H-NC211 Position Control Unit
20
CIO 2010 to CIO 2029
1
Special I/O Unit
4
C200H-OD218 32-point Transistor Output Unit
2
CIO 0002 and CIO 0003 ---
Basic I/O Unit
8-1-3 I/O Allocation to CS1 CPU Bus Units
Each CS1 CPU Bus Unit is allocated 25 words in the CS1 CPU Bus Unit Area
(CIO 1500 to CIO 1899) according the unit number set on the Unit. CS1 CPU
Bus Units can be mounted to the CPU Rack or CS1 Expansion Racks.
Word Allocation
The following table shows which words in the CS1 CPU Bus Unit Area are allocated to each Unit.
Unit number
Words allocated
0
CIO 1500 to CIO 1524
1
CIO 1525 to CIO 1549
2
CIO 1550 to CIO 1574
15
CIO 1875 to CIO 1899
CS1 CPU Bus Units are ignored during I/O allocation to Basic I/O Units. Slots
containing CS1 CPU Bus Units are treated as empty slots and aren’t allocated
any words in the I/O Area.
296
Section
I/O Allocations
CIO
0000
Unit
Special CS1
I/O
CPU
Unit
Bus
Unit
CIO
2000
to
2009
0
C200H-ID212 16-point DC Input Unit
Words
required
1
1
C200H-ASC02 ASCII Unit
10
2
C200H-SCU21 Serial Communications Unit
25
3
C200H-OD21A 16-point Transistor Output Unit 1
4
C200H-SCU21 Serial Communications Unit
25
CIO
1500
to
1521
OUT
16
CIO
0001
CS1
CPU
Bus
Unit
CPU Unit
IN
16
Power Supply Unit
The following example shows the I/O word allocation to Basic I/O Units, Special
I/O Units, and CS1 CPU Bus Units in the CPU Rack.
Example
Slot
8-1
CIO
1525
to
1549
Words allocated
CIO 0000
CPU Rack
Unit
Group
number
--Basic I/O Unit
CIO 2000 to
CIO 2009
CIO 1500 to
CIO 1524
CIO 0001
0
Special I/O Unit
0
CS1 CPU Bus Unit
---
Basic I/O Unit
CIO 1525 to
CIO 1549
1
CS1 CPU Bus Unit
8-1-4 I/O Allocation to SYSMAC BUS Slave Racks
Each SYSMAC BUS Remote I/O Slave Rack is allocated 10 words in the SYSMAC BUS Area (CIO 3000 to CIO 3049) according the unit number (0 to 4) set
on the Slave Unit. No words in the I/O Area are allocated to Units in Slave Racks.
Each slot in the Slave Rack is allocated one of the Rack’s 10 words. The words
are allocated from left to right. One word is allocated to every slot even if the slot
is empty and the last two words allocated to each Rack are not used because the
Slave Racks have only 8 slots.
The Master and Slave Units themselves do not require any words.
297
Section
I/O Allocations
Example
8-1
The following example shows the word allocation to 3 Slave Racks.
SYSMAC BUS Remote I/O
Master Unit
SYSMAC BUS Remote I/O
1 2 3 4 5 6 7 8
19 20 21 22 23 24 25 26
9 10 11 12 13 14 15 16 17 18
Remote I/O Slave Rack
Slave Unit with
unit number 0
1
2
3
:
8
Not used.
Not used.
9
10
:
16
17
18
19
20
:
26
Not used.
Not used.
Slave Unit with Slave Unit with
unit number 2 unit number 1
Slave Unit with
unit number 0
Slave Unit with
unit number 1
Slave Unit with
unit number 2
8-1-5 I/O Table Registration
After installing the following Units, a Programming Device (Programming Console or CX-Programmer) must be used to register (write) the I/O table.
• Basic I/O Units
• Special I/O Units
• CS1 CPU Bus Units
• SYSMAC BUS Remote I/O Slave Racks
The I/O Table Registration operation registers the information about the type
and location of the Units mounted in the CPU Rack and Expansion Racks.
Programming
Console
CX-Programmer
OR
Installed Units
Register
Registered I/O Table
298
Section
Data Exchange with CPU Bus Units
8-2
The I/O Table Registration operation must be performed with a Programming
Device. If the I/O table isn’t registered, the CPU Unit won’t be able to recognize
the Basic I/O Units, Special I/O Units, CS1 CPU Bus Units, and Slave Racks that
are connected to the PC.
With the C200HX/HG/HE, C200H, and C200HS PCs, word allocation is determined by each Unit’s mounting location in the PC, so these PCs could be used
without registering the I/O table. The I/O Table Registration operation was used
just to prevent Units from being installed in the wrong slot.
With CS1-series PCs, word allocation is not determined solely by slot location
and empty slots are not allocated any I/O words. Words are allocated to the Units
that are actually installed in the PC. The I/O table must be registered before a
CS1-series PC can be used.
I/O Table Registration
with CX-Programmer
1, 2, 3...
Use the following procedure to register the I/O table with the CX-Programmer.
1. Double-click I/O Table in the project tree in the main window. The I/O Table
Window will be displayed.
2. Select Options and then Create. The models and positions of the Units
mounted to the Racks will be written to the CPU Unit as the registered I/O
tables.
I/O Table Registration
with a Programming
Console
Use the following procedure to register the I/O table with a Programming Console.
CLR
FUN
9
SHIFT
7
1
0
CH
000000 I/O TBL ?
DM
CHG
000000 I/O TBL
WRIT
????
3
000000 I/O TBL
WRIT
9713
WRITE
000000CPU BU ST?
0:CLR 1:KEEP
1
CLR
8-2
000000 CT00
000000 I/O TBL
WRIT OK
000000 CT00
Data Exchange with CPU Bus Units
This section describes how data can be exchanged between Special I/O Units or
CS1 CPU Bus Units, and the CPU Unit.
8-2-1 Special I/O Units
Special I/O Units include C200H Special I/O Units and CS1 Special I/O Units.
Data can be exchanged between Special I/O Units and the CPU Unit through the
Special I/O Unit Area, the DM Area, or FINS commands.
Special I/O Unit Area
(I/O Refreshing)
Data is exchanged each cycle during I/O refreshing of the Special I/O Unit Area.
Basically, 10 words are allocated to each Special I/O Unit based on its unit number setting. The number of words actually used by the Special I/O Unit varies;
there are models that require 2 words, 4 words, and 20 words.
299
Section
Data Exchange with CPU Bus Units
8-2
The Special I/O Unit Area ranges from CIO 2000 to CIO 2959 (10 words × 96
Units).
Special I/O Unit
CPU Unit
Special I/O Unit Area
10 words/Unit
Transferred in
I/O refreshing
DM Area
Each Special I/O Unit is allocated 100 words in the DM Area in the range of
D20000 to D29599 (100 words × 96 Units). These 100 words are generally used
to hold initial settings for the Special I/O Unit. When the contents of this area are
changed from the program to reflect a change in the system, the Restart Bits for
affected Units must be turned ON to restart the Units.
Special I/O Unit
CPU Unit
Transferred when power is turned
on or the Unit is restarted.
DM Area for Special I/O Units
100 words/Unit
Transferred each cycle
and when necessary.
C200H Special I/O Units
The 100 words allocated to each Unit are transferred from the DM Area to the
Unit when the PC is turned on or the Unit is restarted. Some C200H Special I/O
Units do not use any of the allocated DM words and others use only a part of the
allocated words.
CS1 Special I/O Units
There are three times that data may be transferred through the words allocated
to each Unit. The timing of data transfers depends on the model being used.
1, 2, 3...
FINS Commands
1. Data transferred when the PC is turned on.
2. Data transferred when the Unit is restarted.
3. Data transferred when necessary.
Some models transfer data in both directions, from the DM Area to the Unit and
from the Unit to the DM Area. See the Unit’s Operation Manual for details on data
transfers.
The CMND(490) instruction can be added to the ladder program to issue a FINS
command to the Special I/O Unit.
Special I/O Unit
CPU Unit
The FINS command is transmitted
when CMND(490) has been
executed in the program.
FINS command transmission
300
Section
Data Exchange with CPU Bus Units
8-2
FINS commands can be transmitted to Special I/O Units in other PCs in the network, not just the local PC.
Serial Communications Special I/O Unit
CPU Unit
Unit
Serial Communications Unit
CPU Unit
The FINS command is transmitted
when CMND(490) has been
executed in the program.
FINS command transmission
Special I/O Unit
Initialization
Special I/O Units are initialized when the PC’s power is turned on or the Unit’s
Restart Bit is turned ON. The Unit’s Special I/O Unit Initialization Flag (A33000 to
A33515) will be ON while the Unit is initializing.
I/O refreshing (cyclic I/O refreshing or refreshing by IORF(097)) will not be performed for a Special I/O Unit while its Initialization Flag is ON.
Disabling Special I/O Unit
Cyclic Refreshing
Ten words are allocated to each Special I/O Unit in the Special I/O Unit Area
(CIO 2000 to CIO 2959) based on the unit number set on the front of each Unit.
The data in the Special I/O Unit Area is refreshed in the CPU Unit every cycle
during I/O refreshing (just after execution of the END(001) instruction).
I/O refreshing may take too long if too many Special I/O Units are installed. If I/O
refreshing is taking too much time, the PC Setup can be set to disable cyclic refreshing for particular Special I/O Units. (The Special I/O Unit Cyclic Refreshing
Disable Bits are in PC Setup addresses 226 to 231.)
If the I/O refreshing time is too short, the Unit’s internal processing will not be
able to keep pace, the Special I/O Unit Error Flag (A40206) will be turned ON,
and the Special I/O Unit may not operate properly. In this case, the cycle time can
be extended by setting a minimum cycle time in the PC Setup or cyclic I/O refreshing with the Special I/O Unit can be disabled. When cyclic refreshing has
been disabled, the Special I/O Unit’s data can be refreshed during program
execution with IORF(097).
Note Always disable a Special I/O Unit’s cyclic refreshing if the Unit’s I/O will be refreshed in an interrupt task with IORF(097). An interrupt task error (A40213) will
occur if cyclic refreshing and IORF(097) refreshing are performed simultaneously.
8-2-2 CS1 CPU Bus Units
Data can be exchanged between CS1 CPU Bus Units and the CPU Unit through
the CS1 CPU Bus Unit Area, the DM Area, or FINS commands.
CS1 CPU Bus Unit Area
(I/O Refreshing)
Data is exchanged each cycle during I/O refreshing of the CS1 CPU Bus Unit
Area. Basically, 25 words are allocated to each CS1 CPU Bus Unit based on its
unit number setting. The number of words actually used by the CS1 CPU Bus
Unit varies.
301
Section
Data Exchange with CPU Bus Units
8-2
The Special I/O Unit Area ranges from CIO 1500 to CIO 1899 (25 words × 16
Units).
CS1 CPU Bus Unit
CPU Unit
CS1 CPU Bus Unit Area
25 words/Unit
Transferred in
I/O refreshing
DM Area
Each CS1 CPU Bus Unit is allocated 100 words in the DM Area in the range of
D30000 to D31599 (100 words × 16 Units). There are three times that data may
be transferred through the words allocated to each Unit. The timing of data transfers depends on the model being used.
1, 2, 3...
1. Data transferred when the PC is turned ON.
2. Data transferred each cycle.
3. Data transferred when necessary.
Some models transfer data in both directions, from the DM Area to the Unit and
from the Unit to the DM Area. See the Unit’s Operation Manual for details on data
transfers.
These 100 words are generally used to hold initial settings for the CS1 CPU Bus
Unit. When the contents of this area are changed from the program to reflect a
change in the system, the Restart Bits (A50100 to A50115) for affected Units
must be turned ON to restart the Units.
CS1 CPU Bus Unit
CPU Unit
Transferred when power is turned
on or the Unit is restarted.
DM Area for CS1 CPU Bus Units
100 words/Unit
Transferred each cycle
and when necessary.
FINS Commands
The CMND(490) instruction can be added to the ladder program to issue a FINS
command to the CS1 CPU Bus Unit.
CS1 CPU Bus Unit
CPU Unit
The FINS command is transmitted
when CMND(490) has been
executed in the program.
FINS command transmission
302
Section
DIP Switch Settings
8-3
FINS commands can be transmitted to CS1 CPU Bus Units in other PCs in the
network, not just the local PC.
Serial Communications CS1 CPU Bus Unit
Unit
CPU Unit
Serial Communications Unit
CPU Unit
The FINS command is transmitted
when CMND(490) has been
executed in the program.
Command transmission
CS1 CPU Bus Unit
Initialization
8-3
CS1 CPU Bus Units are initialized when the PC’s power is turned on or the Unit’s
Restart Bit is turned ON. The Unit’s CS1 CPU Bus Unit Initialization Flag
(A30200 to A30215) will be ON while the Unit is initializing.
Cyclic I/O refreshing will not be performed for a CS1 CPU Bus Unit while its Initialization Flag is ON.
DIP Switch Settings
There are two kinds of initial settings for a CS1 PC: hardware settings and software settings. Hardware settings are made with the CPU Unit’s DIP switch and
software settings are made in the PC Setup (using a Programming Device).
The DIP switch can be reached by opening the battery compartment cover on
the front of the CPU Unit.
Note Always turn off the PC before changing any DIP switch settings. The PC may
malfunction due to static discharge if the settings are changed while the PC is
on.
303
Section
DIP Switch Settings
Pin No.
1
2
3
4
Setting
ON
OFF
ON
OFF
ON
OFF
7
ON
OFF
ON
OFF
ON
OFF
ON
8
OFF
OFF
5
6
304
8-3
Function
Writing disabled for user program memory.
Writing enabled for user program memory.
The user program is automatically transferred and executed when power is turned ON.
The user program is automatically transferred but not executed when power is turned ON.
Programming Console messages displayed in English.
Programming Console messages displayed in the language stored in system ROM.
(Messages displayed in Japanese with the Japanese version of system ROM.)
Use default peripheral port communications parameters.
Use peripheral port communications parameters set in the PC Setup.
Use default RS-232C port communications parameters.
Use RS-232C port communications parameters set in the PC Setup.
User-defined pin. Turns OFF the User DIP Switch Pin Flag (A39512).
User-defined pin. Turns ON the User DIP Switch Pin Flag (A39512).
Writing data from the CPU Unit to the Memory Card or restoring data from the Memory Card to
the CPU Unit.
Verifying contents of Memory Card.
Always OFF.
Section
DIP Switch Settings
Pin
1
2
Function
Write-protection for user
program memory (UM)
(See note 1.)
Automatic transfer of the
program at start-up
Setting
ON
Write-protected
OFF
Read/write
ON
Yes
OFF
No
8-3
Description
User program memory is write-protected when this pin is
ON. Turn ON to prevent the program from being changed
accidentally.
The program (AUTOEXEC.OBJ) and PC Setup
(AUTOEXEC.STD) will be transferred from the Memory
Card to the CPU Unit automatically at start-up when this
pin is ON. (See note 4.)
A PC’s software (program and PC Setup) can be
completely initialized just by inserting a new Memory
Card and turning on the power. This can be used to
switch the system to a new arrangement very quickly.
Note When pin 7 is ON and pin 8 is OFF, reading from the
Memory Card for easy backup is given priority; even
if pin 2 is ON, the program will not be automatically
transferred.
3
4
Programming Console
language
ON
English
OFF
Other
Peripheral port
communications
parameters
ON
Use parameters • Leave this pin OFF when using a Programming Console
set in the PC
or CX-Programmer (peripheral bus setting) connected to
Setup.
the peripheral port.
Auto-detect
• Turn this pin ON when the peripheral port is being used for
Programming
a device other than a Programming Console or CX-ProDevice
grammer (peripheral bus setting).
(See note 2.)
• Leave this pin OFF when the RS-232C port is being used
Auto-detect
Programming
for a device other CX-Programmer (peripheral bus setDevice
ting) such as a Programmable Terminal or host computer.
(See note 3.)
• Turn this pin ON when using CX-Programmer (peripheral
bus setting) connected to the RS-232C port.
Use parameters
set in the PC
Setup.
The ON/OFF status of this pin is reflected in A39512. Use
A39512 ON
this function when you want to create an Always-ON or
A39512 OFF
Always-OFF condition in the program without using an
Input Unit.
OFF
(default)
5
RS-232C port
communications
parameters
ON
OFF
(default)
6
User-defined pin
ON
OFF
(default)
7
Easy backup setting
ON
Writing from the Press and hold the Memory Card Power Supply Switch
CPU Unit to the for three seconds.
Memory Card
Restoring from
the Memory
Card to the
CPU Unit.
To read from the Memory Card to the CPU Unit, turn ON
the PC power.
Press and hold the Memory Card Power Supply Switch
for three seconds.
7
Easy backup setting
OFF
(default)
Verifying
contents of
Memory Card.
8
Not used
OFF
(default)
Always OFF.
Note
Programming Console messages are displayed in
English when this pin is ON. Turn OFF to display
messages in the language stored in system ROM.
This operation is given priority over automatic transfer
(pin 2 is ON) when power is ON.
1. The following data is write-protected when pin 1 is ON: the user program
and all data in the parameter area such as the PC Setup and registered I/O
table. Furthermore when pin 1 is ON, the user program and parameter area
won’t be cleared even when the memory clear operation is performed from a
Programming Device.
2. The auto-detect goes through baud rates in the following order: Programming Console → Peripheral bus at 9,600 bps, 19,200 bps, 38,400 bps, and
115,200 bps. Programming Devices that aren’t in peripheral bus mode and
devices in peripheral bus mode operating at 51,200 bps will not be detected.
305
Section
PC Setup
8-4
3. The auto-detect operation goes through baud rates in the following order:
Peripheral bus at 9,600 bps, 19,200 bps, 38,400 bps, and 115,200 bps. Programming Devices that aren’t in peripheral bus mode and devices in peripheral bus mode operating at any other speeds will not be detected.
4. When pin 2 is ON and the power is turned ON, any I/O Memory file (AUTOEXEC.IOM, ATEXEC.IOM) (refer to Section 12) will also be transferred
automatically. Both the program (AUTOEXEC.OBJ) and the parameter
area (AUTOEXEC.STD) must exist in the Memory Card. I/O Memory files
(AUTOEXEC.IOM, ATEXEC.IOM) are optional.
DIP
switch
settings
Pin
4
Pin
5
OFF
PC Setup settings
Peripheral port settings
(Address 144 bits 8 to 11)
Default NT Link Peripheral
Host
(0)
(2)
bus (4)
Link (5)
Programming Console or CX-Programmer in
peripheral bus mode
(Auto-detect connected device’s baud rate)
CX-Progra
mmer in
peripheral
bus mode
Host
computer
or
CX-Progr
ammer in
host link
mode
Default
(0)
---
RS-232C port settings
(Address 160 bits 8 to 11)
NT Link No-protocol Peripheral
(2)
(3)
bus (4)
ON
Host
PT
computer (NT
or
Link)
CX-Progr
ammer in
host link
mode
OFF
---
Host
PT
computer (NT
or
Link)
CX-Progr
ammer in
host link
mode
ON
---
CX-Programmer in peripheral bus mode
(Auto-detect connected device’s baud rate)
Host
Link (5)
---
Standard
external
device
CX-Progra
mmer in
peripheral
bus mode
Host
computer
or
CX-Progr
ammer in
host link
mode
Note When CX-Programmer is set to host link mode, it won’t be possible to communicate (go online) in the following cases:
• The computer is connected to the CPU Unit’s peripheral port and pin 4 is OFF.
• The computer is connected to the CPU Unit’s RS-232C port and pin 5 is ON.
To go online, set CX-Programmer to peripheral bus mode, turn pin 4 ON (turn pin
5 OFF for the RS-232C port), and set the communications mode to host link
mode in the PC Setup.
8-4
PC Setup
8-4-1 Overview of the PC Setup
The PC Setup contains basic CPU Unit software settings that the user can
change to customize PC operation. These settings can be changed from a Programming Console or other Programming Device.
306
Section
PC Setup
8-4
The following table lists cases in which the PC Setup must be changed. In other
cases, the PC can be operated with the default settings.
Cases when settings must be changed
The input response time settings for Basic I/O Units must be changed in
the following cases:
Setting(s) to be changed
Basic I/O Unit Input Response Time
• Chattering or noise occur in CS1 Basic I/O Units.
• Short pulse inputs are being received for intervals longer than the cycle
time.
Data in all regions of I/O Memory (including the CIO Area, Work Areas,
Timer Flags and PVs, Task Flags, Index Registers, and Data Registers)
must be retained when the PC’s power is turned on.
IOM Hold Bit Status at Startup
The status of bits force-set or force-reset from a Programming Device
(including Programming Consoles) must be retained when the PC’s power
is turned on.
Forced Status Hold Bit Status at Startup
• You do not want the operating mode to be determined by the Programming Startup Mode
Console’s mode switch setting at startup.
• You want the PC to go into RUN mode or MONITOR mode and start operating immediately after startup.
• You want the operating mode to be other than PROGRAM mode when the
power is turned ON.
Detection of low-battery errors is not required.
Detect Low Battery
Detection of interrupt-task errors is not required.
Detect Interrupt Task Error
Part of the EM Area will be used as file memory.
EM File Memory
The peripheral port will not be used with the Programming Console or
CX-Programmer (peripheral bus) communications speed auto-detection
and will not used the default host link communications settings such as
9,600 bps.
Peripheral Port Settings
Note Pin 4 of the DIP switch on the front of the CPU Unit must be OFF to
change the PC Setup settings.
The RS-232C port will not be used with the Programming Console or
CX-Programmer (peripheral bus) communications speed auto-detection
and will not use the default host link communications settings such as
9,600 bps.
RS-232C Port Settings
Note Pin 5 of the DIP switch on the front of the CPU Unit must be OFF to
change the PC Setup settings.
You want to speed up communications with a PT via an NT Link
(-EV1 only).
Set the peripheral port or the RS-232C port
communications port baud rate to
“high-speed NT Link.”
You want the intervals for scheduled interrupts to be set in units of 1 ms
rather than 10 ms.
Scheduled Interrupt Time Units
You want CPU Unit operation to be stopped for instruction errors, i.e.,
when the ER Flag or AER Flag is turned ON.
(You want instruction errors to be fatal errors.)
Instruction Error Operation
You want a minimum cycle time setting.
Minimum Cycle Time
You want to set a maximum cycle time other than 1 second (10 ms to
40,000 ms).
Watch Cycle Time
You want to delay peripheral servicing so that it is executed over several
cycles.
Fixed Peripheral Servicing Time
A power OFF interrupt task will be used.
Power OFF Interrupt Task
You want to extend the detection of a power interruption to 10 to 20 ms.
Power OFF Detection Delay Time
You want to shorten the average cycle time when a lot of Special I/O Units
are being used.
Special I/O Unit Cyclic Refreshing
You want to extend the I/O refreshing interval for Special I/O Units.
307
Section
PC Setup
8-4
8-4-2 PC Setup Settings
Item
Basic I/O
Unit Input
Response
Time
Address in
Programming
Console
Word
10
Rack 0, Slot 0
Rack 0, Slot 1
Rack 0, Slot 2 11
Rack 0, Slot 3
Rack 0, Slot 4
Rack 0, Slot 5
Rack 0, Slot6
Rack 0, Slot 7
Rack 0, Slot 8
Rack 0, Slot 9
Rack 1,
Slots 0 to 9
Rack 2,
Slots 0 to 9
Rack 3,
Slots 0 to 9
Rack 4,
Slots 0 to 9
Rack 5,
Slots 0 to 9
Rack 6,
Slots 0 to 9
Rack 7,
Slots 0 to 9
IOM Hold Bit Status at
Startup
12
13
14
15 to
19
20 to
24
25 to
29
30 to
34
35 to
39
40 to
44
45 to
49
80
Bit(s)
0 to 7
8 to 15
0 to 7
8 to 15
0 to 7
8 to 15
0 to 7
8 to 15
0 to 7
8 to 15
See
Rack
0.
15
Settings
00: 8 ms
10: 0 ms
11: 0.5 ms
12: 1 ms
13: 2 ms
14: 4 ms
15: 8 ms
16: 16 ms
17: 32 ms
Default:
00 (8 ms)
0: Cleared
1: Retained
Default: 0
Function
Related
flags
and
words
New setting’s effectiveness
Sets the input response time
(ON response time = OFF response time) for CS1 Basic I/O
Units. The default setting is 8 ms
and the setting range is 0.5 ms
to 32 ms.
A220 to
A259:
Actual input response
times for
Basic I/O
Units
Takes effect at
startup
This value can be increased to
reduce the effects of chattering
and noise, or it can be reduced
to allow reception of shorter input pulses.
This setting determines whether A50012
or not the status of the IOM Hold (IOM
Bit (A50012) is retained at starHold Bit)
tup.
Takes effect at
startup
When you want all of the data in
I/O Memory to be retained when
the power is turned on, turn ON
the IOM Hold Bit and set this
setting to 1 (ON).
Forced Status Hold Bit at
Startup
14
0: Cleared
1: Retained
Default: 0
This setting determines whether
or not the status of the Forced
Status Hold Bit (A50013) is retained at startup.
When you want all of the bits
that have been force-set or
force-reset to retain their forced
status when the power is turned
on, turn ON the Forced Status
Hold Bit and set this setting to 1
(ON).
308
A50013
(Forced
Status
Hold Bit)
Takes effect at
startup
Section
PC Setup
Item
Address in
Programming
Console
Word
Startup Mode
81
Function
PRCN:
Programming
Console’s
mode switch
This setting determines whether
the Startup Mode will be the
mode set on the Programming
Console’s mode switch or the
mode set here in the PC Setup.
(If this setting is PRCN and a
Programming Console isn’t connected, the CPU Unit will automatically enter PROGRAM
mode at startup.) To start operation when the power is turned
ON without connecting a Programming Console, set the
Startup Mode to MONITOR or
RUN.
---
Takes effect at
startup
This setting determines whether
CPU Unit battery errors are detected. If this setting is set to 0
and a battery error is detected,
the Battery Error Flag (A40204)
will be turned ON, CPU Unit operation will continue, and the
ERR/ALM indicator will flash.
This setting determines whether
interrupt task errors are detected. If this setting is set to 0
and an interrupt task error is detected, the Interrupt Task Error
Flag (A40213) will be turned
ON, CPU Unit operation will
continue, and the ERR/ALM indicator will flash.
This setting determines whether
part of the EM Area will be used
for file memory.
A40204
(Battery
Error
Flag)
Takes effect the
next
cycle
A40213
(Interrupt
Task Error Flag)
Takes effect the
next
cycle
---
If bit 7 (above) is set to 1, the
setting here specifies the EM
bank where file memory begins.
The specified EM bank and all
subsequent banks will be used
as file memory. This setting will
be disabled if bit 7 is set to 0.
A344
(EM File
Memory
Starting
Bank)
After initialization
from Programming Device or
via FINS
command.
PRG: PROGRAM mode
MON: MONITOR mode
RUN: RUN
mode
Default:
PRCN
Detect Low Battery
128
15
0: Detect
1: Do not detect
Default: 0
Detect Interrupt Task Error
14
0: Detect
1: Do not detect
Default: 0
EM File
Memory
Settings
EM File
Memory
136
7
0: None
1: EM File
Memory Enabled
Default: 0
EM File
Memory
Starting Bank
0 to 3
New setting’s effectiveness
Settings
Bit(s)
---
Related
flags
and
words
8-4
0 to C (0 to
12)
Default: 0
309
Section
PC Setup
Item
Peripheral
Port Settings
Peripheral
Port Settings
Selection
Address in
Programming
Console
Word
144
Settings
0: Default*
1: PC Setup
Default: 0
Communications mode
Function
Related
flags
and
words
New setting’s effectiveness
This setting is effective only
when pin 4 of the DIP switch on
the front of the CPU Unit is ON.
*The default settings are: 1 start
bit, 7 data bits, even parity, 2
stop bits, and a baud rate of
9,600 bps.
A61901
(Peripheral Port
Settings
Changing Flag)
Takes effect the
next
cycle.
(Also can
be
changed
with
STUP
(237).)
Bit(s)
15
8 to 11
00: Host Link
02: 1:N NT
Links
04: Peripheral
bus
05: Host link
Default: 0
Data bits
3
0: 7 bits
1: 8 bits
Stop bits
2
Default: 0
0: 2 bits
1: 1 bit
Parity
0 and
1
Default: 0
00: Even
01: Odd
10: None
This setting determines whether
the peripheral port will operate in
host link mode or another serial
communications mode. (Host
link can be specified with 00 or
05.)
The peripheral bus mode is for
communications with Programming Devices other than the
Programming Console.
Note Communications will not
be possible with PTs set
for 1:1 NT Links.
These settings are valid only
when the communications mode
is set to Host link.
These settings are also valid
only when the Peripheral Port
Settings Selection is set to 1: PC
Setup.
Default: 00
Communications rate
(bps)
145
0 to 7
00: 9,600
01: 300
02: 600
03: 1,200
04: 2,400
05: 4,800
06: 9,600
07: 19,200
08: 38,400
09: 57,600
0A: 115,200
Default: 00
CPU Unit’s Unit Number in 147
Host Link Mode
0 to 7
00 to 1F
(0 to 31)
Default: 00
Maximum Unit Number in
NT Link Mode
310
150
0 to 3
0 to 7
Default: 0
8-4
Settings 00 and 06 through 0A
are valid when the communications mode is set to peripheral
bus.
When the communications
mode is set to NT Link, the settings are as follows:
00 to 09 Hex: Standard NT Link
0A Hex: High-speed NT Link
(When making the settings with
the CX-Programmer, select
115,200 bps.)
This setting determines the CPU
Unit’s unit number when it is
connected in a 1-to-N (N=2 to
32) Host Link.
This setting determines the highest unit number of PT that can
be connected to the PC in NT
Link mode.
Section
PC Setup
Item
RS-232C
Port Settings
Address in
Programming
Console
Word
RS-232C Port 160
Settings
Selection
Communications mode
Settings
0: Default*1
1: PC Setup
Default: 0
8 to 11
00: Host link
02: 1:N-mode
NT Link
03: No-protocol
04: Peripheral
bus
05: Host link
Default: 0
Data bits
3
Stop bits
2
Default: 0
0: 2 bits
1: 1 bit
0 to 1
Default: 0
00: Even
01: Odd
10: None
Parity
Function
Related
flags
and
words
New setting’s effectiveness
This setting is effective only
when pin 5 of the DIP switch on
the front of the CPU Unit is OFF.
*The default settings are: 1 start
bit, 7 data bits, even parity, 2
stop bits, and a baud rate of
9,600 bps.
A61902
(RS-232
C Port
Settings
Changing Flag)
Takes effect the
next
cycle.
(Also can
be
changed
with
STUP
(237).)
Bit(s)
15
0: 7 bits
1: 8 bits
8-4
This setting determines whether
the RS-232C port will operate in
host link mode or another serial
communications mode. (Host
link can be specified with 00 or
05.)The Peripheral bus mode is
for communications with Programming Devices other than
the Programming Console.
Note Communications will not
be possible with PTs set
for 1:1-mode NT Links.
These settings are valid only
when the communications mode
is set to host link or no-protocol.
These settings are also valid
only when the RS-232C Port
Settings Selection is set to 1: PC
Setup.
Default: 00
Baud rate
(bps)
161
0 to 7
00: 9,600
01: 300
02: 600
03: 1,200
04: 2,400
05: 4,800
06: 9,600
07: 19,200
08: 38,400
09: 57,600
0A: 115,200
Default: 00
No-protocol
mode delay
162
0 to 15 0000 to 270F:
0 to 99990 ms
(10-ms units)
Default: 0
CPU Unit’s
Unit Number
in Host Link
Mode
163
0 to 7
00 to 1F:
(0 to 31)
Default: 00
Settings 00 and 06 through 0A
are valid when the communications mode is set to peripheral
bus.
When the communications
mode is set to NT Link, the settings are as follows:
00 to 09 Hex: Basic NT Link
0A Hex: High-speed NT Link
(When making the settings with
the CX-Programmer, select
115,200 bps.)
This setting determines the
delay from execution of
TXD(236) until the data is actually transmitted from the specified port.
This setting determines the CPU
Unit’s unit number when it is
connected in a 1-to-N (N=2 to
32) Host Link.
311
Section
PC Setup
Item
RS-232C
Port Settings,
Continued
No-protocol
Mode
Address in
Programming
Console
Word
164
Settings
Default: 00
0 to 7
00 to FF
Default: 00
165
Scheduled Interrupt Time
Units
195
197
New setting’s effectiveness
Start code: Set this start code
only when the start code is enabled (1) in bits 12 to 15 of 165.
A61902
(RS-232
C Port
Settings
Changing Flag)
Takes effect the
next
cycle.
(Also can
be
changed
with
STUP
(237).)
End code: Set this end code
only when the end code is enabled (1) in bits 8 to 11 of 165.
0: None
Start code setting:
1: Code in 164 A setting of 1 enables the start
code in 164 bits 8 to 15.
Default: 0
8 to 9
0: None
End code setting:
1: Code in 164 With a setting of 0, the amount
2: CR+LF
of data being received must be
specified. A setting of 1 enables
Default: 0
the end code in bits 0 to 7 of
164. A setting of 2 enables an
end code of CR+LF.
0 to 7
00: 256 bytes
01 to FF:
1 to 255 bytes
0 to 3
0 to 7
Default: 0
0 to 3
0: 10 ms
1: 1.0 ms
Default: 0
Instruction Error Operation
Related
flags
and
words
12 to
15
Default: 00
Max. Unit
166
Number in NT
Link Mode
Function
Bit(s)
8 to 15 00 to FF
15
0: Continue
1: Stop
Default: 0
Set this value only when the end
code setting in bits 8 to 11 of
165 is “0: None.”
This setting can be used to
change the amount of data that
can be transferred at one time
by TXD(236) or RXD(235). The
default setting is the maximum
value of 256 bytes.
This setting determines the highest unit number of PT that can
be connected to the PC in NT
Link mode.
This setting determines the time --units used in scheduled interrupt
interval settings.
(This setting cannot be changed
during operation.)
Takes effect at
the start
of operation
This setting determines whether
instruction errors (instruction
processing errors (ER) and illegal access errors (AER)) are
treated as non-fatal or fatal errors. When this setting is set to
1, CPU Unit operation will be
stopped if the ER or AER Flags
is turned ON (even when the
AER Flag is turned ON for an indirect DM/EM BCD error).
Takes effect at
the start
of operation
Related Flags: A29508 (Instruction Processing Error Flag)
A29509 (Indirect DM/EM BCD
Error Flag)
A29510 (Illegal Access Error
Flag)
Minimum Cycle Time
208
0 to 15 0001 to 7D00:
1 to
32,000 ms
(1-ms units)
Default: 0000
(No minimum)
312
8-4
Set to 0001 to 7D00 to specify a
minimum cycle time. If the cycle
time is less than this setting, it
will be extended until this time
passes. Leave this setting at
0000 for a variable cycle time.
(Can’t be changed during operation.)
A29508,
A29509,
A29510
(If this
setting is
set to 0,
these
flags
won’t be
turned
ON even
if an
instruction error
occurs.)
---
Takes effect at
the start
of operation
Section
PC Setup
Item
Watch
Cycle
Time
Enable Watch
Cycle Time
Setting
Address in
Programming
Console
Word
209
Enable Fixed
Servicing
Time
Function
Bit(s)
15
0: Default
1: Bits 0 to 14
Default: 0
Watch Cycle
Time Setting
Fixed Peripheral
Servicing
Time
Settings
Set to 1 to enable the Watch
Cycle Time Setting in bits 0 to
14. Leave this setting at 0 for a
maximum cycle time of 1 s.
0 to 14 001 to FA0: 10 This setting is valid only when
to 40,000 ms
bit 15 of 209 is set to 1. The
(10-ms units)
Cycle Time Too Long Flag
(A40108) will be turned ON if the
Default: 001
cycle time exceeds this setting.
(1 s)
218
15
0: Default*
1: Bits 0 to 7
Default: 0
Set to 1 to enable the fixed peripheral servicing time in bits 0
to 7.
Related
flags
and
words
New setting’s effectiveness
A40108
(Cycle
Time Too
Long
Flag)
Takes effect at
the start
of operation
A264
and
A265
(Present
Cycle
Time)
---
(Can’t be
changed
during
operation.)
---
(Can’t be
changed
during
operation.)
Takes effect at
startup or
at the
start of
operation.
*Default: 4% of the cycle time
Fixed Servicing Time
0 to 7
00 to FF:
0.0 to 25.5 ms
(0.1-ms units)
This setting is valid only when
bit 15 of 218 is set to 1.
Default: 00
Power OFF Interrupt Task
225
15
0: Disabled
1: Enabled
Default: 0
Power OFF Detection
Delay Time
0 to 7
00 to 0A:
0 to 10 ms
(1-ms units)
Default: 00
8-4
When this setting is set to 1, the --power OFF interrupt task will be
executed when power is interrupted.
This setting determines how
--much of a delay there will be
from the detection of a power interruption (approximately 10 to
25 ms after the power supply
voltage drops below 85% of the
rated value) to the confirmation
of a power interruption. The default setting is 0 ms.
When the power OFF interrupt
task is enabled, it will be
executed when the power interruption is confirmed. If the power
OFF interrupt task is disabled,
the CPU will be reset and operation will be stopped.
Takes effect at
the start
of operation
(Can’t be
changed
during
operation.)
313
Section
Explanations of PC Setup Settings
Item
Address in
Programming
Console
Word
Special
I/O Unit
Cyclic Refreshing
8-5
Settings
Related
flags
and
words
Function
Bit(s)
0 to 15 0: Enabled
1: Disabled
These settings determine wheth- --er data will be exchanged between the specified Unit and the
Special I/O Unit’s allocated
words (10 words/Unit) during cyclic refreshing for Special I/O
Units.
Cyclic Refreshing of
Units 0 to 15
226
Cyclic Refreshing of
Units 16 to 31
227
Default: 0
0 to 15 0: Enabled
1: Disabled
Cyclic Refreshing of
Units 32 to 47
228
Default: 0
0 to 15 0: Enabled
1: Disabled
Cyclic Refreshing of
Units 48 to 63
229
Default: 0
0 to 15 0: Enabled
1: Disabled
Cyclic Refreshing of
Units 64 to 79
230
Default: 0
0 to 15 0: Enabled
1: Disabled
Turn ON the corresponding bit
to disable cyclic refreshing when
the Unit will be refreshed in an
interrupt task by IORF(097),
several Special I/O Units are being used and you don’t want to
extend the cycle time, or the
cycle time is so short that the
Special I/O Unit’s internal processing can’t keep up.
Cyclic Refreshing of
Units 80 to 95
231
Default: 0
0 to 15 0: Enabled
1: Disabled
(Special I/O Units can be refreshed from the program with
IORF(097).)
8-5
New setting’s effectiveness
Takes effect at
the start
of operation
Default: 0
Explanations of PC Setup Settings
Basic I/O Unit Input
Response Time
The input response time can be set for CS1 Basic I/O Units by Rack and Slot
number. Increasing this value reduces the effects of chattering and noise. Decreasing this value allows reception of shorter input pulses, (but do not set the
ON response time or OFF response time to less than the cycle time).
Pulses shorter than the input
response time are not received.
Input such as a
proximity switch
Input bit
Input response time
Input response time
The default setting for the input response time is 8 ms and the setting range is
0 to 32 ms. When the input response time is set to 0 ms, there will be an ON delay
of 20 ms max. and an OFF delay of 300 ms max. due to the delays in the Unit’s
internal elements.
The input response time settings are transferred to the CS1 Basic I/O Units
when the PC is turned on.
When the Unit’s settings are changed, they are stored in A220 to A259 (Actual
Input Response Times for Basic I/O Units). When the settings in the PC Setup
have been changed with the PC in PROGRAM mode, the PC Setup settings will
differ from the actual settings in the Units. In this case, the values in A220 to
A259 can be checked to see the input response times actually set in the Units.
IOM Hold Bit Status at
Startup
314
The IOM Hold Bit (A50012) can be turned ON to retain all of the data in I/O
Memory when the CPU Unit’s operating mode is switched between PROGRAM
mode and RUN/MONITOR mode. When the PC is turned on, the IOM Hold Bit
itself will be cleared (OFF) unless it is protected with this PC Setup setting.
Section
Explanations of PC Setup Settings
8-5
If the IOM Hold Bit Status at Startup setting is ON, the status of the IOM Hold Bit
will be protected when the PC is turned on. If this setting is ON and the IOM Hold
BIt itself is ON, all data in I/O memory will be retained when the PC is turned on.
Note If the backup battery fails or is disconnected, the IOM Hold Bit will be cleared
whether this setting is ON or OFF.
OFF (0): IOM Hold Bit cleared at start-up
Non-retained parts
of I/O memory
Mode switch
Power
OFF
Power on
Retained
Retained
IOM Hold Bit: 1
(ON)
Forced Status Hold Bit at
Startup
Not retained when
power is turned on.
IOM Hold Bit protected at start-up
Non-retained parts
of I/O memory
Mode switch
Not retained
IOM Hold Bit: 0
(OFF)
IOM Hold Bit: 1
(ON)
ON (1):
Power Non-retained parts
of I/O memory:
ON
Cleared
Power
OFF
Power
ON Non-retained parts
of I/O memory:
Retained
Power on
Retained
IOM Hold Bit: 0
(OFF)
Retained when
power is turned on.
The Forced Status Hold Bit (A50013) can be turned ON to retain the forced status of all bits that have been force-set or force-reset when the CPU Unit’s operating mode is switched between PROGRAM mode and RUN/MONITOR mode.
When the PC is turned on, the Forced Status Hold Bit itself will be cleared (OFF)
unless it is protected with this PC Setup setting.
If the Forced Status Hold Bit at Startup setting is ON, the status of the Forced
Status Hold Bit will be protected when the PC is turned on. If this setting is ON
and the Forced Status Hold BIt itself is ON, all force-set and force-reset bits will
retain their forced status when the PC is turned on.
315
Section
Explanations of PC Setup Settings
8-5
Note If the backup battery fails or is disconnected, the Forced Status Hold Bit will be
cleared whether this setting is ON or OFF.
OFF (0): Forced Status Hold Bit cleared at start-up
Forced bit status
Mode switch
Power
OFF
Retained
Power
ON
Power on
Forced Status
Hold Bit: 1 (ON)
ON (1):
Not retained
Forced Status
Hold Bit: 0 (OFF)
Not retained when
power is turned
ON.
Forced Status Hold Bit protected at start-up
Forced bit status
Mode switch
Power
OFF
Retained
Forced Status
Hold Bit: 1 (ON)
Startup Mode Setting
Forced bit status
Power
ON
Forced bit status
Power on
Retained
Forced Status
Hold Bit: 0 (OFF)
Retained when
power is turned
ON.
This setting determines whether the startup mode will be the mode set on the
Programming Console’s mode switch or the mode set here in the PC Setup.
Note If this setting specifies the mode set on the Programming Console’s mode switch
(0) but a Programming Console isn’t connected, the CPU Unit will automatically
enter PROGRAM mode at startup. To start operation when the power is turned
ON without connecting a Programming Console, set the Startup Mode to MONITOR or RUN Mode.
PRCN:
Programming Console’s mode switch
Mode switch
setting
PROGRAM
mode when disconnected.
Power ON
Power ON
Other:
PC Setup’s Startup Mode setting
PRG: PROGRAM mode
MON: MONITOR mode
RUN: RUN mode
Power ON
Detect Low Battery
316
This setting determines whether CPU Unit battery errors are detected. If this setting is set to detect errors (0) and a battery error is detected, the Battery Error
Flag (A40204) will be turned ON.
Section
Explanations of PC Setup Settings
8-5
Note A battery error will be detected when the battery is disconnected or its voltage
drops below the minimum allowed.
Backup
Disconnected or
voltage too low
Detect Interrupt Task
Error
Battery Error Flag
(A40204) ON
If this setting is set to detect errors (0), an interrupt task error will be detected in
the following cases:
• An interrupt task is executed for more than 10 ms during I/O refreshing of a
C200H Special I/O Unit or SYSMAC BUS Remote I/O.
• IORF(097) is executed in an interrupt task to refresh a Special I/O Unit’s I/O
while that Unit’s I/O is being refreshed during cyclic refreshing.
EM File Memory Settings
These settings are used to convert part of the EM Area to file memory. The specified EM bank and all subsequent banks will be set aside as file memory. Changing these settings using the Programming Console does not format the specified
EM banks; the EM banks must be formatted with a Programming Device after
changing these PC Setup settings. When formatting the EM banks with a Programming Console, refer to 7-2 Memory Card Format in the Programming Console Operation Manual (W341-E1-1). With the CX-Programmer, file memory will
be formatted when file memory conversion and the number of banks to be converted is specified when transferring the PC Setup. (EM banks cannot be formatted as file memory unless they have been specified as file memory in the PC
Setup.)
Once part of the EM Area has been formatted for use as file memory, it can be
converted back to normal EM Area usage by changing these PC Setup settings
back to their previous value and “un-formatting” the EM banks with a Programming Device.
• The actual starting file memory bank is stored in A344 (EM File Memory Starting Bank). When the settings in the PC Setup have been changed but the EM
Area hasn’t been formatted, the PC Setup setting will differ from the actual file
memory setting in the EM Area. In this case, the values in A344 can be
checked to see the actual file memory setting.
• The EM Area cannot be formatted if the current EM bank is one of the banks
that is being converted to file memory.
The following example shows EM banks 2 to C (12) converted to file memory.
EM File Memory setting: 1
(EM file memory enabled)
Peripheral Port Settings
Bank 0
Bank 1
Bank 2
:
Bank C
EM Starting Bank setting: 2
Converted
EM file memory
These settings are effective only when pin 4 of the DIP switch on the front of the
CPU Unit is ON.
The default settings for the peripheral port are: host link mode, 1 start bit, 7 data
bits, even parity, 2 stop bits, and a baud rate of 9,600 bps. Set the peripheral port
settings in the PC Setup when you need to change these settings.
317
Section
Explanations of PC Setup Settings
8-5
Note When pin 4 of the DIP switch on the front of the CPU Unit is OFF, the CPU Unit
automatically detects the communications parameters of a connected Programming Device (including Programming Consoles). Those automatically detected
parameters are not stored in the PC Setup.
ON
ON
4
Peripheral port communications settings when DIP
switch pin 4 is ON:
Default settings:
Host link mode, 1 start bit, 7 data bits, even parity,
2 stop bits, and a baud rate of 9,600 bps
User-defined settings:
Set the communications mode (host link, NT Link,
or peripheral bus) and other settings such as the
baud rate.
RS-232C Port Settings
These settings are effective only when pin 5 of the DIP switch on the front of the
CPU Unit is OFF.
The default settings for the RS-232C port are: host link mode, 1 start bit, 7 data
bits, even parity, 2 stop bits, and a baud rate of 9,600 bps. Set the RS-232C port
settings in the PC Setup when you need to change these settings. Specify the
frame format when no-protocol mode is selected.
The RS-232C port settings can also be changed with STUP(237). The RS-232C
Port Settings Changing Flag (A61902) is turned ON when STUP(237) is
executed and it is turned OFF when the RS-232C port settings have been
changed.
318
Section
Explanations of PC Setup Settings
8-5
Note When pin 5 of the DIP switch on the front of the CPU Unit is ON, the CPU Unit
automatically detects the communications parameters of a Programming Device (including Programming Consoles) connected to the RS-232C port. Those
automatically detected parameters are not stored in the PC Setup.
ON
ON
5
RS-232C port communications settings when DIP
switch pin 5 is OFF:
Default settings:
Host link mode, 1 start bit, 7 data bits, even parity,
2 stop bits, and a baud rate of 9,600 bps
User-defined settings:
Set the communications mode (host link, NT Link,
no-protocol*, or peripheral bus) and other settings
such as the baud rate.
*See notes 1 and 2 for details on no-protocol mode.
Note
1. A no-protocol transmission delay (address 162) can be set in no-protocol
mode. The operation of this delay is shown in the following diagram.
No-protocol delay
Delay
Transmission
Time
TXD(236)
2. The following table shows the message formats that can be set for transmissions and receptions in no-protocol mode. The format is determined by the
start code (ST) and end code (ED) settings. (From 1 to 256 bytes can be
received in no-protocol mode.)
End code setting
Start code setting
None
None
DATA
Yes
DATA+ED
CR+LF
DATA+CR+LF
Yes
ST+DATA
ST+DATA+ED
ST+DATA+CR+LF
319
Section
Explanations of PC Setup Settings
Scheduled Interrupt Time
Units
8-5
This setting determines the time units for the scheduled interrupt interval settings. Set the scheduled interrupt interval from the program with MSKS(690).
Note This setting cannot be changed while the CPU Unit is in RUN or MONITOR
mode.
Scheduled Interrupt Time Units
Interval
Scheduled interrupt task
Instruction Error
Operation
This setting determines whether instruction execution errors are treated as nonfatal (0) or fatal errors (1). A program error will be generated as an instruction
error if any of the following flags is turned ON.
Instruction error flag
Address
Cause
Instruction Processing Error Flag
A29508
The ER Flag was turned ON.
Indirect DM/EM BCD Error Flag
A29509
The contents of a DM/EM word
wasn’t BCD when BCD was required
for indirect addressing.
Illegal Access Error Flag
A29510
Attempted to access part of memory
that is off-limits from the program.
If this setting is OFF (0), PC operation will continue after one of these errors.
If this setting is ON (1), PC operation will stop after one of these errors.
Minimum Cycle Time
Set the minimum cycle time to a non-zero value to eliminate inconsistences in
I/O responses. 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.
Note The minimum cycle time setting cannot be changed while the CPU Unit is in
RUN or MONITOR mode.
Fixed cycle time
Watch Cycle Time
320
If the cycle time exceeds the watch (maximum) cycle time setting, the Cycle
Time Too Long Flag (A40108) will be turned ON and PC operation will be
stopped. This setting must be changed if the normal cycle time exceeds the default watch cycle time setting of 1 s.
Section
Explanations of PC Setup Settings
8-5
Note The watch cycle time setting cannot be changed while the CPU Unit is in RUN or
MONITOR mode.
Watch Cycle
Time
Watch
Time
Actual Cycle
Time
Watch Cycle
Time
Actual Cycle
Time
Watch Cycle
Time
Actual Cycle
Time
↓
OVER
Cycle Time
Too Long Flag
A40108
CPU Unit operation
is stopped.
Note The default value for the watch cycle time is 1 s (1,000 ms).
Fixed Peripheral
Servicing Time
This setting determines whether the peripheral servicing for the following processes is performed with the default settings (4% of the cycle time) or all together in a fixed servicing time.
Exchange data with CS1 Special I/O Units when necessary
Exchange data with CS1 CPU Bus Units when necessary
Exchange data with peripheral port
Exchange data with serial communications ports
Exchange data with Inner Board
Service file access operations (Memory Card)
Peripheral servicing is performed at the end of the cycle, just after I/O refreshing.
Power ON
Initialization
Common processes
Cycle
time
Program
execution
(Tasks
executed in
order)
I/O refreshing
Peripheral servicing
321
Section
Explanations of PC Setup Settings
8-5
The following table shows a breakdown of the peripheral servicing time.
Peripheral servicing time
Default value
Event service time for
CS1 Special I/O Units
Event service time for
CS1 CPU Bus Units
Event service time for
peripheral port
Event service time for
RS-232C port
Event service time for
serial communication ports
File access service time
for Memory Card
4% of the previous
cycle’s cycle time
Same as above.
Setting range
Uniform servicing time in ms:
0.0 to 25.5 ms in 0.1-ms units
Same as above.
Same as above.
Same as above.
Same as above.
The default value for each servicing process is 4% of the last cycle’s cycle time.
In general, we recommend using the default value. Set a uniform servicing time
only when peripheral servicing is being delayed because each service process
is being spread over several cycles.
Note
Power OFF Interrupt Task
1. When the peripheral servicing time is set to a time longer than the default
value, the cycle time will also be longer.
2. The fixed peripheral servicing time setting cannot be changed while the
CPU Unit is in RUN mode or MONITOR mode.
This setting determines whether or not a power OFF interrupt task will be
executed when a power interruption is detected. (When this setting is set to 0,
the regular program will just stop when a power interruption is detected.)
The power OFF interrupt task will be stopped when the power hold time (processing time after power interrupt + power OFF detection delay time) has elapsed.
The maximum power hold time is 10 ms.
When a power OFF detection delay time has to be set, be sure that the power
OFF interrupt task can be executed in the available time (10 ms – power OFF
detection delay time).
Note The power OFF interrupt task setting cannot be changed while the CPU Unit is in
RUN mode or MONITOR mode.
Power OFF Detection
Delay Time
322
This setting determines how much of a delay there will be from the detection of a
power interruption (approximately 10 to 25 ms after the power supply voltage
drops below 85% of the rated value) until a power interruption is established and
the regular program is stopped.
It takes a maximum of 10 ms for the internal 5 VDC power supply to drop to
0 VDC after the initial power interrupt detection time (10 ms to 25 ms). Extend
the time until detection of a power interruption when momentary interruptions in
a bad power supply are causing PC operation to stop.
Section
Explanations of PC Setup Settings
8-5
Note The power OFF detection delay time setting cannot be changed while the CPU
Unit is in RUN mode or MONITOR mode.
Time
Power interrupt
Power OFF
detection time
detection
10 to 25 ms
delay time
0 to 10 ms
Regular program
Power OFF
interrupt task
Stop
Note The execution time for the power OFF interrupt task must be less than the maximum time available, namely: 10 ms – power OFF detection delay time. Refer to
11-3 Interrupt Tasks for details on the power interrupt task and to 15-3 Power
OFF Operation for details on CPU Unit operation when power is turned OFF.
Special I/O Unit Cyclic
Refreshing
When a Special I/O Unit will be refreshed in an interrupt task by IORF(097), always disable cyclic refreshing for that Unit with this setting. The expected results
will not be achieved and the Interrupt Task Error Flag (A40213) will be turned ON
if IORF(097) is executed in an interrupt task during normal I/O refreshing.
Special I/O Unit
CPU Unit
Special
I/O Unit
Area
These settings determine whether or not
data will be exchanged with the 10 words
allocated to each Special I/O Unit in the
Special I/O Unit Area during cyclic I/O
refreshing.
323
SECTION 9
Programming
This section basic information required to write, check, and input programs.
9-1
9-2
9-3
Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-1-1 Programs and Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-1-2 Basic Information on Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-1-3 Addressing I/O Memory Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-1-4 Specifying Operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-1-5 Data Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-1-6 Instruction Variations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-1-7 Execution Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-1-8 I/O Instruction Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-1-9 Refresh Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-1-10 Program Capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-1-11 Basic Ladder Programming Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-1-12 Inputting Mnemonics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-2-1 Condition Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-2-2 Special Program Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Checking Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-3-1 Errors during Programming Device Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-3-2 Program Checks with the CX-Programmer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-3-3 Program Execution Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
326
326
327
330
331
336
339
339
341
343
345
345
350
358
358
363
367
367
367
369
325
Section
Basic Concepts
9-1
9-1
Basic Concepts
9-1-1 Programs and Tasks
CS1-series PCs execute ladder-diagram programs contained in tasks. The ladder-diagram program in each task ends with an END(001) instruction just as with
conventional PCs.
Tasks are used to determine the order for executing the ladder-diagram programs, as well as the conditions for executing interrupts.
Program A
Allocated
Cyclic
task
Interrupt condition met.
Interrupt
task 100
Program B
Allocated
Each ladder-diagram
program ends with an
END(001) instruction.
Cyclic
task
Allocated
Program C
I/O refresh
This section describes the basic concepts required to write CS1-series programs. See Section 11 Tasks for more information on tasks and their relationship
to ladder-diagram programs.
Note Tasks and Programming Devices
Tasks are handled as described below on the Programming Devices. Refer to
11-4 Creating Tasks and to the CS1-series Programming Consoles Operation
Manual (W341) and CX-Programmer Operation Manual for more details.
CX-Programmer
The CX-Programmer is used to designate task types and task numbers as attributes for individual programs.
Programming Console
Each task is treated as an entire independent program on a Programming Console. Programs are accessed and edited on a Programming Console by specifying CT00 to CT 31 for cyclic tasks and IT00 to IT255 for interrupt tasks. When the
memory clear operation is performed with a Programming Console, only cyclic
task 0 (CT00) can be written in a new program. Use CX-Programmer to create
cyclic tasks 1 through 31 (CT01 through CT31).
326
Section
Basic Concepts
9-1
9-1-2 Basic Information on Instructions
Programs consist of instructions. The conceptual structure of the inputs to and
outputs from an instruction is shown in the following diagram.
Power flow (P.F., execution condition)∗1
Power flow (P.F., execution condition)
Instruction
Instruction condition
Instruction condition∗2
Flags
Flag
*1: Input instructions only.
Operands
(destinations)
Operands
(sources)
*2: Not output for all instructions.
Memory
Power Flow
The power flow is the execution condition that is used to control the execute and
instructions when programs are executing normally. In a ladder program, power
flow represents the ON/OFF status from the bus.
Input Instructions
Output Instructions
• Load instructions indicate a logical start and outputs the execution condition.
• Intermediate instructions input the power flow as an execution condition
and output the power flow to an intermediate or output instruction.
Output instructions execute all functions, using the power flow as an execution
condition.
LD power flow
Power flow for
output instruction
Input block
Output block
Instruction Conditions
Instruction conditions are special conditions related to overall instruction execution that are output by the following instructions. Instruction conditions have a
higher priority than power flow (P.F.) when it comes to deciding whether or not to
execute an instruction. An instruction may become not be executed or may act
differently depending on instruction conditions.
Instruction conditions are reset (canceled) at the start of each task, i.e., they are
reset when the task changes.
The following instructions are used in pairs to set and cancel certain instruction
conditions. These paired instructions must be in the same task.
Instruction
condition
Interlocked
BREAK(514)
execution
Description
An interlock turns OFF part of the program. Special conditions, such
as turning OFF output bits, resetting timers, and holding counters are
in effect.
Ends a FOR(512) - NEXT(513) loop during execution. (Prevents
execution of all instructions until to the NEXT(513) instruction.)
Executes a JMP0(515) to JME0(516) jump.
Block program Executes a program block from BPRG(096) to BEND(801).
execution
Setting
instruction
IL(002)
Canceling
instruction
ILC(003)
BREAK(514)
NEXT(513)
JMP0(515)
BPRG(096)
JME0(516)
BEND(801)
327
Section
Basic Concepts
9-1
Flags
In this context, a flag is a bit that serves as an interface between instructions.
Input flags
Output flags
• Differentiation Flags
• Differentiation Flags
Differentiation result flags. The status of these flags are
input automatically to the instruction for all differentiated
up/down output instructions and the DIFU(013)/DIFD(014)
instructions.
Differentiation result flags. The status of these flags are
output automatically from the instruction for all
differentiated up/down output instructions and the
UP(521)/DOWN(522) INSTRUCTION.
• Carry (CY) Flag
• Condition Flags
The Carry Flag is used as an unspecified operand in data
shift instructions and addition/subtraction instructions.
Condition Flags include the Always ON/OFF Flags, as well
as flags that are updated by results of instruction
execution. In user programs, these flags can be specified
by labels, such as ER, CY, >, =, A1, A0, rather than by
addresses.
• Flags for Special Instructions
These include teaching flags for FPD(269) instructions and
network communications enabled flags
• Flags for Special Instructions
These include memory card instruction flags and
MSG(046) execution completed flags.
Operands
Operands specify preset instruction parameters (boxes in ladder diagrams) that
are used to specify I/O memory area contents or constants. An instruction can
be executed entering an address or constant as the operands. Operands are
classified as source, destination, or number operands.
Example
N (number)
S (source)
D (destination)
Operand types
Source
Destination
(Results)
Number
Specifies the address of the data
to be read or a constant.
Specifies the address where data
will be written.
Specifies a particular number
used in the instruction, such as a
jump number or subroutine
number.
Operand
symbol
S
Description
C
Source
Operand
Control data
D (R)
---
N
---
Source operand other than
control data (C)
Compound data in a source
operand that has different
meanings depending bit status.
Note Operands are also called the first operand, second operand, and so on, starting
from the top of the instruction.
328
Section
Basic Concepts
9-1
Instruction Location and Execution Conditions
The following table shows the possible locations for instructions. Instructions
are grouped into those that do and those do not require execution conditions.
See Section 10 Instruction Set Instructions for details on individual instructions.
Instruction type
Input instructions
Logical start
(Load
instructions)
Intermediate
instructions
Output instructions
Possible
location
Connected
directly to the left
bus bar or is at
the beginning of
an instruction
block.
Between a logical
start and the
output instruction.
Execution
condition
Not required.
Connected
directly to the
right bus bar.
Required.
Required.
Not required.
Note
Diagram
Examples
LD, LD TST(350),
LD > (and other
symbol
comparison
instructions)
AND, OR, AND
TEST(350), AND
> (and other ADD
symbol
comparison
instructions),
UP(521),
DOWN(522),
NOT(520), etc.
Most instructions
including OUT
and MOV(021).
END(001),
JME(005),
FOR(512),
ILC(003), etc.
1. There is another group of instruction that executes a series of mnemonic
instructions based on a single input. These are called block programming
instructions. Refer to the CS1 Series CS1G/H-CPU-E CPU Units Instruction Reference for details on this block programs.
2. If an instruction requiring an execution condition is connected directly to the
left bus bar without a logical start instruction, a program error will occur when
checking the program on a Programming Device.
329
Section
Basic Concepts
9-1
9-1-3 Addressing I/O Memory Areas
Bit Addresses
Bit number (00 to 15)
Indicates the word number.
Example: The address of bit 03 in word 0001 in the CIO Area would be as shown
below. This address is given as “CIO 000103” in this manual.
0001 03
Bit number (03)
Word number: 0001
Bit: CIO 000103
Word
15
14
13
12
11
10
09 08
07
06
05
04
03
02
01
00
0000
0001
0002
Word Addresses
Indicates the word number (address).
Example: The address of bits 00 to 15 in word 0010 in the CIO Area would be as
shown below. This address is given as “CIO 0010” in this manual.
0010
Word number (address)
DM and EM Areas addresses are given with “D” or “E” prefixes, as shown below
for the address D00200.
D00200
Word number (address)
Example: The address of word 2000 in the current bank of the Extended Data
Memory would be as follows:
E00200
Word number (address)
330
Section
Basic Concepts
9-1
The address of word 2000 in the bank 1 of the Extended Data Memory would be
as follows:
E1_00200
Word number (address)
Bank number
9-1-4 Specifying Operands
Operand
Specifying bit
addresses
Description
The word and bit numbers are specified directly to specify a bit (input input bits).
Notation
0001 02
Application
examples
0001
02
Bit number (02)
Word number: 0001
Bit number
(00 to 15)
Indicates the word address.
Note
Specifying
word
addresses
The same addresses are used to access
timer/counter Completion Flags and
Present Values. There is also only one
address for a Task Flag.
The word number is specified directly to specify the 16-bit word.
0003
MOV 0003
D00200
Word number: 0003
D00200
Indicates the word address.
Word number: 00200
331
Section
Basic Concepts
Operand
Specifying
indirect
DM/EM
addresses in
Binary Mode
Description
Notation
9-1
Application
examples
The offset from the beginning of the area is
specified. The contents of the address will be
treated as binary data (00000 to 32767) to
specify the word address in Data Memory (DM)
or Extended Data Memory (EM). Add the @
symbol at the front to specify an indirect address in Binary Mode.
@D
00000 to 32767
(0000 Hex to
7FFF Hex in BIN)
Contents
D
1) D00000 to D32767 are specified if
@D() contains 0000 Hex
to 7FFF Hex (00000 to 32767).
MOV #0001
@00300
@D00300
0100
Binary: 256
Contents
Specifies D00256.
Add the @ symbol.
2) E0 _00000 to E0 _32767 of bank 0 in
Extended Data Memory (EM) are
specified if @D() contains
8000 Hex to FFFF Hex (32768 to
65535).
@D00300
3) E_00000 to E_32767 in the
specified bank are specified if
@E_ contains 0000 Hex
to 7FFF Hex (00000 to 32767).
@E1_00200
Contents
8001
Binary: 32769
Specifies E0 00001.
4) E(+1)_00000 to E(+1)_32767 in
the bank following the specified bank
are specified if @E_
contains 8000 Hex to FFFF Hex
(32768 to 65535).
MOV #0001
@E1_00200
Contents
0101
Binary: 257
Specifies E1_00257.
@E1_00200
Contents
8002
Binary: 32770
Specifies E2_00002.
Note
When specifying an indirect address in Binary Mode, treat Data Memory (DM) and Extended Data
Memory (EM) (banks 0 to C) as one series of addresses. If the contents of an address with the @
symbol exceeds 32767, the address will be assumed to be an address in the Extended Data Memory
(EM) continuing on from 00000 in bank No. 0.
Example: If the Data Memory (DM) word contains 32768, E1_00000 in bank 0 in Extended Data Memory
(EM) would be specified.
Note If the Extended Data Memory (EM) bank number is specified as “n” and the contents of the word
exceeds 32767, the address will be assumed to be an address in the Extended Data Memory (EM)
continuing on from 00000 in bank N+1.
Example: If bank 2 in Extended Data Memory (EM) contains 32768, E3_00000 in bank number 3 in Extended Data Memory (EM) would be specified.
332
Section
Basic Concepts
Operand
Specifying
indirect
DM/EM
addresses in
BCD Mode
Description
Notation
The offset from the beginning of the area is
specified. The contents of the address will be
treated as BCD data (0000 to 9999)to specify
the word address in Data Memory (DM) or Extended Data Memory (EM). Add an asterisk (*)
at the front to specify an indirect address in
BCD Mode.
Application
examples
MOV #0001
*D00200
*D00200
0100
9-1
Contents
Specifies D0100
Add an asterisk (*).
*D
00000 to 9999
(BCD)
Contents
D
Operand
Description
Specifying a An index register (IR) or a data register (DR) is
register
specified directly by specifying IR (: 0 to 15) or
directly
DR (: 0 to 15).
Specifying
an indirect
address
using a
register
Indirect
The bit or word with the PC memory
address (No address contained in IR will be
offset)
specified.
Specify ,IR to specify bits and
words for instruction operands.
Constant
offset
The bit or word with the PC memory
address in IR + or – the constant is
specified.
Specify +/– constant ,IR. Constant
offsets range from –2048 to +2047
(decimal). The offset is converted to
binary data when the instruction is
executed.
DR offset
The bit or word with the PC memory
address in IR + the contents of
DR is specified.
Specify DR ,IR. DR (data
register) contents are treated as
signed-binary data. The contents of
IR will be given a negative offset if
the signed binary value is negative.
Auto
Increment
The contents of IR is incremented
by +1 or +2 after referencing the
value as an PC memory address.
+1: Specify ,IR+
+2: Specify ,IR + +
Auto
Decrement
The contents of IR is decremented
by –1 or –2 after referencing the
value as an PC memory address.
–1: Specify ,–IR
–2: Specify ,– –IR
Notation
Application examples
IR0
MOVR 0010 IR0
Stores the PC memory address for
CIO 0010 in IR0.
IR2
MOVR 000102 IR2
Stores the PC memory address for bit
02 of CIO 0001 in IR2.
,IR0
LD ,IR0
Loads the bit with the PC memory
address in IR0.
,IR1
+5,IR0
+31,IR1
DR0 ,IR0
DR0 ,IR1
,IR0 ++
,IR1 +
,– –IR0
,–IR1
MOV #0001 ,IR1
Stores #0001 in the word with the PC
memory in IR1.
LD +5 ,IR0
Loads the bit with the PC memory
address in IR0 + 5.
MOV #0001 +31 ,IR1
Stores #0001 in the word with the PC
memory address in IR1 + 31
LD DR0 ,IR0
Loads the bit with the PC memory
address in IR0 + the value in DR0.
MOV #0001 DR0 ,IR1
Stores #0001 in the word with the PC
memory address in IR1 + the value in
DR0.
LD ,IR0 ++
Increments the contents of IR0 by 2
after the bit with the PC memory
address in IR0 is loaded.
MOV #0001 ,IR1 +
Increments the contents of IR1 by 1
after #0001 is stored in the word with
the PC memory address in IR1.
LD ,– –IR0
After decrementing the contents of
IR0 by 2, the bit with the PC memory
address in IR0 is loaded.
MOV #0001 ,–IR1
After decrementing the contents of
IR1 by 1, #0001 is stored in the word
with the PC memory address in IR1.
333
Section
Basic Concepts
Data
16-bit
constant
32-bit
constant
Operand
All binary data
or a limited
range of binary
data
All BCD data or
a limited range
of BCD data
All binary data
or a limited
range of binary
data
All BCD data or
a limited range
of BCD data
Text string
Data form
Symbol
Unsigned binary
Signed decimal
#
±
Unsigned
decimal
BCD
Range
Application example
-----
& (See Note.)
#0000 to #FFFF
–32768 to
+32767
&0 to &65535
#
#0000 to #9999
---
Unsigned binary
#
---
Signed binary
+
Unsigned
decimal
BCD
& (See Note.)
#00000000 to
#FFFFFFFF
–2147483648 to
+–2147483647
&0 to
&429467295
#00000000 to
#99999999
Examples
‘ABCDE’
---
Description
Text string data is stored in ASCII
(one byte except for special
characters) in order from the
rightmost to the leftmost byte and
from the rightmost (smallest) to the
leftmost word.
00 Hex (NUL code) is stored in the
leftmost vacant byte of the last
word if there is an odd number of
characters.
0000 Hex (2 NUL codes) is stored
in the leftmost and rightmost vacant
bytes of the last word + 1 if there is
an even number of characters.
#
Symbol
---
---
-------
MOV$ D00100 D00200
‘A’
‘C’
‘E’
‘B’
‘D’
NUL
41
43
45
42
44
00
D00100
D00101
D00102
41
43
45
42
44
00
D00200
D00201
D00202
41
43
45
42
44
00
‘ABCD’
‘A’
‘C’
NUL
‘B’
‘D’
NUL
41
42
43
44
00
00
ASCII characters that can be used in a text string includes alphanumeric characters, Katakana and
symbols (except for special characters). The characters are shown in the following table.
Note Unsigned decimal notation if used for the CX-Programmer only.
334
9-1
Section
Basic Concepts
9-1
ASCII Characters
Bits 0 to 3
Binary
Hex
Bits 4 to 7
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0000
0
Space
0
@
P
`
p
0
@
P
0001
1
!
1
A
Q
a
q
!
1
A
Q
0010
2
"
2
B
R
b
r
"
2
B
R
0011
3
#
3
C
S
c
s
#
3
C
S
0100
4
$
4
D
T
d
t
$
4
D
T
0101
5
%
5
E
U
e
u
%
5
E
U
0110
6
&
6
F
V
f
v
&
6
F
V
0111
7
'
7
G
W
g
w
'
7
G
W
1000
8
(
8
H
X
h
x
(
8
H
X
1001
9
)
9
I
Y
i
y
)
9
I
Y
1010
A
*
:
J
Z
j
z
*
:
J
Z
1011
B
+
;
K
[
k
{
+
;
K
[
1100
C
,
<
L
\
l
|
,
<
L
\
1101
D
Ć
=
M
]
m
}
Ć
=
M
]
1110
E
.
>
N
^
n
~
.
>
N
^
1111
F
/
?
O
_
o
/
?
O
_
335
Section
Basic Concepts
9-1
9-1-5 Data Formats
The following table shows the data formats that the CS1 Series can handle.
Data type
Data format
Unsigned
binary
15 14 13
9
8
7
6
5
4
28 27
26
3276816384 8192 4092 2048 1024 512
256 128
64
12
21 20 23
22
21 20
23
Hex
Signed binary
22
21 20
15 14 13
23
12 11
22
10
9
8
7
6
25 24
5
3
2
1
23
22
21 20
8
4
23
22
16
4
21 20
3
2
1
0
23
22
21 20
8
4
26
3276816384 8192 4092 2048 1024 512
256 128
64
12
21 20 23
22
21 20
23
22
6
5
3
2
1
22
21 20
23
22
21 20
23
22
21 20
23
22
16
0 to
65535
4-digit
hexadecimal
0000 to FFFF
1
28 27
Hex
25 24
2
0
215 214 213 212 211 210 29
Binary
Decimal
10
215 214 213 212 211 210 29
Binary
Decimal
12 11
Decimal
2
–32768
to
+32767
8000 to 7FFF
0 to
9999
0000 to 9999
1
21 20
Sign bit: 0: Positive, 1: Negative
BCD (binary
coded
decimal)
15 14 13
23
Binary
22
12 11
21 20
23
10
22
9
8
7
21 20 23
4
0
Decimal
0 to 9
Floating-point
decimal
31 30 29
Sign of
mantissa
0 to 9
23
Exponent
22
21
0 to 9
20 19 18 17
Binary
0 to 9
3
2
1
0
Mantissa
Value = (–1)Sign x 1.[Mantissa] x 2Exponent
Note
• Sign (bit 31)
1: negative or 0: positive
• Mantissa
The 23 bits from bit 00 to bit 22 contain the mantissa,
i.e., the portion below the decimal point in 1......,
in binary.
• Exponent
The 8 bits from bit 23 to bit 30 contain the exponent.
The exponent is expressed in binary as 127 plus n
in 2n.
This format conforms to IEEE754 standards for single-precision floating-point data
and is used only with instructions that convert or calculate floating-point data. It can
be used to set or monitor from the I/O memory Edit and Monitor Screen on the CXProgrammer (not supported by the Programming Consoles). As such, users do not
need to know this format although they do need to know that the formatting takes up
two words.
Signed Binary Data
In signed binary data, the leftmost bit indicates the sign of binary 16-bit data. The
value is expressed in 4-digit hexadecimal.
Positive Numbers: A value is positive or 0 if the leftmost bit is 0 (OFF). In 4-digit
hexadecimal, this is expressed as 0000 to 7FFF Hex.
Negative Numbers: A value is negative if the leftmost bit is 1 (ON). In 4-digit
hexadecimal, this is expressed as 8000 to FFFF Hex. The absolute of the negative value (decimal) is expressed as a two’s complement.
336
Section
Basic Concepts
9-1
Example: If a negative value is –19 in decimal, the two’s complement of the absolute value of 19 (0013 Hex) is FFFF Hex minus 0013 Hex plus 0001 Hex,
which yields FFED Hex.
True number
–)
+)
Two’s complement
F
F
F
F
1111
1111
1111
1111
0
0
1
3
0000
0000
0001
0011
F
F
E
C
1111
1111
1110
1100
0
0
0
1
0000
0000
0000
0001
F
F
E
D
1111
1111
1110
1101
Complements
Generally the complement of base x refers to a number produced when all digits
of a given number are subtracted from x – 1 and then 1 is added to the rightmost
digit. (Example: The ten’s complement of 7556 is 9999 – 7556 + 1 = 2444.) A
complement is used to express a subtraction and other functions as an addition.
Example: With 8954 – 7556 = 1398, 8954 + (the ten’s complement of 7556) =
8954 + 2444 = 11398. If we ignore the leftmost bit, we get a subtraction result of
1398.
Two’s Complements
A two’s complement is a base-two complement. Here, we subtract all digits from
1 (2 – 1 = 1) and add one.
Example: The two’s complement of binary number 1101 is 1111 (F Hex) – 1101
(D Hex) + 1 (1 Hex) = 0011 (3 Hex). The following shows this value expressed in
4-digit hexadecimal.
The two’s complement b Hex of a Hex is FFFF Hex – a Hex + 0001 Hex = b Hex.
To determine the two’s complement b Hex of “a Hex,” use b Hex = 10000 Hex – a
Hex.
Example: to determine the two’s complement of 3039 Hex, use 10000 Hex –
3039 Hex = CFC7 Hex.
Similarly use a Hex = 10000 Hex – b Hex to determine the value a Hex from the
two’s complement b Hex.
Example: To determine the real value from the two’s complement CFC7 Hex
use 10000 Hex – CFC7 Hex = 3039 Hex.
The CS1 Series has two instructions: NEG(160) (2’S COMPLEMENT) and
NEGL(161) (DOUBLE 2’S COMPLEMENT) that can be used to determine the
two’s complement from the true number or to determine the true number from
the two’s complement.
337
Section
Basic Concepts
9-1
Signed BCD Data
Signed BCD data is a special data format that is used to express negative numbers in BCD. Although this format is found in applications, it is not strictly defined
and depends on the specific application. The CS1 Series supports the following
instructions to convert the data formats: SIGNED BCD-TO-BINARY: BINS(470),
DOUBLE SIGNED BCD-TO-BINARY: BISL(472), SIGNED BINARY-TO-BCD:
BCDS(471), and DOUBLE SIGNED BINARY-TO-BCD: BDSL(473). Refer to the
CS1-series Programmable Controllers Programming Manual (W340) for more
information.
Decimal
Hexadecimal
Binary
BCD
0
0
0000
0000
1
1
0001
0001
2
2
0010
0010
3
3
0011
0011
4
4
0100
0100
5
5
0101
0101
6
6
0110
0110
7
7
0111
0111
8
8
1000
1000
9
9
1001
1001
10
A
1010
0001
0000
11
B
1011
0001
0001
12
C
1100
0001
0010
13
D
1101
0001
0011
14
E
1110
0001
0100
15
F
1111
0001
0101
16
10
10000
0001
0110
Decimal
+65,535
+65534
.
.
.
Unsigned binary (4-digit
hexadecimal)
FFFF
FFFE
Signed binary (4-digit
hexadecimal)
Cannot be expressed.
.
.
.
+32,769
+32,768
8001
8000
+32,767
7FFF
7FFF
+32,766
7FFE
7FFE
.
.
.
.
.
.
+2
0002
0002
+1
0001
0001
0
0000
0000
–1
–2
Cannot be expressed.
FFFF
FFFE
.
.
.
–32,767
–32,768
338
8001
8000
Section
Basic Concepts
9-1
9-1-6 Instruction Variations
The following variations are available for instructions to differentiate executing
conditions and to refresh data when the instruction is executed (immediate refresh).
Variation
Differentiation
ON
OFF
Immediate refreshing
Symbol
@
%
!
Description
Instruction that differentiates when the
execution condition turns ON.
Instruction that differentiates when the
execution condition turns OFF.
Refreshes data in the I/O area specified by
the operands or the Special I/O Unit words
when the instruction is executed.
@
Instruction (mnemonic)
Differentiation variation
Immediate refresh variation
9-1-7 Execution Conditions
The CS1 Series offers the following types of basic and special instructions.
• Non-differentiated instructions executed every cycle
• Differentiated instructions executed only once
Non-differentiated Instructions
Output instructions that required execution conditions are executed once every
cycle while the execution condition is valid (ON or OFF).
Example
Non-differentiated
output instruction
Input instructions that create logical starts and intermediate instructions read bit
status, make comparisons, test bits, or perform other types of processing every
cycle. If the results are ON, power flow is output (i.e., the execution condition is
turned ON).
Example
Non-differentiated input instruction
Input-differentiated Instructions
Upwardly Differentiated Instructions (Instruction Preceded by @)
• Output Instructions: The instruction is executed only during the cycle in
which the execution condition turned ON (OFF → ON) and are not executed in
the following cycles.
Example
(@) Upwardly-differentiated instruction
@MOV
Executes the MOV instruction once when
CIO 000102 goes OFF → ON.
339
Section
Basic Concepts
9-1
• Input Instructions (Logical Starts and Intermediate Instructions): The
instruction reads bit status, makes comparisons, tests bits, or perform other
types of processing every cycle and will output an execution condition (power
flow) when results switch from OFF to ON. The execution condition will turn
OFF the next cycle.
Example
Upwardly differentiated input instruction
ON execution condition created for one
cycle only when CIO 000103 goes from
OFF to ON.
Downwardly Differentiated Instructions (Instruction preceded by ↓)
• Output instructions: The instruction is executed only during the cycle in
which the execution condition turned OFF (ON → OFF) and is not executed in
the following cycles.
Example
(%) Downwardly differentiated instruction
%SET
Executes the SET instruction once
when CIO 000102 goes ON → OFF.
Execution conditions that are output will be ON for one cycle and will turn OFF
the next cycle.
Example
Downwardly differentiated instruction
Will turn ON when the CIO 000103 switches from
ON → OFF and will turn OFF after one cycle.
Note
340
1. Unlike the upwardly differentiated instructions, downward differentiation
variation (%) can only be added to LD, AND, OR, SET and RSET instructions. To execute downward differentiation with other instructions, combined the instructions with a DIFD or a DOWN instruction.
2. Upwardly and downwardly differentiated instructions can be replaced by
combinations of DIFFERENTIATE UP (DIFU) and DIFFERENTIATE
DOWN (DIFD) instructions, power flow differentiation UP and DOWN
instructions as well as upwardly/downwardly differentiated LOAD instructions (@LD/%LD).
Section
Basic Concepts
9-1
9-1-8 I/O Instruction Timing
The following timing chart shows different operating timing for individual instructions using a program comprised of only LD and OUT instructions.
A
B1
Input
read
A
B2
Input
read
A
B3
A
A
B6
A
B7
A
B8
!
A
B9
Input
read
!
A
B10
!
A
B11
!
A
Input
read
Input read
Input
read
Input
read
!
!
Input
read
Input
read
B5
!
A
Input
read
Input
read
B4
!
Input
read
!
B12
!
CPU processing
Instruction I/O refresh
executed.
Differentiated Instructions
• A differentiated instruction has a flag that tells whether the previous value is
ON or OFF. At the start of operation, the flags for upwardly differentiated
instruction (DIFU and @ instructions) are set to ON and the flags for downwardly differentiated instructions (DIFD and % instructions) are set to OFF.
This prevents differentiation outputs from being output unexpectedly at the
start of operation.
• An upwardly differentiated instruction (DIFU or @ instruction) will output ON
only when the execution condition is ON and flag for the previous value is OFF.
341
Section
Basic Concepts
9-1
• Use in Interlocks (IL - ILC Instructions)
In the following example, the previous value flag for the differentiated instruction maintains the previous interlocked value and will not output a differentiated output at point A because the value will not be updated while the interlock is in effect.
0000
00
(002)
IL
0000
01
(013)
DIFU
001000
(003)
ILC
IL is
executing
IL is
executing
• A downwardly differentiated instruction (DIFD or % instruction) will output ON
only when the execution condition is OFF and the flag for the previous value is
ON.
• Both upwardly and downwardly differentiated instructions will turn the output
OFF in the next cycle.
• Use in Jumps (JMP - JME Instructions): In the following example, if input
CIO 000001 goes from OFF to ON after input CIO 000000 turns ON (turning
ON output CIO 001000), output CIO 001000 will remain ON in the next cycle if
input CIO 000000 turns OFF causing a jump.
0000
00
0000
01
(004)
JMP
0010
(013)
DIFU
001000
(003)
JME
0010
• Do not use the Always ON Flag or A20011 (First Cycle Flag) as the input bit for
an upwardly differentiated instruction. The instruction will never be executed.
• Do not use Always OFF Flag as the input bit for a downwardly differentiated
instruction. The instruction will never be executed.
342
Section
Basic Concepts
9-1
9-1-9 Refresh Timing
The following methods are used to refresh external I/O.
• Cyclic refresh
• Immediate refresh (! specified instruction, IORF instruction)
Every program allocated to a ready cyclic task or a task where interrupt condition
has been met will execute starting from the beginning program address and will
run until the END(001) instruction. After all ready cyclic tasks or tasks where interrupt condition have been met have executed, cyclic refresh will refresh all I/O
points at the same time.
Cyclic Refresh
Note Programs can be executed in multiple tasks. I/O will be refreshed after the final
END(001) instruction in the program allocated to the highest number (among all
ready cyclic tasks) and will not be refreshed after the END(001) instruction in
programs allocated to other cyclic tasks. Execute an IORF instruction for all required words prior to the END(001) instruction if I/O refreshing is required in other tasks.
Immediate Refresh
Instructions with Refresh
Variation (!)
I/O will be refreshed as shown below when an instruction is executing if an real
I/O bit is specified as an operand.
Units
C200H Basic I/O Units
CS1 Basic I/O Units
Refreshed data
I/O will be refreshed for the 16 bits
containing the bit.
• When a word operand is specified for an instruction, I/O will be refreshed for
the 16 bits that are specified.
• Inputs will be refreshed for input or source operand just before an instruction is
executed.
• Outputs will be refreshed for outputs or destination (D) operands just after an
instruction is execute.
Add an exclamation mark (!) (immediate refresh option) in front of the instruction.
Units Refreshed for I/O REFRESH Instruction
Location
Units
CPU or Expansion I/O Rack (but not SYSMAC BUS Slave
Racks)
Basic I/O Units
Basic CS1 I/O
Refreshed
Units
Basic C200H I/O
Refreshed
Unit
C200H Group-2
Not refreshed
High-density I/O
Units
Special I/O Units
Not refreshed
343
Section
Basic Concepts
Top
.
.
.
!LD 000101
.
.
.
!OUT 000209
.
.
.
END
Top
I/O refresh
.
.
.
!MOV 0003 0004
.
.
.
END
Immediate refresh
9-1
Real I/O
Input
Wd 0001
Output
Wd 0002
S
Wd 0003
D
Wd 0004
ÉÉÉÉÉ
ÉÉÉÉÉ
ÉÉÉÉÉ
15
0
15
0
ÉÉÉÉÉ
ÉÉÉÉÉ
ÉÉÉÉÉ
ÉÉÉÉÉ
15
0
15
0
16-bit units
16-bit units
Cyclic refresh
(batch processing)
I/O refresh
Units Refreshed for I/O
REFRESH Instruction
All real I/O
An I/O REFRESH (IORF(097)) instruction that refreshes real I/O data in a specified word range is available as a special instruction. All or just a specified range
of real I/O data can be refreshed during a cycle with this instruction.
Units Refreshed for Immediate Refresh Instructions
Location
CPU or Expansion I/O Rack (but not SYSMAC BUS Slave
Racks)
Basic I/O Units
Basic CS1 I/O
Refreshed
Units
Basic C200H I/O
Refreshed
Unit
C200H Group-2
Refreshed
High-density I/O
Units
Units
Special I/O Units
Refreshed
Real I/O for a specified
word range
IORF
0002
0009
344
Partial or
full refresh
Section
Basic Concepts
9-1
Note The Units refreshed by immediate refresh instruction and the IORF(097) (I/O
REFRESH) instruction are in the I/O Unit group. Basic I/O Units and Special I/O
High-density I/O Units mounted to SYSMAC BUS Slave Racks and C200H
Group-2 High-density I/O Units are not refreshed.
9-1-10 Program Capacity
The maximum program capacities of the CS1-series CPU Units for all user programs (i.e., the total capacity of all tasks) are given in the following table. All capacities are given as the maximum number of steps. The capacities must not be
exceeded, and writing the program will be disabled if an attempt is made to exceed the capacity.
Each instruction is from 1 to 7 steps long. Refer to 15-5 Instruction Execution
Times and Number of Steps for the specific number of steps in each instruction.
(The length of each instruction will increase by 1 step if a double-length operand
is used.)
CPU Unit
Max. program capacity
CS1H-CPU67-E
CS1H-CPU66-E
CS1H-CPU65-E
CS1H-CPU64-E
CS1H-CPU63-E
CS1G-CPU45-E
CS1G-CPU44-E
250K steps
120K steps
60K steps
30K steps
20K steps
60K steps
30K steps
CS1G-CPU43-E
CS1G-CPU42-E
20K steps
10K steps
I/O points
5120
1280
960
Note Memory capacity for CS1-series PCs is measured in steps, whereas memory
capacity for previous OMRON PCs, such as the C200HX/HG/HE and CV-series
PCs, was measured in words. Refer to the information at the end of 15-5 Instruction Execution Times and Number of Steps for guidelines on converting program
capacities from previous OMRON PCs.
9-1-11 Basic Ladder Programming Concepts
Instructions are executed in the order listed in memory (mnemonic order). The
basic programming concepts as well as the execution order must be correct.
345
Section
Basic Concepts
General Structure of the
Ladder Diagram
A ladder diagram consists of left and right bus bars, connecting lines, input bits,
output bits, and special instructions. A program consists of one or more program
runs. A program rung is a unit that can be partitioned when the bus is split horizontally. In mnemonic form, a rung is all instructions from a LD/LD NOT instruction to the output instruction just before the next LD/LD NOT instructions. A program rung consists of instruction blocks that begin with an LD/LD NOT instruction indicating a logical start.
Input bit
Left bus bar
Connecting line
Special
instruction
Output bit
Right bus bar
Rungs
Mnemonics
Instruction blocks
A mnemonic program is a series of ladder diagram instructions given in their
mnemonic form. It has program addresses, and one program address is equivalent to one instruction. Program addresses contain six digits starting from
000000.
Example
Program Address
346
9-1
Instruction (Mnemonic)
Operand
000000
LD
000000
000001
AND
000001
000002
LD
000002
000003
AND NOT
000003
000004
LD NOT
000100
000005
AND
000101
000006
OR LD
000007
AND LD
000008
OUT
000009
END
000200
Section
Basic Concepts
9-1
Basic Ladder Program Concepts
1, 2, 3...
1. The power flow in a program is from left to right. Power flows in rungs “a” and
“b” as though diodes were inserted. Rungs must be changed to produce operation that would be the same as ordinary circuits without a diodes. Instructions in a ladder diagram are executed in order from the left bus bar to the
right bus bar and from top to bottom. This is the same order as the instructions are listed in mnemonic form.
Signal flow
A (1)
C (2)
(5)
(3)
B (6)
(7)
R1
D (4)
a
(8)
(10)
E (9)
R2
A (11)
B (12)
(13)
R1
b
C (14)
D (15)
(16)
R2
Order of execution
Mnemonic
(1) LD A
(9) AND E
(2) LD C
(10) OUT R2
(3) OUT TR0
(11) LD A
(4) AND D
(12) AND B
(5) OR LD
(13) OUT R1
(6) AND B
(14) LD C
(7) OUT R1
(15) AND D
(8) LD TR0
(16) OUT R2
2. There is no limit to the number of I/O bits, work bits, timers, and other input
bits that can be used. Rungs, however, should be kept as clear and simple
as possible even if it means using more input bits to make them easier to
understand and maintain.
3. There is no limit to the number of input bits that can be connected in series or
in parallel in series or parallel rungs.
4. Two or more output bits can be connected in parallel.
0000
00
0000
05
TIM
0000
#0100
0002
00
5. Output bits can also be used as input bits.
0002
00
0002
00
347
Section
Basic Concepts
9-1
Restrictions
1, 2, 3...
1. A ladder program must be closed so that signals (power flow) will flow from
the left bus bar to the right bus bar. A rung error will occur if the program is not
closed (but the program can be executed).
2. Output bits, timers, counters and other output instructions cannot be connected directly to the left bus bar. If one is connected directly to the left bus
bar, a rung error will occur during the programming check by a Programming
Device. (The program can be executed,m but the OUT and MOV(021) will
not be executed.)
Input condition must be provided.
MOV
Insert an unused input N.C. work bit or an ON Flag (Always ON Flag) as a
dummy if the input must be kept ON at all times.
Unused work bit
ON (Always ON Flag)
MOV
3. An input bit must always be inserted before and never after an output
instruction like an output bit. If it is inserted after an output instruction, then a
location error will occur during a Programming Device program check (but
the program can be executed).
0000
00
0000
01
348
0000
03
0002
01
0002
01
0000
04
Section
Basic Concepts
9-1
4. The same output bit cannot be programmed in an output instruction more
than once. If it is, a duplicate output bit error will occur and output instruction
programmed first will not operate. The results of the second rung will be output.
(Output bit)
0000
00
(Output bit)
0000
00
5. An input bit cannot be used in an OUTPUT instruction (OUT).
(Input bit)
0000
00
(Input bit)
0000
00
6. The total number –1 of LD/LD NOT instructions minus one indicating logical
starts must match the total number of AND LD and OR LD instructions connecting the instruction blocks. If they do not match, then a rung error will occur during a Programming Device program check (but the program can be
executed).
Example
A
C
E
B
D
F
G
LD A
OR B
LD C
OR D
AND LD
LD E
OR F
AND LD
OUT G
3
2
7. An END(001) instruction must be inserted at the end of the program in each
task.
• If a program without an END(001) instruction starts running, a program error
indicating No End Instruction will occur, the ERR/ALM LED on the front of the
CPU Unit will light, and the program will not be executed.
• If a program has more than one END(001) instruction, then the program will
only run until the first END(001) instruction.
349
Section
Basic Concepts
9-1
• Debugging programs will run much smoother if an END(001) instruction is inserted at various break points between sequence rungs and the END(001)
instruction in the middle is deleted after the program is checked.
Task (program)
Task (program)
000000
000001
000000
000001
END
END
END
Task (program)
Will not be executed.
Task (program)
000000
000001
000000
000001
END
Will not be executed.
END
END
Task (program)
Task (program)
000000
000001
000000
000001
END
END
9-1-12 Inputting Mnemonics
A logical start is accomplished using an LD/LD NOT instruction. The area from
the logical start until the instruction just before the next LD/LD NOT instruction is
considered a single instruction block.
Create a single rung consisting of two instruction blocks using an AND LD
instruction to AND the blocks or by using an OR LD instruction to OR the blocks.
The following example shows a complex rung that will be used to explain the procedure for inputting mnemonics (rung summary and order).
350
Section
Basic Concepts
1, 2, 3...
9-1
1. First separate the rung into small blocks (a) to (f).
0000
00
0000
01
0010
00
0010
01
0000
02
0000
03
0000
04
0000
05
0005
00
0000
06
0005
00
(a) 0000
00
0000
01
(e) 0000
04
(b) 0010
00
0010
01
(d) 0000
02
0000
05
0000
03
(5)
(f)
(1)
(c)
0005
00
0000
06
(4)
(3)
(2)
351
Section
Basic Concepts
• Program the blocks from top to bottom and then from left to right.
(a) 0000
00
(b) 0010
00
0000
01
0010
01
(1)
LD 000000
AND 000001
LD 001000
AND 001001
OR LD
(2)
(c)
0005
00
(c) 0000
04
(3)
0000
05
(5)
OR 000500
LD 000004
AND 000005
(4)
(a) 0000
02
(f)
0000
03
0000
06
OR 000006
AND 000002
AND NOT 000003
AND LD
0005
00
OUT 000500
(a)
(b)
(c)
(d)
(e)
(f)
352
Address
Instruction
Operand
000200
000201
000202
000203
000204
000205
000206
000207
000208
000209
000210
000211
000212
LD
AND
LD
AND
OR LD
OR
AND
AND NOT
LD
AND
OR
AND LD
OUT
000000
000001
001000
001001
--000500
000002
000003
000004
000005
000006
--000500
(1)
(2)
(3)
(5)
(4)
9-1
Section
Basic Concepts
9-1
Program Examples
1, 2, 3...
1. Parallel/Series Rungs
0000
00
0000
01
0000
02
0000
03
0002
00
LD
AND
OR
AND
AND NOT
OUT
0002
00
a
b
A block
B block
Instruction Operands
000000
000001
000200
000002
000003
000200
a
b
• Program the parallel instruction in the A block and then the B block.
• Enter the bit addresses in the operand column.
2. Series/Parallel Rungs
0000
00
0000
01
0000
02
0000
03
0002
01
LD
AND NOT
LD
AND
OR
OR
AND LD
OUT
0002
01
0000
04
a
b
A block
Instruction Operands
B block
000000
000001
000002
000003
000201
000004
--000201
a
b
• Separate the rung into A and B blocks, and program each individually.
• Connect A and B blocks with an AND LD.
• Program A block.
Instruction Operands
b1
B1 block
0000
00
0000
01
0000
02
0000
03
0000
04
0002
02
0002
02
b2
B2 block
a
A block
b
LD NOT
AND
LD
AND NOT
LD NOT
AND
OR LD
AND LD
OUT
000000
000001
000002
000003
000004
000202
----000202
a
b1
b2
b1 + b2
ab
B block
• Program B1 block and then program B2 block.
• Connect B1 and B2 blocks with an OR LD and then A and B blocks with an
AND LD.
353
Section
Basic Concepts
3. Example of series connection in a series rung
a1
A1 block
Instruction Operands
b1
B1 block
0000
00
0000
01
0000
04
0000
05
0000
02
0002
03
0002
06
0002
07
a2
b2
A2 block
B2 block
a
b
A block
0002
03
B block
LD
AND NOT
LD NOT
AND
OR LD
LD
AND
LD
AND
OR LD
AND LD
OUT
000000
000001
000002
000003
--000004
000005
000006
000007
----000203
a1
a2
a1 + a2
b1
b2
b1 + b2
ab
• Program A1 block, program A2 block, and and then connect A1 and A2
blocks with an OR LD.
• Program B1 and B2 the same way.
• Connect A block and B block with an AND LD.
• Repeat for as many A to n blocks as are present.
0005
00
a
A block
354
b
c
n
B block
C block
n block
9-1
Section
Basic Concepts
9-1
4. Complex Rungs
0000
00
0000
01
0000
02
0000
04
0000
05
0000
06
0000
07
Instruction
0002
04
LD
LD
LD
AND
OR LD
AND LD
LD
AND
OR LD
LD
AND
OR LD
OUT
0000
03
000000
000001
000002
000003
----000004
000005
--000006
000007
--000204
b
0000
01
0000
02
0002
04
a
d
Block
Block
0000
03
0000
04
c
0000
05
0000
06
Block
0000
07
e
Block
The above rung can be rewritten as follows:
0000
00
0000
01
0000
02
0000
00
0000
03
0000
04
0000
05
0000
00
0000
03
0000
04
0000
06
0000
01
0000
02
0000
03
Z
Z
The diagram above is based on the diagram below.
0000
00
Z
A simpler program can be written by rewriting
this as shown below.
Instruction
Block
0000
00
0000
00
Operand
LD
LD NOT
AND
LD
AND NOT
LD
LD
AND NOT
OR LD
AND LD
OR LD
AND LD
OUT
0000
02
0000
03
0000
00
0000
01
Operand
000000
000001
000002
000003
000004
000005
000006
000007
--------000205
a
b
c
d
e
d+e
(d + e) c
(d + e) c + b
((d + e) c + b) a
0002
05
0000
07
355
Section
Basic Concepts
Instruction
Reset input
0000
00
0000
03
H00000
0000
01
TIM
Error input
0000
02
T0001
0001
#0100
10 sec
0002
06
Error display
H00000
LD
OR
OR
OR
AND NOT
OUT
TIM
AND
OUT
Operand
000000
000001
000002
H00000
000003
H00000
0001
0100
T0001
000206
If a holding bit is in used, the ON/OFF status would
be held in memory even if the power is turned OFF,
and the error signal would still be in effect when
power is turned back ON.
356
9-1
Section
Basic Concepts
9-1
5. Rungs Requiring Caution or Rewriting
OR Instructions
With an OR/OR NOT instruction, an OR is taken with current execution condition, i.e., the results of
ladder logic up to the OR/OR NOT instruction.
In the example at the left, an OR LD instruction will be needed if the rungs are programmed as
shown without modification. A few steps can be eliminated by rewriting the rungs as shown.
0000
00
0002
07
0000
01
0000
01
0002
07
0002
07
0000
00
0002
07
Output Instruction Branches
A TR bit will be needed if there is a branch before an AND/AND NOT instruction. The TR bit will
not be needed if the branch comes a point that is connected directly to the first output instruction.
After the first output instruction, an AND/AND NOT instruction and the second output instruction
can be connected without modification.
In the example at the left, a temporary storage bit TR0 output instruction and load (LD) instruction
are needed at a branch point if the rungs are programmed without modification. A few steps can
be eliminated by rewriting the rungs. See the following pages for more information on TR bits.
0000
00
0000
01
TR0
0002
08
0000
00
0002
09
0000
01
0002
09
0002
08
In the example below, use TR0 to store the execution condition at the branch point or rewrite the
rungs.
0000
00
0000
01
0000
03
TR0
0002
11
0000
01
0000
02
0000
03
0002
11
0000
00
0000
02
0000
04
0002
12
0000
01
0000
04
0002
12
Mnemonic Execution Order
CIO 000210 shown below will never turn ON because PCs execute instructions in mnemonic
order. By rewriting the rung, CIO 000201 can be turned ON for one cycle.
0000
00
0010
00
0010
00
0000
00
0002
10
0000
00
0010
00
0002
10
0010
00
357
Section
Precautions
9-2
Rewrite the rungs on the left. They cannot be executed.
The arrows show signal (power flow) flow when the rung consists of control relays.
A
B
R1
A
B
R1
E
C
D
R2
C
E
A
E
D
R2
C
9-2
Precautions
9-2-1 Condition Flags
Using Condition Flags
Conditions flags are shared by all instructions, and will change during a cycle
depending on results of executing individual instructions. Therefore, be sure to
use Condition Flags on a branched output with the same execution condition immediately after an instruction to reflect the results of instruction execution. Never
connect a Condition Flag directly to the bus bar because this will cause it to reflect execution results for other instructions.
Example: Using Instruction A Execution Results
Correct use
Mnemonic
Instruction A
Condition Flag
Example: =
Reflects instruction A
execution results.
Instruction B
Instruction
LD
Instruction A
AND
Instruction B
Operand
a
=
The same execution condition (a) is used for instructions A and B to execute
instruction B based on the execution results of instruction A. In this case, instruction B will be executed according to the Condition Flag only if instruction A is
executed.
Incorrect use
Preceding rung
Instruction A
Condition Flag
Example: =
Reflects the execution results of
the preceding rung if instruction
A is not executed.
Instruction B
If the Condition Flag is connected directly to the left bus bar, instruction B will be
executed based on the execution results of a previous rung if instruction A is not
executed.
358
Section
Precautions
9-2
Note Condition Flags are used by all instruction within a single program (task) but they
are cleared when the task switches. Therefore execution results in the preceding task will not be reflected later tasks. Since conditions flags are shared by all
instructions, make absolutely sure that they do not interfere with each other within a single ladder-diagram program. The following is an example.
Using Execution Results in N.C. and N.C. Inputs
The Condition Flags will pick up instruction B execution results as shown in the
example below even though the N.C. and N.O. input bits are executed from the
same output branch.
Instruction A
Condition Flag
Example: =
Reflects instruction A execution
results.
Instruction B
Condition Flag
Example: =
Reflects instruction B execution
results.
Make sure each of the results is picked up once by an OUTPUT instruction to
ensure that execution results for instruction B will be not be picked up.
Reflects instruction A
execution results.
Instruction A
Condition Flag
Example: =
Condition Flag
Example: =
Reflects instruction A
execution results.
Instruction B
359
Precautions
Section
9-2
Example: The following example will move #0200 to D00200 if D00100 contains
#0010 and move #0300 to D00300 if D00100 does not contain #0010.
Reflects CMP execution results.
(1)
Reflects MOV execution results.
(2)
The Equals Flag will turn ON if D00100 in the rung above contains #0010. #0200
will be moved to D00200 for instruction (1), but then the Equals Flag will be
turned OFF because the #0200 source data is not 0000 Hex. The MOV instruction at (2) will then be executed and #0300 will be moved to D0300. A rung will
therefore have to be inserted as shown below to prevent execution results for the
first MOVE instruction from being picked up.
Reflects CMP execution results.
360
Section
Precautions
9-2
Using Execution Results from Differentiated Instructions
With differentiated instructions, execution results for instructions are reflected in
Condition Flags only when execution condition is met, and results for a previous
rung (rather than execution results for the differentiated instruction) will be reflected in Condition Flags in the next cycle. You must therefore be aware of what
Condition Flags will do in the next cycle if execution results for differentiated
instructions to be used.
In the following for example, instructions A and B will execute only if execution
condition C is met, but the following problem will occur when instruction B picks
up execution results from instruction A. If execution condition C remains ON in
the next cycle after instruction A was executed, then instruction B will unexpectedly execute (by the execution condition) when the Condition Flag goes from
OFF to ON because of results reflected from a previous rung.
Previous rung
Instruction A
Condition Flag
Example: =
Reflects execution results for instruction A
when execution condition is met.
Reflects execution results for a previous
rung in the next cycle.
Instruction B
In this case then, instructions A and B are not differentiated instructions, the
DIFU (of DIFD) instruction is used instead as shown below and instructions A
and B are both upwardly (or downwardly) differentiated and executed for one
cycle only.
Previous rung
Instruction A
Reflects instruction A execution results.
Condition Flag
Example: =
Instruction B
Main Conditions Turning ON Condition Flags
Error Flag
The ER Flag will turn ON under special conditions, such as when operand data
for an instruction is incorrect. The instruction will not be executed when the ER
Flag turns ON.
When the ER Flag is ON, the status of other Condition Flags, such as the <, >,
OF, and UF Flags, will not change and status of the = and N Flags will vary from
instruction to instruction.
Refer to the descriptions of individual instructions in the CS1-series Programmable Controllers Programming Manual (W340) for the conditions that will
361
Section
Precautions
9-2
cause the ER Flag to turn ON. Caution is required because some instructions
will turn OFF the ER Flag regardless of conditions.
Note The PC Setup Settings for when an instruction error occurs determines whether
operation will stop when the ER Flag turns ON. In the default setting, operation
will continue when the ER Flag turns ON. If Stop Operation is specified when the
ER Flag turns ON and operation stops (treated as a program error), the program
address at the point where operation stopped will be stored at in A298 to A299.
At the same time, A29508 will turn ON.
Equals Flag
The Equals Flag is a temporary flag for all instructions except when comparison
results are equal (=). It is set automatically by the system, and it will change. The
Equals Flag can be turned OFF (ON) by an instruction after a previous instruction has turned it ON (OFF). The Equals Flag will turn ON, for example, when
MOV or another move instruction moves 0000 Hex as source data and will be
OFF at all other times. Even if an instruction turns the Equals Flag ON, the move
instruction will execute immediately and the Equals Flag will turn ON or OFF depending on whether the source data for the move instruction is 0000 Hex or not.
Carry Flag
The CY Flag is used in shift instructions, addition and subtraction instructions
with carry input, addition and subtraction instruction borrows and carries, as well
as with Special I/O Unit instructions, PID instructions, and FPD instructions.
Note the following precautions.
Note
1. The CY Flag can remain ON (OFF) because of execution results for a certain instruction and then be used in other instruction (an addition and subtraction instruction with carry or a shift instruction). Be sure to clear the Carry
Flag when necessary.
2. The CY Flag can be turned ON (OFF) by the execution results for a certain
instruction and be turned OFF (ON) by another instruction. Be sure the proper results are reflected in the Carry Flag when using it.
Less Than and Greater Than Flags
The < and > Flags are used in comparison instruction, as well as in the LMT,
BAND, ZONE, PID and other instructions.
The < or > Flag can be turned OFF (ON) by another instruction even if it is turned
ON (OFF) by execution results for a certain instruction.
Negative Flag
The N Flag is turned OFF when the leftmost bit of the instruction execution results word is “1” for certain instructions and it is turned OFF unconditionally for
other instruction.
Specifying Operands for Multiple Words
With the CS1-series PCs, an instruction will be executed as written even if an
operand requiring multiple words is specified so that all of the words for the operand are not in the same area. In this case, words will be taken in order of the PC
memory addresses. The Error Flag will not turn ON.
As an example, consider the results of executing a block transfer with
XFER(070) if 20 words are specified for transfer beginning with W500. Here, the
Work Area, which ends at W511, will be exceeded, but the instruction will be executed without turning ON the Error Flag. In the PC memory addresses, the present values for timers are held in memory after the Work Area, and thus for the
following instruction, W500 to W511 will be transferred to D00000 to D00011 and
the present values for T0000 to T0007 will be transferred to D00012 to D00019.
362
Section
Precautions
9-2
Note Refer to Appendix D Memory Map of PC Memory Addresses for specific PC
memory addresses.
to
to
to
to
Number of words
Transferred.
to
to
to
to
First source word
First destination word
9-2-2 Special Program Sections
CS1-series programs have special program sections that will control instruction
conditions. The following special program sections are available.
Program section
Instructions
Instruction condition
Status
Subroutine
SBS, SBN and RET
instructions
Subroutine program is
executed.
IL - ILC section
IL and ILC instructions
Section is interlocked
Step Ladder section
STEP S instructions and
STEP instructions
The subroutine program
section between SBN and
RET instructions is
executed.
The output bits are turned
OFF and timers are reset.
Other instructions will not be
executed and previous
status will be maintained.
FOR-NEXT loop
FOR instructions and NEXT
instructions
JMP0 instructions and
JME0 instructions
BPRG instructions and
BEND instructions
Break in progress.
Looping
JMP0 - JME0 section
Block program section
Jump
Block program is executing.
The block program listed in
mnemonics between the
BPRG and BEND
instructions is executed.
Instruction Combinations
The following table shows which of the special instructions can be used inside
other program sections.
Subroutine
IL - ILC
section
Step ladder
section
FOR - NEXT
loop
JMP0 - JME0
section
Block
program
section
Subroutine
Not possible.
Not possible.
Not possible.
Not possible.
Not possible.
Not possible.
IL - ILC
OK
Not possible.
Not possible.
OK
OK
Not possible.
Step ladder
section
FOR - NEXT
loop
JMP0 - JME0
Not possible.
OK
Not possible.
Not possible.
OK
Not possible.
OK
OK
Not possible.
OK
OK
Not possible.
OK
OK
Not possible.
Not possible.
Not possible.
Not possible.
Block
program
section
OK
OK
OK
Not possible.
OK
Not possible.
Note Instructions that specify program areas cannot be used for programs in other
tasks. Refer to 11-2-3 Task Instruction Limitations for details.
363
Section
Precautions
Subroutines
9-2
Place all the subroutines together just before the END(001) instruction in all programs but after programming other than subroutines. (Therefore, a subroutine
cannot be placed in a step ladder, block program, FOR - NEXT, or JMP0 - JME0
section.) If a program other than a subroutine program is placed after a subroutine program (SBN to RET), that program will not be executed.
Program
Subroutine
Program
Subroutine
Instructions Not
Available in Subroutines
The following instructions cannot be placed in a subroutine.
Function
Process Step Control
Mnemonic
STEP(008)
SNXT(009)
Instruction
Define step ladder section
Step through the step
ladder
Note Block Program Sections
A subroutine can include a block program section. If, however, the block program is in WAIT status when execution returns from the subroutine to the main
program, the block program section will remain in WAIT status the next time it is
called.
364
Section
Precautions
Instructions Not
Available in Step Ladder
Program Sections
Function
Sequence Control
Mnemonic
FOR(512), NEXT(513),
and BREAK(514)
END(001)
IL(002) and ILC(003)
JMP(004) and JME(005)
CJP(510) and CJPN(511)
Subroutines
Block Programs
Instruction
FOR, NEXT, and BREAK
LOOP
END
INTERLOCK and
INTERLOCK CLEAR
JUMP and JUMP END
CONDITIONAL JUMP
and CONDITIONAL
JUMP NOT
JMP0(515) and
JME0(516)
SBN(092) and RET(093)
MULTIPLE JUMP and
MULTIPLE JUMP END
SUBROUTINE ENTRY
and SUBROUTINE
RETURN
IF(802) (NOT),
ELSE(803), and
IEND(804)
Branching instructions
BPRG(096) and
BEND(801)
EXIT(806) (NOT)
BLOCK PROGRAM
BEGIN/END
CONDITIONAL BLOCK
EXIT (NOT)
Loop control
LOOP(809) and
LEND(810) (NOT)
WAIT(805) (NOT)
TIMW(813)
TMHW(815)
CNTW(814)
BPPS(811) and
BPRS(812)
Note
9-2
ONE CYCLE WAIT (NOT)
TIMER WAIT
HIGH-SPEED TIMER
WAIT
COUNTER WAIT
BLOCK PROGRAM
PAUSE and RESTART
1. A step ladder program section can be used in an interlock section (between
IL and ILC). The step ladder section will be completely reset when the interlock is ON.
2. A step ladder program section can be used between MULTIPLE JUMP
(JMP0) and MULTIPLE JUMP END (JME0).
365
Section
Precautions
Instructions Not
Available in Block
Program Sections
9-2
The following instructions cannot be placed in block program sections.
Classification by
Function
Sequence Control
Note
Mnemonic
FOR(512), NEXT(513),
and BREAK(514)
END(001)
IL(002) and ILC(003)
Instruction
JMP0(515) and
JME0(516)
FOR, NEXT, and BREAK
LOOP
END
INTERLOCK and
INTERLOCK CLEAR
MULTIPLE JUMP and
MULTIPLE JUMP END
Sequence Input
UP(521)
DOWN(522)
CONDITION ON
CONDITION OFF
Sequence Output
DIFU
DIFD
KEEP
OUT
OUT NOT
DIFFERENTIATE UP
DIFFERENTIATE DOWN
KEEP
OUTPUT
OUTPUT NOT
Timer/Counter
TIM
TIMH
TMHH(540)
TTIM(087)
TIML(542)
MTIM(543)
CNT
CNTR
TIMER
HIGH-SPEED TIMER
ONE-MS TIMER
ACCUMULATIVE TIMER
LONG TIMER
MULTI-OUTPUT TIMER
COUNTER
REVERSIBLE COUNTER
Subroutines
SBN(092) and RET(093)
SUBROUTINE ENTRY
and SUBROUTINE
RETURN
Data Shift
SFT
SHIFT
Ladder Step Control
STEP(008) and
SNXT(009)
STEP DEFINE and STEP
START
Data Control
PID
PID CONTROL
Block Program
BPRG(096)
BLOCK PROGRAM
BEGIN
Damage Diagnosis
FPD(269)
FAILURE POINT
DETECTION
1. Block programs can be used in a step ladder program section.
2. A block program can be used in an interlock section (between IL and ILC).
The block program section will not be executed when the interlock is ON.
3. A block program section can be used between MULTIPLE JUMP (JMP0)
and MULTIPLE JUMP END (JME0).
4. A JUMP instruction (JMP) and CONDITIONAL JUMP instruction (CJP/
CJPN) can be used in a block program section. JUMP (JMP) and JUMP
END (JME) instructions, as well as CONDITIONAL JUMP (CJP/CJPN) and
JUMP END (JME) instructions cannot be used in the block program section
unless they are used in pairs. The program will not execute properly unless
these instructions are paired.
366
Section
Checking Programs
9-3
9-3
Checking Programs
CS1-series programs can be checked at the following stages.
• Input check during Programming Console input operations
• Program check by CX-Programmer
• Instruction check during execution
• Fatal error check (program errors) during execution
9-3-1 Errors during Programming Device Input
Programming Console
Errors at the following points will be displayed on the Programming Console during input.
Error display
Cause
CHK MEM
Pin 1 on the DIP switch on the CPU Unit is set to ON
(write-protect).
An illegal I/O input has been attempted.
IO No. ERR
CX-Programmer
The program will be automatically checked by the CX-Programmer at the following times.
Timing
Checked contents
When inputting ladder
diagrams
When loading files
When downloading files
During online editing
Instruction inputs, operand inputs, programming patterns
All operands for all instructions and all programming
patterns
Models supported by the CS1 and all operands for all
instructions
Capacity, etc.
The results of checking are output to the text tab of the Output Window. Also, the
left bus bar of illegal program sections will be displayed in red in ladder view.
9-3-2 Program Checks with the CX-Programmer
The errors that are detected by the program check provided by the CX-Programmer are listed in the following table.
The CX-Programmer does not check range errors for indirectly addressed operands in instructions. Indirect addressing errors will be detected in the program
execution check and the ER Flag will turn ON, as described in the next section.
Refer to the CS1-series Programmable Controllers Programming Manual
(W340) for details.
When the program is checked on the CX-Programmer, the operator can specify
program check levels A, B, and C (in order of the seriousness of the error), as
well as a custom check level.
Area
Illegal data: Ladder
diagramming
Instruction support
by PC
Check
Instruction locations
I/O lines
Connections
Instruction and operation completeness
Instructions and operands supported by PLC
Instruction variations (NOT, !, @, and %)
Object code integrity
367
Section
Checking Programs
Area
Operand ranges
Check
Operand area ranges
Operand data types
Access check for read-only words
Operand range checks, including the following.
Program capacity
for PC
Syntax
Ladder diagram
structure
Output duplication
Constants (#, &, +, –)
Control codes
Area boundary checks for multi-word operands
Size relationship checks for multi-word operands
Operand range overlaps
Multi-word allocations
Double-length operands
Area boundary checks for offsets
Number of steps
Overall capacity
Number of tasks
Call check for paired instructions
IL–ILC
JMP–JME, CJP/CJPN-JME
SBS–SBN–RET, MCRO–SBN–RET
STEP–SNXT
BPRG–BEND
IF–IEND
LOOP–LEND
Restricted programming locations for BPRG–BEND
Restricted programming locations for SBN–RET
Restricted programming locations for STEP–SNXT
Restricted programming locations for FOR–NEXT
Restricted programming locations for interrupt tasks
Required programming locations for BPRG–BEND
Required programming locations for FOR–NEXT
Illegal nesting
END(001) instruction
Number consistency
Stack overflows
OR LD/AND LD sufficiency and order
OUT TR/LD TR sufficiency and order
TR15 range check
Duplicate output check
Tasks
9-3
By bit
By word
Timer/counter instructions
Long words (2-word and 4-word)
Multiple allocated words
Start/end ranges
FAL numbers
Instructions with multiple output operands
Run start flag
Task program allocation
Number of programs
Note Output duplication is not checked between tasks, only within individual tasks.
368
Section
Checking Programs
Multi-word Operands
9-3
CS1-series PCs will execute the program as written even if a multi-word operand
exceeds the end of a memory area. Addresses will be used in order of the PC
memory addresses, and the ER Flag will not turn ON. Although memory area
boundaries are checked for multi-word operands for the program check provided by the CX-Programmer, memory area boundaries are not check on a Programming Console.
CX-Programmer
Programming
Consoles
The following functionality is provided by the CX-Programmer Memory area
for multi-word operands that exceed a memory area
boundaries are not
boundary.
checked for
multi-word
The program cannot be transferred to the CPU Unit.
operands.
The program also cannot be read from the CPU Unit.
Compiling errors are generated for the program check.
Warnings will appear on-screen during offline programming.
Warnings will appear on-screen during online editing in
PROGRAM or MONITOR mode.
9-3-3 Program Execution Check
Operand and instruction location checks are performed on instructions during
input from Programming Devices (including Programming Consoles) as well as
during program checks from Programming Devices (excluding Programming
Consoles). However, these are not final checks.
The following checks are performed during instruction execution.
Type of error
Flag that turns ON for error
1. Instruction Processing Error
ER Flag
The Instruction Processing Error Flag
(A29508) will also turn ON if Stop
Operation is specified when an error
occurs.
2. Access Error
AER Flag
The Access Error Flag (A29510) will
turn ON if Stop Operation is specified
when an error occurs.
Stop/Continue operation
A setting in the PC Setup can be used
to specify whether to stop or continue
operation for instruction processing
errors. The default is to continue
operation.
A program error will be generated and
operation will stop only if Stop
Operation is specified.
A setting in the PC Setup can be used
to specify whether to stop or continue
operation for instruction processing
errors. The default is to continue
operation.
3. Illegal Instruction Error
Illegal Instruction Error Flag (A29514)
A program error will be generated and
operation will stop only if Stop
Operation is specified.
Fatal (program error)
4. UM (User Memory) Overflow Error
UM Overflow Error Flag (A29515)
Fatal (program error)
Instruction Processing Errors
An instruction processing error will occur if incorrect data was provided when
executing an instruction or an attempt was made to execute an instruction outside of a task. Here, data required at the beginning of instruction processing was
checked and as a result, the instruction was not executed, the ER Flag (Error
Flag) will be turned ON and the EQ and N Flags may be retained or turned OFF
depending upon the instruction.
The ER Flag (error Flag) will turn OFF if the instruction (excluding input instructions) ends normally. Conditions that turn ON the ER Flag will vary with individual
instructions. See descriptions of individual instructions in the CS1-series Programmable Controllers Programming Manual (W340) for more details.
369
Section
Checking Programs
9-3
If Instruction Errors are set to Stop Operation in the PC Setup, then operation will
stop (fatal error) and the Instruction Processing Error Flag (A29508) will turn ON
if an instruction processing error occurs and the ER Flag turns ON.
Illegal Access Errors
Illegal access errors indicate that the wrong area was accessed in one of the following ways when the address specifying the instruction operand was accessed.
a) A read or write was executed for a parameter area.
b) A write was executed in a memory area that is not mounted (see note).
c) A write was executed in an EM area specified as EM File Memory.
d) A write was executed in a read-only area.
e) The value specified in an indirect DM/EM address in BCD mode was not
BCD (e.g., *D000001 contains #A000).
Instruction processing will continue and the Error Flag (ER Flag) will not turn ON
if an access error occurs, but the Access Error Flag (AER Flag) will turn ON.
Note An access error will occur for the following:
• When a specified EM address exceeds 32767 (example: E32768) for the
current bank.
• The final bank (example: C) is specified for an indirect EM address in BIN
mode and the specified word contains 8000 to FFFFF Hex (example:
@EC_00001 contains #8000).
• The current bank (example: C) is specified for an indirect EM address in
BIN mode and the specified words contains 8000 to FFFFF Hex (example:
@EC_00001 contains #8000)
• An IR register containing the internal memory address of a bit is used as a
word address or an IR containing the internal memory address of a word is
used as a bit address.
If Instruction Errors are set to Stop Operation in the PC Setup, then operation will
stop (fatal error) and the “Illegal Access Error Flag” (A29510) will turn ON if an
illegal access error occurs and the AER Flag turns ON.
Note The Access Error Flag (AER Flag) will not be cleared after a task is executed. If
Instruction Errors are set to Continue Operation, this Flag can be monitored until
just before the END(001) instruction to see if an illegal access error has occurred
in the task program. (The status of the final AER Flag after the entire user program has been executed will be monitored if the AER Flag is monitored on a Programming Console.)
Other Errors
Illegal Instruction Errors
Illegal instruction errors indicate that an attempt was made to execute instruction data other than that defined in the system. This error will normally not occur
as long as the program is created on a CS1-series Programming Device (including Programming Consoles).
In the rare even that this error does occur, it will be treated as a program error,
operation will stop (fatal error), and the Illegal Instruction Flag (A29514) will turn
ON.
UM (User Memory) Overflow Errors
UM overflow errors indicate that an attempt was made to execute instruction
data stored beyond the last address in the user memory (UM) defined as program storage area. This error will normally not occur as long as the program is
created on a CS1-series Programming Device (including Programming
Consoles).
In the rare even that this error does occur, it will be treated as a program error,
operation will stop (fatal error), and the UM Overflow Flag (A29515) will turn ON.
370
Section
Checking Programs
9-3
Checking Fatal Errors
The following errors are fatal program errors and the CPU Unit will stop running if
one of these occurs. When operation is stopped by a program error, the task
number where operation stopped will be stored in A294 and the program address will be stored in A298/A299. The cause of the program error can be determined from this information.
Address
A294
Description
Stored Data
The type of task and the task number at the
point where operation stopped will be stored
here if operation stops due to a program error.
Cyclic task: 0000 to 001F Hex (cyclic tasks 0 to 31)
Interrupt task: 8000 to 80FF Hex (interrupt tasks 0 to 255)
FFFF Hex will be stored if there are no active
cyclic tasks in a cycle, i.e., if there are no
cyclic tasks to be executed.
A298/A299
The program address at the point where
operation stopped will be stored here in binary
if operation stops due to a program error.
A298: Rightmost portion of program address
A299: Leftmost portion of program address
If the END(001) instruction is missing (A29511
will be ON), the address where END(001) was
expected will be stored.
If there is a task execution error (A29512 will be
ON), FFFFFFFF Hex will be stored in
A298/A299.
371
Section
Checking Programs
9-3
Note If the Error Flag or Access Error Flag turns ON, it will be treated as a program
error and it can be used to stop the CPU from running. Specify operation for program errors in the PC Setup.
Program error
No END Instruction
Error During Task Execution
Description
An END instruction is not present in
the program.
No task is ready in the cycle.
Related flags
The No END Flag (A29511) turns ON.
The Task Error Flag (29512) turns ON.
No program is allocated to a task.
The corresponding interrupt task
number is not present even though
the execution condition for the
interrupt task was met.
Instruction Processing Error (ER Flag
ON) and Stop Operation set for
Instruction Errors in PC Setup
The wrong data values were provided
in the operand when an attempt was
made to execute an instruction.
Illegal Access Error (AER Flag ON)
and Stop Operation set for Instruction
Errors in PC Setup
A read or write was executed for a
parameter area.
A write was executed in a memory area
that is not mounted (see note).
The ER Flag turns ON and the
Instruction Processing Error Flag
(A29508) turns ON if Stop Operation
set for Instruction Errors in PC Setup.
AER Flag turns ON and the Illegal
Access Error Flag (A29510) turns ON
if Stop Operation set for Instruction
Errors in PC Setup
A write was executed in an EM area
specified as EM File Memory.
A write was executed in a read-only area.
The value specified in an indirect DM/EM
address in BCD mode was not BCD.
Indirect DM/EM BCD Error and Stop
Operation set for Instruction Errors in
PC Setup
The value specified in an indirect
DM/EM address in BCD mode is not
BCD.
Differentiation Address Overflow Error
During online editing, more than
131,071 differentiated instructions
have been inserted or deleted.
UM (User Memory) Overflow Error
An attempt was made to execute
instruction data stored beyond the last
address in user memory (UM) defined
as program storage area.
An attempt was made to execute an
instruction that cannot be executed.
Illegal Instruction Error
372
AER Flag turns ON and the DM/EM
Indirect BCD Error Flag (A29509)
turns ON if Stop Operation set for
Instruction Errors in PC Setup
The Differentiation Overflow Error
Flag (A29513) turns ON.
The UM (User Memory) Overflow Flag
(A29516) turns ON.
The Illegal Instruction Flag (A29514)
turns ON.
SECTION 10
Instruction Functions
This section outlines the instructions that can be used to write user programs.
10-1 Sequence Input Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-2 Sequence Output Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-3 Sequence Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-4 Timer and Counter Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-5 Comparison Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-6 Data Movement Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-7 Data Shift Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-8 Increment/Decrement Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-9 Symbol Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-10 Conversion Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-11 Logic Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-12 Special Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-13 Floating-point Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-14 Table Data Processing Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-15 Data Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-16 Subroutine Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-17 Interrupt Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-18 Step Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-19 Basic I/O Unit Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-20 Serial Communications Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-21 Network Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-22 File Memory Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-23 Display Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-24 Clock Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-25 Debugging Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-26 Failure Diagnosis Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-27 Other Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-28 Block Programming Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-29 Text String Processing Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-30 Task Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
374
376
378
381
384
386
389
393
394
399
405
407
408
411
414
418
419
420
421
422
423
424
425
425
426
427
428
428
433
437
373
Section 10-1
Sequence Input Instructions
10-1 Sequence Input Instructions
Instruction
Symbol/Operand
Function
Mnemonic
Execution
condition
Code
LOAD
Bus bar
LD
@LD
%LD
!LD
!@LD
!%LD
LOAD NOT
Location
Indicates a logical start and creates an ON/OFF execution condition
based on the ON/OFF status of the specified operand bit.
Not required
Starting
point of
block
Bus bar
LD NOT
!LD NOT
Indicates a logical start and creates an ON/OFF execution condition
based on the reverse of the ON/OFF status of the specified operand
bit.
Not required
Starting
point of
block
AND
Takes a logical AND of the status of the specified operand bit and the
current execution condition.
AND
@AND
%AND
!AND
!@AND
!%AND
AND NOT
Reverses the status of the specified operand bit and takes a logical
AND with the current execution condition.
AND NOT
!AND NOT
OR
Bus bar
OR
@OR
%OR
!OR
!@OR
!%OR
Bus bar
OR NOT
OR NOT
!OR NOT
AND LOAD
AND LD
Logic block Logic block
Takes a logical OR of the ON/OFF status of the specified operand bit
and the current execution condition.
Reverses the status of the specified bit and takes a logical OR with
the current execution condition.
Required
Required
Required
Takes a logical AND between logic blocks.
Required
LD
to
Logic block A
LD
to
AND LD
374
Required
Logic block B
Serial connection between logic block A and
logic block B.
Section 10-1
Sequence Input Instructions
Instruction
Symbol/Operand
Function
Mnemonic
Execution
condition
Code
OR LOAD
Location
Logic block
OR LD
Logic block
Takes a logical OR between logic blocks.
Required
LD
to
Logic block A
LD
to
OR LD
NOT
---
Logic block B
Parallel connection between logic block A
and logic block B.
Reverses the execution condition.
Required
NOT
520
CONDITION ON
UP(521)
UP
UP(521) turns ON the execution condition for one cycle when the
execution condition goes from OFF to ON.
Required
521
CONDITION OFF
DOWN(522)
DOWN
DOWN(522) turns ON the execution condition for one cycle when the
execution condition goes from ON to OFF.
Required
522
BIT TEST
TSTN(350)
LD TST
350
S
LD TST(350), AND TST(350), and OR TST(350) are used in the
program like LD, AND, and OR; the execution condition is ON when
the specified bit in the specified word is ON and OFF when the bit is
OFF.
Not required
LD TSTN(351), AND TSTN(351), and OR TSTN(351) are used in the
program like LD NOT, AND NOT, and OR NOT; the execution
condition is OFF when the specified bit in the specified word is ON
and ON when the bit is OFF.
Not required
LD TST(350), AND TST(350), and OR TST(350) are used in the
program like LD, AND, and OR; the execution condition is ON when
the specified bit in the specified word is ON and OFF when the bit is
OFF.
Required
LD TSTN(351), AND TSTN(351), and OR TSTN(351) are used in the
program like LD NOT, AND NOT, and OR NOT; the execution
condition is OFF when the specified bit in the specified word is ON
and ON when the bit is OFF.
Required
N
S: Source word
N: Bit number
BIT TEST
LD TSTN
351
TSTN(351)
S
N
S: Source word
N: Bit number
BIT TEST
AND TST(350)
AND TST
350
S
N
S: Source word
N: Bit number
BIT TEST
AND TSTN(351)
AND TSTN
351
S
N
S: Source word
N: Bit number
375
Section 10-2
Sequence Output Instructions
Instruction
Symbol/Operand
Function
Mnemonic
Location
Execution
condition
Code
BIT TEST
TST(350)
OR TST
S
350
LD TST(350), AND TST(350), and OR TST(350) are used in the
program like LD, AND, and OR; the execution condition is ON when
the specified bit in the specified word is ON and OFF when the bit is
OFF.
Required
LD TSTN(351), AND TSTN(351), and OR TSTN(351) are used in the
program like LD NOT, AND NOT, and OR NOT; the execution
condition is OFF when the specified bit in the specified word is ON
and ON when the bit is OFF.
Required
N
S: Source word
N: Bit number
BIT TEST
TSTN(351)
OR TSTN
S
351
N
S: Source word
N: Bit number
10-2 Sequence Output Instructions
Instruction
Symbol/Operand
Function
Mnemonic
Execution
condition
Code
OUTPUT
OUT
!OUT
OUTPUT NOT
OUT NOT
!OUT NOT
KEEP
S (Set)
KEEP(011)
KEEP
!KEEP
011
Location
B
Outputs the result (execution condition) of the logical processing to
the specified bit.
Output
Reverses the result (execution condition) of the logical processing,
and outputs it to the specified bit.
Output
Operates as a latching relay.
Output
Required
Required
Required
Set
R (Reset)
B: Bit
Reset
S execution
condition
R execution
condition
Status of B
DIFFERENTIATE
UP
DIFU
!DIFU
DIFU(013)
DIFU(013) turns the designated bit ON for one cycle when the
execution condition goes from OFF to ON (rising edge).
B
B: Bit
Execution condition
013
Status of B
One cycle
376
Output
Required
Section 10-2
Sequence Output Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
DIFFERENTIATE
DOWN
DIFD(014)
DIFD
!DIFD B: Bit
014
DIFD(014) turns the designated bit ON for one cycle when the
execution condition goes from ON to OFF (falling edge).
B
Output
Required
Execution condition
Status of B
One cycle
SET
SET
@SET
%SET B: Bit
!SET
!@SET
!%SET
RESET
RSET
@RSET
%RSET B: Bit
!RSET
!@RSET
!%RSET
MULTIPLE BIT
SET
SETA
@SETA
530
SET
B
SET turns the operand bit ON when the execution condition is ON.
Output
Required
Execution condition
of SET
Status of B
RSET
B
RSET turns the operand bit OFF when the execution condition is ON.
Output
Required
Execution condition
of RSET
Status of B
SETA(530)
SETA(530) turns ON the specified number of consecutive bits.
Output
Required
D
N1
N2
N2 bits are set to 1
(ON).
D: Beginning
word
N1: Beginning bit
N2: Number of
bits
MULTIPLE BIT
RESET
RSTA
@RSTA
531
RSTA(531)
RSTA(531) turns OFF the specified number of consecutive bits.
Output
Required
D
N1
N2
N2 bits are reset to 0
(OFF).
D: Beginning
word
N1: Beginning bit
N2: Number of
bits
377
Section 10-3
Sequence Control Instructions
10-3 Sequence Control Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
END
END(001)
END
001
Indicates the end of a program.
END(001) completes the execution of a program for that cycle. No
instructions written after END(001) will be executed. Execution
proceeds to the program with the next task number. When the
program being executed has the highest task number in the program,
END(001) marks the end of the overall main program.
Task 1
Output
Not required
Program A
To the next task number
Task 2
Program B
To the next task number
Task n
Program Z
End of the main program
I/O refreshing
NO OPERATION
NOP
This instruction has no function. (No processing is performed for
NOP(000).)
Output
Interlocks all outputs between IL(002) and ILC(003) when the
execution condition for IL(002) is OFF. IL(002) and ILC(003) are
normally used in pairs.
Output
Not required
000
INTERLOCK
IL(002)
IL
002
Execution
condition
Interlocked section
of the program
378
Execution
Execution
condition ON condition OFF
Normal Outputs
execution interlocked.
Required
Section 10-3
Sequence Control Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
INTERLOCK
CLEAR
ILC(003)
ILC
Interlocks all outputs between IL(002) and ILC(003) when the
execution condition for IL(002) is OFF. IL(002) and ILC(003) are
normally used in pairs.
Output
When the execution condition for JMP(004) is OFF, program
execution jumps directly to the first JME(005) in the program with the
same jump number. JMP(004) and JME(005) are used in pairs.
Output
Not required
003
JUMP
JMP
JMP(004)
N
004
Required
Execution condition
N: Jump number
Instructions
jumped
Instructions
executed
JUMP END
JME
JME(005)
N
Instructions in this section
are not executed and output status is maintained.
The instruction execution
time for these instructions
is eliminated.
Indicates the end of a jump initiated by JMP(004) or CJP(510).
Output
Not required
005
N: Jump number
CONDITIONAL
JUMP
CJP
CJP(510)
N
510 N: Jump number
The operation of CJP(510) is the basically the opposite of JMP(004).
When the execution condition for CJP(510) is ON, program execution
jumps directly to the first JME(005) in the program with the same jump
number. CJP(510) and JME(005) are used in pairs.
Execution
Execution
condition OFF condition ON
Output
Required
Instructions
jumped
Instructions
executed
CONDITIONAL
JUMP
CJPN
CJPN(511)
N
511 N: Jump number
Instructions in this section
are not executed and output status is maintained.
The instruction execution
time for these instructions
is eliminated.
The operation of CJPN(511) is almost identical to JMP(004).
When the execution condition for CJP(004) is OFF, program execution
jumps directly to the first JME(005) in the program with the same jump
number. CJPN(511) and JME(005) are used in pairs.
Output
Not required
Execution
Execution
condition ON condition OFF
Instructions
jumped
Instructions
executed
Instructions in this section
are not executed and output status is maintained.
The instruction execution
time for these instructions
is eliminated.
379
Section 10-3
Sequence Control Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
MULTIPLE JUMP
JMP0(515)
JMP0
515
When the execution condition for JMP0(515) is OFF, all instructions
from JMP0(515) to the next JME0(516) in the program are processed
as NOP(000). Use JMP0(515) and JME0(516) in pairs. There is no
limit on the number of pairs that can be used in the program.
Output
Required
Execution
Execution
condition a ON condition a OFF
Instructions
jumped
Instructions
executed
Jumped instructions
are processed as
NOP(000). Instruction
Execution
Execution
condition b ON condition b OFF execution times are
the same as
NOP(000).
Instructions
executed
Instructions
jumped
MULTIPLE JUMP
END
JME0(516)
JME0
When the execution condition for JMP0(515) is OFF, all instructions
from JMP0(515) to the next JME0(516) in the program are processed
as NOP(000). Use JMP0(515) and JME0(516) in pairs. There is no
limit on the number of pairs that can be used in the program.
Output
The instructions between FOR(512) and NEXT(513) are repeated a
specified number of times. FOR(512) and NEXT(513) are used in
pairs.
Output
Not required
516
FOR-NEXT
LOOPS
FOR(512)
FOR
N
512 N: Number of
loops
Not required
Repeated N times
Repeated program section
BREAK LOOP
BREAK(514)
BREAK
514
Programmed in a FOR-NEXT loop to cancel the execution of the loop
for a given execution condition. The remaining instructions in the loop
are processed as NOP(000) instructions.
Condition a ON
N repetitions
Output
Required
Repetitions
forced to end.
Processed as
NOP(000).
FOR-NEXT
LOOPS
NEXT(513)
NEXT
513
380
The instructions between FOR(512) and NEXT(513) are repeated a
specified number of times. FOR(512) and NEXT(513) are used in
pairs.
Output
Not required
Section 10-4
Timer and Counter Instructions
10-4 Timer and Counter Instructions
Instruction
Symbol/Operand
Function
Mnemonic
Location
Execution
condition
Code
TIMER
TIM
TIM
TIM operates a decrementing timer with units of 0.1-s. The setting
range for the set value (SV) is 0 to 999.9 s.
N
S
N: Timer number
S: Set value
Output
Required
Timer input
Timer PV
SV
Completion
Flag
Timer input
Timer PV
SV
Completion
Flag
COUNTER
CNT
Count
input
CNT
CNT operates a decrementing counter. The setting range for the set
value (SV) is 0 to 9,999.
N
S
Output
Required
Count input
Reset
input
N: Counter
number
S: Set value
Reset input
Counter PV
SV
Completion
Flag
HIGH-SPEED
TIMER
TIMH(015)
TIMH
N
015
S
N: Timer number
S: Set value
TIMH(015) operates a decrementing timer with units of 10-ms. The
setting range for the set value (SV) is 0 to 99.99 s.
Output
Required
Timer input
Timer PV
SV
Completion
Flag
Timer input
Timer PV
SV
Completion
Flag
ONE-MS TIMER
TMHH
540
TMHH(540)
N
S
TMHH(540) operates a decrementing timer with units of 1-ms. The
setting range for the set value (SV) is 0 to 9.999 s.
Output
Required
The timing charts for TMHH(540) are the same as those given above
for TIMH(015).
N: Timer number
S: Set value
381
Section 10-4
Timer and Counter Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
ACCUMULATIVE Timer
TIMER
input
TTIM
087
TTIM(087)
TTIM(087) operates an incrementing timer with units of 0.1-s. The
setting range for the set value (SV) is 0 to 999.9 s.
N
Output
Required
S
Timer input
Reset
input
N: Timer number
S: Set value
Timer PV
SV
Timing resumes.
PV maintained.
Completion
Flag
Reset input
LONG TIMER
TIML(542)
TIML
542
TIML(542) operates a decrementing timer with units of 0.1-s that can
time up to 9999999.9 S (approx. 115 days).
D1
SV
Timer PV
D1: Completion
Flag
D2: PV word
S: SV word
MTIM(543)
MTIM
D1
543
D2
Completion Flag
(Bit 00 of D1)
MTIM(543) operates a 0.1-s incrementing timer with eight
independent SVs and Completion Flags. The setting range for the set
value (SV) is 0 to 999.9 s.
Timer PV
S
Timer SVs
0
D1: Completion
Flags
D2: PV word
S: 1st SV word
to
to
Timer input
Timer PV (D2)
Completion
flags (D1)
SV 7
to
SV 2
SV 1
SV 0
0
Bit 7
to
Bit 2
Bit 1
Bit 0
382
Required
Timer input
D2
S
MULTI-OUTPUT
TIMER
Output
Output
Required
Section 10-4
Timer and Counter Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
REVERSIBLE
COUNTER
Increment
input
CNTR
Decre012 ment
input
Reset
input
CNTR(012)
CNTR(012) operates a reversible counter.
Output
Required
N
S
Increment input
Decrement input
N: Counter
number
S: Set value
Counter PV
SV
Counter PV
+1
Completion Flag
SV
–1
Counter PV
Completion Flag
RESET TIMER/
COUNTER
CNR
@CNR
CNR(545)
N1
Resets the timers or counters within the specified range of timer or
counter numbers. Sets the set value (SV) to the maximum of 9999.
Output
Required
N2
545
N1: 1st number in
range
N2: Last number
in range
383
Section 10-5
Comparison Instructions
10-5 Comparison Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
Symbol
Comparison
(Unsigned)
LD, AND, OR + =,
<>, <, <=, >, >=
300 (=)
305 (<>)
310 (<)
315 (<=)
320 (>)
325(>=)
Symbol & options
S1
S2
S1: Comparison
data 1
S2: Comparison
data 2
Symbol comparison instructions (unsigned) compare two values
(constants and/or the contents of specified words) in 16-bit binary
data and create an ON execution condition when the comparison
condition is true. There are three types of symbol comparison
instructions, LD (LOAD), AND, and OR.
LD
<
LD: Not
required
AND, OR:
Required
ON execution condition when
comparison result is true.
ON execution condition
when comparison result
is true.
AND
<
OR
<
ON execution condition when
comparison result is true.
Symbol
Comparison
(Double-word,
unsigned)
S1: Comparison
data 1
S2: Comparison
data 2
Symbol comparison instructions (double-word, unsigned) compare
two values (constants and/or the contents of specified double-word
data) in unsigned 32-bit binary data and create an ON execution
condition when the comparison condition is true. There are three
types of symbol comparison instructions, LD (LOAD), AND, and OR.
S1: Comparison
data 1
S2: Comparison
data 2
Symbol comparison instructions (signed) compare two values
(constants and/or the contents of specified words) in signed 16-bit
binary (4-digit hexadecimal) and create an ON execution condition
when the comparison condition is true. There are three types of
symbol comparison instructions, LD (LOAD), AND, and OR.
LD, AND, OR + =,
<>, <, <=, >, >= +
L
LD: Not
required
AND, OR:
Required
301 (=)
306 (<>)
311 (<)
316 (<=)
321 (>)
326 (>=)
Symbol
Comparison
(Signed)
LD, AND, OR + =,
<>, <, <=, >, >=
+S
302 (=)
307 (<>)
312 (<)
317 (<=)
322 (>)
327 (>=)
384
LD: Not
required
AND, OR:
Required
Section 10-5
Comparison Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
Symbol
Comparison
(Double-word,
signed)
S1: Comparison
data 1
S2: Comparison
data 2
LD, AND, OR + =,
<>, <, <=, >, >=
+SL
Symbol comparison instructions (double-word, signed) compare two
values (constants and/or the contents of specified double-word data)
in signed 32-bit binary (8-digit hexadecimal) and create an ON
execution condition when the comparison condition is true. There are
three types of symbol comparison instructions, LD (LOAD), AND, and
OR.
LD: Not
required
AND, OR:
Required
303 (=)
308 (<>)
313 (<)
318 (<=)
323 (>)
328 (>=)
COMPARE
CMP(020)
CMP
!CMP
S1
020
S2
Compares two unsigned binary values (constants and/or the contents
of specified words) and outputs the result to the Arithmetic Flags in
the Auxiliary Area.
CMPL(060)
CMPL
S1
060
S2
S1: Comparison
data 1
S2: Comparison
data 2
SIGNED BINARY
COMPARE
CPS
!CPS
CPS(114)
S1
Arithmetic Flags
(>, >=, =, <=, <, <>)
Compares two double unsigned binary values (constants and/or the
contents of specified words) and outputs the result to the Arithmetic
Flags in the Auxiliary Area.
S1+1
CPSL
TABLE
COMPARE
TCMP(085)
TCMP
@TCMP
S
085
R
T
S: Source data
T: 1st word of
table
R: Result word
Output
Required
Signed binary
comparison
Arithmetic Flags
(>, >=, =, <=, <, <>)
Compares two double signed binary values (constants and/or the
contents of specified words) and outputs the result to the Arithmetic
Flags in the Auxiliary Area.
Output
Required
Signed binary
comparison
S2
115 S : Comparison
1
data 1
S2: Comparison
data 2
S2+1
Compares two signed binary values (constants and/or the contents of
specified words) and outputs the result to the Arithmetic Flags in the
Auxiliary Area.
S1: Comparison
data 1
S2: Comparison
data 2
S1
Required
Arithmetic Flags
(>, >=, =, <=, <, <>)
S2
CPSL(115)
Output
Unsigned binary
comparison
114
DOUBLE
SIGNED BINARY
COMPARE
Required
Unsigned binary
comparison
S1: Comparison
data 1
S2: Comparison
data 2
DOUBLE
COMPARE
Output
S1+1
S2+1
Arithmetic Flags
(>, >=, =, <=, <, <>)
Compares the source data to the contents of 16 consecutive words
and turns ON the corresponding bit in the result word when the
contents of the words are equal.
R
Comparison
1: Data are
equal.
0: Data aren’t
equal.
Output
Required
385
Section 10-6
Data Movement Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
MULTIPLE
COMPARE
MCMP(019)
MCMP
@MCMP
S1
019
R
Compares 16 consecutive words with another 16 consecutive words
and turns ON the corresponding bit in the result word where the
contents of the words are not equal.
Comparison
S2
BCMP(068)
S
BCMP
@BCMP
068
0: Words
are equal.
1: Words
aren’t
equal.
Compares the source data to 16 ranges (defined by 16 lower limits
and 16 upper limits) and turns ON the corresponding bit in the result
word when the source data is within the range.
Ranges
1: In range
0: Not in range
Lower limit
Upper limit
to T+1
R
T
R
S: Source data
T: 1st word of
table
R: Result word
Required
R
S1: 1st word of
set 1
S2: 1st word of
set 2
R: Result word
UNSIGNED
BLOCK
COMPARE
Output
T
Source data
Output
Required
0
T+2
to T+3
1
T+28
T+30
to T+29
14
to T+31
15
S
10-6 Data Movement Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
MOVE
MOV(021)
MOV
@MOV
!MOV
!@MOV
Transfers a word of data to the specified word.
S
Output
Required
Source word
D
021 S: Source
D: Destination
Bit status
not changed.
Destination word
DOUBLE MOVE
MOVL
@MOVL
498
MOVL(498)
S
S
S+1
D
S: 1st source
word
D: 1st destination
word
386
Transfers two words of data to the specified words.
Bit status
not changed.
D
D+1
Output
Required
Section 10-6
Data Movement Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
MOVE NOT
MVN(022)
MVN
@MVN
022
Transfers the complement of a word of data to the specified word.
S
Output
Required
Source word
D
S: Source
D: Destination
Bit status
inverted.
Destination word
DOUBLE MOVE
NOT
MVNL
@MVNL
MVNL(499)
S
S
S+1
Output
Required
D
499 S: 1st source
word
D: 1st destination
word
MOVE BIT
Transfers the complement of two words of data to the specified words.
MOVB(082)
MOVB
@MOVB
S
082
C
Bit status
inverted.
D
D+1
Transfers the specified bit.
Output
Required
D
S: Source word or
data
C: Control word
D: Destination
word
MOVE DIGIT
MOVD(083)
MOVD
@MOVD
S
083
C
Transfers the specified digit or digits. (Each digit is made up of 4 bits.)
Output
Required
D
S: Source word or
data
C: Control word
D: Destination
word
MULTIPLE BIT
TRANSFER
XFRB(062)
XFRB
@XFRB
C
062
D
Transfers the specified number of consecutive bits.
Output
Required
S
C: Control word
S: 1st source
word
D: 1st destination
word
387
Section 10-6
Data Movement Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
BLOCK
TRANSFER
XFER(070)
XFER
@XFER
070
Transfers the specified number of consecutive words.
Output
Required
N
S
D
N words
to
to
D+(N–1)
S+(N–1)
N: Number of
words
S: 1st source
word
D: 1st destination
word
BLOCK SET
BSET(071)
BSET
@BSET
S
071
St
Copies the same word to a range of consecutive words.
Source word
Output
Required
Destination words
St
E
S: Source word
St: Starting word
E: End word
E
DATA
EXCHANGE
XCHG(073)
XCHG
@XCHG
Exchanges the contents of the two specified words.
E1
E1
Output
Required
E2
E2
073 E1: 1st exchange
word
E2: Second
exchange word
DOUBLE DATA
EXCHANGE
XCGL
@XCGL
XCGL(562)
Exchanges the contents of a pair of consecutive words with another
pair of consecutive words.
E1
E2
E1
E1+1
E2
Output
Required
E2+1
562 E1: 1st exchange
word
E2: Second
exchange word
SINGLE WORD
DISTRIBUTE
DIST(080)
Transfers the source word to a destination word calculated by adding
an offset value to the base address.
S
DIST
@DIST
Bs
080
Of
S
Bs
Output
Required
Of
S: Source word
Bs: Destination
base address
Of: Offset
Bs+n
DATA COLLECT
COLL(081)
COLL
@COLL
Bs
081
Of
Transfers the source word (calculated by adding an offset value to the
base address) to the destination word.
Bs
D
Bs: Source base
address
Of: Offset
D: Destination
word
388
Bs+n
Of
Output
Required
Section 10-7
Data Shift Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
MOVE TO
REGISTER
MOVR(560)
S
MOVR
@MOVR
D
560 S: Source
(desired word or
bit)
D: Destination
(Index Register)
Sets the PC memory address of the specified word, bit, or
timer/counter Completion Flag in the specified Index Register. (Use
MOVRW(561) to set the PC memory address of a timer/counter PV in
an Index Register.)
I/O memory address of S
Output
Required
Index Register
MOVE TIMER/
COUNTER PV
TO REGISTER
MOVRW(561)
S
D
MOVRW
@MOVRW
Sets the PC memory address of the specified timer or counter’s PV in
the specified Index Register. (Use MOVR(560) to set the PC memory
address of a word, bit, or timer/counter Completion Flag in an Index
Register.)
Output
Required
I/O memory address of S
S: Source
561 (desired TC
number)
D: Destination
(Index Register)
Timer/counter PV only
Index Register
10-7 Data Shift Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
SHIFT
REGISTER
SFT
010
Data
input
Shift
input
Reset
input
SFT(010)
Operates a shift register.
E
Output
St+1, St+2
St
E
Status of data
input for each
shift input
Lost
St: Starting word
E: End word
REVERSIBLE
SHIFT
REGISTER
SFTR
@SFTR
084
Required
St
SFTR(084)
Creates a shift register that shifts data to either the right or the left.
Required
C
St
E
St
E
St
E
C: Control word
St: Starting word
E: End word
Output
Data
input
Data input
Shift
direction
389
Section 10-7
Data Shift Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
ASYNCHRONOU
S SHIFT
REGISTER
ASFT(017)
Shifts all non-zero word data within the specified word range either
towards St or toward E, replacing 0000Hex word data.
C
ASFT
@ASFT
Output
Required
St
E
017
St
Shift direction
C: Control word
St: Starting word
E: End word
Shift enabled
Shift
Clear
Shift
E
St
Zero data
Non-zero data
E
WORD SHIFT
WSFT
@WSFT
WSFT(016)
S
St
016
Shifts data between St and E in word units.
Output
Required
St
E
Lost
E
S: Source word
St: Starting word
E: End word
ARITHMETIC
SHIFT LEFT
ASL(025)
Shifts the contents of Wd one bit to the left.
Output
Required
Wd
ASL
@ASL Wd: Word
025
DOUBLE SHIFT
LEFT
ASLL(570)
Shifts the contents of Wd and Wd +1 one bit to the left.
Wd+1
Wd
ASLL
@ASLL Wd: Word
570
ARITHMETIC
SHIFT RIGHT
ASR(026)
ASR
@ASR
Wd
Shifts the contents of Wd one bit to the right.
Output
Required
Output
Required
Wd
Wd: Word
026
DOUBLE SHIFT
RIGHT
ASRL(571)
Wd
ASRL
@ASRL Wd: Word
571
390
Shifts the contents of Wd and Wd +1 one bit to the right.
Wd+1
Wd
Output
Required
Section 10-7
Data Shift Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
ROTATE LEFT
ROL(027)
ROL
@ROL
Shifts all Wd bits one bit to the left including the Carry Flag (CY).
Output
Required
Wd
027 Wd: Word
DOUBLE
ROTATE LEFT
ROLL(572)
Wd
ROLL
@ROLL Wd: Word
572
ROTATE LEFT
WITHOUT
CARRY
RLNC(574)
Shifts all Wd and Wd +1 bits one bit to the left including the Carry Flag
(CY).
Wd+1
Wd
Output
Shifts all Wd bits one bit to the left not including the Carry Flag (CY).
Output
Wd
Required
Required
Wd
RLNC Wd: Word
@RLNC
574
DOUBLE
ROTATE LEFT
WITHOUT
CARRY
RLNL
@RLNL
RLNL(576)
Wd
Shifts all Wd and Wd +1 bits one bit to the left not including the Carry
Flag (CY).
Wd+1
Wd
Output
Shifts all Wd bits one bit to the right including the Carry Flag (CY).
Wd
Wd+1
Output
Shifts all Wd and Wd +1 bits one bit to the right including the Carry
Flag (CY).
Wd
Wd+1
Output
Shifts all Wd bits one bit to the right not including the Carry Flag (CY).
The contents of the rightmost bit of Wd shifts to the leftmost bit and to
the Carry Flag (CY).
Output
Required
Wd: Word
576
ROTATE RIGHT
ROR(028)
ROR
@ROR
Wd
Required
028 Wd: Word
DOUBLE
ROTATE RIGHT
RORL(573)
Wd
RORL
@RORL Wd: Word
573
ROTATE RIGHT
WITHOUT
CARRY
RRNC(575)
Wd
Required
Required
RRNC Wd: Word
@RRNC
Wd
575
DOUBLE
ROTATE RIGHT
WITHOUT
CARRY
RRNL
@RRNL
RRNL(577)
Wd
Wd: Word
Shifts all Wd and Wd +1 bits one bit to the right not including the Carry
Flag (CY). The contents of the rightmost bit of Wd +1 is shifted to the
leftmost bit of Wd, and to the Carry Flag (CY).
Wd+1
Wd
Output
Shifts data by one digit (4 bits) to the left.
E
Output
Required
577
ONE DIGIT
SHIFT LEFT
SLD(074)
SLD
@SLD
074
St
E
St
Required
Lost
St: Starting word
E: End word
391
Section 10-7
Data Shift Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
ONE DIGIT
SHIFT RIGHT
SRD(075)
SRD
@SRD
St
Shifts data by one digit (4 bits) to the right.
E
Output
St
Required
Lost
E
075 St: Starting word
E: End word
SHIFT N-BIT
DATA LEFT
NSFL(578)
NSFL
@NSFL
D
578
N
Shifts the specified number of bits to the left.
Output
Required
C
D: Beginning
word for shift
C: Beginning bit
N: Shift data
length
N–1 bit
Shifts one bit to the left
N–1 bit
SHIFT N-BIT
DATA RIGHT
NSFR(579)
NSFR
@NSFR
D
579
N
Shifts the specified number of bits to the right.
Required
C
D: Beginning
word for shift
C: Beginning bit
N: Shift data
length
SHIFT N-BITS
LEFT
NASL
@NASL
Output
NASL(580)
N–1 bit
Shifts one bit to the right
N–1 bit
Shifts the specified 16 bits of word data to the left by the specified
number of bits.
D
C
580 D: Shift word
C: Control word
Output
Required
Shift n-bits
Contents of “a” or “0”
shifted in
Lost
N bits
DOUBLE SHIFT
N-BITS LEFT
NSLL
@NSLL
582
NSLL(582)
Shifts the specified 32 bits of word data to the left by the specified
number of bits.
D
C
Shift n-bits
D: Shift word
C: Control word
Contents of
“a” or “0”
shifted in
Lost
N bits
392
Output
Required
Section 10-8
Increment/Decrement Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
SHIFT N-BITS
RIGHT
NASR(581)
D
NASR
@NASR
581
Shifts the specified 16 bits of word data to the right by the specified
number of bits.
Output
Required
C
D: Shift word
C: Control word
Contents of “a” or
“0” shifted in
Lost
N bits
DOUBLE SHIFT
N-BITS RIGHT
NSRL(583)
D
NSRL
@NSRL
583
Shifts the specified 32 bits of word data to the right by the specified
number of bits.
Required
Shift n-bits
C
D: Shift word
C: Control word
Output
Contents of
“a” or “0”
shifted in
Lost
10-8 Increment/Decrement Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
INCREMENT
BINARY
++(590)
Increments the 4-digit hexadecimal content of the specified word by 1.
Wd
Wd
++
@++ Wd: Word
590
DOUBLE
INCREMENT
BINARY
++L(591)
Wd
Required
Wd
Increments the 8-digit hexadecimal content of the specified words by 1.
Wd+1
Wd
Wd+1
Output
Wd
Output
Required
++L Wd: Word
@++L
591
DECREMENT
BINARY
– –(592)
Decrements the 4-digit hexadecimal content of the specified word by 1.
Required
Wd
––
@– – Wd: Word
592
DOUBLE
DECREMENT
BINARY
– –L(593)
Wd
Output
Wd
Wd
Decrements the 8-digit hexadecimal content of the specified words by 1.
Output
Required
Wd+1
Wd
Wd+1
Wd
– –L Wd: 1st word
@– –L
593
INCREMENT
BCD
++B(594)
Increments the 4-digit BCD content of the specified word by 1.
Wd
++B
@++B Wd: Word
594
DOUBLE
INCREMENT
BCD
++BL(595)
Wd
Wd
Output
Required
Wd
Increments the 8-digit BCD content of the specified words by 1.
Output
Required
Wd+1
Wd
Wd+1
Wd
++BL Wd: 1st word
@++BL
595
393
Section 10-9
Symbol Math Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
DECREMENT
BCD
– –B(596)
Decrements the 4-digit BCD content of the specified word by 1.
Required
Wd
– –B
@– –B Wd: Word
596
DOUBLE
DECREMENT
BCD
– –BL(597)
Wd
Output
Wd
Wd
–1
Decrements the 8-digit BCD content of the specified words by 1.
Output
Required
Wd+1
Wd
Wd+1
Wd
– –BL Wd: 1st word
@– –BL
597
10-9 Symbol Math Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
SIGNED BINARY
ADD WITHOUT
CARRY
+
@+
400
+(400)
+L
@+L
Ad
R
+L(401)
+C
@+C
402
+CL
@+CL
R
+C(402)
Au
+
Ad
(Signed binary)
CY
R
(Signed binary)
Au+1
Au
(Signed binary)
+
Ad+1
Ad
(Signed binary)
CY will turn
ON when
there is a
carry.
CY
R+1
R
(Signed binary)
Adds 4-digit (single-word) hexadecimal data and/or constants with the Carry
Flag (CY).
Au
(Signed binary)
Ad
Ad
Output
Required
Output
Required
Output
Required
(Signed binary)
R
+CL(403)
Au
CY
+
CY will turn
ON when there
is a carry.
CY
(Signed binary)
R
Adds 8-digit (double-word) hexadecimal data and/or constants with the Carry
Flag (CY).
Au+1
Au
(Signed binary)
Ad
Ad+1
Ad
(Signed binary)
R
403 Au: 1st augend
word
Ad: 1st addend
word
R: 1st result word
394
(Signed binary)
Adds 8-digit (double-word) hexadecimal data and/or constants.
Ad
Au: Augend word
Ad: Addend word
R: Result word
DOUBLE
SIGNED BINARY
ADD WITH
CARRY
CY will turn
ON when there
is a carry.
Au
401 Au: 1st augend
word
Ad: 1st addend
word
R: 1st result word
SIGNED BINARY
ADD WITH
CARRY
Au
Au
Au: Augend word
Ad: Addend word
R: Result word
DOUBLE
SIGNED BINARY
ADD WITHOUT
CARRY
Adds 4-digit (single-word) hexadecimal data and/or constants.
CY
+
CY will turn
ON when there
is a carry.
CY
R+1
R
(Signed binary)
Output
Required
Section 10-9
Symbol Math Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
BCD ADD
WITHOUT
CARRY
+B(404)
Adds 4-digit (single-word) BCD data and/or constants.
Au
Au
+B
@+B
404
R
DOUBLE BCD
ADD WITHOUT
CARRY
+BL
@+BL
405
+BL(405)
+BC
@+BC
406
+BCL
@+BCL
407
–
@–
+BC(406)
Au
–L
@–L
R
(BCD)
Output
Au +1
Au
(BCD)
+
Ad+1
Ad
(BCD)
CY will turn
ON when there
is a carry.
CY
R+1
R
(BCD)
Adds 4-digit (single-word) BCD data and/or constants with the Carry Flag
(CY).
Au
(BCD)
Ad
Required
Ad
Output
Required
(BCD)
R
+BCL(407)
Au
CY
+
CY will turn
ON when there
is a carry.
CY
(BCD)
R
Adds 8-digit (double-word) BCD data and/or constants with the Carry Flag
(CY).
Au +1
Au
(BCD)
Ad
Ad+1
Ad
Output
Required
(BCD)
R
–(410)
CY
+
CY will turn
ON when there
is a carry.
CY
R+1
R
(BCD)
Subtracts 4-digit (single-word) hexadecimal data and/or constants.
Mi
(Signed binary)
–
Su
(Signed binary)
CY
R
(Signed binary)
Mi
Su
Output
Required
R
410 Mi: Minuend word
Su: Subtrahend
word
R: Result word
DOUBLE
SIGNED BINARY
SUBTRACT
WITHOUT
CARRY
CY
R
Au: 1st augend
word
Ad: 1st addend
word
R: 1st result word
SIGNED BINARY
SUBTRACT
WITHOUT
CARRY
(BCD)
Adds 8-digit (double-word) BCD data and/or constants.
Ad
Au: Augend word
Ad: Addend word
R: Result word
DOUBLE BCD
ADD WITH
CARRY
Ad
Au
Au: 1st augend
word
Ad: 1st addend
word
R: 1st result word
BCD ADD WITH
CARRY
CY will turn
ON when there
is a carry.
Required
(BCD)
+
Ad
Au: Augend word
Ad: Addend word
R: Result word
Output
–L(411)
CY will turn ON
when there is a
borrow.
Subtracts 8-digit (double-word) hexadecimal data and/or constants.
Mi
Su
R
Mi: Minuend word
411 Su: Subtrahend
word
R: Result word
CY will turn
ON when
there is a
borrow.
Output
Required
Mi+1
Mi
(Signed binary)
–
Su+1
Su
(Signed binary)
CY
R+1
R
(Signed binary)
395
Section 10-9
Symbol Math Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
SIGNED BINARY
SUBTRACT
WITH CARRY
–C(412)
Mi
–C
@–C
Su
412
R
Mi: Minuend word
Su: Subtrahend
word
R: Result word
DOUBLE
SIGNED BINARY
WITH CARRY
–CL(413)
Su
413
R
Mi: Minuend word
Su: Subtrahend
word
R: Result word
–B(414)
Su
414
R
Mi: Minuend word
Su: Subtrahend
word
R: Result word
–BL
@–BL
–BL(415)
–BC
@–BC
416
CY will turn
ON when
there is a
borrow.
–BC(416)
Mi
(Signed binary)
R
Mi+1
Mi
(Signed binary)
Su+1
Su
(Signed binary)
CY
R+1
R
Mi
CY will turn
ON when there
is a carry.
–
Su
(BCD)
CY
R
(BCD)
Mi
(BCD)
–
Su+1
Su
(BCD)
CY
R+1
R
(BCD)
Subtracts 4-digit (single-word) BCD data and/or constants with the Carry Flag
(CY).
Mi
(BCD)
Su
(BCD)
R
–
CY
CY
R
(BCD)
Output
Required
Mi +1
Su
Output
Required
(BCD)
Subtracts 8-digit (double-word) BCD data and/or constants.
CY will turn
ON when there
is a borrow.
Required
(Signed binary)
Subtracts 4-digit (single-word) BCD data and/or constants.
CY will turn
ON when there
is a borrow.
Output
CY
–
R
Required
(Signed binary)
Subtracts 8-digit (double-word) hexadecimal data and/or constants with the
Carry Flag (CY).
Su
Mi: Minuend word
Su: Subtrahend
word
R: Result word
396
CY
Mi
415 Mi: 1st minuend
word
Su: 1st
subtrahend word
R: 1st result word
BCD SUBTRACT
WITH CARRY
CY will turn
ON when there
is a borrow.
Output
CY
–
Mi
–B
@–B
DOUBLE BCD
SUBTRACT
WITHOUT
CARRY
Su
Mi
–CL
@–CL
BCD SUBTRACT
WITHOUT
CARRY
Subtracts 4-digit (single-word) hexadecimal data and/or constants with the
Carry Flag (CY).
Mi
(Signed binary)
Output
Required
Section 10-9
Symbol Math Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
DOUBLE BCD
SUBTRACT
WITH CARRY
–BCL
@–BCL
417
–BCL(417)
Mi
Su
*
@*
420
Su+1
*(420)
–
CY will turn
ON when there
is a borrow.
Mr
421
R
Md: 1st
multiplicand word
Mr: 1st multiplier
word
R: 1st result word
*U(422)
422
*UL
@*UL
(BCD)
×
Mr
(Signed binary)
R +1
R
(Signed binary)
Multiplies 8-digit signed hexadecimal data and/or constants.
×
Md + 1
Md
Mr + 1
Mr
R+3
R+2
R+1
R
(Signed binary)
(Unsigned binary)
×
Mr
(Unsigned binary)
R +1
R
(Unsigned binary)
*UL(423)
Multiplies 8-digit unsigned hexadecimal data and/or constants.
Md
Md + 1
Md
Mr + 1
Mr
R+1
R
423 Md: 1st
multiplicand word
Mr: 1st multiplier
word
R: 1st result word
Output
Required
Md
R
R
Required
(Signed binary)
Multiplies 4-digit unsigned hexadecimal data and/or constants.
Mr
Mr
Output
(Signed binary)
Md: Multiplicand
word
Mr: Multiplier
word
R: Result word
DOUBLE
UNSIGNED
BINARY
MULTIPLY
R
(Signed binary)
Md
*U
@*U
R+1
Md
Md
*L
@*L
UNSIGNED
BINARY
MULTIPLY
CY
R
*L(421)
Required
CY
Md
Mr
Output
(BCD)
Multiplies 4-digit signed hexadecimal data and/or constants.
Md: Multiplicand
word
Mr: Multiplier
word
R: Result word
DOUBLE
SIGNED BINARY
MULTIPLY
Su
R
Mi: 1st minuend
word
Su: 1st
subtrahend word
R: 1st result word
SIGNED BINARY
MULTIPLY
Subtracts 8-digit (double-word) BCD data and/or constants with the Carry
Flag (CY).
Mi +1
Mi
(BCD)
×
R+3
R+2
Output
Required
Output
Required
(Unsigned binary)
(Unsigned binary)
(Unsigned binary)
397
Section 10-9
Symbol Math Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
BCD MULTIPLY
*B(424)
*B
@*B
Md
424
Mr
Multiplies 4-digit (single-word) BCD data and/or constants.
Md
(BCD)
×
Mr
(BCD)
R +1
R
(BCD)
R
Md: Multiplicand
word
Mr: Multiplier
word
R: Result word
DOUBLE BCD
MULTIPLY
*BL(425)
*BL
@*BL
425
SIGNED BINARY
DIVIDE
/
@/
430
×
R
/(430)
R+3
/L(431)
R+1
R
/U(432)
R
(BCD)
Dd
(Signed binary)
÷
Dr
(Signed binary)
R +1
R
(Signed binary)
Remainder
÷
Dd + 1
Dd
Dr + 1
Dr
Output
Required
(Signed binary)
R+3
R+2
R+1
Remainder
R
(Signed binary)
Quotient
Divides 4-digit (single-word) unsigned hexadecimal data and/or constants.
Output
Required
Dd
(Unsigned binary)
÷
Dr
(Unsigned binary)
R +1
R
(Unsigned binary)
Dr
Dd: Dividend
word
Dr: Divisor word
R: Result word
Required
(Signed binary)
Dd
R
Output
Quotient
Divides 8-digit (double-word) signed hexadecimal data and/or constants.
Dd
Dd: 1st dividend
word
Dr: 1st divisor
word
R: 1st result word
398
Mr
Required
(BCD)
Divides 4-digit (single-word) signed hexadecimal data and/or constants.
R
431
432
R+2
Dr
Dr
/U
@/U
Mr + 1
Dd
/L
@/L
UNSIGNED
BINARY DIVIDE
Md
Output
(BCD)
Dd: Dividend
word
Dr: Divisor word
R: Result word
DOUBLE
SIGNED BINARY
DIVIDE
Md + 1
Mr
Md: 1st
multiplicand word
Mr: 1st multiplier
word
R: 1st result word
Required
Multiplies 8-digit (double-word) BCD data and/or constants.
Md
Output
Remainder
Quotient
Section 10-10
Conversion Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
DOUBLE
UNSIGNED
BINARY DIVIDE
/UL
@/UL
433
/UL(433)
Dd
Dd + 1
Dd
Dr + 1
Dr
R+1
R
R
/B(434)
/B
@/B
Dd
434
Dr
÷
R+3
R+2
Remainder
435
/BL(435)
(Unsigned binary)
(Unsigned binary)
Divides 4-digit (single-word) BCD data and/or constants.
Dd: Dividend
word
Dr: Divisor word
R: Result word
/BL
@/BL
Required
(Unsigned binary)
Quotient
Dd
(BCD)
÷
Dr
(BCD)
R +1
R
(BCD)
Remainder
Quotient
R
DOUBLE BCD
DIVIDE
Output
Dr
Dd: 1st dividend
word
Dr: 1st divisor
word
R: 1st result word
BCD DIVIDE
Divides 8-digit (double-word) unsigned hexadecimal data and/or constants.
Dd + 1
Dd
Dd: 1st dividend
word
Dr: 1st divisor
word
R: 1st result word
÷
Dr + 1
Dr
Output
Required
(BCD)
Dr
R
Required
Divides 8-digit (double-word) BCD data and/or constants.
Dd
Output
(BCD)
R+3
R+2
R+1
Remainder
R
(BCD)
Quotient
10-10 Conversion Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
BCD-TO-BINARY
BIN
@BIN
023
BIN(023)
S
Converts BCD data to binary data.
(BCD)
Output
R
(BIN)
Required
R
S: Source word
R: Result word
DOUBLE
BCD-TO-DOUBL
E BINARY
BINL
@BINL
BINL(058)
Converts 8-digit BCD data to 8-digit hexadecimal (32-bit binary) data.
S
(BCD)
R
(BIN)
R
(BCD)
R+1
(BIN)
Output
Required
S: 1st source
058 word
R: 1st result word
BINARY-TO-BCD
BCD(024)
BCD
@BCD
S
024
R
Converts a word of binary data to a word of BCD data.
(BIN)
R
(BCD)
Output
Required
S: Source word
R: Result word
399
Section 10-10
Conversion Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
DOUBLE
BINARY-TO-DOU
BLE BCD
BCDL
@BCDL
BCDL(059)
Converts 8-digit hexadecimal (32-bit binary) data to 8-digit BCD data.
S
(BIN)
R
(BCD)
R
(BIN)
R+1
(BCD)
Output
Required
S: 1st source
059 word
R: 1st result word
2’S
COMPLEMENT
NEG
@NEG
160
DOUBLE 2’S
COMPLEMENT
NEGL
@NEGL
NEG(160)
Calculates the 2’s complement of a word of hexadecimal data.
2’s complement
(Complement + 1)
(R)
(S)
S
R
Output
Required
S: Source word
R: Result word
NEGL(161)
Calculates the 2’s complement of two words of hexadecimal data.
S
R
(S+1, S)
Output
Required
2’s complement
(Complement + 1)
(R+1, R)
161
S: 1st source
word
R: 1st result word
16-BIT TO 32-BIT
SIGNED BINARY
SIGN
@SIGN
SIGN(600)
Expands a 16-bit signed binary value to its 32-bit equivalent.
R
600
S: Source word
R: 1st result word
Required
MSB
S
S
MSB = 0:
0000 Hex
MSB = 1:
FFFF Hex
D+1
D
D = Contents of S
400
Output
Section 10-10
Conversion Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
DATA DECODER
MLPX(076)
MLPX
@MLPX
S
076
C
Reads the numerical value in the specified digit (or byte) in the source word,
turns ON the corresponding bit in the result word (or 16-word range), and
turns OFF all other bits in the result word (or 16-word range).
4-to-16 bit conversion
R
Output
Required
C
ȏ=1 (Convert 2 digits.)
S: Source word
C: Control word
R: 1st result word
n=2 (Start with second digit.)
4-to-16 bit decoding
(Bit m of R is turned ON.)
R
R+1
8-to-256 bit conversion
C
ȏ=1 (Convert 2 bytes.)
n=1 (Start with first byte.)
8-to-256 bit decoding
(Bit m of R to R+15 is turned ON.)
R+1
R+14
R+15
R+16
R+17
R+30
R+31
Two 16-word ranges
are used when ȏ
specifies 2 bytes.
401
Section 10-10
Conversion Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
DATA ENCODER
DMPX(077)
DMPX
@DMPX
S
077
R
FInds the location of the first or last ON bit within the source word (or 16-word
range), and writes that value to the specified digit (or byte) in the result word.
16-to-4 bit conversion
Output
Required
C
FInds leftmost bit
(Highest bit address)
C
ȏ=1 (Convert
2 words.)
S: 1st source
word
R: Result word
C: Control word
16-to-4 bit decoding
(Location of leftmost bit (m) is written to R.)
Leftmost bit
Rightmost bit
n=2 (Start with digit 2.)
R
256-to-8 bit conversion
C
ȏ=0 (Convert one 16-word range.)
Leftmost bit Rightmost bit
Finds leftmost bit
(Highest bit address)
256-to-8 bit decoding
(The location of the leftmost bit in the
16-word range (m) is written to R.)
n=1 (Start with byte 1.)
R
ASCII CONVERT
ASC(086)
ASC
@ASC
S
086
Di
Converts 4-bit hexadecimal digits in the source word into their 8-bit ASCII
equivalents.
Di
First digit to convert
D
S: Source word
Di: Digit
designator
D: 1st destination
word
Number of
digits (n+1)
Left (1)
402
Right (0)
Output
Required
Section 10-10
Conversion Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
ASCII TO HEX
HEX(162)
HEX
@HEX
S
162
Di
Converts up to 4 bytes of ASCII data in the source word to their hexadecimal
equivalents and writes these digits in the specified destination word.
Output
Required
C: 0021
Di
D
First byte to convert
S: 1st source
word
Di: Digit
designator
D: Destination
word
Left (1)
Right (0)
Number of digits (n+1)
First digit to write
COLUMN TO
LINE
LINE(063)
Converts a column of bits from a 16-word range (the same bit number in 16
consecutive words) to the 16 bits of the destination word.
S
LINE
@LINE
N
063
D
S: 1st source
word
N: Bit number
D: Destination
word
N
Bit
15
S
S+1
S+2
S+3
.
.
.
0 0 0 1 1 1 1 0 0 0 1 0 0 0 0 1
S+15
0 1 1 0 0 0 0 1 1 0 0 0 1 0 1 0
1 1 0 1 0 0 1 0 0 1 1 1 0 0 0 1
0 0 0 1 1 0 1 1 0 0 1 0 0 1 1 1
1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1
.
.
.
.
.
.
.
.
.
D
COLM(064)
Bit
00
. . .
0
0 1 1 1
Converts the 16 bits of the source word to a column of bits in a 16-word range
of destination words (the same bit number in 16 consecutive words).
S
COLM
@COLM
D
064
N
S: Source word
D: 1st destination
word
N: Bit number
Required
Bit
00
Bit
15
LINE TO
COLUMN
Output
Bit
15
S
0
Output
Required
Bit
00
.
.
.
.
.
.
.
0 1 1 1
Bi
Bit
15
Bit
00
D
D+1
D+2
D+3
.
.
.
0 0 0 0 1 1 1 0 0 0 1 0 0 0 0 1
D+15
0 1 1 1 0 0 0 1 1 0 0 0 1 0 1 0
1 1 0 1 0 0 1 0 0 1 1 1 0 0 0 1
0 0 0 1 1 0 1 1 0 0 1 0 0 1 1 1
1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1
.
.
.
.
.
.
.
.
.
403
Section 10-10
Conversion Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
SIGNED
BCD-TO-BINARY
BINS(470)
BINS
@BINS
C
470
D
BISL
@BISL
472
BISL(472)
Signed BCD format
specified in C
Signed BCD
Signed binary
Converts double signed BCD data to double signed binary data.
Output
Required
C
Signed BCD format
specified in C
S
D
C: Control word
S: 1st source
word
D: 1st destination
word
SIGNED
BINARY-TO-BCD
Output
Required
S
C: Control word
S: Source word
D: Destination
word
DOUBLE
SIGNED
BCD-TO-BINARY
Converts one word of signed BCD data to one word of signed binary data.
BCDS(471)
BCDS
@BCDS
C
471
D
Signed BCD
Signed BCD
Signed binary
Signed binary
Converts one word of signed binary data to one word of signed BCD data.
Output
Required
S
Signed BCD format
specified in C
Signed binary
Signed BCD
C: Control word
S: Source word
D: Destination
word
DOUBLE
SIGNED
BINARY-TO-BCD
BDSL
@BDSL
473
BDSL(473)
Output
Required
C
S
Signed BCD format
specified in C
D
C: Control word
S: 1st source
word
D: 1st destination
word
404
Converts double signed binary data to double signed BCD data.
Signed binary
Signed binary
Signed BCD
Signed BCD
Section 10-11
Logic Instructions
10-11 Logic Instructions
Instruction
Symbol/Operand
Function
Mnemonic
Execution
condition
Code
LOGICAL AND
ANDW(034)
ANDW
@ANDW
I1
034
I2
R
I1: Input 1
I2: Input 2
R: Result word
DOUBLE
LOGICAL AND
ANDL
@ANDL
610
ANDL(610)
I1
I2
R
I1: Input 1
I2: Input 2
R: Result word
LOGICAL OR
ORW(035)
ORW
@ORW
I1
035
I2
R
I1: Input 1
I2: Input 2
R: Result word
DOUBLE
LOGICAL OR
ORWL(611)
ORWL
@ORWL
611
I1
I2
R
I1: Input 1
I2: Input 2
R: Result word
EXCLUSIVE OR
Location
XORW(036)
XORW
@XORW
I1
036
I2
R
I1: Input 1
I2: Input 2
R: Result word
Takes the logical AND of corresponding bits in single words of word data
and/or constants.
Output
Required
I1. I2 → R
I1
I2
R
1
1
1
1
0
0
0
1
0
0
0
0
Takes the logical AND of corresponding bits in double words of word data
and/or constants.
Output
Required
(I1, I1+1). (I2, I2+1) → (R, R+1)
I1, I1+1
I2, I2+1
R, R+1
1
1
1
1
0
0
0
1
0
0
0
0
Takes the logical OR of corresponding bits in single words of word data and/or
constants.
Output
Required
I1 + I2 → R
I1
I2
R
1
1
1
1
0
1
0
1
1
0
0
0
Takes the logical OR of corresponding bits in double words of word data
and/or constants.
Output
Required
(I1, I1+1) + (I2, I2+1) → (R, R+1)
I1, I1+1
I2, I2+1
R, R+1
1
1
1
1
0
1
0
1
1
0
0
0
Takes the logical exclusive OR of corresponding bits in single words of word
data and/or constants.
Output
Required
I1. I2 + I1.I2 → R
I1
I2
R
1
1
0
1
0
1
0
1
1
0
0
0
405
Section 10-11
Logic Instructions
Instruction
Symbol/Operand
Function
Mnemonic
Execution
condition
Code
DOUBLE
EXCLUSIVE OR
XORL(612)
I1
XORL
@XORL
I2
612
R
I1: Input 1
I2: Input 2
R: Result word
EXCLUSIVE
NOR
XNRW(037)
I1
XNRW
@XNRW
I2
037
R
I1: Input 1
I2: Input 2
R: Result word
DOUBLE
EXCLUSIVE
NOR
XNRL(613)
I1
XNRL
@XNRL
I2
613
R
I1: Input 1
I2: Input 2
R: 1st result word
COMPLEMENT
COM
@COM
Location
COM(029)
Wd
Takes the logical exclusive OR of corresponding bits in double words of word
data and/or constants.
Output
Required
(I1, I1+1). (I2, I2+1) + (I1, I1+1). (I2, I2+1)→ (R, R+1)
I1, I1+1
I2, I2+1
R, R+1
1
1
0
1
0
1
0
1
1
0
0
0
Takes the logical exclusive NOR of corresponding single words of word data
and/or constants.
Output
Required
I1. I2 + I1.I2 → R
I1
I2
R
1
1
1
1
0
0
0
1
0
0
0
1
Takes the logical exclusive NOR of corresponding bits in double words of
word data and/or constants.
Output
Required
(I1, I1+1). (I2, I2+1) + (I1, I1+1). (I2, I2+1) → (R, R+1)
I1, I1+1
I2, I2+1
R, R+1
1
1
1
1
0
0
0
1
0
0
0
1
Turns OFF all ON bits and turns ON all OFF bits in Wd.
Output
Wd→Wd: 1 → 0 and 0 → 1
Required
Turns OFF all ON bits and turns ON all OFF bits in Wd and Wd+1.
Output
029 Wd: Word
DOUBLE
COMPLEMENT
COML(614)
Wd
COML
@COML Wd: Word
614
406
(Wd+1, Wd)→(Wd+1, Wd)
Required
Section 10-12
Special Math Instructions
10-12 Special Math Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
BINARY ROOT
ROTB(620)
ROTB
@ROTB
S
620
R
Computes the square root of the 32-bit binary content of the specified words
and outputs the integer portion of the result to the specified result word.
S+1
S: 1st source
word
R: Result word
BCD SQUARE
ROOT
ROOT
@ROOT
ROOT(072)
R
Binary data (32 bits)
S: 1st source
word
R: Result word
APR(069)
APR
@APR
069
Binary data (16 bits)
Computes the square root of an 8-digit BCD number and outputs the integer
portion of the result to the specified result word.
S+1
C
Required
R
S
072
ARITHMETIC
PROCESS
S
Output
S
Output
Required
R
BCD data (8 digits)
BCD data (4 digits)
Calculates the sine, cosine, or a linear extrapolation of the source data.
The linear extrapolation function allows any relationship between X and Y to
be approximated with line segments.
Output
Divides one 7-digit floating-point number by another. The floating-point
numbers are expressed in scientific notation (7-digit mantissa and 1-digit
exponent).
Quotient
Output
Required
S
R
C: Control word
S: Source data
R: Result word
FLOATING
POINT DIVIDE
FDIV
@FDIV
079
FDIV(079)
Dd
Dr
R
Dd: 1st dividend
word
Dr: 1st divisor
word
R: 1st result word
BIT COUNTER
BCNT(067)
BCNT
@BCNT
N
067
S
R
N: Number of
words
S: 1st source
word
R: Result word
Dr+1
Dr
R+1
R
Dd+1
Dd
Counts the total number of ON bits in the specified word(s).
Required
Output
Required
N words
to
Counts the number
of ON bits.
S+(N–1)
Binary result
R
407
Section 10-13
Floating-point Math Instructions
10-13 Floating-point Math Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
FLOATING TO
16-BIT
FIX
@FIX
FIX(450)
Converts a 32-bit floating-point value to 16-bit signed binary data and places
the result in the specified result word.
S
S+1
R
S
Floating-point data
(32 bits)
R
Signed binary data
(16 bits)
Output
Required
450
S: 1st source
word
R: Result word
FLOATING TO
32-BIT
FIXL
@FIXL
FIXL(451)
Converts a 32-bit floating-point value to 32-bit signed binary data and places
the result in the specified result words.
S
R
451 S: 1st source
word
R: 1st result word
16-BIT TO
FLOATING
FLT(452)
FLT
@FLT
S+1
S
Floating-point data
(32 bits)
R+1
R
Signed binary data
(32 bits)
Converts a 16-bit signed binary value to 32-bit floating-point data and places
the result in the specified result words.
S
R
S
Signed binary data
(16 bits)
R
Floating-point data
(32 bits)
452
S: Source word
R: 1st result word
32-BIT TO
FLOATING
FLTL(453)
FLTL
@FLTL
R+1
Converts a 32-bit signed binary value to 32-bit floating-point data and places
the result in the specified result words.
S
R
S+1
S
Signed binary data
(32 bits)
R+1
R
Floating-point data
(32 bits)
453
S: 1st source
word
R: 1st result word
FLOATING-POIN
T ADD
+F
@+F
454
+F(454)
Au
Ad
R
Au: 1st augend
word
AD: 1st addend
word
R: 1st result word
FLOATING-POIN
T SUBTRACT
–F
@–F
455
–F(455)
+
Au+1
Au
Augend (floating-point
data, 32 bits)
Ad+1
Ad
Addend (floating-point
data, 32 bits)
R+1
R
Result (floating-point
data, 32 bits)
Subtracts one 32-bit floating-point number from another and places the result
in the specified result words.
Mi
Su
R
Mi: 1st Minuend
word
Su: 1st
Subtrahend word
R: 1st result word
408
Adds two 32-bit floating-point numbers and places the result in the specified
result words.
–
Mi+1
Mi
Minuend (floatingpoint data, 32 bits)
Su+1
Su
Subtrahend (floatingpoint data, 32 bits)
R+1
R
Result (floatingpoint data, 32 bits)
Output
Required
Output
Required
Output
Required
Output
Required
Output
Required
Section 10-13
Floating-point Math Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
FLOATINGPOINT DIVIDE
/F
@/F
457
/F(457)
Divides one 32-bit floating-point number by another and places the result in
the specified result words.
Dd
R
*F(456)
÷
*F
@*F
Mr
456
R
×
Md: 1st
Multiplicand word
Mr: 1st Multiplier
word
R: 1st result word
RAD
@RAD
Dr+1
Dr
Divisor (floatingpoint data, 32 bits)
R+1
R
Result (floatingpoint data, 32 bits)
Multiplies two 32-bit floating-point numbers and places the result in the
specified result words.
Md
DEGREES TO
RADIANS
Dividend (floatingpoint data, 32 bits)
Dr
Dd: 1st Dividend
word
Dr: 1st Divisor
word
R: 1st result word
FLOATINGPOINT
MULTIPLY
Dd+1
Dd
RAD(458)
S
Md+1
Md
Multiplicand (floatingpoint data, 32 bits)
Mr+1
Mr
Multiplier (floatingpoint data, 32 bits)
R+1
R
Result (floatingpoint data, 32 bits)
Converts a 32-bit floating-point number from degrees to radians and places
the result in the specified result words.
R
S+1
S
Source (degrees, 32-bit
floating-point data)
R+1
R
Result (radians, 32-bit
floating-point data)
458
S: 1st source
word
R: 1st result word
RADIANS TO
DEGREES
DEG(459)
DEG
@DEG
Converts a 32-bit floating-point number from radians to degrees and places
the result in the specified result words.
S
R
459 S: 1st source
word
R: 1st result word
SINE
SIN
@SIN
460
SIN(460)
COS
@COS
461
S
Source (radians, 32-bit
floating-point data)
R+1
R
Result (degrees, 32-bit
floating-point data)
Calculates the sine of a 32-bit floating-point number (in radians) and places
the result in the specified result words.
S
R
SIN
S: 1st source
word
R: 1st result word
COSINE
S+1
COS(461)
S
R
S: 1st source
word
R: 1st result word
S+1
S
Source (32-bit
floating-point
data)
R+1
R
Result (32-bit
floating-point
data)
Calculates the cosine of a 32-bit floating-point number (in radians) and places
the result in the specified result words.
COS
S+1
S
R+1
R
Source (32-bit
floating-point
data)
Output
Required
Output
Required
Output
Required
Output
Required
Output
Required
Output
Required
Result (32-bit
floating-point
data)
409
Section 10-13
Floating-point Math Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
TANGENT
TAN
@TAN
462
TAN(462)
Calculates the tangent of a 32-bit floating-point number (in radians) and
places the result in the specified result words.
S
R
TAN
S: 1st source
word
R: 1st result word
ARC SINE
ASIN
@ASIN
463
ASIN(463)
S
R
S: 1st source
word
R: 1st result word
ARC COSINE
ACOS(464)
ACOS
@ACOS
464
S
R
S: 1st source
word
R: 1st result word
ARC TANGENT
ATAN(465)
ATAN
@ATAN
S
465
R
S: 1st source
word
R: 1st result word
SQUARE ROOT
SQRT
@SQRT
466
SQRT(466)
R+1
R
SIN–1
S+1
S
R+1
R
COS–1
S+1
S
R+1
R
TAN–1
S+1
S
R+1
R
EXP(467)
S
467
R
S
R+1
R
e
R+1
R
Required
Result (32-bit
floating-point
data)
Output
Required
Source (32-bit
floating-point
data)
Result (32-bit
floating-point
data)
Output
Required
Source (32-bit
floating-point
data)
Result (32-bit
floating-point
data)
Source (32-bit
floating-point
data)
S
Output
Source (32-bit
floating-point
data)
Calculates the natural (base e) exponential of a 32-bit floating-point number
and places the result in the specified result words.
S+1
Required
Result (32-bit
floating-point
data)
Calculates the square root of a 32-bit floating-point number and places the
result in the specified result words.
S+1
Output
Source (32-bit
floating-point
data)
Calculates the arc tangent of a 32-bit floating-point number and places the
result in the specified result words. (The arc tangent function is the inverse of
the tangent function; it returns the angle that produces a given tangent value.)
R
EXP
@EXP
Result (32-bit
floating-point
data)
Calculates the arc cosine of a 32-bit floating-point number and places the
result in the specified result words. (The arc cosine function is the inverse of
the cosine function; it returns the angle that produces a given cosine value
between –1 and 1.)
S
S: 1st source
word
R: 1st result word
410
S
Required
Source (32-bit
floating-point
data)
Calculates the arc sine of a 32-bit floating-point number and places the result
in the specified result words. (The arc sine function is the inverse of the sine
function; it returns the angle that produces a given sine value between –1 and
1.)
S: 1st source
word
R: 1st result word
EXPONENT
S+1
Output
Result (32-bit
floating-point
data)
Output
Required
Section 10-14
Table Data Processing Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
LOGARITHM
LOG
@LOG
468
LOG(468)
Calculates the natural (base e) logarithm of a 32-bit floating-point number and
places the result in the specified result words.
S
R
loge
S: 1st source
word
R: 1st result word
EXPONENTIAL
POWER
PWR
@PWR
840
PWR(840)
S+1
S
R+1
R
Required
Source (32-bit
floating-point
data)
Result (32-bit
floating-point
data)
Raises a 32-bit floating-point number to the power of another 32-bit
floating-point number.
B
Output
Required
Power
E+1
E
R
Output
B+1
E
S
R+1
B: 1st base word
E: 1st exponent
word
R: 1st result word
R
Base
10-14 Table Data Processing Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
SET STACK
SSET(630)
SSET
@SSET
630
TB
N
Defines a stack of the specified length beginning at the specified word and
initializes the words in the data region to all zeroes.
PC memory
address
TB
TB: 1st stack
address
N: Number of
words
TB+1
Required
m+(N–1)
N words
in stack
TB+2
Last word
in stack
Output
TB+3
Stack
pointer
m+(N–1)
PUSH ONTO
STACK
PUSH(632)
PUSH
@PUSH
TB
S
632
TB: 1st stack
address
S: Source word
Writes one word of data to the specified stack.
PC memory
address
Required
TB
TB
TB+1
TB+1
TB+2
TB+2
TB+3
Output
PC memory
address
PUSH(632)
TB+3
411
Section 10-14
Table Data Processing Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
FIRST IN FIRST
OUT
FIFO
@FIFO
FIFO(633)
TB
D
633
TB: 1st stack
address
D: Destination
word
Reads the first word of data written to the specified stack (the oldest data in the
stack).
PC memory
PC memory
address
address
TB
TB
Oldest
TB+1
data
Stack TB+1
TB+2
pointer TB+2
m–1
TB+3
Output
Required
TB+3
Stack
pointer
m–1
First-in first-out
LAST IN FIRST
OUT
LIFO
@LIFO
LIFO(634)
TB
D
634 TB: 1st stack
address
D: Destination
word
Reads the last word of data written to the specified stack (the newest data in the
stack).
PC memory
address
Stack
pointer
TB
TB+1
Newest
data
TB+2
TB+3
Output
Required
PC memory
address
TB
TB+1
TB+2
m–1
TB+3
Stack
pointer
m–1
m–1 A is
left unchang
ed.
The pointer is
decremented.
DIMENSION
RECORD TABLE
DIM
@DIM
631
DIM(631)
Last-in first-out
Defines a record table by declaring the length of each record and the number of
records. Up to 16 record tables can be defined.
N
Output
Required
Table number (N)
LR
Record 1
NR
TB
N: Table number
LR: Length of
each record
NR: Number of
records
TB: 1st table
word
SET RECORD
LOCATION
SETR
@SETR
635
SETR(635)
N
R
412
Record NR
Writes the location of the specified record (the PC memory address of the
beginning of the record) in the specified Index Register.
PC memory
Table number (N)
address
D
N: Table number
R: Record
number
D: Destination
Index Register
LR × NR words
Number of records
R
Record
number (R)
SETR(635) writes the PC memory address (m) of the first word of record R
to Index Register D.
Output
Required
Section 10-14
Table Data Processing Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
GET RECORD
NUMBER
GETR
@GETR
636
GETR(636)
Returns the record number of the record at the PC memory address contained
in the specified Index Register.
N
Output
Required
Table number (N) PC memory
address
IR
D
N: Table number
IR: Index Register
D: Destination
word
IR
GETR(636) writes
the record number of
the record that includes I/O memory
address (m) to D.
Record number
(R)
n
DATA SEARCH
SRCH
@SRCH
181
SRCH(181)
Searches for a word of data within a range of words.
Output
Required
PC memory
address
C
R1
R1
Search
Cd
C: 1st control
word
R1: 1st word in
range
Cd: Comparison
data
SWAP BYTES
SWAP
@SWAP
637
SWAP(637)
MAX
@MAX
182
Match
Switches the leftmost and rightmost bytes in all of the words in the range.
R1
MAX(182)
R1
N
Finds the maximum value in the range.
PC memory
address
C
R1
C: 1st control
word
R1: 1st word in
range
D: Destination
word
MIN
@MIN
183
Output
Required
Byte position is swapped.
MIN(183)
Required
C words
R1+(W–1)
Max.
value
Finds the minimum value in the range.
Output
Required
C
R1
Output
R1
D
FIND MINIMUM
Cd
R1+(C–1)
N
N: Number of
words
R1: 1st word in
range
FIND MAXIMUM
C
R1
PC memory
address
D
C words
C: 1st control
word
R1: 1st word in
range
D: Destination
word
Min. value
R1+(W–1)
413
Section 10-15
Data Control Instructions
Instruction
Symbol/Operand
Function
Mnemonic
Execution
condition
Code
SUM
SUM(184)
SUM
@SUM
184
Adds the bytes or words in the range and outputs the result to two words.
R1
R1
C: 1st control
word
R1: 1st word in
range
D: 1st destination
word
FCS(180)
FCS
@FCS
180
Output
Required
C
D
FRAME
CHECKSUM
Location
C
)
R1+(W–1)
Calculates the ASCII FCS value for the specified range.
Output
Required
R1
C units
R1
D
C: 1st control
word
R1: 1st word in
range
D: 1st destination
word
ASCII conversion
FCS value
Calculation
10-15 Data Control Instructions
Instruction
Symbol/Operand
Function
Mnemonic
Execution
condition
Code
PID CONTROL
PID
190
PID(190)
Executes PID control according to the specified parameters.
Parameters (C to C+8)
S
PV input (S)
S: Input word
C: 1st parameter
word
D: Output word
Required
LMT(680)
LMT
@LMT
S
680
C
S: Input word
C: 1st limit word
D: Output word
PID control
Manipulated variable (D)
Controls output data according to whether or not input data is within upper and
lower limits.
D
Upper limit
C+1
Lower limit
C
414
Output
C
D
LIMIT CONTROL
Location
Output
Required
Section 10-15
Data Control Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
DEAD BAND
CONTROL
BAND(681)
BAND
@BAND
681
Controls output data according to whether or not input data is within the dead
band range.
S
Output
D
ZONE(682)
ZONE
@ZONE
682
Lower limit (C)
Input
Upper limit (C+1)
Adds the specified bias to input data and outputs the result.
Output
C
Positive bias (C+1)
D
SCL(194)
SCL
@SCL
194
Output
Required
S
Input
S: Input word
C: 1st limit word
D: Output word
SCALING
Required
C
S: Input word
C: 1st limit word
D: Output word
DEAD ZONE
CONTROL
Output
S
Negative bias (C)
Converts unsigned binary data into unsigned BCD data according to the
specified linear function.
R (unsigned BCD)
Output
Required
Scaling is performed according
to the linear function defined
by points A and B.
P1
R
S: Source word
P1: 1st parameter
word
R: Result word
Point B
Point A
P
P1 + 1
P1 + 2
P1 + 3
(BCD)
(BIN)
(BCD)
(BIN)
Converted
value
Converted
value
S (unsigned binary)
415
Section 10-15
Data Control Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
SCALING 2
SCL2(486)
SCL2
@SCL2
486
Converts signed binary data into signed BCD data according to the specified
linear function. An offset can be input in defining the linear function.
S
P1
R
Negative Offset
Positive Offset
R (signed BCD)
R (signed BCD)
S: Source word
P1: 1st parameter
word
R: Result word
∆Y
∆Y
Offset
∆X
∆X
S (signed
binary)
S (signed binary)
Offset
Offset of 0000
P1
Offset
(Signed binary)
P1 + 1
∆Y
(Signed binary)
P1 + 2
∆X
(Signed BCD)
R (signed BCD)
∆Y
Offset = 0000 hex
∆X
S (signed
binary)
416
Output
Required
Section 10-15
Data Control Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
SCALING 3
SCL3(487)
SCL3
@SCL3
487
Converts signed BCD data into signed binary data according to the specified
linear function. An offset can be input in defining the linear function.
S
P1
R
S: Source word
P1: 1st parameter
word
R: Result word
Output
Required
Negative Offset
Positive Offset
R (signed binary)
R (signed binary)
Max conversion
Max
conversion
∆Y
∆Y
∆X
Offset
Min.
conversion
∆X
S (signed BCD)
Offset
S (signed BCD)
Min. conversion
Offset of 0000
R (signed binary)
Max
conversion
∆Y
∆X
S (signed BCD)
Min. conversion
AVERAGE
AVG
195
AVG(195)
S
Calculates the average value of an input word for the specified number of
cycles.
Output
Required
S: Source word
N
R
S: Source word
N: Number of
cycles
R: Result word
N: Number of cycles
R
R+1
Pointer
Average Valid Flag
Average
R+2
R+3
N values
R+N+1
417
Section 10-16
Subroutine Instructions
10-16 Subroutine Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
SUBROUTINE
CALL
SBS(091)
N
SBS
@SBS N: Subroutine
091 number
Calls the subroutine with the specified subroutine number and executes that
program.
Execution condition ON
Output
Required
Main program
Subroutine
program
(SBN(092) to
RET(093))
Program end
SUBROUTINE
ENTRY
SBN
SBN(092)
Indicates the beginning of the subroutine program with the specified
subroutine number.
N
092 N: Subroutine
number
Output
Not required
or
Subroutine region
SUBROUTINE
RETURN
RET(093)
Indicates the end of a subroutine program.
Output
Not required
RET
093
MACRO
MCRO(099)
MCRO
@MCRO
N
099
S
Calls the subroutine with the specified subroutine number and executes that
program using the input parameters in S to S+3 and the output parameters in
D to D+3.
MCRO(099)
D
N: Subroutine
number
S: 1st input
parameter word
D: 1st output
parameter word
Execution of subroutine
between SBN(092) and
RET(093).
MCRO(099)
The subroutine uses A600
to A603 as inputs and A604
to A607 as outputs.
418
Output
Required
Section 10-17
Interrupt Control Instructions
10-17 Interrupt Control Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
SET INTERRUPT
MASK
MSKS
@MSKS
MSKS(690)
N
S
Sets up interrupt processing for I/O interrupts or scheduled interrupts. Both I/O
interrupt tasks and scheduled interrupt tasks are masked (disabled) when the
PC is first turned on. MSKS(690) can be used to unmask or mask I/O
interrupts and set the time intervals for scheduled interrupts.
Output
Required
Interrupt Input Unit 0 to 3
690
N: Interrupt
identifier
S: Interrupt data
I/O
interrupt
Mask (1) or unmask (0)
interrupt inputs 0 to 7.
Time interval
Scheduled
interrupt
READ
INTERRUPT
MASK
MSKR(692)
Set scheduled interrupt
time interval.
Reads the current interrupt processing settings that were set with MSKS(690).
Required
N
MSKR
@MSKR
Output
D
N: Interrupt
692 identifier
D: Destination
word
CLEAR
INTERRUPT
CLI(691)
CLI
@CLI
N
S
691
N: Interrupt
identifier
S: Interrupt data
Clears or retains recorded interrupt inputs for I/O interrupts or sets the time to
the first scheduled interrupt for scheduled interrupts.
N = 0 to 3
Interrupt
Interrupt
input n
input n
Output
Required
Internal
status
Internal
status
Recorded interrupt cleared
Recorded interrupt retained
N = 4 to 5
MSKS(690)
Execution of scheduled
interrupt task.
Time to first
scheduled interrupt
419
Section 10-18
Step Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
DISABLE
INTERRUPTS
DI(693)
Disables execution of all interrupt tasks except the power OFF interrupt.
Output
Required
DI
@DI
693
Disables execution of all
interrupt tasks (except
the power OFF interrupt).
ENABLE
INTERRUPTS
EI(694)
Enables execution of all interrupt tasks that were disabled with DI(693).
Output
Not required
EI
694
Disables execution of all
interrupt tasks (except the
power OFF interrupt).
Enables execution of all
disabled interrupt tasks.
10-18 Step Instructions
Instruction
Symbol/Operand
Function
Mnemonic
Location
Execution
condition
Code
STEP DEFINE
STEP(008)
STEP
B
008
STEP(008) functionS in following 2 ways, depending on its position and
whether or not a control bit has been specified.
(1)Starts a specific step.
(2)Ends the step programming area (i.e., step execution).
Output
SNXT(009) is used in the following three ways:
(1)To start step programming execution.
(2)To proceed to the next step control bit.
(3)To end step programming execution.
Output
Required
B: Bit
STEP START
SNXT(009)
SNXT
B
009
B: Bit
420
Required
Section 10-19
Basic I/O Unit Instructions
10-19 Basic I/O Unit Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
I/O REFRESH
IORF
@IORF
097
IORF(097)
Refreshes the specified I/O words.
Output
I/O bit area or
Special I/O Unit bit area
St
I/O Unit or
Special I/O Unit
Required
E
St: Starting word
E: End word
St
I/O refreshing
E
7-SEGMENT
DECODER
SDEC(078)
SDEC
@SDEC
078
S
Converts the hexadecimal contents of the designated digit(s) into 8-bit,
7-segment display code and places it into the upper or lower 8-bits of the
specified destination words.
Output
Required
Di
Di
D
Number of digits
S: Source word
Di: Digit
designator
D: 1st destination
word
First digit to convert
Rightmost 8 bits (0)
7-segment
INTELLIGENT
I/O READ
IORD
@IORD
222
IORD(222)
C
S
Reads the contents of the I/O Unit’s memory area.
Required
S
S+1
Unit number of Special I/O Unit
D
C: Control data
S: Transfer
source and
number of words
D: Transfer
destination and
number of words
INTELLIGENT
I/O WRITE
IOWR
@IOWR
223
IOWR(223)
Designated
number
of words
read.
Outputs the contents of the CPU Unit’s I/O memory area to the Special I/O
Unit.
C
S
D
C: Control data
S: Transfer
source and
number of words
D: Transfer
destination and
number of words
Output
Output
Required
D
D+1
Unit number of Special I/O Unit
Designated
number of
words written.
421
Section 10-20
Serial Communications Instructions
10-20 Serial Communications Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
PROTOCOL
MACRO
PMCR(260)
PMCR
@PMCR
260
Calls and executes a communications sequence registered in a Serial
Communications Board or Serial Communications Unit.
C1
CPU Unit
C2
S
to
R
to
TRANSMIT
TXD
@TXD
236
TXD(236)
Required
Serial Communications Unit
Port
S
R
C1:Control word 1
C2: Control word 2
S: 1st send word
R: 1st receive word
Output
External
device
Outputs the specified number of bytes of data from the RS-232C port built into
the CPU Unit.
Output
Reads the specified number of bytes of data from the RS-232C port built into
the CPU Unit.
Output
Changes the communications parameters of a serial port on the CPU Unit,
Serial Communications Unit (CPU Bus Unit), or Serial Communications Board.
STUP(237) thus enables the protocol mode to be changed during PC
operation.
Output
Required
S
C
N
S: 1st source
word
C: Control word
N: Number of
bytes
0000 to 0100 hex
(0 to 256 decimal)
RECEIVE
RXD
@RXD
235
RXD(235)
Required
D
C
N
D: 1st destination
word
C: Control word
N: Number of
bytes to store
0000 to 0100 hex
(0 to 256 decimal)
CHANGE
SERIAL PORT
SETUP
STUP
@STUP
STUP(237)
C
S
237 C: Control word
(port)
S: First source
word
422
Required
Section 10-21
Network Instructions
10-21 Network Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
NETWORK
SEND
SEND(090)
SEND
@SEND
090
Transmits data to a node in the network.
Local node
15
0
S
D
15
S
RECV
@RECV
098
490
Requests data to be transmitted from a node in the network and receives the
data.
Local node
15
D
C
CMND(490)
CMND
@CMND
n
S
S: 1st source
word
D: 1st destination
word
C: 1st control
word
DELIVER
COMMAND
0
D
n: No. of
send
words
C
RECV(098)
Required
15
0
S
n
m
Sends FINS commands and receives the response.
Local node
15
ComCommand
mand
data (n
Interpret
bytes)
(S–1)
+ n
2
15
(D–1)
+m
2
Required
0
S
D
Output
Destination node
C
S: 1st command
word
D: 1st response
word
C: 1st control
word
Output
Source node
0
D
S
D
Required
Destination node
S: 1st source
word
D: 1st destination
word
C: 1st control
word
NETWORK
RECEIVE
Output
0
Response Response
data (m
bytes)
Execute
423
Section 10-22
File Memory Instructions
10-22 File Memory Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
READ DATA
FILE
FREAD(700)
FREAD
@FREAD
700
Reads the specified data or amount of data from the specified data file in file
memory to the specified data area in the CPU Unit.
C
S1
S2
Starting read address File specified
specified in S1+2 and in S2
S1+3
Output
Required
CPU Unit
D
C: Control word
S1: 1st source
word
S2: Filename
D: 1st destination
word
Number of
words specified
in S1 and S1+1
Memory Card or
EM file memory
(Specified by the
4th digit of C.)
Number
of words
written
to D and
D+1.
File specified
in S2
CPU Unit
Number of
words
Memory Card or EM file memory
(Specified by the 4th digit of C.)
WRITE DATA
FILE
FWRIT(701)
FWRIT
@FWRIT
701
C
D1
D2
S
C: Control word
D1: 1st
destination word
D2: Filename
S: 1st source
word
Overwrites or appends data in the specified data file in file memory with the
specified data from the data area in the CPU Unit. If the specified file doesn’t
exist, a new file is created with that filename.
CPU Unit
Starting
address
specified
in S
Starting word
specified in
D1+2 and
D1+3
File specified in D2
Number of
words specified
in D1 and D1+1
Overwrite
Memory Card or EM file memory
(Specified by the 4th digit of C.)
CPU Unit
Starting
address
specified
in S
File specified in D2
End of
file
Existing
data
Number of
words specified
in D1 and D1+1
Append
Memory Card or EM file memory
(Specified by the 4th digit of C.)
CPU Unit
Starting
address
specified
in S
Beginning
File speciof file
fied in D2
New file created
Number of words
specified in D1
and D1+1
Memory Card or EM file memory
(Specified by the 4th digit of C.)
424
Output
Required
Section 10-24
Clock Instructions
10-23 Display Instructions
Instruction
Symbol/Operand
Function
Mnemonic
Execution
condition
Code
DISPLAY
MESSAGE
MSG(046)
MSG
@MSG
Location
Reads the specified sixteen words of extended ASCII and displays the
message on a Peripheral Device such as a Programming Console.
N
Output
Required
M
046
N: Message
number
M: 1st message
word
10-24 Clock Instructions
Instruction
Symbol/Operand
Function
Mnemonic
Execution
condition
Code
CALENDAR
ADD
CADD(730)
CADD
@CADD
730
C
Adds time to the calendar data in the specified words.
T
R
C+2
Minutes Seconds
Day
Hour
Year
Month
T
T+1
Minutes Seconds
Hours
R
R+1
Minutes Seconds
Day
Hour
Year
Month
R+2
CSUB(731)
CSUB
@CSUB
731
C
Subtracts time from the calendar data in the specified words.
Output
Required
T
C
C+1
R
C+2
C: 1st calendar
word
T: 1st time word
R: 1st result word
Output
Required
C
C+1
C: 1st calendar
word
T: 1st time word
R: 1st result word
CALENDAR
SUBTRACT
Location
Minutes Seconds
Day
Hour
Year
Month
–
T
T+1
Minutes Seconds
Hours
R
R+1
Minutes Seconds
Day
Hour
Year
Month
R+2
425
Section 10-25
Debugging Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
HOURS TO
SECONDS
SEC(065)
SEC
@SEC
Converts time data in hours/minutes/seconds format to an equivalent time in
seconds only.
S
D
Output
Required
Minutes Seconds
Hours
065 S: 1st source
word
D: 1st destination
word
Seconds
SECONDS TO
HOURS
HMS
@HMS
SEC(066)
Converts seconds data to an equivalent time in hours/minutes/seconds
format.
S
Output
Required
D
Seconds
066 S: 1st source
word
D: 1st destination
word
Minutes Seconds
Hours
CLOCK
ADJUSTMENT
DATE(735)
S
DATE
@DATE S: 1st source
735 word
Changes the internal clock setting to the setting in the specified source words.
Output
Required
CPU Unit
Internal clock
New
setting
Minutes
Seconds
Day
Hour
Year
Month
00
Day of week
10-25 Debugging Instructions
Instruction
Symbol/Operand
Function
Mnemonic
Execution
condition
Code
TRACE
MEMORY
SAMPLING
TRSM(045)
TRSM
045
426
Location
When TRSM(045) is executed, the status of a preselected bit or word is
sampled and stored in Trace Memory. TRSM(045) can be used anywhere in
the program, any number of times.
Output
Not required
Section 10-26
Failure Diagnosis Instructions
10-26 Failure Diagnosis Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
FAILURE
ALARM
FAL(006)
FAL
@FAL
Generates or clears user-defined non-fatal errors. Non-fatal errors do not stop
PC operation.
N
M
006 N: FAL number
M: 1st message
word
Execution of
FAL(006)
generates a
non-fatal error with FAL
number N.
FAL Error Flag ON
Corresponding Executed FAL Number
Flag ON
Error code written to A400
Error code and time written to Error
Log Area
Output
Required
ERR Indicator flashes
Message displayed
on Programming
Console
SEVERE
FAILURE
ALARM
FALS(007)
Generates user-defined fatal errors. Fatal errors stop PC operation.
N
FALS
M
007
N: FALS number
M: 1st message
word
Execution of
FALS(007)
generates a
fatal error
with FALS
number N.
FALS Error Flag ON
Error code written to A400
Error code and time/date written
to Error Log Area
Output
Required
ERR Indicator lit
Message displayed
on Programming
Console
FAILURE POINT
DETECTION
FPD(269)
Diagnoses a failure in an instruction block by monitoring the time between
execution of FPD(269) and execution of a diagnostic output and finding which
input is preventing an output from being turned ON.
FPD
C
269
T
Time monitoring function:
R
Starts timing when execution condition A goes
ON. Generates a non-fatal error if output B
isn’t turned ON within the monitoring time.
C: Control word
T: Monitoring time
R: 1st register
word
Output
Required
Execution
condition A
T
Error-processing
block (optional)
R
Next instruction block
Logic diagnosis block*
Logic diagnosis
execution condition C
Diagnostic output B
Logic diagnosis function
Determines which input in C prevents
output B from going ON.
427
Section 10-28
Block Programming Instructions
10-27 Other Instructions
Instruction
Symbol/Operand
Function
Mnemonic
Execution
condition
Code
SET CARRY
STC
@STC
Location
STC(040)
Sets the Carry Flag (CY).
Output
Required
040
CLEAR CARRY
CLC
@CLC
CLC(041)
Turns OFF the Carry Flag (CY).
Output
Required
041
SELECT EM
BANK
EMBC(281)
Changes the current EM bank.
Output
Required
N
EMBC
@EMBC N: EM bank
281 number
EXTEND
MAXIMUM
CYCLE TIME
WDT(094)
Extends the maximum cycle time, but only for the cycle in which this
instruction is executed.
T
Output
Required
WDT T: Timer setting
@WDT
094
10-28 Block Programming Instructions
Instruction
Symbol/Operand
Function
Mnemonic
Execution
condition
Code
BLOCK
PROGRAM
BEGIN
Location
BPRG(096)
Define a block programming area. For every BPRG(096) there must be a
corresponding BEND(801).
N
Output
Required
BPRG
N: Block program
096 number
Block program
Executed when the execution condition is ON.
BLOCK
PROGRAM END
BEND
801
428
Define a block programming area. For every BPRG(096) there must be a
corresponding BEND(801).
Output
Required
Section 10-28
Block Programming Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
BPPS
(811)
BLOCK
PROGRAM
PAUSE
Pause and restart the specified block program from another block program.
N
Block
program
Required
BPPS N: Block program
811 number
to
to
to
BLOCK
PROGRAM
RESTART
BPPS(811) executed
for block program n.
Block program n. Once
paused this block program
will not be executed even
if bit “a” is ON.
Pause and restart the specified block program from another block program.
BPRS
(812)
N
Block
program
Required
BPRS N: Block program
812 number
to
to
to
CONDITIONAL
BLOCK EXIT
EXIT
EXIT(806)
BPRS(812) executed
for block program n.
Block program n. This block
program will now be executed
as long as bit “a” is ON.
EXIT(806) without an operand bit exits the program if the execution condition
is ON.
B: Bit operand
Execution
condition
OFF
806
Execution
condition
ON
Block
program
Required
“A” executed. “A” executed.
Execution condition
“B” executed.
Block ended.
429
Section 10-28
Block Programming Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
CONDITIONAL
BLOCK EXIT
EXIT(806)
B
EXIT
EXIT(806) without an operand bit exits the program if the execution condition
is ON.
Operand bit
OFF
(ON for
EXIT NOT)
B: Bit operand
806
Operand bit
ON
(OFF for EXIT
NOT)
Block
program
Required
“A” executed. “A” executed.
“B” executed.
Block ended.
CONDITIONAL
BLOCK EXIT
(NOT)
EXIT NOT(806)
B
EXIT NOT
EXIT(806) without an operand bit exits the program if the execution condition
is ON.
Block
program
Required
B: Bit operand
806
CONDITIONAL
BLOCK
BRANCHING
IF (802)
IF
If the execution condition is ON, the instructions between IF(802) and
ELSE(803) will be executed and if the execution condition is OFF, the
instructions between ELSE(803) and IEND(804) will be executed.
Execution
condition
802
IF (802)
B
IF
“B” executed
(after ELSE).
If the operand bit is ON, the instructions between IF(802) and ELSE(803) will
be executed. If the operand bit is OFF, the instructions between ELSE(803)
and IEND(804) will be executed.
B: Bit operand
802
Required
Execution
condition ON?
“A” executed (between IF and ELSE).
CONDITIONAL
BLOCK
BRANCHING
Block
program
Block
program
Required
Operand bit
ON?
IF R (IF NOT R)
“A” executed (between IF and ELSE).
CONDITIONAL
BLOCK
BRANCHING
(NOT)
IF (802) NOT
B
“B” executed
(after ELSE).
The instructions between IF(802) and ELSE(803) will be executed and if the
operand bit is ON, the instructions be ELSE(803) and IEND(804) will be
executed is the operand bit is OFF.
Block
program
If the ELSE(803) instruction is omitted and the operand bit is ON, the
instructions between IF(802) and IEND(804) will be executed
Block
program
B: Bit operand
Required
IF NOT
802
CONDITIONAL
BLOCK
BRANCHING
(ELSE)
ELSE
803
430
---
Required
Section 10-28
Block Programming Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
CONDITIONAL
BLOCK
BRANCHING
END
---
If the operand bit is OFF, only the instructions after IEND(804) will be
executed.
Block
program
Required
IEND
804
ONE CYCLE
AND WAIT
WAIT(805)
WAIT
805
If the execution condition is ON for WAIT(805), the rest of the instruction in
the block program will be skipped.
Execution Execution Execution
condition condition condition
OFF
OFF
ON
Block
program
Required
“A”
executed.
“B” executed.
Execution
condition
“C”
executed.
“C”
“C” executed.
executed.
Wait
ONE CYCLE
AND WAIT
WAIT(805)
B
WAIT
B: Bit operand
805
ONE CYCLE
AND WAIT (NOT)
WAIT NOT
805
WAIT(805) NOT
B
B: Bit operand
If the operand bit is OFF (ON for WAIT NOT(805)), the rest of the instructions
in the block program will be skipped. In the next cycle, none of the block
program will be executed except for the execution condition for WAIT(805) or
WAIT(805) NOT. When the execution condition goes ON (OFF for WAIT(805)
NOT), the instruction from WAIT(805) or WAIT(805) NOT to the end of the
program will be executed.
Block
program
If the operand bit is OFF (ON for WAIT NOT(805)), the rest of the instructions
in the block program will be skipped. In the next cycle, none of the block
program will be executed except for the execution condition for WAIT(805) or
WAIT(805) NOT. When the execution condition goes ON (OFF for WAIT(805)
NOT), the instruction from WAIT(805) or WAIT(805) NOT to the end of the
program will be executed.
Block
program
TIMER WAIT
TIMW(813)
Delays execution of the rest of the block program until the specified time has
N
elapsed. Execution will be continued from the next instruction after TIMW(813)
TIMW
SV
when the timer times out.
813
N: Timer number
SV: Set value
Required
Required
Block
program
Required
“A”
executed
SV
preset.
Time elapsed.
“B” executed.
BEND
“C” executed.
C
431
Section 10-28
Block Programming Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
COUNTER WAIT
CNTW
CNTW(814)
N
SV
Delays execution of the rest of the block program until the specified count has
been achieved. Execution will be continued from the next instruction after
CNTW(814) when the counter counts out.
814
N: Counter
number
SV: Set value
I: Count input
Block
program
Required
“A”
executed.
SV
preset.
Time elapsed.
“B” executed.
C
HIGH-SPEED
TIMER WAIT
TMHW
TMHW(815)
N
SV
“C”
executed.
“C”
executed.
“C” executed.
Delays execution of the rest of the block program until the specified time has
elapsed. Execution will be continued from the next instruction after
TMHW(815) when the timer times out.
Block
program
Required
815 N: Timer number
SV: Set value
“A”
executed
SV
preset.
Time elapsed.
“B” executed.
BEND
“C” executed.
C
LOOP
---
LOOP(809) designates the beginning of the loop program.
LOOP
Execution Execution Execution Execution
condition condition condition condition
ON
OFF
OFF
OFF
809
Execution condition
Loop repeated
432
Block
program
Required
Section 10-29
Text String Processing Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
LEND
LEND (810)
LEND
810
LEND
LEND
LEND (810)
B
810 B: Bit operand
LEND(810) or LEND(810) NOT specifies the end of the loop. When
LEND(810) or LEND(810) NOT is reached, program execution will loop back
to the next previous LOOP(809) until the operand bit for LEND(810) or
LEND(810) NOT turns ON or OFF (respectively) or until the execution
condition for LEND(810) turns ON.
Block
program
If the operand bit is OFF for LEND(810) (or ON for LEND(810) NOT),
execution of the loop is repeated starting with the next instruction after
LOOP(809). If the operand bit is ON for LEND(810) (or OFF for LEND(810)
NOT), the loop is ended and execution continues to the next instruction after
LEND(810) or LEND(810) NOT.
Block
program
Operand Operand Operand
bit ON
bit OFF
bit OFF
Required
Required
Operand
bit OFF
Loop repeated
Note The status of the operand bit would be reversed for
LEND(810) NOT.
LEND NOT
LEND(810) NOT
LEND NOT
B: Bit operand
810
LEND(810) or LEND(810) NOT specifies the end of the loop. When
LEND(810) or LEND(810) NOT is reached, program execution will loop back
to the next previous LOOP(809) until the operand bit for LEND(810) or
LEND(810) NOT turns ON or OFF (respectively) or until the execution
condition for LEND(810) turns ON.
Block
program
Required
10-29 Text String Processing Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
MOV STRING
MOV$(664)
MOV$
@MOV$
664
Transfers a text string.
Output
Required
S
D
S: 1st source
word
D: 1st destination
word
CONCATENATE
STRING
+$
@+$
656
+$(656)
S1
Links one text string to another text string.
→
+
→
Output
→
→
Required
S2
D
S1: Text string 1
S2: Text string 2
D: First
destination word
433
Section 10-29
Text String Processing Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
GET STRING
LEFT
LEFT$(652)
LEFT$
@LEFT$
652
Fetches a designated number of characters from the left (beginning) of a text
string.
S1
Output
Required
S2
D
→
→
S1: Text string
first word
S2: Number of
characters
D: First
destination word
GET STRING
RIGHT
RGHT$(653)
RGHT$
@RGHT$
653
Reads a designated number of characters from the right (end) of a text string.
Output
Required
S1
00
S2
D
S1: Text string
first word
S2: Number of
characters
D: First
destination word
GET STRING
MIDDLE
MID$(654)
MID$
@MID$
654
Reads a designated number of characters from any position in the middle of a
text string.
S1
Output
Required
S2
S3
→
→
D
S1: Text string
first word
S2: Number of
characters
S3: Beginning
position
D: First
destination word
FIND IN STRING
FIND$(660)
FIND
@FIND$
S1
660
S2
Finds a designated text string from within a text string.
Found data
→
→
Output
Required
→
D
S1: Source text
string first word
S2: Found text
string first word
D: First
destination word
STRING
LENGTH
LEN$(650)
LEN$
@LEN$
S
D
650
S: Text string first
word
D: 1st destination
word
434
Calculates the length of a text string.
→
1
3
5
2
4
Output
Required
Section 10-29
Text String Processing Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
REPLACE IN
STRING
RPLC$(654)
RPLC$
@RPLC$
661
Replaces a text string with a designated text string from a designated position.
Required
S1
S2
S3
Output
→
→
S4
D
S1: Text string
first word
S2: Replacement
text string first
word
S3: Number of
characters
S4: Beginning
position
D: First
destination word
DELETE STRING
DEL$(658)
DEL$
@DEL$
S1
658
S2
S3
Deletes a designated text string from the middle of a text string.
Number of characters to be
deleted (designated by S2).
→
Output
Required
→
G
D
S1: Text string
first word
S2: Number of
characters
S3: Beginning
position
D: First
destination word
EXCHANGE
STRING
XCHG$(665)
XCHG$
@XCHG$
Ex1
CLR$
@CLR$
Ex1
Ex1
Ex2
Ex2
Output
Required
Ex2
665 Ex1: 1st
exchange word 1
Ex2: 1st
exchange word 2
CLEAR STRING
Replaces a designated text string with another designated text string.
CLR$(666)
S
666 S: Text string first
word
Clears an entire text string with NUL (00 hex).
S→
A
C
B
D
NUL
Output
S→
Required
NUL
435
Section 10-29
Text String Processing Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
INSERT INTO
STRING
INS$(657)
Deletes a designated text string from the middle of a text string.
S2
657
S3
D
Required
→
S1
INS$
@INS$
Output
NUL
→
→
Inserted
characters
S1: Base text
string first word
S2: Inserted text
string first word
S3: Beginning
position
D: First
destination word
String
Comparison
LD
Symbol
LD, AND, OR +
=$, <>$, <$, <=$,
>$, >=$
S1
S2
670 (=$)
671 (<>$) AND
672 (<$)
673 (<=$)
674 (>$)
675 (>=$)
Symbol
S1
S2
OR
Symbol
S1
S2
S1: Text string 1
S2: Text string 2
436
Sting comparison instructions (=$, <>$, <$, <=$, >$, >=$) compare two text
strings from the beginning, in terms of value of the ASCII codes. If the result of
the comparison is true, an ON execution condition is created for a LOAD,
AND, or OR.
LD: Not
required
AND, OR:
Required
Section 10-30
Task Control Instructions
10-30 Task Control Instructions
Instruction
Symbol/Operand
Function
Location
Mnemonic
Execution
condition
Code
TASK ON
TKON(820)
TKON
@TKON
N
820 N: Task number
Makes the specified task executable.
The specified task’s task number
is higher than the local task’s task
number (m<n).
Output
The specified task’s task number
is lower than the local task’s task
number (m>n).
Task m
Task m
Becomes
executable in
the next
cycle.
Becomes
executable in
that cycle.
Task n
TASK OFF
TKOF(821)
TKOF
@TKOF
N
821 N: Task number
Task n
Puts the specified task into standby status.
The specified task’s task number is higher than the local
task’s task number (m<n).
Task m
Output
The specified task’s task number is lower than the local
task’s task number (m>n).
Required
Task m
In standby status
that
cycle.
Task n
Required
In standby status
the next
cycle.
Task n
437
SECTION 11
Tasks
This section describes the operation of tasks.
11-1 Task Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-1-1 Tasks and Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-1-2 Basic CPU Unit Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-1-3 Types of Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-1-4 Task Execution Conditions and Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-1-5 Cyclic Task Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-1-6 Status Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-2 Using Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-2-1 TASK ON and TASK OFF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-2-2 Tasks and the Execution Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-2-3 Task Instruction Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-2-4 Flags Related to Cyclic Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-2-5 Examples of Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-2-6 Designing Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-3 Interrupt Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-3-1 Types of Interrupt Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-3-2 List of Interrupt Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-3-3 I/O Interrupt Tasks: Tasks 100 to 131 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-3-4 Scheduled Interrupt Tasks: Tasks 2 and 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-3-5 Power OFF Interrupt Task: Task 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-3-6 External Interrupt Tasks: Tasks 0 to 255 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-3-7 Interrupt Task Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-3-8 Interrupt Task Flags and Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-3-9 Application Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-4 Programming Device Operations for Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-4-1 Using Multiple Cyclic Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-4-2 Programming Device Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
440
441
442
443
444
444
445
446
446
447
450
450
452
453
454
454
455
456
457
458
459
460
461
462
464
464
465
439
Section 11-1
Task Features
11-1 Task Features
CS1-series control operations can be divided by functions, controlled devices,
processes, developers, or any other criteria and each operation can be programmed in a separate unit called a “task.” Using tasks provides the following
advantages:
1, 2, 3...
440
1. Programs can be developed simultaneously by several people.
Individually designed program parts can be assembled with very little effort
into a single user program.
2. Programs can be standardized in modules.
More specifically, the following Programming Device functions will be combined to develop programs that are standalone standard modules rather
than programs designed for specific systems (machines, devices). This
means that programs will readily function with other systems and that programs developed separately by several people can be readily combine.
• Programming using symbols
• Global and local designation of symbols
• Automatic allocation of local symbols to addresses
3. Improved overall response.
Overall response is improved because the system is divided into an overall
control program as well as individual control programs, and only specific
programs will be executed as needed.
4. Easy revision and debugging.
• Debugging is much more efficient because tasks can be developed separately by several people, and then revised and debugged by individual
task.
• Maintenance is simple because only the task that needs revising will be
changed in order to make specification or other changes.
• Debugging is more efficient because it is easy to determine whether an
address is specific or global and addresses between programs only need
to be checked once during debugging because symbols are designated
globally or locally and local symbols are allocated automatically to addresses through Programming Devices.
5. Easy to switch programs.
A task control instruction in the program can be used to execute productspecific tasks (programs) when changing operation is necessary.
Section 11-1
Task Features
6. Easily understood user programs.
Programs are structured in blocks that make the programs much simpler to
understand for sections that would conventionally be handled with instructions like jump.
Task C
Task A
(Program A)
Start task A
Start task B
Task B
(Program B)
11-1-1 Tasks and Programs
• Up to 288 programs (tasks) can be controlled. Individual programs are allocated 1:1 to tasks. Tasks are broadly grouped into the following types:
• Cyclic tasks
• Interrupt tasks
Note Up to 32 cyclic tasks and 256 interrupt tasks for a maximum total of 288 tasks
can be created. Each task has its own unique number ranging from 0 to 31 for
cyclic tasks and 0 to 255 for interrupt tasks.
Each program allocated to a task must end with an END(001) instruction. I/O
refreshing will be executed only after all task programs in a cycle have been
executed.
441
Section 11-1
Task Features
11-1-2 Basic CPU Unit Operation
The CPU Unit will execute cyclic tasks starting at the lowest number. It will also
interrupt cyclic task execution to execute an interrupt task if an interrupt occurs.
Cyclic task 0
Interrupt task 5
Executed in order starting
at the lowest number.
Cyclic task 1
Interrupt
occurs.
*1: END other than that for the final
task. Clears ER, Equals, and N Flags.
Cyclic task n
*2: END for the final task. Clears ER, Equals,
and N Flags, and then refreshes I/O.
I/O refresh
Peripheral processing
Note All Condition Flags (ER, CY, Equals, AER, etc.) and instruction conditions (interlock ON, etc.) will be cleared at the beginning of a task. Therefore Condition
Flags cannot be read nor can INTERLOCK/INTERLOCK CLEAR (IL/ILC)
instructions, JUMP/JUMP END (JMP/JME) instructions, or SUBROUTINE
CALL/SUBROUTINE ENTRY (SBS/SBN) instructions be split between two
tasks.
442
Section 11-1
Task Features
11-1-3 Types of Tasks
Tasks are broadly classified as either cyclic tasks or interrupt tasks. Interrupt
tasks are further divided into power OFF, scheduled, I/O, and external interrupt
tasks.
Cyclic Tasks
A cyclic task that is READY will be executed once each cycle (from the top of the
program until the END(001) instruction) in numerical order starting at the task
with the lowest number. The maximum number of cyclic tasks is 32. (Cyclic task
numbers: 00 to 31).
Interrupt Tasks
An interrupt task will be executed if an interrupt occurs even if a cyclic task is
currently being executed. The interrupt task will be executed using any time in
the cycle, including during user program execution, I/O refreshing, or peripheral
servicing, when the execution condition for the interrupt is met.
Power OFF Interrupt Task
The power OFF interrupt task will be executed if CPU Unit power is shut OFF.
Only one power OFF interrupt task can be programmed (Interrupt task number:
1).
Note The power OFF interrupt task must execute before the following time elapses or
the task will be forced to quit.
10 ms – (Power OFF detection delay time)
The power OFF detection delay time is set in the PC Setup.
A scheduled interrupt task will be executed at a fixed interval based on the internal timer of the CPU Unit. The maximum number of scheduled interrupt tasks is
2 (Interrupt task numbers: 2 and 3).
Scheduled Interrupt
Tasks
Note The SET INTERRUPT MASK (MSKS(690)) instruction is used to set the interrupt for a scheduled interrupt task. Interrupt times can be set in 10-ms or 1.0-ms
increments in the PC Setup.
I/O Interrupt Tasks
An I/O interrupt task will be executed if an Interrupt Input Unit input (8 inputs per
Unit with a maximum of 4 Units) turns ON. The maximum number of I/O interrupt
tasks is 32 (Interrupt task numbers: 100 to 131).
External Interrupt Tasks
An external interrupt task will be executed when requested by an Special I/O
Unit, CS1 CPU Bus Unit, or Inner Board user program. Special I/O Units and
CS1 CPU Bus Units, however, must be on the CPU Rack to generate external
interrupts. The maximum number of external interrupt tasks is 256 (Interrupt
task numbers: 0 to 255). If an external interrupt task has the same number as a
power OFF, scheduled or I/O interrupt task, the interrupt task will be executed for
either condition (the two conditions will operate with OR logic) but basically task
numbers should not be duplicated.
Note
1. The power OFF interrupt task in 1) above has priority and will be executed
when power turns OFF even if another interrupt task is being executed.
2. If another interrupt task is being executed when a scheduled, I/O, or external
interrupt occurs, then these interrupt tasks will not be executed until the interrupt task that is currently being executed has been completed. If multiple
interrupts occur simultaneously, then interrupt tasks will be executed sequentially starting at the lowest interrupt task number.
443
Section 11-1
Task Features
11-1-4 Task Execution Conditions and Settings
The following table describes task execution conditions, related settings, and
status.
Task
No.
Execution condition
Related Setting
Cyclic tasks
0 to 31
Executed once each cycle if
READY when the right to
execute is obtained.
None
Interrupt
tasks
1
Executes when CPU Unit
power shuts OFF.
• Power OFF interrupt enabled
Executes once every time the
preset period elapses
according to the internal timer
of CPU Unit.
• The scheduled interrupt time is
Power OFF interrupt task
Scheduled interrupt tasks
0 and 1
2 and 3
in PC Setup.
set (0 to 9999) through the SET
INTERRUPT MASK instruction (MSKS).
• Scheduled
interrupt
unit
(10 ms or 1.0 ms) is set in PC
Setup.
I/O interrupt tasks
00 to 31
100 to 131
External interrupt tasks
0 to 255
0 to 255
Note
Executes when an input on an
Interrupt Input Unit turns ON.
Executes when requested by a
user program in a Special I/O
Unit or CS1 CPU Bus Unit on
the CPU Rack or by a user
program in an Inner Board.
• Masks for designated inputs
are canceled through the SET
INTERRUPT MASK instruction (MSKS).
None (always enabled)
1. Special I/O Units and CS1 CPU Bus Units must be on the CPU Rack to generate external interrupts. There is no way to directly execute an external interrupt task from a Unit on a CS1 Expansion Rack.
2. The number of cyclic tasks and interrupt tasks are limited when the memory
clear operation is performed with a Programming Console.
• Only cyclic task 0 can be created.
Cyclic tasks 1 to 31 cannot be created with a Programming Console, but
these tasks can be edited if they were already created with CX-Programmer.
• Only interrupt tasks 1, 2, 3, and 100 through 131 can be created.
Interrupt tasks 0 and 4 through 99 cannot be created with a Programming
Console, but these tasks can be edited if they were already created with
CX-Programmer.
11-1-5 Cyclic Task Status
This section describes cyclic task status.
Cyclic tasks always have one of four statuses: Disabled, READY, RUN (executable), and standby (WAIT).
Disabled Status (INI)
A task with Disabled status is not executed. All cyclic tasks have Disabled status
in PROGRAM mode. Any cycle task that shifted from this to another status cannot return to this status without returning to PROGRAM mode.
READY Status
A task attribute can be set to control when the task will go to READY status. The
attribute can be set to either activate the task using the TASK ON instruction or
when RUN operation is started.
444
Section 11-1
Task Features
Instruction-activated
Tasks
A TASK ON (TKON(820)) instruction is used to switch an instruction-activated
cyclic task from Disabled status or Standby status to READY status.
Operation-activated
Tasks
An operation-activated cyclic task will switch from Disabled status to READY
status when the operating mode is changed from PROGRAM to RUN or MONITOR mode.
Note A Programming Device can be used to set one or more tasks to go to READY
status when operation is started for task numbers 0 through 31.
RUN Status
A cyclic task that is READY will switch to RUN status and be executed when the
task obtains the right to execute.
Standby Status
A TASK OFF (TKOF(821)) instruction can be used to change a cyclic task from
Disabled status to Standby status.
11-1-6 Status Transitions
Activated at the start of
operation or the
TKON(820) instruction
INI (Disabled) status
Right to execute obtained.
RUN status
READY status
Executed
TKON(820) instruction
TKOF(821) instruction (See note.)
Standby status
Note A task in RUN status will be put into Standby status by the TKOF(821) instruction
even when the TKOF(821) instruction is executed within that task.
Standby status functions exactly the same way as a jump (JMP-JME). Output
status for the Standby task will be maintained.
Standby status
Jump
445
Section 11-2
Using Tasks
Instructions will not be executed in Standby status, so instruction execution time
will not be increased. Programming that does not need to be executed all the
time can be made into tasks and assigned Standby status to reduce cycle time.
Reduced cycle time
Conventional program
Task
Executes under
set conditions
All instructions will
be executed unless jumps or other
functions are used.
Executes under
set conditions
Note Standby status simply means that a task will be skipped during task execution.
Changing to Standby status will not end the program.
11-2 Using Tasks
11-2-1 TASK ON and TASK OFF
The TASK ON (TKON(820)) and TASK OFF (TKOF(821)) instructions switch a
cyclic task between READY and Standby status from a program.
N: Task No.
A task will go to READY status when the
execution condition is ON, and the corresponding Task Flag will turn ON.
N: Task No.
A task will go to Standby status when
the execution condition is ON, and the
corresponding Task Flag will turn OFF.
The TASK ON and TASK OFF instructions can be used to change any cyclic task
between READY or Standby status at any time. A cyclic task that is in READY
status will maintain that status in subsequent cycles, and a cyclic task that is in
Standby status will maintain that status in subsequent cycles.
The TASK ON and TASK OFF instructions can be used only with cyclic tasks and
not with interrupt tasks.
446
Section 11-2
Using Tasks
Note At least one cyclic task must be in READY status in each cycle. If there is not
cyclic task in READY status, the Task Error Flag (A29512) will turn ON, and the
CPU Unit will stop running.
Example: Cyclic Task
Cyclic task 0
(READY status
at the start of
operation)
Cyclic task 1
Cyclic task 2
Cyclic task 3
1) Task 0 will be in
READY status at Cyclic task 0
the start of operation.
Other tasks will re- Cyclic task 1
main in Disabled
status.
2)Task 1 will go to
READY status if A is
Cyclic task 0
ON, and tasks 2 and 3
will remain on Disabled
status.
Cyclic task 1
3) Task 0 will go to
Standby status if D
is ON.
Other tasks will remain
in their current status.
Cyclic task 0
Cyclic task 1
Cyclic task 2
Cyclic task 2
Cyclic task 2
Cyclic task 3
Cyclic task 3
Cyclic task 3
READY status
Standby status/Disabled status
11-2-2 Tasks and the Execution Cycle
A cyclic task that is in READY status will maintain that status in subsequent
cycles.
Cyclic task 1
TKON(820)
Cyclic task 2
READY status at the
start of operation
READY
status
Cyclic task 1
READY status
Cyclic task 2
READY status
447
Section 11-2
Using Tasks
A cyclic task that is in Standby status will maintain that status in subsequent
cycles. The task will have to be activated using the TKON(820) instruction in order to switch from Standby to READY status.
TKON(820)
Cyclic task 1
Standby status
Cyclic task 1
Standby status
Cyclic task 2
RUN status
Cyclic task 2
RUN status
TKOF (821)
If a TKOF(821) instruction is executed for the task it is in, the task will stop being
executed where the instruction is executed, and the task will shift to Standby status.
Task 2
Task execution will
stop here and the task
will shift to Standby
status.
Cyclic Task Numbers and the Execution Cycle
If task m turns ON task n and m > n, task n will go to READY status the next cycle.
Example: If task 5 turns ON task 2, task 2 will go to READY status the next cycle.
If task m turns ON task n and m < n, task n will go to READY status the same
cycle.
Example: If task 2 turns ON task 5, task 5 will go to READY status in the same
cycle.
If task m places task n in Standby status and m > n, will go to Standby status the
next cycle.
Example: If task 5 places task 2 in Standby status, task 2 will go to Standby status the next cycle.
If task m places task n in Standby status and m < n, task n will go to Standby
status in the same cycle.
Example: If task 2 places task 5 in Standby status, task 5 will go to Standby status in the same cycle.
448
Section 11-2
Using Tasks
Relationship of Tasks to I/O Memory
• The Index Registers (IR) and Data Registers (DR) in I/O memory are separate
(independent) for each task. IR0 used by cyclic task 1 for example is different
from IR0 used by cyclic task 2.
• Other words and bits in I/O Memory are shared by all tasks. CIO 001000 for
example is the same bit for both cyclic task 1 and cyclic task 2. Therefore, be
very careful in programming any time I/O memory areas other than the IR and
DR Areas are used because values changed with one task will be used by other tasks.
I/O memory
Note
Relationship to tasks
CIO, Auxiliary, Data Memory and all other
memory areas except the IR and DR Areas.
(See note 1.)
Shared with other tasks.
Index registers (IR) and data registers (DR)
(See note 2.)
Used separately for each task.
1. The current EM bank is also shared by tasks. Therefore if the current EM
bank number is changed with cyclic task 1 for example, the new current EM
bank number will be valid for cyclic task 2 as well.
2. IR and DR values are not set when interrupt tasks are started. If IR and DR
are used in an interrupt task, these values must be set by the MOVR/
MOVRW (MOVE TO REGISTER and MOVE TIMER/COUNTER PV TO
REGISTER) instructions within the interrupt task. After the interrupt task has
been executed, IR and DR will return to their values prior to the interrupt automatically.
Relationship of Tasks to
Timer Operation
Timer present values for TIM, TIMH, TMHH, TIMW, TMHW programmed for timer numbers 0000 to 2047 will be updated even if the task is switched or if the task
containing the timer is changed to Standby status or back to READY status.
If the task containing TIM goes to Standby status and is the returned to READY
status, the Completion Flag will be turned ON if the TIM instruction is executed
when the present value is 0. (Completion Flags for timers are updated only when
the instruction is executed.) If the TIM instruction is executed when the present
value is not yet 0, the present value will continue to be updated just as it was
while the task was in READY status.
• The present values for timers programmed with timer numbers 2048 to 4098
will be maintained when the task is in Standby status.
Relationship of Tasks to
Condition Flags
All Condition Flags will be cleared before execution of each task. Therefore
Condition Flag status at the end of task 1 cannot be read in task 2.
Note When the status of Condition Flags is monitored from a Programming Console,
the Programming Console will show the flags’ status at the end of the cycle, i.e.,
their status at the end of the last task in the cycle.
449
Section 11-2
Using Tasks
11-2-3 Task Instruction Limitations
Instructions Required in the Same Task
The following instructions must be placed within the same task. Any attempt to
split instructions between two tasks will cause the ER Flag to turn ON and the
instructions will not be executed.
Mnemonic
Instruction
JMP/JME
JUMP/JUMP END
CJP/JME
CONDITIONAL JUMP/JUMP END
CJPN/JME
CONDITIONAL JUMP NOT/CONDITIONAL JUMP END
JMP0/JME0
MULTIPLE JUMP/JUMP END
FOR/NEXT
FOR/NEXT
IL/ILC
INTERLOCK/INTERLOCK CLEAR
SBS/SBN/RET
MCRO/SBN/RET
SUBROUTINE CALL/SUBROUTINE ENTRY/SUBROUTINE
RETURN
MACRO/SUBROUTINE ENTRY/SUBROUTINE RETURN
BPRG/BEND
BLOCK PROGRAM BEGIN/BLOCK PROGRAM END
STEP S/STEP
STEP DEFINE
Instructions Not Allowed in Interrupt Tasks
The following tasks cannot be placed in interrupt tasks. Any attempt to execute
one of these instructions in an interrupt task will cause the ER Flag to turn ON
and the instruction will not be executed.
Mnemonic
Instruction
TKON(820)
TASK ON
TKOF(821)
TASK OFF
STEP
STEP DEFINE
SNXT
STEP NEXT
STUP
CHANGE SERIAL PORT SETUP
DI
DISABLE INTERRUPT
EI
ENABLE INTERRUPT
The operation of the following instructions is unpredictable in an interrupt task:
TIMER: TIM, HIGH-SPEED TIMER: TIMH(015), ONE-MS TIMER: TMHH(540),
ACCUMULATIVE TIMER: TTIM(087), MULTIPLE OUTPUT TIMER:
MTIM(543), LONG TIMER: TIML(542), TIMER WAIT: TIMW(813), HIGHSPEED TIMER WAIT: TMHW(815), PID CONTROL: PID(190), FAILURE
POINT DETECTION: FPD(269), and CHANGE SERIAL PORT SETUP:
STUP(237).
The following instructions cannot be used in the power OFF interrupt task (they
will not be executed even if they are used and the Error Flag will not turn ON):
READ DATA FILE: FREAD(700), WRITE DATA FILE: FWRIT(701), NETWORK
SEND: SEND(090), NETWORK RECEIVE: RECV(098), DELIVER COMMAND: CMND(490), PROTOCOL MACRO: PMCR(260).
11-2-4 Flags Related to Cyclic Tasks
Task Flags
(TK00 to TK31)
A Task Flag is turned ON when a cyclic task in READY status and is turned OFF
when the task is in Disabled (INI) or in Standby status. Task numbers 00 to 31
correspond to Task Flags TK00 to TK31.
Cycle
Task 3
Disabled
Task Flag for task 3
450
READY
Cycle
READY
Cycle
Standby
Section 11-2
Using Tasks
Note Task Flags are used only with cyclic tasks and not with interrupt tasks. With an
interrupt task, A44115 will turn ON if an interrupt task executes after the start of
operation, and the number of the interrupt task that required for maximum processing time will be stored in two-digit hexadecimal in A44100 to A44107.
Initial Task Execution
Flag (A20015)
The Initial Task Execution Flag will turn ON when cyclic tasks shift from Disabled
to READY status, the tasks obtain the right to execute, and the tasks are
executed the first time. It will turn OFF when the first execution of the tasks has
been completed.
Cycle
Task n
Disabled
READY
RUN
Tasks executed in sequential
order starting at the lowest
number.
Initial Task Execution Flag
The Initial Task Execution Flag tells whether or not the cyclic tasks are being
executed for the first time. This flag can thus be used to perform initialization processing within the tasks.
Initial Task Execution Flag
Initializing
processing
Note Even though a Standby cyclic task is shifted back to READY status through the
TKON(820) instruction, this is not considered an initial execution and the Initial
Task Execution Flag (20015) will not turn ON. The Initial Task Execution Flag
(20015) will also not turn ON if a cyclic task is shifted from Disabled to RUN status or if it is put in Standby status by another task through the TKOF(821) instruction before the right to execute actually is obtained.
Task Error Flag (A29512)
The Task Error Flag will turn ON if one of the following task errors occurs.
• No cyclic tasks are READY during a cycle.
• The program allocated to a cyclic task does not exist. (This situation will not
occur when using the CX-Programmer or a Programming Console.)
• No program is allocated to an activated interrupt task.
Task Number when
Program Stopped (A294)
The type of task and the current task number when a task stops execution due to
a program error will be stored as follows:
Type
Cyclic task
A294
0000 to 001F Hex (correspond to task numbers 0 to 31)
Interrupt task 8000 to 80FF Hex (correspond to interrupt task numbers 0 to 255)
This information makes it easier to determine where the fatal error occurred, and
it will be cleared when the fatal error is cleared. The program address where task
operation stopped is stored in A298 (rightmost bits of the program address) and
in A299 (leftmost bits of the program address).
451
Section 11-2
Using Tasks
11-2-5 Examples of Tasks
An overall control task that is set to go to READY status at the start of operation is
generally used to control READY/Standby status for all other cyclic tasks. Of
course, any cyclic task can control the READY/Standby status of any other cyclic task as required by the application.
From Program Mode to Operating or Monitor Mode.
Cyclic task 0 with the startup at
the start of operation attribute
(overall control task)
Cyclic task 1
Cyclic task 2
Cyclic task 3
Tasks Separated by Function
Tasks Separated by Controlled Section
A-section control
task
Conveyor task
Overall control task
Error monitoring
task
Overall control task
B-section control
task
MMI task
C-section control
task
Communications
task
Analog processing
task
Tasks Separated by Product
Tasks Separated by Developer
Product A task
Developer A task
Overall control task
Product B task
Product C task
Overall control
task
Developer B task
Developer C task
Tasks Separated by Process
Machining task
Overall control task
Assembly task
Conveyor task
Combinations of the above classifications are also possible, e.g., classification
by function and process.
452
Section 11-2
Using Tasks
11-2-6 Designing Tasks
We recommend the following guidelines for designing tasks.
1, 2, 3...
1. Use the following standards to study separating tasks.
a) Summarize specific conditions for execution and non-execution.
b) Summarize the presence or absence of external I/O.
c) Summarize functions.
Keep data exchanged between tasks for sequence control, analog control, man-machine interfacing, error processing and other processes to
an absolute minimum in order to maintain a high degree of autonomy.
d) Summarize execution in order of priority.
Separate processing into cyclic and interrupt tasks.
Breakdown by function
Input
processing
Overall
control
(may include error
processing
in some
cases)
Error processing
Sequence control
Output
processing
Analog control
External outputs
External I/O
Order of priority
Interrupt
Man-machine interfacing
Breakdown by execution and non-execution conditions
2. Be sure to break down and design programs in a manner that will ensure
autonomy and keep the amount of data exchanged between tasks (programs) to an absolute minimum.
Minimize data
exchange
3. Generally, use an overall control task to control the READY/Standby status
of the other tasks.
4. Allocate the lowest numbers to tasks with the highest priority.
Example: Allocate a lower number to the control task than to processing
tasks.
5. Allocate lower numbers to high-priority interrupt tasks.
6. A task in READY status will be executed in subsequent cycles as long as the
task itself or another task does not shift it to Standby status. Be sure to insert
a TKOF(821) (TASK OFF) instruction for other tasks if processing is to be
branched between tasks.
7. Use the Initial Task Execution Flag (A20015) in the execution condition to
execution instructions to initialize tasks. The Initial Task Execution Flag will
be ON during the first execution of each task.
8. Assign I/O memory into memory shared by tasks and memory used only for
individual tasks, and then group I/O memory used only for individual tasks
by task.
453
Section 11-3
Interrupt Tasks
Relationship of Tasks to
Block Programs
Up to 128 block programs can be created in the tasks. This is the total number for
all tasks. The execution of each entire block program is controlled from the ladder diagram, but the instructions within the block program are written using mnemonics. In other words, a block program is formed from a combination of a ladder instruction and mnemonic code.
Using a block program makes it easier to write logic flow, such as conditional
branching and process stepping, which can be hard to write using ladder diagrams. Block programs are located at the bottom of the program hierarchy, and
the larger program units represented by the task can be split into small program
units as block programs that operate with the same execution condition (ON
condition).
Program
Block program 000
Task 0
Block program area 000
Block program 001
Block program n
Task 1
Block program area 001
Task n
11-3 Interrupt Tasks
11-3-1 Types of Interrupt Tasks
Interrupt tasks can be executed at any time in the cycle if any of the following
conditions are in effect.
I/O Interrupts
The I/O interrupt task will be executed when input to the Interrupt Input Unit is
ON.
Interrupt
Interrupt
Input Unit
454
CPU Unit
Program
Section 11-3
Interrupt Tasks
Scheduled Interrupts
A scheduled interrupt task will be executed at fixed intervals.
CPU Unit
Fixed interval
Interrupt
Program
Power OFF Interrupt
The power OFF interrupt task will be executed when power is turned OFF.
Note The execution time for the power OFF task must be less than 10 ms – (Power
OFF delay detection time).
CPU Unit
Interrupt
Power OFF
External Interrupts
Program
An external interrupt task will be executed when an interrupt is requested by an
Special I/O Unit, CS1 CPU Bus Unit, or Inner Board. The Special I/O Unit or CS1
Bus Unit, however, must be on the CPU Rack to request execution of an external
interrupt task.
Interrupt
Special I/O Unit,
CS1 CPU Bus Unit
or Inner Board
CPU Unit
Program
11-3-2 List of Interrupt Tasks
Type
I/O
Interrupts
00 to 31
Scheduled
Interrupts
0 and 1
Task
No.
100 to
131
2 and
3
Execution condition
Input from the Interrupt
Input Unit ON
(C200HS-INTO1)
Scheduled (fixed
intervals)
Setting procedure
Use the MSKS (SET
INTERRUPT MASK)
instruction to assign inputs
from Interrupt Input Units.
Use the MSKS (SET
INTERRUPT MASK)
instruction to set the
interrupt interval. See
Scheduled Interrupt Time
Units in PC Setup.
Number of
interrupts
32 (8 inputs
per Unit x 4
Interrupt
Input Units)
2 points
Application examples
Increasing response
speed to specific inputs
Monitoring operating
status at fixed intervals
Power OFF 1
Interrupt
When power turns OFF
(After the default power
OFF detection time +
power OFF detection
delay time)
See Power OFF Interrupt
Task and Power OFF
Detection Delay Time in PC
Setup.
1 point
Executing emergency
processing when power
shuts OFF.
External
Interrupts
0 to 255
When requested by an
Special I/O Unit or CS1
CPU Bus Unit on the
CPU Rack or by an
Inner Board
None (always valid)
256 points
Performing processing
required by Special I/O
Units, CS1 CPU Bus
Units, and the Inner
Board.
0 to
255
455
Section 11-3
Interrupt Tasks
Note Special I/O Units and CS1 CPU Bus Units must be on the CPU Rack to generate
external interrupts. There is no way to directly execute an external interrupt task
from a Unit on a CS1 Expansion Rack.
11-3-3 I/O Interrupt Tasks: Tasks 100 to 131
I/O interrupt tasks are disabled by default when cyclic task execution is started.
To enable I/O interrupts, execute the MSKS (SET INTERRUPT MASK) instruction in a cyclic task for the interrupt number for Interrupt Input Unit.
Example: The following example shows execution I/O interrupt task 103 when
interrupt input No. 3 of Interrupt Input Unit No. 0 is ON.
Note Do not enable unneeded I/O interrupt tasks. If the interrupt input is triggered by
noise and there isn’t a corresponding interrupt task, a fatal error (task error) will
cause the program to stop.
Interrupt Input Unit No. 0
I/O interrupt from Interrupt Input
Unit No. 0
Interrupt input number: Only 3 will
be enabled.
Cyclic task
The specified I/O interrupt will be enabled when the
MSKS instruction is
executed.
#00F7
Interrupt
Cyclic task
I/O interrupt task 103
PC Setup Settings for Power OFF Interrupt Task (Task Number: 1)
Address
Name
Description
Settings
Default
setting
Bit 15 at +225
Power OFF
INTERRUPT
TASK
If bit 15 of +225 is ON, then a power OFF interrupt
task will start if power turns OFF.
0: OFF,
1: ON
0
Bits 0 to 7 at
+225
Power OFF
Detection
Delay Time
Power OFF is recognized when this time plus the
default power OFF detection time (10 to 25 ms)
expires.
00 to 0A Hex:
0 to 10 ms
(1-ms units)
00 Hex
Interrupt Input Unit
Numbers, Input
Numbers, and I/O
Interrupt Task Numbers
456
Interrupt Input Unit No.
(See note.)
0
Input No.
I/O interrupt task
0 to 7
100 to 107
1
0 to 7
108 to 115
2
0 to 7
116 to 123
3
0 to 7
124 to 131
Section 11-3
Interrupt Tasks
Note Interrupt Input Unit numbers are in order from 0 to 3 starting on the left side of the
CPU Rack.
Interrupt Input Unit
Unit No.
CPU Unit
Operand S (the Second Operand) of MSKS: The rightmost 8 bits of 0008 Hex
correspond to the interrupt inputs of the Interrupt Input Unit. Interrupt input numbers 0 to 7 correspond to bits 0 to 7.
1
0 Hex
0 Hex
1
1
1
F Hex
0
1
1
1
7 Hex
11-3-4 Scheduled Interrupt Tasks: Tasks 2 and 3
Scheduled interrupt tasks are disabled in the default PC Setup at the start of cyclic task execution. Perform the following steps to enable scheduled interrupt
tasks.
1, 2, 3...
1. Execute the MSKS (SET INTERRUPT MASK) instruction from a cyclic task
and set the time (cycle) for the specified scheduled interrupt.
2. Set the scheduled interrupt time unit in PC Setup.
Note The interrupt time setting affects the cyclic task in that the shorter the interrupt
time, the more frequently the task executes and the longer the cycle time.
Example: The following examples shows executed scheduled interrupt task 2
every second.
Cyclic task
Interrupt number 4 will be executed
at an interrupt interval of 0064 Hex.
#0064
Scheduled interrupt time unit in PC
Setup = 10 ms (0.01 s)
Every second
Cyclic task
Interrupt
Scheduled interrupt task 2
457
Section 11-3
Interrupt Tasks
Interrupt Numbers and Scheduled Interrupt Task Number
Interrupt No.
Scheduled interrupt task
4
2
5
3
PC Setup Settings
Address
Bits 0 to 3 of 195
Name
Description
Scheduled
interrupt time units
Settings
Sets time unit for scheduled
interrupts to execute interrupt
tasks at fixed intervals.
00 Hex: 10 ms
01 Hex: 1.0 ms
Default setting
00 Hex
11-3-5 Power OFF Interrupt Task: Task 1
The power OFF interrupt task is disabled in the default PC Setup at the start of
cyclic task execution.
The power OFF interrupt task can be enabled in the PC Setup.
In the default PC Setup, the power OFF interrupt task will be stopped after
10 ms. The power OFF interrupt task must be executed in less than 10 ms.
If a power OFF detection delay time is set in the PC Setup, the power OFF interrupt task will be stopped after 10 ms minus the power OFF detection delay time
setting in the PC Setup. In this case, the power OFF interrupt task must execute
in less than 10 ms minus the power OFF detection delay time set in the PC Setup.
Example: If the power OFF detection delay time is set to 4 ms in PC Setup, then
execution time must be less than 10 minus 4 ms, or 6 ms.
Power OFF interrupt task
Less than 10 ms minus the
power OFF detection delay time
The default setting is 10 ms max.
Note A power OFF condition is recognized when the power supply falls below 85% of
the rated voltage, and the time it takes before the power OFF interrupt task actually executes is the default power OFF detection time (10 to 25 ms) plus the power OFF detection delay time in the PC Setup (0 to 10 ms). Cyclic tasks will be
executed for this amount of time.
Power supply < 85% of
the rated voltage
Power OFF
recognized
Cyclic task
Default power OFF
detection time plus
power OFF detection
delay time
CPU reset
(force end)
Power OFF interrupt task
Stop
10 ms minus the power
OFF detection delay time
Note Be sure that the power OFF interrupt task can be executed in less than 10 ms
minus the power OFF detection delay time set in the PC Setup. Any remaining
instructions will not be executed after this time has elapsed. The power OFF in-
458
Section 11-3
Interrupt Tasks
terrupt task will not be executed if power is interrupted during online editing. In
addition to the instructions that cannot be used in any interrupt task (refer to the
Programming Manual for details), the following instructions cannot be used in
the power OFF interrupt task: READ DATA FILE: FREAD(700), WRITE DATA
FILE: FWRIT(701), NETWORK SEND: SEND(090), NETWORK RECEIVE:
RECV(098), DELIVER COMMAND: CMND(490), TRANSMIT: TXD(236), RECEIVE: RXD(235), PROTOCOL MACRO: PMCR(260), I/O REFRESH:
IORF(097) for Special I/O Units, INTELLIGENT I/O READ: IORD(222), and INTELLIGENT I/O WRITE: IOWR(223).
Power OFF Interrupt Task Execution
Cyclic task
Power
OFF
Power OFF interrupt task 1
Power OFF interrupt task ON/OFF
setting in PC Setup: ON
CPU reset
11-3-6 External Interrupt Tasks: Tasks 0 to 255
External interrupt tasks can be received at any time.
Interrupt processing is performed at the CPU Unit in PCs containing an Inner
Board, Special I/O Units, or CS1 CPU Bus Units. Settings don’t have to be made
at the CPU Unit unless the program contains an external interrupt task for a particular task number.
Example: The following example shows an external interrupt generated from a
CS1W-SCB1 Serial Communications Board.
CPU Unit
Serial Communications Board
Interrupt
459
Section 11-3
Interrupt Tasks
When the Serial Communications Board’s response notification method is set
for interrupt notification (fixed number) or interrupt notification (reception case
number), the Board will request execution of an external interrupt task in the
CPU Unit after it receives data from its serial port and writes that data into the
CPU Unit’s I/O memory.
CPU Unit
Cyclic task
Specifies external interrupt task
number and requests interrupt
processing.
Serial Communications Board
Data
Interrupt task
I/O memory
Note
1. When the response notification method is set for interrupt notification (fixed
number), the Board requests execution of the interrupt task with the preset
task number.
2. When the response notification method is set for interrupt notification (reception case number), the external interrupt task number is calculated with
the specified formula and the Board requests execution of the interrupt task
with that task number.
3. If an external interrupt task (0 to 255) has the same number as a power OFF
task (task 1), scheduled interrupt task (task 2 or 3), or I/O interrupt task (100
to 131), the interrupt task will be executed for either interrupt condition (external interrupt or the other interrupt condition). As a rule, task numbers
should not be duplicated.
11-3-7 Interrupt Task Priority
Execution of another interrupt task will be ended to allow the power OFF interrupt task to execute. The CPU will reset but the terminated interrupt task will not
be executed following execution of the power OFF interrupt task.
460
Section 11-3
Interrupt Tasks
Interrupt during Interrupt Task Execution
If an interrupt occurs while another interrupt task is being executed, the task for
the interrupt will not be executed until the original interrupt finishes executing.
Cyclic task
Interrupt task A
Interrupt during
execution
Interrupt task B
Interrupt task A will continue
until it finishes executing.
Note If you do not want a specific I/O interrupt task number to be saved and executed
when it occurs while another interrupt task is being executed, execute the CLI
(CLEAR INTERRUPT) instruction from the other interrupt task to CLEAR the interrupt number saved internally. Scheduled interrupts and external interrupts
cannot be cancelled.
Cyclic task
Interrupt task 101 will be ignored while
another interrupt task is being executed.
Interrupt task A
Interrupt
during
execution
I/O interrupt task
Interrupt task 101 will
not be executed.
Multiple Interrupts Occurring Simultaneously
Interrupt tasks other than power OFF interrupt tasks will be executed in the following order of priority whenever multiple interrupts occur simultaneously.
I/O interrupt tasks > external interrupt tasks > scheduled interrupt tasks
Each of the various types of interrupt task will be executed in order starting from
the lowest number if more than one occurs.
Note Only one interrupt will be recorded in memory for each interrupt task and an interrupt will not be recorded for an interrupt that is already being executed. Because of the low order of priority of scheduled interrupts and because that only
one interrupt is recorded at a time, it is possible for a scheduled interrupt to be
skipped.
11-3-8 Interrupt Task Flags and Words
Maximum Interrupt Task Processing Time (A440)
The maximum processing time for an interrupt task is stored in binary data in
0.1-ms units and is cleared at the start of operation.
Interrupt Task with Maximum Processing Time (A441)
The interrupt task number with maximum processing time is stored in binary
data. Here, 8000 to 80FF Hex correspond to task numbers 00 to FF Hex.
A44115 will turn ON when the first interrupt occurs after the start of operation.
The maximum processing time for subsequent interrupt tasks will be stored in
461
Section 11-3
Interrupt Tasks
the rightmost two digits in hexadecimal and will be cleared at the start of operation.
Interrupt Task Error Flag (Nonfatal Error) (A40213)
If Interrupt Task Error Detection is turned ON in the PC Setup, the Interrupt Task
Error Flag will turn ON if an interrupt task error occurs.
Interrupt Task Error Flag (A42615)/Task Number Generating the Interrupt
Task Error (A42600 to 42611)
If A40213 turns ON, then the following data will be stored in A42615 and A42600
to A42611.
A40213
Interrupt Task Error (If Interrupt
Task Error Detection is turned ON
in the PC Setup)
Task Number when
Program Stopped (A294)
Interrupt Task Error
Description
If an interrupt task executes for
more than 10 ms during C200H
Special I/O Unit or SYSMAC
BUS Remote I/O refresh.
When trying to refresh I/O for a
large number of words using the
IORF instruction from an interrupt
task while an Special I/O Unit is
being refreshed by cyclic I/O
refreshing.
A42615
OFF
A42600 to 42611
The interrupt task number will be
stored in 12 bits of binary data
(interrupt task 0 to 255: 000 to
OFF Hex).
The unit number of the Special
I/O Unit being refreshed will be
stored in 12 bits of binary data
(unit No. 0 to 95: 000 to 05F
Hex).
ON
The type of task and the current task number when a program stops due to a
program error will be stored in the following locations.
Type
A294
Interrupt task
8000 to 80FF Hex (corresponds to
interrupt task No. 0 to 255)
0000 to 001F Hex (corresponds to task
No. 0 to 31)
Cyclic task
11-3-9 Application Precautions
Long Execution Times
with C200H Special I/O
Units or SYSMAC BUS
Be sure all interrupt tasks (I/O, scheduled, power OFF, and external interrupt
tasks) execute within 10 ms when using C200H Special I/O Units or SYSMAC
BUS Remote I/O.
If an interrupt task executes for more than 10 ms during C200H Special I/O Unit
or SYSMAC BUS remote I/O refreshing, an error will occur, A40206 (Special I/O
Unit Error Flag) will turn ON, and I/O refreshing will be stopped for Special I/O
Units. The CPU Unit, however, will continue to operate.
If Interrupt Task Error Detection is turned ON in the PC Setup, A40213 (Interrupt
Task Error Flag) will turn ON when an interrupt task error occurs, and the offending interrupt task number will be stored in A426 (Interrupt Task Error, Task Number). The CPU Unit however will continue to operate.
C200H Special I/O Unit
Interrupt task
Interrupt task
Up to 10 ms
or
Master SYSMAC
BUS Remote I/O Unit
SYSMAC BUS
Remote I/O
462
10 ms or
longer
Section 11-3
Interrupt Tasks
Executing IORF for a
Special I/O Unit
Never execute an IORF(097) (I/O REFRESH) instruction for a Special I/O Unit
from an interrupt task. If an IORF(097) instruction has to be executed from an
interrupt task, be sure to turn OFF cyclic refresh for the Special I/O Units in the in
PC Setup.
A multiple refresh interrupt task error will occur if you try to refresh a Special I/O
Unit (CS1 or C200H) with an IORF(097) instruction from an interrupt task while
that UNIT is also being refreshed by cyclic I/O refresh. If Interrupt Task Error
Detection is turned ON in the PC Setup when an interrupt task error occurs,
A40213 (Interrupt Task Error Flag) will turn ON and the offending interrupt task
number will be stored in A426 (Interrupt Task Error, Task Number). The CPU Unit
will continue running.
CS1 or C200H Special I/O Unit
Interrupt task
Do not executed
IORF(097) in an interrupt
task if cyclic refreshing is
enabled for Special I/O
Units in the PC Setup.
I/O refresh
Disable cyclic refreshing for Special I/O
Units in the PC Setup
before executing the
IORF(097) instruction
in an interrupt task.
Note The leftmost bits of A426 (Interrupt Task Error, Task Number) can be used to determine which of the above interrupt task errors occurred. (Bit 15: 10 ms or higher execution error if 0, multiple refresh error if 1)
PC Setup Settings
Address
Bit 14 at +128
Name
Description
Interrupt Task Error
Detection
Settings
Specifies whether or not to detect interrupt
task errors. The Interrupt Task Error Flag
(A40213) will be function when detection is
enabled.
0: Detection
enabled,
Default
setting
0
1: Detection
disabled
Related Auxiliary Area Flags/Words
Name
Interrupt Task Error
Flag
Interrupt Task Error,
Task Number
Address
A40213
A426
Description
Turns ON if an interrupt task executes for more than 10 ms during
C200H Special I/O Unit or SYSMAC BUS Remote I/O refresh, but the
CPU Unit will continue running. The ERR/ALM LED will light on the
front panel.
Turns ON if you try to refresh a Special I/O Unit with an IORF
instruction from an interrupt task while that Unit is being refreshed by
cyclic I/O refresh.
Contains the interrupt task number or the number of the Special I/O
Unit being refreshed.
(Bit 15 will be OFF when execution of an interrupt task requires 10 ms
or longer and ON when duplicated Special I/O Unit refreshing has
occurred.)
Disabling Interrupts
Processing will be interrupted and the interrupt task will be executed in the following instances.
• While an instruction is being executed
• During Special I/O Unit, CS1 CPU Bus Unit, or Inner Board refreshing
• During HOST LINK servicing
Data Concurrency
between Cyclic and
Interrupt Tasks
Data may not be concurrent if a cyclic and interrupt task are reading and writing
the same I/O memory addresses. Use the following procedure to disable interrupts during memory access by cyclic task instructions.
463
Section 11-4
Programming Device Operations for Tasks
• Immediately prior to reading or writing by a cyclic task instruction, use a DI
(DISABLE INTERRUPT) instruction to disable execution of interrupt tasks.
• Use an EI (ENABLE INTERRUPT) instruction immediately after processing in
order to enable interrupt task execution.
Cyclic task
Disabled
Interrupt task
Reading and writing I/O
memory common to interrupt
tasks.
Enabled
Processing with interrupt task
execution enabled
Interrupt task
Problems may occur with data concurrency even if DI(693) and EI(694) are used
to disable interrupt tasks during execution of an instruction that requires response reception and processing (such as a network instruction or serial communications instruction).
11-4 Programming Device Operations for Tasks
11-4-1 Using Multiple Cyclic Tasks
Use the CX-Programmer to create more than one cyclic task. A Programming
Console cannot be used to create new cyclic tasks. Be sure to use a CX-Programmer to allocate the task type and task number for programs that are
created.
• Multiple cyclic tasks created and transferred to a CPU Unit from the CX-Programmer can be monitored or edited from a Programming Console.
• The Programming Console can be used to create one cyclic task and one or
more interrupt tasks simply by using the Programming Console’s All Clear
function and specifying Interrupt Tasks. Only interrupt tasks 1, 2, 3, and 100
through 131 can be created with a Programming Console.
• The cyclic tasks will start when the PC is switched to MONITOR or RUN mode.
464
Section 11-4
Programming Device Operations for Tasks
11-4-2 Programming Device Operations
Programming Console
A task is handled as the entire program on the Programming Console. Access
and edit a program with a Programming Console by specifying CT00 to CT31 for
a cyclic task or IT000 to IT255 for an interrupt task.
CLR
FUN
0
CHG
0: Cyclic task, 1: Interrupt task
Cyclic task No.?
Interrupt task No.?
00
Enter 00 to 31.
1
Enter 000 to 255.
Write
Write
Note A Programming Console cannot create new cyclic tasks.
CX-Programmer
Specify the task type and number as attributes for each program.
1, 2, 3...
1. Select View/Properties, or click the right button and select Properties on
the popup menu, to display the program that will be allocated a task.
2. Select the General tab, and select the Task Type and Task No. For the cyclic task, click the check box for Operation start to turn it ON.
465
SECTION 12
File Memory Functions
This section describes the functions used to manipulate file memory.
12-1 File Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12-2 Manipulating Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12-2-1 Programming Devices (Including Programming Consoles) . . . . . . . . . . . . . . . . .
12-2-2 FINS Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12-2-3 FREAD(700), FWRIT(701), and CMND(490) . . . . . . . . . . . . . . . . . . . . . . . . . . .
12-2-4 Replacement of the Entire Program During Operation (-EV1 Only) . . . . . . . . . .
12-2-5 Automatic Transfer at Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12-2-6 Simple Backup Function (-EV1 Only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12-3 Using File Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
468
480
481
483
485
490
496
498
503
467
Section 12-1
File Memory
12-1 File Memory
The following media can be used as memory for storing files.
1, 2, 3...
1. Memory Cards
2. A specified range in the EM Area
Both types of memory can be used to store the entire user program, I/O memory,
and parameter areas as files.
CPU Unit
File
Memory
Card
File
File
EM area
File
Types of File Memory
Category
Memory Cards
EM File Memory
Type
Capacity
Model
Flash
memory
8 MB
15 MB
30 MB
48 MB
EM area
capacity of CPU
Unit
(Max. capacity
for
CS1H-CPU67:
832 KB)
HMC-EF861
HMC-EF171
HMC-EF371
HMC-EF571
From the
specified bank in
the EM area of
I/O memory to
the last bank
(specified in PC
Setup)
RAM
EM area
Bank 0
Bank 1
Bank n
Bank C
EM File
Memory
Note
1, 2, 3...
468
File data recognized by
the CPU Unit
1) Entire user program
2) Specified range in I/O
memory
3) Parameter area data
(PC Setup and other
settings)
See note 4.
Allowed file
operations
All are possible.
(See page 478
for details.)
The automatic
transfer at
startup function
cannot transfer
data from EM
File Memory.
(See page 478
for details.)
1. Refer to 3-2 File Memory for details on installing and removing Memory
Cards.
2. Initialize the Memory Card or EM File Memory before using it for the first
time. Refer to 12-3 Using File Memory for details on initialization.
3. The HMC-AP001 Memory Card Adapter can be used to mount a Memory
Card in the PC card slot of a personal computer to use the Memory Card as a
storage device.
4. When the CX-Programmer is being used, the CPU Unit can recognize symbol tables (including I/O comments) and comments (rung comments and
comments.) The transfer destination is the Memory Card when a Memory
Card is installed or EM File Memory if a Memory Card is not installed.
Memory Card Precautions:
1. Never turn the power OFF or remove the Memory Card when the Memory
Card is being accessed by the CPU. (Press the Memory Card power supply
switch and wait for the BUSY indicator to go OFF before removing the
Memory Card.) It is possible for the Memory Card to become unusable if the
PC is turned off or the Memory Card is removed while the Card is being accessed by the CPU.
Section 12-1
File Memory
2. Insert the Memory Card with the label facing to the right. The Memory Card
or PC can be damaged by forcing the Memory Card in the wrong direction.
3. It takes several seconds for the CPU Unit to recognize the Memory Card after the Memory Card has been installed. If the Memory Card might be accessed immediately after turning ON the power or inserting the Memory
Card, program the Memory Card Detected Flag (A34315) as a normally
open condition as shown in the following diagram (-EV1 only).
Execution
condition
Memory Card File Memory
Detected Flag Operation Flag
File Data
User Program
Entire program including
task attributes
Specified Range in I/O Memory
Entire range or specified part of
one memory area
Parameter Area Data
Initial settings used in the
CPU Unit.
CS1 CPU Bus
Unit settings area
Routing tables
Specified part
Entire program
I/O table
or
PC Setup
Entire area
Symbol Tables
Tables of variables used
by the CX-Programmer
Symbols, addresses, data
types, I/O comments
Comments
Comments used by the
CX-Programmer
Rung comments
Comments
Files
Files are formatted in DOS, and therefore can be used as regular files on a Windows computer.
Files are identified by file names and extensions. A file name is written using the
following characters: Letters A to Z, numbers 0 to 9, !, &, $, #, ‘, {, }, –, ^, (, ), and _
The following characters cannot be used in file names: ,, ., /, ¥, ?, *, “, :, :, <, >, =,
+, space
The filename extensions depend upon the type of file being stored. Data files
can have extensions IOM, TXT, CSV, or IOR. (TXT, CSV, and IOR extensions:
-EV1 only.) Program files have the extension OBJ and parameter files have the
extension STD. The location of a file in memory can be specified in the directory,
and a directory can be up to 5 subdirectories deep (counting the root directory).
469
Section 12-1
File Memory
File Types, Names, and Extensions
There are 3 types of files that can be managed (read and written) by the CPU
Unit.
• General-purpose files:
These files can be accessed (read or written) with Programming Devices,
FINS commands, instructions, or Auxiliary Area control bit operations. The file
names can be defined freely by the user.
• Automatic Transfer at Startup files:
These files are automatically transferred from the Memory Card to the CPU
Unit when the power is turned ON. The file names are fixed as AUTOEXEC or
ATEXEC.
• Backup files (-EV1 only):
These files are transferred between the Memory Card and CPU Unit by the
backup function. The filenames are fixed as BACKUP.
General-purpose Files
Type
Data File
Name1
********
The following table shows file names and extensions of general-purpose files.
Extension
.IOM
.TXT
Description
Specified range in
I/O memory
.CSV
Program File
********
.OBJ
Entire user
program
Parameter
Area File
********
.STD
PC Setup,
registered I/O
table, routing
tables, CS1 CPU
BUS Unit
settings3, etc.
Note
470
Explanation
• Data from start to end word in Binary format
word units (16 bits) located in one TXT format2
area.
(non-delimited or
• The area can be the CIO, HR, tab-delimited)
WR, AR, DM, or EM Area.
CSV format2
(comma-delimited)
• All cyclic and interrupt tasks as well as task data for one
CPU Unit.
• Includes all initial settings for one CPU Unit.
• The user does not have to distinguish parameter data in
the file by type.
• Initial setting data can be written as a file or read from a
file automatically simply by reading or writing a file with
an .STD extension from/to the CPU Unit.
1. File names, represented by “********” above, consist of up to 8 ASCII characters.
2. The TXT and CSV file formats: -EV1 only.
3. One example of the CS1 CPU Bus Unit settings would be the Data Link
Tables. Refer to the operation manuals for specific Units for other setup
data.
Section 12-1
File Memory
Files Automatically Transferred at Startup
Type
Data File
Name1
Extension
AUTOEXEC
ATEXECDM
.IOM
Description
Explanation
I/O memory data
(Contains the specified
number of words of data
beginning at D20000.)
• Store DM data beginning at D20000 in a file
named AUTOEXEC.IOM.
I/O memory data2
(Contains the specified
number of words of data
beginning at D00000.)
.IOM
• At startup, all of the data in the file will be
transferred to the DM Area beginning at
D20000.
• This file does not have to be on the Memory
Card when the automatic transfer at startup
function is being used.
• Store DM data beginning at D00000 in a file
named ATEXECDM.IOM.
• At startup, all of the data in the file will be
transferred to the DM Area beginning at
D00000.
• This file does not have to be on the Memory
Card when the automatic transfer at startup
function is being used.
Note The data in this file has higher priority
if it overlaps the DM data contained in
AUTOEXEC.IOM.
ATEXECE
EM Area data (bank )2
(Contains the specified
number of words of data
beginning at
E_00000.)
.IOM
• Store data for EM bank beginning at
E_00000 in a file named ATEXECE.IOM. The maximum bank number
depends upon the model of CPU Unit being
used.
• At startup, all of the data in the file will be
transferred to EM bank beginning at
E_00000.
Program File
Parameter
Area File
AUTOEXEC
AUTOEXEC
.OBJ
Entire user program
.STD
PC Setup, registered I/O
table, routing tables,
CPU Bus Unit settings3,
etc.
• This file does not have to be on the Memory
Card when the automatic transfer at startup
function is being used.
• The file does not have to be on the Memory
Card even when automatic transfer at startup is specified.
• All cyclic and interrupt task programs as
well as task data for one CPU Unit.
The file must be on the Memory Card when
automatic transfer at startup is specified.
Includes all initial settings for one CPU Unit.
The user does not have to distinguish
parameter data in the file by type.
Initial setting data will automatically be
stored at specific locations in the CPU Unit
at startup
Note
1. Make sure the names of the files to be transferred automatically at startup
are AUTOEXEC or ATEXEC.
2. The ATEXECDM.IOM and ATEXECE.IOM files: -EV1 only.
3. One example of the CS1 CPU BUS Unit settings would be the Data Link
Tables. Refer to the operation manuals for specific Units for other setup
data.
471
Section 12-1
File Memory
The files in the following table are created automatically when data is transferred
to and from the Memory Card during backup operation.
Backup Files (-EV1 Only)
Type
Data file
Name1
Extension
Description
Explanation
BACKUP
.IOM
DM Area words
• Contains DM data from D20000 to D32767.
allocated to Special • This file must exist on the Memory Card when readI/O Units, CS1 CPU
ing data from the Memory Card during backup.
Bus Units, and Inner
Boards
BACKUPIO
.IOR
I/O memory data
areas
BACKUPDM .IOM
BACKUPE .IOM
General-purpose
DM Area
General-purpose
EM Area
• Contains all of the data in the CIO, WR, HR, and AR
data areas as well as timer/counter Completion
Flags and PVs.2
• This file must exist on the Memory Card when reading data from the Memory Card during backup.
• Contains DM data from D00000 to D19999.
• This file must exist on the Memory Card when reading data from the Memory Card during backup.
Contains all of the EM data for EM bank with
addresses ranging from E_00000 to E_32767.
(The maximum bank number depends upon the
model of CPU Unit being used.)
This file must exist on the Memory Card when
reading data from the Memory Card during
backup.
Program file
BACKUP
.OBJ
Entire user program
• When data is backed up to the Memory Card, all of
the data in each EM bank is automatically written to
a separate file.
• Contains all cyclic and interrupt task programs as
well as task data for one CPU Unit.
• This file must exist on the Memory Card when reading data from the Memory Card during backup.
Parameter file
.STD
Note
PC Setup,
registered I/O table,
routing tables, CS1
CPU Bus Unit
settings3, etc.
• Contains all initial settings for one CPU Unit.
• The user does not have to distinguish parameter
data in the file by type.
• This file must exist on the Memory Card when reading data from the Memory Card during backup.
1. Make sure the names of the files used for backup are BACKUP.
2. The CIO Area, WR Area, Timer/Counter Completion Flags and PVs, and
force-set/force-reset data that is read from the Memory Card at startup will
be cleared. This data can be retained with the following PC Setup settings:
IOM Hold Bit Status at Startup and Forced Status Hold Bit Status at Startup.
3. One example of the CS1 CPU Bus Unit settings would be the Data Link
Tables. Refer to the operation manuals for specific Units for other setup
data.
When CX-Programmer is being used, symbol tables (containing symbols, addresses, and I/O comments) can be handled as files.
File type
File name
Extension
Contents
Symbol table file
SYMBOLS
.SYM
Global and local symbol tables
Comment file
COMMENTS
.CMT
Rung comments and comments
The symbol table and comment files can be transferred between the CPU Unit
and Memory Card or EM file memory with the CX-Programmer’s project transfer
operation.
When CX-Programmer version 1.2 or higher is being used, the symbol table and
comment files can also be transferred between the personal computer’s RAM
and a memory storage device.
472
Section 12-1
File Memory
The CX-Programmer can also be used to store only the PC Setup as a file. The
file extension will be .STD, but it cannot be used for automatic transfer to the
CPU Unit at startup.
Directories
It is possible to access files in subdirectories with CS1-series PCs, but Programming Consoles can access files only when they are in the root directory. The
maximum length of a directory path is 65 characters. Be sure not to exceed the
maximum number of characters when creating subdirectories in the Memory
Card with a program such as Windows.
File Size
The size of files in bytes can be calculated with the equations in the following
table.
File type
Data files (.IOM)
File size
(Number of words × 2) + 48 bytes
Example: Entire DM Area (D00000 to D32767)
(32,768 words × 2) + 48 = 65,584 bytes
Data files (.TXT or .CSV) The file size depends upon the number of delimiters and
carriage returns being used. The delimiter code is one
byte and the carriage return code is two bytes.
Example 1: Non-delimited words, no carriage return
123456789ABCDEF012345678 occupies 24 bytes.
Example 2: Delimited words, carriage return every 2
fields
1234,5678↵
9ABC,DEF0↵
1234,5678↵
occupies 33 bytes.
Example 3: Delimited double words, carriage return
every 2 fields
56781234,DEF01234↵
56781234↵
occupies 29 bytes.
Program files (.OBJ)
(Number of steps used × 4) + 48 bytes (See note.)
Parameter files (.STD)
16,048 bytes
Note Calculate the number of steps in the program file by subtracting the available UM
steps from the total UM steps. These values are shown in the CX-Programmer’s
Cross-Reference Report. Refer to the CX-Programmer User Manual for details.
473
Section 12-1
File Memory
Data Files
General-purpose Files
1, 2, 3...
Extension
Data format
.IOM
Binary
.TXT
Non-delimited
(See notes.) words
1. General-purpose data files have filename extensions IOM, TXT, or CSV.
(The TXT and CSV files: -EV1 only.)
Contents
Dedicated CS1-series data format with header.
ASCII This format is created by converting one-word fields of I/O
format memory (4-digit hexadecimal) to ASCII and packing the
fields without delimiters. Records can be delimited with
carriage returns.
Non-delimited
This format is created by converting two-word fields of I/O
double words
memory (8-digit hexadecimal) to ASCII and packing the
fields without delimiters. Records can be delimited with
carriage returns.
Tab-delimited
This format is created by converting one-word fields of I/O
words
memory (4-digit hexadecimal) to ASCII and delimiting the
fields with tabs. Records can be delimited with carriage
returns.
Tab-delimited
This format is created by converting two-word fields of I/O
double words
memory (8-digit hexadecimal) to ASCII and delimiting the
fields with tabs. Records can be delimited with carriage
returns.
.CSV
Comma-delimited
This format is created by converting one-word fields of I/O
(See notes.) words
memory (4-digit hexadecimal) to ASCII and delimiting the
fields with commas. Records can be delimited with
carriage returns.
Comma-delimited
This format is created by converting two-word fields of I/O
double words
memory (8-digit hexadecimal) to ASCII and delimiting the
fields with commas. Records can be delimited with
carriage returns.
Words/field
--1 word
2 words
1 word
2 words
1 word
2 words
Note a) Reading and Writing TXT and CSV Data Files:
TXT and CSV data files can be read and written with FREAD(700)
and FWRIT(701) only.
b) Precautions on Characters:
Data cannot be written to I/O memory properly if the TXT or CSV
file contains characters other than hexadecimal characters
(0 to 9, A to F, or a to f.)
c) Precautions on Field Size:
When words are being used, data cannot be written to I/O
memory properly if the TXT or CSV file contains fields that are not
4-digit hexadecimal. Likewise, when double words are being
used, data cannot be written properly if the file contains fields that
are not 8-digit hexadecimal.
d) Storage Order:
When words are being used, I/O memory data is converted to
ASCII and stored in one-word fields in order from the lowest to the
highest I/O memory address.
When double words are being used, I/O memory data is converted to ASCII and stored in two-word fields in order from the lowest to the highest I/O memory address. (Within the two-word
fields, the higher-address word is stored first and the lower-address word is stored second.)
e) Delimiters:
When there are no delimiters, the fields are packed consecutively
and then stored. When delimited by commas, commas are inserted between fields before they are stored. When delimited by
tabs, tab codes are inserted between fields before they are
474
Section 12-1
File Memory
stored.
When delimiters (commas or tabs) are specified in FREAD(700),
the data is read as delimited data with one-word delimiters (commas or tabs).
f) Carriage Returns:
Data is packed consecutively when carriage returns are not used.
When carriage returns are used, a carriage return code is inserted
after the specified number of fields. An offset from the beginning
of the file (starting read word or starting write word) cannot be specified in the FREAD(700)/FWRIT(701) instructions if carriage returns are used in the file.
g) Number of Fields:
The overall amount of data in the file depends upon the number of
fields (number of write items) specified in the FWRIT(701) instruction and the number of words/field. There is one word/field when
words are used and two words/field when double words are used.
2. Data files do not contain information indicating what data is stored, i.e., what
memory area is stored. Be sure to give file names that indicate the contents,
as shown in the examples below, to aid in file management.
Examples: D00100.IOM, CIO0020.IOM
Data from the beginning of the file will be written starting at the address specified in I/O memory even if the data originally written to the data file (IOM,
TXT, or CSV) is not from the same area. For example, if CIO data in a file is
written to the DM Area from a Programming Device, the data will be read to
the DM Area of the CPU Unit without any indication that the area is different.
3. Data files (IOM, TXT, or CSV) store a specified range of data from one area.
A number of words larger than the size of the data area cannot be written as
a data file.
Note Data files with the TXT and CSV format contain hexadecimal (0 to 9, A to F) data
from I/O memory that has been converted to ASCII. This data format allows the
I/O memory numerical data to be exchanged with spreadsheet programs. The
data format stored in the file is not the same as the ASCII data format stored in
the PC for processing by the Text String Processing Instructions. The text string
data files used by a spreadsheet program therefore cannot be read into I/O
memory.
IOM Data File Structure
The following illustration shows the binary data structure of a data file
(ABC.IOM) containing four words from I/O memory: 1234 Hex, 5678 Hex, 9ABC
Hex, and DEF0 Hex. The user, however, does not have to consider the data format in normal operations.
I/O memory
48 bytes (used by system)
8 bytes
Contents of ABC.IOM
CSV/TXT Data File
Structure (Single Word)
The following illustration shows the data structure of a CSV data file (ABC.CSV)
with single-word fields containing four words from I/O memory: 1234 Hex, 5678
475
Section 12-1
File Memory
Hex, 9ABC Hex, and DEF0 Hex. The structure of the TXT file with single-word
fields is the same.
Converted
to ASCII
I/O memory
4 bytes
Delimiter
4 bytes
The file displayed as text.
Delimiter
Contents of ABC.CSV
CSV/TXT Data File
Structure (Double Word)
The following illustration shows the data structure of a CSV data file (ABC.CSV)
with double-word fields containing four words from I/O memory: 1234 Hex, 5678
Hex, 9ABC Hex, and DEF0 Hex. The structure of the TXT file with double-word
fields is the same.
Converted to
ASCII (Upper
word first)
I/O memory
8 bytes
The file displayed as text.
Delimiter
Contents of ABC.CSV
Creating Data Files with
Spreadsheet Software
1, 2, 3...
476
Use the following procedure to create TXT and CSV data files with spreadsheet
software such as Microsoft Excel.
• Set the cell contents to numeric or characters.
• Input 4 characters in each cell if single-word fields are being used or 8 characters if double-word fields are being used. For example, if single-word fields are
being used input 000A, not just A.
• Be sure to input only hexadecimal characters (0 to 9, A to F, or a to f) in the cells.
Other characters and codes cannot be used.
When you want to store hexadecimal digits in I/O memory, it is helpful to convert
the spreadsheet’s decimal inputs to hexadecimal. Use the following procedure
to convert to hexadecimal.
1. Select Add-Ins... from the Tools Menu.
2. Select Analysis ToolPak in the Add-Ins Menu.
3. Select Function from the Insert Menu at the cell where the function will be
used.
4. Select DEC2HEX (number, digits) from Engineering in the Category Field.
5. When converting to 4-digit hexadecimal, just select the desired cell at the
number variable.
When converting to 8-digit hexadecimal, input the IF(0<cell location,cell
location,4294967296+cell location) condition at the number variable.
Section 12-1
File Memory
• Example 1: Inputting non-negative decimal values.
Item
Converting unsigned decimal to 4-digit
hexadecimal
Function DEC2HEX(cell_location,4)
used
Example Input 10 in decimal and convert to 000A in 4-digit
hexadecimal.
Converting unsigned decimal to 8-digit
hexadecimal
DEC2HEX(cell_location,8)
Input 10 in decimal and convert to 0000000A in
8-digit hexadecimal.
• Example 2: Inputting signed decimal values.
Item
Converting signed decimal to 4-digit hexadecimal
Function DEC2HEX(IF(0=cell_location,cell_location,65536+
used
cell_location),4)
Example Input –10 in decimal and convert to FFF6 in 4-digit
hexadecimal.
Converting signed decimal to 8-digit hexadecimal
DEC2HEX(IF(0=cell_location,cell_location,
4294967296+cell_location),8)
Input –10 in decimal and convert to FFFFFFF6 in
8-digit hexadecimal.
There are 3 kinds of files that are transferred automatically at startup when the
automatic transfer at startup function is being used.
Data Files Transferred
Automatically at Startup
• AUTOEXEC.IOM: DM words allocated to Special I/O Units and Inner Boards.
The contents of this file are transferred to the DM Area beginning at D20000
when power is turned ON.
• ATEXECDM.IOM: General-purpose DM words
The contents of this file are transferred to the DM Area beginning at D00000
when power is turned ON.
• ATEXECE.IOM: General-purpose EM words
The contents of this file are transferred to the EM Area beginning at E_00000
when power is turned ON.
When creating the data files listed above, always specify the first address shown
above (D20000, D00000, or E_00000) and make sure that the size of the file
does not exceed the capacity of the specified data area.
All of the data in each file will always be transferred starting at the specified first
address (D20000, D00000, or E_00000).
Note
1. When creating the AUTOEXEC.IOM, ATEXECDM.IOM, or ATEXECE.IOM file from a Programming Device (Programming Console or CXProgrammer), always specify the proper first address (D20000, D00000, or
E_00000) and make sure that the size of the file does not exceed the capacity of the DM Area or specified EM bank. The contents of the file will always be transferred starting at the proper first address (D20000, D00000, or
E_00000) even if another starting word is specified, which could result in
the wrong data overwriting the contents of that part of the DM Area or EM
bank. Furthermore, if the capacity of the DM Area or EM bank is exceeded
(as is possible when making settings from the CX-Programmer), the remaining data will be written to EM bank 0 if the DM Area is exceeded or the
following EM bank if an EM bank is exceeded.
2. When using the CX-Programmer, you can specify a data file that will exceed
the maximum DM Area address D32767 or maximum EM Area address of
477
Section 12-1
File Memory
E_32767. If the AUTOEXEC.IOM file exceeds the boundary of the DM
area, all remaining data will be written to the EM Area starting at E0_00000
and continuing in order of memory address and banks through the final
bank. It is thus possible to automatically transfer data to both the DM and EM
Areas at startup. Likewise, if the ATEXECE.IOM file is larger than an EM
bank, the remaining data will be written to subsequent EM banks.
3. The System Setups for Special I/O Units, CPU Bus Units, and the Inner
Board can be changed by using different AUTOEXEC.IOM files containing
different settings for the Special I/O Unit Area (D20000 to D29599), CPU
Bus Unit Area (D30000 to D31599), and the Inner Board Area (D32000 to
D32099). Memory Cards can thus be used to create libraries of System Setup data for Special I/O Units, CPU Bus Units, and Inner Boards for different
systems or devices.
Backup Data Files
(-EV1 Only)
The backup function creates 4 kinds of data files as described below.
To backup data, turn pin 7 ON and turn pin 8 OFF on the CPU Unit’s DIP switch,
insert the Memory Card, and press and hold the Memory Card Power Supply
Switch for three seconds. The four backup files (BACKUP.IOM, BACKUPIO.IOR, BACKUPDM.IOM, and BACKUPE.IOM) will be created automatically and written to the Memory Card.
The four backup files are used exclusively by the backup function, although
three of the files (BACKUP.IOM, BACKUPDM.IOM, and BACKUPE.IOM) can
be created with Programming Device operations. (BACKUPIO.IOR cannot be
created with Programming Device operations.)
Description of File
Operating Procedures
The following table summarizes the 6 methods that can be used to read and
write files.
Read: Transfers files from file memory to the CPU Unit.
Write: Transfers files from the CPU Unit to file memory.
Operating
procedure
Medium
File name
Programming Device
(including
Programming
Consoles)
Memory Card
EM file
memory
Any valid file
name
FINS command
(See note 1.)
Memory Card
EM file
memory
Any valid file
name
FREAD(700) and
FWRIT(701)
Instructions
Memory Card
EM file
memory
Any valid file
name
Auxiliary Area control Memory Card
bit operation
replaces the entire
program during
operation.
(-EV1 only)
Automatic Transfer
Memory Card
at Startup
Any valid file
name
Backup operation
(-EV1 only)
BACKUP
Memory Card
Note
478
AUTOEXEC or
ATEXEC
Description
Entire
program
Data Area
data (See
note 3.)
Parameter
Area data
Read
Write
Other operations
(See note 2.)
Read
Write
Other operations
(See note 2.)
Read data from
one file.
Write data to
one file.
Read
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
(See note 4.)
Not possible
OK
OK
OK
OK
OK
OK
OK
Not possible
Not possible
OK
Not possible
OK
Not possible Not possible
Read
Write
Read
Write
OK
Not possible
OK
OK
OK
Not possible
OK
OK
OK
Not possible
OK
OK
1. FINS commands for file memory operations can be sent from host computers connected via a Host Link, another PC connected to a network (using
Section 12-1
File Memory
CMND(490)), or the local PC’s program (using CMND(490)). File memory
operations cannot be executed using CMND(490) in the same CPU Unit for
which the file memory operations are being performed.
2. Other Operations: Format file memory, read file data, write file data, change
file name, read file memory data, delete file, copy file, create subdirectory,
and change file name.
3. Data files with the TXT or CSV formats can be read and written only with the
FREAD(700) and FWRIT(701) instructions. They cannot be read and written with a Programming Device.
4. Version V1.2 and higher versions of the CX-Programmer can be used to
transfer program files (.OBJ) between the computer’s RAM and a storage
device.
Applications
File memory can be used for the following applications.
Data Files
In this application, DM Area data settings (for Special I/O Units, CS1 CPU Bus
Units, and Inner Boards) are stored in the Memory Card. If the data file is named
AUTOEXEC.IOM, the settings stored in the file will be automatically transferred
when power is turned ON.
Data in an allocated DM area.
Example: ABC.IOM
In this application, operation data (trends, quality control, and other data) generated during program execution is stored in EM file memory using the WRITE
DATA FILE instruction (FWRIT(701)).
Trends, etc.
EM file memory
Note Data that is often accessed, such as trend data, is better stored in EM file
memory rather than on a Memory Card.
ASCII Data Files
(.TXT and .CSV)
(-EV1 Only0
Production data that has been saved on the Memory Card in the TXT or CSV
format can be transferred to a personal computer via a Memory Card Adapter
and edited with a spreadsheet program.
I/O memory data stored
in TXT or CSV format
Spreadsheet program
Via Memory Card Adapter
Memory Card
Conversely, data such as Special I/O Unit settings can be created with a spreadsheet program in TXT or CSV format, stored on a Memory Card, and read to the
CPU Unit by FREAD(700).
479
Manipulating Files
Section 12-2
Program Files (.OBJ)
In this application, programs that control different processes are are stored on
individual Memory Cards. The entire PC configuration (program, PC Setup, etc.)
can be changed by inserting a different Memory Card and using the automatic
transfer at startup function.
A.OBJ
C.OBJ
B.OBJ
The entire program can be replaced during operation from the program itself
(without a Programming Device) using an Auxiliary Area control bit (-EV1 only).
During operation
.OBJ
Replace program.
Parameter Area Files
(.STD)
In this application, the PC Setup, routing tables, I/O table, and other data for particular devices or machines are stored in Memory Cards. The data can be transferred to another device or machine just by switching the Memory Card.
Use A.STD.
Backup Files (-EV1 Only)
The backup function can be used to store all of the CPU Unit’s data (the entire I/O
memory, program, and parameter area) on the Memory Card without a Programming Device. If a problem develops with the CPU Unit’s data, the backedup data can be restored immediately.
Symbols Table Files
The CX-Programmer can be used to save program symbols and I/O comments
in symbols table files called SYMBOLS.SYM in Memory Cards or EM file
memory.
Comment Files
The CX-Programmer can be used to save program rung comments and comments in comment files called COMMENTS.CMT in Memory Cards or EM file
memory.
12-2 Manipulating Files
The following procedures are used to read, write and otherwise work with files
using the following methods.
480
Section 12-2
Manipulating Files
• Programming Devices
• FINS commands
• FREAD(700), FWRIT(701), and CMND(490) instructions in the user program
(CMND(490): -EV1 only.)
• Replacement of the entire program using AuxilIary Area control bits (-EV1
only)
• Automatic transfer at startup
• Backup function (-EV1 only)
12-2-1 Programming Devices (Including Programming Consoles)
The following operations are available through Programming Devices.
Operation
Reading files (transfer from file memory
to CPU Unit)
Writing files (transfer from CPU Unit to
file memory)
Comparing files (compare files in the
CPU Unit and file memory)
Formatting file
Memory Cards
memory
EM files
Changing file names
OK
Programming
Console
OK
OK
OK
Not possible
OK
OK
OK
OK
OK
OK
Not possible
Reading file memory data
OK
Not possible
Deleting files
OK
OK
Coping files
OK
Not possible
Deleting/Creating subdirectories
OK
Not possible
Programming
Device
Create user program file.
Programming
Console
CX-Programmer
Create I/O memory file
Programming Programming
Console
Device
CPU Unit
CPU Unit
Memory Card
User
program
Memory Card
User
program
User
program
Note
EM file memory
I/O
memory
I/O
memory
I/O
memory
EM file memory
1. Create any required volume labels using Windows Explorer.
2. File memory uses the Windows quick format. If formatting error occur for
Memory Cards, they can be formatted with the normal Windows format
command.
3. The time and date for files written for transfers from the CPU Unit to file
memory will be taken from the clock in the CPU Unit.
481
Section 12-2
Manipulating Files
Create parameter file.
Programming
Device
Programming
Console
CPU Unit
Memory Card
Parameter
area
Parameter
area
Parameter
area
EM file memory
A Memory Card can be installed in a computer’s PC Card slot with the HMCAP001 Memory Card Adapter (sold separately). Installing a Memory Card in the
computer allows data files (.IOM, .TXT, or .CSV), program files (.OBJ), and parameter files (.STD) to be treated as standard MS-DOS files in a Windows environment. Data can be read from and written to the Memory Card like any other
computer storage device or disk.
HMC-AP001 Memory Card Adapter
Memory Card
Computer’s PC Card slot
Programming Console
CLR
FUN
SHIFT
CONT
#
↓
482
000000 CT00
0: Transfer
1: Verify
0: Initialize
1: Delete
Section 12-2
Manipulating Files
The following operations can be performed.
Item 1
0: Send
Item 2
Item 3
0: PC to Memory Card
Select OBJ, CIO, HR, WR,
AR, DM, EM, or STD.
Select OBJ, CIO, HR, WR,
AR, DM, EM, or STD.
Select OBJ, CIO, HR, WR,
AR, DM, EM, or STD.
Enter 9713 (Memory Card)
or 8426 (EM file memory).
Select OBJ, CIO, HR, WR,
AR, DM, EM, or STD.
1: Memory Card to PC
1: Verify
2: Initialize
3: Delete
Item 4
Item 5
Set transfer start and
end addresses.
Set transfer start and
end addresses.
Set comparison start
and end addresses.
---
Media type, file name
Media type, file name
---
Media type, file name
Media type, file name
---
Note The file types are shown in the following table.
Symbol
File type
OBJ
Program file (.OBJ)
Data file (.IOM)
CIO
HR
WR
AR
DM
EM0_
STD
CIO Area
HR Area
WR Area
Auxiliary Area
DM Area
EM Area
Parameter file (.STD)
Use the following procedure for file memory operations.
CX-Programmer
1, 2, 3...
1. Double-click the Memory Card icon in the Project Window with the CPU Unit
online. The Memory Card Window will be displayed.
2. To transfer from the CPU Unit to file memory, select the program area, I/O
memory area, or parameter area in the project work space, select Transfer
from the File Memory, and then select transfer to the Memory Card or to EM
file memory.
or To transfer from file memory to the CPU Unit, select file in file memory and
then drag it to the program area, I/O memory area, or parameter area in the
project work space and drop it.
Note Use project transfer operations to create and read symbol table files (SYMBOLS.SYM) and comment files (COMMENTS.CMT) on the CX-Programmer.
12-2-2 FINS Commands
The CPU Unit can perform the following file memory operations when it receives
the proper FINS command. These are similar to the Programming Device functions.
483
Section 12-2
Manipulating Files
FINS Commands via Host Link
A computer connected via a Host Link System can send a FINS command with a
Host Link header and terminator.
Host computer
CPU Unit
FINS command
Memory Card
I/O
memory
User
program
Parameter area
EM file memory
FINS Command from Another Network PC
Another PC on a network can send FINS command using CMND(490).
CPU Unit
I/O
memory
Another PC on
the network
User
program
CMND
instruction
Parameter area
Memory Card
EM file memory
FINS command
Note
1. If the CPU Unit is not a V1 or higher version, it cannot execute CMND(490) to
issue a FINS command to itself and perform file operations. With V1 and
higher versions, CMND(490) can be used to issue a FINS command to the
CPU Unit itself in order to perform file operations. See 12-2-3 FREAD(700),
FWRIT(701), and CMND(490) for more details.
2. A computer on an Ethernet Network can read and write file memory
(Memory Cards or EM file memory) on a CPU Unit through an Ethernet Unit.
Data in files can be exchanged if the host computer functions as an FTP client and the CS1 PC functions as an FTP server.
Host computer (FTP client)
Ethernet Unit
Ethernet
Memory Card or
EM file memory
FTP command
Computer to Memory Card
File
484
Memory Card to computer
Memory Card or
EM file memory
File
Memory Card or
EM file memory
Section 12-2
Manipulating Files
The following FINS commands can be used to perform a variety of functions,
including reading and writing files.
Command
Name
Description
2201 Hex
FILE NAME READ
Reads file memory data.
2202 Hex
SINGLE FILE READ
2203 Hex
SINGLE FILE WRITE
2204 Hex
2205 Hex
FILE MEMORY
FORMAT
FILE DELETE
Reads a specified length of file data from a
specified position within a single file.
Writes a specified length of file data from a
specified position within a single file.
Formats (initializes) the file memory.
2207 Hex
FILE COPY
2208 Hex
FILE NAME CHANGE
220A Hex
MEMORY AREA FILE
TRANSFER
PARAMETER AREA
FILE TRANSFER
PROGRAM AREA
FILE TRANSFER
CREATE/DELETE
SUBDIRECTORY
220B Hex
220C Hex
2215 Hex
Deletes specified files stored in the file
memory.
Copies files from one file memory to another
file memory in the same system.
Changes a file name.
Transfers or compares data between the I/O
memory area and the file memory.
Transfers or compares data between the
parameter area and the file memory.
Transfers or compares data between the UM
(User Memory) area and the file memory.
Creates and deletes subdirectories.
Note The time from the CPU Unit’s internal clock is used to date files created in file
memory with the 220A, 220B, 220C, and 2203 commands.
12-2-3 FREAD(700), FWRIT(701), and CMND(490)
The FREAD(700) (READ DATA FILE) and FWRIT(701) (WRITE DATA FILE)
instructions will read and write I/O memory data from a specified location from a
data file in a Memory Card or EM file memory from the user program.
Note These instructions do not transfer the specified file, but rather the specified
amount of data beginning at the specified start position in the file.
The CMND(490) (DELIVER COMMAND) instruction can be executed to issue a
FINS command to the CPU Unit itself to perform file operations. File operations
such as file formatting, deletion, copying, and renaming can be performed on
files in the Memory Card or EM file memory (-EV1 only).
FREAD(700)/FWRIT(701): Transfers
between I/O memory and file memory
CMND(490): File memory operations
CPU Unit
CPU Unit
FREAD/FWRIT
instruction
CMND
instruction
Operation
Memory Card
Memory Card
I/O memory
I/O memory
EM file memory
Operation
I/O memory
EM file memory
I/O memory
485
Section 12-2
Manipulating Files
FREAD(700)/FWRIT(701) Instructions
FREAD(700) and FWRIT(701) transfer data between I/O memory and file
memory. All CS1 CPU Units can transfer binary data (.IOM files) and the V1 CPU
Units can also transfer ASCII files (.TXT and .CSV files).
Name
Transferring ASCII Files
(-EV1 Only)
Mnemonic
READ DATA FILE
FREAD(700)
WRITE DATA FILE
FWRIT(701)
Description
Reads specified data file data or data
elements to specified I/O memory.
Uses specified I/O memory area data to
create a specified data file.
ASCII files can be transferred as well as binary files, so the third and fourth digits
of the instruction’s control word operand (C) indicate the type of data file being
transferred and the number of fields between carriage returns.
Bits in C
12 to 15
08 to 11
Settings
Data type
0: Binary (.IOM)
1: Non-delimited words (.TXT)
2: Non-delimited double-words (.TXT)
3: Comma-delimited words (.CSV)
4: Comma-delimited double-words (.CSV)
5: Tab-delimited words (.TXT)
6: Tab-delimited double-words (.TXT)
Carriage returns
0: No returns
8: Return every 10 fields
9: Return every 1 field
A: Return every 2 fields
B: Return every 4 fields
C: Return every 5 fields
D: Return every 16 fields
Programming Device
limitations
If CX-Programmer V1.1 or
an earlier version is being
used, only 0 Hex (.IOM
files) can be specified
directly.
If CX-Programmer V1.2 or
a later version (or a
Programming Console) is
being used, the control
word bits can be set to
between 0 and 6 Hex.
If CX-Programmer V1.1 or
an earlier version (or a
Programming Console) is
being used, only 0 Hex (no
returns) can be specified
directly.
If CX-Programmer V1.2 or
a later version is being
used, the control word bits
can be set to 0 Hex or to
between 8 and D Hex.
CX-Programmer V1.1 or Earlier Version:
Indirectly Setting the Control Word
When V1.1 or an earlier version of CX-Programmer is being used, ASCII files
cannot be transferred with FREAD(700) and FWRIT(701) if a constant is input
for the control word to specify the data type and carriage return treatment. Only
binary data with no carriage returns can be transferred if a constant is used.
ASCII files can be transferred with FREAD(700) and FWRIT(701), however, by
indirectly setting the control word. Write the desired control word setting to a
486
Section 12-2
Manipulating Files
word and specify that word as the control word in FREAD(700) or FWRIT(701),
as shown on the left in the following diagram.
CX-Programmer Versions V1.1 and Earlier
Execution File Memory
condition Operation Flag
Write #1800
to W000.
Specify W000
as C.
CX-Programmer Versions V1.2 and Later
Execution
condition
File Memory
Operation Flag
Specify #1800 as C.
Note The time from the CPU Unit’s internal clock is used to date files created in file
memory with FWRIT(701).
Only one file memory operation may be executed at a time, so FREAD(700) and
FWRIT(701) must not be executed when any of the following file memory operations are being performed:
1, 2, 3...
1. Execution of FREAD(700) or FWRIT(701)
2. Execution of CMND(490) to send a FINS command to the CPU Unit itself
3. Replacement of the entire program by Auxiliary Area control bit operations
4. Execution of a simple backup operation
Use the File Memory Operation Flag (A34313) for exclusive control of file
memory instructions to prevent them from being executed while another file
memory operation is in progress.
When FREAD(700) is being executed, the File Read Error Flag (A34310) will be
turned ON and the instruction won’t be executed if the specified file contains the
wrong data type or the file data is corrupted. For text or CSV files, the character
code must be hexadecimal data and delimiters must be positioned every 4 digits
for word data and every 8 digits for double-word data. Data will be read up to the
point where an illegal character is detected.
Related Auxiliary Bits/Words
Name
Address
Operation
Memory Card Type
A34300 to
A34302
A34306
Indicates the type of Memory Card, if any, that is
installed.
ON when a format error occurs in the first EM
bank allocated for file memory. OFF when
formatting is completed normally.
Memory Card
Format Error Flag
File Write Error Flag
A34307
File Write
Impossible Flag
A34309
ON when the Memory Card is not formatted or a
formatting error has occurred.
ON when an error occurred when writing to the
file.
ON when the data couldn’t be written because
the file was write-protected or there was
insufficient free memory.
File Read Error Flag
A34310
ON when a file could not be read because its
data was corrupted or if it contains the wrong
data type.
No File Flag
A34311
ON when data could not be read because the
specified file doesn’t exist.
EM File Memory
Format Error Flag
A34308
487
Section 12-2
Manipulating Files
Name
File Memory
Operation Flag
Address
A34313
Operation
ON for any of the following:
The CPU Unit is processing a FINS command
sent to itself using CMND(490).
FREAD(700) or FWRIT(701) is being executed.
The program is being overwritten using an
Auxiliary Area control bit.
A simple backup operation is being performed.
Accessing File Flag
A34314
ON when file data is actually being accessed.
Memory Card
Detected Flag
Number of Items to
Transfer
A34315
ON when a Memory Card has been detected.
(-EV1 only)
These words indicate the number of words or
fields remaining to be transferred (32 bits).
A346 to
A347
When a binary (.IOM) file is being transferred,
this number is decremented each time a word is
read.
When a text or CSV file is being transferred, this
number is decremented each time a field is
transferred.
CMND(490): DELIVER COMMAND
CMND(490) can be used to issue a FINS command to the local CPU Unit itself to
perform file memory operations such as formatting or deleting files. Make the
following settings in CMND(490)’s control words when issuing a file-memory
FINS command to the local PC:
1, 2, 3...
FINS Commands Related
to File Memory
488
1. Set the destination network address to 00 (local network) in C+2.
2. Set the destination unit address to 00 (PC’s CPU Unit) and the destination
node to 00 (within local node) in C+3.
3. Set the number of retries to 0 in C+4. (The number of retries setting is invalid,
so set it to 0.)
There are other FINS commands related to file memory that are not shown in the
following table which can be issued.
Section 12-2
Manipulating Files
Refer to the Communications Command Reference Manual (W342) for details
on FINS commands.
Command
Name
Description
2201 Hex
FILE NAME READ
Reads file memory information.
2202 Hex
SINGLE FILE READ
Reads a specified length of file data from a
specified position within a single file.
2203 Hex
SINGLE FILE WRITE
Writes a specified length of file data from a
specified position within a single file.
2204 Hex
FILE MEMORY
FORMAT
Formats (initializes) the file memory.
2205 Hex
FILE DELETE
Deletes specified files stored in the file
memory (Memory Card or EM file memory).
2207 Hex
FILE COPY
Copies files from one type of file memory to
another or within one type of file memory.
2208 Hex
FILE NAME CHANGE Changes a file name.
220A Hex
MEMORY AREA FILE Transfers or compares data between the I/O
TRANSFER
memory area and the file memory (Memory
Card or EM file memory).
220B Hex
PARAMETER AREA
FILE TRANSFER
Transfers or compares data between the
parameter area and the file memory (Memory
Card or EM file memory).
220C Hex
PROGRAM AREA
FILE TRANSFER
Transfers or compares data between the
program memory and the file memory
(Memory Card or EM file memory).
2215 Hex
CREATE/DELETE
SUBDIRECTORY
Creates and deletes subdirectories.
CMND(490) cannot be executed to the local CPU Unit if another CMND(490)
instruction is being executed to another CPU Unit, FREAD(700) or FWRIT(701)
is being executed, the program is being replaced by an Auxiliary Area control bit
operation, or a simple backup operation is being executed. Be sure to include
the File Memory Operation Flag (A34313) as a normally closed condition to prevent CMND(490) from being executed while another file memory operation is in
progress.
If CMND(490) cannot be executed, it will be processed as NOP(000), an error
will occur, and the Error Flag will be turned ON.
Related Auxiliary Bits/Words
Name
Address
File Memory
Operation Flag
A34313
Memory Card
Detected Flag
A34315
Operation
ON for any of the following:
The CPU Unit is processing a FINS command sent to itself using CMND(490).
FREAD(700) or FWRIT(701) is being executed.
The program is being overwritten using an Auxiliary Area control bit.
A simple backup operation is being performed.
ON when a Memory Card has been detected. (-EV1 only)
Note There are other FINS commands that can be sent to the local PC in addition to
the ones related to file memory operations that are listed in the table above. The
File Memory Operation Flag must be used to prevent simultaneous execution of
these other FINS commands, too.
489
Section 12-2
Manipulating Files
The following example shows how to use CMND(490) to create a subdirectory in
the Memory Card.
Network Instruction
Enabled Flag
(for port 7)
File Memory
Operation Flag
When 000000 and A20207 are ON and A34313 is
OFF, CMND(490) issues FINS command 2215
(CREATE/DELETE SUBDIRECTORY) is sent to
the local CPU Unit and the response is stored in
D00100 and D00101.
In this case, the FINS command creates a subdirectory named “CS1” within the “OMRON” directory
in the CPU Unit’s Memory Card. The response is
composed of the 2-byte command code (2215) and
the 2-byte response code.
Command code: 2215 Hex (CREATE/DELETE SUBDIRECTORY)
Disk number: 8000 Hex (Memory Card)
Parameter: 0000 Hex (Create subdirectory.)
Subdirectory name: CS1.
(: a space)
Directory length: 0006 Hex (6 characters)
Directory path: \OMRON
Number of bytes of command data: 001A Hex (26 bytes)
Number of bytes of response data: 0004 Hex (4 bytes)
Destination address: 0000 Hex (local network)
00 Hex (local node) and 00 Hex (CPU Unit)
Response requested, communications port 7, 0 retries
Response monitor time: FFFF Hex (6,553.5 s)
12-2-4 Replacement of the Entire Program During Operation (-EV1 Only)
The entire program can be replaced during operation (RUN or MONITOR mode)
by turning ON the Replacement Start Bit (A65015). The specified file will be read
from the Memory Card and it will replace that program will replace the executable program at the end of the current cycle. The replacement Program Password (A651) and Program File Name (A654 to A657) must be recorded in ad-
490
Section 12-2
Manipulating Files
vance and the specified program file must exist on the Memory Card in order to
replace the program during operation.
CPU Unit
Replacement
User program
Memory Card
Replacement Start Bit (A65015)
turned from OFF to ON.
Replacement Program
File Name
Specifies
program
Entire user program
Normal processing
The entire program
is replaced.
Replacement
Start Bit
Execution
condition
Normal processing
The CPU Unit will
execute the instructions remaining in the cycle after the Replacement Start Bit is
turned ON.
(In the last task)
The program can also be replaced when program execution is stopped (PROGRAM mode) by turning ON the Replacement Start Bit from a Programming Device.
Note The replacement program file cannot be read from EM file memory.
The Replacement Start Bit (A65015) can be turned ON at any location (program
address) in the program. The CPU Unit will execute the instructions remaining in
the cycle after the Replacement Start Bit goes from OFF to ON.
The program will not be executed while the program is being replaced. After the
program has been replaced, operation will be started again just as if the CPU
Unit were switched from PROGRAM mode to RUN or MONITOR mode.
The program will be replaced at the end of the cycle in which the Replacement
Start Bit was turned from OFF to ON, i.e., after END(001) is executed in the last
task in the program.
491
Section 12-2
Manipulating Files
Note
1. Turn ON the IOM Hold Bit (A50012) if you want to maintain the status of I/O
memory data through the program replacement.
Turn ON the Forced Status Hold Bit (A50013) if you want to maintain the status of force-set and force-reset bits through the program replacement.
2. If the IOM Hold Bit (A50012) is ON before the program is replaced, the status
of bits in I/O memory will be maintained after program replacement. Be sure
that external loads will operate properly with the same I/O memory data.
Likewise, if the Forced Status Hold Bit (A50013) is ON before the program is
replaced, the status of force-set and force-reset bits will be maintained after
program replacement. Be sure that external loads will operate properly with
the same force-set and force-reset bits.
The program file specified in the Program File Name (A654 to A657) will be read
from the Memory Card and will replace the existing program at the end of the
cycle in which the Replacement Start Bit (A65015) is turned from OFF to ON.
Replacement File
File
Program file
File name and
extension
∗∗∗∗∗∗∗∗.OBJ
Specifying the replacement file name (********)
Write the replacement program file name to A654
through A657 before program replacement.
The following conditions are required in order to replace the program during operation.
• The program password (A5A5) has been written to A651.
• The program file specified in the Program File Name words (A654 to A657) exists in the Memory Card’s root directory.
• The Memory Card has been detected by the CPU Unit. (A34315 ON)
• No fatal errors have occurred.
• No file memory operations are being executed. (A34313 OFF)
• Data is not being written to the Program Area.
• The access right is available. (For example, data is not being transferred from
the CX-Programmer to the PC.)
Conditions Required for
Program Replacement
Note The program may be transferred in any operating mode.
CPU Operation during
Program Replacement
The CPU Unit’s operation will be as follows during program replacement:
• Program execution: Stopped
• Cycle time monitoring: No monitoring
Operations Continuing
during and after Program
Replacement
When the IOM Hold Bit (A50012) is ON, the data in the following memory areas
will be maintained: the CIO Area, Work Area (W), Timer Completion Flags (T),
Index Registers (IR), Data Registers (DR), and the current EM bank number.
Note Timer PVs will be cleared during program replacement.
If the IOM Hold Bit is ON when the program is transferred, loads that were being
output before program replacement will continue to be output after replacement.
Be sure that external loads will operate properly after program replacement.
The status of force-set and force-reset bits will be maintained through the program replacement if the Forced Status Hold Bit (A50013) is ON.
Interrupts will be masked.
If data tracing is being performed, it will be stopped.
Instruction conditions (interlocks, breaks, and block program execution) will be
initialized.
Differentiation Flags will be initialized whether the IOM Hold Bit is ON or OFF.
Operations after Program
Replacement
492
The status of the cyclic tasks depends upon their operation-start properties.
(Their status is the same as it would be if the PC were switched from PROGRAM
to RUN/MONITOR mode.)
Section 12-2
Manipulating Files
The First Cycle Flag (A20011) will be ON for one cycle after program execution
resumes. (The status is the same as it would be if the PC were switched from
PROGRAM to RUN/MONITOR mode.)
Time Required for
Program Replacement
Size of entire program
60 Ksteps
250 Ksteps
Peripheral servicing time
set in PC Setup
Default (4% of cycle time)
Approx. time required for
program replacement
6s
25 s
Related Auxiliary Bits/Words
Name
File Memory Operation Flag
Address
A34313
Operation
ON for any of the following:
The CPU Unit has sent a FINS command to itself using CMND(490).
FREAD(700) or FWRIT(701) are being executed.
The program is being overwritten using an Auxiliary Area control bit
(A65015).
A simple backup operation is being performed.
Memory Card Detected Flag
A34315
ON when a Memory Card has been detected.
IOM Hold Bit
A50012
Forced Status Hold Bit
A50013
Replacement Completion Code
(-EV1 only)
A65000 to
A65007
When this bit is ON, the contents of I/O memory are retained through
program replacement.
When this bit is ON, the status of force-set and force-reset bits is
maintained through program replacement.
Codes for normal program replacement (A65014 OFF):
01 Hex: The program file (.OBJ) replaced the program.
Replacement Error Flag (-EV1
only)
A65014
Replacement Start Bit (-EV1
only)
A65015
Codes for incomplete program replacement (A65014 ON):
00 Hex: A fatal error occurred.
01 Hex: A memory error occurred.
11 Hex: The program is write-protected.
12 Hex: The program password in A651 is incorrect.
21 Hex: A Memory Card is not installed.
22 Hex: The specified file does not exist.
23 Hex: The specified file is too large (memory error).
31 Hex: One of the following operations was being performed:
A file memory operation was being performed.
The program was being written.
The operating mode was being changed.
Turned ON when an error occurred while trying to replace the program
after A65015 was turned from OFF to ON.
Turned OFF the next time that A65015 is turned from OFF to ON again.
If this bit has been enabled by the setting the Program Password (A651)
to A5A5 Hex, program replacement will start when this bit is turned from
OFF to ON. Do not turn this bit from OFF to ON again during program
replacement.
This bit is automatically turned OFF when program replacement is
completed (normally or with an error) or the power is turned ON.
The status of this bit can be read from a Programming Device, PT, or
host computer to determine whether program replacement has been
completed or not.
493
Section 12-2
Manipulating Files
Name
Address
Operation
Program Password (-EV1 only)
A651
Write the password to this word to enable program replacement.
A5A5 Hex: Enables the Replacement Start Bit (A65015).
Other value: Disables the Replacement Start Bit (A65015).
This bit is automatically turned OFF when program replacement is
completed (normally or with an error) or the power is turned ON.
Program File Name (-EV1 only)
A654 to
A657
Before starting program replacement, write the file name of the
replacement program file in these words in ASCII. Just write the
8-character filename; the .OBJ extension is added automatically.
Write the characters in order from A654 (most significant byte first). If
the file name has fewer than 8 characters, pad the remaining bytes with
space codes (20 Hex). Do not include any NULL characters or spaces
within the file name itself.
The following example shows the data for the program file ABC.OBJ:
Example Program 1
Store program files ABC.OBJ and XYZ.OBJ in the Memory Card and select one
program or the other depending upon the value of D00000. Set D00000 to #1234
when selecting ABC.OBJ or set it to #5678 when selecting XYZ.OBJ.
494
Section 12-2
Manipulating Files
Start and execute another task to perform any processing required before program replacement or IOM Hold Bit processing.
Main Task (Cyclic task number 0)
MOV
← Program version
First Cycle Flag
← Version storage area
Execution
condition
Replacement
Start Bit
No File Flag
Writes the file name
“ABC” in A654 to
A657.
Writes the file name
“XYZ” in A654 to
A657.
Main processing program
495
Section 12-2
Manipulating Files
Task protecting data during program replacement
(Cyclic task number 31, standby status at startup)
Processing to protect data before program replacement
begins
Always ON Flag
IOM Hold Bit
Outputs to required
loads during program replacement.
Example Program 2
Store program files for several devices and the program file for automatic transfer at startup (AUTOEXEC.OBJ) in a Memory Card. When the PC is turned ON,
the automatic transfer at startup file is read and that program is replaced later
with a program file for a different device.
ABC.OBJ
AUTOEXEC.OBJ
First Cycle Flag
Processing that determines
the type of device connected
and stores the corresponding
file name. In this example,
the file name “ABC” is written
in A654 to A657.
Memory Card
Detected Flag
Overwrite
Replacement
Start Bit
12-2-5 Automatic Transfer at Startup
Automatic transfer at startup is used to read the user program, parameters, and
I/O memory data from a Memory Card to the CPU Unit when the power is turned
ON.
The following files can be read automatically to CPU Unit memory.
Note This function cannot be used to read EM file memory.
496
Section 12-2
Manipulating Files
File
File name
At startup
Program File
AUTOEXEC.OBJ
The contents of this file are automatically transferred
and overwrite the entire user program including CPU
Unit task attributes.
Data File
AUTOEXEC.IOM
DM words allocated to Special I/O Units and Inner
Boards.
ATEXECDM.IOM
The contents of this file are automatically transferred to
the DM Area beginning at D00000 when power is turned
ON. (See note 1.)
ATEXECE.IOM
General-purpose DM words
(-EV1 only)
The contents of this file are automatically transferred to
the EM Area beginning at E_00000 when power is
turned ON.
Note
Not required on
Memory Card.
The contents of this file are automatically transferred to
the DM Area beginning at D20000 when power is turned
ON. (See note 1.)
General-purpose DM words
(-EV1 only)
Parameter Area AUTOEXEC.STD
File
Required for
automatic transfer
Required on
Memory Card.
The contents of this file are automatically transferred
and overwrite all initial settings data in the CPU Unit.
Required on
Memory Card.
1. If the data contained in AUTOEXEC.IOM and ATEXECDM.IOM overlap, the
data in ATEXECDM.IOM will overwrite any overlapping data transferred
from AUTOEXEC.IOM since ATEXECDM.IOM is written later.
2. The program file (AUTOEXEC.OBJ) and parameter file (AUTOEXEC.STD)
must be on the Memory Card. Without these files, automatic transfer will fail,
a memory error will occur, and A40115 (Memory Error Flag: fatal error) will
turn ON. (It is not necessary for the I/O memory file (AUTOEXEC.IOM) to be
present.)
3. It is possible to create the AUTOEXEC.IOM, ATEXECDM.IOM, and ATEXECE.IOM files from a Programming Device (Programming Console or
CX-Programmer), with starting addresses other than D20000, D00000, and
E_00000 respectively. The data will be written beginning with the correct
starting address anyway, but do not specify other starting addresses.
4. If DIP switch pin 7 is turned ON and pin 8 is turned OFF to use the simple
backup function, the simple backup function will take precedence even if pin
2 is also ON. In this case, the BACKUP files will be transferred to the
CPU Unit but the automatic transfer at startup files will not be transferred.
5. The automatic transfer at startup function can be used together with the program replacement function. The Replacement Start Bit (A65015) can be
turned ON from program that is automatically transferred at startup to replace it with another program.
CPU Unit
Front panel DIP switch pin 2 ON
User program
Memory Card
I/O memory
Parameter
data
Write at startup
• User program file (AUTOEXEC.OBJ) - Required
• Parameter area file (AUTOEXEC.STD) Required
• I/O memory file (AUTOEXEC.IOM, ATEXECDM.IOM, ATEXECE.IOM) - Not required
Procedure
497
Section 12-2
Manipulating Files
1, 2, 3...
1. Turn OFF the PC power supply.
2. Turn ON DIP switch pin 2 on the front panel of the CPU Unit. Be sure that
pins 7 and 8 are both OFF.
Note The simple backup function will take precedence over the automatic
transfer at startup function, so be sure that pins 7 and 8 are OFF.
3. Insert a Memory Card containing the user program file (AUTOEXEC.OBJ),
parameter area file (AUTOEXEC.STD), and/or the I/O memory files (AUTOEXEC.IOM, ATEXECDM.IOM, and ATEXECE.IOM) created with a CXProgrammer. (The program file and parameter area file must be on the
Memory Card. The I/O memory files are optional.)
4. Turn ON the PC power supply.
Note Automatic Transfer Failure at Startup
If automatic transfer fails at startup, a memory error will occur, A40115 will turn
ON, and the CPU Unit will stop. If an error occurs, turn OFF the power to clear the
error. (The error cannot be cleared without turning OFF the power.)
DIP Switch on the Front
Panel of the CPU Unit
Pin(s)
2
7 and 8
Name
Setting
Automatic transfer
at startup pin
Simple backup pins
ON: Execute automatic transfer at startup.
OFF: Do not execute automatic transfer at startup.
Turn OFF both pins.
Related Auxiliary Bits/Words
Name
Address
Memory Error Flag
(Fatal error)
A40115
Setting
ON when an error occurred in memory or there was an error in automatic
transfer from the Memory Card when the power was turned on (automatic
transfer at start-up).
The CPU Unit will stop and the ERR/ALM indicator on the front of the CPU
Unit will light.
Note: A40309 will be turned ON if the error occurred during automatic
transfer at startup. (The error cannot be cleared in this case.)
Memory Card Start-up
Transfer Error Flag
A40309
ON when automatic transfer at start-up has been selected and an error
occurs during automatic transfer (DIP switch pin 2 ON). An error will occur
if there is a transfer error, the specified file does not exist, or the Memory
Card is not installed.
Note: The error can be cleared by turning the power off. (The error cannot
be cleared while the power is on.)
12-2-6 Simple Backup Function (-EV1 Only)
Backing Up Data from the CPU Unit to the Memory Card
To backup data, turn ON pin 7 and turn OFF pin 8 on the CPU Unit’s DIP switch,
press and hold the Memory Card Power Supply Switch for three seconds. The
backup function will automatically create backup files and write them to the
Memory Card. The backup files contain the program, parameter area data, and
I/O memory data. This function can be executed in any operating mode.
Pin 7: ON
Pin 8: OFF
Memory Card
498
Press and hold the
Memory Card Power
Switch for three seconds.
Section 12-2
Manipulating Files
Restoring Data from the Memory Card to the CPU Unit
To restore the backup files to the CPU Unit, check that pin 7 is ON and pin 8 is
OFF and turn the PC’s power OFF and then ON again. The backup files containing the program, parameter area data, and I/O memory data will be read from the
Memory Card to the CPU Unit.
Note
1. The backup function will override the automatic transfer at startup function,
so the backup files will be read to the CPU Unit when the PC is turned ON
even if pin 2 of the DIP switch is ON.
2. Data will not be read from the Memory Card to the CPU Unit if pin 1 of the DIP
switch is ON (write-protecting program memory).
3. When the backup files are read from the Memory Card by the backup function, the status of I/O memory and force-set/force-reset bits will be cleared
unless the necessary settings are made in the Auxiliary Area and PC Setup.
If the IOM Hold Bit (A50012) is ON and the PC Setup is set to maintain the
IOM Hold Bit Status at Startup when the backup files are written, the status
of I/O memory data will be maintained when data is read from the Memory
Card.
If the Forced Status Hold Bit (A50013) is ON and the PC Setup is set to maintain the Forced Status Hold Bit Status at Startup when the backup files are
written, the status of force-set and force-reset bits will be maintained when
data is read from the Memory Card.
Comparing Data in the Memory Card and CPU Unit
To compare the backup files in the Memory Card with the data in the CPU Unit,
turn OFF pins 7 and 8 on the CPU Unit’s DIP switch, and press and hold the
Memory Card Power Supply Switch for three seconds. The backup function will
compare the program, parameter area data, and I/O memory data in the
Memory Card with the corresponding data in the CPU Unit. This function can be
executed in any operating mode.
Backing up data to the Memory Card
Restoring data from the Memory Card
Memory Card
Power Switch CPU Unit
Comparing data to the Memory Card
Memory Card
Power Switch
CPU Unit
CPU Unit
Power ON
Program
Program
Program
Memory
Card
Memory
Card
Compare
I/O memory
I/O memory
I/O memory
Parameter
area
Parameter
area
Parameter
area
Pin 7: ON
Pin 8: OFF
Pin 7: ON
Pin 8: OFF
Memory
Card
Pin 7: OFF
Pin 8: OFF
The following table provides a summary of the simple backup operations.
Backup operation
Backing up data from the CPU
Unit to the Memory Card
Restoring data from the
Memory Card to the CPU Unit
Comparing data between the
CPU Unit and the Memory Card
Pin status
Pin 7
ON
ON
OFF
Procedure
Pin 8
OFF
Press and hold the Memory Card
Power Switch for three seconds.
OFF
Turn the PC OFF and ON again.
(See note.)
OFF
Press and hold the Memory Card
Power Switch for three seconds.
499
Section 12-2
Manipulating Files
Note The backup function will override the automatic transfer at startup function.
Backup Files
File name and
extension
Data area and range of
addresses stored
BACKUP.IOM
DM
BACKUPIO.IOR
CIO
D20000 to
D32767
0000 to 6143
(Including forced
bit status.)
Restore from
Memory Card
to I/O
memory
Yes
Comparing
Memory Card
to I/O
memory
Yes
Files required
when
restoring data
Required
Yes
---4
---
Required
WR
W000 to W511
(Including forced
bit status.)
Yes
---4
---
HR
AR
H000 to H511
A000 to A447
A448 to A959
T0000 to T4095
C0000 to C4095
D00000 to
D19999
E_00000 to
E_32767
Yes
Yes
Yes
Yes
Yes
Yes
Yes
--Yes
Yes4
Yes
Yes
Yes
--Yes
Yes
Yes
Yes
Required
Yes
Yes
Yes
Not required
BACKUPDM.IOM
Timer1
Counter1
DM
BACKUPE.IOM2,3
EM
Note
500
Backup from
I/O memory
to Memory
Card
Yes
1. The Completion Flags and PVs are backed up.
2. The represents the bank number and the number of banks depends upon
the CPU Unit being used.
When the BACKUPE.IOM files in the Memory Card are restored to the
CPU Unit, the files are read in order beginning with bank 0 and ending with
the maximum bank number in the CPU Unit. Excess BACKUPE.IOM files
will not be read if the number of banks backed up exceeds the number of
banks in the CPU Unit. Conversely, any remaining EM banks in the CPU
Unit will be left unchanged if the number of banks backed up is less than the
number of banks in the CPU Unit.
If a BACKUPE.IOM file is missing (for example: 0, 1, 2, 4, 5, 6), only the
consecutive files will be read. In this case, data would be read to banks 0, 1,
and 2 only.
3. The EM Area data will be backed up as binary data. EM banks that have
been converted to file memory will be backed up along with EM banks that
have not.
EM file memory can be restored to another CPU Unit’s EM Area only if the
BACKUPE.IOM files are consecutive and the number of backed-up EM
banks matches the number of banks in the CPU Unit. If the BACKUPE.IOM files are not consecutive or the number of EM banks does not
match the number of banks in the CPU Unit, the EM file memory will revert to
its unformatted condition and the files in file memory will be invalid. (The regular EM Area banks will be read normally.)
4. Normally, the contents of the CIO Area, WR Area, Timer Completion Flags,
Timer PVs, and the status of force-set/force-reset bits will be cleared when
the PC is turned ON and BACKUPIO.IOR is read from the Memory Card.
If the IOM Hold Bit (A50012) is ON and the PC Setup is set to maintain the
IOM Hold Bit Status at Startup when the backup files are written, the status
of I/O memory data will be maintained when data is read from the Memory
Card.
If the Forced Status Hold Bit (A50013) is ON and the PC Setup is set to maintain the Forced Status Hold Bit Status at Startup when the backup files are
Section 12-2
Manipulating Files
written, the status of force-set and force-reset bits will be maintained when
data is read from the Memory Card.
Verifying Backup
Operations with LEDs
The status of the Memory Card Power (MCPWR) indicator shows whether a
simple backup operation has been completed normally or not.
MCPWR Indicator
Normal completion
(See note.)
Backup operation
Backing up data from the
CPU Unit to the Memory
Card
MCPWR status
Lit → Remains lit while the
Memory Card Power Switch
is pressed. → Flashes
once. → Lit while writing. →
OFF after data is written.
Error occurred
Error
No files will be created with
the following errors:
Insufficient Memory Card
capacity
Memory error in CPU Unit
Restoring data from the
Memory Card to the CPU
Unit
Lit when power is turned
ON. → Flashes once. → Lit
while reading. → OFF after
data is read.
Data won’t be read with the
following errors:
Program in Memory Card
exceeds CPU Unit capacity
MCPWR status
Lit → Remains lit while the
Memory Card Power Switch
is pressed. → Remains
flashing. → Lights when the
Memory Card Power Switch
is pressed.
Lit when power is turned
ON. → Flashes five times.
→ Goes OFF.
Required backup files do
not exist in Memory Card.
Program can’t be written
because it is write-protected
(Pin 1 of the DIP switch is
ON.)
Caution: Data will be read
with the following error.
Comparing data between
the CPU Unit and the
Memory Card
Lit → Remains lit while the
Memory Card Power Switch
is pressed. → Flashes
once. → Lit while
comparing. → OFF after
data is compared.
EM files and CPU Unit EM
banks do not match
(non-consecutive bank
numbers or max. bank
number mismatch).
The following comparison
errors can occur:
Memory Card and CPU Unit
data do not match.
Required backup files do
not exist in Memory Card.
Lit when power is turned
ON. → Flashes once. → Lit
while reading. → Flashes
three times. → OFF after
data is read.
Lit → Remains lit while the
Memory Card Power Switch
is pressed. → Remains
flashing. → Lights when the
Memory Card Power Switch
is pressed.
EM files and CPU Unit EM
banks do not match
(non-consecutive bank
numbers or max. bank
number mismatch).
Memory error in CPU Unit
Common to all three backup
operations.
---
Memory Card access error
(format error or read/write
error)
Reading:
Flashes five times. → Goes
OFF.
Writing or comparing:
Remains flashing.→ Lights
when the Memory Card
Power Switch is pressed.
501
Section 12-3
Using File Memory
Note When the backup operation is completed normally, power to the Memory Card
will go OFF when the MCPWR indicator goes OFF. If the Memory Card will be
used again, press the Memory Card Power Switch to supply power and execute
the desired operation.
Related Auxiliary Bits/Words
Name
Address
File Memory Operation Flag
A34313
Description
ON when the CPU Unit starts writing or comparing data in the Memory
Card. OFF when the writing or comparison is completed.
Wiring data to or verifying the contents of the Memory Card is not
possible while this flag is ON.
EM File Memory Starting Bank
A344
When the CPU Unit starts reading from the Memory Card, it references
this value. If the maximum EM bank number of the BACKUPE.IOM
files (maximum consecutive bank number counting from 0) matches the
maximum bank number of the CPU Unit, the EM area will be formatted
based on the value in this word. If the maximum EM bank numbers do
not match, the EM Area will revert to its unformatted condition.
12-3 Using File Memory
Initializing Media
Memory Cards
1, 2, 3...
1. Use a Programming Device, such as a Programming Console, to initialize
Memory Cards.
Memory Card
Or
CX-Programmer
Programming
Console
EM File Memory
1, 2, 3...
1. Use a Programming Device like a Programming Console and set EM file
memory settings in the PC Setup to enable EM file memory, and then set the
specified bank number for EM file memory to 0 to C Hex.
Specify the starting
bank number for
EM file memory.
Or
CX-Programmer
Programming
Console
2. Use a FINS command or a Programming Device other than a Programming
Console to initialize EM file memory.
Initialize EM file memory.
Or
CX-Programmer
Programming
Console
502
Section 12-3
Using File Memory
A specified EM bank can be converted from ordinary EM to file memory.
Initializing Individual EM
File Memory
Bank 0
Bank 0
Bank n
Bank n
Bank C
Bank C
1. Set n in PC Setup.
2. Use a Programming Device or
Converted to FINS command to format starting at n.
file memory
3. “n” is stored in A344.
EM used for file memory can be restored to ordinary EM status.
1. Set file memory OFF in PC Setup.
Bank 0
Bank 0
Bank n
Bank n
Converted to
file memory
2. If a Programming Device or FINS command
is used for formatting, memory starting at n
will be cleared to 0000 Hex.
Cleared
Bank C
3. FFFF Hex will be stored in A344 to indicate
that there is no EM file memory.
Bank C
Note: Any file data present will be deleted at this time.
The start bank number for file memory can be changed.
Bank 0
Bank 0
Bank n
Bank n
Bank m
Converted to
file memory
1. Change n to m in PC Setup.
Clear
Bank m
Converted to
file memory
Bank C
Bank C
2. Use a Programming Device or FINS command
to convert banks starting at m to file memory.
Note: Banks n to m-1 will be cleared to 0000 Hex.
3. m will be stored in A344.
Note: Any file data present will be deleted at this time.
PC Setup
Address
136
Name
Description
EM File Memory
Starting Bank
Initial setting
0000 Hex: None
0080 Hex: Starting at bank No. 0
008C hex: Bank No. C
The EM area starting from the specified bank
number will be converted to file memory.
0000 Hex
Related Special Auxiliary Relay
Name
Address
EM File Memory Starting Bank
Reading/Writing Symbol
Tables and Comments
using he CX-Programmer
1, 2, 3...
A344
Description
The bank number that actually starts the EM file
memory area at that time will be stored. The EM file
from the starting bank number to the last bank will
be converted to file memory. FFFF Hex will indicate
that there is no EM file memory.
Use the following procedure to transfer symbol tables or comments created on
the CX-Programmer to and from a Memory Card or EM file memory.
1. Place a formatted Memory Card into the CPU Unit or format EM File
Memory.
2. Place the CX-Programmer online.
3. Select Transfer and then To PC or From PLC from the PC Menu.
4. Select either Symbols or Comments as the data to transfer.
503
Section 12-3
Using File Memory
Operating Procedures for Memory Cards
Using a Programming Device
1, 2, 3...
1. Insert a Memory Card into the CPU Unit.
Memory Card
2. Initialize the Memory Card with a Programming Device.
Or
Initialize
CX-Programmer
Programming
Console
3. Use a Programming Device to name the CPU Unit data (user program, I/O
memory, parameter area), and then save the data to Memory Card. (Use a
Programming Device to read the Memory Card file to the CPU Unit.)
Automatically Transferring Files at Startup
1, 2, 3...
1. Insert a Memory Card into the CPU Unit. (Already initialized.)
Memory Card
2. Use a Programming Device to write the automatic transfer at startup files to
the Memory Card. These files include the program file (AUTOEXEC.OBJ),
parameter area file (AUTOEXEC.STD), and I/O memory file (AUTOEXEC.IOM or ATEXEC.IOM.)
Or
Initialize
CX-Programmer
Programming
Console
Note A user program and parameter area file must be on the Memory Card.
3. Turn OFF the PC power supply.
4. Turn ON DIP switch pin 2 (automatic transfer at startup).
DIP switch pin 2 ON
504
Section 12-3
Using File Memory
Note If pin 7 is ON and pin 8 is OFF, the backup function will be enabled and
will override the automatic transfer at startup function. (Turn OFF pins
7 and 8 for automatic transfer at startup.)
5. Insert the Memory Card into the CPU Unit.
Memory Card
6. Turn ON the PC power supply to read the file.
Using FREAD(700)/FWRIT(701)/CMND(490)
1, 2, 3...
1. Insert a Memory Card into the CPU Unit. (Already initialized.)
2. Use FWRIT(701) to name the file in the specified area of I/O memory and
then save the file to Memory Card.
Note A Memory Card containing TXT or CSV data files can be installed into
a personal computer’s PC card slot with an HMC-AP001 Memory
Card Adapter and the data files can be read into a spreadsheet program using standard Windows functions (-EV1 only).
3. Use FREAD(700) to read the file from the Memory Card to I/O memory in the
CPU Unit.
Memory Card file operations can be executed by issuing FINS commands to the
local CPU Unit with CMND(490). (-EV1 only)
Replacing the Program during Operation (-EV1 Only)
1, 2, 3...
1. Insert a Memory Card into the CPU Unit. (Already initialized.)
2. Write the Program Password (A5A5 Hex) in A651 and the Program File
Name in A654 to A657.
3. Turn the Replacement Start Bit (A65015) from OFF to ON.
Simple Backup Function
(-EV1 Only)
1, 2, 3...
There are 3 backup operations: backing up data to the Memory Card, restoring
data from the Memory Card, and comparing data with the Memory Card.
Backing Up Data from the CPU Unit to the Memory Card
1.
2.
3.
4.
Insert a Memory Card into the CPU Unit. (Already initialized.)
Turn ON pin 7 and turn OFF pin 8 on the CPU Unit’s DIP switch.
Press and hold the Memory Card Power Supply Switch for three seconds.
Verify that the MCPWR Indicator flashes once and then goes OFF. (Other
changes indicate that an error occurred while backing up the data.)
Restoring Data from the Memory Card to the CPU Unit
1, 2, 3...
1.
2.
3.
4.
Insert the Memory Card containing the backup files into the CPU Unit.
Turn ON pin 7 and turn OFF pin 8 on the CPU Unit’s DIP switch.
The backup files will be restored when the PC is turned ON.
Verify that the MCPWR Indicator flashes once and then goes OFF. (Other
changes indicate that an error occurred while restoring the data.)
Comparing Data in the Memory Card and CPU Unit
1, 2, 3...
1. Insert the Memory Card containing the backup files into the CPU Unit.
2. Turn OFF pins 7 and 8 on the CPU Unit’s DIP switch.
3. Press and hold the Memory Card Power Supply Switch for three seconds.
505
Section 12-3
Using File Memory
4. The data matches if the MCPWR Indicator flashes once and then goes OFF.
Note The MCPWR Indicator will flash if an error occurs while writing or comparing
data. This flashing will stop and the MCPWR Indicator will be lit when the
Memory Card Power Supply Switch is pressed.
The following table shows the time required for backup operations in a CS1GCPU43-V1-E with 20-Kstep Program and 10-ms Cycle Time in RUN mode:
Mode
Backing up
Restoring
Comparing
PROGRAM
Approx. 50 s
Approx. 30 s
Approx. 7 s
RUN
Approx. 5 min
Approx. 2 min
Approx. 7 s
The following table shows the time required for backup operations in a CS1GCPU44-V1-E with 30-Kstep Program and 10-ms Cycle Time in RUN mode:
Mode
Backing up
Restoring
Comparing
PROGRAM
Approx. 50 s
Approx. 30 s
Approx. 7 s
RUN
Approx. 5 min 30 s
Approx. 2 min 40 s
Approx. 7 s
The following table shows the time required for backup operations in a CS1GCPU67-V1-E with 250-Kstep Program and 12-ms Cycle Time in RUN mode:
Mode
Backing up
Restoring
Comparing
PROGRAM
Approx. 1 min 30 s
Approx. 1 min 30 s
Approx. 20 s
RUN
Approx. 13 min
Approx. 7 min 30 s
Approx. 20 s
Use the following CX-Programmer procedure to create variable table files or
comment files on Memory Cards or in EM file memory.
Creating Variable Table
and Comment Files
1, 2, 3...
1.
2.
3.
4.
Insert a formatted Memory Card into the CPU Unit or format EM file memory.
Place the CX-Programmer online.
Select Transfer and then To PC or From PLC from the PC Menu.
Select either Symbols or Comments as the data to transfer.
Note If a Memory Card is installed in the CPU Unit, data can be transferred only with
the Memory Card. (It will not be possible with EM file memory.)
Operating Procedures for EM File Memory
Using a Programming Device
1, 2, 3...
1. Use PC Setup to specify the starting EM bank to convert to file memory.
2. Use a Programming Device to initialize EM file memory.
3. Use a Programming Device to name the CPU Unit data (user program, I/O
memory, parameter area), and then save the data to EM file memory.
4. Use a Programming Device to read the file in EM file memory to the CPU
Unit.
Using FREAD(700)/FWRIT(701)/CMND(490)
1, 2, 3...
1. Use PC Setup to specify the starting EM bank to convert to file memory.
2. Use a Programming Device to initialize EM file memory.
3. Use FWRIT(701) to name the file in the specified area of I/O memory and
then save the file to EM file memory.
4. Use FREAD(700) to read the file from the EM file memory to I/O memory in
the CPU Unit.
EM file memory operations can be executed by issuing FINS commands to the
local CPU Unit with CMND(490). (-EV1 only)
Power Interruptions
while Accessing File
Memory
506
A file being updated may not be overwritten correctly if a power interruption occurs while the CPU is accessing file memory (the Memory Card or EM file
Section 12-3
Using File Memory
memory). In this case, the affected file will be deleted automatically by the system the next time that power is turned ON. The corresponding File Deletion Notification Flag (A38507 for the Memory Card, A38506 for EM file memory) will be
turned ON. The flag will be turned OFF the next time that the power is turned
OFF.
When a file is deleted, a deletion log file (DEL_FILE.IOM) will be created in the
root directory of the Memory Card or EM file memory. The deletion log file can be
read with CX-Programmer or FREAD(700) to check the following information:
The date that the file was deleted, the type of file memory (media) that existed,
the subdirectory, file name, and extension. When necessary, recreate or recopy
the deleted file.
The following diagram shows the structure of the deletion log file.
File size: 86 bytes
Year
Month Day
Date of file deletion
(6 bytes)
Extension
Deleted file’s
extension
(4 bytes)
Media
Deleted file’s subdirectory
and file name (73 bytes)
Media type (2 bytes)
0000: Memory Card
0001: EM file memory
507
SECTION 13
Advanced Functions
This section provides details on the following advanced functions: cycle time/high-speed processing functions, index register
functions, serial communications functions, startup and maintenance functions, diagnostic and debugging functions, Programming Device functions, and the CS1 Basic I/O Unit input response time settings.
13-1 Cycle Time/High-speed Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13-2 Index Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13-3 Serial Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13-3-1 Host Link Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13-3-2 No-protocol Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13-3-3 NT Link (1:N Mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13-4 Startup Settings and Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13-5 Diagnostic and Debugging Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13-6 Other Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
510
513
522
523
528
529
530
535
539
509
Section 13-1
Cycle Time/High-speed Processing
13-1 Cycle Time/High-speed Processing
The following functions are described in this section
• Minimum cycle time function
• Maximum cycle time function (watch cycle time)
• Cycle time monitoring
• Quick-response inputs
• Interrupt functions
• I/O refreshing methods
• Disabling Special I/O Unit cyclic refreshing
Minimum Cycle Time
A minimum (or fixed) cycle time can be set in CS1 PCs. Variations in I/O response times can be eliminated by repeating the program with a fixed cycle time.
The minimum cycle time (1 to 32,000 ms) is specified in the PC Setup in1-ms
units.
Minimum cycle time
(Effective)
Actual cycle time
Minimum cycle time Minimum cycle time
(Effective)
(Effective)
Actual cycle time
Actual cycle time
If the actual cycle time is longer than the minimum cycle time, the minimum cycle
time function will be ineffective and the cycle time will vary from cycle to cycle.
Minimum cycle time
Actual cycle time
(Effective)
Minimum cycle time
Actual cycle time
(Effective)
Minimum cycle time
(Effective)
Actual cycle time
PC Setup
Address
208
Bits:
Maximum Cycle Time
(Watch Cycle Time)
Name
Setting
Minimum Cycle Time
0001 to 7D00: 1 to 32,000 ms
(1-ms units)
0 to 15
Default
0000 (no
minimum)
If the cycle time exceeds the maximum cycle time setting, the Cycle Time Too
Long Flag (A40108) will be turned ON and PC operation will be stopped.
PC Setup
Address
209
Bit:
209
Bits:
15
0 to 14
Name
Enable Watch Cycle
Time Setting
Watch Cycle Time
Setting
Setting
0: Default (1s)
1: Bits 0 to 14
001 to FA0: 10 to 40,000 ms
(10-ms units)
Default
0
001
(10 ms)
(Enabled when bit 15
is set to 1.)
Auxiliary Area Flags and Words
Name
Cycle Time Too Long
Flag
510
Address
A40108
Description
A40108 will be turned ON and the CPU Unit
will stop operation if the cycle time exceeds
the watch cycle time setting.
Section 13-1
Cycle Time/High-speed Processing
Cycle Time Monitoring
The maximum cycle time and present cycle time are stored in the Auxiliary Area
every cycle.
Auxiliary Area Flags and Words
Name
Maximum Cycle Time
Present Cycle Time
Address
A262 and
A263
A264 and
A265
Description
0 to 429,496,729.5 ms in 0.1 ms units
(0 to FFFF FFFF)
0 to 429,496,729.5 ms in 0.1 ms units
(0 to FFFF FFFF)
A Programming Device (CX-Programmer or Programming Console) can be
used to read the average of the cycle times in the last 8 cycles.
Reducing the Cycle Time
The following methods are effective ways to reduce the cycle time in CS1 PCs:
1, 2, 3...
1. Put tasks that aren’t being executed in standby.
2. Jump program sections that aren’t being executed with JMP(004) and
JME(005).
3. Disable cyclic refreshing of Special I/O Units that don’t require frequent data
exchanges.
High-speed Inputs
When you want to receive pulses that are shorter than the cycle time, use the
CS1W-IDP01 High-speed Input Unit or use the high-speed inputs of the C200HID501/ID215 and C200H-MD501/MD115/MD215 High-density I/O Units.
The high-speed inputs can receive pulses with a pulse width (ON time) of 1 ms
or 4 ms for the C200H High-density Input Units and 0.1 ms for the CS1W-IDP01
High-speed Input Unit.
High-speed Input Unit or
High-density Input Unit
1 or 4 ms, or
0.1 ms
Interrupt Functions
Interrupt tasks can be executed for the following conditions. Refer to 11-3 Interrupt Tasks for more details.
I/O Interrupts (Interrupt tasks 100 to 131)
An I/O interrupt task is executed when the corresponding input (on the rising
edge of the signal or, for CS1-series Interrupt Input Units, on either the rising or
falling edge) is received from an Interrupt Input Unit.
Scheduled Interrupts (Interrupt tasks 2 and 3)
A scheduled interrupt task is executed at regular intervals.
Power OFF Interrupt (Interrupt task 1)
This task is executed when the power is interrupted.
External Interrupts (Interrupt tasks 0 to 255)
An external interrupt task is executed when an interrupt is received from a Special I/O Unit, CS1 CPU Bus Unit, or Inner Board.
I/O Refreshing Methods
There are three ways that the CS1 can refresh data with Basic I/O Units and
Special I/O Units: Cyclic refreshing, immediate refreshing, and execution of
IORF(097).
511
Section 13-1
Cycle Time/High-speed Processing
1. Cyclic Refreshing
I/O refreshing is performed after all of the instructions in executable tasks have
been executed. (The PC Setup can be set to disable cyclic refreshing of individual Special I/O Units.)
END
Task
END
Task
END
Task
I/O refreshing
Actual I/O data
2. Immediate Refreshing
When an address in the I/O Area or Special I/O Unit Area is specified as an operand in the immediate-refreshing variation of an instruction, that operand data will
be refreshed when the instruction is executed. Immediate-refreshing instructions can refresh data allocated to Basic I/O Units and Special I/O Units.
Actual I/O data
Immediate refreshing
CIO 0001
CIO 0002
CIO 0003
CIO 0004
Note
1. When the instruction contains a bit operand, the entire word containing that
bit will be refreshed. When the instruction contains a word operand, that
word will be refreshed.
2. Input and source data will be refreshed just before execution of the instruction. Output and destination data will be refreshed just after execution of the
instruction.
3. The execution times for immediate-refreshing variations are longer than the
regular variations of instructions, so the cycle time will be longer. Refer to
15-5 Instruction Execution Times and Number of Steps for details.
3. Execution of IORF(097)
IORF(097) can be used to refresh a range of I/O words upon execution of the
instruction. IORF(097) can refresh data allocated to Basic I/O Units and Special
I/O Units.
St: Start word
St
E
512
E: End word
The data in all words from St through E are
refreshed when IORF(097) is executed.
Section 13-2
Index Registers
The following example shows IORF(097) used to refresh 8 words of I/O data.
The 7 words from CIO 0010 through CIO 0016
are refreshed when IORF(097) is executed.
0016
When a high-speed response is needed for input and output from a calculation,
use IORF(097) just before and just after the calculation instruction.
Note IORF(097) has a relatively long instruction execution time and that execution
time increases proportionally with the number of words being refreshed, so it can
significantly increase the cycle time. Refer to 15-5 Instruction Execution Times
and Number of Steps for more details.
Disabling Special I/O Unit
Cyclic Refreshing
Ten words in the Special I/O Unit Area (CIO 2000 to CIO 2959) are allocated to
each Special I/O Unit based on the unit number set on the front of the Unit. Data
is refreshed between this area and the CPU Unit each cycle during I/O refreshing, but this cyclic refreshing can be disabled for individual Units in the PC Setup.
There are basically three reasons to disable cyclic refreshing:
1, 2, 3...
1. Cyclic refreshing for Special I/O Units can be disabled when the cycle time is
too long because so many Special I/O Units are installed.
2. If the I/O refreshing time is too short, the Unit’s internal processing may not
be able to keep pace, the Special I/O Unit Error Flag (A40206) will be turned
ON, and the Special I/O Unit will not operate properly.
In this case, the cycle time can be extended by setting a minimum cycle time
in the PC Setup or cyclic I/O refreshing with the Special I/O Unit can be disabled.
3. Always disable cyclic refreshing for a Special I/O Unit when it will be refreshed in an interrupt task by IORF(097). An interrupt task error will occur
and the Interrupt Task Error Flag (A40213) will be turned ON if cyclic refreshing and IORF(097) refreshing are performed simultaneously for the same
Unit.
When cyclic refreshing has been disabled, the Special I/O Unit’s data can be refreshed during program execution with IORF(097).
PC Setup
The Cyclic Refreshing Disable Bits for Special I/O Units 0 to 95 correspond directly to the 96 bits in addresses 226 through 231.
Address
226 bit 0
:
231 bit 15
Name
Setting
Default
Cyclic Refreshing Disable Bit
for Special I/O Unit 0
:
0: Enabled
1: Disabled
:
0 (Enabled)
Cyclic Refreshing Disable Bit
for Special I/O Unit 95
0: Enabled
1: Disabled
0 (Enabled)
:
13-2 Index Registers
Index Registers function as pointers to specify PC memory addresses, which
are absolute memory addresses in I/O memory. After storing a PC memory address in an Index Register with MOVR(560) or MOVRW(561), input the Index
Register as an operand in other instructions to indirectly address the stored PC
memory address.
513
Section 13-2
Index Registers
The advantage of Index Registers is that they can specify any bit or word in I/O
memory, including timer and counter PVs.
Pointer
All areas of
I/O Memory
MOVR(560)
Index Register
Using Index Registers
Index Registers can be a powerful tool when combined with loops such as FORNEXT loops. The contents of Index Registers can be incremented, decremented, and offset very easily, so a few instructions in a loop can process tables of
consecutive data very efficiently.
Increment IR0 and repeat
instruction execution
Table data
Indirect
addressing
Basic Operation
Basically, Index Registers are used with the following steps:
1, 2, 3...
1. Use MOVR(560) to store the PC memory address of the desired bit or word
in an Index Register.
2. Specify the Index Register as the operand in almost any instruction to indirectly address the desired bit or word.
3. Offset or increment the original PC memory address (see below) to redirect
the pointer to another address.
4. Continue steps 2 and 3 to execute the instruction on any number of addresses.
Offsetting, Incrementing, and Decrementing Addresses
The following table shows the variations available for indirect addressing.
Variation
Syntax
Indirect addressing
,IR
Indirect addressing with constant offset
Constant ,IR
(Include a + or – in the constant.)
Indirect addressing with DR offset
DR , IR
Indirect addressing with auto-increment
Increment by 1: , IR+
Increment by 2: , IR++
Indirect addressing with auto-decrement
Decrement by 1: ,– IR
Decrement by 2: ,– – IR
Instructions That Directly Address Index Registers
Index registers can be directly addressed by the following instructions.
DOUBLE SIGNED BINARY ADD WITHOUT CARRY: +L(401), DOUBLE
SIGNED BINARY SUBTRACT WITHOUT CARRY: –L(411), DOUBLE INCREMENT BINARY: ++L(591), and DOUBLE DECREMENT BINARY: – –L(593)
514
Section 13-2
Index Registers
Example 1
The following example shows how an Index Register in a program loop can replace a long series of instructions. In this case, instruction A is repeated n+1
times to perform some operation such as reading and comparing a table of values.
Instruction A
m
MOVR(560)
m IR0
Instruction A
m+1
Instruction A
,IR0
Add 1 to IR0 (n times)
Instruction A
Stores the PC memory
address of m in IR0.
Repeats the process
in a loop such as
FOR–NEXT.
m+n
Example 2
The following example uses Index Registers in a FOR–NEXT loop to define and
start 100 timers (T0000 to T099) with SVs contained in D00010 through D00109.
Each timer’s timer number and Completion Flag are specified in Index Registers
and the loop is repeated as the Index Registers are incremented by one with
each repetition.
MOVRW(561) stores the PC memory address of T0000’s PV in IR0.
MOVR(560) stores the PC memory address of T0000’s Completion Flag in
IR1.
MOVR(560) stores the PC memory address of W00000 is stored in IR2.
• TIM starts the timer with the timer number (timer PV) indirectly
addressed by IR0+.
• If the timer’s Completion Flag (indirectly addressed by IR1+) is
ON, the work bit indirectly addressed by IR2+ is turned ON.
Repeated
• The IR0+, IR1+, and IR2+ variations increment the address in
the Index Register after referencing the address.
• The ++ instruction increments D00000.
515
Section 13-2
Index Registers
The 11-instruction subroutine on the left is equivalent to the 200-instruction subroutine on the right.
W000
00
TIM
MOVRW
T0000
Puts the PC memory
address of T0000’s
PV in IR0.
0000
D00100
IR0
T0000
MOVR
T0000
IR1
W000
00
Puts the PC memory
address of T0000’s
Completion Flag in IR1.
W000
01
MOVR
W00000
IR2
Puts the PC memory
address of W00000
in IR2.
TIM
0001
D00101
MOV
&100
T0001
Writes &100 in D00000.
W000
01
D00000
JMP
&1
Jumps the FOR–NEXT
loop if the pointers above
haven’t been set.
W006
03
TIM
0099
D00109
FOR
&100
,IR2
TIM
,IRO+
@D00000
Repeats the FOR–NEXT
loop 100 times.
If the Work bit addressed in
IR2 is OFF, TIM starts the timer with the timer PV addressed in IR0+ and the SV
addressed in D00000.
If the Completion Flag addressed in
IR1 is ON, OUT turns ON the Work
bit addressed in IR2.
,IR1+
,IR2+
ON
++
D00000
Increments the content of D00000.
(The next address containing an SV.)
NEXT
JME
&1
The FOR–NEXT loop starts timers T0000 through T0099 by repeating
the loop 100 times while incrementing the contents of IR0 (timer number/
PV address), IR1 (Completion Flag address), IR2 (Work bit address),
and D00000 (SV address).
516
T0099
W006
03
Section 13-2
Index Registers
Direct Addressing of Index Registers
Index Registers can be directly addressed only in the instructions shown in the
following table.
Instruction group
Data Movement
Instructions
Table Data Processing
Instructions
Data Movement
Instructions
Comparison Instructions
Increment/Decrement
Instructions
Symbol Math
Instructions
Instruction name
Mnemonic
Primary function
Stores the PC memory address of
MOVR(560)
MOVRW(561) a bit or word in an Index Register.
MOVE TO REGISTER
MOVE TIMER/COUNTER PV TO
REGISTER
SET RECORD LOCATION
GET RECORD NUMBER
SETR(635)
GETR(636)
DOUBLE MOVE
DOUBLE DATA EXCHANGE
DOUBLE EQUAL
DOUBLE NOT EQUAL
DOUBLE LESS THAN
DOUBLE LESS THAN OR EQUAL
DOUBLE GREATER THAN
DOUBLE GREATER THAN OR EQUAL
DOUBLE COMPARE
DOUBLE INCREMENT BINARY
DOUBLE DECREMENT BINARY
DOUBLE SIGNED BINARY ADD
WITHOUT CARRY
DOUBLE SIGNED BINARY SUBTRACT
WITHOUT CARRY
MOVL(498)
XCGL(562)
=L(301)
tuL(306)
tL(311)
t=L(316)
uL(321)
u=L(326)
CMPL(060)
++L(591)
– –L(593)
+L(401)
Outputs the PC memory address
stored in an Index Register.
Transfers between Index
Registers. Used for exchanges
and comparisons.
Changes the PC memory address
in the Index Register by
incrementing, decrementing, or
offsetting its content.
–L(411)
Note Instructions for double-length operands (i.e., those with “L” at the end) are used
for index registers IR0 to IR15 because each register contains two words.
Processing Related to
Index Registers
The CS1’s Table Data Processing instructions complement the functions of the
Index Registers. These instructions can be broadly divided into the stack-processing and table-processing instructions
Processing
Purpose
Stack processing
Table
processing
Tables with
one-word records
Basic
processing
(Range instructions)
Special
processing
Tables with multiple-word records
(Record-table instructions)
Operate FIFO (first-in first-out) or
LIFO (last-in first-out) data tables.
Find values such as the
checksum, a particular value, the
maximum value, or minimum
value in the range.
Perform various other table
processing such as comparisons
or sorting.
Process data in records that are
several words long.
Instructions
SSET(630), PUSH(632),
FIFO(633), and LIFO(634)
FCS(180), SRCH(181),
MAX(182), MIN(183), and
SUM(184)
Combine Index Registers with
instructions such as SRCH(181),
MAX(182), MIN(183), and
comparison instructions.
Combine Index Registers with
instructions such as DIM(631),
SETR(635), GETR(636), and
comparison instructions.
517
Section 13-2
Index Registers
Stack Processing
Stack instructions act on specially defined data tables called stacks. Data can be
drawn from a stack on a first-in first-out (FIFO) or last-in first-out (LIFO) basis.
A particular region of I/O memory must be defined as a stack. The first words of
the stack indicate the length of the stack and contain the stack pointer. The stack
pointer is incremented each time that data is written to the stack to indicate the
next address where data should be stored.
ÉÉÉÉÉ
ÉÉÉÉÉ
ÉÉÉÉÉ
A
Pointer address
Pointer address
A
Stack
region
ÄÄÄÄÄ
ÇÇÇÇÇ
B
ÄÄÄÄÄ
ÄÄÄÄÄ
Pointer address
A
B
C
Pointer address
A
B
C
ÇÇÇÇÇ
Note Actually, the first two words of the stack contain the PC memory address of the
last word in the stack and the second two words contain the stack pointer.
The following diagram shows the operation of a first-in first-out (FIFO) stack.
Pointer address
A
ÇÇÇÇÇ
Reads the oldest word of data stored
in the stack. Each time that a word is
read, the pointer is incremented by one
to indicate the next address.
A
B
C
X
The following diagram shows the operation of a last-in first-out (LIFO) stack.
Pointer address
Reads most recent word of data stored
in the stack. Each time that a word is
read, the pointer is decremented by one
to indicate the next address.
A
B
X
–1
V
W
X
The following table lists the stack instructions and their functions. Typical applications for stacks would be processing shelf information for automatic warehousing systems or processing test results.
Instruction
Function
SSET(630)
Defines a stack region.
PUSH(632)
Stores data in the next available word in the stack.
FIFO(633)
Reads data from the stack on a first-in first-out basis.
LIFO(634)
Reads data from the stack on a last-in first-out basis.
Table Processing (Range Instructions)
The range instructions act on a range of words, which can be considered a table
of one-word records. These instructions perform basic operations such as finding the maximum value or minimum value in the range, search for a particular
value in the range, or calculating the sum or FCS.
518
Section 13-2
Index Registers
The PC memory address of the result word (word containing the max. value,
min. value, search data, etc.) is automatically stored in IR0. The Index Register
(IR0) can be used as an operand in later instructions such as MOV(021) to read
the contents of the word or perform other processing.
Data
Range specified in the
instruction
Max. value
Min. value
Search
ÉÉÉÉ
ÉÉÉÉ
SUM calculation
FCS calculation
The following table lists the range instructions and their functions.
Instruction
Function
Description
SRCH(181)
Finds search data.
Finds the search data in the specified range
and outputs the PC memory address of the
word containing that value to IR0.
MAX(182)
Finds max. value.
Finds the maximum value in the specified
range and outputs the PC memory address
of the word containing that value to IR0.
MIN(183)
Finds min. value.
Finds the minimum value in the specified
range and outputs the PC memory address
of the word containing that value to IR0.
SUM(184)
Calculates sum.
FCS(180)
Calculates checksum.
Calculates the sum of the data in the
specified range.
Calculates the frame checksum of the data in
the specified range.
The Index Registers can be combined with other instructions (such as comparison instructions) in FOR–NEXT loops to perform more complicated operations
on ranges of words.
Table Processing (Record-table Instructions)
The record-table instructions act on specially defined data tables made up of
equal-length records. The records can be accessed by record number for easy
processing.
Instruction
DIM(631)
Function
Description
SETR(635)
Defines a record
table.
Sets record location.
Declares the length of each record and the
number of records.
Writes the location of the specified record
(the PC memory address of the beginning of
the record) in the specified Index Register.
GETR(636)
Gets record location.
Returns the record number of the record that
contains the PC memory address in the
specified Index Register.
Note Record numbers and word addresses are related through the Index Registers.
Specify a record number in SETR(635) to store the PC memory address of the
beginning of that record in an Index Register. When data is required from the
record, add the required offset to that Index Register to access any word in the
record.
Use the record-table instructions with Index Registers to perform the following
kinds of operations: reading/writing record data, searching records, sorting record data, comparing record data, and performing calculations with record data.
519
Section 13-2
Index Registers
A typical application of record tables is storing manufacturing data for different
models of a product (such as temperature and pressure settings) in record form
and switching from model to model just by changing the record number.
Record table
Record 1
Record 2
Model A
Model A
↓
Record 2
No. 2
↓
Temperature setting
Pressure setting
Record N
Basically, record tables are used with the following steps:
1, 2, 3...
1. Define the structure of the record table with DIM(631) and set the PC
memory address of a record in an Index Register with SETR(635).
2. Offset or increment the PC memory address in the Index Register to read or
compare words in the record.
3. Offset or increment the PC memory address in the Index Register to switch
to another record.
4. Repeat steps 2 and 3 as required.
Example
The following example uses Index Registers and the record-table instructions to
compare three values to words 1, 3, and 5 in each record. If a match is found, the
record number is stored in D00000.
DIM(631) defines a record table with 1,000 records of 5 words
each.
SETR(635) stores the PC memory address of the first record in
IR0.
• The first, third, and fifth words in the record are compared to three
different values.
• If all three words match their respective values, the record number
is stored in D00000 by GETR(636) and the loop is broken.
• If all three words do not match their respective values, 5 is added
to IR0 and the loop continues.
520
Section 13-2
Index Registers
0000
01
DIM
&1
&5
Defines record table 1 with 1,000 records of
5 words each.
&1000
E0_00000
SETR
&1
&0
Stores the PC memory address of table number 1’s first record (record 0) in IR0.
IRO
JMP
&1000
FOR
&1000
Jumps past the FOR–NEXT loop if the processing conditions haven’t been set.
Controls the FOR–NEXT loop for a maximum
of 1,000 repetitions (1,000 records).
GETR
=
=
=
+0,IRO
+2,IRO
+4,IRO
&1
#1234
#ABCD
#9999
IRO
D00000
BREAK
Compares the contents of word 1 to #1234,
word 3 to #ABCD, and word 5 to #9999.
If words 1, 3, and 5 contain the comparison
data, the record number is stored in D00000
and BREAK interrupts the loop.
ON
+L
IRO
Adds 5 to the PC memory address in IR0 to
move to the beginning of the next record.
&5
IRO
NEXT
JME
&1000
Returns execution to FOR to continue the loop.
Jump destination if the processing conditions
haven’t been set.
Increments IR0 by five with each repetition and compares the first, third,
and fifth words in each record to the comparison data. Writes the record
number to D00000 and breaks the loop if matching data is found.
521
Section 13-3
Serial Communications
13-3 Serial Communications
The CS1 CPU Units support the following serial communications functions. Host
link communications and no-protocol communications are described in detail
later in this section.
Protocol
Host link
Connections
Host computer
OMRON PT
(Programmable
Terminal)
or
Ports
Description
1) Various control commands such as reading
and writing I/O memory, changing the
operating mode, and force-setting/resetting
bits can be executed by issuing host link
commands or FINS commands from the host
computer to the CPU Unit.
Peripheral RS-232C
OK
OK
2) It is also possible to issue 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 PC or send data such as
production planning information to the PC.
No-protocol
Standard external device
Communicate with standard devices connected Not
to the RS-232C port without a
allowed
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.
OK
NT link
1:N or 1:1
OMRON PTs
(Programmable Terminals)
Data can be exchanged with PTs without using a OK
communications program in the CPU Unit.
OK
Peripheral
bus
Programming Devices
(Not Programming Consoles)
Provides high-speed communications with
Programming Devices other than Programming
Consoles.
(Remote programming through modems is not
supported.)
OK
522
OK
Section 13-3
Serial Communications
13-3-1 Host Link Communications
The following table shows the host link communication functions available in
CS1 PCs. Select the method that best suits your application.
Command
flow
Host computer
↓
PC
Command type
Communications method
Host link command
Create frame in the host
computer and issue command
to the PC. Receive the
response from the PC.
Host link command
Configuration
Directly connect the host computer in a 1:1
or 1:N system.
OR
Application:
Use this method when
communicating primarily from
the host computer to the PC.
FINS command1
Create frame in the host
(with host link header computer and issue command
and terminator)
to the PC. Receive the
response from the PC.
FINS
Header
Terminator
Command
Directly connect the host computer in a 1:1
or 1:N system.
OR
Application:
Use these methods when
communicating primarily from
the host computer to PCs in the
network.
Command
Communicate with other PCs in the network
from the host computer.
(Convert from host link to network protocol.)
Command
PC
↓
Host computer
command2
FINS
Issue frame with the CPU Unit’s
(with host link header SEND/RECV/CMND
and terminator)
instructions. Receive response
from the host computer.
Directly connect the host computer in a 1:1
system.
SEND/RECV/
CMND
FINS
Header
Application:
Use this method when
Terminator communicating primarily from
the PC to the host computer to
transmit status information such
as error information.
Command
Communicate with the host computer
through other PCs in the network.
(Convert from host link to network protocol.)
SEND/RECV/
CMND
Command
Note
1. The FINS command must have a host link header and terminator attached
before it is transmitted from the host computer.
2. The FINS command is transmitted from the PC with a host link header and
terminator attached. A program must be prepared in the host computer to
analyze the FINS commands and return the proper responses.
523
Section 13-3
Serial Communications
Procedure
Power OFF
Connect the host computer
and CPU Unit.
Set the DIP switch on the front
of the CPU Unit.
• Turn pin 4 ON when using the peripheral port.
• Turn pin 5 OFF when using the RS-232C port.
Power ON
Set the PC Setup from a Programming Device.
(Settings such as the communications mode and parameters.)
Turn ON the Port Restart Bit.
Host computer → PC
Issue host link
commands from
the host computer.
• Peripheral port: Addresses 144 to 147
• RS-232C port: Addresses 160 to 163
• Be sure to set the communications mode to host link.
• Peripheral port: A52601
• RS-232C port: A52600
PC → Host computer
Issue FINS commands from the
host computer.
Execute SEND/RECV/CMND
instructions in the PC’s program.
Receive responses in the host
computer. (A program is required in the host computer.)
Host Link Commands
The following table lists the host link commands. Refer to the C-series Host Link
Units System Manual (W143) for more details.
Header
code
RR
CIO AREA READ
RL
LINK AREA READ
RH
HR AREA READ
RC
PV READ
RG
T/C STATUS READ
RD
DM AREA READ
RJ
AR AREA READ
RE
EM AREA READ
WR
CIO AREA WRITE
524
Name
Function
Reads the contents of the specified number of CIO Area words,
starting from the specified word.
Reads the contents of the specified number of Link Area words,
starting from the specified word.
Reads the contents of the specified number of Holding Area words,
starting from the specified word.
Reads the contents of the specified number of timer/counter PVs
(present values), starting from the specified timer/counter.
Reads the status of the Completion Flags of the specified number of
timers/counters, starting from the specified timer/counter.
Reads the contents of the specified number of DM Area words,
starting from the specified word.
Reads the contents of the specified number of Auxiliary Area words,
starting from the specified word.
Reads the contents of the specified number of EM Area words,
starting from the specified word.
Writes the specified data (word units only) to the CIO Area, starting
from the specified word.
Section 13-3
Serial Communications
Header
code
WL
Name
Function
LINK AREA WRITE
Writes the specified data (word units only) to the Link Area, starting
from the specified word.
WH
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.
WE
EM AREA WRITE
Writes the specified data (word units only) to the EM Area, starting
from the specified word.
R#
SV READ 1
Reads the 4-digit BCD constant or word address in the SV of the
specified timer/counter instruction.
R$
SV READ 2
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.
R%
SV READ 3
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.
W#
SV CHANGE 1
Changes the 4-digit BCD constant or word address in the SV of the
specified timer/counter instruction.
W$
SV CHANGE 2
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.
W%
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
STATUS READ
Reads the operating status of the CPU Unit (operating mode,
force-set/reset status, fatal error status).
SC
STATUS CHANGE
Changes the CPU Unit’s operating mode.
MF
ERROR READ
Reads and clears errors in the CPU Unit (non-fatal and fatal).
KS
FORCE SET
Force-sets the specified bit.
KR
FORCE RESET
Force-resets the specified bit.
FK
MULTIPLE FORCE SET/RESET
Force-sets, force-resets, or clears the forced status of the specified
bits.
KC
FORCE SET/RESET CANCEL
Cancels the forced status of all force-set and force-reset bits.
MM
PC MODEL READ
Reads the model type of the PC.
TS
TEST
Returns, unaltered, one block of data transmitted from the host
computer.
RP
PROGRAM READ
Reads the contents of the CPU Unit’s user program area in machine
language (object code).
WP
PROGRAM WRITE
Writes the machine language (object code) program transmitted from
the host computer into the CPU Unit’s user program area.
MI
I/O TABLE GENERATE
Creates a registered I/O table with the actual I/O table.
QQMR
COMPOUND COMMAND
Registers the desired bits and words in a table.
QQIR
COMPOUND READ
Reads the registered words and bits from I/O memory.
XZ
ABORT (command only)
Aborts the host link command that is currently being processed.
INITIALIZE (command only)
Initializes the transmission control procedure of all PCs connected to
the host computer.
IC
Undefined command
(response only)
This response is returned if the header code of a command was not
recognized.
525
Section 13-3
Serial Communications
FINS Commands
Type
I/O Memory
Area Access
The following table lists the FINS commands. Refer to the FINS Commands Reference Manual (W227) for more details.
Command
code
01
01
01
02
01
03
Name
MEMORY AREA READ
MEMORY AREA WRITE
MEMORY AREA FILL
01
04
01
05
MULTIPLE MEMORY AREA
READ
MEMORY AREA TRANSFER
02
02
02
01
02
03
PARAMETER AREA READ
PARAMETER AREA WRITE
PARAMETER AREA FILL
Program Area 03
Access
03
03
Execution
04
Control
04
Configuration 05
Read
05
Status Read
06
06
06
07
08
01
PROGRAM AREA READ
PROGRAM AREA WRITE
PROGRAM AREA CLEAR
RUN
02
01
02
01
20
STOP
CONTROLLER DATA READ
CONNECTION DATA READ
CONTROLLER STATUS READ
CYCLE TIME READ
Clock Access
07
07
09
01
02
20
CLOCK READ
CLOCK WRITE
MESSAGE READ/CLEAR
0C
0C
01
02
0C
03
ACCESS RIGHT ACQUIRE
ACCESS RIGHT FORCED
ACQUIRE
ACCESS RIGHT RELEASE
21
21
21
01
02
03
ERROR CLEAR
ERROR LOG READ
ERROR LOG CLEAR
Parameter
Area Access
Message
Access
Access Right
Error Access
526
Function
Reads consecutive data from the I/O memory area.
Writes consecutive data to the I/O memory area.
Fills the specified range of I/O memory with the same
data.
Reads non-consecutive data from the I/O memory
area.
Copies and transfers consecutive data from one part of
the I/O memory area to another.
Reads consecutive data from the parameter area.
Writes consecutive data to the parameter area.
Fills the specified range of the parameter area with the
same data.
Reads data from the user program area.
Writes data to the user program area.
Clears the specified range of the user program area.
Switches the CPU Unit to RUN, MONITOR, or DEBUG
mode.
Switches the CPU Unit to PROGRAM mode.
Reads CPU Unit information.
Reads the model numbers of the specified Units.
Reads the CPU Unit’s status information.
Reads the average, maximum, and minimum cycle
times.
Reads the clock.
Sets the clock.
Reads/clears messages and FAL(S) messages.
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.
Reads the error log.
Clears the error log pointer to zero.
Section 13-3
Serial Communications
Type
File Memory
Command
Name
code
22
01
FILE NAME READ
22
02
SINGLE FILE READ
22
03
SINGLE FILE WRITE
22
22
22
04
05
07
FILE MEMORY FORMAT
FILE DELETE
FILE COPY
22
22
08
0A
22
0B
22
0C
22
15
Forced Status 23
01
FILE NAME CHANGE
I/O MEMORY AREA FILE
TRANSFER
PARAMETER AREA FILE
TRANSFER
PROGRAM AREA FILE
TRANSFER
CREATE/DELETE
DIRECTORY
FORCED SET/RESET
23
02
Function
Reads the file memory’s file information.
Reads the specified amount of data from the specified
point in a file.
Writes the specified amount of data from the specified
point in a file.
Formats file memory.
Deletes the specified files from file memory.
Copies a file within file memory or between two file
memory devices in a system.
Changes a file name.
Transfers or compares data between the I/O memory
area and file memory.
Transfers or compares data between the parameter
area and file memory.
Transfers or compares data between the program area
and file memory.
Creates or deletes a directory.
Force-sets, force-resets, or clears the forced status of
the specified bits.
Cancels the forced status of all force-set and
force-reset bits.
FORCED SET/RESET
CANCEL
Message Communications Functions
The FINS commands listed in the table above can also be transmitted through
the network from other PCs to the CPU Unit. Observe the following points when
transmitting FINS commands through the network.
• CS1 CPU Bus Units (such as Controller Link Units or Ethernet Units) must be
mounted in the local PC and destination PC to transmit FINS commands.
• FINS commands are issued with CMND(490) from the CPU Unit’s program.
• FINS commands can be transmitted over three networks at most. The networks can be the same type or different types.
Serial Communications Unit
Serial Communications Unit
CMND
FINS command
Refer to the CS1 CPU Bus Unit’s Operation Manual for more details on the message communications functions.
527
Section 13-3
Serial Communications
13-3-2 No-protocol Communications
The following table lists the no-protocol communication functions available in
CS1 PCs.
Transfer direction
Data transmission
(PC → External device)
Method
Max. amount
of data
Execution of TXD(236)
in the program*
256 bytes
Frame format
Start code
Yes: 00 to FF
No: None
End code
Yes:
00 to FF or CR+LF
No: None
Data reception
(External device → PC)
Execution of RXD(235) 256 bytes
in the program
Other
functions
Send delay
time (delay
between TXD
execution and
sending data
from specified
port): 0 to
99,990 ms
(unit: 10 ms)
---
Note A transmission delay or “no-protocol mode delay” can be specified in the PC Setup (address 162). This setting causes a delay of up to 30 seconds between
execution of TXD(236) and the transmission of data from the specified port.
Procedure
Power OFF
Connect the CPU Unit and external
device through the RS-232C port
Set the DIP switch on the front of
the CPU Unit.
Turn pin 5 OFF.
Power ON
Set the PC Setup from a Programming Device.
(Settings such as the communications mode and parameters.)
Turn ON the Port Restart Bit.
PC → External device
Execute TXD(236).
Set addresses 160 to 163. In particular, set
the communications mode to no-protocol
mode, set the start code, end code, amount of
data, and no-protocol mode delay.
Turn A52600 from OFF to ON.
External device → PC
Execute RXD(235).
Message Frame Formats
Data can be placed between a start code and end code for transmission by
TXD(236) and frames with that same format can be received by RXD(235).
When transmitting with TXD(236), just the data from I/O memory is transmitted,
and when receiving with RXD(235), just the data itself is stored in I/O memory.
Up to 256 bytes (including the start and end codes) can be transferred in no-protocol mode.
528
Section 13-3
Serial Communications
The following table shows the message formats that can be set for transmissions and receptions in no-protocol mode. The format is determined by the start
code (ST) and end code (ED) settings in the PC Setup.
Start code
setting
No
Yes
End code setting
No
data
Yes
data+ED
CR+LF
data+CR+LF
(data: 256 bytes max.)
(data: 255 bytes max.)
(data: 254 bytes max.)
ST+data
ST+data+ED
ST+data+CR+LF
(data: 255 bytes max.)
(data: 254 bytes max.)
(data: 253 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.
Note
1. 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.
2. There is a setting in the PC Setup (address 162: no-protocol mode delay)
that will delay the transmission of data after the execution of TXD(236).
No-protocol mode
transmission delay
Transmission
Time
Execution of TXD(236)
Refer to the CS1-series Programmable Controllers Programming Manual
(W340) for more details on TXD(236) and RXD(235).
13-3-3 NT Link (1:N Mode)
In the CS1 Series, communications are possible with PTs (Programmable Terminals) using NT Links (1:N mode).
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 PC Setup settings (-EV1 only).
High-speed NT Links are possible, however, only with the NT31(C)-V2 or
NT631(C)-V2 PTs.
529
Section 13-4
Startup Settings and Maintenance
PC Setup
Communications
port
Peripheral port
Programming
Console setting
address
144
Bits:
145
Bits:
8 to 11
Serial communications mode
Baud rate
0 to 7
150
Bits:
RS-232C port
Name
160
Bits:
161
Bits:
0 to 3
NT Link mode
maximum unit
number
8 to 11
Serial communications mode
Baud rate
Other conditions
02 Hex: NT Link
(1:N mode)
00 to 09 Hex:
Standard NT Link
00 Hex: Host Link
Turn ON pin 4 on
the CPU Unit DIP
switch.
02 Hex: NT Link
(1:N mode)
00 to 09 Hex:
Standard NT Link
0A Hex:
High-speed NT
Link (see note 1)
0 to 7 Hex
NT Link mode
maximum unit
number
0 to 3
Default values
0A Hex:
High-speed NT
Link (see note 1)
0 to 7 Hex
0 to 7
166
Bits:
Settings
contents
00 Hex: Standard
NT Link
0 Hex (Max. unit
No. 0)
---
00 Hex: Host Link
Turn OFF pin 5
on the CPU Unit
DIP switch.
00 Hex: Standard
NT Link
0 Hex (Max. unit
No. 0)
---
Note Set the baud rate to 115,200 bps when making settings with the CX-Programmer.
PC System Menu
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.
13-4 Startup Settings and Maintenance
This section describes the following functions related to startup and maintenance.
• Hot Start/Hot Stop Functions
• Startup Mode Setting
• RUN Output
• Power OFF Detection Delay Setting
• Clock
• Program Protection
• Remote Programming and Monitoring
Hot Start/Hot Stop Functions
Operating Mode Change
Hot Start
Turn ON the IOM Hold Bit (A50012) 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
MONITOR or RUN
530
CIO and
other areas
Section 13-4
Startup Settings and Maintenance
Hot Stop
When the IOM Hold Bit (A50012) is ON, all data* in I/O memory will also be retained when the CPU Unit is switched from RUN/MONITOR mode to PROGRAM mode to stop program execution.
I/O memory
MONITOR or RUN
Retain
CIO and
other areas
PROGRAM
Note *The following areas of I/O memory will be cleared during mode changes (PROGRAM ↔ RUN/MONITOR) unless the IOM Hold Bit is ON: the CIO Area (I/O
Area, Data Link Area, CS1 CPU Bus Unit Area, Special I/O Unit Area, Inner
Board Area, SYSMAC BUS Area, I/O Terminal Area, 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
A50012
When this bit is ON, all of I/O memory will
be retained when the operating mode is
changed (PROGRAM ↔ RUN/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.
(When the IOM Hold Bit is OFF, instructions will be executed after the outputs
have been cleared.)
PC Power ON
In order for all data* in I/O memory to be retained when the PC is turned on
(OFF → ON), the IOM Hold Bit must be ON and it must be protected in the PC
Setup (address 80, IOM Hold Bit Status at Startup).
Retain
Power ON
I/O memory
CIO and
other areas
Auxiliary Area Flags and Words
Name
IOM Hold Bit
Address
A50012
Description
When this bit is ON, all of I/O memory will
be retained when the operating mode is
changed (PROGRAM ↔ RUN/MONITOR).
PC Setup
Programming
Console
address
80 bit 15
Name
IOM Hold Bit
Status at Startup
Setting
0: The IOM Hold Bit is cleared to
0 when power is turned on.
Default
0 (Cleared)
1: The IOM Hold Bit is retained
when power is turned on.
531
Section 13-4
Startup Settings and Maintenance
Startup Mode Setting
The CPU Unit’s initial operating mode (when the power is turned on) can be set
in the PC Setup.
PC Setup
Programming
Console
address
81
Name
Startup
Mode
Meaning
Specifies
operating
mode to
use at
startup
Setting
PRCN: Programming Console’s
mode switch
PRG: PROGRAM mode
Default
PRCN:
Programming
Console’s
mode switch
MON: MONITOR mode
RUN: RUN mode
Note If the Startup Mode is set to PRCN (Programming Console’s mode switch) but a
Programming Console isn’t connected, the CPU Unit will start in PROGRAM
mode. Change the PC Setup from the default value to start in MONITOR mode
or RUN mode when the power is turned ON.
RUN Output
Two of the Power Supply Units (the C200HW-PA204R and C200HW-PA209R)
are equipped with a RUN output. This output point is ON (closed) when the CPU
Unit is operating in RUN or MONITOR mode and OFF (open) when the CPU Unit
is in PROGRAM mode.
Power Supply Unit
RUN output
This RUN output can be used to create an external safety circuits, such as an
emergency stop circuit that prevents an Output Unit’s external power supply
from providing power unless the PC is on.
Note When a Power Supply Unit without a RUN output is used, an equivalent output
can be created by programming the Always ON Flag (A1) as the execution
condition for an output point from an Output Unit.
! Caution
If Output Unit’s external power supply goes on before the PC’s power supply, the
Output Unit may malfunction momentarily when the PC first goes on. To prevent
any malfunction, add an external circuit that prevents the Output Unit’s external
power supply from going on before the power supply to the PC itself. Create a
fail-safe circuit like the one described above to ensure that power is supplied by
an external power supply only when the PC is operating in RUN or MONITOR
mode.
Power OFF Detection Delay Setting
Normally a power interruption will be detected about 10 to 25 ms after the power
supply voltage drops below 85% of the rated value. There is a setting in the PC
Setup (address 225 bits 0 to 7, Power OFF Detection Delay Time) that can extend this time by up to 10 ms.
When the power OFF interrupt task is enabled, it will be executed when the power interruption is confirmed, otherwise the CPU will be reset and operation will be
stopped.
Clock Functions
The CS1 PCs have the following clock functions:
• Monitoring of the time that power interruptions occurred
532
Section 13-4
Startup Settings and Maintenance
• Monitoring of the time that the PC was turned on
• Monitoring of the total time that the PC has been on
The CS1 PCs are shipped without the backup battery installed, and the CPU
Unit’s internal clock will be read 00/01/01 00:00:00 or possibly another value
when the battery is connected.
To use the clock functions, connect the battery, turn the power on, and set the
time and date with a Programming Device (Programming Console or CX-Programmer) or the FINS command (07 02, CLOCK WRITE). The CPU Unit’s internal clock will begin operating once it has been set.
Auxiliary Area Flags and Words
Name
Clock data
Addresses
Function
A35100 to A35107
A35108 to A35115
A35200 to A35207
A35208 to A35215
A35300 to A35307
A35308 to A35315
A35400 to A35407
Second: 00 to 59 (BCD)
Minute: 00 to 59 (BCD)
Hour: 00 to 23 (BCD)
Day of the month: 00 to 31 (BCD)
Month: 00 to 12 (BCD)
Year: 00 to 99 (BCD)
Day of the week:
00: Sunday, 01: Monday,
02: Tuesday, 03: Wednesday,
04: Thursday, 05: Friday, 06: Saturday
Contain the time at which the power
was turned on.
Contain the time at which the power
was last interrupted.
Contains the total time (in binary) that
the PC has been on in 10-hour units.
Start-up Time
A510 and A511
Power Interruption
Time
Total Power ON Time
A512 and A513
A523
Related Instructions
Instruction
SEC(065)
HMS(066)
CADD(730)
CSUB(731)
DATE(735)
Name
HOURS TO
SECONDS
SECONDS TO
HOURS
CALENDAR ADD
CALENDAR
SUBTRACT
CLOCK
ADJUSTMENT
Function
Converts time data in hours/minutes/seconds
format to an equivalent time in seconds only.
Converts seconds data to an equivalent time in
hours/minutes/seconds format.
Adds time to the calendar data in the specified
words.
Subtracts time from the calendar data in the
specified words.
Changes the internal clock setting to the setting
in the specified source words.
Program Protection
The CS1 user program can be write-protected and completely protected (read/
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
from a Programming Device (including Programming Consoles). This function
can prevent the program from being overwritten inadvertently at the work site.
It is still possible to read and display the program when it is write-protected.
Read/write-protection Using Passwords
Both read and write access to the user program area can be blocked from the
CX-Programmer. Protecting the program will prevent unauthorized copying of
the program and loss of intellectual property. A password is set for program
protection from a Programming Device and access is prevented to the whole
program.
533
Section 13-4
Startup Settings and Maintenance
Note
1. If you forget the password, the program within the PC cannot be transferred
to the computer. Make a note of the password, and store it in a safe place.
2. If you forget the password, programs cannot be transferred from the computer to the PC. Programs can be transferred from the computer to the PC
even if the password protection has not been released.
Password Protection
1, 2, 3...
1. Register a password either online or offline as follows:
a) Select the PC and select Properties from the View Menu.
b) Select Protection from the PC Properties Dialog Box and input the
password.
2. Set password protection online as follows:
a) Select PLC, Password Protection, and then Set. The Program Protection Setting Dialog Box will be displayed.
b) Click the OK button.
Remote Programming and Monitoring
CS1 PCs can be programmed and monitored remotely through a modem or
Controller Link network.
1, 2, 3...
1. Modem Connections
The host link function can operate through a modem, which allows monitoring of a distant PC’s operation, data transfers, or even online editing of a distant PC’s program by phone. All of the Programming Device’s online operations are supported in these connections.
Programming
Device
RS-232C
Telephone
connection
Modem
Host Link
Modem
CPU Unit
RS-232C
2. Controller Link Network Connections
PCs in a Controller Link or Ethernet network can be programmed and monitored through the Host Link. All of the Programming Device’s online operations are supported in these connections.
Programming
Device
Controller Link Unit
RS-232C
CPU Unit
(Functions as a
gateway.)
Controller Link Unit
CPU Unit
Host Link
Unit Profiles
The following information can be read for CS1-series Units from the CX-Programer.
534
Diagnostic and Debugging Functions
Section 13-5
• Manufacturing information (lot number, serial number, etc.): Facilitates providing information to OMRON when problems occur with Units.
• Unit information (type, model number, correct rack/slot position): Provides an
easy way to obtain mounting information.
• User-defined text (256 characters max.): Enables recording information necessary for maintenance (Unit inspection history, manufacturing line numbers,
and other application information) in Memory Cards.
13-5 Diagnostic and Debugging Functions
This section provides a brief overview of the following diagnostic and debugging
functions.
• Error Log
• Output OFF Function
• Failure Alarm Functions (FAL(006) and FALS(007))
• Failure Point Detection (FPD(269)) Function
Error Log
Each time that an error occurs in a CS1 PC, the CPU Unit stores error information in the Error Log Area. The error information includes the error code (stored
in A400), error contents, and time that the error occurred. Up to 20 records can
be stored in the Error Log.
In addition to system-generated errors, the PC records user-defined FAL(006)
and FALS(007) errors, making it easier to track the operating status of the system.
Note A user-defined error is generated when FAL(006) or FALS(007) is executed in
the program. The execution conditions of these instructions constitute the userdefined error conditions. FAL(006) generates a non-fatal error and FALS(007)
generates a fatal error that stops program execution.
535
Section 13-5
Diagnostic and Debugging Functions
When more than 20 errors occur, the oldest error data (in A100 to A104) is deleted, the remaining 19 records are shifted down by one record, and the newest
record is stored in A195 to A199.
Error code
Order of
occurrence
Error Log Area
Error code
Error contents
Minute, second
Day, hour
Time of
occurrence
Year, month
Error code
Error contents
Minute, second
Day, hour
Year, month
Time of
occurrence
Error code
Error contents
Minute, second
Day, hour
Year, month
Time of
occurrence
Error Log Pointer
The number of records is stored in binary in the Error Log Pointer (A300). The
pointer is not incremented when more than 20 errors have occurred.
Output OFF Function
As an emergency measure when an error occurs, all outputs from Output Units
can be turned OFF by turning ON the Output OFF Bit (A50015). 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 and stopping program execution.
Failure Alarm Functions
The FAL(006) and FALS(007) instructions generate user-defined errors.
FAL(006) generates a non-fatal error and FALS(007) generates a fatal error that
stops program execution.
When the user-defined error conditions (execution conditions for FAL(006) or
FAL(007)) are met, the Failure Alarm instruction will be executed and the following processing will be performed.
1, 2, 3...
1. The FAL Error Flag (A40215) or FALS Error Flag (A40106) 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.
536
Section 13-5
Diagnostic and Debugging Functions
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.)
Operation of FAL(006)
FAL
002
#0000
When execution condition A goes ON, an error with FAL number 2 is generated,
A40215 (FAL Error Flag) is turned ON, and A36002 (FAL Number 2 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 a Programming Device (including a Programming Console).
Operation of FALS(007)
FALS
003
#0000
When execution condition B goes ON, an error with FALS number 3 is generated, and A40106 (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 a Programming Device
(including a Programming Console).
Failure Point Detection
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 a Programming Device. 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 that bit’s address. The output can be set to bit address output
(PC memory address) or message output (ASCII).
• If bit address output is selected, the PC memory address of the bit can be
transferred to an Index Register and the Index Register can be indirectly addressed in later processing.
537
Section 13-5
Diagnostic and Debugging Functions
• If the message output is selected, the bit address will be registered in an ASCII
message that can be displayed on a Programming Device.
First register word
(Diagnostics output destination)
FPD(269)
execution
condition
A
Monitoring time (0.1-s units): 10 s
Control data
(FAL 004, bit address output)
Carry Flag
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 D01000 and D01001.
Auxiliary Area Flags and Words
Name
Operation
Error Code
A400
FAL Error Flag
A40215
When an error occurs, its error code is stored in
A400.
ON when FAL(006) is executed.
FALS Error Flag
A40106
ON when FALS(007) is executed.
Executed FAL
Number Flags
Error Log Area
A360 to
A391
A100 to
A199
A300
The corresponding flag is turned ON when an
FAL(006) or FALS(007) error occurs.
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).
Turn this bit ON to reset the Error Log Pointer
(A300) to 00.
Turn this bit ON when you want the monitoring
time to be set automatically when FPD(269) is
executed.
Error Log Pointer
Error Log Pointer
Reset Bit
FPD Teaching Bit
538
Address
A50014
A59800
Section 13-6
Other Functions
13-6 Other Functions
CS1 Basic I/O Unit
Input Response Times
The input response times for CS1 Basic I/O Units can be set by Rack and Slot
number. Increasing the input response time reduces the effects of chattering
and noise. Decreasing the input response time (but keeping the pulse width
longer than the cycle time) allows reception of shorter input pulses.
Note Pulses shorter than the cycle time can be input with the quick-response inputs
available in some C200H High-density I/O Units.
Input response time
Input response time
CS1 Basic
I/O Unit
CS1 Basic
I/O Unit
Pulses shorter than the input
response time are not received.
I/O refreshing
I/O refreshing
CPU Unit
CPU Unit
PC Setup
The input response times for the 80 slots in a CS1 PC (Rack 0 Slot 0 through
Rack 7 slot 9) can be set in the 80 bytes in addresses 10 through 49.
Programming Console address
10
Bits 0 to 7
:
49
Bits 8 to 15
I/O Area Allocation
Name
CS1 Basic I/O Unit
Input Response Time for
Rack 0, Slot 0
:
CS1 Basic I/O Unit
Input Response Time for
Rack 7, Slot 9
Setting (Hex)
Default (Hex)
00: 8 ms
10: 0 ms
11: 0.5 ms
12: 1 ms
13: 2 ms
14: 4 ms
15: 8 ms
16: 16 ms
17: 32 ms
:
00 (8 ms)
Same as above.
00 (8 ms)
:
A Programming Device can be used to set the first word for I/O allocation in Expansion Racks (CS1 Expansion Racks and C200H Expansion I/O Racks). This
function allows each Rack’s I/O allocation area to be fixed within the range
CIO 0000 to CIO 0999. (The first words are allocated by rack number.)
539
SECTION 14
Program Transfer, Trial Operation, and Debugging
This section 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.
14-1 Program Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14-2 Trial Operation and Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14-2-1 Forced Set/Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14-2-2 Differential Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14-2-3 Online Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14-2-4 Turning OFF Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14-2-5 Tracing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
542
542
542
543
543
545
546
541
Section 14-2
Trial Operation and Debugging
14-1 Program Transfer
A Programming Device is used to transfer the programs, PC Setup, I/O memory
data, and I/O comments to the CPU Unit with the CPU Unit in PROGRAM mode.
Program Transfer Procedure for CX-Programmer
1, 2, 3...
1. Select PC, Transfer, and then To PC. The Transfer Options Dialog Box will
be displayed.
2. Specify the items for the transfer from among the following: Programs, PC
Setup, I/O tables, symbol tables, and I/O comments.
3. Click the OK button.
The program can be transferred using either of the following methods.
• Automatic transfer when the power is turned ON
When the power is turned ON, the AUTOEXEC.OBJ file in the Memory Card will
be read to the CPU Unit (pin 2 on the DIP switch must be ON).
• Program replacement during operation
The existing program file can be replaced with the program file specified in the
Auxiliary Area by turning ON the Replacement Start Bit in the Auxiliary Area
(A65015) from the program while the CPU Unit is in operation. Refer to Section 12 File Memory Functions for details.
14-2 Trial Operation and Debugging
14-2-1 Forced Set/Reset
A Programming Device can force-set (ON) or reset (OFF) specified bits (CIO
Area, Auxiliary Area, HR Area, and timer/counter Completion Flags). Forced
status will take priority over status output from the program or I/O refreshing.
This status cannot be overwritten by instructions, and will be stored until it is
cleared from a Programming Device.
Force-set/reset operations are used to force input and output during a trial operation or to force certain conditions during debugging.
Force-set/reset operations can be executed in either MONITOR or PROGRAM
modes, but not in RUN mode.
Note Turn ON the Forced Status Hold Bit (A50013) and the IOM Hold Bit (A50012) at
the same time to retain the status of bits that have been force-set or reset when
switching the operating mode.
Turn ON the Forced Status Hold Bit (A50013) and the IOM Hold Bit (A50012),
and set the Forced Status Hold Bit at Startup setting PC Setup to retain the status of the Forced Status Hold Bit hold to retain the status of bits that have been
force-set or reset when turning OFF the power.
Forced ON regardless
of programming
Input ignored
CPU Unit
Forced
set
Forced
set
Program
Output Unit
The following areas can be force-set and reset.
CIO (I/O bits, data link bits, CS1 CPU Bus Unit bits, Special I/O Unit bits, Inner
Board bits, SYSMAC BUS bits, Optical I/O Unit bits, work bits), WR Area, Timer
Completion Flags, HR Area, Counter Completion Flags.
542
Section 14-2
Trial Operation and Debugging
Programming Device Operation
• Select bits for forced setting/resetting.
• Select forced set or forced reset.
• Clear forced status.
14-2-2 Differential Monitoring
When the CPU Unit detects that a bit set by a Programming Device has changed
from OFF to ON or from ON to OFF, the results are indicated in the a Differentiate
Monitor Completed Flag (A50809). The Flag will turn ON when conditions set for
the differential monitor have been met. A Programming Device can monitor and
display these results on screen.
Programming Device
Detects bit A
OFF to ON
transition.
CPU Unit
I/O memory
Bit A
Monitored
for OFF
to ON
transition.
Programming Device Operation for CX-Programmer
1, 2, 3...
1. Click the bit for differential monitoring.
2. Click Differential Monitor from the PLC Menu. The Differential Monitor Dialog Box will be displayed.
3. Click Rising or Falling.
4. Click the Start button. The buzzer will sound when the specified change is
detected and the count will be incremented.
5. Click the Stop button. Differential monitoring will stop.
Related Auxiliary Bits/Words
Name
Differentiate Monitor
Completed Flag
Address
A50809
Description
Turns ON when the differential monitoring condition has been met
during differential monitoring.
Note: The flag will be cleared when differential monitoring is started.
14-2-3 Online Editing
The Online Editing function is used to add to or change part of a program in a
CPU Unit directly from the Programming Devices when the CPU Unit is in MONITOR or PROGRAM mode. Additions or changes are made one program section
at a time for the Programming Console and one or more program sections at a
time from the CX-Programmer. The function is thus designed for minor program
changes without stopping the CPU Unit.
Online editing is possible simultaneously from more than one computer running
the CX-Programmer as well as from a Programming Console as long as different
tasks are edited.
The cycle time will be increased by from one to several cycle times if the program
in the CPU Unit is edited online in MONITOR mode.
The maximum time cycle increase per cycle, however, is as follows:
• With a -E CPU Unit:
90 ms max.
• With a -EV1 CPU Unit: 12 ms max.
543
Section 14-2
Trial Operation and Debugging
The -EV1 CPU Units can thus be used to reduce the effects on the operating
status on the machine due to changes in the program during operation made
when maintaining the program.
Online Editing
Programming Device
Operating in
MONITOR mode.
Program section changed
The relation to the size of the task being edited to cycle time extension is as follows:
When using a -E CPU Unit, the size of the task that is being edited will determine
the length of time that a program will be stopped for online editing. By splitting the
program into smaller tasks, the amount of time that the cycle is extended will be
shorter using the Online Editing function than with previous PC models.
When using a -EV1 CPU Unit, the length of time that the cycle time is extended
due to online editing is almost unaffected by the size of the task (program) being
edited.
Precautions
The cycle time will be longer than normal when a program is overwritten using
Online Editing in MONITOR mode, so make sure that the amount of time that it is
extended will not exceed the cycle monitoring time set in the PC Setup. If it does
exceed the monitoring time, then a Cycle Time Over error will occur, and the
CPU Unit will stop. Restart the CPU Unit by selecting PROGRAM mode first before changing to RUN or MONITOR mode.
Note If the task being edited online contains a block program, then previous execute
data such as Standby (WAIT) or Pause status will be cleared by online editing,
and the next execution will be from the beginning.
Online Editing from CX-Programmer
1, 2, 3...
1. Display the program section that will be edited.
2. Select the instructions to be edited.
3. Select Program, Online Edit, and then Begin.
4. Edit the instructions.
5. Select Program, Online Edit, and then Send Changes The instructions
will be check and, if there are no errors, they will be transferred to the CPU
Unit. The instructions in the CPU Unit will be overwritten and cycle time will
be increased at this time.
! Caution
Proceed with Online Editing only after verifying that the extended cycle time will
not affect operation. Input signals may not be input if the cycle time is too long.
Temporarily Disabling Online Editing
It is possible to disable online editing for a cycle to ensure response characteristics for machine control in that cycle. Online editing from the Programming Device will be disabled for one cycle and any requests for online editing received
during that cycle will be held until the next cycle.
544
Section 14-2
Trial Operation and Debugging
Online editing is disabled by turning ON the Online Editing Disable Bit (A52709)
and setting the Online Editing Disable Bit Validator (A52700 to A52707) to 5A.
When these settings have been made and a request for online editing is received, online editing will be put on standby and the Online Editing Wait Flag
(A20110) will be turned ON.
When the Online Editing Disable Bit (A52709) is turned OFF, online editing will
be performed, the Online Editing Processing Flag (A20111) will turn ON, and the
Online Editing Wait Flag (A20110) will turn OFF. When online editing has been
completed, the Online Editing Processing Flag (A20111) will turn OFF.
Online editing can also be temporarily disabled by turning ON the Online Editing
Disable Bit (A52709) while online editing is being performed. Here too, the Online Editing Wait Flag (A20110) will turn ON.
If a second request for online editing is received while the first request is on
standby, the second request will not be recorded and an error will occur.
Online editing can also be disabled to prevent accidental online editing. As described above, disable online editing by turning ON the Online Editing Disable
Bit (A52709) and setting the Online Editing Disable Bit Validator (A52700 to
A52707) to 5A.
Enabling Online Editing from a Programming Device
When online editing cannot be enabled from the program, it can be enabled from
the CX-Programmer.
1, 2, 3...
1. Performing Online Editing with a Programming Console
If online editing is executed from a Programming Console and the online
editing standby status cannot be cleared, the Programming Console will be
locked out and Programming Console operations will not be possible.
In this case, connect the CX-Programmer to another serial port and turn
OFF the Online Edit Disable Bit (A52709). The online editing will be processed and Programming Console operations will be possible again.
2. Performing Online Editing with the CX-Programmer
If operations continue with online editing in standby status, CX-Programmer
may go offline. If this occurs, reconnect the computer to the PC and turn OFF
the Online Edit Disable Bit (A52709).
Related Auxiliary Bits/Words
Name
Online Edit Disable Bit Validator
Address
A52700 to
A52707
Online Edit Disable Bit
A52709
Online Editing Wait Flag
A20110
Online Editing Processing Flag
A20111
Description
Validates the Online Edit Disable Bit (A52709).
Not 5A: Online Edit Disable Bit invalid
5A:
Online Edit Disable Bit valid
To disable online editing, turn this bit ON and set the Online Edit
Disable Bit Validator (A52700 to A52707) to 5A.
ON when an online editing process is on standby because online
editing is disabled.
ON when an online editing process is being executed.
14-2-4 Turning OFF Outputs
If the Output OFF Bit (A50015) is turned ON through the OUT instruction or from
a Programming Device, all outputs from all Output Units will be turned OFF and
the INH indicator on the front of the CPU Unit will turn ON.
545
Section 14-2
Trial Operation and Debugging
The status of the Output OFF Bit is maintained even if power is turned OFF and
ON.
Output Unit
CPU Unit
All OFF
Output OFF Bit: ON
14-2-5 Tracing Data
The Data Trace function samples specified I/O memory data using any one of
the following timing methods, and it stores the sampled data in Trace Memory,
where they can be read and checked later from a Programming Device.
• Specified sampling time (10 to 2,550 ms in 10-ms units)
• One sample per cycle
• When the TRACE MEMORY SAMPLING instruction (TRSM) is executed
Up to 31 bits and 6 words in I/O memory can be specified for sampling. Trace
Memory capacity is 4,000 words.
Basic Procedure
1, 2, 3...
1. Sampling will start when the Sampling Start Bit (A50815) is turned ON.
2. Sampled data (after step 1 above) will be traced when the trace trigger condition is met, and the data just after the delay (see note 1) will be stored in
Trace Memory.
3. Trace Memory data will be sampled, and the trace ended.
Note Delay value: Specifies how many sampling periods to offset the sampling in
Trace Memory from when the Trace Start Bit (A50814) turns ON. The setting
ranges are shown in the following table.
No. of words
sampled
0
Setting range
–1999 to 2000
1
–1332 to 1333
2
–999 to 1000
3
–799 to 800
4
–665 to 666
5
–570 to 571
6
–499 to 500
Positive delay: Store data delayed by the set delay.
Negative delay: Store previous data according go to the set delay.
Example: Sampling at 10 ms with a –30 ms delay time yields –30 x 10 = 300 ms,
so data 300 ms before the trigger will be stored.
546
Section 14-2
Trial Operation and Debugging
Note Use a Programming Device to turn ON the Sampling Start Bit (A50815). Never
turn ON this bit from the user program.
Sampling Start Bit
Trace Start Bit
Trace Trigger Monitor Flag
Trace Busy Flag
Trace Completed Flag
Sampling
The following traces can be executed.
Scheduled Data Trace
A scheduled data trace will sample data at fixed intervals. Specified sampling
times are 10 to 2,550 ms in 10-ms units. Do not use the TRSM instruction in the
user program and be sure to set the sampling period higher than 0.
One-cycle Data Trace
A one-cycle data trace will sample I/O refresh data after the end of the tasks in
the full cycle. Do not use the TRSM instruction in the user program and be sure to
set the sampling period higher than 0.
Data Trace via TRSM
A sample will be taken once when the TRACE MEMORY SAMPLING instruction
(TRSM) instruction is executed. When more than one TRSM instruction is used
in the program, a sample will be taken each time the TRSM instruction is executed after the trace trigger condition has been met.
Data Trace Procedure
Use the following procedure to execute a trace.
1, 2, 3...
1. Use the CX-Programmer to set trace parameters: Address of the sampled
data, sampling period, delay time, and trigger conditions.
2. Use CX-Programmer to start sampling or turn ON the Sampling Start Bit
(A50815).
3. Put the trace trigger condition into effect.
4. End tracing.
5. Use CX-Programmer to read the trace data.
a) Select Data Trace from the PC Menu.
b) Select Select from the Execution Menu.
c) Select Execute from the Execution Menu.
d) Select Read from the Execution Menu.
547
Section 14-2
Trial Operation and Debugging
Related Auxiliary Bits/Words
Name
Sampling Start Bit
Address
A50815
Description
Use a Programming Device to turn ON this bit to start sampling. This
bit must be turned ON from a Programming Device.
Do not turn this bit ON and OFF from the user program.
Note: The bit will be cleared when the Data Trace has been
completed.
Trace Start Bit
A50814
When this bit is turned ON, the trace trigger will be monitored and
sampled data will be stored in Trace Memory when the trigger
condition is met. The following traces are enabled with this bit.
1) Scheduled trace (trace at fixed intervals of 10 to 2,550 ms)
2) TRSM instruction trace (trace when the TRSM executes)
3) One-cycle trace (trace at the end of execution of all cyclic tasks)
Trace Trigger Monitor
Flag
A50811
This flag turns ON when the trace trigger condition has been met after
the Trace Start Bit has turned ON. This flag will turn OFF when the
sampling is started again by turning ON the Sampling Start Bit.
Trace Busy Flag
A50813
Trace Completed Flag
A50812
This flag turns ON when sampling is started by a Sampling Start Bit
and turns OFF when the trace has been completed.
This flag turns ON if Trace Memory becomes full after the trace trigger
condition has been met during a trace operation and turns OFF when
the next sampling operation is started.
548
SECTION 15
CPU Unit Operation and the Cycle Time
This section describes the internal operation of the CPU Unit and the cycle used to perform internal processing.
15-1 CPU Unit Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15-1-1 General Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15-1-2 I/O Refreshing and Peripheral Servicing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15-1-3 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15-2 CPU Unit Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15-2-1 Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15-2-2 Status and Operations in Each Operating Mode . . . . . . . . . . . . . . . . . . . . . . . . . .
15-3 Power OFF Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15-3-1 Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15-4 Computing the Cycle Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15-4-1 CPU Unit Operation Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15-4-2 Cycle Time Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15-4-3 Cycle Time Calculation Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15-4-4 Online Editing Cycle Time Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15-4-5 I/O Response Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15-4-6 Interrupt Response Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15-5 Instruction Execution Times and Number of Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
550
550
550
551
551
551
552
553
555
557
557
558
564
564
565
567
568
549
Section 15-1
CPU Unit Operation
15-1 CPU Unit Operation
15-1-1 General Flow
The following flowchart shows the overall operation of the CPU Unit.
Power ON
Startup initialization
• Initialize memory hardware
and system work area.
• Detect I/O.
• Automatic
transfer
from
Memory Card at startup.
• Compare actually UnitS with the
I/O table.
• I/O memory clear user memory
(UM) check.
• Clear forced set/reset, etc.
• Check for battery errors.
Overseeing processing
• Read DIP switch settings.
• Mounted Memory Card and other checks.
• Operation processing: Execute the user program.
Program execution
Cycle time
I/O refresh
• Process errors: Turn outputs OFF (Output Units reset for but errors).
Clear I/O memory area if an error occurs (unless a FALS instruction is
executed).
I/O refresh: Cyclic CIO data exchange with Basic I/O Units,
Special I/O Units and CS1 CPU Bus Units.
(See note.)
Peripheral servicing
Note I/O is refreshed even in PROGRAM mode.
15-1-2 I/O Refreshing and Peripheral Servicing
Type of
service
I/O
Refresh
Peripheral
Servicing
550
Description
Data is exchanged with areas
allocated beforehand. I/O
refreshing will execute without
interruption (time slice) during the
service period.
Each servicing is allocated a
preset time in the system and will
be executed every cycle. If
processing is completed within the
allocated time, processing will not
be executed for the remaining
time, but will shift instead to the
next processing phase.
Units
Max. data
exchange
Depends on the
Unit
Data exchange
area
I/O bit area
SYSMAC BUS remote I/O,
CompoBus/D
---
Special I/O Units
(CS1/C200H)
10 words/Unit
(depends on the
Unit)
SYSMAC BUS
bits, I/O Terminal
bits, CompoBus/D
bits, etc.
Special I/O Unit bit
area
CS1 CPU Bus Units
25 words/Unit
Inner Board
100 words/Unit
CS1 Special I/O Unit
CS1 CPU Bus Unit
Peripheral Port
Serial Communications
Port
Inner Board Bus Service
File Access Service
---
Basic I/O Units (including
C200H High-density I/O
Units)
CS1 CPU Bus Unit
bit area
Inner Board bit
area
---
Section 15-2
CPU Unit Operating Modes
Note CS1 Special I/O Units, CS1 CPU Bus Units, RS-232C communications ports,
Inner Boards, and various file services will be allocated 4% of the cycle time. If all
services are executed in a cycle and servicing will be delayed, set the same allocated time (same time for all services) rather than a percentage under execute
time settings in the PC Setup.
15-1-3 Initialization
The following initializing processes will be performed once each time the power
is turned ON or the operating mode is changed (switched between RUN or
MONITOR mode and PROGRAM mode.)
• Check I/O.
• Create a table of actual Units (I/O allocations).
• Compare the I/O table and the actual Units.
• Clear the non-holding areas of I/O memory. Perform the following for the IOM
Hold Bit and PC Setup (IOM Hold Bit Status at Startup).
Auxiliary bit
PC Setup setting
IOM Hold Bit Status at
Startup
(Programming Console
address: Word 80, bit 15)
IOM Hold Bit (A50012)
Clear (OFF)
At power ON: Clear
At mode change: Clear
Clear (OFF)
Hold (ON)
Hold (ON)
At power ON: Clear
At mode change: Hold
At power ON: Hold
At mode change: Hold
• Canceling Forced Set/Reset
The following is performed for the Force Status Hold Bit and PC Setup (Forced
Status Hold Bit Status at Startup).
Auxiliary bit
PC Setup setting
Forced Status Hold Bit
Status at Startup
(Programming Console
address: Word 80, bit 14)
Forced Status Hold Bit (A50013)
Clear (OFF)
At power ON: Clear
At mode change: Clear
Clear (OFF)
Hold (ON)
Hold (ON)
At power ON: Clear
At mode change: Hold
At power ON: Hold
At mode change: Hold
• If an autoboot program is present on the Memory Card that is inserted, the program will be loaded automatically.
• Self-diagnosis (User memory check)
15-2 CPU Unit Operating Modes
15-2-1 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 creating
I/O tables, initializing the PC 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.
551
Section 15-2
CPU Unit Operating Modes
15-2-2 Status and Operations in Each Operating Mode
PROGRAM, RUN, and MONITOR are the three operating modes available in
the CPU Unit. The following lists status and operations for each mode.
Overall Operation
Mode
Program
(See note)
I/O refresh
I/O Memory
External outputs
Non-holding
areas
Clear
PROGRAM
Stopped
Executed
OFF
RUN
Executed
Executed
MONITOR
Executed
Executed
Controlled by program
Controlled by program
Holding areas
Hold
Controlled by program
Controlled by program
Programming Console Operations
Mode
Monitor I/O
Memory
Monitor
Program
Transfer Program
PC to
Programming
Device
Programming
Device to PC
Check
Program
Create I/O
Table
PROGRAM
OK
OK
OK
OK
OK
OK
MONITOR
OK
OK
OK
X
X
X
RUN
OK
OK
OK
X
X
X
Mode
PC Setup
Modify
Program
Forceset/reset
Changing
Changing
Timer/Counter Timer/Counter
SV
PV
Changing I/O
Memory PV
PROGRAM
OK
OK
OK
OK
OK
OK
RUN
X
X
X
X
X
X
MONITOR
X
OK
OK
OK
OK
OK
Note The following table shows the relationship of operating modes to tasks.
Mode
PROGRAM
RUN
MONITOR
Cyclic task status
Interrupt task
status
Disabled status (INI)
Stopped
• Any task that has not yet been executed, will be in disabled status (INI).
Executed if
• A task will go to READY status if the task is set to go to READY status at startup interrupt condition
is met.
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 if a READY task is put into Standby status by a
TASK OFF (TKOF) instruction.
552
Section 15-3
Power OFF Operation
Operating Mode Changes and I/O Memory
Non-holding areas
Mode Changes
Holding Areas
• I/O bits
• HR Area
• Data Link bits
• DM Area
• CS1 CPU Bus Unit bits
• EM Area
• Special I/O Unit bits
• Counter PV and Completion Flags
(Auxiliary Area bits/words are holding
or non-holding depending on the address.)
• Inner Board bits
• SYSMAC BUS bits
• I/O Terminal bits
• C200H Special I/O Unit bits
• CompoBus/D 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.)
RUN or MONITOR to PROGRAM
Cleared (See note 1.)
Held
PROGRAM to RUN or MONITOR
Cleared (See note 1.)
Held
RUN to MONITOR or
MONITOR to RUN
Held (See note 2.)
Held
Note
I/O Memory
Hold Bit
status
(A50012)
1. The following processing is performed depending on the status of the I/O
Memory Hold Bit. Output 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
Mode
changed
between
PROGRAM
and RUN/
MONITOR
Output bits allocated to Output Units
Operation stopped
Fatal error
other than
FALS
FALS
executed
Mode
changed
between
PROGRAM
and RUN/
MONITOR
Operation stopped
Fatal error
other than
FALS
FALS
executed
OFF
Cleared
Cleared
Held
OFF
OFF
OFF
ON
Held
Held
Held
Held
OFF
OFF
Note See Chapter 7 Memory Areas, etc. for more details on I/O Memory.
15-3 Power OFF Operation
The following processing is performed if CPU Unit power is turned OFF. Power
OFF processing will be performed if the power supply falls below 85% of the
rated voltage 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 All output will turn OFF despite an I/O Memory Hold Bit or I/O Memory Hold Bit at
power ON settings in the PC Setup.
85% of the rated voltage:
AC power: 85 V for a 100 VAC system and 170 V for a 200 VAC system
DC power: 19.2 VDC
553
Section 15-3
Power OFF Operation
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, i.e., the time it takes the rated voltage at
85% or less to return to 85% or higher is less than 10 ms.
2. A momentary power interruption that lasts more than 10 ms but less than
25 ms is difficult to determine and a power interruption may or may not be
detected.
3. The system will stop unconditionally if the momentary power interruption
lasts more than 25 ms.
If operation stops under the conditions given in items 2 and 3 above, the timing
used to stop operation (or the timing used to start execution of the Power OFF
Interrupt Task) can be delayed by setting the Power OFF Detection Delay Time
(0 to 10 ms) in the PC Setup. Operation, however, will always be stopped 10 ms
after detecting a momentary power interruption regardless of the setting in the
PC Setup.
85% of the rated voltage or less
10 ms
25 ms
Time
0 to 10 ms
Momentary power
interruption not
detected and operation continues.
Power supply
voltage
Power supply
voltage
Power supply
voltage
10 to 25 ms
Operation will continue or
stop depending on whether
or not a momentary power
interruption is detected.
25 ms and longer
Momentary power interruption detected
and operation stops.
Note The above timing chart shows an example when the power OFF detection time
is set to 0 ms.
554
Section 15-3
Power OFF Operation
The following timing chart shows the CPU Unit power OFF operation in more
detail.
Power OFF Timing Chart
Operation always stopped
at this point regardless.
85% of rated
voltage
Holding time for 5 V internal
power supply after power
OFF detection: 10 ms.
Power OFF detected Power OFF confirmed
Power OFF detection time: Default is
10 to 25 ms (Power OFF undetermined)
Power OFF
detected signal
Program execution
status
Power OFF Detection
Delay Time: 0 to
10 ms (set in PC Setup)
Cyclic tasks or interrupt tasks
not associated with power OFF
Processing time after
power OFF is confirmed:
10 ms minus Power OFF
Detection Delay Time
Note: The interrupt task
execution time must be
less than or equal to processing time after power
OFF is confirmed.
Power OFF
Stopped
interrupt task
CPU reset signal
Power OFF Detection Time
The time it takes to detect power OFF after the power supply falls below 85% of
the rated voltage.
Power OFF Detection Delay Time
The delay time after power OFF is detected until it is confirmed. This can be set
in the PC Setup within a range from 0 to 10 ms.
If the power OFF interrupt task is disabled, then the CPU reset signal will turn ON
and the CPU will be reset when this time expires.
If the power OFF interrupt task is enabled in the PC Setup, then the CPU reset
signal will turn ON and the CPU will be reset only after the power OFF interrupt
task has been executed.
If an unstable power supply is causing power interruptions, set a longer Power
OFF Detection Delay Time (10 ms max.) in the PC Setup.
Power Holding Time
The maximum amount of time (fixed at 10 ms) that 5 V will be held internally after
power shuts OFF. The time that it takes for the power OFF interrupt task to
execute must not exceed 10 ms minus the Power OFF Detection Delay Time
(processing time after power OFF is confirmed). The power OFF interrupt task
will be ended even if it has not been completely executed the moment this time
expires.
15-3-1 Description of Operation
1, 2, 3...
1. Power OFF will be detected if the 100 to 120 VAC, 200 to 240 VAC or 24 VDC
power supply falls below 85% of the rated voltage for the power OFF detection time (somewhere between 10 to 25 ms).
2. If the Power OFF Detection Delay Time is set (0 to 10 ms) in the PC Setup,
then the following operations will be performed when the set time expires.
a) If the power OFF interrupt task is disabled (default PC Setup setting)
The CPU reset signal will turn ON and the CPU will be reset immediately.
555
Power OFF Operation
Section 15-3
b) If the power OFF interrupt task is enabled (in the PC Setup), the CPU
reset signal will turn ON and the CPU will be reset after the power OFF
interrupt task has been executed. Make sure that the power OFF interrupt task will finish executing within 10 ms minus the Power OFF Detection Delay Time = processing time after power OFF. The 5-V internal
power supply will be maintained only for 10 ms after power OFF is detected.
556
Section 15-4
Computing the Cycle Time
15-4 Computing the Cycle Time
15-4-1 CPU Unit Operation Flowchart
The CS1-series CPU Units process data in repeating cycles from the overseeing
processing up to peripheral servicing as shown in the following diagram.
Power ON
Clears I/O memory
non-holding area.
Checks I/O Unit
connections
Startup initialization
Resets watchdog
timer
Checks hardware
and user program
memory
NO
Overseeing processing
Check OK?
YES
Sets error flags
PC cycle
time
Resets watchdog
timer and user program timer
Flashing (nonfatal error)
ERR/ALM indicator
ON or Flashing?
Executes user program (i.e., executes
READY cyclic tasks).
ON (fatal error)
NO
Program execution
End of program?
YES
Resets watchdog
timer and waits until the set cycle
time has elapsed
Cycle time calculation
Calculates cycle
time
Resets watchdog
timer
I/O refreshing
Performs I/O refreshing
Services Programming Devices
Peripheral servicing
557
Section 15-4
Computing the Cycle Time
15-4-2 Cycle Time Overview
The cycle time for the CS1 Series 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 Basic I/O Units
• Type and number of Special I/O Units and CS1 CPU Bus Units, and type of
services being executed.
• Presence of an Inner Board and type of services being executed.
• Number of SYSMAC BUS Remote I/O Master Units and number of I/O points
on the Slaves
• Use of peripheral or RS-232C ports
• File access in file memory, and the amount of data transferred to/from file
memory
• Fixed cycle time setting in the PC Setup
• Fixed peripheral servicing time in the PC 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 PC to perform the 5 operations
shown in the following table.
Cycle time = (1) + (2) + (3) + (4) + (5)
Process
step
Process name
Details
Processing time and fluctuation
cause
(1)
Overseeing
Checks the I/O Bus and user program
memory, and refreshes the clock.
0.5 ms
(2)
Program execution
Executes the user program, and
calculates the total time time taken for
the instructions to execute the
program.
Total instruction execution time
(3)
Cycle time calculation
Waits for the specified cycle time to
elapse when a minimum (fixed) cycle
time has been set in the PC Setup.
When the cycle time is not fixed, the
time for step 3 is approximately 0.
When the cycle time is fixed, the time
for step 3 is the preset fixed cycle
time minus the actual cycle time ((1) +
(2) + (4) + (5)).
Calculates the cycle time.
(4)
558
I/O refreshing
Refreshes the I/O for Basic I/O Units,
Inner Boards, Special I/O Units, CS1
CPU Bus Units, SYSMAC BUS
remote I/O, and CompoBus/D.
I/O refresh time for each Unit
multiplied by the number of Units
used.
Section 15-4
Computing the Cycle Time
Process
step
(5)
Process name
Peripheral servicing
Details
Processing time and fluctuation
cause
Services events for CS1 Special I/O
If a uniform peripheral servicing time
Units.
hasn’t been set in the PC Setup, 4%
Note Peripheral servicing does not of the previous cycle’s cycle time
(calculated in step (3)) will be allowed
include I/O refreshing,
for peripheral servicing.
If a uniform peripheral servicing time
has been set in the PC Setup,
servicing will be performed for the set
time. At least 0.1 ms, however, will be
serviced whether the peripheral
servicing time is set or not.
Services events for CS1 CPU Bus
Units.
If no Units are mounted, the servicing
time is 0 ms.
Same as above.
Note Peripheral servicing does not
include I/O refreshing.
Services events for peripheral ports.
If a uniform peripheral servicing time
hasn’t been set in the PC Setup, 4%
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 PC Setup,
servicing will be performed for the set
time. At least 0.1 ms, however, will be
serviced whether the peripheral
servicing time is set or not.
Services RS-232C ports.
Services Inner Boards.
If the ports are not connected, the
servicing time is 0 ms.
Same as above.
If a uniform peripheral servicing time
hasn’t been set in the PC Setup, 4%
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 PC Setup,
servicing will be performed for the set
time. At least 0.1 ms, however, will be
serviced whether the peripheral
servicing time is set or not.
Services file access.
If no Inner Boards are mounted, the
servicing time is 0 ms.
If a uniform peripheral servicing time
hasn’t been set in the PC Setup, 4%
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 PC Setup,
servicing will be performed for the set
time. At least 0.1 ms, however, will be
serviced whether the peripheral
servicing time is set or not.
If there is no file access, the servicing
time is 0 ms.
559
Section 15-4
Computing the Cycle Time
Basic I/O Unit Refresh
Unit
Name
CS1 Basic I/O 16-point DC Input Unit
Units
16-point Transistor Output
Unit, sinking outputs
16-point Transistor Output
Unit, sourcing outputs
16-point Interrupt Input Unit
16-point High-speed Input
Unit
32-point DC Input Unit
64-point DC Input Unit
96-point DC Input Unit
32-point Transistor Output
Unit, sinking outputs
32-point Transistor Output
Unit, sourcing outputs
64-point Transistor Output
Unit, sinking outputs
64-point Transistor Output
Unit, sourcing outputs
96-point Transistor Output
Unit, sinking outputs
96-point Transistor Output
Unit, sourcing outputs
32-point DC Input/32-point
Transistor Output Unit,
sourcing outputs
560
Model
I/O refresh
time per Unit
CS1W-ID211
CS1W-OD211
0.004 ms
0.004 ms
CS1W-OD212
0.004 ms
CS1W-INT01
CS1W-IDP01
0.004 ms
0.004 ms
CS1W-ID231
CS1W-ID261
CS1W-ID291
CS1W-OD231
0.007 ms
0.014 ms
0.02 ms
0.008 ms
CS1W-OD232
0.008 ms
CS1W-OD261
0.016 ms
CS1W-OD262
0.016 ms
CS1W-OD291
0.02 ms
CS1W-OD292
0.02 ms
CS1W-MD261
0.015 ms
32-point DC Input/32-point
Transistor Output Unit,
sinking outputs
CS1W-MD262
0.015 ms
48-point DC Input/48-point
Transistor Output Unit,
sinking outputs
CS1W-MD291
0.02 ms
48-point DC Input/48-point
Transistor Output Unit,
sourcing outputs
CS1W-MD292
0.02 ms
C200H Basic
I/O Units
8-point Input Unit
8-point Output Unit
12-point Output Unit
16-point Input Unit
16-point Output Unit
Interrupt Input Unit
C200H-ID211
C200H-OC221
C200H-OA224
C200H-ID212
C200H-OD212
C200HS-INT01
0.03 ms
0.03 ms
0.03 ms
0.02 ms
0.03 ms
0.10 ms
C200H
Group-2
High-density
I/O Unit
(classified as
Basic I/O
Units)
32-point Input Unit
32-point Output Unit
64-point Input Unit
64-point Output Unit
32-point B7A Input Units
32-point B7A Output Units
16/16-point B7A I/O Units
32/32-point B7A I/O Units
C200H-ID216
C200H-OD218
C200H-ID217
C200H-OD219
C200H-B7A12
C200H-B7A02
C200H-B7A21
C200H-B7A22
0.10 ms
0.10 ms
0.20 ms
0.13 ms
0.1 ms
0.1 ms
0.1 ms
0.2 ms
CS1 Special
I/O Units
96-point Input Unit
96-point Output Unit
CS1W-ID291
CS1W-OD291
0.02 ms
0.02 ms
Section 15-4
Computing the Cycle Time
Special I/O Unit Refresh
Unit
C200H Special I/O
Units
Name
High-density I/O
Units
C200H-MD215
C200H-MD501
Temperature
Control Unit
Heat/Cool
Temperature
Control Unit
C200H-TC
I/O refresh time
per Unit
0.5 ms
1.5 ms
2.6 ms
C200H-TV
2.6 ms
Temperature
Sensor Unit
PID Control Unit
Cam Positioner
Unit
ASCII Unit
C200H-TS001/101
1.0 ms
C200H-PID
C200H-CP114
2.6 ms
2.0 ms
C200H-ASC02
C200H-ASC11/21/
31
C200H-AD001
C200H-AD002
C200H-AD003
C200H-DA001/002
C200H-DA003/004
C200H-MAD01
C200H-CT001-V1/
CT002
C200H-CT021
C200H-NC111/112
1.8 ms
0.4 ms
Analog Input Unit
Analog Output Unit
Analog I/O Unit
High-speed
Counter Unit
Position Control
Unit
Model
1.0 ms
1.4 ms
0.7 ms
0.9 ms
0.6 ms
0.6 ms
2.4 ms
0.5 ms
2.2 ms
(4.0 ms for read)
561
Section 15-4
Computing the Cycle Time
Unit
C200H Special I/O
Units, continued
Name
Position Control
Unit, continued
Model
C200H-NC211
C200HW-NC113
Motion Control
Unit
ID Sensor Unit
Voice Unit
Fuzzy Logic Unit
PC Link Unit
I/O refresh time
per Unit
5.1 ms
(6.7 ms for read)
2.0 ms
(2.9 ms for read or
write)
C200HW-NC213
2.3 ms
(3.2 ms for read or
write)
C200HW-NC413
4.3 ms
(5.5 ms for read or
write)
C200H-MC221
1.2 ms
(2.1 ms for read)
1.8 ms
C200H-IDS01-V1/
21
C200H-OV001
C200H-FZ001
C200H-LK401
CompoBus/D
Master Unit
C200HW-DRM21V1
CompoBus/S
Master Unit
C200HW-SRM21
3.4 ms
1.8 ms
0.3 ms (connected
without data links
operating)
4.1 ms (for 256
data link points)
7.4 ms (for 512
data link points)
1.72 ms + 0.0022 x
number of
allocated words
0.4 ms (for the
maximum of 16
slaves)
0.9 ms (for the
maximum of 32
slaves)
CS1 Special I/O
Units
Analog I/O Unit
Analog Input Unit
Analog Output Unit
Motion Control
Unit
562
CS1W-MAD44
CS1W-AD041/081
CS1W-DA041/08V
/08C
CS1W-MC221
CS1W-MC421
0.2 ms
0.2 ms
0.2 ms
0.8 ms
0.85 ms
Section 15-4
Computing the Cycle Time
Increase in Cycle Time
Caused by CPU Bus
Units
ClassifiName
cation
CS1
Controller
CPU
Link Unit
Bus
Units
Serial Communications
Unit
Ethernet
Unit
Model
CS1W-CLK11/
21
CS1W-SCU21
CS1W-ETN01
Increase
0.2 ms
Remarks
There will be an additional
increase of 1.5 ms + 0.001 x
number of data link words.
0.25 ms
0.25 ms
There will be an additional
increase of the event
execution times when
message services are used.
There will be an addition
increase of up to the
following time when a
protocol macro is executed:
0.001 ms x maximum
number of data words sent or
received (0 to 500 words).
There will be an additional
increase of the event
execution times when Host
Links or 1:N NT Links are
used.
If socket services are
executed with software
switches, there will be an
additional increase of 0.002
ms x the number of bytes
sent/received.
There will be an additional
increase of the event
execution times when FINS
communications services,
socket services for CMND
instructions, or FTP services
are performed.
Loop
Control Unit
Increase in Cycle Time
Caused by Inner Board
Classification
CS1 Inner
Board
CS1W-LC001
Name
Serial Communications
Board
0.2 ms
Model
---
Increase
CS1W-SCB21/ 0.25 ms
41
Remarks
There will be an
addition increase of
up to the following
time when a protocol
macro is executed:
0.001 ms x maximum
number of data words
sent or received (0 to
500 words) + 1.3 ms.
There will be an
additional increase of
the event execution
times when Host
Links or 1:N NT Links
are used.
563
Section 15-4
Computing the Cycle Time
15-4-3 Cycle Time Calculation Example
The following example shows the method used to calculate the cycle time when
Basic I/O Units only are mounted to the PC.
Conditions
Item
CPU Rack (8 slots)
Details
CS1W-ID291 96-point Input
Units
CS1W-OD291 96-point Output
Units
CS1 Expansion Rack (8 slots) x CS1W-ID291 96-point Input
1 Unit
Units
CS1W-OD291 96-point Output
Units
User program
5 K steps
Calculation Example
Peripheral port connection
Yes and no
Fixed cycle time processing
No
RS-232C port connection
No
Peripheral servicing with other
devices (Special I/O Units, CS1
CPU Bus Units, Inner Boards,
and file access)
No
Process name
4 Units
4 Units
4 Units
4 Units
LD instruction
2.5 K steps,
OUT instruction
2.5 K steps
Processing time
Calculation
With
Programming
Device
Without
Programming
Device
(1) Overseeing
---
0.5 ms
0.5 ms
(2) Program
execution
(3) Cycle time
calculation
(4) I/O refreshing
0.04 µs × 2,500 +
0.17 µs × 2,500
(Fixed cycle time
not set)
0.02 ms × 8 +
0.02 ms × 8
(Peripheral port
connected only)
0.53 ms
0.53 ms
0 ms
0 ms
0.32 ms
0.32 ms
0.1 ms
0 ms
(1) + (2) + (3) + (4)
+ (5)
1.45 ms
1.35 ms
(5) Peripheral
servicing
Cycle time
15-4-4 Online Editing Cycle Time Extension
When online editing is executed from a Programming Device (such as Programming Console or CX-Programmer) while the CPU Unit is operating in MONITOR
mode to change the program, 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.
• Editing operations (insert/delete/overwrite).
• Types of instructions used.
For CPU Units with model numbers not ending in “-V1,” the cycle time extension
for online editing depends mainly on the size of the program in the largest task.
Ideally, tasks should be separated so that one task is 64 Ksteps max.
For CPU Units with model numbers ending in “-V1,” the cycle time extension for
online editing will be negligibly affected by the size of task programs.
If the maximum program size for each task is 64 Ksteps, the online editing cycle
time extension will be as follows (see note):
564
Section 15-4
Computing the Cycle Time
CPU Units with model numbers not ending in “-V1”: 350 ms max.
CPU Units with model numbers ending in “-V1”:
80 ms max.
When editing online, the cycle time will be extended by the time that operation is
stopped.
Note The above cycle time extensions assume that a lot of instructions requiring time
are being used in the program. The cycle time extension would be as follows for
most programs:
CPU Units with model numbers not ending in “-V1”: 90 ms max.
CPU Units with model numbers ending in “-V1”:
12 ms max.
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.
15-4-5 I/O Response Time
The I/O response time is the time it takes from when an Input Unit’s input turns
ON, the data is recognized by the CS1-series CPU Unit, and the user program is
executed, up to the time for the result to be output to an Output Unit’s output terminals.
The length of the I/O response time depends on the following conditions.
• Timing of Input Bit turning ON.
• Cycle time.
• Type of Rack to which Input and Output Units are mounted (CPU Rack, CPU
Expansion Rack, Expansion Rack).
Basic I/O Units
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 the total of the Input ON delay, the cycle time,
and the Output ON delay.
Note The Input and Output ON delay differs according to the Unit used.
I/O refresh
Input
Input ON delay
(Interrupt to CPU Unit)
Cycle time
Cycle time
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 of the Input Unit.
565
Section 15-4
Computing the Cycle Time
The maximum I/O response time is the total of the Input ON delay, (the cycle time
2), and the Output ON delay.
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
Maximum I/O response time
Calculation Example
Conditions:
Input ON delay
Output ON delay
Cycle time
1.5 ms
0.2 ms
20.0 ms
Minimum I/O response time = 1.5 ms + 20 ms + 0.2 ms = 21.7 ms
Maximum I/O response time = 1.5 ms + (20 ms
2) + 0.2 ms = 41.7 ms
SYSMAC BUS Remote I/O
The response times for both inputs and outputs are shown here for when Slave
Racks are used.
Minimum Remote I/O
Response Time
The minimum I/O response time is the sum of the Input ON delay, (the cycle time
3), and the Output ON delay.
Note The cycle time is longer than the remote I/O transmission time.
Program
execution
CPU Unit
Master-to-CPU Unit transmission
Remote I/O Master Unit
Master-to-Slave communications
Remote I/O Slave Unit
Slave I/O refresh
Input
Output
Remote I/O transmission time = (Remote I/O Slave transmission time per Slave
+ I/O Terminal transmission time)
2
Remote I/O Slave transmission time per Slave = 1.4 ms + 0.2 ms
ber of I/O words on Slave Rack)
I/O Terminal transmission time = 2.0 ms
Maximum Remote I/O
Response Time
566
(total num-
(number of I/O Terminals)
The maximum I/O response time is the sum of the Input ON delay, (the cycle time
4), and the Output ON delay.
Section 15-4
Computing the Cycle Time
Note The cycle time is longer than the remote I/O transmission time.
Program
execution
CPU Unit
Master-to-CPU Unit transmission
Remote I/O Master Unit
Slave I/O refresh
Master-to-Slave communications
Remote I/O Slave Unit
Input
Output
Calculation Example
Conditions:
Input ON delay
1.5 ms
Output ON delay
0.2 ms
Cycle time
20.0 ms
Minimum I/O response time = 1.5 ms + (20 ms 3) + 0.2 ms = 61.7 ms
Maximum I/O response time = 1.5 ms + (20 ms 4) + 0.2 ms = 81.7 ms
• When Special I/O Units are mounted to Slave Racks, the cycle time may be
less than or equal to the remote I/O transmission time. In this case, I/O refresh
may not occur between the CPU Unit and the Remote I/O Master Unit in some
cycles.
• Refreshing will be performed for Remote I/O Masters only once in each cycle,
and then only after confirming completion of the remote cycle.
• The short duration of ON/OFF status produced by differentiated instructions
can cause inaccurate signals.
15-4-6 Interrupt Response Times
I/O Interrupt Tasks
The interrupt response time for I/O interrupt tasks is the time taken from when an
input from a CS1W-INT01 or C200HS-INT01 Interrupt Input Unit 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.
• The CS1W-INT01 Interrupt Input Unit’s input ON delay is 0.1 ms maximum
when using the rising edge or 0.5 ms when using the falling edge.
• The CS1W-INT01 Interrupt Input Unit’s software interrupt response time is
0.32 ms maximum.
Note The software interrupt response time will be 1 ms if there is a C200H
Special I/O Unit in the PC.
• The C200HS-INT01 Interrupt Input Unit’s input ON delay is 0.2 ms maximum.
• The C200HS-INT01 Interrupt Input Unit’s software interrupt response time is
1 ms maximum.
Note I/O interrupt tasks can be executed (while an instruction is being executed, or by
stopping the execution of an instruction) during execution of the user program,
I/O refresh, peripheral servicing, or overseeing. The interrupt response time is
not affected by the Input of the Interrupt Input Unit turning ON during any of the
above processing operations.
Some I/O interrupts, however, are not executed during interrupt tasks even if the
I/O interrupt conditions are satisfied. Instead, the I/O interrupt is executed after
567
Section 15-5
Instruction Execution Times and Number of Steps
the other interrupt task has completed execution and the software interrupt response time (1 ms max.) has elapsed.
The interrupt response time of I/O interrupt tasks is the sum of the Input ON
delay (0.2 ms max.) and the software interrupt response time (1 ms max.).
Input
Input ON delay
(Interrupt Input Unit retrieval)
Software interrupt response time
Interrupt task execution
I/O interrupt task interrupt response time
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 depends
on the following conditions.
• The software interrupt response time is 1 ms max.
Note Scheduled interrupt tasks can be executed (while an instruction is being
executed, or by stopping the execution of an instruction) during execution of the
user program, I/O refresh, peripheral servicing, or overseeing. The interrupt response time is not affected by the scheduled time elapsing during any of the
above processing operations.
Some scheduled interrupts, however, are not executed during other interrupt
tasks even if the scheduled interrupt conditions are satisfied. Instead, the scheduled interrupt is executed after the other interrupt task has completed execution
and the software interrupt response time (1 ms max.) has elapsed.
The interrupt response time for scheduled interrupt tasks is the software interrupt response time (1 ms max.).
Scheduled interrupt time
Internal timer
Software interrupt response time
Scheduled interrupt task
External Interrupt Tasks
The interrupt response time for external interrupt tasks differs depending on the
Unit or Board (Special I/O Unit, CS1 CPU Bus Unit, or Inner Board) that is requesting the external interrupt task of the CPU Unit and the type of service requested by the interrupt. For details, refer to the appropriate operation manual
for the Unit or Board being used.
Power OFF Interrupt
Tasks
Power OFF interrupt tasks are executed within 0.1 ms of the power being confirmed as OFF.
15-5 Instruction Execution Times and Number of Steps
The following table lists the execution times for all instructions that are available
for CS1 PCs.
The total execution time of instructions within one whole user program is the process time for program execution when calculating the cycle time (see note).
568
Section 15-5
Instruction Execution Times and Number of Steps
Note User programs are allocated tasks that can be executed within cyclic tasks and
interrupt tasks that satisfy interrupt conditions.
Execution times for most instructions differ depending on the CPU Unit used
(CS1-CPU6/CS1-CPU4) and the conditions when the instruction is
executed. The top line for each instruction in the following table shows the minimum time required to process the instruction and the necessary execution
conditions, and the bottom line shows the maximum time and execution conditions required to process the instruction.
The execution time can also vary when the execution condition is OFF.
The following table also lists the length of each instruction in the Length (steps)
column. The number of steps required in the user program area for each of the
CS1-series instructions varies from 1 to 7 steps, depending upon the instruction
and the operands used with it. The number of steps in a program is not the same
as the number of instructions.
Program capacity for CS1-series PCs is measured in steps, whereas program
capacity for previous OMRON PCs, such as the C-series and CV-series PCs,
was measured in words. Basically speaking, 1 step is equivalent to 1 word. The
amount of memory required for each instruction, however, is different for some
of the CS1-series instructions, and inaccuracies will occur if the capacity of a
user program for another PC is converted for a CS1-series PC based on the assumption that 1 word is 1 step. Refer to the information at the end of 15-5 Instruction Execution Times and Steps for guidelines on converting program capacities
from previous OMRON PCs.
Most instructions are supported in differentiated form (indicated with ↑, ↓, @,
and %). Specifying differentiation will increase the execution times by the following amounts.
Upward/Downward
Differentiation
Symbol
LOAD
Mnemonic
Code
LD
---
!LD
LOAD NOT
LD NOT
!LD NOT
CPU4
+0.41
+0.45
@ or %
+0.29
+0.33
When a double-length operand is used, add 1 to the value shown in the length
column in the following table.
Sequence Input
Instructions
Instruction
CPU6
↑ or ↓
---
---
---
Length
(steps)
1
2
1
2
ON execution time
(µs)
CPU6
0.04
CPU4
0.08
0.50
0.71
+21.16
+21.16
+45.10
+45.10
0.04
008
0.50
0.71
+21.16
+21.16
+45.10
+45.10
Conditions
Designating
words
Designating indirect IR+
Increase for
CS1
Increase for
C200H
Designating
words
Designating indirect IR+
Increase for
CS1
Increase for
C200H
OFF execution time
(µs)
CPU6
0.04
CPU4
0.08
0.04
0.08
+21.16
+21.16
+45.1
+45.1
0.04
0.08
0.04
0.08
+21.16
+21.16
+45.1
+45.1
569
Section 15-5
Instruction Execution Times and Number of Steps
Instruction
AND
Mnemonic
Code
AND
---
Length
(steps)
1
ON execution time
(µs)
CPU6
CPU4
AND LOAD
AND LD
---
1
0.04
0.08
0.04
0.08
OR LOAD
OR LD
---
1
0.04
0.08
---
0.04
0.08
NOT
NOT
520
1
0.04
0.08
---
0.04
0.08
CONDITION
ON
CONDITION
OFF
LOAD BIT
TEST
UP
521
3
0.46
0.54
---
0.12
0.25
DOWN
522
4
0.46
0.54
---
0.12
0.25
LD TST
350
4
0.25
0.37
Setting 1 bit of
a word to a
constant
0.21
0.37
1.21
1.67
Setting 1 indirect IR+ bit to
indirect IR+
0.21
0.37
0.25
0.37
Setting 1 bit of
a word to a
constant
0.21
0.37
1.21
1.67
Setting 1 indirect IR+ bit to
indirect IR+
0.21
0.37
AND NOT
AND NOT
!AND NOT
OR
OR
!OR
OR NOT
OR NOT
!OR NOT
LOAD BIT
TEST NOT
570
LD TSTN
---
---
---
---
---
---
---
351
2
1
2
1
2
1
2
4
0.08
0.50
0.71
+21.16
+21.16
+45.10
+45.10
0.04
0.08
0.50
0.71
+21.16
+21.16
+45.10
+45.10
0.04
0.08
0.50
0.71
+21.16
+21.16
+45.10
+45.10
0.04
0.08
0.50
0.71
+21.16
+21.16
+45.10
+45.10
OFF execution time
(µs)
CPU6
CPU4
Designating
words
Designating indirect IR+
Increase for
CS1
Increase for
C200H
Designating
words
Designating indirect IR+
Increase for
CS1
Increase for
C200H
Designating
words
Designating indirect IR+
Increase for
CS1
Increase for
C200H
Designating
words
Designating indirect IR+
Increase for
CS1
Increase for
C200H
---
!AND
0.04
Conditions
0.04
0.08
0.04
0.08
+21.16
+21.16
+45.1
+45.1
0.04
0.08
0.04
0.08
+21.16
+21.16
+45.1
+45.1
0.04
0.08
0.04
0.08
+21.16
+21.16
+45.1
+45.1
0.04
0.08
0.04
0.08
+21.16
+21.16
+45.1
+45.1
Section 15-5
Instruction Execution Times and Number of Steps
Instruction
AND BIT
TEST
AND BIT
TEST NOT
OR BIT TEST
OR BIT TEST
NOT
Mnemonic
Code
AND TST
350
OR TSTN
OUTPUT
351
4
Length
(steps)
(See note)
OUT
---
1
OUT NOT
KEEP
DIFFERENTI- DIFU
ATE UP
ON execution time
(µs)
CPU6
CPU4
Conditions
OFF execution time
(µs)
CPU6
CPU4
0.25
0.37
Setting 1 bit of
a word to a
constant
0.21
0.37
1.21
1.67
Setting 1 indirect IR+ bit to
indirect IR+
0.21
0.37
0.25
0.37
Setting 1 bit of
a word to a
constant
0.21
0.37
1.21
1.67
Setting 1 indirect IR+ bit to
indirect IR+
0.21
0.37
0.25
0.37
Setting 1 bit of
a word to a
constant
0.21
0.37
1.21
1.67
Setting 1 indirect IR+ bit to
indirect IR+
0.21
0.37
0.25
0.37
Setting 1 bit of
a word to a
constant
0.21
0.37
1.21
1.67
Setting 1 indirect IR+ bit to
indirect IR+
0.21
0.37
When a double-length operand is used, add 1 to the value shown in the length
column in the following table.
Code
!OUT NOT
KEEP
4
Mnemonic
!OUT
OUTPUT
NOT
4
350
Sequence Output
Instructions
Instruction
4
AND TSTN 351
OR TST
Length
(steps)
---
---
---
011
013
2
1
2
1
2
ON execution time
(µs)
CPU-6
0.17
CPU-4
0.21
0.62
0.83
+21.37
+21.37
+49.30
+49.30
0.17
0.21
0.62
0.83
+21.37
+21.37
+49.30
+49.30
0.25
0.29
0.67
0.87
0.46
0.54
0.87
1.12
Conditions
Designating
words
Designating indirect IR+
Increase for
CS1
Increase for
C200H
Designating
words
Designating indirect IR+
Increase for
CS1
Increase for
C200H
Designating
words
Designating indirect IR+
Designating
words
Designating indirect IR+
OFF execution time
(µs)
CPU-6
0.04
CPU-4
0.08
0.04
0.08
+21.37
+21.37
+49.30
+49.30
0.04
0.08
0.04
0.08
+21.37
+21.37
+49.30
+49.30
0.04
0.08
0.04
0.08
0.08
0.17
0.08
0.17
571
Section 15-5
Instruction Execution Times and Number of Steps
Instruction
Mnemonic
DIFFERENTI- DIFD
ATE DOWN
SET
SET
!SET
RESET
RSET
!RSET
Code
Length
(steps)
(See note)
014
2
---
1
---
2
---
1
---
2
ON execution time
(µs)
CPU-6
CPU-4
0.46
0.54
0.87
1.12
0.17
0.21
0.58
0.79
+21.37
+21.37
+49.30
+49.30
0.17
0.21
0.58
0.79
+21.37
+21.37
+49.30
+49.30
MULTIPLE
BIT SET
SETA
530
4
7.8
38.8
7.8
38.8
MULTIPLE
BIT RESET
RSTA
531
4
7.8
38.8
7.8
38.8
Sequence Control
Instructions
Instruction
Conditions
Designating
words
Designating indirect IR+
Designating
words
Designating indirect IR+
Increase for
CS1
Increase for
C200H
Designating
words
Designating indirect IR+
Increase for
CS1
Increase for
C200H
With 1-bit set
With 1,000-bit
set
With 1-bit reset
With 1,000-bit
reset
OFF execution time
(µs)
CPU-6
CPU-4
0.08
0.17
0.08
0.17
0.04
0.08
0.04
0.08
+0.12
+0.21
+0.12
+0.21
0.04
0.08
0.04
0.08
+0.12
+0.21
+0.12
+0.21
0.21
0.37
0.21
0.37
When a double-length operand is used, add 1 to the value shown in the length
column in the following table.
ON execution time
(µs)
Code
Length
(steps)
(See note)
END
END
001
1
CPU-6
4.0
CPU-4
4.0
---
CPU-6
4.0
CPU-4
4.0
NO OPERATION
INTERLOCK
NOP
000
1
0.08
0.12
---
0.08
0.12
IL
002
1
0.12
0.12
---
0.08
0.12
INTERLOCK
CLEAR
JUMP
ILC
003
1
0.12
0.12
---
0.08
0.12
JMP
004
2
8.1
8.1
---
4.8
4.8
JUMP END
JME
005
2
3.8
3.8
When JMP
condition is not
satisfied
3.8
3.8
CONDITIONAL
JUMP
CJP
510
2
7.4
7.4
When JMP
condition is satisfied
5.1
5.1
CONDITIONAL
JUMP NOT
CJPN
511
2
8.5
8.5
When JMP
condition is satisfied
4.2
4.2
MULTIPLE
JUMP
MULTIPLE
JUMP END
JMP0
515
1
0.12
0.12
---
0.08
0.12
JME0
516
1
0.12
0.12
---
0.08
0.12
572
Conditions
OFF execution time
(µs)
Mnemonic
Section 15-5
Instruction Execution Times and Number of Steps
Instruction
FOR LOOP
Mnemonic
Code
Length
(steps)
(See note)
FOR
512
2
ON execution time
(µs)
CPU-6
CPU-4
0.12
0.21
0.62
0.83
Conditions
OFF execution time
(µs)
CPU-6
CPU-4
Designating a
constant
Designating indirect IR+
0.12
0.21
0.12
0.21
BREAK
LOOP
BREAK
514
1
0.12
0.12
---
0.08
0.12
NEXT LOOP
NEXT
513
1
0.17
0.17
0.08
0.12
0.12
0.12
When loop is
continued
When loop is
ended
0.08
0.12
Timer and Counter
Instructions
Instruction
TIMER
COUNTER
Mnemonic
TIM
CNT
HIGH-SPEED TIMH
TIMER
ONE-MS
TIMER
ACCUMULATIVE TIMER
TMHH
When a double-length operand is used, add 1 to the value shown in the length
column in the following table.
Code
---
---
015
540
ON execution time
(µs)
Length
(steps)
(See note)
CPU-6
CPU-4
3
0.37
0.42
0.87
1.12
0.37
0.42
0.87
1.12
0.37
0.42
0.87
1.12
0.37
0.42
0.87
1.12
3
3
3
Conditions
OFF execution time
(µs)
CPU-6
CPU-4
Constant for set 0.17
value
Indirect IR+ for 0.17
set value
0.29
Constant for set 0.17
value
Indirect IR+ for 0.17
set value
0.29
Constant for set 0.17
value
Indirect IR+ for 0.17
set value
0.29
Constant for set 0.17
value
Indirect IR+ for 0.17
set value
0.29
0.29
0.29
0.29
0.29
TTIM
087
3
21.4
14.8
10.7
21.4
14.8
10.7
--When resetting
When interlocking
-------
-------
LONG TIMER TIML
542
4
12.8
7.8
12.8
7.8
--When interlocking
7.8
7.8
MULTI-OUTPUT TIMER
MTIM
543
4
26.0
7.8
26.0
7.8
--When resetting
0.21
0.37
REVERSIBLE CNTR
COUNTER
012
3
20.9
16.0
5.7
20.9
16.0
5.7
Normal
When resetting
When interlocking
17.5
17.5
RESET TIMER/COUNTER
545
3
13.9
13.9
0.17
0.29
5.42 ms
5.42 ms
When resetting
1 word
When resetting
1,000 words
CNR
573
Section 15-5
Instruction Execution Times and Number of Steps
Comparison Instructions
Instruction
Mnemonic
When a double-length operand is used, add 1 to the value shown in the length
column in the following table.
Code
Length
(steps)
(See note)
ON execution time
(µs)
CPU-6
Conditions
CPU-4
OFF execution time
(µs)
CPU-6
CPU-4
Input Comparison
Instructions
(unsigned)
LD, AND,
OR +
=, <>,
<, <=,
>, >=
300 (=)
305 (<>)
310 (<)
315 (<=)
320 (>)
325 (>=)
4
4
4
4
4
4
0.21
0.37
Comparing 2
constants
0.21
0.37
1.12
1.58
Comparing 2 in- 0.21
direct IR+ addresses
0.37
Input Comparison
Instructions
(double, unsigned)
LD, AND,
OR +
=, <>,
<, <=,
>, >= +
L
301 (=)
306 (<>)
311 (<)
316 (<=)
321 (>)
326 (>=)
4
4
4
4
4
4
0.29
0.54
Comparing 2
constants
0.29
0.54
1.21
1.75
Comparing 2 in- 0.21
direct IR+ addresses
0.37
Input Comparison
Instructions
(signed)
LD, AND,
OR +
=, <>,
<, <=,
>, >= +
S
302 (=)
307 (<>)
312 (<)
317 (<=)
322 (>)
327 (>=)
4
4
4
4
4
4
6.5
6.5
---
0.21
0.37
Input Comparison
Instructions
(double,
signed)
LD, AND,
OR +
=, <>,
<, <=,
>, >= +
SL
303 (=)
308 (<>)
313 (<)
318 (<=)
323 (>)
328 (>=)
4
4
4
4
4
4
6.5
6.5
---
0.29
0.54
COMPARE
CMP
020
3
0.17
0.29
0.29
1.08
1.50
Comparing 2
0.17
constants
Comparing 2 in- 0.17
direct IR+ addresses
+42.36
+42.36
+0.24
+0.42
+90.52
+90.52
Increase for
CS1
Increase for
C200H
+0.24
+0.42
0.25
0.46
1.17
1.67
6.5
+42.36
6.5
+42.36
+90.52
+90.52
!CMP
DOUBLE
COMPARE
SIGNED
BINARY
COMPARE
CMPL
CPS
!CPS
020
060
114
114
7
3
3
7
0.29
Comparing 2
0.25
constants
Comparing 2 in- 0.17
direct IR+ addresses
0.46
--Increase for
CS1
Increase for
C200H
0.17
+0.24
0.29
+0.42
+0.24
+0.42
0.29
DOUBLE
SIGNED
BINARY
COMPARE
CPSL
115
3
6.5
6.5
---
0.17
0.29
TABLE
COMPARE
TCMP
085
4
21.92
21.92
---
0.21
0.37
MULTIPLE
COMPARE
MCMP
019
4
31.2
31.2
---
0.21
0.37
UNSIGNED
BLOCK
COMPARE
BCMP
068
4
32.6
32.6
---
0.21
0.37
574
Section 15-5
Instruction Execution Times and Number of Steps
Data Movement
Instructions
Instruction
MOVE
Mnemonic
MOV
!MOV
DOUBLE
MOVE
MOVE NOT
DOUBLE
MOVE NOT
MOVL
MVN
MVNL
When a double-length operand is used, add 1 to the value shown in the length
column in the following table.
Code
021
021
498
022
499
ON execution time
(µs)
Length
(steps)
(See note)
CPU-6
CPU-4
3
0.25
0.29
1.21
7
3
3
3
Conditions
OFF execution time
(µs)
CPU-6
CPU-4
Transferring a
constant to a
word
0.17
0.29
1.62
Transferring indirect IR+ to indirect IR+
0.17
0.29
+42.36
+42.36
+0.24
+0.42
+90.52
+90.52
Increase for
CS1
Increase for
C200H
+0.24
+0.42
0.42
0.50
Transferring a
constant to a
word
0.21
0.37
1.42
1.92
Transferring indirect IR+ to indirect IR+
0.17
0.29
0.25
0.29
Transferring a
constant to a
word
0.17
0.29
1.21
1.62
Transferring indirect IR+ to indirect IR+
0.17
0.29
0.42
0.50
Transferring a
constant to a
word
0.21
0.37
1.42
1.92
Transferring indirect IR+ to indirect IR+
0.17
0.29
MOVE BIT
MOVB
082
4
7.5
7.5
---
0.21
0.37
MOVE DIGIT
MOVD
083
4
7.3
7.3
---
0.21
0.37
MULTIPLE
BIT TRANSFER
XFRB
062
4
13.6
13.6
0.21
0.37
269.2
269.2
Transferring 1
bit
Transferring
255 bits
BLOCK
TRANSFER
XFER
11.2
11.2
0.21
0.37
633.5
633.5
Transferring 1
word
Transferring
1,000 words
070
4
BLOCK SET
BSET
071
4
8.5
278.3
8.5
278.3
Setting 1 word
Setting 1,000
words
0.21
0.37
DATA EXCHANGE
XCHG
073
3
0.50
1.42
0.67
1.92
Word to word
Indirect IR+ to
indirect IR+
0.17
0.17
0.29
0.29
DOUBLE
DATA EXCHANGE
XCGL
562
3
0.92
1.83
1.25
2.50
Word to word
Indirect IR+ to
indirect IR+
0.17
0.17
0.29
0.29
SINGLE
WORD DISTRIBUTE
DIST
080
4
7.0
7.0
---
0.21
0.37
DATA COLLECT
COLL
081
4
7.1
7.1
---
0.21
0.37
575
Section 15-5
Instruction Execution Times and Number of Steps
Instruction
Mnemonic
Code
Length
(steps)
(See note)
ON execution time
(µs)
CPU-6 CPU-4
MOVE TO
REGISTER
MOVR
560
3
0.42
0.96
0.50
1.29
MOVE TIMER/COUNTER PV TO
REGISTER
MOVRW
561
3
0.42
0.50
0.96
1.29
Data Shift Instructions
Instruction
SHIFT
REGISTER
Mnemonic
SFT
Code
010
Length
(steps)
(See note)
3
CPU-6
--10.4
763.1
CPU-4
--10.4
763.1
9.6
859.6
9.6
859.6
ASYNCHRONOUS SHIFT
REGISTER
ASFT
017
4
7.7
2.01 ms
7.7
2.01 ms
WORD
SHIFT
WSFT
016
4
7.8
781.7
7.8
781.7
ARITHMETIC
SHIFT LEFT
ASL
025
2
0.29
0.75
0.37
1.0
DOUBLE
SHIFT LEFT
ASLL
570
2
0.50
0.96
0.67
1.29
ARITHMETIC ASR
SHIFT RIGHT
026
2
0.29
0.75
0.37
1.0
DOUBLE
ASRL
SHIFT RIGHT
571
2
0.50
0.96
0.67
1.29
ROTATE
LEFT
027
2
0.29
0.75
0.37
1.0
DOUBLE RO- ROLL
TATE LEFT
572
2
0.50
0.96
0.67
1.29
ROTATE
LEFT WITHOUT CARRY
RLNC
574
2
0.29
0.75
0.37
1.0
DOUBLE RO- RLNL
TATE LEFT
WITHOUT
CARRY
576
2
0.50
0.67
0.96
1.29
ROTATE
RIGHT
028
0.29
0.75
0.37
1.0
576
4
ON execution time
(µs)
084
ROR
OFF execution time
(µs)
CPU-6 CPU-4
Word to IR
Indirect IR+ to
IR
Word to IR
0.21
0.17
0.37
0.29
0.21
0.37
Indirect IR+ to
IR
0.17
0.29
When a double-length operand is used, add 1 to the value shown in the length
column in the following table.
REVERSIBLE SFTR
SHIFT
REGISTER
ROL
Conditions
2
Conditions
OFF execution time
(µs)
CPU-6
Resetting
Shifting 1 word 12.7
Shifting 1,000
365.5
words
Shifting 1 word 0.21
Shifting 1,000
words
Shifting 1 word
Shifting 1,000
words
Shifting 1 word
Shifting 1,000
words
Shifting words
Shifting indirect
IR+
Shifting words
Shifting indirect
IR+
Shifting words
Shifting indirect
IR+
Shifting words
Shifting indirect
IR+
Rotating words
Rotating indirect IR+
Rotating words
Rotating indirect IR+
Rotating words
Rotating indirect IR+
Rotating words
CPU-4
12.7
365.5
0.37
0.21
0.37
0.21
0.37
0.12
0.12
0.21
0.21
0.12
0.12
0.21
0.21
0.12
0.12
0.21
0.21
0.12
0.12
0.21
0.21
0.12
0.12
0.21
0.21
0.12
0.12
0.21
0.21
0.12
0.12
0.21
0.21
0.12
0.21
Rotating indirect IR+
0.12
0.21
Rotating words
Rotating indirect IR+
0.12
0.12
0.21
0.21
Section 15-5
Instruction Execution Times and Number of Steps
Instruction
Mnemonic
Code
Length
(steps)
(See note)
ON execution time
(µs)
CPU-6 CPU-4
DOUBLE RO- RORL
TATE RIGHT
573
2
0.50
0.96
0.67
1.29
ROTATE
RRNC
RIGHT WITHOUT CARRY
575
2
0.29
0.75
0.37
1.0
DOUBLE RO- RRNL
TATE RIGHT
WITHOUT
CARRY
577
2
0.50
0.67
0.96
ONE DIGIT
SHIFT LEFT
SLD
074
3
ONE DIGIT
SRD
SHIFT RIGHT
075
SHIFT N-BIT
DATA LEFT
NSFL
SHIFT N-BIT
DATA RIGHT
SHIFT NBITS LEFT
0.12
0.12
0.21
0.21
0.12
0.12
0.21
0.21
0.12
0.21
1.29
Rotating indirect IR+
0.12
0.21
8.2
760.7
8.2
760.7
0.17
0.29
3
8.7
1.07 ms
8.7
1.07 ms
0.17
0.29
578
4
10.5
55.5
10.5
55.5
0.21
0.37
NSFR
579
4
10.5
69.3
10.5
69.3
0.21
0.37
NASL
580
3
0.29
0.37
0.17
0.29
1.25
1.71
0.17
0.29
0.50
0.67
0.17
0.29
1.46
2.0
0.17
0.29
0.29
0.37
0.17
0.29
1.25
1.71
0.17
0.29
0.50
0.67
0.17
0.29
1.46
2.0
Shifting 1 word
Shifting 1,000
words
Shifting 1 word
Shifting 1,000
words
Shifting 1 bit
Shifting 1,000
bits
Shifting 1 bit
Shifting 1,000
bits
Shifting 1 word
by 1 bit
Shifting indirect
IR+ by 1 bit
Shifting 1 word
by 1 bit
Shifting indirect
IR+ by 1 bit
Shifting 1 word
by 1 bit
Shifting indirect
IR+ by 1 bit
Shifting 1 word
by 1 bit
Shifting indirect
IR+ by 1 bit
0.17
0.29
NSLL
SHIFT NBITS RIGHT
NASR
NSRL
Increment/Decrement
Instructions
Instruction
INCREMENT
BINARY
DOUBLE INCREMENT
BINARY
OFF execution time
(µs)
CPU-6 CPU-4
Rotating words
Rotating indirect IR+
Rotating words
Rotating indirect IR+
Rotating words
DOUBLE
SHIFT NBITS LEFT
DOUBLE
SHIFT NBITS RIGHT
Conditions
Mnemonic
++
++L
582
3
581
3
583
3
When a double-length operand is used, add 1 to the value shown in the length
column in the following table.
Code
590
591
Length
(steps)
(See note)
2
2
ON execution time
(µs)
CPU-6
0.29
CPU-4
0.37
0.75
1.0
0.50
0.67
0.96
1.29
Conditions
Incrementing a
word
Incrementing
indirect IR+
Incrementing a
word
Incrementing
indirect IR+
OFF execution time
(µs)
CPU-6
0.12
CPU-4
0.21
0.12
0.21
0.12
0.21
0.12
0.21
577
Section 15-5
Instruction Execution Times and Number of Steps
Instruction
Mnemonic
DECREMENT
BINARY
––
Code
592
Length
(steps)
(See note)
ON execution time
(µs)
CPU-6 CPU-4
2
0.29
0.37
0.75
1.0
0.50
0.67
0.96
1.29
Conditions
OFF execution time
(µs)
CPU-6 CPU-4
DOUBLE
DECREMENT
BINARY
– –L
INCREMENT
BCD
DOUBLE INCREMENT
BCD
++B
594
2
7.4
7.4
Decrementing a
word
Decrementing
indirect IR+
Decrementing a
word
Decrementing
indirect IR+
---
++BL
595
2
6.1
6.1
---
0.12
0.21
DECREMENT
BCD
DOUBLE
DECREMENT
BCD
– –B
596
2
7.2
7.2
---
0.12
0.21
– –BL
597
2
7.1
7.1
---
0.12
0.21
593
Symbol Math
Instructions
Instruction
0.21
0.12
0.21
0.12
0.21
0.12
0.21
0.12
0.21
When a double-length operand is used, add 1 to the value shown in the length
column in the following table.
Mnemonic
Code
SIGNED
BINARY
ADD WITHOUT
CARRY
+
DOUBLE
SIGNED
BINARY
ADD WITHOUT
CARRY
+L
SIGNED
BINARY
ADD WITH
CARRY
+C
DOUBLE
SIGNED
BINARY
ADD WITH
CARRY
+CL
BCD ADD
WITHOUT
CARRY
+B
404
DOUBLE
BCD ADD
WITHOUT
CARRY
+BL
405
578
2
0.12
400
401
402
403
Length
(steps)
(See note)
ON execution time
(µs)
CPU-4
0.37
Indirect IR+ +
indirect IR+ →
indirect IR+
0.21
0.37
0.54
Constant +
constant →
word
0.29
0.54
1.96
2.71
Indirect IR+ +
indirect IR+ →
indirect IR+
0.21
0.37
0.25
0.37
Constant +
constant →
word
0.21
0.37
1.71
2.33
Indirect IR+ +
indirect IR+ →
indirect IR+
0.21
0.37
0.42
0.54
Constant +
constant →
word
0.29
0.54
1.96
2.71
Indirect IR+ +
indirect IR+ →
indirect IR+
0.21
0.37
4
14.0
14.0
---
0.21
0.37
4
19.0
19.0
---
0.21
0.37
4
4
4
CPU-4
0.37
1.71
2.33
0.42
OFF execution time
(µs)
CPU-6
0.21
4
CPU-6
0.25
Conditions
Constant +
constant →
word
Section 15-5
Instruction Execution Times and Number of Steps
Instruction
Mnemonic
Code
Length
(steps)
(See note)
ON execution time
(µs)
CPU-6
CPU-4
Conditions
OFF execution time
(µs)
CPU-6
CPU-4
BCD ADD
WITH
CARRY
+BC
406
4
14.5
14.5
---
0.21
0.37
DOUBLE
BCD ADD
WITH
CARRY
+BCL
407
4
19.6
19.6
---
0.21
0.37
SIGNED
BINARY
SUBTRACT
WITHOUT
CARRY
–
410
4
0.25
0.37
Constant –
constant →
word
0.21
0.37
1.71
2.33
Indirect IR+ –
indirect IR+ →
indirect IR+
0.21
0.37
DOUBLE
SIGNED
BINARY
SUBTRACT
WITHOUT
CARRY
–L
0.42
0.54
Constant –
constant →
word
0.29
0.54
1.96
2.71
Indirect IR+ –
indirect IR+ →
indirect IR+
0.21
0.37
SIGNED
BINARY
SUBTRACT
WITH
CARRY
–C
0.25
0.37
Constant –
constant →
word
0.21
0.37
1.71
2.33
Indirect IR+ –
indirect IR+ →
indirect IR+
0.21
0.37
DOUBLE
SIGNED
BINARY
SUBTRACT
WITH
CARRY
–CL
0.42
0.54
Constant –
constant →
word
0.29
0.54
1.96
2.71
Indirect IR+ –
indirect IR+ →
indirect IR+
0.21
0.37
BCD SUBTRACT
WITHOUT
CARRY
–B
414
4
13.1
13.1
---
0.21
0.37
DOUBLE
BCD SUBTRACT
WITHOUT
CARRY
–BL
415
4
18.2
18.2
---
0.21
0.37
BCD SUBTRACT
WITH
CARRY
–BC
416
4
13.8
13.8
---
0.21
0.37
DOUBLE
BCD SUBTRACT
WITH
CARRY
–BCL
417
4
18.8
18.8
---
0.21
0.37
SIGNED
BINARY
MULTIPLY
*
420
4
0.50
0.58
Constant
constant →
word
0.21
0.37
1.96
2.62
Indirect IR+
indirect IR+ →
indirect IR+
0.21
0.37
411
412
413
4
4
4
579
Section 15-5
Instruction Execution Times and Number of Steps
Instruction
DOUBLE
SIGNED
BINARY
MULTIPLY
UNSIGNED
BINARY
MULTIPLY
DOUBLE
UNSIGNED
BINARY
MULTIPLY
BCD MULTIPLY
DOUBLE
BCD MULTIPLY
SIGNED
BINARY DIVIDE
DOUBLE
SIGNED
BINARY DIVIDE
UNSIGNED
BINARY DIVIDE
DOUBLE
UNSIGNED
BINARY DIVIDE
BCD DIVIDE
DOUBLE
BCD DIVIDE
Mnemonic
Code
BCD-TOBINARY
580
ON execution time
(µs)
CPU-6
CPU-4
Conditions
OFF execution time
(µs)
CPU-6
CPU-4
*L
421
4
11.19
11.19
---
0.21
0.37
*U
422
4
0.50
0.58
Constant
constant →
word
0.21
0.37
1.96
2.62
Indirect IR+
indirect IR+ →
indirect IR+
0.21
0.37
*UL
423
4
10.63
10.63
---
0.21
0.37
*B
424
4
12.8
12.8
---
0.21
0.37
*BL
425
4
35.2
35.2
---
0.21
0.37
/
430
4
0.75
0.83
Constant B
constant →
word
0.21
0.37
2.21
2.87
Indirect IR+ B
indirect IR+ →
indirect IR+
0.21
0.37
/L
431
4
9.8
9.8
---
0.21
0.37
/U
432
4
0.75
0.83
Constant B
constant →
word
0.21
0.37
2.21
2.87
Indirect IR+ B
indirect IR+ →
indirect IR+
0.21
0.37
/UL
433
4
9.1
9.1
---
0.21
0.37
/B
434
4
15.9
15.9
---
0.21
0.37
/BL
435
4
26.2
26.2
---
0.21
0.37
Conversion Instructions
Instruction
Length
(steps)
(See note)
Mnemonic
BIN
When a double-length operand is used, add 1 to the value shown in the length
column in the following table.
Code
023
Length
(steps)
(See note)
3
ON execution time
(µs)
CPU-6
0.25
CPU-4
0.29
1.21
1.62
Conditions
To a word after
converting to a
constant
OFF execution time
(µs)
CPU-6
0.17
To a word after 0.17
converting to indirect IR+
CPU-4
0.29
0.29
Section 15-5
Instruction Execution Times and Number of Steps
Instruction
Mnemonic
Code
Length
(steps)
(See note)
ON execution time
(µs)
CPU-6
CPU-4
Conditions
OFF execution time
(µs)
CPU-6
CPU-4
DOUBLE
BCD-TODOUBLE
BINARY
BINL
058
3
9.1
9.1
---
0.17
0.29
BINARYTO-BCD
BCD
024
3
8.3
8.3
---
0.17
0.29
DOUBLE
BINARYTODOUBLE
BCD
BCDL
059
3
9.2
9.2
---
0.17
0.29
2’S COMPLEMENT
NEG
160
3
0.25
0.29
To a word after
converting to a
constant
0.17
0.29
1.21
1.62
To indirect IR+
after converting
to indirect IR+
0.17
0.29
0.42
0.5
To a word after
converting to a
constant
0.21
0.37
1.42
1.92
To indirect IR+
after converting
to indirect IR+
0.17
0.29
0.42
0.50
To a word after
expanding from
a constant
0.17
0.29
1.37
1.83
To indirect IR+
after expanding
from indirect
IR+
0.17
0.29
8.8
8.8
0.21
0.37
12.8
12.8
20.3
20.3
33.4
33.4
Decoding 1 digit (4 to 16)
Decoding 4 digits (4 to 16)
Decoding 1 digit 8 to 256
Decoding 2 digits (8 to 256)
10.4
10.4
0.37
59.1
59.1
23.6
23.6
92.5
92.5
Encoding 1 digit 0.21
(16 to 4)
Encoding 4 digits (16 to 4)
Encoding 1 digit
(256 to 8)
Encoding 2 digits (256 to 8)
9.7
9.7
0.37
15.1
15.1
0.21
Converting 1
digit into ASCII
Converting 4
digits into ASCII
DOUBLE
2’S COMPLEMENT
NEGL
16-BIT TO
32-BIT
SIGNED
BINARY
SIGN
DATA DECODER
MLPX
DATA ENCODER
DMPX
ASCII CON- ASC
VERT
161
600
076
077
086
3
3
4
4
4
ASCII TO
HEX
HEX
162
4
10.1
10.1
Converting 1
digit
0.21
0.37
COLUMN
TO LINE
LINE
063
4
29.1
29.1
---
0.21
0.37
LINE TO
COLUMN
COLM
064
4
37.3
37.3
---
0.21
0.37
581
Section 15-5
Instruction Execution Times and Number of Steps
Instruction
SIGNED
BCD-TOBINARY
DOUBLE
SIGNED
BCD-TOBINARY
SIGNED
BINARYTO-BCD
DOUBLE
SIGNED
BINARYTO-BCD
Mnemonic
BINS
BISL
BCDS
BDSL
Code
470
4
472
4
471
4
473
4
Logic Instructions
Instruction
LOGICAL
AND
DOUBLE
LOGICAL
AND
LOGICAL OR
582
Mnemonic
ANDW
ANDL
ORW
Length
(steps)
(See note)
ON execution time
(µs)
CPU-6
CPU-4
12.1
12.1
12.1
12.1
12.7
12.7
13.0
13.0
13.6
13.6
13.7
13.7
14.2
14.2
14.4
14.4
10.6
10.6
10.8
10.8
10.9
10.9
11.5
11.5
11.6
11.6
11.8
11.8
12.0
12.0
12.5
12.5
Conditions
Data format
setting No. 0
Data format
setting No. 1
Data format
setting No. 2
Data format
setting No. 3
Data format
setting No. 0
Data format
setting No. 1
Data format
setting No. 2
Data format
setting No. 3
Data format
setting No. 0
Data format
setting No. 1
Data format
setting No. 2
Data format
setting No. 3
Data format
setting No. 0
Data format
setting No. 1
Data format
setting No. 2
Data format
setting No. 3
OFF execution time
(µs)
CPU-6
CPU-4
0.21
0.37
0.21
0.37
0.21
0.37
0.21
0.37
When a double-length operand is used, add 1 to the value shown in the length
column in the following table.
Code
034
610
035
Length
(steps)
(See note)
4
4
4
ON execution time
(µs)
CPU-6
0.25
CPU-4
0.37
1.71
2.33
0.42
Conditions
OFF execution time
(µs)
CPU-6
0.21
CPU-4
0.37
Indirect IR+ Λ
indirect IR+ →
indirect IR+
0.21
0.37
0.54
Constant Λ
constant →
word
0.29
0.54
1.96
2.71
Indirect IR+ Λ
indirect IR+ →
indirect IR+
0.21
0.37
0.25
0.37
Constant V
constant →
word
0.21
0.37
1.71
2.33
Indirect IR+ V
indirect IR+ →
indirect IR+
0.21
0.37
Constant Λ
constant →
word
Section 15-5
Instruction Execution Times and Number of Steps
Instruction
DOUBLE
LOGICAL OR
EXCLUSIVE
OR
DOUBLE EXCLUSIVE OR
EXCLUSIVE
NOR
DOUBLE EXCLUSIVE
NOR
COMPLEMENT
DOUBLE
COMPLEMENT
Mnemonic
ORWL
XORW
XORL
XNRW
XNRL
COM
COML
Code
611
036
Instruction
BINARY
ROOT
BCD
SQUARE
ROOT
ARITHMETIC
PROCESS
Mnemonic
ON execution time
(µs)
CPU-6 CPU-4
4
0.42
0.54
Constant V
constant →
word
0.29
0.54
1.96
2.71
Indirect IR+ V
indirect IR+ →
indirect IR+
0.21
0.37
0.25
0.37
Constant ô
constant →
word
0.21
0.37
1.71
2.33
Indirect IR+ ô
indirect IR+ →
indirect IR+
0.21
0.37
0.42
0.54
Constant ô
constant →
word
0.29
0.54
1.96
2.71
Indirect IR+ ô
indirect IR+ →
indirect IR+
0.21
0.37
0.25
0.37
Constant ô
constant →
word
0.21
0.37
1.71
2.33
Indirect IR+ ô
indirect IR+ →
indirect IR+
0.21
0.37
0.42
0.54
Constant ô
constant →
word
0.29
0.54
1.96
2.71
Indirect IR+ ô
indirect IR+ →
indirect IR+
0.21
0.37
0.29
0.37
0.12
0.21
0.75
1.0
0.12
0.21
0.50
0.67
0.12
0.21
0.96
1.29
Reversing
words
Reversing indirect IR+
Reversing
words
Reversing indirect IR+
0.12
0.21
4
612
4
037
4
613
4
029
2
614
Special Math Instructions
Length
(steps)
(See note)
2
Conditions
OFF execution time
(µs)
CPU-6 CPU-4
When a double-length operand is used, add 1 to the value shown in the length
column in the following table.
Code
Length
(steps)
(See note)
ON execution time
(µs)
Conditions
OFF execution time
(µs)
ROTB
620
3
CPU-6
530.7
CPU-4
530.7
---
CPU-6
0.17
CPU-4
0.29
ROOT
072
3
514.5
514.5
---
0.17
0.29
APR
069
4
32.3
32.3
0.21
0.37
78.3
78.3
Designating
SIN and COS
Designating
line-segment
approximation
583
Section 15-5
Instruction Execution Times and Number of Steps
Instruction
Mnemonic
Code
Length
(steps)
(See note)
ON execution time
(µs)
CPU-6 CPU-4
Conditions
OFF execution time
(µs)
CPU-6 CPU-4
FLOATING
POINT DIVIDE
FDIV
079
4
176.6
176.6
---
0.21
0.37
BIT COUNTER
BCNT
067
4
22.1
22.1
Counting 1
word
0.21
0.37
Floating-point Math
Instructions
Instruction
Mnemonic
When a double-length operand is used, add 1 to the value shown in the length
column in the following table.
Code
Length
(steps)
(See note)
ON execution time
(µs)
Conditions
OFF execution time
(µs)
FLOATING
TO 16-BIT
FLOATING
TO 32-BIT
16-BIT TO
FLOATING
32-BIT TO
FLOATING
FLOATINGPOINT ADD
FLOATINGPOINT SUBTRACT
FIX
450
3
CPU-6
14.5
CPU-4
14.5
---
CPU-6
0.17
CPU-4
0.29
FIXL
451
3
14.6
14.6
---
0.17
0.29
FLT
452
3
11.1
11.1
---
0.17
0.29
FLTL
453
3
10.8
10.8
---
0.17
0.29
+F
454
4
10.2
10.2
---
0.21
0.37
–F
455
4
10.3
10.3
---
0.21
0.37
FLOATINGPOINT DIVIDE
/F
457
4
12.0
12.0
---
0.21
0.37
FLOATINGPOINT MULTIPLY
*F
456
4
10.5
10.5
---
0.21
0.37
DEGREES
TO RADIANS
RADIANS TO
DEGREES
SINE
RAD
458
3
14.9
14.9
---
0.17
0.29
DEG
459
3
14.8
14.8
---
0.17
0.29
SIN
460
3
61.1
61.1
---
0.17
0.29
COSINE
COS
461
3
44.1
44.1
---
0.17
0.29
TANGENT
TAN
462
3
22.6
22.6
---
0.17
0.29
ARC SINE
ASIN
463
3
24.1
24.1
---
0.17
0.29
ARC COSINE ACOS
464
3
28.0
28.0
---
0.17
0.29
ARC TANGENT
SQUARE
ROOT
EXPONENT
ATAN
465
3
16.4
16.4
---
0.17
0.29
SQRT
466
3
28.1
28.1
---
0.17
0.29
EXP
467
3
96.7
96.7
---
0.17
0.29
LOGARITHM
LOG
468
3
17.4
17.4
---
0.17
0.29
EXPONENTIAL POWER
PWR
840
4
181.7
181.7
---
0.21
0.37
Table Data Processing
Instructions
584
When a double-length operand is used, add 1 to the value shown in the length
column in the following table.
Section 15-5
Instruction Execution Times and Number of Steps
Instruction
SET STACK
Mnemonic
SSET
Code
630
ON execution time
(µs)
Length
(steps)
(See note)
Conditions
CPU-6
CPU-4
3
8.5
8.5
Designating 5
wo">
/
ダウンロード
念のためお知らせします。ドキュメントはここで直接表示できます。しかし最も重要なことは、私たちのAIがすでにそれを読んでいるということです。複雑なことを簡単な言葉で説明したり、あらゆる言語で質問に答えたり、最も長く複雑なドキュメントでもすばやくナビゲートしたりできます。
広告