At-CP1E CPU Unit Software
At-CP1E CPU Unit Software
At-CP1E CPU Unit Software
W480-E1-04
SYSMAC CP Series
CP1E-E@@D@-@
CP1E-N@@D@-@
CP1E-NA@@D@-@
CP1E CPU Unit Software
USERS MANUAL
OMRON, 2009
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 con-
stantly 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.
SYSMAC CP Series
CP1E-E@@D@-@
CP1E-N@@D@-@
CP1E-NA@@D@-@
CP1E CPU Unit Software
Users Manual
Revised June 2010
Introduction
Thank you for purchasing a SYSMAC CP-series CP1E Programmable Controller.
This manual contains information required to use the CP1E. Read this manual completely and be sure
you understand the contents before attempting to use the CP1E.
Intended Audience
This manual is intended for the following personnel, who must also have knowledge of electrical sys-
tems (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
Applicable Products
This Manual
CP1E CPU Unit Hardware CP1E CPU Unit Software CP1E CPU Unit Instructions
Users Manual(Cat. No. W479) Users Manual(Cat. No. W480) Reference Manual(Cat. No. W483)
Mounting and
1 Setting Hardware
Names and specifications of the parts of all Units
Basic system configuration for each CPU Unit
Connection methods for Expansion I/O Units
and Expansion Units
2 Wiring
4 Software Setup
Software setting methods for the CPU
Units (PLC Setup)
Checking and
6 Debugging Operation
Checking I/O wiring, setting the Auxiliary Area
settings, and performing trial operation
Monitoring and debugging with the
Maintenance and CX-Programmer
7 Troubleshooting
The following page structure and icons are used in this manual.
Step in a procedure 1
5-2 Installation
Use a screwdriver to pull down the DIN Track mounting pins from the back of the Units to release
them, and mount the Units to the DIN Track.
Indicates a step in a
procedure.
DIN Track mounting pins
5 Page tab
Release Gives the number
DIN Track
3 Press in all of the DIN Track mounting pins to securely lock the Units in place.
Special Information
(See below.)
Icons are used to indicate
precautions and
additional information. DIN Track mounting pins
This illustration is provided only as a sample and may not literally appear in this manual.
Special Information
Special information in this manual is classified as follows:
Additional Information
Additional information to increase understanding or make operation easier.
1 11
2 12
1 Overview 11 High-speed Counters
3 13
Internal Memory
2 in the CPU Unit 12 Pulse Outputs
4 14
Understanding Serial
4 Programming 14 Communications 6 16
7 17
5 I/O Memory 15 Analog I/O Function
8 18
6 I/O Allocation 16 Other Functions
APP
9
Ethernet
7 PLC Setup 17 Option Board
10
Overview of Built-in
Programming
8 Functions and
Allocations
18 Device Operations
Quick-response
9 Inputs A Appendices
10 Interrupts
Section 1 Overview
1-1 CP1E Overview ........................................................................................................................ 1-2
1-1-1 Overview of Features .................................................................................................................. 1-2
1-2 Basic Operating Procedure .................................................................................................... 1-3
Section 10 Interrupts
10-1 Interrupts ................................................................................................................................ 10-2
10-1-1 Overview ................................................................................................................................... 10-2
10-2 Input Interrupts ...................................................................................................................... 10-3
10-2-1 Overview ................................................................................................................................... 10-3
10-2-2 Flow of Operation...................................................................................................................... 10-4
10-2-3 Application Example.................................................................................................................. 10-7
10-3 Scheduled Interrupts........................................................................................................... 10-10
10-3-1 Overview ................................................................................................................................. 10-10
10-3-2 Flow of Operation.................................................................................................................... 10-11
10-4 Precautions for Using Interrupts........................................................................................ 10-13
10-4-1 Interrupt Task Priority and Order of Execution ........................................................................ 10-13
10-4-2 Related Auxiliary Area Words and Bits ................................................................................... 10-13
10-4-3 Duplicate Processing in each Task ......................................................................................... 10-13
Section A Appendices
A-1 Instruction Functions..............................................................................................................A-2
A-1-1 Sequence Input Instructions ....................................................................................................... A-2
A-1-2 Sequence Output Instructions .................................................................................................... A-3
A-1-3 Sequence Control Instructions ................................................................................................... A-5
A-1-4 Timer and Counter Instructions .................................................................................................. A-7
A-1-5 Comparison Instructions........................................................................................................... A-10
A-1-6 Data Movement Instructions ..................................................................................................... A-12
A-1-7 Data Shift Instructions .............................................................................................................. A-15
A-1-8 Increment/Decrement Instructions............................................................................................ A-17
A-1-9 Symbol Math Instructions ......................................................................................................... A-18
A-1-10 Conversion Instructions ............................................................................................................ A-22
A-1-11 Logic Instructions...................................................................................................................... A-26
A-1-12 Special Math Instructions ......................................................................................................... A-27
A-1-13 Floating-point Math Instructions ............................................................................................... A-27
A-1-14 Table Data Processing Instructions .......................................................................................... A-30
A-1-15 Data Control Instructions .......................................................................................................... A-31
A-1-16 Subroutine Instructions............................................................................................................. A-35
A-1-17 Interrupt Control Instructions .................................................................................................... A-36
A-1-18 High-speed Counter/Pulse Output Instructions ........................................................................ A-37
LIMITATIONS OF LIABILITY
OMRON SHALL NOT BE RESPONSIBLE FOR SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES,
LOSS OF PROFITS OR COMMERCIAL LOSS IN ANY WAY CONNECTED WITH THE PRODUCTS,
WHETHER SUCH CLAIM IS BASED ON CONTRACT, WARRANTY, NEGLIGENCE, OR STRICT
LIABILITY.
In no event shall the responsibility of OMRON for any act exceed the individual price of the product on which
liability is asserted.
At the customers request, OMRON will provide applicable third party certification documents identifying
ratings and limitations of use that apply to the products. This information by itself is not sufficient for a
complete determination of the suitability of the products in combination with the end product, machine,
system, or other application or use.
The following are some examples of applications for which particular attention must be given. This is not
intended to be an exhaustive list of all possible uses of the products, nor is it intended to imply that the uses
listed may be suitable for the products:
Outdoor use, uses involving potential chemical contamination or electrical interference, or conditions or
uses not described in this manual.
Nuclear energy control systems, combustion systems, railroad systems, aviation systems, medical
equipment, amusement machines, vehicles, safety equipment, and installations subject to separate
industry or government regulations.
Systems, machines, and equipment that could present a risk to life or property.
Please know and observe all prohibitions of use applicable to the products.
NEVER USE THE PRODUCTS FOR AN APPLICATION INVOLVING SERIOUS RISK TO LIFE OR
PROPERTY WITHOUT ENSURING THAT THE SYSTEM AS A WHOLE HAS BEEN DESIGNED TO
ADDRESS THE RISKS, AND THAT THE OMRON PRODUCTS ARE PROPERLY RATED AND INSTALLED
FOR THE INTENDED USE WITHIN THE OVERALL EQUIPMENT OR SYSTEM.
PROGRAMMABLE PRODUCTS
OMRON shall not be responsible for the users programming of a programmable product, or any
consequence thereof.
It is our practice to change model numbers when published ratings or features are changed, or when
significant construction changes are made. However, some specifications of the products may be changed
without any notice. When in doubt, special model numbers may be assigned to fix or establish key
specifications for your application on your request. Please consult with your OMRON representative at any
time to confirm actual specifications of purchased products.
PERFORMANCE DATA
Performance data given in this manual is provided as a guide for the user in determining suitability and does
not constitute a warranty. It may represent the result of OMRONs test conditions, and the users must
correlate it to actual application requirements. Actual performance is subject to the OMRON Warranty and
Limitations of Liability.
The following notation is used in this manual to provide precautions required to ensure safe usage of a
CP-series PLC. The safety precautions that are provided are extremely important to safety. Always read
and heed the information provided in all safety precautions.
Symbols
The triangle symbol indicates precautions (including
warnings). The specific operation is shown in the triangle
and explained in text. This example indicates a precau-
tion for electric shock.
Be sure to sufficiently confirm the safety at the destination when you transfer
the program or I/O memory or perform procedures to change the I/O memory.
Devices connected to PLC outputs may incorrectly operate regardless of the operat-
ing mode of the CPU Unit.
With an E-type CPU Unit or with an N/NA-type CPU Unit without a Battery, the con-
tents of the DM Area (D) *, Holding Area (H), the Counter Present Values (C), the sta-
tus of Counter Completion Flags (C), and the status of bits in the Auxiliary Area (A)
related to clock functions may be unstable when the power supply is turned ON.
*This does not apply to areas backed up to EEPROM using the DM backup function.
If the DM backup function is being used, be sure to use one of the following methods
for initialization.
1. Clearing All Areas to All Zeros
Select the Clear Held Memory (HR/DM/CNT) to Zero Check Box in the Startup
Data Read Area in the PLC Setup.
2. Clearing Specific Areas to All Zeros or Initializing to Specific Values
Make the settings from a ladder program.
If the data is not initialized, the unit or device may operate unexpectedly because of
unstable data.
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.
The DM Area (D), Holding Area (H), Counter Completion Flags (C), and Counter
Present Values (C) will be held by the Battery if a Battery is mounted in a CP1E-
N/NAD- CPU Unit. When the battery voltage is low, however, I/O memory
areas that are held (including the DM, Holding, and Counter Areas) will be unstable.
The unit or device may operate unexpectedly because of unstable data.
Use the Battery Error Flag or other measures to stop outputs if external out-
puts are performed from a ladder program based on the contents of the DM
Area or other I/O memory areas.
Sufficiently check safety if I/O bit status or present values are monitored in the
Ladder Section Pane or present values are monitored in the Watch Pane.
If bits are set, reset, force-set, or force-reset by inadvertently pressing a shortcut key,
devices connected to PLC outputs may operate incorrectly regardless of the operat-
ing mode.
Program so that the memory area of the start address is not exceeded when
using a word address or symbol for the offset.
For example, write the program so that processing is executed only when the indirect
specification does not cause the final address to exceed the memory area by using
an input comparison instruction or other instruction.
If an indirect specification causes the address to exceed the area of the start address,
the system will access data in other area, and unexpected operation may occur.
Set the temperature range according to the type of temperature sensor con-
nected to the Unit.
Temperature data will not be converted correctly if the temperature range does not
match the sensor.
Do not set the temperature range to any values other than those for which tem-
perature ranges are given in the following table.
An incorrect setting may cause operating errors.
Handling
To initialize the DM Area, back up the initial contents for the DM Area to backup memory using
one of the following methods.
Set the number of words of the DM Area to be backed up starting with D0 in the Number of CH
of DM for backup Box in the Startup Data Read Area.
Include programming to back up specified words in the DM Area to built-in EEPROM by turning
ON A751.15 (DM Backup Save Start Bit).
Check the ladder program for proper execution before actually running it on the Unit. Not checking
the program may result in an unexpected operation.
The ladder program and parameter area data in the CP1E CPU Units are backed up in the built-in
EEPROM backup memory. The BKUP indicator will light on the front of the CPU Unit when the
backup operation is in progress. Do not turn OFF the power supply to the CPU Unit when the
BKUP indicator is lit. The data will not be backed up if power is turned OFF and a memory error
will occur the next time the power supply is turned ON.
With a CP1E CPU Unit, data memory can be backed up to the built-in EEPROM backup memory.
The BKUP indicator will light on the front of the CPU Unit when backup is in progress. Do not turn
OFF the power supply to the CPU Unit when the BKUP indicator is lit. If the power is turned OFF
during a backup, the data will not be backed up and will not be transferred to the DM Area in RAM
the next time the power supply is turned ON.
Before replacing the battery, supply power to the CPU Unit for at least 30 minutes and then com-
plete battery replacement within 5 minutes. Memory data may be corrupted if this precaution is
not observed.
The equipment may operate unexpectedly if inappropriate parameters are set. Even if the appro-
priate parameters are set, confirm that equipment will not be adversely affected before transfer-
ring the parameters to the CPU Unit.
Before starting operation, confirm that the contents of the DM Area is correct.
After replacing the CPU Unit, make sure that the required data for the DM Area, Holding Area, and
other memory areas has been transferred to the new CPU Unit before restarting operation.
Do not attempt to disassemble, repair, or modify any Units. Any attempt to do so may result in mal-
function, fire, or electric shock.
Confirm that no adverse effect will occur in the system before attempting any of the following. Not
doing so may result in an unexpected operation.
Changing the operating mode of the PLC (including the setting of the startup operating mode).
Force-setting/force-resetting any bit in memory.
Changing the present value of any word or any set value in memory.
External Circuits
Always configure the external circuits to turn ON power to the PLC before turning ON power to the
control system. If the PLC power supply is turned ON after the control power supply, temporary
errors may result in control system signals because the output terminals on DC Output Units and
other Units will momentarily turn ON when power is turned ON to the PLC.
Fail-safe measures must be taken by the customer to ensure safety in the event that outputs from
output terminals remain ON as a result of internal circuit failures, which can occur in relays, tran-
sistors, and other elements.
SYSMAC CP Series W461 CP1L-L10D- To learn the basic Describes the following information for
CP1L/CP1E CPU Unit CP1L-L14D- setup methods of the CP1L/CP1E PLCs.
CP1L/CP1E PLCs Basic configuration and component names
Introduction Manual CP1L-L20D-
CP1L-M30D- Mounting and wiring
CP1L-M40D- Programming, data transfer, and debugging
CP1L-M60D- using the CX-Programmer
CP1E-ED- Application program examples
CP1E-ND-
CP1E-NAD-
Overview
This section gives an overview of the CP1E and describes its procedures.
The SYSMAC CP1E Programmable Controller is a package-type PLC made by OMRON that is
designed for easy application. The CP1E includes E-type CPU Units (basic models) for standard control
operations using basic, movement, arithmetic, and comparison instructions, and N/NA-type CPU Units
(application models) that supports connections to Programmable Terminals, Inverters, and Servo Drives.
CP1E Application Models
Basic Models
NA-type CPU
(E-type CPU Units) N-type CPU Units
Units
CPU Unit with
CPU with 10, 14 CPU Unit with 30 or 40 CPU with 14 or CPU Unit with
30, 40 or 60 I/O
or 20 I/O Points I/O Points 20 I/O Points 20 I/O Points
Points
Appearance
2. Wiring
Wire the power supply, I/O, and communications.
Refer to Section 5 Installation and Wiring in the CP1E CPU Unit Hardware Users Manual (Cat. No. W479).
4. I/O Allocations
Allocations for built-in I/O on the CPU Unit are predetermined and memory is allocated automatically
to Expansion I/O Units and Expansion Units, so the user does not have to do anything.
Refer to Section 6 I/O Allocation in the CP1E CPU Unit Software Users Manual (Cat. No. W480).
5. Software Setup
Make the PLC software settings.
With a CP1E CPU Unit, all you have to do is set the PLC Setup.
When using an E-type CPU Unit or when using an N/NA-type CPU Unit without a Battery, be sure to
consider selecting the Clear retained memory area (HR/DM/CNT) Check Box in the Startup Data
Read Area in the PLC Settings.
Refer to 3-2-4 Initializing I/O Memory at Startup, Section 7 PLC Setup in the CP1E CPU Unit Software
Users Manual (Cat. No. W480).
7. Checking Operation
Check the I/O wiring and the Auxiliary Area settings, and perform trial operation.
The CX-Programmer can be used for monitoring and debugging.
Refer to Section 8 Overview and Allocation of Built-in Functions.
The internal memory in the CPU Unit consists of built-in RAM and built-in EEPROM. The built-in RAM is
used as execution memory and the built-in EEPROM is used as backup memory.
CPU Unit
Automatic backup
User Program Area
User Program Area
(Backup) Read at startup
Area where data is backed up
even if the power supply is
interrupted for longer than the
Automatic backup back-up time of the built-in
PLC Setup PLC Setup capacitor. *
Read at startup
Built-in RAM
The built-in RAM is the execution memory for the CPU Unit.
The user programs, PLC Setup, and I/O memory are stored in the built-in RAM.
The data is unstable when the power is interrupted.
If a CP1W-BAT01 Battery (sold separately) is mounted to an N/NA-type CPU Unit, the data is backed
up by the Battery.
The user programs and parameters are backed up to the built-in EEPROM, so they are not lost.
Built-in EEPROM
The built-in EEPROM is the backup memory for user programs, PLC Setup, and Data Memory backed
up using control bits in the Auxiliary Area.
Data is retained even if the power supply is interrupted. Only the Data Memory Area words that have
been backed up using the Auxiliary Area control bits are backed up (Refer to 16-3 DM Backup Func-
tion). All data in all other words and areas is not backed up.
Built-in Built-in
Memory area and stored data Details
RAM EEPROM
User-created Programs
User Program Area
Parameter Area
PLC Memory
2-1-4 Backup
The CPU Unit will access the backup memory in the following process.
The program or PLC Setup are transferred from the CX-Programmer.
The program is changed during online editing.
DM backup is operated by the Auxiliary Area.
During these processes, BKUP LED will light, indicating that the CX-Programmer is being backed up.
Overhead processing
(self-diagnosis)
Change in status
after all instructions
I/O memory have been executed Inputs
Program execution
Access 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 Exchange
0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0
CPU Unit 1 1 0 1 1 0 0 0 1 1 0 0 1 0 1 0
processing 0 0 1 1 1 0 1 0 1 0 1 1 1 0 1 1
cycle 1 0 1 0 1 0 0 1 1 0 0 0 1 1 0 1
Outputs
I/O refreshing
Refreshes external devices at this timing
Peripheral servicing
I/O Refresh
Data to and from external devices, such as sensors and switches, directly connected to the built-in I/O
terminals and expansion I/O terminals, is exchanged with data in the I/O memory of the PLC. This pro-
cess of data exchange is called the I/O refresh.
Peripheral Servicing
Peripheral servicing is used to communicate with devices connected to the communications port or for
exchanging data with the CX-Programmer.
Cycle Time
The cycle time is the time between one I/O refresh and the next. The cycle time can be determined
beforehand for SYSMAC PLCs.
Additional Information
The average cycle time during operation will be displayed in the status bar on the bottom right of
the Ladder Program Window on the CX-Programmer.
3
3-1-2 CPU Unit Operating Modes
PROGRAM mode: The programs are not executed in PROGRAM mode.This mode is used for the initial
settings in PLC Setup, transferring ladder programs, checking ladder programs, and
making prepartions for executing ladder programs such as force-setting/resetting bits.
MONITOR mode: In this mode, it is possible to perform online editing, force-set/reset bits, and change
I/O memory present values while the ladder programs are being executed. Adjust-
ments during trial operation are also made in this mode.
RUN mode: This is the mode in which the ladder program is executed. Some operations are dis-
abled during this mode. It is the startup mode at initial value when the CPU Unit is
turned ON.
Other areas in the I/O memory (including Holding Area data, Counter PVs,
PLC Setup
PLC Setup
Backing Up Memory
Ladder programs and PLC Setup are backed up to the built-in EEPROM backup memory by trans-
ferring them from the CX-Programmer or writing them using online editing.
Restoring Memory
Ladder programs and PLC Setup are automatically transferred from the built-in EEPROM backup
memory to the RAM memory when power is turned ON again or at startup.
* The values will be cleared to all zeros at startup if the Clear retained memory area (HR/DM/CNT) Check Box is
selected in the PLC Settings.
40 hours
CP1E N/NA-type CPU Unit
without a battery
25 hours
20 hours 3
9 hours
7 hours
The following areas are unstable when power is interrupted for longer than the I/O memory backup
times given above.
DM Area (D) (excluding words backed up to the EEPROM using the DM backup function)
Holding Area (H)
Counter PVs and Completion Flags (C)
Auxiliary Area related to clock function (A)
Additional Information
Words in the Auxiliary Area related to clock function are unstable. Others are cleared to default
values.
Power interruption time CPU Unit
Note If the Restore D0- from backup memory Check Box is selected, only the specified words in the DM Area will
be restored from the built-in EEPROM backup memory when the power supply is turned ON.
4-1 Programming
Programming Languages
Programs can be written using only ladder programs.
It is possible to check the program size by selecting Program - Memory View in the CX-Programmer.
4-1 Programming
The size of a ladder instruction depends on the specific instruction and operands that are used.
E
C E
R2
There is no limit to the number of input conditions that can be connected in series or in parallel on
the rungs.
0.00 0.05
TIM
0000
#100
102.00
102.00
102.00
A rung error will occur if the instruction shown below is made to directly connect to the bus bar
without an input condition.
OUT instructions, timers, counters, and other output instructions cannot be connected directly to
the left bus bar.
If one of these instructions is connected directly to the left bus bar, a rung error will occur and pro-
gram transfer will be impossible.
MOV
A location error will occur if an instruction is not connected directly to the right bus bar.
An input condition cannot be inserted after an OUT instruction or other output instruction. The
input condition must be inserted before an OUT instruction or other output instruction. If it is
inserted after an output instruction, then a location error will occur during the program check in the
CX-Programmer.
0.01 102.01
4-1 Programming
A warning will occur if the same output bit is used more than once in an OUT instruction.
One output bit can be used in one instruction only. Instructions in a ladder program are executed
in order from the top rung in each cycle. The result of an OUT instruction in a lower rung will be
eventually saved in the output bit. The results of any previous instructions controlling the same bit
will be overwritten and not output.
Output bit CIO 100.00
4
Output bit CIO 100.00
Symbols
I/O memory area addresses or constants can be specified by using character strings registered as symbols.
The symbols are registered in the symbol table of the CX-Programmer.
Programming with symbols enables programming with names without being aware of the addresses.
The symbol table is saved in the CX-Programmer project file (.CXP) along with other parameters, such
as the user programs.
Symbol Types
There are two types of symbols that can be used in programs.
Global Symbols
Global symbols can be accessed from all ladder programs in the PLC.
Local Symbols
Local symbols can be accessed from only one task. They are assigned to individual tasks.
4
Note Global and local indicate only the applicable scope of the symbol.
Additional Information
In programs in the CX-Programmer, global symbols and local symbols can be identified by the
following character colors and symbol icons.
Classification Display color Example (default color)
Global symbols Black (default) Start
3.00
W0.00
Select Tools - Options, and select Local Symbols or Global Symbols in Appearance to change
the color.
Structure of Instructions
Programs consist of instructions. The conceptual structure of the inputs to and outputs from an instruc-
tion is shown in the following diagram.
Power flow (P.F., execution condition) Power flow (P.F., execution condition)*1
Instruction condition Instruction Instruction condition*2
Flags Flag
*1: Input instructions only.
*2: Not output for all instructions.
Operands Operands
(sources) (destinations)
I/O memory
Power Flow
The power flow is the execution condition that is used to control the execution and instructions when
programs are executing normally. In a ladder program, power flow represents the status of the exe-
cution condition.
Input Instructions
Load instructions indicate a logical start and outputs the execution condition.
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.
Outputs the execution
condition.
=
D0
#1215
Output Instructions
Output instructions execute all functions, using the power flow as an execution condition.
LD power flow
Power flow for
output instruction
4-3-2 Operands
Operands specify preset instruction parameters that are used to specify I/O memory area contents or
constants. Operands are given in boxes in the ladder programs.
Addresses and constants are entered for the operands to enable executing the instructions.
Operands are classified as source, destination, or number operands.
MOV SBS
Operand
Operand type Description
symbol
Source oper- Specifies the address of S Source oper- Source operand other than control
and the data to be read or a and data (C) 4
constant. C Control data Compound data in a source operand
that has different meanings depend-
4-3-2 Operands
ing on bit status.
Destination Specifies the address D
operand where data will be writ-
(results) ten.
Number Specifies a particular N With numbers, it is not possible to specify an address
number used in the for indirect specification (except for jump instruction
instruction, such as a numbers).
subroutine number.
Operands are also called the first operand, second operand, and so on, starting from the top of the
instruction.
MOV
#0 First operand
D0 Second operand
Example:
! @ MOV
Instruction (mnemonic)
Differentiation variation
Non-differentiated Instructions
Non-differentiated Example:
Output instructions MOV
executed every cycle
Input-differentiated Instructions
Example: 1.02
@ Upwardly
differentiated @MOV
instruction
Example: 1.02
% Downwardly
differentiated %SET
instruction
Specifying Addresses
Application
Operand Description Example
examples
Specifying The word address and bit number are speci- 1 . 02 1.02
bit fied directly to specify a bit.
addresses Bit number 02
.
Bit number Word address CIO 1
(00 to 15)
Word address
Application
Operand Description Example
examples
Specifying An offset from the beginning of the DM Area @D300
MOV #0001 @D300
indirect DM is specified. The contents of the address will
addresses in be treated as binary data (E-type CPU Unit
&256 decimal Contents
Binary Mode 0000 to 2047, N/NA-type CPU Unit 0000 to
8191) to specify the word address in DM (#0100 hexadecimal)
Area.
Add the @ symbol at the front to specify an Specify D00256
Add @
Specifying An offset from the beginning of the DM Area * D200 MOV #0001 *D200
indirect DM is specified. The contents of the address will
Addresses be treated as BCD data (E-type CPU Unit Contents
#0100
in BCD 0000 to 2047, N/NA-type CPU Unit 0000 to
Mode 8191) to specify the word address in the DM
Area. Specify D100
Add an asterisk (*) at the front to specify an
indirect address in BCD Mode.
Add *
4
Note For Timer Completion Flags and Counter Completion Flags, there is no distinction between word addresses and bit
Signed 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Negative: Negative:
binary -1 to #8000 to
Binary: 215 214 213 212 211 210 29 28 27 26 25 24 23 22 21 20 - 32768 #FFFF
Hexadecimal: 23 22 21 20 23 22 21 20 23 22 21 20 23 22 21 20
Decimal: -32768 16384 8192 4096 2048 1024 512 256 128 64 32 16 8 4 2 1 Positive: Positive:
0 to 32767 #0000 to
Sign bit: #7FFF
1:Negative, 0:Non-negative
The data is treated as 16-bit signed binary data using the leftmost bit as the
sign bit. The value is expressed in 4-digit hexadecimal.
Positive numbers: If the leftmost bit is OFF, it indicates a non-negative value.
For 4-digit hexadecimal, the value will be 0000 to 7FFF hex.
Negative numbers: If the leftmost bit is ON, it indicates a negative value. For 4-
digit hexadecimal, the value be 8000 to FFFF hex. It will be expressed as the
2s complement of the absolute value of the negative value (decimal).
4-digit
Decimal
Type Data format hexadeci-
equivalent
mal
BCD (binary 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
#0 to #9999 #0000 to
coded deci- #9999
mal) BCD 23 22 21 20 23 22 21 20 23 22 21 20 23 22 21 20
Decimal 0 to 9 0 to 9 0 to 9 0 to 9
Single-preci- 31 30 29 23 22 21 20 19 2 1 0
*
sion floating-
point decimal
sign Exponent
Value = (-1) 1.[Mantissa] 2
Sign bit (bit 31): 1: Negative, 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.
This format conforms to the IEEE 754 standard for single-precision floating-
point data. It is used only with instructions that convert or calculate floating-
point data.
Input using operands in the CX-Programmer as signed decimal or 32-bit
hexadecimal with the # symbol.
When inputting operands in the I/O Memory Edit/Monitor Window of the CX-
Programmer as signed decimal values with seven digits or less, the value will
be automatically converted to scientific notation (mantissa 10Exponent) for
setting and monitoring. Inputs must be made using scientific notation for val-
ues with eight or more digits.
Example: When -1234.00 is input, it will become -1.234000e+003 in scientific
notation. For the mantissa10Exponent, the value before the e is the man-
tissa and the value after the e is the signed exponent.
* Data range for single-precision floating-point decimal: -3.402823 1038 Value -1.175494 10-38, 0, +1.175494
10-38 Value 3.402823 1038
Cyclic Refreshing
Start
15 0
LD1.01 CIO 0001
16-bit increments
15 0
OUT2.09 CIO 0002
END
All actual I/O data
4
Cyclic refreshing
(batch)
Execute an instruction with the immediate refresh variation or an IORF instruction to perform I/O
refreshing while ladder programming is being executed.
Immediate Refresh
The method of specifying immediate refreshing depends on whether the object to be refreshed is built-
in I/O or an Expansion Unit.
To specify immediate refreshing for the CPU Units built-in I/O, specify the immediate refresh variation
(!) of the instruction.
To specify immediate refreshing for Expansion I/O or an Expansion Unit, use the IORF instruction.
Instructions with Refresh Variation (!)
Add an exclamation mark (!) in front of the instruction to specify immediate refreshing.
I/O will be refreshed as shown below when an instruction is executing if a real I/O bit in the CPU
Units built-in I/O is specified as an operand.
Bit Operands: I/O refreshing for the bit will be performed.
Word Operands: I/O refreshing for the 16 specified bits will be performed.
Input or Source Operands: Inputs are refreshed immediately before the instruction is executed.
Output or Destination Operands: Outputs are refreshed immediately after the instruction is executed.
IORF(097) Instruction
An I/O refresh (IORF) instruction is supported as a special instruction to refresh actual I/O data in
the specified word range. By using this instruction, it is possible to refresh all data or data in a spec-
ified range of actual I/O in CP-series Expansion I/O and Expansion Unit during the cycle.
IORF instruction can also refresh actual I/O data in an NA-type CPU Unit at CIO 90, CIO 91 and CIO 190.
4-4 Constants
Overview
Constants are numeric values expressed in 16 or 32 bits and can be specified as instruction operands.
The following types of constants are supported.
Bit Strings or Numeric Values (Integers)
Decimal values (with & symbol), hexadecimal values (with # symbol), BCD values (with # symbol), or
signed decimal values (with + or - symbol)
Operands Specifying Numbers
Decimal Notation (No Symbol)
Floating Point (Real Number) Notation
Signed decimal notation (with + or - symbol and decimal point)
Unsigned Binary
Data type Decimal values Hexadecimal values
Notation With & symbol With # symbol
& 10 # 000A
Signed Binary
Data type Decimal values Hexadecimal values
Notation Signed + or - With # symbol
- 10 # FFF6
4-4 Constants
address will be specified if a decimal including A to F is input without # from the
value without + or - is input from the CX- CX-Programmer.
Programmer. The input will be treated as an address in the
CIO Area and the contents of that address
will be specified if a decimal value without #
is input from the CX-Programmer.
Range 16 bits Negative: -32768 to -1 Negative: #8000 to #FFFF 4
Positive: 0 to +32767 Positive: #0000 to #7FFF
32 bits Negative: -2147483648 to -1 Negative: #80000000 to #FFFFFFFF
Positive: 0 to +2147483647 Positive: #00000000 to #7FFFFFFF
Unsigned BCD
Data type Decimal values BCD values
Notation None # 0010
Decimal value using
0 to 9
BCD symbol
Application +B #0010 D0 D1
example Adds #0010 and the contents of D0 as BCD data
and stores the result in D1.
Precautions for The input will be treated as an address in the CIO
correct use Area and the contents of that address will be
specified if a decimal value without # is input from
the CX-Programmer.
Range 16 bits None #0000 to #9999
32 bits #0000 0000 to #99999999
Application SBS 0
example Jumps to subroutine 0.
Precautions for An error will occur and the left bus bar
correct use will be displayed in red if a decimal
value is input with & from the CX-Pro-
grammer.
Additional Information
4-5-1 Overview
0.00[W0]
MOV
4-5-1 Overview
Bit Addresses
The bit address is offset by the amount specified by n (number of bits) from A (start bit address).
A [n]
Offset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word
Starting bit address A
Offset
The offset can be specified as a decimal constant, word address (but CIO Area addresses cannot
be specified), or a one-word symbol (i.e., symbols with the following data types: INT, UINT, WORD,
CHANNEL).
Words in the Auxiliary Area (A) can only be specified as a decimal constant.
If a word address is specified, the contents of the specified word is used as the offset.
If the offset exceeds bit 15 in the specified word, offsetting will continue from bit 00 in the next word.
If the offset is specified indirectly, make sure that the final bit address does not exceed the upper
limit of the memory area by using input comparison or other instruction.
Examples:
Word Addresses
The word address is offset by the amount specified by n (number of offset words) from A (start word
address).
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
A [n] Word
Start word address A
Offset +n
Offset
The offset can be specified as a decimal constant, word address (but CIO Area addresses cannot
be specified), or one-word symbol (i.e., symbols with the following data types: INT, UINT, WORD,
CHANNEL).
If a word address or symbol is specified, the contents of the specified word is used as the offset.
If the offset exceeds bit 15 in the specified word, offsetting will continue from bit 00 in the next word.
If the offset is specified indirectly, make sure that the final bit address does not exceed the upper
limit of the memory area by using input comparison or other instruction.
Examples:
D0[2] D2 a [2] D2
Caution
Program so that the memory area of the start address is not exceeded when using a
word address or symbol for the offset.
For example, write the program so that processing is executed only when the indirect
Set the value of W0 to the offset word (W1) using the MOV instruction.
Use the operand of the addition instruction to specify and execute D0[W1] +
D100[W1] = D200[W1]. Repeat this process
Increment W1 to increase the offset. 100 times.
Each process is performed with an input comparison instruction (<) as the execution condition so
that W1 does not exceed &100 to make sure that the upper limit of the indirect addressing range is
not exceeded.
Execution condition
a
For CP1E CPU Units, programs have special program sections that will control instruction conditions.
The following special program sections are available.
Instruction
Program sections Instructions Status
conditions
Subroutine sections SBS, SBN, and RET instruc- Subroutine program The subroutine program
tions is executed. section between SBN and
RET instructions is exe-
cuted.
IL-ILC sections IL and ILC instructions During IL The output bits are turned
Step ladder sections STEP instructions OFF and timers are reset.
Other instructions will not be
executed and previous sta-
tus will be maintained.
FOR-NEXT sections FOR and NEXT instructions Break in progress. Looping
Instruction Combinations
The following table shows which of the special instructions can be used inside other program sections.
MILH and
Subroutine IL-ILC Step ladder FOR-NEXT
MILR-MILC
sections sections sections sections
sections
Subroutine sections No No No No No
IL-ILC sections Yes No No No Yes
MILH and MILR-MILC sections Yes No Yes No Yes
Step ladder sections No Yes Yes No No
FOR-NEXT sections Yes Yes Yes No Yes
Subroutines
Place all the subroutines together just after all of the main program and before the END instruction.
A subroutine cannot be placed in a step ladder, block program, or FOR-NEXT section.
If instructions other than those in a subroutine are placed after a subroutine (SBN to RET), those
instructions will not be executed.
Program
Subroutines
Note 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 condition is ON.
System Areas
DM Area (D)
Counter Area (C)
Condition Flags
Holding Area (H)
Clock Pulses
User Areas
These areas can be used freely by the user.
System Areas
System Areas contain bits and words with preassigned functions.
Condition Flags
The Condition Flags include the flags that indicate the results of instruction execution, as well as the
Always ON and Always OFF Flags.
The Condition Flags are specified with global symbols rather than with addresses. For example: P_on
Clock Pulses
The Clock Pulses are turned ON and OFF by the CPU Units internal timer.
The Clock Pulses are specified with global symbols rather than with addresses. For example: P_0_02
Word Addresses
Specifies a16-bit word.
W 1 0 0
Bit Addresses
A bit addresses specifies one of the 16 bits in a word.
The word number and bit number are separated with a period.
W 1 0 0 . 0 2 5
I/O memory Word number Period Bit number
area designator (00 to 15)
0 . 0 3
IN C 1 3 5 7 9 11
CIO 0 0 2 4 6 8 10
Inputs begin from CIO 0 Period Bit number
Outputs begin from CIO 100 (00 to 15)
Overview
These words are allocated to built-in I/O terminals of CP1E CPU Units, built-in analog I/O terminals of
CP1E NA-type CPU Units and CP-series Expansion Units and Expansion I/O Units.
Notation
0 . 02
Bit number: 02
Word number: 0
Range
Input bits: CIO 0.00 to CIO 99.15 (100 words) 5
Output bits: CIO 100.00 to CIO 199.15 (100 words)
Applications
Built-in inputs can be used as basic inputs, interrupt inputs, quick-response inputs or high-speed
counters.
Built-in outputs can only be used as basic outputs.
Refer to Section 8 Overview of Built-in Functions and Allocations for details.
Details
Bits in the CIO Area can be force-set and force-reset.
The contents of the CIO Area will be cleared in the following cases:
When the operating mode is changed between PROGRAM or MONITOR mode and RUN mode
When the PLC power is reset
When the CIO Area is cleared from the CX-Programmer
When PLC operation is stopped due to a fatal error other than an FALS error occurs. (The con-
tents of the CIO Area will be retained when FALS is executed.)
Additional Information
Words that are not allocated to the built-in I/O terminals of the CPU Units, built-in analog I/O ter-
minals of CP1E NA-type CPU Units and the Expansion Units and Expansion I/O Units can only
be used in programming. It is the same as the Work Area.
Notation
W 20 . 02
Bit number: 02
Word number: 20
Range
The Work Area contains 100 words with addresses ranging from W0 to W99.
Applications
It is sometimes necessary to use the same set of input conditions many times in the same program. In
this case a work bit can be used to store the final condition to simplify programming work and program
design.
W10.0
W10.0
NO bit
W10.0
NC bit
Details
Bits in the Work Area can be force-set and force-reset.
The contents of the Work Area will be cleared in the following cases:
When the operating mode is changed between PROGRAM or MONITOR mode and RUN mode
When the PLC power is reset
When the Work Area is cleared from the CX-Programmer
When PLC operation is stopped due to a fatal error other than an FALS error occurs. (The con-
tents of the Work Area will be retained when FALS is executed.)
Notation 5
H 20 . 02
Bit number: 02
Word number: 20
Range
The Holding area contains 50 words with addresses ranging from H0 to H49.
Applications
The Holding Area is used when you want to resume operation after a power interruption using the same
status as before the power interruption.
Details
Bits in the Holding Area can be force-set and force-reset.
When a self-maintaining bit is programmed with a Holding Area bit, the self-maintaining bit will not be
cleared even when the power is reset.
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.
H0.00
H0.00
If a Holding Area bit is used but not programmed as a self-maintaining bit, the bit will be turned OFF
by execution condition A when the power is reset.
A H0.00
A B
Set
KEEP
Input Unit
H1.00
Bad ~ A
Reset
A B
Set
KEEP
H1.00
Input Unit
OK ~ A
Reset
Overview
This data area is used for general data storage and manipulation and is accessible only by word (16
bits).
These words retain their contents when the PLC is turned ON or the operating mode is switched
between PROGRAM mode and RUN or MONITOR mode.
Some words in the DM Area can be saved to the built-in EEPROM backup memory using Auxiliary Area
bits. These words are specifically referred to as the backed up words in the DM Area.
Notation
D 200
Range
E-type CPU Units have DM Area addresses ranging from D0 to D2047.
Of these, D0 to D1499 can be backed up in backup memory (built-in EEPROM).
N/NA-type CPU Units have DM Area addresses ranging from D0 to D8191.
Of these, D0 to D6999 can be backed up in backup memory (built-in EEPROM).
Applications
The DM Area is for storing numeric data. It can be used for data exchange with Programmable Termi-
nals, serial communications devices, such as Inverters, and Analog I/O Units or Temperature I/O Units.
Details
Bits in the DM Area cannot be addressed individually.
Backing Up to the Built-in EEPROM Backup Memory
The number of words set in the PLC Setup can be saved to the built-in EEPROM backup memory
during operation by turning ON the DM Backup Start bit (A751.15).
Specify in the PLC Setup whether to read the data in the DM Area words to the RAM as the initial
values when the power supply is turned ON.
Refer to 16-3 DM Backup Function for how to use DM Area words and bits.
Overview
The Timer Area contains Timer Completion Flags (1 bit each) and timer PVs (16 bits each). The Com-
pletion Flag is turned ON when a decrementing timer PV reaches 0 (counting out) or an increment-
ing/decrementing timer PV reaches the set value or 0.
Notation
T 002
Range
Timer numbers range from T0 to T255.
5
Details
Types of Timers
The following table shows which instructions are used to refresh timer PVs in BCD and binary mode.
Timer instruction BCD mode Binary mode
HUNDRED-MS TIMER TIM TIMX
TEN-MS TIMER TIMH TIMHX
ONE-MS TIMER TMHH TMHHX
ACCUMULATIVE TIMER TTIM TTIMX
#10
Binary mode
#A or &10
*1 If the IOM Hold Bit (A500.12) is ON, the PV and Completion Flag will be retained when a fatal error occurs
(including execution of FALS instructions) or the operating mode is changed from PROGRAM mode to
RUN or MONITOR mode or vice-versa. (The PV and Completion Flag will be cleared when power is
cycled.)
*2 Since the TIML/TIMLX instructions do not use timer numbers, they are reset under different conditions.
The PV for a TIML/TIMLX instruction is reset to the SV.
Refer to the descriptions of these instructions for details.
Overview
The Counter Area contains Completion Flags (1 bit each) and counter PVs (16 bits each). A Comple-
tion Flag is turned ON when the counter PV reaches the set value (counting out).
Notation
5
C 002
Range
Counter numbers range from C0 to C255.
.
Details
Types of Counters
The following table shows which instructions are used to refresh counter PVs in BCD and binary
mode.
Counter instruction BCD mode Binary mode
COUNTER CNT CNTX
REVERSIBLE COUNTER CNTR CNTRX
Binary mode
Overview
Notation
A 20. 02
Bit number: 02
Word number: 20
Range
The Auxiliary Area contains 754 words with addresses ranging from A0 to A753.
Applications
Applications of the bits and words in the Auxiliary Area are predefined. Ladder programs can be simpli-
fied and controllability can be improved by effectively using the bits and words in this area.
Details
Some words or bits are set automatically by the system and others are set and manipulated by the
user.
The Auxiliary Area includes error flags set by self-diagnosis, initial settings, control bits, and status
data.
Words and bits in this area can be read and written from the program or the CX-Programmer.
The Auxiliary Area contains words that are read-only (A0 to A447) and words that can be read and
written (A448 to A753).
Even the read/write bits in the Auxiliary Area cannot be force-set and force-reset continuously.
Overview
These flags include the flags that indicate the results of instruction execution, as well as the Always ON
and Always OFF Flags. These bits are specified with symbols rather than addresses.
The CX-Programmer treats condition flags as system-defined symbols (global symbols) beginning with P_.
Notation
P_ ER
Details
The Condition Flags are read-only; they cannot be written from instructions or from the CX-Program-
mer. 5
The Condition Flags cannot be force-set and force-reset.
Name in CX-
Name Function
Programmer
Less Than Flag P_LT Turned ON when the first operand of a Comparison Instruction is less
than the second or a value is below a specified range.
Negative Flag P_N Turned ON when the most significant bit of a result is ON.
Overflow Flag P_OF Turned ON when the result of calculation overflows the capacity of the
result word(s).
Underflow Flag P_UF Turned ON when the result of calculation underflows the capacity of
the result word(s).
Greater Than or P_GE Turned ON when the first operand of a Comparison Instruction is
Equals Flag greater than or equal to the second.
Not Equal Flag P_NE Turned ON when the two operands of a Comparison Instruction are
not equal.
Less than or Equals P_LE Turned ON when the first operand of a Comparison Instruction is less
Flag than or equal to the second.
Instruction B
Overview
The Clock Pulses are turned ON and OFF by the CPU Units internal timer. These bits are specified
with symbols rather than addresses.
The CX-Programmer treats condition flags as system-defined symbols (global symbols) beginning with P_.
Notation
P_ 0_02s
Details
The Clock Pulses are read-only; they cannot be written from instructions or from the CX-Programmer. 5
Clock Pulses
Name in CX-
Name Description
Programmer
0.02-s Clock Pulse P_0_02s 0.01s ON for 0.01 s
OFF for 0.01 s
0.01s
0.05s
0.1s
0.5s
30s
Allocated 12 bits
Allocated 12 bits in the next word
00 to 11 00 to 11
00 to 07 00 to 07
C 1 3 5 7 9 11 C 1 3 5 7 9 11
Inputs
0 2 4 6 8 10 0 2 4 6 8 10
0 1 2 4 5 7 0 1 2 4 5 7
Outputs
C C C 3 c 6 C C C 3 c 6
Bit 02 in CIO 101
100CH (CIO 100) Bit 03 in CIO 100 101CH
(CIO 101)
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
Input Bits CIO 0 Input bits: 24
Cannot be used
CIO 1
CIO 100
Output Bits Cannot be used Output bits: 16
CIO 101
For a CPU Unit with 40 I/O points, a total of 24 input bits are allocated to the input terminal block. The
bits that are allocated are input bits CIO 0.00 to CIO 0.11 (i.e., bits 00 to 11 in CIO 0) and input bits CIO
1.00 to CIO 1.11 (i.e., bits 00 to 11 in CIO 1).
In addition, a total of 16 output bits are allocated to the output terminal block. The bits that are allocated
are output bits CIO 100.00 to CIO 100.07 (i.e., bits 00 to 07 in CIO 0) and output bits CIO 101.00 to CIO
101.07 (i.e., bits 00 to 07 in CIO 1).
bit 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
Input bits CIO m
Cannot be used
CIO m+1
CIO n
Two input words (24 bits) and two output words (16 bits) are allocated to a 40-point I/O Unit.
Allocation Example: CPU Unit with 40 I/O Points + Temperature Senser Unit
(TS002) + Analog Output Unit (DA041) + Expansion I/O Unit with 40 I/O points
1st Unit: 2nd Unit: 3rd Unit:
CPU Unit with 40 I/O Points CP1W-TS002 CP1W-DA041 Expansion I/O Unit with 40
Temperature Sensor Unit Analog Output Unit I/O Points
Input bits CIO 0.00 to CIO 0.11 CIO 6.00 to CIO 6.11
CIO 2 to CIO 5 None
CIO 1.00 to CIO 1.11 CIO 7.00 to CIO 7.11
24 inputs 24 inputs
TS002 DA041
16 outputs 16 outputs
Output bits CIO 100.00 to CIO 100.07 CIO 106.00 to CIO 106.07
None CIO 102 to CIO 105
CIO 101.00 to CIO 101.07 CIO 107.00 to CIO 107.07
bit 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
CIO 0
Cannot be used CPU Unit with 40 I/O Points
CIO 1
CIO 2
CIO 3 Temperature Sensor Unit
Input bits
CIO 4
CIO 5
CIO 6 Cannot be used Expansion I/O Unit with 40 I/O Points
CIO 7
CIO 100
Cannot be used CPU Unit with 40 I/O Points
CIO 101
CIO 102
Output bits CIO 103
Analog Output Unit
CIO 104
CIO 105
CIO 106
Cannot be used Expansion I/O Unit with 40 I/O Points
CIO 107
PLC Setup
PLC Setup
Input Constants
When setting is read by
Name Default Possible settings
CPU Unit
1 0CH: CIO 0 8 ms No filter (0 ms) When power is turned ON
1 ms
2 ms
4 ms
8 ms
16 ms
32 ms
2 1CH: CIO 1 Same as above. Same as above. Same as above.
3 2CH: CIO 2
4 3CH: CIO 3
5 4CH: CIO 4
6 5CH: CIO 5
7 6CH: CIO 6
8 7CH: CIO 7
9 8CH: CIO 8
10 9CH: CIO 9
11 10CH: CIO 10
12 11CH: CIO 11
13 12CH: CIO 12
14 13CH: CIO 13
15 14CH: CIO 14
16 15CH: CIO 15
17 16CH: CIO 16
18 17CH: CIO 17
Note The input constants of CP1W-40EDR/EDT/EDT1 are always 16ms regardless of the settings.
Communications Settings
When setting is read by
Name Default Possible settings
CPU Unit
1 Communications Settings Standard (9,600; Standard When power is turned ON
1, 7, 2, E) Baud rate: 9,600 bps
(Default settings) Start bits: 1 bit
Data length: 7 bits
Parity: Even
Stop bits: 2 bits
Host Link
Custom
2 Mode Host Link Host Link When power is turned ON
(When custom settings have been selected.) NT Link (1:N): 1:N NT Links
Communications Settings
When setting is read by
Name Default Possible settings
CPU Unit
1 Communications Settings Standard (9600; Standard When power is turned ON
1, 7, 2, E) Baud rate: 9,600 bps
(Default settings)
Start bits: 1 bit
Data length: 7 bits
Parity: Even
Stop bits: 2 bits
Custom
2 Mode Host Link Host Link When power is turned ON
NT Link (1:N): 1:N NT Links
RS-232C (No-protocol)
PC Link (Slave)
PC Link (Master)
Modbus-RTU Easy Master
2-1 Host Link Settings
2-1-1 Baud 9,600 bps 1,200 bps When power is turned ON
2,400 bps
4,800 bps
9,600 bps
19,200 bps
38,400 bps
57,600 bps
115,200 bps
2-1-2 Format 7 bits, 2 bits, even 7 bits, 2 bits, even When power is turned ON
(data length, stop bits, par-
7 bits, 2 bits, odd
ity)
7 bits, 2 bits, no parity
7 bits, 1 bit, even
7 bits, 1 bit, odd
7 bits, 1 bit, no parity
8 bits, 2 bits, even
8 bits, 2 bits, odd
8 bits, 2 bits, no parity
8 bits, 1 bit, even
8 bits, 1 bit, odd
8 bits, 1 bit, no parity
2-1-3 Unit Number 0 0 When power is turned ON
:
31
2-2 NT Link (1:N) Settings
2-2-1 Baud 115,200 bps 38,400 bps (standard) When power is turned ON
115,200 bps (high speed)
2-2-2 No. NT/PC Link Max. 1 0 When power is turned ON
(Highest unit number of PT
:
that can be connected to
the PLC) 7
Base Settings
When setting is read by
Name Default Possible settings
CPU Unit
1 Undefined Origin (operation for limit signal Hold Hold At start of operation
turning ON)
Undefined
2 Limit Input Signal Operation Search Only Search Only When power is turned ON
Always
3 Limit Input Signal NC NC At start of operation
NO
4 Search/Return Initial Speed 0 pps 0 pps At start of operation
:
100,000 pps
1 1-11 Origin Search Deceleration Ratio 0 (disabled) 1 (pulse/4 ms) At start of operation
(Rate)
:
65,535 (pulse/4 ms)
1-12 Positioning Monitor Time 0 (ms) 0 (ms) At start of operation
:
9,999 (ms)
Base Settings
When setting is read by
Name Default Possible settings
CPU Unit
1 Undefined Origin Hold Hold At start of operation
(operation for limit signal turning ON) Undefined
2 Limit Input Signal Operation Search Only Search Only When power is turned ON
Always
3 Limit Input Signal NC NC At start of operation
NO
4 Search/Return Initial Speed 0 pps 0 pps At start of operation
:
100,000 pps
6 Start Operation
Start the CP1E CPU Unit operation.
A CP1E CPU Unit uses the same built-in I/O terminals for different functions. Allocate the I/O terminals
in advance, making sure that each terminal is used for only one function.
Specify the input functions in the PLC Setup from the CX-Programmer, and specify the output functions
in PLC Setup and programming instructions.
The input and output terminals used by the origin search function can be enabled by selecting the
Use define origin operation Check Box on a Pulse Output Tab Page.
Input terminals are allocated functions by setting parameters in the PLC Setup. Set the PLC Setup so
that each terminal is used for only one function.
Note 1 The same pulse inputs must be used for high-speed counter 0 and high-speed counter 1.
2 High-speed counter 2 cannot be used if the input setting of high-speed counter 0 or high-speed counter 1
is set for differential phase inputs (4), pulse + direction inputs, or up/down pulse inputs.
Variable-duty-fac-
Terminal Terminal Fixed duty ratio pulse output
Normal outputs tor output
block label number
Pulse + Direction Mode Use PWM output
CIO 100 00 Normal output 0 Pulse output 0, pulse
01 Normal output 1 Pulse output 1, pulse PWM output 0
02 Normal output 2 Pulse output 0, direction
03 Normal output 3 Pulse output 1, direction
04 Normal output 4 Pulse 0, Error counter reset
output
05 Normal output 5 Pulse 1, Error counter reset
output
06 Normal output 6
07 Normal output 7
CIO 101 00 to 03 Normal output 8 to 11
04 to 07 Normal output 12 to 15
CIO 102 00 to 07 Normal output 16 to 23
Terminal Terminal
Normal outputs
block label number
9-1-1 Overview
The quick-response inputs can read pulses with an ON time as short as 50 s even if they are shorter
than the cycle time. Use the quick-response inputs to read signals shorter than the cycle time, such as
inputs from photomicrosensors.
I/O refresh
Cycle time
Built-in input
Input bit
Input bit
ON for one scan
in the next cycle
Cyclic tasks
(ladder programs)
Cycle time
Can read ON signals
shorter than this time.
END
I/O refresh
The pulse widths of quick-response input signals must meet the following conditions.
50s min. 50s min.
1 PLC Setup
Set IN2 to IN7 for quick-response inputs on the Built-in Input
Tab Page of the PLC Setup using the CX-Programmer.
The terminals 02 to 07 of CIO 0 can be used for quick-
response inputs. Bits CIO 0.02 to CIO 0.07 correspond to ter-
minals 02 to 07.
2 Create ladder Cyclic task or
Read the status of CIO 0.02 to CIO 0.07 using the LD instruction
or other instructions.
program interrupt task
PLC Setup
Click the Built-in Input Tab and select Quick in the interrupt input settings.
Select Quick
Note 1 The power supply must be restarted after the PLC Setup is transferred in order to validate the quick-
response input settings.
2 IN6 and IN7 are not supported by E10 CPU Units.
L1 L2/N COM 01 03 05 07 09 11
NC 00 02 04 06 08 10
CIO 0
DC Power Supply
+ - COM
NC
0.02
The minimum pulse width (ON time) that can be read for a quick-response input is 50 s.
The status of the input that is stored in the I/O memory for a short input will be cleared during the next
I/O refresh period.
10
10-1 Interrupts
10-1-1 Overview
CP1E CPU Units normally repeat processes in the following order: overseeing processes, program exe-
cution, I/O refreshing, peripheral servicing. During the program execution stage, cyclic tasks (ladder
programs) are executed.
The interrupt function, on the other hand, allows a specified condition to interrupt a cycle and execute a
specified program.
Interrupts can thus be used to perform high-speed processing that is not restricted by the cycle time.
The CP1E performs the following processing when an interrupt occurs.
(1)When an interrupt occurs, execution of the ladder programs in cyclic tasks is interrupted.
(2)The ladder program in the interrupt task is executed.
(3)When the interrupt task is finished, the ladder program that was being executed is returned to.
Cycle END
10-2-1 Overview
A corresponding interrupt task can be executed when a built-in input on the CPU Unit turns ON or turns
OFF.
Interrupt input
Built-in input
Interrupt task
Cyclic tasks
(ladder programs) Ladder program
Interrupt occurs
Cycle
END
END
I/O refreshing
Condition for
Interrupt task
10
Interrupt task
2 executed
2 executed
10-2-1 Overview
The pulse widths of interrupt input signals must meet the following conditions.
1 PLC Setup
Set IN2 to IN7 for interrupt inputs on the Built-in Input
Tab Page of the PLC Setup using the CX-Programmer.
Terminals 02 to 07 on the CIO 0 terminal block can be
used for interrupt inputs. Bits CIO 0.02 to CIO 0.07 cor-
respond to terminals 02 to 07.
PLC Setup
Click the Built-in Input Tab and select Interrupt in the interrupt intput settings.
Select Interrupt
Note 1 The power supply must be restarted after the PLC Setup is transferred in order to enable the interrupt
input settings.
2 IN6 and IN7 are not supported by E10 CPU Units.
+ - COM NC 00 02 04 06 08 10
CIO 0
NC
Interrupt input IN2: CIO 0.02
Interrupt input IN6: CIO 0.06
Interrupt input IN4: CIO 0.04
Execution condition
@MSKS (1)Specifies creating an interrupt when
N the input turns OFF or when it turns
C ON.
@MSKS (2)Enables input interrupts.
N
C
The MSKS instruction must be executed only once to make the settings, so in general execute
MSKS in just one cycle using the upwardly differentiated variation of the instruction.
The first MSKS instruction can be omitted. If it is omitted, an interrupt will be created when the input
turns ON by default.
Example
(1)Specifying Detecting ON or OFF Input Signals
For interrupt input IN2: Specify 112.
Cyclic task
Specifies an interrupt when the input turns ON.
MSKS (2)Enabling Input Interrupt CIO 0.02 turns ON
112 For interrupt input IN2: Specify 102.
#0000 Enables Input interrupt. Built-in input terminal
The specified input interrupt (here, IN2) is 01 03 05 07 09 11
MSKS enabled when the MSKS instruction is executed.
102 00 02 04 06 08 10
#0000
Interrupt CIO 0
Interrupt task 2
END
END
Sensor input
Sensor input 3 Sensor input 1 CIO 0.01
NG output 2
CIO 100.02
NG output 3
CIO 100.03
10
NG output 4
CIO 100.04
10-2-3 Application Example
1 PLC Setup
Set IN2 to Interrupt in the interrupt input settings on the Built-in Input Tab Page.
Programming Example
Cyclic Task
P_First_Cycle
0.04
Reset input
Interrupt Task 2 10
10-2-3 Application Example
OK output
Sensor input 1 Sensor input 2 Sensor input 3
NG output 2
Sensor input 1
Sensor input 1
NG output 3
Sensor input 2
Sensor input 2
NG output 4
Sensor input 3
Sensor input 3
10-3-1 Overview
Scheduled interrupts can be used to execute interrupt tasks at fixed time intervals measured by the
CPU Units internal timer.
Minimum interval: 1 ms
Specified interval
Interrupt task
Cyclic tasks
Interrupt occurs Ladder program
(ladder programs)
Cycle
END
END
I/O refresh
Condition for
accepting interrupts
MSKS instruction executed Scheduled Interrupt Interval =
to set the scheduled 0.5 ms (example)
interrupt interval
1ms 1ms 1ms
Internal timer
Interrupt task Write the program for the corresponding interrupt task 1 (fixed).
Create
ladder Execute MSKS Use MSKS to specify the scheduled interrupt interval.
program instruction in a cyclic The setting can be 1 ms or longer.
task Set N to 4 or 14 in the MSKS instruction.
Execution condition
10
@MSKS
N Specifies scheduled interrupt (interrupt task 1)
10-3-2 Flow of Operation
The MSKS instruction must be executed only once to make the settings, so in general execute
MSKS in just one cycle using the upwardly differentiated variation of the instruction.
* Either is reset.
Example
In intervals of 1 ms
Interrupt
Interrupt task 1
END
END
The priority of interrupt tasks is the same order for input interrupts, scheduled interrupts and high-speed
counter interrupts. Therefore, if interrupt task A (an input interrupt, for example) is being executed when
interrupt task B (a scheduled interrupt, for example) occurs, task A execution will not be interrupted.
Task B execution will be started when task A had been completed.
For example, if an interrupt task is being executed for another interrupt (input interrupt or high-speed
counter interrupt) when a scheduled interrupt occurs, the scheduled interrupt will not be executed until
execution of the other interrupt task had been completed. Even in this case, internal timer is continually
measured in parallel, so the execution of the scheduled interrupt task will not be delayed.
just before and after the instructions, using the DI or EI instruction before the instructions to disable
interrupts and the DI or EI instruction after the instructions to enable interrupts again.
Additional Information
Normally, if an interrupt occurs, execution of the cyclic task will be interrupted immediately, even
during execution of an instruction in the cyclic task, and the partially processed data is saved.
After the interrupt task had been completed, the cyclic task restarts with the data saved before
the interrupt processing.
High-speed Counters
This section describes the high-speed counter inputs, high-speed counter interrupts,
and the frequency measurement function.
11-1 Overview
High-speed counters can be used with any model of CP1E CPU Unit.
11-1-1 Overview
High-speed counters are used to measure high-speed pulse input signals that cannot be measured by
counter (CNT) instructions.
Applications
Detecting the position or length of a workpiece with an input from an incremental rotary encoder.
Measuring the speed of a workpiece from its position data using frequency measurement and
rotational speed conversion.
High-speed processing according to the workpieces position data.
The present value of the high-speed counter is stored in the Auxiliary Area and can be used as posi-
tion data. When it reaches preset values, interrupts can be generated. The count can be started and
stopped. Depending on the instruction, the frequency (speed) can be read from the present value of
the high-speed counter.
Changes to PV
Settings
CTBL
11-1 Overview
1 PLC Setup
Enable the required high-speed counters.
Select the Use high speed counter Check Box for high-
speed counters 0 to 5. Set the input setting, counting
mode and reset method on the Built-in Input Tab Page of
the PLC Setup using the CX-Programmer.
Terminals 00 to 06 on the CIO 0 terminal block can be 11
used for high-speed counters. High-speed counters 0 to
5 correspond to terminals 00 to 06.
PLC Setup
Click the Built-in Input Tab and select the Use high speed counter Check Box for high-speed counters
0 to 5. Set the counting mode, reset method, and input setting.
Note The power supply must be restarted after the PLC Setup is transferred in order to enable the high-speed
counter settings.
11-1 Overview
Terminal Increment Differential phase Pulse/ Interrupt Quick- Origin searches for
block Terminal
pulse input 4 or up/down direction Normal input
input response pulse outputs 0 and 1
label input input input
CIO 0 00 High-speed High-speed High-speed Normal input 0
Counter 0, Counter 0, phase A Counter 0,
increment or up input pulse input
input
01 High-speed High-speed High-speed Normal input 1
Counter 1,
increment
Counter 0, phase B Counter 1,
or down input pulse input
11
input
02 High-speed High-speed High-speed Normal input 2 Interrupt input 2 Quick-
Note 1 The same pulse input must be used for high-speed counter 0 and high-speed counter 1.
2 High-speed counter 2 cannot be used if the input setting of high-speed counter 0 or high-speed counter 1
is set for differential phase inputs (4x), pulse + direction inputs, or up/down pulse inputs.
(Do not use the same I/O power supply as other equipment.)
1
Power provided 0V Power supply
Encoder 2 24V 0V
Shielded twisted-pair cable
CP1E CPU Unit
IA
Phase A 0.00
IB 0.01
Phase B
IZ
Phase Z 0.04
COM
11-1-3 Specifications
11-1 Overview
Item Description
Pulse input method Increment pulse Differential phase Up/down pulse Pulse + direction
(Counting mode) inputs inputs (4) inputs inputs
Input signal Increment Phase-A Up pulse Pulse
Phase-B Down pulse Direction 11
Phase-Z Reset Reset
11-1-3 Specifications
Frequency N/NA-type 100 kHz: 50 kHz: 100 kHz: 100 kHz:
and number CPU Unit 2 counters, 1 counter, 1 counter, 2 counters
of high- 10 kHz: 4 counters 5 kHz: 1 counter 10 kHz: 1 counter
speed E-type CPU E10 CPU Unit: 5 kHz: 10 kHz: 10 kHz:
counters Unit 10 kHz: 5 counters 2 counters 2 counters 2 counters
E14/20/30/40
CPU Unit:
10 kHz: 6 counters
Counting mode Linear mode or circular (ring) mode
Count values Linear mode: 8000 0000 to 7FFF FFFF hex
Ring Mode: 0000 0000 to Ring SV
High-speed counter PV High-speed counter 0: A271 (upper 4 digits) and A270 (lower 4 digits)
storage locations High-speed counter 1: A273 (upper 4 digits) and A272 (lower 4 digits)
High-speed counter 2: A317 (upper 4 digits) and A316 (lower 4 digits)
High-speed counter 3: A319 (upper 4 digits) and A318 (lower 4 digits)
High-speed counter 4: A323 (upper 4 digits) and A322 (lower 4 digits)
High-speed counter 5: A325 (upper 4 digits) and A324 (lower 4 digits)
The PVs are refreshed in the overseeing processes at the start of each cycle. Use
PRV to read the most recent PVs.
Data format: 8 digit hexadecimal
Range in linear mode: 8000 0000 to 7FFF FFFF hex
Range in Ring Mode: 0000 0000 to Ring SV (Circular Max. Count)
Control Target value Up to 6 target values and corresponding interrupt task numbers can be registered.
method comparison
Range Up to 6 ranges can be registered, with a separate upper limit, lower limit, and inter-
comparison rupt task number for each range.
Counter reset method Phase-Z + Software reset
The high-speed counter is reset when the phase-Z signal goes ON while the
Reset Bit (A531.00 to A531.05) is ON. (Phase Z cannot be used for the increment
pulse.)
Software reset
The high-speed counter is reset when the Reset Bit (A531.00 to A531.05) is
turned ON.
Operation can be set to stop or continue the comparison operation when the high-
speed counter is reset.
Direction
OFFON OFF No change 11
ON OFFON Increment
ONOFF ON No change
0 1 2 3 4 5 6 7 8 7 6 5 4 3 2 1 0 OFF ONOFF No change
500s min.
Direction
Pulse
Direction
500s min.
Additional Information
The count of a high-speed counter can be monitored to see if it is currently being incremented or
decremented. The count in the current cycle is compared with the count in the previous cycle to
determine if it is being incremented or decremented.
The results are reflected in the High-speed Counter Count Direction Flags.
Address of High-speed
High-speed counter
Counter Count Direction Flag
High-speed counter 0 A274.10
High-speed counter 1 A275.10
High-speed counter 2 A320.10
High-speed counter 3 A321.10
High-speed counter 4 A326.10
High-speed counter 5* A327.10
Linear Mode
Input pulses can be counted in the range between the lower limit and upper limit values. If the pulse
count goes beyond the lower/upper limit, an underflow/overflow will occur and counting will stop.
Increment Mode
0 4294967295
(000000 Hex) (FFFFFFFF Hex)
PV overflow
Up/Down Mode
-2147483648 0 +2147483647
(80000000 Hex) (00000000 Hex) (7FFFFFFF Hex)
PV underflow PV overflow
Maximum ring
count
Phase Z
Reset bit
Note The phase-Z signal cannot be used if an incremental counter is specified. Only a software reset can be used.
Software Reset
The high-speed counters PV is reset when the corresponding High-speed Counter Reset Bit (A531.00
to A531.05) goes from OFF to ON.
The CPU Unit recognizes the OFF-to-ON transition of the High-speed Counter Reset Bit only at the begin-
ning of the PLC cycle during the overseeing processes. Reset processing is performed at the same time.
The OFF-to-ON transition will not be recognized if the Reset Bit goes OFF again within the same cycle.
One cycle
Reset bit
Additional Information
The comparison operation can be set to stop or continue when a high-speed counter is reset.
This enables applications where the comparison operation can be restarted from a counter PV of
0 when the counter is reset.
@PRV
#0010 C1: Port specifier (example for high-speed counter input 0 (fixed))
#0000 C2: Control data (for reading PV)
D100 S: First destination word
15 0
Overview
This function measures the frequency of the high-speed counter (input pulses.)
The input pulse frequency can be read by executing the PRV instruction. The measured frequency is
output in 8-digit hexadecimal and expressed in Hz. The frequency measurement function can be used 11
with high-speed counter 0 only.
The frequency can be measured while a high-speed counter 0 comparison operation is in progress.
@PRV
#0010 C1: Port specifier (example for high-speed counter input 0 (fixed))
#0013 C2: Control data for reading frequency (10-ms sampling)
D100 S: First destination word
15 0
Present frequency
D100 data lower bytes High-speed counter frequency
D101
Present frequency that was read
data upper bytes
Specifications
Item Specifications
Number of frequency mea- 1 input (high-speed counter 0 only)
surement inputs
Frequency measurement High-speed counter 0:
range Differential phase inputs: 0 to 50 kHz
All other input modes: 0 to 100 kHz*
Measurement method Execution of the PRV instruction
Stored data Unit Hz
Output data Differential phase input: 0000 0000 to 0003 0D40 hex
range All other input modes: 0000 0000 to 0001 86A0 hex
* If the frequency exceeds the maximum value, the maximum value will be stored.
11-3-1 Overview
This function counts input pulses with the CPU Units built-in high-speed counter and executes an inter-
rupt task when the count reaches the preset value or falls within a preset range (target-value or zone
comparison). An interrupt task between 0 and 15 can be allocated with the CTBL instruction.
Rotary Encoder
Built-in input
Time
Interrupt task
Cyclic tasks
(ladder programs) Interrupt occurs Ladder diagram
Cycle
END
END
I/O refresh
Target value 1
Target value range
Target value 2
0 0
Time Time
Counting enabled Counting enabled
Cyclic task Interrupted Cyclic task Interrupted Cyclic task Cyclic task Interrupted Cyclic task Interrupted Cyclic task
execution execution execution execution execution execution
Interrupts
1 PLC Setup
Enable the required high-speed counters.
Select the Use high speed counter Check Box for
high-speed counters 0 to 5. Set the input setting,
counting mode and reset method on the Built-in
Tab Page of the PLC Setup using the CX-Pro-
grammer. 11
Terminals 00 to 06 on the 0CH terminal block can
be used for high-speed counters. High-speed
counters 0 to 5 correspond to terminals 00 to 05.
11-3-1 Overview
2 Interrupt task
Write a program for interrupt tasks 0 to 15.
PLC Setup
Click the Built-in Input Tab and select the Use high-speed counter Check Box for high-speed counters 0
to 5, and then set the counting mode, reset method, and input setting.
Interrupts
started in this step.
The following examples show the operation of an interrupt task for a comparison table.
Example 1
High-speed counter PV
Comparison table
Number of values = 4
Target value 4 Target value 1 (when counting up)
Target value 3
Comparison is Interrupt task = 0
executed according Target value 2 (when counting up)
to the order of the Interrupt task = 1
Target value 2
values in the table. Target value 3 (when counting up)
Interrupt task = 5
Target value 1 Target value 4 (when counting up)
Interrupt task = 8
Time
Interrupt task number that is started. No.0 No.1 No.5 No.8 No.0
Example 2
High-speed counter PV
Comparison table
Number of values = 4
Target value 1 Target value 1 (when counting up)
Target value 2
Comparison is Interrupt task = 0
executed according Target value 2 (when counting down)
to the order of the Interrupt task = 1
Target value 3
values in the table. Target value 3 (when counting down)
Interrupt task = 5
Target value 4 Target value 4 (when counting down)
Interrupt task = 8
Time
Interrupt task number that is started. No.0 No.1 No.5 No.8
Bad OK
Match / Target value + 1 Target value + 2
The maximum response frequencies of the high-speed counters are given in the following table.
Item E-type CPU Unit N/NA-type CPU Unit
Incremental pulse 10kHz 100kHz
Up and down pulses
High-speed counter 0
Pulse plus direction
Differential phase (4) 5kHz 50kHz
Incremental pulse 10kHz 100kHz
Up and down pulses 10kHz
High-speed counter 1
Pulse plus direction 100kHz
Differential phase (4) 5kHz 5kHz
High-speed counter 2 Incremental pulse 10kHz 10kHz
High-speed counter 3 Incremental pulse
High-speed counter 4 Incremental pulse
High-speed counter 5* Incremental pulse
Interrupts
when using target matching.
Use the counters for target matching under the frequencies in the following table.
If the pulse frequencies input to the high-speed counters are higher than those in the table,
count values may not agree.
When using target matching, the interval between interrupts for target matches and the
interval between interrupts for the next target matches after the count direction (increment-
ing/decrementing) changing must be longer than 3 ms plus the sum of execution time for
interrupt tasks that may possibly happen at the same time.
The sum of execution time for interrupt tasks in one cycle is stored in A442. (For CPU Unit
version 1.0 or earlier, the interval must be longer than 6 ms plus the sum of execution time
for interrupt tasks that may possibly happen at the same time and the data in A442 is unsta-
ble.)
If the input setting is set for up/down pulse inputs or differential phase inputs (4), do not
change the direction at a high frequency when using target matching. If changing direction
at a high frequency, the interval of direction changing must be longer than 500s.
If changing direction at a high frequency when using target matching, cycle time exceeded
error may occur.
There is no restriction when target matching is not used.
Decrement Pulse
9 10 11 12 11 10 9 8 7 6 5 6 7 8 9
500s min.
Range Comparison
The specified interrupt task is executed when the high-speed counter PV is within the range defined by
the upper and lower limit values.
The comparison conditions (upper and lower limits of the range) are registered in the comparison
table along with the corresponding interrupt task number. The specified interrupt task will be exe-
cuted once when the high-speed counter PV is in the range (Lower limit PV Upper limit).
Time
Interrupt task number to execute No.2 No.1 No.1 No.2
A total of 6 ranges (upper and lower limits) are registered in the comparison table.
The ranges can overlap.
A different interrupt task can be registered for each range.
The counter PV is compared with the 6 ranges once each cycle.
The interrupt task is executed just once when the comparison condition goes from unmet to met.
When more than one comparison condition is met in a cycle, the first interrupt task in the table
will be executed in that cycle. The next interrupt task in the table will be executed in the next
cycle.
Additional Information
The range comparison table can be used without starting an interrupt task when the comparison
condition is met. The range comparison function can be useful when you just want to know
whether or not the high-speed counter PV is within a particular range.
Use the Range Comparison Condition Met Flags to determine whether the high-speed counter
PV is within a registered range.
Interrupts
COMPARISON TABLE LOAD Instruction: CTBL
The CTBL instruction compares the PV of a high-speed counter (0 to 5) to target values or ranges and
executes the corresponding interrupt task (0 to 15) when the specified condition is met.
Execution condition
11
@CTBL
C1: Port specifier
Operand Settings
C1 Port specifier #0000 High-speed counter 0
~
~
15 0
S Number of target values 0001 to 0006 hex (1 to 6 target values)
15 0
S Lower word of range 1 lower limit
0000 0000 to FFFF FFFF hex (See note.)
S+1 Upper word of range 1 lower limit
S+2 Lower word of range 1 upper limit
0000 0000 to FFFF FFFF hex (See note.)
S+3 Upper word of range 1 upper limit
Range 1 interrupt task number
Note Always set the upper limit greater than or equal to the lower limit for any one range.
Execution condition
@INI
C1 C1: Port specifier
C2 C2: Control data
S S: First word of new PV
Operand Settings
C1 Port specifier #0010 High-speed counter 0
~
~
Interrupts
PV reaches 30,000 (0000 7530 hex) and starts interrupt task 11 when the PV reaches 20,000 (0000
4E20 hex).
4 Use the CTBL instruction to start the comparison operation with high-speed counter 0 and inter-
rupt tasks 10 and 11.
W0.00
@CTBL
#0000 Use high-speed counter 0.
#0000 Register a target-value comparison
D1000 table and start comparison operation.
First comparison table word.
When execution condition W0.00 turns ON, the comparison starts with high-speed counter 0.
When the PV of high speed counter 0 reaches 30,000, cyclic task execution is interrupted, and
interrupt task 10 is executed.
When the PV of high speed counter 0 reaches 20,000, cyclic task execution is interrupted, and
interrupt task 11 is executed.
When interrupt task 10 or 11 execution has been completed, execution of the interrupted cyclic
task resumes.
W0.00
0.00
0.01
Counting enabled
1 Set high-speed counter 1 on the PLC Setups Built-in Input Tab Page.
Item Setting
High-speed counter 1 Use counter
Counting mode Circular mode
Circular Max. Count 50,000
Reset method Software reset (continue comparing)
Input Setting Up/Down inputs
2 Set the range comparison table starting at word D2000. Even though range 1 is the only range
being used, all 30 words must still be dedicated to the range comparison table.
Word Setting Function
D2000 #61A8 Rightmost 4 digits of range 1 lower Lower limit value: 25,000
limit
D2001 #0000 Leftmost 4 digits of range 1 lower limit
D2002 #639C Rightmost 4 digits of range 1 upper Upper limit value: 25,500
limit
D2003 #0000 Leftmost 4 digits of range 1 upper limit
D2004 #000C Range 1 interrupt task number = 12 (C hex)
D2005 All Range 2 lower and upper limit values Range 2 settings
to #0000 (Not used and do not need to be set.)
D2008
D2009 #FFFF Disables range 2.
~
D2014 #FFFF Set the fifth word for ranges 3 to 6 (listed at left) to #FFFF (Range
D2019 settings are invalid) to disable those ranges.
D2024
D2029
4 Use the CTBL instruction to start the comparison operation with high-speed counter 1 and inter-
Interrupts
rupt task 12.
W0.00
@CTBL
#0001 Use high-speed counter 1.
#0001 Register a range comparison table 11
D2000 and start comparison operation.
First comparison table word.
W0.00
0.02
0.03
High-speed counter 1 PV
(in A272 and A273)
Counting enabled
Operation Overview
A sheet feeder is controlled to feed constant lengths in a given direction, e.g., for vacuum packing of
food products.
Motor speed
3550
Number of pulses 3500
counted by high- 3000
speed counter (Pulses)
(A270)
While the pulse count is between 3,500 and 3,550, normal stop position output (CIO 100.02) will be
ON. If the pulse count exceeds 3550, the error stop position output (CIO 100.03) will turn ON.
System Configuration
Wiring Example
White Phase B
Orange Phase Z
Brown
Example: E6B2-CWZ6C
NPN open-collector output Blue
24 VDC
power supply
Start motor
100 to 240 VAC
CP1E-N20DR-A
PLC Setup
Use the following procedure to enable high-speed counter 0.
Programming Example 1
In this example, the CTBL (COMPARISON TABLE LOAD) instruction is used to create an interrupt
when the target value is reached. Slowing and stopping are executed as interrupt tasks, allowing
high-speed processes to be executed without affecting the cycle time.
Ladder Program
Use the CTBL instruction to execute interrupt tasks when the target positions are reached.
When the PV of the high-speed counter matches target value 1 (3000), interrupt task 4 is executed.
Interrupt task 4
Turns ON the motor
low speed output
When the present vale of the high-speed counter matches target value 2 (3500), interrupt task 5 is
executed.
Interrupt task 5
Turns OFF the motor
low speed output
DM Area Setup
The comparison table for the CTBL (COMPARISON TABLE LOAD) instruction is set in D600 through
D606.
Word Value Contents
D600 0002 Number of target values: 2
D601 0BB8 Target value 1: 3000 (BB8 hex)
D602 0000
D603 0004 Target value 1: Interrupt task No.4
D604 0DAC Target value 2: 3500 (DAC hex)
D605 0000
D606 0005 Target value 2: Interrupt task No.5
12-1 Overview
Pulse outputs can be used only with the CP1E N/NA-type CPU Unit with transistor outputs.
12-1-1 Overview
Pulse outputs can be output from the CPU Unit's built-in outputs using instructions to perform position-
ing or speed control with a servomotor or a stepping motor that accepts pulse inputs. It is also possible
to perform origin searches or origin returns.
Trapezoidal control
Frequency (speed)
Travel distance
Built-in output
Jogging
Frequency (speed)
Servo Drive (or
stepping driver)
Travel distance
Time
Servomotor (or
stepping motor) Origin search
Frequency (speed)
Travel distance
Time
CP1E
Pulse output PV in
Auxiliary Area
1 PLC Setup
Setting is required for the following situations:
Performing an origin search.
Using the Limit Input Signal as an input to func-
12-1 Overview
tions other than origin searches.
Note The power supply must be restarted after the PLC Setup is transferred in order to enable the pulse output
settings.
Refer to 12-4 Defining Origin Position for origin search settings in the PLC Setup.
Pulses
Origin Searches
Use the following input and output terminals for origin searches.
Input Terminals
N20/30/40/60 or NA20 CPU Units
Input terminal block Setting in PLC Setup Other functions that cannot be used at the same time
High-speed
Terminal Quick- counter setting
Terminal Enable origin searches for Normal Interrupt
block response
number pulse outputs 0 and 1 inputs inputs Increment
label inputs
pulse input
CIO 0 06 Pulse 0, Origin input signal Normal Interrupt Quick- High-speed
input 6 input 6 response counter 5
input 6
07 Pulse 1, Origin input signal Normal Interrupt Quick-
input 7 input 7 response
input 7
: :
10 Pulse 0, Origin proximity Normal
input signal input 10
11 Pulse 1, Origin proximity Normal
input signal input 11
12-1 Overview
CIO 0 03 Pulse 0, Origin proximity Normal Interrupt Quick-response
input signal input 3 input 3 input 3
: :
05 Pulse 1, Origin proximity Normal Interrupt Quick-response High-speed
input signal input 5 input 5 input 5 counter 4
06 Pulse 0, Origin input signal Normal Interrupt Quick-response High-speed
input 6 input 6 input 6 counter 5 12
07 Pulse 1, Origin input signal Normal Interrupt Quick-response
input 7 input 7 input 7
Note When the origin search is in operating mode 0, normal output 4 and 5 can be used at the same time.
PULS
(+)
PULS
(-)
(+)
SGN
(-)
Direction output
12-1 Overview
SmartStep2 Series (pulse string input) R7A-CPBS
SmartStep Junior (pulse string input) R7A-CPZS
W Series (pulse string input) R88A-CPWS
G Series (pulse string input) R88A-CPGS
Set the Servo Drives command pulse mode to feed pulse and forward/reverse signals because the 12
method of pulse output from a CP1E CPU Unit is pulse + direction.
R7D-BP SmartStep2-series
Output terminal block R7A-CPBS PIN Signal
2k
Pulse output (CIO 100.00) 22 +PULS
Pulse 23 -PULS
2k
output 0 Direction output (CIO 100.02) 24 +SIGN
25 -SIGN
1 +24VIN
Error counter reset output 0 (CIO 100.04) 4 ECRST
COM
26 FG
Applicable Instructions
12-1 Overview
The following instructions are used.
Purpose Overview Instruction Reference
Performing trapezoidal control Performs trapezoidal pulse output PLS2: PULSE Refer to 12-2
control with independent accelera- OUTPUT
tion and deceleration rates.
(The number of pulses can be set.) 12
Jogging Without acceleration Performs pulse output control without SPED: SPEED Refer to 12-3
and deceleration acceleration or deceleration. OUTPUT
12-1-3 Specifications
Item Specifications
Output mode Continuous mode (for speed control) or independent mode (for position con-
trol)
Positioning (independent mode) instruc- PULS and SPED, PULS and ACC, or PLS2
tions
Speed control (continuous mode) SPED or ACC
instructions
Origin (origin search and origin return) ORG
instructions
Output frequency 1 Hz to 100 kHz (1 Hz units), two pulse outputs
Frequency acceleration and decelera- Set in increments of 1 Hz for acceleration/deceleration rates from 1 to 65,535 Hz
tion rates (every 4 ms).
The acceleration and deceleration rates can be set independently only with
the PLS2 instruction.
Changing SVs during instruction execu- The target frequency, acceleration/deceleration rate, and target position can
tion be changed.
Duty factor Fixed at 50%
Pulse output method Pulse + direction outputs (CW/CCW outputs cannot be used.)
Number of output pulses Relative coordinates: 0000 0000 to 7FFF FFFF hex(Accelerating or decelerat-
ing in either direction: 2,147,483,647)
Absolute coordinates: 8000 0000 to 7FFF FFFF hex(-2,147,483,648 to
2,147,483,647)
Pulse output PVs relative/absolute Absolute coordinates are specified automatically when the origin location has
coordinate specifications been defined by setting the pulse output PV with the INI instruction or perform-
ing an origin search with the ORG instruction. Relative coordinates are used
when the origin location is undefined.
Relative pulse/absolute pulse specifica- The pulse type can be specified with an operand in the PULS or PLS2 instruc-
tions tion.
Note The absolute pulse specification can be used when absolute coordi-
nates are specified for the pulse output PV, i.e. the origin location has
been defined.The absolute pulse specification cannot be used when rel-
ative coordinates are specified, i.e. the origin location is undefined. An
instruction error will occur.
Pulse output PVs storage location The following Auxiliary Area words contain the pulse output PVs
Pulse output 0: A277 (leftmost 4 digits) and A276 (rightmost 4 digits)
Pulse output 1: A279 (leftmost 4 digits) and A278 (rightmost 4 digits)
The PVs are refreshed during regular I/O refreshing.
Specified number of
pulses
Starting frequency
=
Number of movement
pulses
Number of pulses setting
=
Number of 100
movement pulses Pulse output
0 Target position Present position PV
100 Origin
+100
+200
Pulse output
0 Target position= Present position PV
Number of pulses setting
Origin
Additional Information
The origin position is undefined in the following case. Please define the origin position by per-
forming the origin searches again.
12
When the pulse output reset flag is turned ON
When the RUN or MONITOR mode is changed to the PROGRAM mode
Applicable Instructions
PLS2
Preparations
PLC Setup
There are no settings that need to be made in the PLC Setup.
DM Area Settings
Settings for PLS2 Instruction (D0 to D7)
Setting Address Data
Acceleration rate: 300 Hz/4 ms D0 #012C
Deceleration rate: 200 Hz/4 ms D1 #00C8
Target frequency: 50,000 Hz D2 #C350
D3 #0000
Number of output pulses: 600,000 D4 #27C0
pulses D5 #0009
Starting frequency: 100 Hz D6 #0064
D7 #0000
Ladder Program
0.00
@PLS2
#0001 Pulse output 1
Start input
#0100 Specifies Pulse + Direction output method, CW, and relative pulses
D0 Acceleration rate, deceleration rate, target frequency, number of pulses setting
D6 Starting frequency
Additional Information
Absolute pulses can be specified when the origin position has been defined.
If a target frequency that cannot be reached has been set, the target frequency will be reduced
automatically, i.e., triangular control will be performed. In some cases where the acceleration
rate is substantially greater than the deceleration rate, the operation will not be true triangular
control. The motor will be operated at a constant speed for a short time between the accelera-
tion and deceleration.
12-3 Jogging
Jogging can be performed by using the SPED (SPEED OUTPUT) and ACC (ACCELERATION CON-
TROL) instructions. This section describes the steps for jogging.
12-3 Jogging
12-3-1 High-speed Jogging
Start pulse output with acceleration or deceleration using the ACC instruction. In this case, acceleration
and deceleration rate must be the same. Set the target frequency of the ACC instruction to 0 Hz to stop
the pulse output.
12
Acceleration
Target frequency and
deceleration
Target frequency Starting pulse output: 1 Hz to 100 kHz (in increments of 1 Hz)
Stopping pulse output: 0 Hz
Acceleration and deceleration rate Set in increments of 1 Hz from 1 to 65,535 Hz (every 4 ms).
Direction specification Set to CW or CCW.
Mode specification Set to continuous mode.
Start pulse output without acceleration or deceleration using the SPED instruction. Set the target fre-
quency of the SPED instruction to 0 Hz to stop the pulse output.
Target frequency
Target frequency Starting pulse output: 1 Hz to 100 kHz (in increments of 1 Hz)
Stopping pulse output: 0 Hz
Direction specification Set to CW or CCW.
Mode specification Set to continuous mode.
Pulse frequency
CCW
CW low-speed jogging (CIO 0.00)
The example shows jogging with acceleration and deceleration executed using an ACC instruction. It is
used for high-speed jogging.
Clockwise high-speed jogging will be executed from pulse output 1 while CIO 0.04 is ON.
Counterclockwise high-speed jogging will be executed from pulse output 1 while CIO 0.05 is ON.
Acceleration/
Pulse frequency deceleration rate
100Hz/4ms
Acceleration/
deceleration rate
100Hz/4ms
CCW
Preparations
PLC Setup
There are no settings that need to be made in the PLC Setup.
DM Area Settings
Settings to Control Speed while Jogging (D0 to D1 and D10 to D15)
Setting Address Data
Target frequency (low speed): 1,000 Hz D0 #03E8
D1 #0000
Acceleration rate: 100 Hz/4 ms D10 #0064
Target frequency (high speed): 100,000 Hz D11 #86A0
D12 #0001
Acceleration/deceleration rate: 100 Hz/4 ms D13 #0064
(Not used.)
Target frequency (stop): 0 Hz D14 #0000
D15 #0000
Ladder Program
0.00 A281.04
SPED
Pulse output 1
12-3 Jogging
Low-speed Pulse Output #0001
#0100 Specifies Pulse + Direction output method, CW, and continuous mode.
CW Start in Progress D0 Target frequency
SET W0.00
W0.00 0.00
SPED
Low-speed Low-speed #0001
CW output CW Start #0100
#0000
12
in progress
RSET W0.00
0.01 A281.04
SET W0.01
W0.01 0.01
SPED
Low-speed Low-speed #0001
CCW output CCW Start #0110
#0000
in progress
RSET W0.01
0.04 A281.04
ACC
High-speed Pulse Output #0001 Pulse output 1
CW Start in Progress #0100 Specifies Pulse + Direction output method, CW, and continuous mode.
D10 Acceleration/deceleration rate and target frequency
SET W0.02
W0.02 0.04
ACC
High-speed High-speed #0001
CW output CW Start #0100
D13
in progress
RSET W0.02
0.05 A281.04
ACC
High-speed Pulse Output #0001 Pulse output 1
CCW Start in Progress #0110 Specifies Pulse + Direction output method, CCW, and continuous mode.
D10 Acceleration/deceleration rate and target frequency
SET W0.03
W0.03 0.05
ACC
#0001
High-speed High-speed
#0110
CCW output CCW Start D13
in progress
RSET W0.03
Additional Information
The PLS2 instruction can be used to set a starting frequency or separate acceleration and decel-
eration rates, but there are limitations on the operating range because the end point must be
specified in the PLS2 instruction.
In the following example, the motor is started at a specified speed, accelerated to the origin search high
speed, and run at that speed until the origin proximity position is detected. After the Origin Proximity
Input is detected, the motor is decelerated to the origin search low speed and run at that speed until the
origin position is detected. The motor is stopped at the origin position.
1
Origin Proximity
Input Signal 0
Origin Input 1
Signal
0
Pulse frequency
Origin search high speed Origin search deceleration rate
Origin search
acceleration rate
Deceleration point Origin search proximity speed
Origin search
initial speed
Time
Start Decelerate from high to low speed Stop
Additional Information
The motor can be moved even if the origin position has not been defined, but positioning opera-
tions will be limited as follows:
Origin return: Cannot be used.
Positioning with absolute pulse specification: Cannot be used.
Positioning with relative pulse specification: Outputs the specified number of pulses after set-
ting the present position to 0.
1 PLC Setup
Set the origin search parameters in the
Pulse Output 0 and Pulse Output 1 Tab
Pages of the PLC Setup using the CX-Pro-
grammer.
* The actual monitoring time will be the Positioning Monitor Time rounded up to the nearest 10-ms unit + 10 ms
max. If the Positioning Monitor Time is set to 0, the function will be disabled and the Unit will continue waiting for
the Positioning Completed Signal to come ON. (A Positioning Timeout Error will not be generated.)
Note The power supply must be restarted after the PLC Setup is transferred in order to enable the
settings for using the origin search.
C2:Control data
Origin search and pulse + direction output method: #0100
Operating Mode
The operating mode parameter specifies the kind of I/O signals that are used in the origin search.
I/O signal Mode 0 Mode 1 Mode 2
Driver Stepping motor* Servomotor
Operation Origin Input Inputs signals are arranged Even if an Origin Input Signal is received during
Signal so deceleration starts when deceleration, it is ignored. After the motor has
the Origin Proximity Input reached the origin search proximity speed and the 12
Signal is received and then Origin Input Signal is received, the motor stops, com-
the Origin Input Signal is pleting the origin search process.
received while the motor is
* There are stepping motor drivers that are equipped with a Positioning Completed Signal like a servomotor. Oper-
ating modes 1 and 2 can be used with these stepping motor drivers.
The use of an error counter reset output and positioning completed input depends on the mode as
described in the following table.
I/O signal Mode 0 Mode 1 Mode 2
Origin Input Connected to the open- Connected to the phase-Z Connected to the phase-Z
Signal collector output from a sen- signal from the Servo Drive. signal from the Servo Drive.
sor or other device.
Error counter Not used. Connected to the error Connected to the error
reset output (The origin search operation counter reset of the Servo counter reset of the Servo
is completed when the origin Drive. Drive.
is detected.)
Positioning Not used. Not used. Connected to the Position-
completed input ing Completed Signal from
the Servo Drive.
Origin Proximity 1
Input Signal 0
Origin Input 1
Signal 0
Pulse output
CCW CW
Starts when ORG is executed Origin Input Signal Error (error code 0202)
1
Origin Input Signal
(phase-Z signal) 0
1
Pulse output
0
12
Error Counter
Reset Signal
Though the Origin Proximity Input Signal is received, the signal will be ignored and the motor will
begin decelerating from the origin search high speed to the origin search proximity speed. In this
operating mode, the motor will stop at the Origin Input Signal after deceleration is completed.
CCW CW
(The deceleration time is Stop*
relatively short in this case.)
* The Origin Input Signal can be detected
Starts
when ORG is executed immediately after the Origin Proximity
Input Signal turns OFF if the deceleration
time is short, e.g., when starting from
within the Origin Proximity Input Signal.
1
Origin Proximity
Input Signal 0
CCW CW
(The deceleration time is
relatively long in this case.) Starts Stop
when ORG
is executed Motor stopped by an Origin Input
Signal received after deceleration
CCW CW
(The deceleration time is
relatively short in this case.) Starts Stop
when ORG is executed
Pulse output
Time
Stop
1
Error Counter
Reset Output 0
Positioning 1
Completed Signal 0
Proximity speed
Pulse output for origin search
Acceleration
Initial speed
Start when ORG is executed Stop
CCW CW
Start Stop
CCW CW
Stop
CW Limit Input Signal (See note.)
Start
CCW CW
Stop Start
Note When the Limit Input Signal is received, the motor stops without
deceleration, reverses direction, and accelerates.
1: Origin Proximity Input Signal 1
Origin Proximity
reversal not required. Input Signal 0
1
Origin Input Signal
0
Pulse output
CCW CW
Start Stop
CCW CW
Stop
CW Limit Input Signal (See note.)
Start
CCW CW
Stop Start
Note When the Limit Input Signal is received, the motor stops without
deceleration, reverses direction, and accelerates.
CCW CW
Start Stop
CCW CW
CCW CW
Stop Start
Note When the Limit Input Signal is received, the motor stops without
deceleration, reverses direction, and accelerates.
Pulse output
CCW CW
Start Stop
12
CCW CW
CCW CW
Pulse output
CCW CW
Start Stop
CCW CW
CCW CW
Start Limit stop
(error code:0200)
Note When the Limit Input Signal is received, the motor stops
without deceleration.
CCW CW
Start Stop
CCW CW
CCW CW
Origin return
initial speed
Time
Start Stop
PLC Setup
The various origin return parameters are set on the Pulse Output 0 Tab Page in the PLC Setup.
C2:Control data
Origin search and pulse + direction output method: #0100
Note An instruction execution error will occur if the origin is not defined (relative coordinate system)
when the ORG instruction is executed to perform an origin return operation.
@INI
#0000 C1: Port specifier (example for pulse output 0)
#0002 C2: Control data (example for changing PV)
D100 S:First word with new PV
15 0
D100 #0 0 0 0
D101 #0 0 0 0
Operands Settings
C1 Port specifier #0000 Pulse output 0
#0001 Pulse output 1
C2 Control data #0002 Changes PV
S First word with new PV Store the new PV in S and S+1 (32 bits).
Execution condition
@PRV
#0000 C1: Port specifier (example for pulse output 0)
#0000 C2: Control data (example for reading PV)
D100 D: First destination word
15 0
D100 Present value data lower bytes
Pulse output PV that was read
D101 Present value data upper bytes
From mounter
Operation Pattern
An origin search is performed.
Fixed-distance positioning is repeated.
The system is returned to the original position.
Origin search
CCW Fixed-distance CW
positioning repeated
50,000 Hz
(C350 Hex)
10,000
(2710 Hex)
CCW CW
Acceleration/deceleration:
Return to start 1,000 Hz/4 ms (03E8 hex)
SmartStep A-series
Servo Drive
R88A-CPU00S
and resistor 12
4 -SIGN
1.6k 5 +ECRST
Error counter reset output 0 (CIO 100.04) 6 -ECRST
Hood FG
Operation
1 An origin search is performed using the Origin Search Start Switch (CIO 0.00).
2 When the origin search is finished, the PCB Storage Enabled Output (CIO 100.03) is turned ON.
3 When a PCB has been stored, the stocker is raised (relative positioning) using the PCB Storage
Completed Input (CIO 0.03).
4 Storing PCBs is repeated until the stocker is full.
5 The number of PCBs in the stocker is counted with counter C0 by counting the number of times
the stocker is raised.
6 When the stocker is full, it is moved (CIO 100.01) and only the conveyor is lowered (absolute
positioning) when stoker movement is completed (CIO 0.04).
7 An emergency stop is executed to stop pulse output with the Emergency Stop Switch Input (CIO 0.01).
Preparations
PLC Setup
Setting
Use define origin operation for pulse output 0.
Note The Use define origin operation setting is read from the PLC Setup when the power supply is turned ON.
DM Area Settings
Settings for PLS2 for Fixed-distance Positioning (D0 to D7)
Setting details Address Data
Acceleration rate: 1,000 Hz/4 ms D0 #03E8
Deceleration rate: 1,000 Hz/4 ms D1 #03E8
Target frequency: 50,000 Hz D2 #C350
D3 #0000
Number of output pulses: 10,000 pulses D4 #2710
D5 #0000
Starting frequency: 0 Hz D6 #0000
D7 #0000
Settings for PLS2 to Return to Start (D10 to D17)
Setting details Address Data
Acceleration rate: 300 Hz/4 ms D10 #012C
Deceleration rate: 200 Hz/4 ms D11 #00C8
Target frequency: 50,000 Hz D12 #C350
D13 #0000
Number of output pulses: 0 pulse D14 #0000
D15 #0000
Starting frequency: 100 Hz D16 #0064
D17 #0000
Number of Repeats of Fixed-distance Positioning Operation (D20)
Setting details Address Data
Number of repeats of fixed-distance positioning D20 #000F
operation (number of PCBs in stocker)
Ladder Program
Positioning
Lift 10,000 pulses (relative) at a time
W0.02 W0.04 W0.03
Lift positioning in progress
Lift positioning Lift positioning
start completed
@PLS2
W0.03
#0000
Lift positioning #0100
in progress D0
D6
A280.03 W0.04
Lift positioning completed
Pulse Output Completed Flag
Counter for number of lifts (number of PCBs stored)
W0.04
CNTX
Lift positioning completed 0000
W0.09 D20
Lower positioning
completed
P_First_Cycle
Positioning
Lower to "0" position (absolute pulses)
W0.08
W0.07 W0.09
Lower positioning in progress
Lower positioning Lower positioning
start completed @PLS2
W0.08
#0000
Lower positioning #0101
in progress D10
D16
A280.03 W0.09
Lower positioning completed
Pulse Output Completed Flag
A540.08
0.05
CW Limit Input Signal Flag
Built-in input
0.07 A540.09
CCW Limit Input Signal Flag
Built-in input
12
Marker sensor Speed
Position
control
Pulse output
Operation Pattern
Speed control is used to feed wrapping material to the initial position. When the marker sensor input
is received, fixed-distance positioning is performed before stopping.
10,000 Hz
500 Hz/4ms (2710 Hex)
(01F4 Hex)
Position control
Speed control 5,000 (1388 hex)
pulses output before stopping.
PLS2 is executed in
input interrupt task.
Operation
1 Speed control is used to feed wrapping material to the initial position when the Start Switch (CIO
0.00) is activated.
2 When the Marker Sensor Input (CIO 0.04) is received, the PLS2 instruction is executed in inter-
rupt task 4.
4 An emergency stop is executed to stop pulse output with the Emergency Stop Switch input (CIO
0.01).
Preparations
PLC Setup
Setting
Enable using built-in input IN4 as an interrupt input.
Note The interrupt input setting is read from the PLC Setup when the power supply is turned ON.
DM Area Settings
Speed Control Settings to Feed Wrapping Material to Initial Position
Setting Address Data
Acceleration/deceleration rate: D0 #01F4
500 Hz/4 ms
Target frequency: 10,000 Hz D1 #2710
D2 #0000
Ladder Program
12
Feeding Material with Speed Control
W0.00
A280.03 W0.01
Material positioning completed
Pulse Output
Completed Flag
Emergency Stop
0.01
@INI
Emergency stop switch #0000
#0003
0
When operating with the absolute pulse specification, the movement direction (CW/CCW) is selected
automatically based on the relationship between the pulse output PV when the instruction is executed
and the specified target position. The direction (CW/CCW) specified in an ACC, SPED or PLS2 instruc-
tion is not effective.
Using CW/CCW Limit Inputs for Pulse Output Functions other than
Origin Searches
Pulse outputs will stop according to the PLC Setup when either the CW or CCW Limit Input Signals
turns ON. It is also possible to select whether or not the defined origin will be cleared when a CW or
CCW Limit Input Signal turns ON for a pulse output function.
Equations
The INT function extracts an integer from the fraction. The non-integer remainder is rounded.
Changing Settings
Example Procedure
Operation Frequency changes Description
application Instruction Settings
Change Changing the Pulse frequency Changes the SPED Port
speed in one speed during frequency (Continuous) Continuous
Target frequency
step operation (higher or Target frequency
lower) of the
Present frequency SPED
pulse output
Time (Continuous)
in one step.
Execution of SPED
Example Procedure
Operation Frequency changes Description
application Instruction Settings
Changing the Pulse frequency Acceleration/ Changes the ACC Port
deceleration rate n
speed in a Acceleration/
acceleration or (Continuous) Continuous
Target frequency deceleration rate 2
polyline curve Acceleration/
deceleration Target frequency
during operation deceleration
rate 1
rate during
Present frequency ACC Acceleration/
acceleration or
Time (Continuous) deceleration rate
deceleration.
Execution of ACC
Execution of ACC
Execution of ACC
Stop pulse Immediate stop Pulse frequency Stops the SPED Port
output pulse output Continuous
Present
frequency
immediately. SPED Target
(Continuous) frequency=0
Time
Execution of SPED
* If an ACC instruction started the operation, the original acceleration/deceleration rate will remain in effect.
If a SPED instruction started the operation, the acceleration/deceleration rate will be invalid and the pulse output will stop
immediately.
* Triangular Control
If the specified number of pulses is less than the number required just to reach the target frequency and
return to zero, the function will automatically reduce the acceleration/deceleration time and perform triangu-
lar control (acceleration and deceleration only.) An error will not occur.
Time Time
Changing Settings
Example Procedure
Operation Frequency changes Description
application Instruction Settings
Change Changing Number of pulses SPED can be exe- PULS Number of
Specified number of specified with PULS
speed in the speed in Pulse frequency
pulses (Specified with does not change.
cuted during posi- pulses
one step one step New target frequency PULS.) tioning to change Relative or
SPED
during oper- Target frequency (raise or lower) the absolute
(Independent)
ation pulse output fre- pulse speci-
quency in one step. fication
Time
The target position SPED Port
Execution of SPED
(independent mode) (specified number (Independent)
SPED (independent mode) Pulse +
executed again to change the of pulses) is not
target frequency. (The target Direction
position is not changed.)
changed.
Indepen-
dent
Target fre-
quency
Change Changing Number of pulses ACC can be exe- PULS Number of
specified with PULS
speed the target Pulse frequency
Specified number of
pulses (Specified does not change. cuted during posi- pulses
smoothly speed (fre- with PULS.) tioning to change Relative or
New target frequency ACC
(with quency) the acceleration/ absolute
Target frequency
Acceleration/ (Independent)
accelera- during posi- deceleration rate deceleration rate pulse speci-
tion rate = tioning and target fre- fication
Time
decelera- (accelera- quency. ACC Port
Execution of ACC
tion rate) tion rate = (independent mode) The target position (Independent)
Pulse +
decelera- ACC (independent mode) executed
(specified number
again to change the target frequency. PLS2 Direction
tion rate) (The target position is not changed,
of pulses) is not
but the acceleration/deceleration rate
Indepen-
is changed.)
changed.
ACC dent
(Independent) Accelera-
tion/decel-
eration rate
Target fre-
quency
Example Procedure
Operation Frequency changes Description
application Instruction Settings
Example Procedure
Operation applica- Frequency changes Description Instruc-
tion Settings
tion
Change Change PLS2 can be executed PULS Number of
Number of pulses
target posi- the target Pulse frequency Specified number changed with PLS2. during positioning to pulses
of pulses
tion and position New target frequency change the target position Relative or
ACC
speed and target Target frequency (number of pulses), absolute
Acceleration/ (Indepen-
smoothly speed (fre- deceleration acceleration rate, decel- pulse spec-
rate dent)
quency) eration rate, and target ification
during
Time
frequency.
Execution of ACC Port
positioning (Independent mode)
When the settings cannot PLS2
PLS2 executed to change the target Pulse +
(multiple position, target frequency, and be changed without main- Direction
start func- acceleration/deceleration rates
taining the same speed
tion) Accelera-
range, an error will occur
tion rate
and the original opera-
tion will continue to the Decelera-
original target position. tion rate
Target fre-
quency
Starting
frequency
Change Pulse frequency Number of pulses specified
PLS2 can be executed PLS2 Number of
by PLS2.
the accel- Acceleration/
deceleration rate n during positioning (accel- pulses
eration and New target frequency Acceleration/ eration or deceleration) to Accelera-
deceleration rate 3
Target frequency Acceleration/ PLS2
decelera- deceleration rate 2 change the acceleration tion rate
Acceleration/
tion rates deceleration
rate 1
rate or deceleration rate. Decelera-
during Time
tion rate
positioning Execution of PLS2 Execution of PLS2
Execution of PLS2
(multiple Execution of PLS2
start func-
tion)
Change Change Pulse frequency
PLS2 can be executed PULS Number of
direction the direc- Secified number Change of direction at the
during positioning with pulses
tion during of pulses specified deceleration rate absolute pulse specifica- Absolute
Target ACC
positioning frequency
Number of pulses (position) tion to change to absolute pulse spec-
changed by PLS2 (Indepen-
pulses and reverse direc- ification
Time dent)
tion. Port
Execution
of PLS2
Execution of PLS2 Pulse +
PLS2
Direction
PLS2 Accelera-
tion rate
PLS2 Decelera-
tion rate
Target fre-
quency
Starting
frequency
Stop sloped Decelerate Pulse frequency Decelerates the pulse output PULS Port
pulse out- to a stop Present
to a stop. Indepen-
Original acceleration/
put frequency deceleration rate
If ACC started the operation, dent
ACC or SPED
smoothly. the original acceleration/decel- Target fre-
(Independent)
(Number of eration rate will remain in quency = 0
pulses set-
Target
frequency=0
Time
Execution of ACC
effect.
ting is not If SPED started the operation, ACC
preserved.) the acceleration/deceleration (Independent)
rate will be invalid and the PLS2
pulse output will stop immedi-
ately.
ACC
(Independent)
Time
Execution of ACC
(continuous)
Execution of PLS2 with the following settings
Number of pulses = number of pulses until stop
Relative pulse specification
Target frequency = present frequency
Acceleration rate = Not 0
Deceleration rate = target deceleration rate
Application example
Controlling temperature on a time-proportional basis using the PWM output.
Controlling the brightness of lighting.
Built-in output
PWM output
Duty factor:15%
50%
Duty factor:50%
75%
Duty factor:75%
Specifications
Item Specification
Duty factor 0.0% to 100.0% in 0.1% increments
(Duty factor accuracy is +1%/-0% at 10 kHz, +5%/-0% at 10 to 32 kHz .)
Frequency 2.0 Hz to 6,553.5 Hz (Set in 0.1-Hz increments.)*
2 Hz to 32,000 Hz (Set in 1-Hz increments.)*
Output mode Continuous mode
Instruction PWM
* The duty factor accuracy declines significantly at high frequencies because of limitations in the output circuit at
high frequencies.
Additional Information
For N30/40/60 or NA20 CPU Units, the output indicator of terminal 01 on terminal block CIO100
is always lit during PWM output.
Applicable Instructions
PWM
INI
Preparations
PLC Setup
There are no settings that need to be made in the PLC Setup.
DM Area Settings
PWM Operand Settings (D0 and D1)
Setting Operand Data
Frequency: 2,000.0 Hz D0 #4E20
Duty factor: 40.0% D1 #0190
Ladder Diagram
0.00
@PWM
Start input #1000 PWM output 0 (Duty factor in increments of 0.1%, Frequency in increments of 0.1 Hz)
D0 Frequency setting
D1 Duty factor setting
0.01
@INI
Stop input #1000 PWM output 0
#0003 Stops pulse output
D10 Not used.
1:N NT Link
1:N NT Link
CP-series PLC
or CJ1M PLC CP-series PLC or CJ1M PLC
Inverter
Data links between CPU Units Data links can be created for Serial PLC Links OK OK
up to nine CP-series or CJ1M
CPU Units, including one Poll-
CP1E CPU Unit Polling Unit
RS-422A/485 Option Board
ing Unit and up to eight Polled
RS-422A/485
Units. Up to 10 words can be
Shared data shared per Unit.*1
CP1E CPU Unit Polled Unit CP1L CPU Unit Polled Unit
Additional Information
Refer to A-3 Wiring for Serial Communications in the CP1E CPU Unit Hardware Users Manual
(Cat.No.W479) for Serial communication wiring.
14-2-1 Overview
Communications without special communications programming is possible between a CP1E CPU Unit
and a Programmable Terminal (PT) by using the 1:N NT Link protocol.
Connect the serial port of the CP1E CPU Unit and PT with NT Link (1:N) communication mode, and
connect the CP1E CPU Unit and PT 1:1 as shown below.
PT: NS, NP, or NT31/631 V3
RS-232C
14
1:N NT Link
14-2-1 Overview
CP1E N/NA-type CPU Unit
1 Select Built-in RS232C Port or Serial Create a project using the CX-
Option Port in the PLC Setup of the CP1E Designer and select Serial Port A or
CPU Unit using the CX-Programmer. Set CX-Designer
PLC Setup Serial Port B in the communications
the serial communications mode to NT settings.
Link (1:N), set the baud rate, and set the
highest unit number to at least 1.
4 Set the same communications settings in the CP1E CPU Units PLC Setup and in the NS-series PT.
5 Connect the CP1E CPU Unit and external devices using the RS-232C or RS-422A/485 ports.
PLC Setup
Click the Built-in RS232C Port or Serial Option Port Tab in the PLC Settings Dialog Box.
PT System Menu
Set the PT as follows:
Example: NS-series PT
1 Select NT Links (1:N) from Serial Port A or Serial Port B on the Memory Switch Menu under the
System Menu on the PT.
14
2 Press the SET Touch Switch to set the baud rate to high speed. (A baud rate of 115,200 bps in
the PLC Setup is the same as setting high speed for the PT.)
14-3-1 Overview
CP1E CPU Units and general devices with serial communications ports can be used for no-protocol
communications.
No-protocol communications enable sending and receiving data using the TRANSMIT (TXD) and
RECEIVE (RXD) instructions without using a protocol and without data conversion (e.g., no retry pro-
cessing, data type conversion, or process branching based on received data).
The serial communications mode is set to RS-232C.
TXD or RXD
General component
(e.g., barcode reader)
No-protocol communications are used to send data in one direction to or from general external devices
that have an RS-232C or RS-422A/485 port using TXD or RXD.
For example, simple (no-protocol) communications can be used to input data from a barcode reader or
output data to a printer.
The following table lists the no-protocol communication functions supported by CP1E PLCs.
Max. Frame format
Communica- Transfer
Method amount of Other functions
tions direction Start code End code
data
Data PLC Execution 256 bytes Yes: 00 to FF Yes: 00 to FF Send delay time (delay
transmission External of TXD in hex hex or CR+LF between TXD execution and
device the ladder No: None No: None (The sending data from specified
program amount of data port): 0 to 99,990 ms at the
to receive is minimum(unit: 10 ms)
specified Controlling RS and ER signals
between 1 and
Data External Execution 256 bytes Monitoring CS and DR signals
256 bytes when
reception device of RXD in
no end code is
PLC the ladder
specified.)
program
1 Wiring communications
Connect the CP1E CPU Unit and external device using
RS-232C or RS-422A/485 ports.
2 PLC Setup
Select Built-in RS232C Port or Serial Option Port in the
PLC Setup and transfer the PLC Setup from the CX-
Programmer to the CP1E CPU Unit.
(Set the serial communications mode to RS-232C, and
set the communications conditions.)
3 Create
ladder
Cyclic tasks
PLC to External device: Execute the TXD instruction.
External device to PLC: Execute the RXD instruction.
Program Interrupt tasks
15 08 07 00
D1200 - - Slave address
D1201 - - Function code
D1202 Number of communications data bytes
Communications are easily achieved D1203
by simply turning ON A640.00 after Communications data
~
setting the Modbus-RTU command in
the DM fixed allocation words.
14-4-1 Overview
Bit for Port 1 A640.00
OMRON Inverters
3G3JX, 3G3MX, 3G3RX,
3G3JV, 3G3MV, or 3G3RV
Modbus-RTU commands can be sent simply by turning ON a software switch after setting the Modbus
slave address, function, and data in the DM fixed allocation words for the Modbus-RTU Easy Master.
The response when received is automatically stored in the DM fixed allocation words for the Modbus-
RTU Easy Master.
1 Wiring communications
Connect the CP1E CPU Unit and Modbus-RTU Slave
using RS-422A/485 ports.
2 PLC Setup
Select Built-in RS232C Port or Serial Option Port in the
PLC Setup and transfer the PLC Setup from the CX-Pro-
grammer to the CP1E CPU Unit. (Set the serial communi-
cations mode to Modbus Easy Master, and set the
communications conditions.)
Error Codes
Code Description Description
00 hex Normal end
01 hex Illegal address The slave address specified in the parameter is illegal (248 or higher).
Speed
Stopped
The target speed is changed according to inputs from multiple contacts. Acceleration and deceleration
are controlled using the acceleration and deceleration of an inverter.
Wiring Examples
The CP1E and OMRON 3G3MV Inverter are connected using RS-485 for frequency and start/stop con-
trol.
CP1W-CIF11/12
RS-422A/485 Option Board
CP1W-CIF11/12 Settings
Set the DIP switch as shown in the following table
(Back)
3G3MV Settings 14
Set the DIP switch as follows:
PLC Setup
Click the Serial Option Port Tab in the PLC Settings Dialog Box.
Programming Example
D1307
A641
Contact A
D1306 RUN command (1: Start)
Frequency reference: 60.00Hz(1770 Hex)
D1307
14
D1307
Contact C
D1306
RUN command (1: Start)
Frequency reference: 50.00Hz(1388 Hex)
D1307
Contact Z
D1306 RUN command (0: Stop)
Frequency reference: 00.00Hz
D1307
Start and continue Modbus communications from
1 second after turning ON the power supply.
SET
A641.00
(1)Turn ON A641.00 (Execution Bit) to send command data stored starting at D1300. For details, refer
to DM Area Data on page 14-19.
Words
Bits Setting
Serial Option Port
D1300 00 to 07 Command Slave address (00 to F7 hex)
08 to 15 Reserved (Always 00 hex.)
D1301 00 to 07 Function code
08 to 15 Reserved (Always 00 hex.)
D1302 00 to 15 Number of communications data bytes (0000 to
005E hex)
D1303 to D1349 00 to 15 Communications data (94 bytes max.)
The Execution Bit will automatically turn OFF. Do not turn OFF the bit through the ladder.
(2)When a command has been sent successfully, A641.01 (Execution Normal Flag) will turn ON, and
the response data will be stored starting from D1350.
Words
Bits Setting
Serial Option Port
D1350 00 to 07 Response Slave address (01 to F7 hex)
08 to 15 Reserved (Always 00 hex.)
D1351 00 to 07 Function code
08 to 15 Reserved
D1352 00 to 07 Error code
08 to 15 Reserved (Always 00 hex.)
D1353 00 to 15 Number of response bytes (0000 to 03EA hex)
D1354 to D1399 00 to 15 Response data (92 bytes max.)
(3)If a communications error occurs, A641.02 (Execution Error Flag) will turn ON, and the error code
will be stored in D1352.
DM Area Data
Address
Value
RUN Command (Register 0001) Allocation and Details for Inverter 3G3MV
Bit No. Setting
0 RUN command (1: Start)
1 Normal/reverse rotation (1: Reversed)
2 External error (1: EF0)
3 Error reset (1: Error reset)
4 Multifunction input 1 (1: ON)
5 Multifunction input 2 (1: ON)
6 Multifunction input 3 (1: ON)
7 Multifunction input 4 (1: ON)
8 Multifunction input 5 (1: ON)
9 Multifunction input 6 (1: ON)
10 Multifunction input 7 (1: ON)
11 to 15 (Not used.)
For this example, only the RUN command (bit 00) will be used.
With the Modbus-RTU Easy Master, a CRC-16 checksum does not need to be set in the DM Area,
because it is calculated automatically.
14-5-1 Overview
Serial PLC Links enable exchanging data between CP1E N/NA-type CPU Units, CP1L/CP1H CPU
Units, or CJ1M CPU Units without using special programming. The serial communications mode is set
to Serial PLC Links. Up to 9 PLCs can be linked.
Configuration
Connecting CP1E, CP1L, CP1H, or CJ1M CPU Units 1:N (8 Nodes Maximum)
RS-422A/485
Shared data
CJ1M CPU Unit
(Polled Unit)
8 nodes maximum
CP1E N/NA-type
CPU Unit
(Polling Unit)
RS-232C or RS422A/485
Shared data
CP1E or
CP1L CPU
Unit (Polled
Unit)
1 Wiring communications
Connect the CP1E CPU Unit and the CP1E or other
CPU Units using RS-232C or RS-422A/485 ports.
2 PLC Setup
Set Built-in RS232C Port or Serial Option Port in the
PLC Setup and transfer the PLC Setup from the CX-
Programmer to the CP1E CPU Unit. (Set the serial com-
munications mode to Serial PC Link (Master) or Serial
3 Start communications
Complete Link
The data from all nodes in the Serial PLC Links are reflected in both the Polling Unit and the Polled
Units.
The only exceptions are the addresses of Polled Units that are not present in the network. These
data areas are undefined in all nodes.
Polled Unit No. 0 Local area Polled Unit No. 0 Polled Unit No. 0
Polled Unit No. 1 Polled Unit No. 1 Local area Polled Unit No. 1
Polled Unit No. 3 Polled Unit No. 3 Polled Unit No. 3 Local area
Serial PLC Link Words Serial PLC Link Words Serial PLC Link Words Serial PLC Link Words
CIO 200 to 209 CIO 200 to 209 CIO 3100 to 3109 CIO 3100 to 3109
No.0 CIO 210 to 219 No.0 CIO 210 to 219 No.0 CIO 3110 to 3119 No.0 CIO 3110 to 3119
No.1 CIO 220 to 229 No.1 CIO 220 to 229 No.1 CIO 3120 to 3129 No.1 CIO 3120 to 3129
No.2 CIO 230 to 239 No.2 CIO 230 to 239 No.2 CIO 3130 to 3139 No.2 CIO 3130 to 3139
No.3 CIO 240 to 249 No.3 CIO 240 to 249 No.3 CIO 3140 to 3149 No.3 CIO 3140 to 3149
No.4 CIO 250 to 259 No.4 CIO 250 to 259 No.4 CIO 3150 to 3159 No.4 CIO 3150 to 3159
No.5 CIO 260 to 269 No.5 CIO 260 to 269 No.5 CIO 3160 to 3169 No.5 CIO 3160 to 3169
No.6 CIO 270 to 279 No.6 CIO 270 to 279 No.6 CIO 3170 to 3179 No.6 CIO 3170 to 3179
No.7 CIO 280 to 289 No.7 CIO 280 to 289 No.7 CIO 3180 to 3189 No.7 CIO 3180 to 3189
CP1E N/NA-type CPU Unit CP1E N/NA-type CPU Unit CP1L CPU Unit Example: CJ1M CPU Unit
(Polling Unit) (Polled Unit No. 0) (Polled Unit No. 1) (Polled Unit No. 2)
Serial PLC Link Words Serial PLC Link Words Serial PLC Link Words Serial PLC Link Words
CIO 200 to 209 CIO 200 to 209 CIO 3100 to 3109 CIO 3100 to 3109
No.0 CIO 210 to 219 CIO 210 to 219 CIO 3110 to 3119 CIO 3110 to 3119
No.1 CIO 220 to 229
No.2 CIO 230 to 239
No.3 CIO 240 to 249
No.4 CIO 250 to 259
No.5 CIO 260 to 269
No.6 CIO 270 to 279
No.7 CIO 280 to 289
Allocated Words
* In the same way as for the existing 1:N NT Link, the status (communicating/not communicating) of the Polled Unit
in Serial PLC Links can be checked from the Polling Unit (CPU Unit) by reading the Built-in RS-232C Port Com-
municating with Polled Unit Flag (A393.00 to A393.07 for unit numbers 0 to 7) or the Serial Option Port Commu-
nicating with Polled Unit Flag (A394.00 to A394.07 for unit numbers 0 to 7).
Operation
The present temperature information is exchanged between the boilers. This information is used to
adjust the temperature control of one boiler depending on the status of the other boilers and for moni-
toring individual boilers.
Two Pt100 Sensor Inputs Two Pt100 Sensor Inputs Two Pt100 Sensor Inputs
CP1W-CIF11 CP1W-CIF11 CP1W-CIF11
RS-422A/485 RS-422A/485 RS-422A/485
Option Board Option Board Option Board
PLC Setup
Item Boiler A (Polling Unit) Boiler B (Polled Unit No. 0) Boiler C (Polled Unit No. 1)
Communications Settings Custom
Baud Rate 115200bps
Parameters 7.2.E (default)
Mode PC Link (Master) PC link (Slave)
Link words 10 (default)
PC Link Mode ALL
NT/PC Link Max. 1
Programming Example
Data in the Serial PLC Link Areas are transferred using data links by the Serial PLC Link and without
using any special programming. The ladder program is used to transfer the data that needs to be
linked to the data link area.
Boiler A Boiler B Boiler C
CP1E (Polling Unit) CP1E (Polled Unit No.1) CP1E (Polled Unit No. 0)
14
CIO 0
Input Bits Input Bits Input Bits
CIO 1
CIO 2 A_Temperature data 0 B_Temperature data 0 C_Temperature data 0
CIO 209
CIO 210 B_Temperature data 0 B_Temperature data 0 B_Temperature data 0
CIO 211 B_Temperature data 1 B_Temperature data 1 B_Temperature data 1
Serial PLC
Link Areas
CIO 219
CIO 220 C_Temperature data 0 C_Temperature data 0 C_Temperature data 0
CIO 221 C_Temperature data 1 C_Temperature data 1 C_Temperature data 1
CIO 229
CIO 289
Ladder Diagram
Boiler A Boiler B Boiler C
CP1E N-type CPU Unit CP1E N-type CPU Unit CP1E N-type CPU Unit
(Polling Unit) (Polled Unit No. 0) (Polled Unit No. 1)
#2 #2 #2
2 2 2
200 210 220
Transfer CIO 2 and CIO 3 to Transfer CIO 2 and CIO 3 to Transfer CIO 2 and CIO 3 to
CIO 200 and CIO 201 using a CIO 210 and CIO 211 using a CIO 220 and CIO 221 using a
BLOCK TRANSFER instruction. BLOCK TRANSFER instruction. BLOCK TRANSFER instruction
14-6-1 Overview
Commands are sent from a host computer (not including Support Software) to the CP1E CPU Unit to
read and write data. The serial communications mode is set to Host Link.
Communica-
Command flow Command type Configuration Application Remarks
tions method
Host computer Host link Create frame Directly connect the host com- Use this
PLC command in the host puter in a 1:1 or 1:N system. method when
(C Mode) computer communicating
and send the primarily from
Host link command command to OR the host com-
the PLC. Command
puter to the
Receive the PLC.
response.
FINS command Directly connect the host com- Use these The FINS com-
(with Host Link puter in a 1:1 system or 1:N methods when mand must be
header and system. communicating placed between
terminator) sent. primarily from a Host Link
FINS the host com- header and ter-
Host Link
header
Host Link
terminator
OR puter to PLCs minator and
Command
in the network. then sent by the
host computer.
1 Communications wiring
Connect the computer and CP1E CPU Unit using
RS-232C ports.
Set the PLC Setup (select Host Link for the serial
2 PLC Setup communications mode and set the communications
conditions) and transfer the PLC Setup from the
CX-Programmer to the CP1E CPU Unit.
Software)
of Holding area (H)
RC Timer and Counter PV area read Read the specified present values of timer and
counter from the specified words
RG Timer and Counter Completion Flag Read the specified Completion Flag of timer and
read counter from the specified words 14
RD DM area read Read the specified words from the specified words
of DM area (D)
15-1 Overview
1 PLC Setup
Set whether each input or output will be used.
(Each I/O point is set independently.)
Set the I/O resolution.
(The same setting is used for all I/O points.)
Set the analog input range:
0 to 5 V, 1 to 5 V, 0 to 10 V, -10 to 10 V, 0 to 20mA or
4 to 20mA
(Each input is set independently.)
Set the analog output range:
0 to 5 V, 1 to 5 V, 0 to 10 V, -10 to 10 V, 0 to 20mA or
4 to 20mA
(Each output is set independently.)
2 Wiring analog I/O
Wire the I/O devices.
Select correct wire method according to the voltage
or current input.
PLC Setup
Use the CX-Programmer to set the various PLC Setup including whether the I/O point is being used,
the input range, output range and averaging function usage. The I/O point usage, input range, output
range, and averaging function usage can be set independently for each I/O point.
Analog + V IN Analog + V IN
Analog Analog
output output I IN
Input Input
device device
COM Terminal Terminal
(voltage
Block
(current COM
Block
output) output)
15-1 Overview
Voltage Input Current Input
CP1E-NA20DR-A
VIN0 Analog input 0 voltage input
CIO 0 CIO 90 CIO 91
IIN0 Analog input 0 current input
L1 L2/N COM 01 03 05 07 09 11 I IN0 AG I IN1
CP1E-NA20D-D
NC 00 01 02 04 05 07 NC IOUT0
Note 1 Use 2-conductor shielded twisted-pair cable for the I/O wiring, and do not connect the shield AG terminal.
2 If an input is not being used, connect (short) the inputs + and - terminals.
3 Wire I/O lines apart from power lines (AC power supply lines, three-phase power lines, etc.).
4 If noise is received from power supply lines, insert a noise filter in the power supply input section.
5 Refer to the following diagram regarding wiring disconnections when voltage input is being used.
A
Analog
input
device 1
B C
Analog
input
device 2
24 VDC
Example: If analog input device 2 is outputting 5 V and the same power supply is being used for both
devices as shown above, approximately 1/3, or 1.6 V, will be applied to the input for input device 1.
If a wiring disconnection occurs when voltage input is being used, the situation described below will
result. Either separate the power supplies for the connected devices, or use an isolator for each input.
If the same power supply is being used by the connected devices and a disconnection occurs at points
A or B in the above diagram, an unwanted circuit path will occur as shown along the dotted line in the
diagram. If that occurs, a voltage of approximately 1/3 to 1/2 of the output voltage of the other con-
nected device will be generated. If that voltage is generated while the setting is for 1 to 5 V, open-circuit
detection may not be possible. Also, if a disconnection occurs at point C in the diagram, the negative (-)
side will be used in for both devices and open-circuit detection will not be possible.
This problem will not occur for current inputs even if the same power supply is used.
Note When external power is supplied (when setting the range code), or when there is a power interruption, pulse-
form analog output may be generated. If this causes problems with operation, take countermeasures such
as those suggested below.
(1) Countermeasure 1
Turn ON the power supply for the CP1E CPU Unit first, and then turn ON the power supply for the load
after confirming correct operation.
Turn OFF the power supply for the load before turning OFF the power supply for the CP1E CPU Unit.
(2) Countermeasure 2
Control the machine not only by analog output but also by other signals (additional start/stop control sig-
nal for machine).
Ladder program
15-1 Overview
MOV
Pressure sensor Analog input 0 conversion value
Speed sensor CIO 90
Flow sensor
Other device Analog input 1 conversion value CIO 91
Read conversion
value.
15
Ladder program
-10 to 10 V Input
When the resolution is set to 1/6,000, the -10 to 10-V range corresponds to hexadecimal values
F448 to 0BB8 (-3,000 to 3,000). The entire data range is F31C to 0CE4 (-3,300 to 3,300).
A negative voltage is expressed as a twos complement. 15
Converted Data
Hexadecimal (Decimal)
11 V 10 V 0000 (0)
0V 10 V 11 V
F448 (3000)
F31C (3300)
0 to 10 V Input
When the resolution is set to 1/6,000, the 0 to 10-V range corresponds to hexadecimal values 0000
to 1770 (0 to 6,000). The entire data range is FED4 to 189C (-300 to 6,300).
A negative voltage is expressed as a twos complement.
Converted Data
Hexadecimal (Decimal)
189C (6300)
1770 (6000)
FED4 (300)
0 to 5 V Input
When the resolution is set to 1/6,000, the 0 to 5-V range corresponds to hexadecimal values 0000 to
1770 (0 to 6,000). The entire data range is FED4 to 189C (-300 to 6,300).
A negative voltage is expressed as a twos complement.
Converted Data
Hexadecimal (Decimal)
189C (6300)
1770 (6000)
FED4 (300)
1 to 5 V Input
When the resolution is set to 1/6,000, the 1 to 5-V range corresponds to hexadecimal values 0000 to
1770 (0 to 6,000). The entire data range is FED4 to 189C (-300 to 6,300).
Inputs between 0.8 and 1 V are expressed as twos complements. If the input falls below 0.8 V,
open-circuit detection will activate and converted data will be 8000.
Converted Data
Hexadecimal (Decimal)
189C (6300)
1770 (6000)
0 to 20 mA Inputs
When the resolution is set to 1/6,000, the 0 to 20-mA range corresponds to hexadecimal values
0000 to 1770 (0 to 6,000). The entire data range is FED4 to 189C (300 to 6,300).
A negative voltage is expressed as a twos complement.
Converted Data
Hexadecimal (Decimal)
189C (6300)
1770 (6000)
1 mA 0000 (0)
0 mA 20 mA 21 mA
FED4 (300)
4 to 20 mA
Converted Data
Hexadecimal (Decimal)
189C (6300)
1770 (6000)
-10 to 10 V Outputs
When the resolution is set to 1/6,000, the hexadecimal values F448 to 0BB8 (-3,000 to 3,000) corre-
spond to an analog voltage range of -10 to 10 V.
Specify a negative voltage as a twos complement.
11 V
10 V
F31C F448
8000 (3300) (3000) 0000 (0)
Conversion Data
0V 0BB8 0CE4 7FFF Hexadecimal (Decimal)
(3000) (3300)
10 V
11 V
0 to 10 V Outputs
When the resolution is set to 1/6,000, the hexadecimal values 0000 to 1770 (0 to 6,000) correspond
to an analog voltage range of 0 to 10 V.
Specify a negative voltage as a twos complement.
10.5 V
10 V
FED4
8000 (300) 0000 (0)
Conversion Data
0V 1770 189C 7FFF Hexadecimal (Decimal)
(6000) (6300)
0.5 V
0 to 5 V Outputs
When the resolution is set to 1/6,000, the hexadecimal values 0000 to 1770 (0 to 6,000) correspond
to an analog voltage range of 0 to 5 V.
Specify a negative voltage as a twos complement.
5.25 V
5V
FED4
8000 (300) 0000 (0)
0V 1770 189C 7FFF Conversion Data
(6000) (6300) Hexadecimal (Decimal)
0.25 V
1 to 5 V Outputs
When the resolution is set to 1/6,000, the hexadecimal values 0000 to 1770 (0 to 6,000) correspond
to an analog voltage range of 1 to 5 V.
5.2 V
5V
1V
0.8 V
Conversion Data
8000 FED4 0 V 1770 189C 7FFF Hexadecimal (Decimal)
(300) (6000) (6300)
0 to 20 mA Outputs
When the resolution is set to 1/6,000, the hexadecimal values 0000 to 1770 (0 to 6,000) correspond
to an analog current range of 0 to 20 mA.
21 mA
20 mA
4 to 20 mA Outputs
When the resolution is set to 1/6,000, the hexadecimal values 0000 to 1770 (0 to 6,000) correspond
to an analog current range of 4 to 20 mA.
20.8 mA
20 mA
4 mA
3.2 mA
1770 189C 7FFF Conversion Data
8000 FED4 0 mA
(300) (6000) (6300) Hexadecimal (Decimal)
16-1-1 Overview
The CP1E CPU Unit supports PID instructions with the autotuning function. Ladder programs can be
written to perform PID temperature control.
Temperature Input from Temperature Sensor Unit to words in the Input Area.
input:
PID control: Execute using the PIDAT instruction in ladder program.
The PIDAT instruction is used in combination with the TPO instruction
(TIME-PROPORTIONAL OUTPUT) to perform time-proportional control.
Control output: To connect an SSR, connect a 24-V power supply to the transistor output and
output voltage pulses.
Ladder program
PIDAT
S S: Input word
C C: First parameter word
D D: Output word
TPO
S S: Input word
C C: First parameter word
R R: Pulse output bit
CP1E
PID
Time-proportional
transistor output
Temperature Sensor
SSR
Additional Information
The sampling cycle set for a PIDAT instruction is between 10 ms to 99.99 s in increments of
10 ms. The actual calculation cycle is determined by the relationship with cycle time. Refer to the
CP1E CPU Unit Instructions Reference Manual (Cat. No. W483) for the PIDAT instruction.
2 Wiring I/O
Connect the temperature sensor to the Tempera-
ture Sensor Unit.
Connect the SSR to the transistor output.
PIDAT Instruction
The PIDAT instruction treats the PV as unsigned hexadecimal data (0000 to FFFF hex). Signed data
cannot be used, so if the temperature range includes negative values, apply scaling with the APR
instruction.
Autotuning Procedure
1 Set the PID parameter in words C to C+10. Word C is specified by the second operand.
Example: Place the set value (SV) in C and place the input range in bits 08 to 11 of C+6. Turn
ON bit 15 of C+9 (AT Command Bit).
1 Set the PID parameter in words C to C+10. Word C is specified by the second operand.
Example: Place the set value (SV) in C, the proportional band in C+1, the integral constant in
C+2, the derivative constant in C+3, and the input range in bits 08 to 11 of C+6. Turn OFF bit 15
of C+9 (AT Command Bit).
2 Turn ON the PIDAT instructions input condition. PID control will be started with the specified
PID constants.
3 Turn ON bit 15 in C+9 (the AT Command Bit) while the input condition for the PID instruction is
ON. Autotuning will be performed. When it has finished, the AT Command Bit (bit 15 in C+9) will
turn OFF. The proportional band (C+1), integral constant (C+2), and derivative constant (C+3)
calculated by autotuning will be stored and PID control will be started with those PID constants.
System Configuration
K thermocouple
Controlled device
Inputs connected to terminal Inputs connected to
blocks CIO 0 and CIO 1 terminal block CIO 2
A K thermocouple is used for the temperature input. Use a CP1W-TS001 Temperature Sensor Unit
(thermocouple input).
C+40:D140
W1.00
When autotuning is completed, the content of D109 is automatically overwritten
by #0000 hex and the calculated PID constants are input to D101 to 103.
W1.00
Manipulated variable range: 13 bits (bits 0 to 3: #5 hex)/
RSET Input type: Manipulated variable (bits 4 to 7: #1 hex),
always read input (bits 8 to 11: #3 hex)/Output limit
100.00 disabled (bits 12 to 15: #0 hex)
C:D300 #0315
C+1:D301 &2000 Control cycle: 20.00 s
C+2:D302 &0 No upper output limit
C+3:D303 &0 No lower output limit
C+4:D304
~
Work Area
C+6:D306
Description
When W0.00 turns ON, the work area in D111 to D140 is initialized (cleared) according to the
parameters set in D100 to D110. After the work area has been initialized, autotuning is started
and the PID constants are calculated from the results from changing the manipulated variable.
After autotuning has been completed, PID control is executed according to the calculated PID
constants set in D101 to D103. The manipulated variable is output to D200. The manipulated vari-
able in D200 is divided by the manipulated variable range using the TPO instruction. This value is
treated as the duty factor which is converted to a time-proportional output and output to
CIO100.00 as a pulse output.
When W0.00 turns OFF, PID is stopped and CIO100.00 turns OFF.
When W0.00 is ON, the Thermocouples PV (-200 to 1300) is scaled to the PIDAT instruction input
range (#0 to #1FFF hex). The set values must be input according to the scaled PV. For example, if
the PV is 160C, it is set as [8191/(1300+200)] (160+200) = 1966].
16-2 Clock
The clock can be used only with the CP1E N/NA-type CPU Unit.
The current data is stored in the following words in the Auxiliary Area.
Name Address Function
Clock data A351 to A354 The seconds, minutes, hour, day of month, month, year, and day of
week are stored each cycle.
A351.00 to A351.07 Seconds: 00 to 59 (BCD)
A351.08 to A351.15 Minutes: 00 to 59 (BCD)
A352.00 to A352.07 Hour: 00 to 23 (BCD)
A352.08 to A352.15 Day of the month: 01 to 31 (BCD)
A353.00 to A353.07 Month: 01 to 12 (BCD)
A353.08 to A353.15 Year: 00 to 99 (BCD)
A354.00 to A354.07 Day of the week:
00: Sunday, 01: Monday, 02: Tuesday, 03: Wednesday,
04: Thursday, 05: Friday, 06: Saturday
16-2 Clock
Additional Information
The clock cannot be used if a battery is not installed or the battery voltage is low.
Time-related Instructions
Name Mnemonic Function
CALENDAR ADD CADD Adds time to the calendar data in the specified words.
CALENDAR SUBTRACT CSUB Subtracts time from the calendar data in the specified words.
CLOCK ADJUSTMENT DATE Changes the internal clock setting to the setting in the speci-
fied source words.
Overview
The contents of the DM Area (D) will become unstable if the power supply is interrupted for longer than
the backup time of the built-in capacitor (50 hours for an E-type CPU Unit, 40 hours for an N/NA-type
CPU Unit without a Battery). The contents of the specified words in the DM Area data can be backed up
from RAM to the built-in EEPROM backup memory during operation by turning ON a bit in the Auxiliary
Area. The number of DM Area words to back up is specified in the Number of CH of DM for backup Box
in the PLC Setup. If the Restore D0- from backup memory Check Box is selected in the PLC Setup, the
backup data will automatically be restored to RAM when the power is turned back ON so that data is
not lost even if power is interrupted.
D0
~
Specified number
of words Data
D (n-1)
restored.
16-3-2 Procedure
Perform the following procedure to save the DM data to the built-in EEPROM backup memory during
operation or while stopped.
1 Check the Restore D0- from backup memory Check Box in the Startup Data Read Area of the
PLC Setup from the CX-Programmer.
Also, set the number of words to be backed up starting from D0 in the Number of CH of DM for
backup Box. Transfer the PLC Setup to the CPU Unit and turn ON the power supply.
2 Turn ON A751.15 (DM Backup Save Start Bit) from the CX-Programmer, a Programmable Ter-
minal (PT), or a ladder program.
The specified number of words in the DM Area starting from D0 will be backed up to the built-in
EEPROM backup memory.
Using a Ladder Program
DM Backup Save
Start Bit
One cycle
DM Backup Save ON
Start Bit
(A715.15)
OFF
DM Backup Save ON
Flag
(A751.14)
OFF
When the saving operation has been completed, A751.14 (DM Backup Save Flag) will turn OFF.
To ensure concurrency between DM backup data and the contents of the DM Area in the
RAM, use exclusive processing in the ladder program so that contents of the DM Area words
in the RAM that are set to be backed up are not changed during a backup operation.
16-3-2 Procedure
that are set to be backed up ensure concurrency between DM backup data
and words in the DM Area in the RAM.
Data can be written up to 100,000 times to the built-in EEPROM backup memory. Data cannot
be written once this limit is exceeded. If writing fails, A315.15 (Backup Memory Error Flag) will
turn ON.
Additional Information
Read Protection
With the CX-Programmer, it is possible to set read protection using a password for the whole ladder
program.
When the program is read-protected using a password, it is not possible to display or edit any of the lad-
der programs using the CX-Programmer unless the password is entered in the Disable Password Dia-
log Box from the CX-Programmer.
This enables improved security for PLC data in equipment.
Setting Protection
1 Right-click the PLC in the project tree to open the Protection Tab Page of the PLC Proper-
ties.
Properties
4 Confirm that the setting item is checked, then click the OK button.
FINS FINS
Ethernet
PLC PLC
Note 1 Please use CX-Programmer version 9.12 or higher (CX-ONE version 4.1 or higher).
2 Use the Web browser to set the CP1W-CIF41.
3 NS-series HMI cannot use CP1W-CIF41 through Ethernet.
17-1-2 Features
17-1-2 Features
17-1-3 Specifications
Item Specifications
Name CP-series Etherent Option Board
Model number CP1W-CIF41
Type 100Base-TX (Can be used as 10 Base-T )
Applicable Programming Device CX-Programmer version 9.12 or higher
Unit classification CP-series Option Board
Mounting location One slot for a CP-series Option Board
Size of Buffers 8K bytes
Transfer Media access method CSMA/CD
Modulation method Baseband
Transmission paths Star form
Baud rate 100 Mbit/s (100Base-TX) 10 Mbit/s (10Base-T)
17-1-3 Specifications
17-1-4 Software Configuration
The software supported by the Ethernet Option Board runs in the layers shown in the following diagram.
It is necessary to set the communications settings before connecting the Ethernet Option Board to the
CP1E CPU Unit by the Host Link protocol. Refer to Serial Communications Settings of the Option Board
in section 17-2-1.
FINS/UDP FINS/TCP
IP ICMP APR
Ethernet (Ver.2.0)
Basic Functions
FINS commands can be received from other PLCs or computers on the same Ethernet network by
executing SEND(090), RECV(098), or CMND (490) instructions in the ladder diagram program. This
enables various control operations such as the reading and writing of I/O memory between PLCs,
mode changes, and file memory operations.
Ethernet
IP UDP or TCP FINS
CP1E N/NA-type
CPU Unit
Executing, from the host computer, FINS commands with UDP/IP or TCP/IP headers enables vari-
ous control operations, such as the reading and writing of I/O memory between PLCs, mode
changes, and file memory operations.
For example, it is possible to connect online via Ethernet from FINS communications applications
such as the CX-Programmer, and to perform remote programming and monitoring.
Upgraded Functions
With the CP1W-CIF41, the following functions have been upgraded.
The FINS communications service can be executed not only with UDP/IP but also with TCP/IP,
and it is even possible to use FINS communications with both UDP/IP and TCP/IP together on the
same network. Using TCP/IP makes FINS communications highly reliable.
Even if the IP address and UDP port number of the host computer (a DHCP client computer) are
changed, it is still possible for the host computer to send FINS commands to PLCs on the Ether-
net network and to receive responses. When UDP is used, either the automatic generation
(dynamic) method or the IP address table method must be selected for IP address conversion.
When TCP is used, changes in IP address and TCP port numbers are handled automatically.
Multiple FINS applications (CX-Programmer and user-created application programs) at the same
computer can be connected online to a PLC via Ethernet (using either TCP/IP or UDP/IP).
Note The message service does not guarantee that a message will reach the destination node. A message may
be lost during transmission due to factors such as noise. To prevent this from occurring when using message
services, it is common to set up retry processing at the node from which instructions are issued. With the
SEND(090), RECV(098), and CMND(490) instructions, retry processing is executed automatically by speci-
fying the number of retries, so specify a number other than 0.
Other Items set for each UDP port Items set for each connection
Broadcast Server specification
Address conversion method Remote IP address spec.
Server: specify IP addresses of clients permitted
to connect.
Automatic FINS node address allocation
Specify automatic allocation of client FINS node 17
addresses
Internal table This is a table of correspondences for remote FINS node addresses, remote IP
The differences between the Ethernet Option Board and the CS/CJ series Ethernet Unit are as follows.
Connect with the CPU Unit by the Host Link (serial communications) whose internal baud rate is 115.2
kbps.
The size of communications buffers is 8K bytes, one fifty of that of the CS/CJ series Ethernet Unit.
Therefore, the communication performance is slower than the CS/CJ series Ethernet Unit.
Refer to the following processing time (Netwok delay is not included), when accessing to the CP-series CPU
Unit through the Ethernet Option Board.
When accessing to the CP1E CPU Unit and reading 269 words from the DM area, if the cycle time of the
CPU Unit is 10 ms, the processing time will be more than 225 ms and less than 356 ms.
For the CS/CJ series CPU Unit who installs the Ethernet Unit, when executing the same task, the process-
ing time will be approximately 20 ms, up to 17 times faster.
The CP1E CPU Unit does not support the Toolbus protocol, so the Ethernet Option Board version 1.0
cannot be used.
Use the Ethernet Option Board Set only the IP address Set system settings freely
without making any settings
Start communication
When the Ethernet Option Board is applied on the CP1E CPU Unit, it is necessary to set the
baud rate to 115,200 and the mode to Host Link.
At the following settings, ERR LED of the Ethernet Option Board will be flashing.
Check and change the settings. (It is possible to change settings either by USB or by Ethernet.)
Baud rate: 9,600
Unit number: 0
However, except the settings mentioned above, ERR LED will be lit if the communications is impos-
sible between the CPU Unit and the Ethernet Option Board. Check and change the settings.
If setting the mode to Host Link and the baud rate to any value except 9,600 or 115,200, the
CP1E CPU Unit cannot be connected with Ethernet. Change the PLC Settings by USB.
17-3 Settings
The Ethernet Option Boards system settings can be set using the Web browser of a personal computer
or other devices connected with Ethernet. The setting values are saved in the Ethernet Option Boards
EEPROM.
The settings will be read from the allocated words when the power of the CP1E CPU Unit is turned ON
again.
Web browser of Internet Explorer
Ethernet
CP1E N/NA
CPU Unit IP ADDRESS:
EEPROM
SUBNET MASK:
COMMERR
10BASE-T
100BASE-TX
17-3 Settings
* Use the default settings 192.168.250.1 The setting values are saved
in this example. in the EEPROM.
Additional Information 17
If the Ethernet Option Boards IP address cannot be set by the Web browser function, it can be
SUBNET MASK:
COMM ERR
10BASE-T
100BASE-TX
Ethernet
CIO area allocation Internal status
Read the
80 status Status
Port(right)
82
Each cycle
Note The initial settings of the Ethernet Option Board cannot be set in the allocated words in the DM area or in the
CX-Programmers system settings.
17-3 Settings
Using the FINS/TCP Method
Item Initial settings
FINS/TCP Port 9,600
FINS/TCP Connection Setup None
FINS/TCP Protected Use protection function according to IP 17
address
IP address
Factory setting
IP ADDRESS:
When setting neither in the
SUBNET MASK:
allocated words in the DM area
nor by the Web browser function Method 1: Set by the Web browser Method 2: Set to 0.0.0.0 from the Web
function browser, and then set in the allocated
words in the DM area
COMM ERR
10BASE-T
100BASE-TX
1 Connect to the Ethernet Option Board from the Web browser using the Ethernet Option Boards
default IP address.
http://192.168.250.1/E00.htm
17-3 Settings
17
3 Select Settings from the menu on the left side of the window to display the Settings Menu.
6 After entering the correct values, click the Transfer Button to transfer the settings to the Ethernet
Option Board.
7 To enable the new settings, turn the power to the Ethernet Option Board OFF and ON again, or
click the Restart Button.
The functions of the buttons are as follows.
Button Function
Transfer Transfer the entered values from the personal computer to the Ethernet Option
Board. (The new settings are invalid until the Ethernet Option Board has been reset.)
Cancel Cancel the entered values.
Restart Restart the Ethernet Option Board to enable the new settings after transfer.
The Restart button is invalid to the PLC.
System Format
17-3 Settings
17
IP Address Table
Set the IP address table that defines the relationship between FINS node addresses and IP addresses.
With FINS/UDP, this is enabled only when the IP address table method is set to the IP address conver-
sion method.
17-3 Settings
IP Router Table
Set the IP router table when the Ethernet Option Board is to communicate through the IP router with
nodes on another IP network segment. 17
Unit Information
Parameter Contents
Model Show the model information of the Ethernet Option
Board.
Version Show the version information of the Ethernet Option
Board.
IP Address Show the IP address of the Ethernet Option Board.
Subnet Mask Show the subnet mask of the Ethernet Option Board.
17-3 Settings
FINS/UDP Port Number Show the FINS/UDP port number of the Ethernet
Option Board.
Use Input Port Number Show the effective port number setting mode.
Broadcast Setting Show the broadcast setting of the Ethernet Option
Board.
IP Address Conversion Show the IP address conversion method of the Ether- 17
net Option Board.
Ethernet Address Show the MAC ID of the Ethernet Option Board.
Unit Status
Parameter Contents
Error Flags Indicate the operating status and errors that occurred
when the Ethernet Option Board is turned ON.
Total Number of Packets Show the total number of packets received by the Ether-
Received net Option Board.
Total Number of Receive Show the total number of errors detected while the
Errors Ethernet Option Board was receiving.
The types of errors detected are short packet errors,
alignment errors, CRC errors, frame length errors and
communication controller overflow errors.
Total Number of Packets Show the total number of packets sent by the Ethernet
Sent Option Board.
Total Number of Errors Show the total number of errors detected while the
Sent Ethernet Option Board was sending.
FINS Status
Parameter Contents
Node Show the FINS node address.
Connection Type Show the protocol used by connection with the related
node address.
Local Port No. Show the port number of the Ethernet Option Board for
connection with the related node address.
Remote IP Show the IP address of the related node address.
17-3 Settings
Remote Port No. Show the remote port number of the related node
address for connection.
TCP Connection No. If the connection is the FINS/TCP, show the connection
number (1 to 4).
TCP Status If the connection is the FINS/TCP, show the current con-
nection status.
17
The details of TCP status are listed as the following table.
Status Meaning
Error Log
Parameter Contents
No. Show the error recorder number.
Error Code Show the error code of the error recorder.
Detail Code Show the detail error code of the error recorder.
Date Show the date of the error recorder.
The memory allocation about system setup is shown as the following diagram. These data will be allo-
cated to the DM area of PLC. The range of the DM area is D1300 to D1456.
Offset D15 D0
D1300 Mode setting (1 word)
D1301 FINS/TCP port number (1 word)
D1302 FINS/UDP port number (1 word)
D1303
IP address (2 words)
D1304
D1305
Subnet mask (2 words)
D1306
D1307 Reserved (1 word)
Note 1 D1300 to D1454 can only display all of the settings stared in the unit. Modification in this area is invalid to
the CP1W-CIF41 Ethernet Option Board.
2 D1455 and D1456 will display the IP address used by the CP1W-CIF41 when the power is turned ON.
3 When the IP address is illegal, such as using CLASS D, CLASS E IP address, the values in D1303 and
D1304 will be different from the ones in D1455 and D1456, and the CP1W-CIF41 will temporarily use the
default IP address (192.168.250.1). Use this IP address to modify the IP address settings through Web
browser.
4 When the system settings are wrong, A525 can be used to reset CP1W-CIF41.
Refer to Appendix A-2 for details.
Mode Setting
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
D1300 0 0 0 0 0 0 0 0 0
Broadcast address
IP address conversion method
FINS/UDP port number
FINS/TCP port number
FINS/UDP destination IP mode
FINS/TCP protect function
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
D1301 FINS/TCP port number (hex)
D1302 FINS/UDP port number (hex)
IP Address
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
D1303 (1)(2) (3)(4)
D1304 (5)(6) (7)(8)
Subnet Mask
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
D1305 (1)(2) (3)(4)
D1306 (5)(6) (7)(8)
IP Address Table
00
17
FINS node IP address
number
Offset 15 8 7 0
D1438 FINS/TCP Port Settings
D1439 FINS/TCP connection No.1 FINS/TCP connection No.1
D1440 FINS/TCP connection No.1 FINS/TCP connection No.1
D1441 FINS/TCP connection No.1 FINS/TCP connection No.2
D1442 FINS/TCP connection No.2 FINS/TCP connection No.2
D1443 FINS/TCP connection No.2 FINS/TCP connection No.2
D1444
Reserved (Always 0)
D1448
Protect setting
(Connection No.2)
Protect setting
(Connection No.1)
HTTP Password
D1452
D1453 HTTP Port number
If the password for accessing the Ethernet Option Boards Web page is forgotten, find out it in this
area. It is written in ASCII format.
Service Status
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CIO 80 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 is used for detect power condition of PLC, so do not change it at any time. Otherwise the
CP1W-CIF41 Ethernet Option Board will generate error.
Error Status
The status of errors that occur at the Ethernet Option Board is reflected as shown in the following dia-
gram.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CIO 81 0 0 0 0 0 0 0 0 0 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CIO 81 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Logged Errors
The following errors are recorded in the error log.
Errors in network operation
Errors in data transfers
Error in the CPU unit
When the values set by the Web browser function are wrong, the local IP address in valid at that
time will be saved, not the values set in the words D1355 and D1356. Confirm the data of D1303
and D1304 in the PLC memory for the settings from the Web browser, after connecting the
CX-Programmer online by USB.
Example
Network typeEthernet
Ethernet
Confirm the Communications Settings on the Serial Option Port Tab in the PLC Settings Dialog
Box of the CP1E CPU Unit. If the mode is set to Host Link and the baud rate to 9,600 or other
values except 115,200, the CP1E CPU Unit cannot be connected with Ethernet. ERR LED of the
Ethernet Option Board will be lit. Change the PLC Settings by USB port.
Procedure
The default setting for Address Conversion Mode of the Ethernet Option Board is
Auto (Dynamic), so slecet Auto-detect in the field of Workstation Node Number.
Therefore, according to computer's IP address, computer's FINS node address is set
automatically in the CX-Programmer. At that time, IP address post number and FINS
node address are the same.
In this example, 2 is displayed according to the host number of computer's IP
address 192.168.250.2 set by manual, and it is invalid to change the setting.
Set IP address to 192.168.250.1, which is the Ethernet Option Board's IP address.
Set FINS/UDP Port to 9600 (default), which is the UDP port number in the FINS
communications service.
The basic configuration for a 100Base-TX Ethernet System consists of one hub to which nodes are
attached in star form using twisted-pair cable. The devices shown in the following table are required to
configure a network with 100Base-TX-type CP1W-CIF41, so prepared them in advance.
Network device Contents
1. Ethernet Option Board The Ethernet Option Board is a Communication Unit
(CP1W-CIF41) that connects a CP1E N/NA-type CPU Unit to
100Base-TX Ethernet networks.
(They can also be used as 10Base-T.)
2. Twisted-pair cable This is twisted-pair cable for connecting 100Base-TX
type Ethernet Option Board to the hub, with an RJ45
Modular Connector at each end.
Use a category 3, 4, 5, or 5e UTP (unshielded twisted
pair) or STP (shielded twisted-pair) cable.
3. Hub This is a relay device for connecting multiple nodes in
Basic Precautions
Press the cable connector in firmly until it locks into place at both the hub and the Ethernet Option
Board.
After laying the twisted-pair cable, check the connection with a 10Base-T cable tester.
Environment Precautions
The UTP cable is not shielded, and the hub is designed for use in OA environments. In environ-
ments subject to noise, construct a system with shielded twisted-pair (STP) cable and hubs suit-
able for an FA environment.
Do not lay the twisted-pair cable together with high-voltage lines.
Do not lay the twisted-pair cable near devices that generate noise.
Do not lay the twisted-pair cable in locations subject to high temperature or high humidity.
Do not lay the twisted-pair cable in locations subject to excessive dirt and dust or to oil mist or
other contaminants.
Environment Precautions
Do not install the hub near devices that generate noise.
Do not install the hub in locations subject to high temperature or high humidity.
Do not install the hub in locations subject to excessive dirt and dust or to oil mist or other contam-
inants.
Cascade Connections
Connect two hubs to each other as follows:
Connect an MDI port to an MDI-X port with a straight cable;
Connect two MDI ports with a cross cable;
Connect two MDI-X ports with a cross cable.
Note It is very difficult to distinguish cross cables and straight cables by appearance. Incorrect cables will cause
communications to fail. We recommend using cascade connections with straight cables whenever possible.
With cascade connections, up to 5 segments can be connected using up to 4 repeaters (i.e., 4
hubs).
Stack Connections
Connect the hubs using special cables or special racks.
Normally there is no limit to the number of hubs in a stack, and each stack is treated as one hub.
Some hubs, however, are limited in the number of hubs per stack.
Hub
Note Limited by the CP1W-CIF41 inner bus protocol (Host Link, 7,2,E, 115200 bps), the system response perfor-
mance is longer than the existing Ethernet Unit. Please consider the FINS command processing time and
buffer limitation when using the CP1W-CIF41 Ethernet Option Board.
Note 1 To use CX-Programmer version 8.2 with a CP1E CPU Unit, the CX-One version 3 auto-update must be
installed.
2 Use the CX-Programmer version 9.12 or higher, when CP1W-CIF41 is applied.
The CX-Programmer for CP1E and CX-Programmer (CX-One/CX-One Lite) can be used at the same time.
The CX-Programmer (CX-One/CX-One Lite) and the CX-Programmer for CP1E can be installed on
the same computer and both applications can be run at the same time.
1 Start the CX-Programmer (CX-One/CX-One Lite) and CX-Programmer for CP1E together.
2 Copy the rungs of the program to be used from the Ladder Programming Window of the CX-Pro-
grammer (CX-One/CX-One Lite), and paste them into the CX-Programmer for CP1E.
Additional Information
Files created with the CX-Programmer for CP1E (.CXE) can be opened with CX-Programmer
version 8.2 and higher.
18-2-1 CX-Programmer
The CX-Programmer is a programming application for creating the ladder programs that are executed in
a CP1E CPU Unit.
In addition to ladder program creation, the CX-Programmer also has functions that are needed to set up
and operate the CP1E, including functions for debugging ladder programs, displaying addresses and
present values, monitoring, setting the connected PLC, programming, and monitoring.
The CX-Programmer has fewer sub-menus, making it relatively simple.
The installation of the CX-Programmer is described in 4-1-5 Installing the Software in the CP1E CPU
Unit Hardware Users Manual (Cat. No. W479).
For details on the operation of the CX-Programmer, refer to the CX-Programmer Online Help.
2 Create new project Select CP1E in the Change PLC Dialog Box.
18-2-1 CX-Programmer
5 Connect online to the CP1E Select PLC - Work Online.
8 Restart the CP1E Once turn OFF the power supply to the CP1E CPU Unit, then turn
ON again.
9 Start operation
CP1E CPU Unit operation will start.
Start CX-Programmer
Select Start - Programs - OMRON - CX-One - CX-Programmer.
The CX-Programmer will start.
The title display will appear, followed by the Main Window.
Main Window
Title Bar
Displays the name of the project.
Main Menu
Displays the menus from which commands are selected.
Toolbar
Displays the icons for executing commands.
1
2
3
4
Rung Number
Program Address
Rung Header 18
If a rung is incomplete, a red line will be displayed on the right side of the rung header.
Bus Bar
18-2-3 Help
The CX-Programmer Help describes all the operations of CX-Programmer. It provides an introduction
to the various windows and panes and describes basic operations, ladder program creation, and moni-
toring. It also describes each of the instructions, including operand notation and contents.
18
Additional Information
If USB is not displayed for the network type, refer to 4-2-2 Installing the USB Driver in the CP1E
CPU Unit Hardware Users Manual (Cat.No.W479), and check that the USB driver has been
installed correctly.
Additional Information
The symbols indicating these instruction variations will be added to the beginning of the instruc-
tion whenever they are input regardless of whether the cursor is before (example: |LD), in the
middle (example:L|D), or at the end (example: LD|) of the instruction.
After an instruction has been entered, the variation can be changed as follows.
@: Upward differentiation
%: Downward differentiation
!: Immediate refreshing
Shift + 0: No differentiation
Input Example
Inputting Instructions
A mnemonic can be entered directly as a character string.
When you enter the first letter, a list of candidate mnemonics will be displayed. Use the Up Cursor and
Down Cursor Keys to move up and down through this list, and then press the Enter Key to make a
selection. Then, input the operands.
18
2 Press the Enter Key.
1 Select the above rung and then select Address Increment Copy from the Edit Menu.
The following dialog box will be displayed.
2 In the Offset Area set the Bit Field to 16 and the CH Field to 10 for this example.
Click the Paste Button.
As shown below, the addresses are automatically incremented and the rung is pasted as the
next rung.
Addresses are
automatically incremented
when the rung is pasted.
Bits:
Example: Incrementing by +16 Bits (One Word)
Example: CIO 0.00 is incremented to CIO 1.00.
Words:
Example: Incrementing by +10 Words
Example: D100 is incremented to D110.
Example: Example:
Example:
The symbol name ALARM_1 is automatically
created from the symbol name ALARM.
Any number at the end of When there are no numbers in the I/O
an I/O comment is
incremented by 1.
comment, sequential numbers starting
from 1 will be added after an underbar.
18
Automatically incremented.
18
Note The Comment Dialog Box shown above is displayed only when the Show with comment dialog Option is
selected on the Options - Diagrams Dialog Box. The Options - Diagrams Dialog Box is accessed by select-
ing Options from the Tools Menu.
CX-Programmer
CP1E
1 Open the project containing the program to be transferred from the CX-Programmer.
18
Additional Information
Change to PROGRAM mode before transferring the PLC Setup and ladder program.
1 Change to PROGRAM mode, select Operating Mode - Program from the PLC Menu, and then
click the Yes Button.
Additional Information
For details on the transfer options, refer to the CX-Programmer Online Help.
Use the following procedure to change the operating mode to RUN mode. To perform trial operation for
debugging or adjustments, change the operating mode to MONITOR mode.
18
Precautions for Safe Use
Additional Information
PROGRAM mode cannot be changed to MONITOR or RUN mode when the user program, PLC
Setup settings and DM area data in the CPU Units are being backed up. Change the operating
mode after the backup is completed.
Window Frames
You can drag the frames in the window to display different views of the program in the Ladder Sec-
tion Window. The window can be split into up to four sections.
1 While online, select Window - Watch Window from the View Menu.
2 Input an address.
The bit status or word contents will
be displayed. For BOOL data, 0 indi-
cates OFF.
Additional Information
When entering an address, place a period between the word address and bit number. For
example, to input the address of bit 04 in CIO 0, input 0.04.
An address can be input by dragging it from the Ladder Section Window and dropping it into
the Watch Window. By dragging and dropping the header of a rung, all of the addresses on
that rung can be input.
Force-setting a bit.
Additional Information
When a ladder program has been changed using online editing, the cycle time may increase
by one or more cycles, or it may not be possible to read an input signal.
Major changes, such as moving a rung, copying, inserting, or deleting, should be done offline
and then the program should be transferred to the CP1E again.
After completing online editing, the results of editing are backed up to backup memory, result-
ing in a longer cycle time. While this is being done, the BKUP indicator will be lit, and the
CX-Programmer will indicate the progress.
An increase of one cycle will be 16ms maximum daring online editing and 8% of cycle time
during back up.
Appendices
App
A-1-16 Subroutine Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-35
A-1-17 Interrupt Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-36
A-1-18 High-speed Counter/Pulse Output Instructions . . . . . . . . . . . . . . . . . . . . . . . A-37
A-1-19 Step Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-44
A-1-20 Basic I/O Unit Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-45
A-1-21 Serial Communications Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-49
A-1-22 Clock Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-50
A-1-23 Failure Diagnosis Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-51
A-1-24 Other Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-51
A-2 Auxiliary Area Allocations by Address . . . . . . . . . . . . . . . . . . . . . . . . . . . A-52
A-2-1 Read-only Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-52
A-2-2 Read/Write Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-70
A-3 Response Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-80
A-3-1 I/O Response Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-80
A-3-2 Interrupt Response Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-82
A-3-3 Serial PLC Link Response Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-83
A-3-4 Pulse Output Start Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-84
A-3-5 Pulse Output Change Response Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-84
A-4 PLC Operation for Power Interruptions . . . . . . . . . . . . . . . . . . . . . . . . . . . A-85
Starting point
of block
LOAD NOT LD NOT @/%/!/!@/!% Bus bar Indicates a logical start and creates an ON/OFF execution condi-
tion based on the reverse of the ON/OFF status of the specified
operand bit.
Starting point
of block
AND AND @/%/!/!@/!% Symbol Takes a logical AND of the status of the specified operand bit and
the current execution condition.
AND NOT AND NOT @/%/!/!@/!% Symbol Reverses the status of the specified operand bit and takes a logi-
cal AND with the current execution condition.
OR OR @/%/!/!@/!% Bus bar Takes a logical OR of the ON/OFF status of the specified operand
bit and the current execution condition.
OR NOT OR NOT @/%/!/!@/!% Bus bar Reverses the status of the specified bit and takes a logical OR
with the current execution condition.
AND LOAD AND LD --- Takes a logical AND between logic blocks.
Logic block Logic block
LD
to Logic block A
LD
to Logic block B
LD
to Logic block A
Logic block
LD
to Logic block B
OUTPUT NOT OUT NOT ! Reverses the result (execution condition) of the logical processing,
and outputs it to the specified bit.
Reset
S execution
condition
R execution
condition
Status of B
App
DIFFERENTI- DIFU ! DIFU(013) turns the designated bit ON for one cycle when the
DIFU(013)
ATE UP execution condition goes from OFF to ON (rising edge).
B
Execution
A-1-2 Sequence Output Instructions
B: Bit condition
Status of B
One cycle
DIFFERENTI- DIFD ! DIFD(014) turns the designated bit ON for one cycle when the
DIFD(014)
ATE DOWN execution condition goes from ON to OFF (falling edge).
B
Execution
B: Bit condition
Status of B
One cycle
SET SET @/%/!/!@/!% SET turns the operand bit ON when the execution condition is ON.
SET
B Execution
condition of SET
B: Bit
Status of B
MULTIPLE BIT SETA @ SETA(530) turns ON the specified number of consecutive bits.
SETA(530)
SET
D
N1
N2 bits are set
N2 to 1 (ON).
D: Beginning word
N1: Beginning bit
N2: Number of bits
MULTIPLE BIT RSTA @ RSTA(531) turns OFF the specified number of consecutive bits.
RSTA(531)
RESET
D
N1
N2 N2 bits are
reset to 0
D: Beginning word (OFF).
N1: Beginning bit
N2: Number of bits
SINGLE BIT SETB @/!/!@ SETB(532) turns ON the specified bit in the specified word when
SETB(532)
SET the execution condition is ON.
D
Unlike the SET instruction, SETB(532) can be used to reset a bit
N in a DM word.
D: Word address
N: Bit number
SINGLE BIT RSTB @/!/!@ RSTB(533) turns OFF the specified bit in the specified word when
RSTB(533)
RESET the execution condition is ON.
D
Unlike the RSET instruction, RSTB(533) can be used to reset a bit
N in a DM word.
D: Word address
N: Bit number
NO OPERA- NOP --- --- This instruction has no function. (No processing is performed for
TION NOP(000).)
INTERLOCK IL --- Interlocks all outputs between IL(002) and ILC(003) when the exe-
IL(002)
cution condition for IL(002) is OFF. IL(002) and ILC(003) are nor-
mally used in pairs.
Execution Execution
condition ON condition OFF
Execution
condition
Normal Outputs
Interlocked section execution
of the program interlocked.
INTERLOCK ILC --- All outputs between IL(002) and ILC(003) are interlocked when
ILC(003)
CLEAR the execution condition for IL(002) is OFF. IL(002) and ILC(003)
are normally used in pairs.
MULTI-INTER- MILH --- When the execution condition for MILH(517) is OFF, the outputs
MILH (517)
LOCK DIFFER- for all instructions between that MILH(517) instruction and the next
ENTIATION N MILC(519) instruction are interlocked. MILH(517) and MILC(519)
HOLD D are used as a pair.
N: Interlock number MILH(517)/MILC(519) interlocks can be nested (e.g., MILH(517)-
D: Interlock Status Bit MILH(517)-MILC(519)-MILC(519)).
If there is a differentiated instruction (DIFU, DIFD, or instruction
with a @ or % prefix) between MILH(517) and the corresponding
MILC(519), that instruction will be executed after the interlock is
App
is cleared even if the differentiation condition of the instruction was
established.
MULTI-INTER- MILC --- Clears an interlock started by an MILH(517) or MILR(518) with the
MILC (519)
LOCK CLEAR same interlock number.
N
A-1-3 Sequence Control Instructions
All outputs between MILH(517)/MILR(518) and the corresponding
N: Interlock number MILC(519) with the same interlock number are interlocked when
the execution condition for MILH(517)/MILR(518) is OFF.
JUMP JMP --- When the execution condition for JMP(004) is OFF, program exe-
JMP(004)
cution jumps directly to the first JME(005) in the program with the
N same jump number. JMP(004) and JME(005) are used in pairs.
N: Interlock number Execution condition
Instructions in
this section
are not
executed and
Instruc- Instructions out-put status
tions jumped is maintained.
ex- The instruction
ecuted execution time
for these
instructions is
eliminated.
Execution condition
Instructions in
this section are
not executed
and out-put
Instruc- status is
tions Instructions
jumped maintained.
ex- The instruction
ecuted execution time
for these
instructions is
eliminated.
N: Interlock number
FOR-NEXT FOR --- The instructions between FOR(512) and NEXT(513) are repeated
FOR(512)
LOOPS a specified number of times. FOR(512) and NEXT(513) are used
N in pairs.
N: Number of loops
Repeated N times
BREAK LOOP BREAK --- Programmed in a FOR-NEXT loop to cancel the execution of the
BREAK(514)
loop for a given execution condition. The remaining instructions in
the loop are processed as NOP(000) instructions.
N repetitions Condition a ON
Repetitions
forced to
end.
Processed as
NOP(000).
FOR-NEXT NEXT --- The instructions between FOR(512) and NEXT(513) are repeated
NEXT(513)
LOOPS a specified number of times. FOR(512) and NEXT(513) are used
in pairs.
SV
Timer PV
0
Completion ON
Flag OFF
Timer PV SV
TIMHX ---
TIMHX(551) 0
(Binary)
N
Completion ON
Flag OFF
S
Timer PV SV
0
Completion ON
Flag OFF
App
TIMER (BCD) units of 1-ms. The setting range for the set value (SV) is 0 to 9.999 s
N for TMHH(BCD) and 0 to 65.535 s for TMHHX(Binary).
S The timing charts for TMHH(540) and TMHHX(552) are the same
N: Timer number as those given above for TIMH(015).
S: Set value
A-1-4 Timer and Counter Instructions
Timer input ON
TMHHX --- OFF
TMHHX(552) SV
(BCD)
N Timer PV 0
S Completion ON
Flag OFF
N: Timer number
S: Set value
Timer Input Turned OFF before Completion
Flag Turns ON
Timer input ON
OFF
SV
Timer PV 0
Completion ON
Flag OFF
LONG TIMER TIML --- TIML(542)/TIMLX(553) operates a decrementing timer with units
(BCD) TIML(542) of 0.1-s that can time up to approx. 115 days for TIML(BCD) and
D1 49,710 days for TIMLX(Binary).
D2 Timer input ON
OFF
S
SV
D1: Completion Flag Timer PV
D2: PV word
S: SV word
0
TIMLX ---
TIMLX(553) Completion Flag ON
(Binary) (Bit 00 of D1) OFF
D1
D2
S
D1: Completion Flag
D2: PV word
S: SV word
COUNTER CNT --- Count CNT/CNTX(546) operates a decrementing counter. The setting
CNT
(BCD) input range for the set value (SV) is 0 to 9,999 for CNT(BCD) and 0 to
N 65,535 for CNTX(Binary).
S
ON
Reset
input Count input OFF
N: Counter number ON
S: Set value Reset input
OFF
CNTX ---
Count CNTX(546) SV
(Binary) input Counter PV
N
S 0
Reset ON
input Completion
Flag OFF
N: Counter number
S: Set value
Counter PV
CNTRX --- 0
Increment CNTRX(548)
(Binary) input
Decrement N
input SV
Counter PV
Reset S
input
+1
0
N: Counter number
S: Set value
ON
Completion Flag
OFF
SV 1
Counter PV
ON
Completion Flag
OFF
CNRX @
(Binary) CNRX(547)
N1
N2
App
A-1-4 Timer and Counter Instructions
S1
S2 OR
One-word
S1: Comparison data 1
S2: Comparison data 2
Double length
S1: 1st word of comparison data 1
S2: 1st word of comparison data 2
<
Time Compari- LD, AND, OR + --- Time comparison instructions compare two BCD time values and
LD (LOAD):
son = DT, <> DT, create an ON execution condition when the comparison condition
< DT, <= DT, Symbol is true.
> DT, >= DT C There are three types of time comparison instructions, LD (LOAD),
S1 AND, and OR. Time values (year, month, day, hour, minute, and
second) can be masked/unmasked in the comparison so it is easy
S2
to create calendar timer functions.
C: Control Word
AND:
Bits 00 to 05 of C specify whether or not the time data will be
Symbol masked for the comparison. Bits 00 to 05 mask the seconds,
minutes, hours, day, month, and year, respectively. If all 6 val-
C
ues are masked, the instruction will not be executed, the execu-
S1 tion condition will be OFF, and the Error Flag will be turned ON.
S2
15 8 7 6 5 4 3 2 1 0
C 0 0 0 0 0 0 0 0 0 0
OR:
Masks seconds data when ON.
Symbol Masks minutes data when ON.
Masks hours data when ON.
C Masks day data when ON.
Masks month data when ON.
S1 Masks year data when ON.
S2
C: Control word
S1: 1st word of present time
S2: 1st word of comparison time
UNSIGNED CMP ! Compares two unsigned binary values (constants and/or the con-
COMPARE CMP(020) tents of specified words) and outputs the result to the Arithmetic
S1 Flags in the Auxiliary Area.
S2 Unsigned binary
comparison
Arithmetic Flags
(>, >=, =, <=, <, <>)
S2 Unsigned binary
comparison
S1: Comparison data 1 S1+1 S2+1
S2: Comparison data 2
Arithmetic Flags
(>, >=, =, <=, <, <>)
SIGNED CPS ! Compares two signed binary values (constants and/or the con-
BINARY COM- CPS(114) tents of specified words) and outputs the result to the Arithmetic
PARE S1 Flags in the Auxiliary Area.
S2 Signed binary
comparison
DOUBLE CPSL --- Compares two double signed binary values (constants and/or the
SIGNED CPSL(115) contents of specified words) and outputs the result to the Arith-
BINARY COM- S1 metic Flags in the Auxiliary Area.
PARE
S2 Signed binary
comparison
S1: Comparison data 1 S1+1 S2+1
S2: Comparison data 2
Arithmetic Flags
(>, >=, =, <=, <, <>)
TABLE COM- TCMP @ Compares the source data to the contents of 16 words and turns
PARE TCMP(085) ON the corresponding bit in the result word when the contents are
S equal.
T Comparison R
1: Data
R are equal.
0: Data
aren't equal.
S: Source data
T Comparison data 0
T+1 Comparison data 1
to to
T+15 Comparison data 15
UNSIGNED BCMP @ Compares the source data to 16 ranges (defined by 16 lower limits
App
BLOCK COM- BCMP(068) and 16 upper limits) and turns ON the corresponding bit in the
PARE S result word when the source data is within the range.
T Ranges
1: In range
0: Not in range
A-1-5 Comparison Instructions
R
Lower limit Upper limit R
S: Source data T to T+1 0
T: 1st word of table
R: Result word T+2 1
Source data to T+3
T+28 to T+29 14
T+30 to T+31 15
B: First word of block
LL
UL
DOUBLE ZCPL --- Compares the 32-bit unsigned binary value in CD and CD+1 (word
AREA RANGE ZCPL(116) contents or constant) to the range defined by LL and UL and out-
COMPARE CD puts the results to the Arithmetic Flags in the Auxiliary Area.
LL
UL
S Source word
D
S: Source
D: Destination
Bit status not
changed.
Destination word
MOVE NOT MVN @ Transfers the complement of a word of data to the specified word.
MVN(022)
S Source word
D
S: Source
D: Destination Bit status
inverted.
Destination word
S
C
D
S: Source word or data
C: Control word
D: Destination word
C: Control Word
15 8 7 0
C m n
Source bit: 00 to 0F
(0 to 15 decimal)
Destination bit: 00 to 0F
(0 to 15 decimal)
MOVE DIGIT MOVD @ Transfers the specified digit or digits. (Each digit is made up of 4
MOVD(083) bits.)
S 15 12 11 8 7 4 3 0
C C 0 l n m
n
D
m
S: Source word or data S
C: Control word
D: Destination word
l
D
C: Control Word
15 12 11 8 7 4 3 0
C 0 n m
C
S
D
App
C: Control word
S: 1st source word
D: 1st destination word
A-1-6 Data Movement Instructions
C: Control Word
15 8 7 4 3 0
C n m
First bit in S ( ): 0 to F
(0 to 15)
First bit in D (m): 0 to F
(0 to 15)
Number of bits (n): 00 to FF
(0 to 255)
N: Number of words
S: 1st source word N: Number of Words
D: 1st destination word The possible range for N is 0000 to FFFF (0 to 65,535 decimal).
15 0
S
to
S+(N-1)
15 0
D
to
D+(N-1)
BLOCK SET BSET @ Copies the same word to a range of consecutive words.
BSET(071)
Source word Destination words
S
St
St
E
S: Source word
St: Starting word
E: End word
E
E2
SINGLE DIST @ Transfers the source word to a destination word calculated by add-
WORD DIS- DIST(080) ing an offset value to the base address.
TRIBUTE S
S Bs Of
Bs
Of
S: Source word
Bs: Destination base address
Of: Offset
Bs+n
DATA COL- COLL @ Transfers the source word (calculated by adding an offset value to
LECT COLL(081) the base address) to the destination word.
Bs
Bs Of
Of
D
REVERSIBLE SFTR @ Creates a shift register that shifts data to either the right or the left.
SHIFT REGIS- SFTR(084)
TER C
St E St Data input
E Shift
direc-
E St tion
Data
C: Control word input
St: Starting word
E: End word C: Control Word
15 14 13 12
Shift direction
1 (ON): Left
0 (OFF): Right
Data input
Shift input
Reset
S: Source word
App
ARITHMETIC ASR @ Shifts the contents of Wd one bit to the right.
SHIFT RIGHT ASR(026)
Wd: 100CH
Wd 15 0
1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
Wd: Word
A-1-7 Data Shift Instructions
0
CY
0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
ROTATE LEFT ROL @ Shifts all Wd bits one bit to the left including the Carry Flag (CY).
ROL(027)
Wd
Wd: Word
ROTATE ROR @ Shifts all Wd bits one bit to the right including the Carry Flag (CY).
RIGHT ROR(028)
Wd Wd+1 Wd
Wd: Word
ONE DIGIT SRD @ Shifts data by one digit (4 bits) to the right.
SHIFT RIGHT SRD(075)
E S t
St
Lost
E
St: Starting word
E: End word
SHIFT N-BITS NASL @ Shifts the specified 16 bits(NASL) or 32 bits(NSLL) of word data to
LEFT NASL(580) the left by the specified number of bits.
D
C
DOUBLE NSLL @
SHIFT N-BITS NSLL(582)
Contents of
LEFT D "a" or "0"
Lost shifted in
C
N bits
D: Shift word
C: Control word C: Control word
NASL
15 12 11 8 7 0
C
0
Always 0.
Data shifted into register
0 Hex: 0 shifted in
8 Hex: Contents of rightmost bit shifted in
NSLL
15 12 11 8 7 0
C
0
Always 0.
Data shifted into register
0 Hex: 0 shifted in
8 Hex: Contents of rightmost bit shifted in
Always 0.
Data shifted into register
0 Hex: 0 shifted in
8 Hex: Contents of rightmost bit shifted in
NSRL
15 12 11 8 7 0
C
0
App
BINARY ++(590) by 1.
Wd
Wd Wd
Wd: Word A-1-8 Increment/Decrement Instructions
DOUBLE ++L @ Increments the 8-digit hexadecimal content of the specified words
INCREMENT ++L(591) by 1.
BINARY Wd
Wd+1 Wd Wd+1 Wd
Wd: Word
INCREMENT ++B @ Increments the 4-digit BCD content of the specified word by 1.
BCD ++B(594)
Wd Wd Wd
Wd: Word
Wd: Word
DOUBLE DEC- BL @ Decrements the 8-digit BCD content of the specified words by 1.
REMENT BCD BL(597)
Wd Wd+1 Wd Wd+1 Wd
Ad Ad (BCD)
+
R
CY will turn
Au: Augend word ON when CY R (BCD)
Ad: Addend word there is a
carry.
R: Result word
DOUBLE BCD +BL @ Adds 8-digit (double-word) BCD data and/or constants.
ADD WITH- +BL(405)
OUT CARRY Au Au+1 Au (BCD)
Ad Ad+1 Ad (BCD)
+
R
CY will turn
Au: 1st augend word ON when CY R+1 R (BCD)
Ad: 1st addend word there is a
carry.
R: 1st result word
BCD ADD +BC @ Adds 4-digit (single-word) BCD data and/or constants with the
WITH CARRY +BC(406) Carry Flag (CY).
Au
Au (BCD)
Ad
R Ad (BCD)
DOUBLE BCD +BCL @ Adds 8-digit (double-word) BCD data and/or constants with the
ADD WITH +BCL(407) Carry Flag (CY).
CARRY Au
Au+1 Au (BCD)
App
Su Su (Signed binary)
R
CY will turn
Mi: Minuend word ON when CY R (Signed binary)
Su: Subtrahend word there is a
A-1-9 Symbol Math Instructions
CY
Mi: Minuend word
Su: Subtrahend word
R: Result word CY will turn
ON when CY R (Signed binary)
there is a
borrow.
Su Su (BCD)
R
CY will turn ON
Mi: Minuend word when there is a CY R (BCD)
Su: Subtrahend word carry.
R: Result word
BCD SUB- BC @ Subtracts 4-digit (single-word) BCD data and/or constants with the
TRACT WITH BC(416) Carry Flag (CY).
CARRY Mi
Mi (BCD)
Su
R Su (BCD)
DOUBLE BCD BCL @ Subtracts 8-digit (double-word) BCD data and/or constants with
SUBTRACT BCL(417) the Carry Flag (CY).
WITH CARRY Mi
Mi +1 Mi (BCD)
Su
R Su+1 Su (BCD)
Mr (Signed binary)
Mr
R
Md: Multiplicand word R +1 R (Signed binary)
Mr: Multiplier word
R: Result word
DOUBLE BCD *BL @ Multiplies 8-digit (double-word) BCD data and/or constants.
MULTIPLY *BL(425)
Md Md + 1 Md (BCD)
Mr
Mr + 1 Mr (BCD)
R
App
Dr: Divisor word R +1 R
R: Result word
Remainder Quotient
Remainder Quotient
Dr
Dr + 1 Dr (BCD)
R
DOUBLE BINL @ Converts 8-digit BCD data to 8-digit hexadecimal (32-bit binary)
BCD-TO-DOU- BINL(058) data.
BLE BINARY S
(BCD) R (BIN)
R
(BCD) R+1 (BIN)
S: 1st source word
R: 1st result word
R
S: Source word
R: Result word
DOUBLE BCDL @ Converts 8-digit hexadecimal (32-bit binary) data to 8-digit BCD
BINARY-TO- BCDL(059) data.
DOUBLE BCD S
(BIN) R (BCD)
R
(BIN) R+1 (BCD)
S: 1st source word
R: 1st result word
2'S COMPLE- NEG @ Calculates the 2's complement of a word of hexadecimal data.
MENT NEG(160)
2's complement
S (Complement + 1)
R (S) (R)
S: Source word
R: Result word
R
R+1
R+1
R+14
R+15
R+16
R+17
Two 16-word ranges
are used when l
specifies 2 bytes.
R+30
R+31
C: Control Word
4-to-16 bit decoder
App
0: 4-to-16 bits (digit to word)
15 12 11 8 7 4 3 0
C 1 l n
A-1-10 Conversion Instructions
Always 0.
Conversion process
1: 8-to-256 bits (byte to 16-word range)
Leftmost bit
C: Control Word
16-to-4 bit conversion
15 12 11 8 7 4 3 0
C 0 l n
Conversion process
0: 16-to-4 bits (word to digit)
15 12 11 8 7 4 3 0
C 1 l n
S: Source word
Di: Digit designator
D: 1st destination word
Number of
digits (n+1)
Digit number: 3 2 1 0
ASCII TO HEX HEX @ Converts up to 4 bytes of ASCII data in the source word to their
HEX(162) hexadecimal equivalents and writes these digits in the specified
S destination word.
Parity 0: None
1: Even
2: Odd
DOUBLE ANDL @ Takes the logical AND of corresponding bits in double words of
ANDL(610) word data and/or constants.
LOGICAL AND
I1
(I1, I1+1). (I2, I2+1) (R, R+1)
I2
I1, I1+1 I2, I2+1 R, R+1
R
1 1 1
I1: Input 1
I2: Input 2 1 0 0
R: Result word
0 1 0
0 0 0
LOGICAL OR ORW @ Takes the logical OR of corresponding bits in single words of word
ORW(035) data and/or constants.
I1
I1 + I2 R
I2
I1 I2 R
R
1 1 1
I1: Input 1
I2: Input 2 1 0 1
R: Result word
0 1 1
0 0 0
Wd Wd Wd: 1 0 and 0 1
Wd: Word
DOUBLE COML @ Turns OFF all ON bits and turns ON all OFF bits in Wd and Wd+1.
COMPLE- COML(614)
MENT Wd (Wd+1, Wd) (Wd+1, Wd)
Wd: Word
R
C: Control word
S: Source data
R: Result word
BIT COUNTER BCNT @ Counts the total number of ON bits in the specified word(s).
BCNT(067)
N N words
S Counts the number of
to ON bits.
R
S+(N 1) Binary
result
N: Number of words
N: Number of words
The number of words must be 0001 to FFFF (1 to 65,535 words).
App
FLOATING TO FIX @ Converts a 32-bit floating-point value to 16-bit signed binary data
16-BIT FIX(450) and places the result in the specified result word.
S Floating-point data
S+1 S (32 bits)
R A-1-12 Special Math Instructions
FLOATING TO FIXL @ Converts a 32-bit floating-point value to 32-bit signed binary data
32-BIT FIXL(451) and places the result in the specified result words.
S Floating-point data
S+1 S (32 bits)
R
S: 1st source word
R: 1st result word Signed binary data
R+1 R (32 bits)
16-BIT TO FLT @ Converts a 16-bit signed binary value to 32-bit floating-point data
FLOATING FLT(452) and places the result in the specified result words.
S Signed binary data
S (16 bits)
R
S: Source word
R: 1st result word Floating-point data
R+1 R (32 bits)
FLOATING- +F @ Adds two 32-bit floating-point numbers and places the result in the
POINT ADD +F(454) specified result words.
Au Augend (floating-point
Au+1 Au data, 32 bits)
Ad
R Addend (floating-point
R Subtrahend
Su+1 Su (floating-point
data, 32 bits)
Mi: 1st Minuend word
Su: 1st Subtrahend word
R: 1st result word Result (floating-point
R+1 R data, 32 bits)
FLOATING- *F @ Multiplies two 32-bit floating-point numbers and places the result
POINT *F(456) in the specified result words.
MULTIPLY Md Multiplicand
Md+1 Md (floating-point
Mr data, 32 bits)
R
Mr+1 Mr
Multiplier
(floating-point data,
32 bits)
Md: 1st Multiplicand word
Mr: 1st Multiplier word
R: 1st result word Result (floating-point
R+1 R data, 32 bits)
R Divisor
Dr+1 Dr (floating-point data,
32 bits)
Dd: 1st Dividend word
Dr: 1st Divisor word
R: 1st result word Result
R+1 R (floating-point data,
32 bits)
Symbol, option S2
<F
S1
ON execution condition when
S2
comparison result is true.
Note There are limits on the total number of characters and the
number of fractional digits.
ASCII TO FVAL @ Converts the specified text string (ASCII) representation of sin-
FLOATING- FVAL(449) gle-precision floating-point data (decimal-point or exponential for-
POINT S mat) to 32-bit single-precision floating-point data and outputs the
result to the destination words.
D
App
S: Source word
D: 1st destination word
FRAME FCS @ Calculates the FCS value for the specified range and outputs the
CHECKSUM FCS(180) result in ASCII.
C
R1 R1
D W (Table length)
0
Starting byte (Valid only when bit 13 is 1.)
0: Leftmost byte
1: Rightmost byte
Calculation units
0: Words
1: Bytes
0
15 8 7 4 3 2 1 0
C+5 0
Forward/reverse
designation
PID constant update
timing designation
Manipulated variable
output setting
2-PID parameter()
15 14 13 12 11 8 7 4 3 0
C+6 0 0 0
Output range
Input range
15 0
15 14 13 12 0
C+9 0 0 0
AT Calculation Gain
AT Command Bit
15 0
C+10 Limit-cycle Hysteresis
App
C+11
Work area
(30 words: Cannot be used by user.)
C+40 A-1-15 Data Control Instructions
15 12 11 8 7 4 3 0
C
Manipulated variable
range
Input type
15 0
C+1 Control period
C+4
Work area
C+5 (3 words, cannot be used by user)
C+6
15 0
P1
Offset of 0000
P1 Offset (Signed binary) R (signed BCD)
P1 + 1 Y (Signed binary)
P1 + 2 X (Signed BCD)
Y
Offset = 0000 hex
X
S (signed
binary)
15 0
P1
App
A-1-15 Data Control Instructions
X X
Offset Offset S (signed BCD)
Min.
conver- S (signed BCD)
sion Min. conversion
Offset of 0000
R (signed binary)
Max.
conver-
sion
Y
X
S (signed BCD)
Min. conversion
15 0
P1
X
0001 to 9999 (BCD)
15 0
P1+2
Y
8000 to 7FFF (signed binary)
15 0
P1+3
Maximum conversion
8000 to 7FFF (signed binary)
15 0
P1+4
Minimum conversion
8000 to 7FFF (signed binary)
R+1 Pointer
Average Valid Flag
Average
R+2
R+3
N values
R+N+1
Subroutine
program
(SBN(092) to
RET(093))
App
Program end
SUBROUTINE SBN --- Indicates the beginning of the subroutine program with the speci-
A-1-16 Subroutine Instructions
Subroutine region
Time interval
Scheduled
interrupt Set scheduled interrupt
time interval.
CLEAR CLI @ Clears or retains recorded interrupt inputs for I/O interrupts or sets
INTERRUPT
CLI(691) the time to the first scheduled interrupt for scheduled interrupts.
N N = 102 to 107
C
Interrupt Interrupt
input n input n
N: Interrupt number
C: Control data
Internal Internal
status status
Recorded interrupt cleared Recorded interrupt retained
N=4
MSKS(690)
Execution of scheduled
interrupt task.
Time to first
scheduled interrupt
ENABLE EI --- Enables execution of all interrupt tasks that were disabled with
INTERRUPTS EI(694) DI(693).
DI
EI
Execution condition
@INI
#0000 C1: Port specifier (example for pulse output 0)
#0002 C2: Control data (example for changing PV)
D100 S:First word with new PV
15 0
D100 #0 0 0 0
D101 #0 0 0 0
P: Port Specifier
C: Control Data
App
0002 hex Changes the PV.
0003 hex Stops pulse output.
15 0
NV Lower word of new PV
NV+1 Upper word of new PV
C: Control Data
15 0
D Lower word of PV
D+1 Upper word of PV
2-word PV
Pulse output PV, high-speed counter input PV,
high-speed counter input frequency for high-speed counter input 0
15 0
D PV
1-word PV
Status, range comparison results
P: Port specifier
C: Control data
TB: First comparison table word
Time
Interrupt task
Cyclic tasks
(ladder programs) Interrupt occurs Ladder diagram
END
END
I/O refresh
P: Port specifier
App
TB: First comparison table word
TB is the first word of the comparison table. The structure of the
comparison table depends on the type of comparison being per-
formed.
A-1-18 High-speed Counter/Pulse Output
below.
15 0
TB Number of target values 0001 to 6 hex (1 to 6 target values)
Note Always set the upper limit greater than or equal to the lower
limit for any one range.
SPEED OUT- SPED @ Sets the output pulse frequency for a specific port and starts pulse
SPED(855)
PUT output without acceleration or deceleration.
P
Pulse frequency
M
F
P: Port specifier
M: Output mode
F: First pulse frequency word
Target frequency
Time
SPED(885) executed.
P: Port specifier
M: Output mode
15 12 11 87 4 3 0
M
Mode
0 hex: Continuous
1 hex: Independent
Direction
0 hex: CW
1 hex: CCW
Pulse output method
1 hex: Pulse + direction
Always 0 hex.
15 0
F Lower word of target frequency 0 to 100000 Hz
(0000 0000 to 0001 86A0 hex)
F+1 Upper word of target frequency
N: Number of pulses
15 0
N Lower word with number of pulses
N+1 Upper word with number of pulses
PULSE OUT- PLS2 @ Performs trapezoidal positioning control as the following time
PLS2(887)
PUT chart. Sets the target frequency, starting frequency, acceleration
P and deceleration rate and direction.
M
Target frequency Acceleration
S Deceleration rate
rate
F
P: Port specifier Specified number
M: Output mode of pulses
Starting frequency
S: First word of settings table
F: First word of starting frequency
P: Port Specifier
M: Output Mode
15 12 11 87 4 3 0
M
Relative/absolute specifier
0 hex: Relative pulses
1 hex: Absolute pulses
Direction
0 hex: CW
1 hex: CCW
Pulse output method
App
1 hex: Pulse + direction
Always 0 hex.
ACCELERA- ACC @ Outputs pulses to the specified output port at the specified fre-
ACC(888)
TION CON- quency using the specified acceleration and deceleration rate.
TROL P
M Acceleration
Target frequency and
S deceleration
rate
P: Port specifier
M: Output mode
S: First word of settings table
Pulse output started Pulse output stopped
P: Port Specifier
M: Output Mode
15 12 11 87 4 3 0
M
Mode
0 hex: Continuous mode
1 hex: Independent mode
Direction
0 hex: CW
1 hex: CCW
Pulse output method
1 hex: Pulse + direction
Always 0 hex.
15 0
S Acceleration/deceleration rate 1 to 65535 Hz (#0001 to FFFF)
Specify the increase or decrease in the
frequency per pulse control period (4 ms).
C Origin Input
Signal
1
0
Pulse frequency
Origin search high speed Origin search deceleration rate
P: Port specifier
C: Control data Origin search
acceleration rate
Deceleration point Origin search low speed
Origin search
initial speed
Time
Start Decelerate from high to low speed Stop
App
P: Port Specifier
C: Control Data
15 12 11 87 4 3 0
Instructions
Always 0 hex.
Always 0 hex.
Mode
0 hex: Origin search
1 hex: Origin return
P: Port specifier
F: Frequency
D: Duty factor
Built-in output
PWM output
Duty factor:15%
50%
Duty factor:50%
P: Port Specifier
F: Frequency
F specifies the frequency of the PWM output between 2.0 and
6,553.5 Hz (0.1 Hz units, 0014 to FFFF hex), or between 2 and
32,000 Hz (2 Hz units, 0002 to 7D00 hex).
D: Duty Factor
0.0% to 100.0% (0.1% units, 0000 to 03E8 hex)
D specifies the duty factor of the PWM output, i.e., the percent-
age of time that the output is ON.
B: Bit
STEP(008)
STEP START SNXT --- SNXT(009) is used in the following three ways:
SNXT(009)
(1)To start step programming execution.
B (2)To proceed to the next step control bit.
B: Bit (3)To end step programming execution.
7-SEGMENT SDEC @ Converts the hexadecimal contents of the designated digit(s) into
DECODER SDEC(078) 8-bit, 7-segment display code and places it into the upper or lower
S 8-bits of the specified destination words.
Di
Di
D Number of digits
First digit to convert
S: Source word
Di: Digit designator
D: 1st destination word
7-segment
15 12 11 87 43 0
Di 0 1/0 m n
App
A-1-20 Basic I/O Unit Instructions
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
O
CS0
CS1
One Round Flag CS signals
CS2
RD0 Read signal CS3
System word
(Cannot be accessed by the user.)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
O
0
1
2
3
4 Bits 00 to 07
5 correspond
6 to Output Unit
7 outputs 0 to 7.
C: System Word
Specifies a work word used by the instruction. This word can-
not be used in any other application.
System word
(Cannot be accessed by the user.)
App
A-1-20 Basic I/O Unit Instructions
Converting 8 digits
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
O
One Round
Flag LE3 D0
LE2 D1
Latch Leftmost
LE1 D2
outputs 4-digit data
LE0 D3
output
D0
D1
D2 Rightmost 4-digit
D3 data output
C: Control Data
The value of C indicates the number of digits of source data
and the logic for the Input and Output Units, as shown in the fol-
lowing table. (The logic refers to the transistor outputs NPN or
PNP logic.)
Displays data
Source data Displays latch input logic C
input logic
4 digits (S) Same as Out- Same as Output Unit 0000
put Unit
Different from Output Unit 0001
Different from Same as Output Unit 0002
Output Unit
Different from Output Unit 0003
8 digits (S, S+1) Same as Out- Same as Output Unit 0004
put Unit
Different from Output Unit 0005
Different from Same as Output Unit 0006
Output Unit
Different from Output Unit 0007
D: System Word
Specifies a work word used by the instruction. This word can-
not be used in any other application.
15 0
D
System word
(Cannot be accessed by the user.)
RECEIVE RXD @ Reads the specified number of bytes of data starting with the
RXD(235) specified first word from the RS-232C port built into the CPU Unit
or the serial Option Board according to the start code and end
D
code specified for no-protocol mode in the PLC Setup.
C C: Control Word
N
15 12 11 8 7 4 3 0
D: 1st destination word C
C: Control word
N: Number of bytes to store Byte order
0000 to 0100 hex 0 Hex: Most significant byte
(0 to 256 decimal) to least significant byte
1 Hex: Lest significant byte
Always 0 to most significant byte
CS and DR signal monitoring
App
A-1-21 Serial Communications Instructions
15 8 7 0
R Minutes Seconds
R+1 Day Hour
R+2 Year Month
CALENDAR CSUB @ Subtracts time from the calendar data in the specified words.
SUBTRACT CSUB(731)
15 8 7 0
C C Seconds
Minutes
T C+1 Day Hour
R C+2 Year Month
C: 1st calendar word
T: 1st time word 15 8 7 0
R: 1st result word T Minutes Seconds
T+1 Hours
15 8 7 0
R Minutes Seconds
R+1 Day Hour
R+2 Year Month
CLOCK DATE @ Changes the internal clock setting to the setting in the specified
DATE(735) source words.
ADJUSTMENT
S
CPU Unit
S: 1st source word
Internal clock
Minutes Seconds
New
setting Day Hour
Year Month
00 Day of week
EXTEND WDT @ Extends the maximum cycle time, but only for the cycle in which
WDT(094) this instruction is executed.
MAXIMUM
CYCLE TIME T
T: Timer setting
App
A-1-23 Failure Diagnosis Instructions
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A100 to Error Log Area When an error has occurred, the error Error code Retained Retained Refreshed A500.14
A199 code, error contents, and error's time Error contents: when error A300
and date are stored in the Error Log Address of Aux. Area occurs. A400
Area. Information on the 20 most word with details or
recent errors can be stored. 0000 hex if there is
Each error record occupies 5 words; no related word.
the function of these 5 words is as fol- Seconds: 00 to 59,
lows: BCD
First word: Error code (bits 0 to 15)
First word + 1: Error contents (bits 0 to Minutes: 00 to 59,
15) BCD
First word + 2: Minutes (upper byte), Hours: 00 to 23, BCD
Seconds (lower byte) Day of month: 01 to
First word + 3: Day of month (upper 31, BCD
byte), Hours (lower byte)
First word + 4: Year (upper byte), Month: 01 to 12, BCD
Month (lower byte) Year: 00 to 99,
BCD
Note 1 The data will be unstable if the
capacitor becomes discharged.
2 Errors generated by FAL(006)
and FALS(007) will also be
stored in this Error Log.
3 The Error Log Area can be
reset from the CX-Program-
mer.
4 If the Error Log Area is full (20
records) and another error
App
to RUN status, this flag will be turned (including transitions
ON within the task for one cycle only. from WAIT and IN)
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A270 High-speed Counter 0 Contains the PV of high-speed counter Cleared Refreshed
and PV 0. A271 contains the upper 4 digits and each cycle
A271 A270 contains the lower 4 digits. during the
Cleared when operation starts. overseeing
processes.
Refreshed
when PRV
instruction is
executed to
read the PV.
A272 High-speed Counter 1 Contains the PV of high-speed counter Cleared Refreshed
and PV 1. A273 contains the upper 4 digits and each cycle
A273 A272 contains the lower 4 digits. during the
Cleared when operation starts. overseeing
processes.
Refreshed
when PRV
instruction is
executed to
read the PV.
A274 00 High-speed Counter 0 These flags indicate whether the PV is Cleared Refreshed
Range 1 Comparison within the specified ranges when each cycle
Condition Met Flag high-speed counter 0 is being operated during the
in range-comparison mode. overseeing
01 High-speed Counter 0 processes.
Cleared when operation starts.
Range 2 Comparison Refreshed
Cleared when range comparison
Condition Met Flag when PRV
table is registered.
02 High-speed Counter 0 instruction is
OFF: PV not in range executed to
Range 3 Comparison ON: PV in range read the
Condition Met Flag results of
03 High-speed Counter 0 range com-
parison.
Range 4 Comparison
Condition Met Flag
04 High-speed Counter 0
Range 5 Comparison
Condition Met Flag
05 High-speed Counter 0
Range 6 Comparison
Condition Met Flag
08 High-speed Counter 0 This flag indicates whether a compari- Cleared Refreshed
Comparison son operation is being executed for when compari-
In-progress Flag high-speed counter 0. son operation
Cleared when operation starts. starts or stops.
OFF: Stopped.
ON: Being executed.
09 High-speed Counter 0 This flag indicates when an overflow or Cleared Refreshed
Overflow/Underflow underflow has occurred in the when an over-
Flag high-speed counter 0 PV. (Used with flow or under-
the linear mode counting range only.) flow occurs.
Cleared when operation starts.
Cleared when PV is changed.
OFF: Normal
ON: Overflow or underflow
10 High-speed Counter 0 This flag indicates whether the Cleared Setting used
Count Direction high-speed counter 0 is currently being for high-speed
incremented or decremented. The counter, valid
counter PV for the current cycle is com- during counter
pared with the PV in last cycle to deter- operation.
mine the direction.
OFF: Decrementing
ON: Incrementing
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A275 00 High-speed Counter 1 These flags indicate whether the PV is Cleared Refreshed
Range 1 Comparison within the specified ranges when each cycle
Condition Met Flag high-speed counter 1 is being operated during over-
in range-comparison mode for upper seeing pro-
01 High-speed Counter 1 and lower limits. cess.
Range 2 Comparison Cleared when operation starts. Refreshed
Condition Met Flag when PRV
Cleared when range comparison
02 High-speed Counter 1 table is registered. instruction is
executed to
Range 3 Comparison OFF: PV not in range read the
Condition Met Flag ON: PV in range comparison
03 High-speed Counter 1 results for
the corre-
Range 4 Comparison
sponding
Condition Met Flag
counter.
04 High-speed Counter 1
Range 5 Comparison
Condition Met Flag
05 High-speed Counter 1
Range 6 Comparison
Condition Met Flag
08 High-speed Counter 1 This flag indicates whether a compari- Cleared Refreshed
Comparison son operation is being executed for when compari-
In-progress Flag high-speed counter 1. son operation
Cleared when operation starts. starts or stops.
App
OFF: Decrementing
ON: Incrementing
A276 Pulse Out- Lower four Contain the number of pulses output Cleared Refreshed
put 0 PV digits from the corresponding pulse output each cycle
A-2-1 Read-only Words
port. during the
A277 Upper four
PV range: 8000 0000 to 7FFF FFFF overseeing
digits
hex processes.
A278 Pulse Out- Lower four Refreshed
put 1 PV digits (-2,147,483,648 to 2,147,483,647)
when the INI
A279 Upper four When pulses are being output in the instruction is
digits CW direction, the PV is incremented by executed
1 for each pulse. (PV
When pulses are being output in the change).
CCW direction, the PV is decremented
by 1 for each pulse.
PV after overflow: 7FFF FFFF hex
PV after underflow: 8000 000 hex
Cleared when operation starts.
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A280 00 Pulse Output 0 This flag will be ON when pulses are Cleared Refreshed
Accel/Decel Flag being output from pulse output 0 each cycle
according to an ORG, ACC or PLS2 during the
instruction and the output frequency is overseeing
being changed in steps (accelerating processes.
or decelerating).
Cleared when operation starts or
stops.
OFF: Constant speed
ON: Accelerating or decelerating
01 Pulse Output 0 This flag indicates when an overflow or Cleared Refreshed
Overflow/Underflow underflow has occurred in the pulse when the PV
Flag output 0 PV. is changed
Cleared when operation starts. by the INI
instruction.
OFF: Normal
Refreshed
ON: Overflow or underflow when an
overflow or
underflow
occurs.
02 Pulse Output 0 ON when the number of output pulses Cleared Refreshed
Output Amount Set for pulse output 0 has been set with the when the
Flag PULS instruction. PULS
Cleared when operation starts or instruction is
stops. executed.
Refreshed
OFF: No setting
when pulse
ON: Setting made output stops.
03 Pulse Output 0 ON when the number of output pulses Cleared Refreshed at
Output Completed set with the PULS or PLS2 instruction the start or
Flag has been output through pulse output completion of
0. pulse output.
Cleared when operation starts or
stops.
OFF: Output not completed.
ON: Output completed.
04 Pulse Output 0 ON when pulses are being output from Cleared Refreshed
Output In-progress pulse output 0. when pulse
Flag Cleared when operation starts or output starts or
stops. stops.
OFF: Stopped
ON: Outputting pulses.
05 Pulse Output 0 ON when the origin has not been Cleared Refreshed
No-origin Flag determined for pulse output 0 and goes each cycle
OFF when the origin has been deter- during the
mined. overseeing
Turned ON when power is turned processes.
ON.
Turned ON when operation starts.
OFF: Origin established.
ON: Origin not established.
06 Pulse Output 0 ON when the pulse output 0 PV Cleared Refreshed
At-origin Flag matches the origin (0). each cycle
OFF: Not stopped at origin. during the
overseeing
ON: Stopped at origin. processes.
07 Pulse Output 0 ON when an error occurred while out- Cleared Refreshed
Output Stopped Error putting pulses in the pulse output 0 ori- when origin
Flag gin search function. search
The Pulse Output 0 Output Stop Error starts.
code will be written to A444. Refreshed
when a
OFF: No error
pulse output
ON: Stop error occurred. stop error
occurs.
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A281 00 Pulse Output 1 This flag will be ON when pulses are Cleared Refreshed
Accel/Decel Flag being output from pulse output 1 each cycle
according to an ORG, ACC or PLS2 during the
instruction and the output frequency is overseeing
being changed in steps (accelerating processes.
or decelerating).
Cleared when operation starts or
stops.
OFF: Constant speed
ON: Accelerating or decelerating
01 Pulse Output 1 This flag indicates when an overflow or Cleared Refreshed
Overflow/Underflow underflow has occurred in the pulse when the PV
Flag output 1 PV. is changed
Cleared when operation starts. by the INI
instruction.
OFF: Normal
Refreshed
ON: Overflow or underflow when an
overflow or
underflow
occurs.
02 Pulse Output 1 ON when the number of output pulses Cleared Refreshed
Output Amount Set for pulse output 1 has been set with the when the
Flag PULS instruction. PULS
Cleared when operation starts or instruction is
executed.
OFF: Stopped
App
ON: Outputting pulses.
05 Pulse Output 1 No-ori- ON when the origin has not been Cleared Refreshed
gin Flag determined for pulse output 1 and goes each cycle
OFF when the origin has been deter- during over- A-2-1 Read-only Words
mined. seeing pro-
Turned ON when power is turned cesses.
ON.
Turned ON when operation starts.
OFF: Origin established.
ON: Origin not established.
06 Pulse Output 1 ON when the pulse output 1 PV Cleared Refreshed
At-origin Flag matches the origin (0). each cycle
OFF: Not stopped at origin. during over-
seeing pro-
ON: Stopped at origin. cesses.
07 Pulse Output 1 ON when an error occurred while out- Cleared Refreshed
Output Stopped Error putting pulses in the pulse output 1 ori- when origin
Flag gin search function. search
The Pulse Output 1 Output Stop Error starts.
code will be written to A445. Refreshed
when pulse
OFF: No error
output stop
ON: Stop error occurred. error occurs.
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A283 00 PWM Output 0 ON when pulses are being output from Cleared Refreshed
Output In-progress PWM output 0. when pulse
Flag Cleared when operation starts or output starts or
stops. stops.
OFF: Stopped
ON: Outputting pulses.
A294 Task Number when This word contains the task number of Cyclic tasks: 0000 Cleared Cleared When pro- A298/
Program Stopped the task that was being executed when Interrupt tasks: 8000 gram error A299
program execution was stopped to 800F (task 0 to 15) occurs.
because of a program error.
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A295 10 Illegal Access Error This flag and the Access Error Flag ON: Illegal access Cleared Cleared When pro- A294,
Flag (AER) will be turned ON when an ille- occurred gram error A298/
gal access error has occurred and the OFF: Normal condi- occurs. A299
PLC Setup has been set to stop opera- tion PLC
tion an illegal access error. (This error Setup
occurs when a region of memory is (Opera-
accessed illegally.) CPU Unit opera- tion when
tion will stop and the ERR/ALM indica- instruc-
tor will light when this flag goes ON. tion error
The following operations are consid- has
ered illegal access: occurred)
Reading/writing the system area
Indirect DM BCD error (in BCD
mode)
App
stored in A298 and A299.
14 Illegal Instruction Error ON when a program that cannot be ON: Error Cleared Cleared A294,
Flag executed has been stored. CPU Unit OFF: Normal A298/
operation will stop and the ERR/ALM A299
A-2-1 Read-only Words
indicator will light when this flag goes
ON.
15 UM Overflow Error ON when the last address in UM (User ON: Error Cleared Cleared A294,
Flag Memory) has been exceeded. CPU OFF: Normal A298/
Unit operation will stop and the A299
ERR/ALM indicator will light when this
flag goes ON.
A298 Program Address These words contain the program Lower digits of the Cleared Cleared A294
Where Program address of the instruction where pro- program address
Stopped gram execution was stopped due to a
(Lower digits) program error.
A299 Program Address Note A294 contains the task number of Upper digits of the Cleared Cleared
Where Program the task where program execu- program address
tion was stopped.
Stopped
(Upper digits)
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A300 Error Log Pointer When an error occurs, the Error Log 00 to 14 hex Retained Retained Refreshed A500.14
Pointer is incremented by 1 to indicate when error
the location where the next error record occurs.
will be recorded as an offset from the
beginning of the Error Log Area (A100
to A199).
Note 1 The data will be unstable if the
capacitor becomes
discharged.
2 The Error Log Pointer can be
cleared to 00 by turning
A500.14 (the Error Log Reset
Bit) ON.
3 When the Error Log Pointer
has reached 14 hex (20 deci-
mal), the next record is stored
in A195 to A199 when the next
error occurs.
A310 Manufacturing Lot The manufacturing lot number is stored Retained Retained
Number, Lower Digits in 6 digits hexadecimal. X, Y, and Z in
the lot number are converted to 10, 11,
A311 Manufacturing Lot
and 12, respectively.
Number, Upper Digits
Examples:
Lot number 01805
A310 = 0801, A311 = 0005
Lot number 30Y05
A310 =1130, A311 = 0005
A315 13 Option Board Error ON when the Option Board is removed Cleared Cleared Refreshed A402.00,
Flag while the power is being supplied. CPU when a A424
Unit operation will continue and the non-fatal error
ERR/ALM indicator will flash. occurs.
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A320 00 High-speed Counter 2 These flags indicate whether the PV is Cleared Refreshed
Range 1 Comparison within the specified ranges when each cycle
Condition Met Flag high-speed counter 2 is being operated during the
in range-comparison mode for upper overseeing
01 High-speed Counter 2 and lower limits. processes.
Range 2 Comparison Cleared when operation starts. Refreshed
Condition Met Flag when PRV
Cleared when range comparison
02 High-speed Counter 2 table is registered. instruction is
executed to
Range 3 Comparison OFF: PV not in range read the
Condition Met Flag ON: PV in range results of
03 High-speed Counter 2 range com-
parison.
Range 4 Comparison
Condition Met Flag
04 High-speed Counter 2
Range 5 Comparison
Condition Met Flag
05 High-speed Counter 2
Range 6 Comparison
Condition Met Flag
08 High-speed Counter 2 This flag indicates whether a compari- Cleared Refreshed
Comparison son operation is being executed for when compari-
In-progress Flag high-speed counter 2. son operation
Cleared when operation starts. starts or stops.
App
OFF: Decrementing
ON: Incrementing
A321 00 High-speed Counter 3 These flags indicate whether the PV is Cleared Refreshed
Range 1 Comparison within the specified ranges when each cycle
A-2-1 Read-only Words
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A321 08 High-speed Counter 3 This flag indicates whether a compari- Cleared Refreshed
Comparison son operation is being executed for when compari-
In-progress Flag high-speed counter 3. son operation
Cleared when operation starts. starts or stops.
OFF: Stopped.
ON: Being executed
09 High-speed Counter 3 This flag indicates when an overflow or Cleared Refreshed
Overflow/Underflow underflow has occurred in the when an over-
Flag high-speed counter 3 PV. (Used with flow or under-
the linear mode counting range only.) flow occurs.
Cleared when operation starts.
Cleared when the PV is changed.
OFF: Normal
ON: Overflow or underflow
10 High-speed Counter 3 This flag indicates whether the Cleared Setting used
Count Direction high-speed counter is currently being for high-speed
incremented or decremented. The counter, valid
counter PV for the current cycle is com- during counter
pared with the PV in last cycle to deter- operation.
mine the direction.
OFF: Decrementing
ON: Incrementing
A322 to High-speed Counter 4 Contains the PV of high-speed counter Cleared Refreshed
A323 PV 4. each cycle
The PV will be cleared at the start of during the
operation. overseeing
processes.
A323 contains the upper four digits and
Refreshed
A322 contains the lower four digits.
when PRV
instruction is
executed to
read PV.
A324 to High-speed Counter 5 Contains the PV of high-speed counter Cleared Refreshed
A325 PV 5. each cycle
(Not The PV is cleared when operation during the
sup- starts. overseeing
ported processes.
by E10 A325 contains the upper 4 digits and
Refreshed
CPU A324 contains the lower 4 digits.
when PRV
Unit) instruction is
executed to
read PV.
A326 00 High-speed Counter 4 These flags indicate whether the PV is Cleared Refreshed
Range 1 Comparison within the specified ranges when each cycle
Condition Met Flag high-speed counter 4 is being operated during the
in range-comparison mode for upper overseeing
01 High-speed Counter 4 and lower limits. processes.
Range 2 Comparison Cleared when operation starts. Refreshed
Condition Met Flag when PRV
Cleared when range comparison
02 High-speed Counter 4 table is registered. instruction is
executed to
Range 3 Comparison OFF: PV not in range read the
Condition Met Flag ON: PV in range results of
03 High-speed Counter 4 range com-
parison.
Range 4 Comparison
Condition Met Flag
04 High-speed Counter 4
Range 5 Comparison
Condition Met Flag
05 High-speed Counter 4
Range 6 Comparison
Condition Met Flag
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A326 08 High-speed Counter 4 This flag indicates whether a compari- Cleared Refreshed
Comparison son operation is being executed for when compari-
In-progress Flag high-speed counter 4. son operation
Cleared when operation starts. starts or stops.
OFF: Stopped.
ON: Being executed.
09 High-speed Counter 4 This flag indicates when an overflow or Cleared Refreshed
Overflow/Underflow underflow has occurred in the when an over-
Flag high-speed counter 4 PV. (Used with flow or under-
the linear mode counting range only.) flow occurs.
Cleared when operation starts.
Cleared when PV is changed.
OFF: Normal
ON: Overflow or underflow
10 High-speed Counter 4 This flag indicates whether the Cleared Setting used
Count Direction high-speed counter is currently being for high-speed
incremented or decremented. The counter, valid
counter PV for the current cycle is com- during counter
pared with the PV in last cycle to deter- operation.
mine the direction.
OFF: Decrementing
ON: Incrementing
A327 00 High-speed Counter 5 These flags indicate whether the PV is Cleared Refreshed
App
Range 6 Comparison
Condition Met Flag
08 High-speed Counter 5 This flag indicates whether a compari- Cleared Refreshed
Comparison son operation is being executed for when compari-
A-2-1 Read-only Words
OFF: Stopped.
ON: Being executed
09 High-speed Counter 5 This flag indicates when an overflow or Cleared Refreshed
Overflow/Underflow underflow has occurred in the when an over-
Flag high-speed counter 5 PV. (Used with flow or under-
the linear mode counting range only.) flow occurs.
Cleared when operation starts.
Cleared when the PV is changed.
OFF: Normal
ON: Overflow or underflow
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A327 10 High-speed Counter 5 This flag indicates whether the Cleared Setting used
Count Direction high-speed counter is currently being for high-speed
incremented or decremented. The counter, valid
counter PV for the current cycle is com- during counter
pared with the PV in last cycle to deter- operation.
mine the direction.
OFF: Decrementing
ON: Incrementing
A339 to Maximum Differentia- These words contain the maximum See Func- Cleared Written at the A295.13
A340 tion Flag Number value of the differentiation flag num- tion col- start of opera-
bers being used by differentiation umn. tion
instructions.
A351 to Calendar/Clock Area These words contain the CPU Units Retained Retained Written every
A354 internal clock data in BCD. The clock cycle
(N/NA-t can be set from the CX-Programmer,
ype with the DATE instruction, or with a
CPU FINS command (CLOCK WRITE,
Unit 0702).
only) A351.00 to A351.07:
Seconds (00 to 59)(BCD)
A351.08 to A351.15:
Minutes (00 to 59)(BCD)
A352.00 to A352.07:
Hours (00 to 23)(BCD)
A352.08 to A352.15:
Day of the month (01 to 31)(BCD)
A353.00 to A353.07:
Month (01 to 12)(BCD)
A353.08 to A353.15:
Year (00 to 99)(BCD)
A354.00 to A354.07:
Day of the week (00 to 06)(BCD)
00: Sunday
01: Monday
02: Tuesday
03: Wednesday
04: Thursday
05: Friday
06: Saturday
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A392 04 Built-in RS-232C Port ON when an error has occurred at the ON: Error Retained Cleared Refreshed
Error Flag (CP1E built-in RS-232C port. (Not valid in NT OFF: No error when error
N/NA-type CPU Unit Link mode.) occurs.
only)
05 Built-in RS-232C Port ON when the built-in RS-232C port is ON: Able-to-send Retained Cleared Written after
Send Ready Flag able to send data in no-protocol mode. OFF: Unable-to-send transmission
(No-protocol mode)
(CP1E N/NA-type CPU
Unit only)
06 Built-in RS-232C Port ON when the built-in RS-232C port has ON: Reception com- Retained Cleared Written after
Reception Completed completed the reception in no-protocol pleted reception
Flag (No-protocol mode. OFF: Reception not
mode) (CP1E When the number of bytes was completed
N/NA-type CPU Unit specified: ON when the specified
only) number of bytes is received.
When the end code was specified:
ON when the end code is received or
256 bytes are received.
07 Built-in RS-232C Port ON when a data overflow occurred dur- ON: Overflow Retained Cleared
Reception Overflow ing reception through the built-in OFF: No overflow
Flag (No-protocol RS-232C port in no-protocol mode.
mode) (CP1E When the number of bytes was
N/NA-type CPU Unit specified: ON when more data is
only) received after the reception was
completed but before RXD was exe-
App
14 Serial Option Port ON when the Serial Option port has ON: Reception com- Retained Cleared Written after
Reception Completed completed the reception in no-protocol pleted reception
Flag (No-protocol mode. OFF: Reception not
mode) (CP1E When the number of bytes was completed
N30/40/60 or NA20 specified: ON when the specified
A-2-1 Read-only Words
CPU Unit only) number of bytes is received.
When the end code was specified:
ON when the end code is received or
256 bytes are received.
15 Serial Option Port ON when a data overflow occurred dur- ON: Reception com- Retained Cleared
Reception Overflow ing reception through Serial Option pleted
Flag (No-protocol port in no-protocol mode. OFF: Reception not
mode) (CP1E When the number of bytes was completed
N30/40/60 or NA20 specified: ON when more data is
CPU Unit only) received after the reception was
completed but before RXD was exe-
cuted.
When the end code was specified:
ON when more data is received after
the end code was received but
before RXD was executed.
ON when 257 bytes are received
before the end code.
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A393 00 to Built-in RS-232C Port The corresponding bit will be ON when ON: Communicating Retained Cleared Refreshed
07 Polled Unit Communi- the built-in RS-232C port is communi- OFF: Not communi- when there is a
cations Flags (CP1E cating with NT Link mode or Serial PLC cating normal
N/NA-type CPU Unit Link mode. response to
only) Bits 0 to 7 correspond to Units 0 to 7. the token.
00 to Built-in RS-232C Port Indicates (in binary) the number of Retained Cleared Refreshed
15 Reception Counter bytes of data received when the built-in when data is
(No-protocol Mode) RS-232C port is in no-protocol mode. received.
(CP1E N/NA-type CPU
Unit only)
A394 00 to Serial Option Port The corresponding bit will be ON when ON: Communicating Retained Cleared Refreshed
07 Polled Unit Communi- the Serial Option port is communicat- OFF: Not communi- when there is a
cations Flags (CP1E ing with NT link mode. cating normal
N30/40/60 or NA20 Bits 0 to 7 correspond to Units 0 to 7. response to
CPU Unit only) the token.
00 to Serial Option Port Indicates (in binary) the number of Retained Cleared Refreshed
15 Reception Counter bytes of data received when the Serial when data is
(No-protocol Mode) Option port is in no-protocol mode. received.
(CP1E N30/40/60 or
NA20 CPU Unit only)
A400 Error code When a non-fatal error (user-defined Cleared Cleared Refreshed
FALS or system error) or a fatal error when error
(user-defined FALS or system error) occurs.
occurs, the 4-digit hexadecimal error
code is written to this word.
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A401 09 Program Error Flag ON when program contents are incor- ON: Error Cleared Cleared Refreshed A294,
(fatal error) rect. CPU Unit operation will stop and OFF: No error when error A295,
the ERR/ALM indicator on the front of occurs. A298 and
the CPU Unit will light. The task num- A299
ber where the error occurred will be
stored in A294 and the program
address will be stored in A298 and
A299. The type of program error that
occurred will be stored in A295.08 to
A295.15. Refer to the description of
A295 for more details on program
errors.
11 Too Many I/O Points ON when the number of Expansion ON: Error Cleared Cleared Refreshed A407
Flag Units and Expansion I/O Units exceeds OFF: No error when error
(fatal error) the limit, when the number of words occurs.
allocated to these Units exceeds the
limit, are mounted.
CPU Unit operation will stop and the
ERR/ALM indicator on the front of the
CPU Unit will light.
14 I/O Bus Error Flag ON in the following cases: ON: Error Cleared Cleared Refreshed A404
(fatal error) When an error occurs in a data OFF: No error when error
transfer between the CPU Unit and a occurs.
Expansion Unit or Expansion I/O
Unit. If this happens, 0A0A hex will
App
Flag defined for A402.01 to A402.15 occurs. non-fatal error when error
Detailed information is output to the ON: Other non- fatal occurs.
bits of A315. error
04 Battery Error Flag ON if the CPU Units battery is discon- ON: Error Cleared Cleared Refreshed PLC
A-2-1 Read-only Words
(non-fatal error) nected or its voltage is low and the OFF: No error when error Setup
Detect Battery Error setting has been occurs. (Detect
set in the PLC Setup. Battery
The CPU Unit will continue operating Error)
and the ERR/ALM indicator on the front
of the CPU Unit will flash.
This flag can be used to control an
external warning light or other indica-
tor to indicate that the battery needs
to be replaced.
This flag will be turned OFF when
the error is cleared.
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A402 10 PLC Setup Error Flag ON when there is a setting error in the ON: Error Cleared Cleared Refreshed
(non-fatal error) PLC Setup. The CPU Unit will continue OFF: No error when error
operating and the ERR/ALM indicator occurs.
on the front of the CPU Unit will flash.
Note This flag will be turned OFF when
the error is cleared.
15 FAL Error Flag ON when a non-fatal error is generated ON: FAL error Cleared Cleared Refreshed A360 to
(non-fatal error) by executing FAL. The CPU Unit will occurred when error A391,
continue operating and the ERR/ALM OFF: FAL not exe- occurs. A400
indicator on the front of the CPU Unit cuted
will flash.
The bit in A360 to A391 that corre-
sponds to the FAL number specified in
FALS will be turned ON and the corre-
sponding error code will be written to
A400. Error codes 4101 to 42FF corre-
spond to FAL numbers 001 to 2FF (0 to
511).
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A436 00 to Expansion Unit and ON when an error occurs in a OFF: No error Retained Cleared
02 Expansion I/O Unit CP-series Expansion Unit or Expan- ON: Error
Error Flags sion I/O Unit.
A436.00: 1st Unit
A436.01: 2nd Unit
A436.02: 3rd Unit
A436.03: 4th Unit
A436.04: 5th Unit
A436.05: 6th Unit
Note CP1W-TS002/TS102/AD041/DA0
41/32ER/32ET/32ET1 are each
counted as two Units.
A437 Number of Connected Stores the number of Expansion Units 0000 to 0006 hex Retained Cleared
Units and Expansion I/O Units connected as
a hexadecimal number.
App
operation begins. The value is
unstable for CPU Unit version 1.0
or earlier.
A444 Pulse Output 0 If a Pulse Output Stop Error occurs for Retained Cleared Refreshed
pulse output 0, the error code is written when origin
A-2-1 Read-only Words
Stop Error Code
to this word. search
starts.
Refreshed
when a
pulse output
stop error
occurs.
A445 Pulse Output 1 If a Pulse Output Stop Error occurs for Retained Cleared Refreshed
Stop Error Code pulse output 1, the error code is written when origin
to this word. search
starts.
Refreshed
when a
pulse output
stop error
occurs.
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A512 Power Interruption These words contain the time at which See Function col- Retained Retained Written at
to Time the power was interrupted. The con- umn. power
A513 tents are updated every time that the interruption.
(CP1E power is interrupted. The data is
N/NA- stored in BCD.
type A512.00 to A512.07: Second (00 to
CPU 59)
Unit A512.08 to A512.15: Minute (00 to 59)
only)
A513.00 to A513.07: Hour (00 to 23)
A513.08 to A513.15: Day of month (01
to 31)
Note 1 These words are not cleared
at startup.
2 The data will be unstable if the
capacitor becomes
discharged.
3 In an E-type CPU Unit, or if
the clock data is not set for an
N/NA-type CPU Unit, the data
will be for 1:01.01 on Sunday
January 1, 2001.
A514 Number of Power Contains the number of times that 0000 to FFFF hex Retained Retained Refreshed
Interruptions power has been interrupted since the when power is
power was first turned ON. The data is turned ON.
stored in binary. To reset this value,
App
power supply until operation is
started.
2 The data will be unstable if the
capacitor becomes
discharged.
A-2-2 Read/Write Words
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A518 Operation End Time The time that operation stopped as a See at left. Retained Retained See at left.
to result of changing the operating mode
A520 to PROGRAM mode is stored here in
(CP1E BCD.
N/NA- A518.00 to A518.07: Seconds (00 to
type 59)
CPU A518.08 to A518.15: Minutes (00 to
Unit 59)
only) A519.00 to A519.07: Hour (00 to 23)
A519.08 to A519.15: Day of month (01
to 31)
A520.00 to A520.07: Month (01 to 12)
A520.08 to A520.15: Year (00 to 99)
Note 1 If an error occurs in operation,
the time of the error will be
stored. If the operating mode
is then changed to
PROGRAM mode, the time
that PROGRAM mode was
entered will be stored.
2 The data will be unstable if the
capacitor becomes
discharged.
3 In an E-type CPU Unit, or if
the clock data is not set for an
N/NA-type CPU Unit, the data
will be for 1:01.01 on Sunday
January 1, 2001.
A525 01 Ethernet Option Turn ON this bit to reset the Ethernet OFF to ON: Reset Retained Cleared
Board Reset Flag Option Board mounted on the serial
(Serial Option Port) Option port.
09 Ethernet Option Turn ON this bit to restart Ethernet OFF to ON: Restart Retained Cleared
Board Restart Flag Option Board mounted on the serial
(Serial Option Port) Option port.
A526 00 Built-in RS-232C Port Turn ON this bit to restart the built-in OFF to ON: Restart Retained Cleared
Restart Bit (CP1E RS-232C port.
N/NA-type CPU Unit
Note This bit is turned OFF automati-
only)
cally when the restart processing
is completed.
01 Serial Option Port Turn ON this bit to restart the Serial OFF to ON: Restart Retained Cleared
Restart Bit (CP1E Option port. port
N30/40/60 or NA20
Note This bit is turned OFF automati-
CPU Unit only)
cally when the restart processing
is completed.
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A528 00 Built-in RS-232C Port These flags indicate what kind of error Bits 00 and 01: Not Retained Cleared
to Error Flags (CP1E has occurred at the built-in RS-232C used.
07 N/NA-type CPU Unit port. Bit 02: ON for parity
only) They are automatically turned OFF error.
when the built-in RS-232C port is Bit 03: ON for fram-
restarted. ing error.
Only bit 5 (timeout error) is valid in
Bit 04: ON for over-
NT Link mode.
run error.
Serial PLC Link Polling Unit:
Bit 05: ON for time-
Bit 05: ON for timeout error.
out error.
Serial PLC Link Polled Unit:
Bit 03: ON for framing error. Bits 06 and 07: Not
Bit 04: ON for overrun error. used.
Bit 05: ON for timeout error.
These bits can be cleared by the
CX-Programmer.
08 Serial Option Port These flags indicate what kind of error Bits 08 and 09: Not Retained Cleared
to Error Flags (CP1E has occurred at Serial Option port. used.
15 N30/40/60 or NA20 They are automatically turned OFF Bit 10: ON for parity
CPU Unit only) when Serial Option port is restarted. error.
Only bit 5 (timeout error) is valid in Bit 11: ON for fram-
NT Link mode. ing error.
Serial PLC Link Polling Unit: Bit 12: ON for over-
Bit 13: ON for timeout error. run error.
Serial PLC Link Polled Unit:
App
corresponding high-speed counter's
01 High-speed Counter 1
PV will be reset if the phase-Z signal is
Reset Bit
received while this bit is ON.
02 High-speed Counter 2
When the reset method is set to Soft-
Reset Bit
A-2-2 Read/Write Words
ware reset, the corresponding
03 High-speed Counter 3 high-speed counter's PV will be reset
Reset Bit in the cycle when this bit turns ON.
04 High-speed Counter 4
Reset Bit
05 High-speed Counter 5
Reset Bit
(Not supported by
E10 CPU Unit)
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A540 00 Pulse Output 0 The pulse output 0 PV (contained in Retained Cleared A276 and
Reset Bit A276 and A277) will be cleared when A277
this bit is turned ON.
08 Pulse Output 0 This is the CW limit input signal for Retained Cleared
CW Limit Input Signal pulse output 0, which is used in the
Flag origin search. To use this signal, write
the input from the actual sensor as an
input condition in the ladder program
and output the result to this flag.
09 Pulse Output 0 This is the CCW limit input signal for Retained Cleared
CCW Limit Input Sig- pulse output 0, which is used in the
nal Flag origin search. To use this signal, write
the input from the actual sensor as an
input condition in the ladder program
and output the result to this flag.
10 Pulse Output 0 This is the positioning completed input Retained Cleared
Positioning Com- signal used in the origin search for
pleted Signal pulse output 0. The input signal from
the servo driver is output to this bit
from the ladder program to enable
using the signal.
A541 00 Pulse Output 1 The pulse output 1 PV (contained in Retained Cleared A278 and
Reset Bit A278 and A279) will be cleared when A279
this bit is turned ON.
08 Pulse Output 1 This is the CW limit input signal for Retained Cleared
CW Limit Input Signal pulse output 1, which is used in the
Flag origin search. To use this signal, write
the input from the actual sensor as an
input condition in the ladder program
and output the result to this flag.
09 Pulse Output 1 This is the CCW limit input signal for Retained Cleared
CCW Limit Input Sig- pulse output 1, which is used in the
nal Flag origin search. To use this signal, write
the input from the actual sensor as an
input condition in the ladder program
and output the result to this flag.
10 Pulse Output 1 This is the positioning completed input Retained Cleared
Positioning Com- signal used in the origin search for
pleted Signal pulse output 1. The input signal from
the servo driver is output to this bit
from the ladder program to enable
using the signal.
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A617 00 Built-in RS232C Port- Display the present communication Parity Retained See Refreshed
Communication Set- settings of the built-in RS232C 0: Even Function when power is
tings port.Reflect the PLC Setup when column. turned ON.
power is turned ON. 1: Odd
01 Parity Retained See Refreshed
0: Yes Function when power is
column. turned ON.
1: No
02 Stop bit Retained See Refreshed
0: 2 bits Function when power is
column. turned ON.
1: 1 bit
03 Data length Retained See Refreshed
0: 7 bits Function when power is
column. turned ON.
1: 8 bits
04 Start bit Retained See Refreshed
0: 1 bit (fixed) Function when power is
column. turned ON.
08 Communication Retained See Refreshed
to speed Function when power is
11 0 hex: Default (9600) column. turned ON.
3 hex: 1200
4 hex: 2400
5 hex: 4800
App
Link (Master)
9 hex: Modbus-RTU
Easy Master
A618 00 SerialOption Port- Display the present communication Parity Retained See Refreshed
A-2-2 Read/Write Words
Communication Set- settings of the serial option 0: Even Function when power is
tings port.Reflect the PLC Setup when column. turned ON.
power is turned ON. 1: Odd
01 Parity Retained See Refreshed
0: Yes Function when power is
column. turned ON.
1: No
02 Stop bit Retained See Refreshed
0: 2 bits Function when power is
column. turned ON.
1: 1 bit
03 Data length Retained See Refreshed
0: 7 bits Function when power is
column. turned ON.
1: 8 bits
04 Start bit Retained See Refreshed
0: 1 bit (fixed) Function when power is
column. turned ON.
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A618 08 SerialOption Port- Display the present communication Communication Retained See Refreshed
to Communication Set- settings of the serial option speed Function when power is
11 tings port.Reflect the PLC Setup when 0 hex: Default (9600) column. turned ON.
power is turned ON.
3 hex: 1200
4 hex: 2400
5 hex: 4800
6 hex: 9600
7 hex: 19200
8 hex: 38400
9 hex: 57600
A hex: 115200
12 Communication Retained See Refreshed
to mode Function when power is
15 0 hex: Default (Host column. turned ON.
Link)
2 hex: NT link(1: N)
3 hex: Non-protocol
5 hex: Host Link
7 hex: Serial PLC
Link (Slave)
8 hex: Serial PLC
Link (Master)
9 hex: Modbus-RTU
Easy Master
A640 00 Built-in RS-232C Port Turn ON this bit to send a command Turned ON: Execu- Retained Cleared DM Area
Modbus-RTU Easy and receive a response for the built-in tion started words for
Master Execution Bit RS-232C port using the Modbus-RTU ON: Execution in built-in
(CP1E N/NA-type easy master function. progress. RS -232C
CPU Unit only) port
Note This bit will be turned OFF auto- OFF: Not executed Modbus
matically by the system when or execution com-
communications have been com- -RTU
pleted. Easy
pleted.
Master:
01 Built-in RS-232C Port ON when one command has been ON: Execution nor- Retained Cleared D01200
Modbus-RTU Easy sent and the response received for mal. to
Master Normal End the built-in RS-232C port using the OFF: Execution error D01299
Flag (CP1E N/NA-type Modbus-RTU easy master function. or still in progress.
CPU Unit only)
02 Built-in RS-232C Port ON when an error has occurred in ON: Execution error. Retained Cleared
Modbus-RTU Easy communications for the built-in OFF: Execution nor-
Master Error End Flag RS-232C port using the Modbus-RTU mal or still in
(CP1E N/NA-type easy master function. progress.
CPU Unit only) The error code is output to D01252 in
the DM fixed allocation words for Mod-
bus-RTU Easy Master.
A641 00 Serial Option Port Turn ON this bit to send a command Turned ON: Execu- Retained Cleared DM Area
Modbus-RTU Master and receive a response for Serial tion started words for
Execution Bit (CP1E Option port using the Modbus-RTU ON: Execution in built-in
N30/40/60 or NA20 easy master function. progress. RS -232C
CPU Unit only) port
Note This bit will be turned OFF auto- OFF: Not executed Modbus
matically by the system when or execution com-
communications have been com- -RTU
pleted. Easy
pleted.
Master:
01 Serial Option Port ON when one command has been ON: Execution nor- Retained Cleared D01300
Modbus-RTU Master sent and the response received for mal. to
Execution Normal Serial Option port using the Mod- OFF: Execution error D01399
Flag (CP1E bus-RTU easy master function. or still in progress.
N30/40/60 or NA20
CPU Unit only)
02 Serial Option Port ON when an error has occurred in ON: Execution error. Retained Cleared
Modbus-RTU Master communications for Serial Option port OFF: Execution nor-
Execution Error Flag using the Modbus-RTU easy master mal or still in
(CP1E N30/40/60 or function. progress.
NA20 CPU Unit only) The error code is output to D01352 in
the DM fixed allocation words for Mod-
bus-RTU Easy Master.
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A642 Analog Adjustment 1 Stores the value set on analog 0000 to 00FF hex Retained Cleared
PV adjuster 1 as a hexadecimal value.
A643 Analog Adjustment 2 Stores the value set on analog 0000 to 00FF hex Retained Cleared
PV adjuster 2 as a hexadecimal value.
A720 Power ON Clock Data These words contain the time at which See at left. Retained Retained Written when
to 1 the power was turned ON one time power is
A722 before the startup time stored in words turned ON.
(CP1E A510 to A511.
N/NA- A720.00 to A720.07: Seconds (00 to
type 59)
CPU A720.08 to A720.15: Minutes (00 to
Unit 59)
only) A721.00 to A721.07: Hour (00 to 23)
A721.08 to A721.15: Day of month (01
to 31)
A722.00 to A722.07: Month (01 to 12)
A722.08 to A722.15: Year (00 to 99)
App
type 59)
CPU A726.08 to A726.15: Minutes (00 to
Unit 59)
only) A727.00 to A727.07: Hour (00 to 23) A-2-2 Read/Write Words
A727.08 to A727.15: Day of month (01
to 31)
A728.00 to A728.07: Month (01 to 12)
A728.08 to A728.15: Year (00 to 99)
A729 Power ON Clock Data These words contain the time at which See at left. Retained Retained Written when
to 4 the power was turned ON four times power is
A731 before the startup time stored in words turned ON.
(CP1E A510 to A511.
N/NA- A729.00 to A729.07: Seconds (00 to
type 59)
CPU A729.08 to A729.15: Minutes (00 to
Unit 59)
only) A730.00 to A730.07: Hour (00 to 23)
A730.08 to A730.15: Day of month (01
to 31)
A731.00 to A731.07: Month (01 to 12)
A731.08 to A731.15: Year (00 to 99)
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A732 Power ON Clock Data These words contain the time at which See at left. Retained Retained Written when
to 5 the power was turned ON five times power is
A734 before the startup time stored in words turned ON.
(CP1E A510 to A511.
N/NA- A732.00 to A732.07: Seconds (00 to
type 59)
CPU A732.08 to A732.15: Minutes (00 to
Unit 59)
only) A733.00 to A733.07: Hour (00 to 23)
A733.08 to A733.15: Day of month (01
to 31)
A734.00 to A734.07: Month (01 to 12)
A734.08 to A734.15: Year (00 to 99)
A735 Power ON Clock Data These words contain the time at which See at left. Retained Retained Written when
to 6 the power was turned ON six times power is
A737 before the startup time stored in words turned ON.
(CP1E A510 to A511.
N/NA- A735.00 to A735.07: Seconds (00 to
type 59)
CPU A735.08 to A735.15: Minutes (00 to
Unit 59)
only) A736.00 to A736.07: Hour (00 to 23)
A736.08 to A736.15: Day of month (01
to 31)
A737.00 to A737.07: Month (01 to 12)
A737.08 to A737.15: Year (00 to 99)
A738 Power ON Clock Data These words contain the time at which See at left. Retained Retained Written when
to 7 the power was turned ON seven times power is
A740 before the startup time stored in words turned ON.
(CP1E A510 to A511.
N/NA- A738.00 to A738.07: Seconds (00 to
type 59)
CPU A738.08 to A738.15: Minutes (00 to
Unit 59)
only) A739.00 to A739.07: Hour (00 to 23)
A739.08 to A739.15: Day of month (01
to 31)
A740.00 to A740.07: Month (01 to 12)
A740.08 to A740.15: Year (00 to 99)
A741 Power ON Clock Data These words contain the time at which See at left. Retained Retained Written when
to 8 the power was turned ON eight times power is
A743 before the startup time stored in words turned ON.
(CP1E A510 to A511.
N/NA- A741.00 to A741.07: Seconds (00 to
type 59)
CPU A741.08 to A741.15: Minutes (00 to
Unit 59)
only) A742.00 to A742.07: Hour (00 to 23)
A742.08 to A742.15: Day of month (01
to 31)
A743.00 to A743.07: Month (01 to 12)
A743.08 to A743.15: Year (00 to 99)
A744 Power ON Clock Data These words contain the time at which See at left. Retained Retained Written when
to 9 the power was turned ON nine times power is
A746 before the startup time stored in words turned ON.
(CP1E A510 to A511.
N/NA- A744.00 to A744.07: Seconds (00 to
type 59)
CPU A744.08 to A744.15: Minutes (00 to
Unit 59)
only) A745.00 to A745.07: Hour (00 to 23)
A745.08 to A745.15: Day of month (01
to 31)
A746.00 to A746.07: Month (01 to 12)
A746.08 to A746.15: Year (00 to 99)
Address Status
Related
after Status at Write
Name Function Settings flags,
Words Bits mode startup timing
settings
change
A747 Power ON Clock Data These words contain the time at which See at left. Retained Retained Written when
to 10 the power was turned ON ten times power is
A749 before the startup time stored in words turned ON.
(CP1E A510 to A511.
N/NA- A747.00 to A747.07: Seconds (00 to
type 59)
CPU A747.08 to A747.15: Minutes (00 to
Unit 59)
only) A748.00 to A748.07: Hour (00 to 23)
A748.08 to A748.15: Day of month (01
to 31)
A749.00 to A749.07: Month (01 to 12)
A749.08 to A749.15: Year (00 to 99)
A751.11 DM Backup Restore ON when DM backup data could not Retained Cleared
Failed Flag be restored normally. If this flag turns
ON, data will not be restored from the
built-in EEPROM backup memory to
RAM.
A751.14 DM Backup Save Flag ON when A751.15 is turned ON to Retained Cleared
start the saving operation. This flag
stays ON while data is being saved
and turns OFF when finished.
A751.15 DM Backup Save Saving the specified words from the ON: Start saving. Retained Cleared
Start Bit DM Area in RAM to the built-in OFF: Execution nor-
EEPROM backup memory is started mal or still in
App
A-2-2 Read/Write Words
The I/O response time is the time it takes from when an input turns ON, the data is recognized by the
CPU Unit, and the ladder programs are executed, up to the time for the result to be output to an output
terminal.
The length of the I/O response time depends on the following conditions.
Timing of Input Bit turning ON.
The cycle time
Note The input and output ON delays depend on the type of terminals used on the CPU Unit or the model number
of the Unit being used.
:I/O refresh
Inputs:
Input ON delay
(Status read to
the CPU Unit.):
Cycle time Cycle time
Instruction Instruction
execution execution
Output ON delay
Outputs:
Minimum I/O
Response Time
:I/O refresh
Inputs:
Input ON delay
(Status read to
the CPU Unit.):
Cycle time Cycle time
Instruction Instruction Instruction
execution execution execution
Output ON delay
Outputs:
Calculation Example
Conditions:
Input ON delay: 1 ms (normal input 0.08 to 0.11 with input constant set to 0 ms)
Output ON delay: 0.1 ms (transistor output)
Cycle time: 20 ms
Minimum I/O response time = 1 ms + 20 ms + 0.1 ms = 21.1 ms
Maximum I/O response time = 1 ms + (20 ms 2) + 0.1 ms = 41.1 ms
App
16 hex: 16 ms
17 hex: 32 ms
A-3-1 I/O Response Time
Note The input constants of CP1W-40EDR/EDT/EDT1 are always 16ms regardless of the settings.
* The wait time occurs when there is competition with other interrupts. As a guideline, the wait time will be 0 to
3 ms.
Note Input interrupt tasks can be executed during execution of the user program, I/O refresh, peripheral servicing,
or overseeing. (Even if an instruction is being executed, execution of the instruction will be stopped to exe-
cute the interrupt task.)
The interrupt response time is not affected by the above processing operations during which the interrupt
inputs turns ON.
Input interrupts, however, are not executed during execution of other interrupt tasks even if the input interrupt
conditions are satisfied. Instead, the input interrupts are executed after the current interrupt task has com-
pleted execution and the software interrupt response time has elapsed.
Inputs:
Input ON delay
Ready to acknowledge
(Interrupt signal next interrupt signal
acknowledged.): Software interrupt response time
Interrupt task
execution:
Interrupt response Ladder program Return time
time for input execution time from input
interrupt task interrupt task
Cyclic task execution (main
program):
The time from when execution of the input interrupt task is completed until
execution of the cyclic task is resumed is 24 s.
Internal timer:
App
Polling unit cycle time + Communications cycle time + Polled unit cycle time + 4 ms
Minimum I/O response time (not including hardware delay) =
Polled unit communications time + 0.8 ms
A-3-3 Serial PLC Link Response Performance
Number of participat- The number of polled units to which links have been established within the
ing polled unit nodes maximum unit number set in the polling unit.
Number of non- The number of polled units not participating in the links within the maximum unit
participating polled number set in the polling unit.
unit nodes
Communications cycle Polled unit communications time Number of participating polled unit nodes +
time (ms) 10 Number of non-participating polled unit nodes + 20 Number of polled unit
nodes
Polled unit Communications time set to Standard:
communications 0.4 + 0.286 [(No. of polled units + 1) No. of link words 2 + 12]
time (ms) Communications time set to Fast:
0.4 + 0.0955 [(No. of polled units + 1) No. of link words 2 + 12]
Instruction
execution Start time
Pulse output
* The wait time occurs when there is competition with other interrupts. As a guideline, the wait time will be 0 to 3 ms.
* The wait time occurs when there is competition with other interrupts. As a guideline, the wait time will be 0 to 3 ms.
Supply
voltage
Operation will continue or stop
depending on whether a
momentary power interruption
is detected.
Automatic Recovery
Operation is automatically restarted when the power supply voltage is restored.
App
Program execution
Cyclic task or interrupt task Stop
status
Power OFF Detection Time: The time from when the power supply voltage drops to 85% or less the rated voltage until the
power interruption is detected.
Power Holding Time: The maximum amount of time (fixed at 1 ms) that 5 V will be held internally after power shuts
OFF.
Description of Operation
The power interruption will be detected if the 100 to 240 VAC power supply falls below 85% of the
minimum rated voltage for the power OFF detection time (10 ms minimum for AC power supply and
2ms minimum for DC power supply, not fixed).
The CPU reset signal will turn ON and the CPU Unit will be reset immediately.
Malfunction Countermeasures
If only a couple of Expansion I/O Units or Expansion Units are connected to the CPU Unit resulting in a
light power supply circuit load and a small current consumption, the time required by the CPU Unit to
detect a power interruption will be longer. For this reason, inputs may be incorrectly identified as being
OFF if external power supply used for an input turns OFF before the power interruption is detected. If
an external NC contact input is used or the ladder program counts the number of ON to OFF transitions,
a malfunction may occur if the external power supply turns OFF.
Program execution
status Cyclic task or interrupt task
100 VAC
CP1E
Ladder Program
App
Emergency
stop output
R
Range comparison..........................................11-14, 11-20
Read protection.......................................................... 16-12
Relative coordinates .................................................. 12-11
Relative positioning .................................................... 12-11
Run mode ...................................................................... 3-3
S
Scheduled interrupts .................................................. 10-10
Writing the ladder program................................... 10-11
Sections ..................................................................4-2, 4-6
Revision code
OMRON ASIA PACIFIC PTE. LTD. OMRON (CHINA) CO., LTD. OMRON Corporation 2009 All Rights Reserved.
No. 438A Alexandra Road # 05-05/08 (Lobby 2), Room 2211, Bank of China Tower, In the interest of product improvement,
Alexandra Technopark, 200 Yin Cheng Zhong Road, specifications are subject to change without notice.
Singapore 119967 PuDong New Area, Shanghai, 200120, China
Tel: (65) 6835-3011/Fax: (65) 6835-2711 Tel: (86) 21-5037-2222/Fax: (86) 21-5037-2200 Cat. No. W480-E1-04 0610