background image

17-15

17   Analog Input/Output Option Board

CP2E CPU Unit Software User’s Manual(W614)

17-6 A

n

alo

g

 Outp

ut Op

tio
n

 Bo

ar

d

17

17-6-

3

  Wir

ing  

Precautions for Correct Use

Precautions for Correct Use

When connecting the analog option board to an outside analog device, either ground the 0 V
side of the PLC

s external power supply or do not ground the PLC

s external power supply at all.

Otherwise the PLC

s external power supply may be shorted depending on the connection meth-

ods of the outside analog device. DO NOT ground the 24 V side of the PLC

s external power

supply, as shown in the following diagram.

24 V 

0 V 

0 V 

N

on-ins

u

lated DC po

w

er s

u

pply

0 V 

Analog De

v

ice

FG 

FG 

T

w

isted-pair  

ca

b

le

CPU Unit + Analog Option Board

Summary of Contents for SYSMAC CP Series

Page 1: ...USER S MANUAL Cat No W614 E1 01 SYSMAC CP Series CP2E E D CP2E S D CP2E N D CP2E CPU Unit Software ...

Page 2: ...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 Neverthe less 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 NOTE Microsoft W...

Page 3: ......

Page 4: ...SYSMAC CP Series CP2E E D CP2E S D CP2E N D CP2E CPU Unit Software User s Manual Produced September 2019 ...

Page 5: ...ties z CP series CP2E CPU Units Essential Model CP2E E D A model of CPU Unit that supports connections to Programmable Terminals and basic control applications using instructions such as basic movement arithmetic and comparison instructions Standard Model CP2E S D A model of CPU Unit that supports connections to inverters and servo drives Network Model CP2E N D A model of CPU Unit that supports Et...

Page 6: ... devices and Expansion I O Units or Expansion Units Connecting Cables for CX Programmer Support Software Error codes and remedies if a problem occurs Procedures for connecting the CX Programmer Support Software Software setting methods for the CPU Units PLC Setup Checking I O wiring setting the Auxiliary Area settings and performing trial operation Monitoring and debugging with the CX Programmer P...

Page 7: ...ing input interrupts and scheduled interrupts Section 11 High speed Counters This section describes the high speed counter inputs high speed counter interrupts and the frequency measurement function Section 12 Pulse Outputs This section describes positioning functions such as trapezoidal control jogging and origin searches Section 13 PWM Outputs This section describes the variable duty factor puls...

Page 8: ...n 7 Maintenance and Inspec tion This section describes periodic inspections the service life of the Bat tery and how to replace the Battery Section 8 Using Expansion Units and Expansion I O Units This section describes application methods for Expansion Units Appendices The appendices provide information on dimensions wiring diagrams and wiring serial communications network installation for the CP2...

Page 9: ...by catching the top of the Units on the Track and then pressing in at the bottom of the Units as shown below Press in all of the DIN Track mounting pins to securely lock the Units in place 5 2 Installation 5 2 1 Installation Location Level 1 heading Level 2 heading Level 3 heading Level 2 heading Step in a procedure Manual name Special Information See below Level 3 heading Page tab Gives the curre...

Page 10: ...ports connections to inverters and servo drives Standard models of CPU Units are called S type CPU Units or S30 40 60 CPU Units in this manual The models of S type CPU Units are shown below CP2E S D N type CPU Unit A network model of CPU Unit that supports Ethernet connection and enhanced position ing functions such as 4 axis linear interpolation and pulse Network models of CPU Units are called N ...

Page 11: ...Counters Pulse Outputs PWM Outputs Internal Memory in the CPU Unit CPU Unit Operation Understanding Programming I O Memory I O Allocation PLC Setup 10 14 15 Serial Communications Ethernet 16 Other Functions 17 Analog Option Board 18 Programming Device Operations A Overview of Built in Functions and Allocations 1 11 2 12 3 13 4 5 6 7 8 9 10 14 15 16 17 18 APP ...

Page 12: ...e 2 2 2 1 2 Memory Areas and Stored Data 2 3 2 1 3 Transferring Data from a Programming Device 2 4 2 1 4 Backup 2 4 Section 3 CPU Unit Operation 3 1 CPU Unit Operation 3 2 3 1 1 Overview of CPU Unit Operation 3 2 3 1 2 CPU Unit Operating Modes 3 3 3 2 Backing Up Memory 3 5 3 2 1 CPU Unit Memory Configuration 3 5 3 2 2 Backing Up Ladder Programs and Parameter Area 3 6 3 2 3 I O Memory Backup 3 6 3 ...

Page 13: ... Address Offsets 4 34 4 8 Ladder Programming Precautions 4 35 4 8 1 Special Program Sections 4 35 Section 5 I O Memory 5 1 Overview of I O Memory Areas 5 2 5 1 1 I O Memory Areas 5 2 5 1 2 I O Memory Area Address Notation 5 5 5 1 3 I O Memory Areas 5 6 5 2 I O Bits 5 7 5 3 Work Area W 5 8 5 4 Holding Area H 5 9 5 5 Data Memory Area D 5 11 5 6 Timer Area T 5 13 5 7 Counter Area C 5 15 5 8 Index Reg...

Page 14: ...ts 9 2 9 1 1 Overview 9 2 9 1 2 Flow of Operation 9 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 8 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...

Page 15: ...Setup 12 31 12 6 4 Origin Search Instructions 12 34 12 6 5 Origin Search Operations 12 35 12 6 6 Origin Return 12 42 12 6 7 Changing the Present Value of the Pulse Output 12 43 12 7 Reading the Pulse Output Present Value 12 44 12 8 Related Auxiliary Area Flags 12 45 12 9 Application Examples 12 46 12 9 1 Vertically Conveying PCBs Multiple Progressive Positioning 12 46 12 9 2 Feeding Wrapping Mater...

Page 16: ... via Ethernet 15 4 15 1 2 Exchanging Data between OMRON PLCs using Ethernet 15 5 15 1 3 Creating an Original Communications Procedure Using TCP IP UDP IP for the Host Application or Communicating with PLCs from Another Manufacturer 15 6 15 1 4 Automatically Adjusting the PLC s Internal Clock at Regular Intervals 15 6 15 2 Specifications 15 7 15 2 1 General Specifications Ethernet 15 7 15 2 2 Compa...

Page 17: ...t Output Option Board 17 1 General Specifications 17 2 17 2 Part Names 17 3 17 3 Installation and Setting 17 4 17 3 1 Installation 17 4 17 3 2 Setting 17 5 17 3 3 Removing 17 5 17 4 Memory Allocation 17 6 17 4 1 CIO Area Allocation 17 6 17 4 2 Auxiliary Area Allocation 17 6 17 5 Analog Input Option Board 17 8 17 5 1 Main Specifications 17 8 17 5 2 Analog Input Signal Ranges 17 8 17 5 3 Wiring 17 9...

Page 18: ...10 Conversion Instructions A 24 A 1 11 Logic Instructions A 28 A 1 12 Special Math Instructions A 29 A 1 13 Floating point Math Instructions A 29 A 1 14 Table Data Processing Instructions A 32 A 1 15 Data Control Instructions A 33 A 1 16 Subroutine Instructions A 37 A 1 17 Interrupt Control Instructions A 38 A 1 18 High speed Counter Pulse Output Instructions A 39 A 1 19 Step Instructions A 50 A 1...

Page 19: ... complying Product provided that in no event shall Omron be responsible for warranty repair indemnity or any other claims or expenses regarding the Products unless Omron s analysis confirms that the Products were properly handled stored installed and maintained and not subject to contamination abuse misuse or inappropriate modification Return of any Products by Buyer must be approved in writing by...

Page 20: ...le for the user s programming of a programmable Product or any consequence thereof Data presented in Omron Company websites catalogs and other materials is provided as a guide for the user in determining suitability and does not constitute a warranty It may represent the result of Omron s test conditions and the user must correlate it to actual application requirements Actual perfor mance is subje...

Page 21: ...n the circle and explained in text This example shows a general precau tion for something that you must do The triangle symbol indicates precautions including warnings The specific operation is shown in the triangle and explained in text This example indicates a general precaution The triangle symbol indicates precautions including warnings The specific operation is shown in the triangle and expla...

Page 22: ...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 i...

Page 23: ...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 Install a battery sold separately if you are using clock data for the program If the battery is not installed th...

Page 24: ...e 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 If the I O Hold Bit is turned ON the outputs from the PLC will not be turned OFF and will maintain their previous status when the PLC is switched from RUN or MONITOR mode to PROGRAM mode Make sure that the external ...

Page 25: ...e Controllers made by OMRON Corporation CX One is a registered trademark for Programming Software made by OMRON Corporation Windows is a registered trademark of Microsoft Corporation Other system names and product names in this document are the trademarks or registered trademarks of their respective companies Trademarks ...

Page 26: ...er in the documentation and or other materials provided with the distribution 3 The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS AND ANY EXPRESS OR IMPLIEDWAR RANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABIL ITY AND FITNESS FOR A PARTICU...

Page 27: ...unctions Installation and settings Troubleshooting Use this manual together with the CP2E CPU Unit Software User s Manual Cat No W614 and Instructions Reference Manual Cat No W483 SYSMAC CP Series CP1E CP2E CPU Unit Instructions Reference Manual W483 CP1E E D CP1E N D CP1E NA D CP2E E D CP2E S D CP2E N D To learn program ming instructions in detail Describes each programming instruction in detail ...

Page 28: ...Program mer the Program ming Device for Windows computers Describes the operation procedures for the CX Programmer CX Programmer Operation Manual Function Blocks Structured Text W447 CX Simulator Operation Manual W366 To learn the opera tion procedures for the CX Simulator the Simulation Device for Windows computers Describes the operation procedures for the CX Simulator CX Integrator Operation Ma...

Page 29: ...CPU Unit Software User s Manual W614 1 This section gives an overview of the CP2E and describes its specifications 1 1 CP2E Overview 1 2 1 1 1 Overview of Features 1 2 1 2 Basic Operating Procedure 1 3 Overview ...

Page 30: ...FB capacity 4K steps 8K steps 10K steps DM Area capacity 4K words Of these 1 500 words can be written to the built in Flash Memory 8K words Of these 7 000 words can be written to the built in Flash Memory 16K words Of these 15 000 words can be written to the built in Flash Memory Mounting Expansion I O Units and Expan sion Units Not supported 3 Units maximum 3 Units maximum Not supported 3 Units m...

Page 31: ... have to do is set the PLC Setup Write the programs using the CX Programmer Check the I O wiring and the Auxiliary Area settings and perform trial operation The CX Programmer can be used for monitoring and debugging 7 Checking Operation Set the operating mode to RUN mode to start operation Refer to Section 3 Part Names and Functions and Section 5 Installation and Wiring in the CP2E CPU Unit Hardwa...

Page 32: ...1 Overview 1 4 CP2E CPU Unit Software User s Manual W614 ...

Page 33: ...nternal memory in a CP2E CPU Unit and the data that is stored 2 1 Internal Memory in the CPU Unit 2 2 2 1 1 CPU Unit Memory Backup Structure 2 2 2 1 2 Memory Areas and Stored Data 2 3 2 1 3 Transferring Data from a Programming Device 2 4 2 1 4 Backup 2 4 Internal Memory in the CPU Unit ...

Page 34: ...mory is stored in the built in non volatile RAM Data Memory Area D Holding Area H and Counter Area C are retained even if the power supply is interrupted with no battery installed 2 1 1 CPU Unit Memory Backup Structure Built in RAM Build in Non volatile RAM Built in Flash Memory Retained when the power supply is interrupted User Program Area FB Program Area Backup Parameter PLC Setup Routing Table...

Page 35: ...tegrator Refer to the CX Integrator Operation Manual Cat No W464 IP Router Table IP router table is used to store the IP address of the relay IP router when the device communicates through the IP router IP Address Table Definition table of the relationship between FINS node address and IP address Source and Comment Areas Not stored Not stored Stored Program Source The source code of the program la...

Page 36: ...TOR RUN mode If the power supply is interrupted when the program or parameters are being transferred or backed up memory error may occur when the power supply is turned ON next time If the power supply is interrupted when the DM area is being backed up the reading of backed up DM area will fail when the power supply is turned ON next time 2 1 3 Transferring Data from a Programming Device 2 1 4 Bac...

Page 37: ...tion completely before writing ladder programs 3 1 CPU Unit Operation 3 2 3 1 1 Overview of CPU Unit Operation 3 2 3 1 2 CPU Unit Operating Modes 3 3 3 2 Backing Up Memory 3 5 3 2 1 CPU Unit Memory Configuration 3 5 3 2 2 Backing Up Ladder Programs and Parameter Area 3 6 3 2 3 I O Memory Backup 3 6 3 2 4 Initializing I O Memory at Startup 3 7 CPU Unit Operation ...

Page 38: ...erminals 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 is used to communicate with devices connected to the communications port or for exchanging data with the CX Programmer The cycle time is the time between one I O refresh and the next 3 1 1 Overview of CPU Unit Operation Overhead Processing Self diagnosis Ladder...

Page 39: ...er z Changing the Startup Mode The default operating mode when the CPU Unit is turned ON is RUN mode To change the startup mode to PROGRAM or MONITOR mode set the desired mode in Startup Setting in PLC Setup from the CX Programmer I O Memory 3 1 2 CPU Unit Operating Modes Overview of Operating Modes PROGRAM mode The programs are not executed in PROGRAM mode This mode is used for the initial settin...

Page 40: ...ward Controlled by the ladder pro grams Controlled by the ladder pro grams I O memory Non retained memory Cleared Controlled by the ladder pro grams Controlled by the ladder pro grams Retained memory Retained CX Program mer opera tions I O memory monitoring Yes Yes Yes Ladder program monitoring Yes Yes Yes Ladder pro gram transfer From CPU Unit Yes Yes Yes To CPU Unit Yes No No Checking programs Y...

Page 41: ... Area Data Counter PVs and Counter Completion Flags Automatically backed up to the built in non volatile RAM with no battery installed 3 2 1 CPU Unit Memory Configuration Ladder programs CP2E CPU Unit Built in Flash Memory Parameter Area PLC Setup Routing Table IP Router Table IP Address Table Parameter Area DM Area PLC power turned ON Hold Area Counter Area DM Area and part of Auxiliary Area are ...

Page 42: ...eas will be cleared when the power supply is turned ON if the Clear retained memory area HR DM CNT Check Box is selected in the PLC Settings 3 2 2 Backing Up Ladder Programs and Parameter Area 3 2 3 I O Memory Backup Area Backup to built in Flash Memory Status at startup CIO Area Not backed up Cleared to all zeros Work Area W Timer Area T Index Register Area IR Data Register Area DR Holding Area H...

Page 43: ...uilt in non volatile RAM with no battery installed Use the following way to clear these areas when the power supply is turned ON z Clearing All Held Areas to Zero at Startup Select the Clear retained memory area HR DM CNT Check Box in the PLC Settings 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 Flash Mem...

Page 44: ...3 CPU Unit Operation 3 8 CP2E CPU Unit Software User s Manual W614 ...

Page 45: ...Blocks 4 8 4 3 2 Advantages of Function Blocks 4 8 4 3 3 Function Block Specifications 4 10 4 3 4 ST Language 4 12 4 4 Programming Instructions 4 14 4 4 1 Basic Understanding of Instructions 4 14 4 4 2 Operands 4 15 4 4 3 Instruction Variations 4 16 4 4 4 Execution Conditions 4 16 4 4 5 Specifying Data in Operands 4 18 4 4 6 Data Formats 4 20 4 4 7 I O Refresh Timing 4 22 4 5 Constants 4 23 4 7 Sp...

Page 46: ...terrupt conditions have been completed and scheduled interrupt tasks executed at specified inter vals The CP2E can use only one cyclic task Sections When creating and displaying programs with the CX Programmer the one program can be divided into any number of parts Each part is called a section Sections are created mainly to make programs easier to understand Subroutines and Function Blocks You ca...

Page 47: ...dder diagram is executed by the CPU Unit the execution condition i e power flow flows from left to right and top to bottom The flow is different from that for circuits that consist of hard wired control relays For example when the diagram in figure A is executed by the CPU Unit power flows as though the diodes in brackets were inserted so that output R2 is not controlled by input condition D The a...

Page 48: ...rogramming Restrictions A rung error will occur if a ladder program is not connected to both bus bars The ladder program must be connected to both bus bars so that the execution condition will flow from the left bus bar to the right bus bar If the rungs are not connected to both bus bars a rung error will occur during the program check on the CX Programmer and program transfer will be impossible A...

Page 49: ...rted after an output instruction then a location error will occur during the program check in the CX Programmer 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 even...

Page 50: ... Programmer project file CXP along with other parameters such as the user programs There are two types of symbols that can be used in programs z Global Symbols Global symbols can be accessed from all ladder programs in the PLC z Local Symbols Local symbols can be accessed from only one task They are assigned to individual tasks 4 2 1 Overview of Tasks Task type Description Applicable programming l...

Page 51: ...sible to transfer the user program The same addresses is used for two different local symbols The same addresses is used for a global symbol and a local 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 Select Tools Options and select Local Symbols or Global Symbols in Appearance to c...

Page 52: ...er as an individual file that can be reused with programs for other PLCs This makes it possible to create a library of standard processing functions Function blocks allow complex programming units to be reused easily Once standard program sections have been created as function blocks and saved in files they can be reused just by placing a function block in a program and setting the parameters for ...

Page 53: ...data can be protected Data cannot be changed unintentionally z Improved Reusability through Programming with Variables The function block s I O is entered as local variables so the data addresses in the function block do not have to be changed as they do when copying and reusing a program section Processes that are independent and reusable such as processes for individual steps machinery equipment...

Page 54: ...tput variables input out put variables 64 max Allocation of addresses used by variables Automatic allocation The alloca tion range can be set by the user Actual address specification Supported Array specifications Supported one dimensional arrays only and only for internal variables Language Function blocks can be created in ladder programming language or structured text Creating instances Number ...

Page 55: ...Select View Memory View from CX Programmer The following Memory View Dialog Box will be displayed Data Types that Can be Used in Function Blocks Data type Content Size Availability in CP2E Inputs Outputs In Out Internals Externals BOOL Bit data 1 Yes Yes No Yes Yes INT Integer 16 Yes Yes No Yes Yes DINT Double integer 32 Yes Yes No Yes Yes LINT Long 4 word integer 64 Yes Yes No Yes Yes UINT Unsign...

Page 56: ... functions Memory Card processing functions string transfer functions and trigonometric functions Programs can be written like high level languages such as C and comments can be included to make the program easy to read ST programs can be uploaded and downloaded just like ordinary programs but ST program can only be used in function blocks One dimensional array variables are supported for easier d...

Page 57: ...ultiplication Yes Division Yes Addition Yes Subtraction Yes Comparisons Yes Equality Yes Non equality Yes Boolean AND Yes Boolean AND AND Yes Boolean exclusive OR XOR Yes Boolean OR OR Yes Function type Availability in CP2E Numerical Functions No Arithmetic Functions No Data Type Conversion Functions Yes Number String Conversion Functions No Data Shift Functions Yes Data Control Functions Yes Data...

Page 58: ...utputs the execution condition Intermediate instructions input the power flow as an execution condition and output the power flow to an intermediate or output instruction Output Instructions Output instructions execute all functions using the power flow as an execution condition 4 4 1 Basic Understanding of Instructions Structure of Instructions Flags Instruction Flag Power flow P F execution cond...

Page 59: ...o on starting from the top of the instruction 4 4 2 Operands Operand type Operand symbol Description Source oper and Specifies the address of the data to be read or a constant S Source oper and Source operand other than control data C C Control data Compound data in a source operand that has different meanings depend ing on bit status Destination operand results Specifies the address where data wi...

Page 60: ...isons test bits or perform other types of processing every cycle If the results are ON the input condition is output i e the execution condition is turned ON 4 4 3 Instruction Variations Variation Symbol Description No variation used These instructions are executed once every cycle while the execution condition is satisfied Differentiation variations ON These instructions are executed only once wh...

Page 61: ...ruction is executed only during the cycle in which the execution condition changes from ON to OFF The instruction is not executed in the following cycle Input Instructions Logical Starts and Intermediate Instructions The instruction reads bit status makes comparisons tests bits or performs other types of pro cessing every cycle and will output an ON execution condition power flow when the result c...

Page 62: ...sses In brackets specify the number of words to offset the specified starting bit address A symbol can also be specified for the start ing word address Only Holding Work and DM Area addresses can be used regardless of whether a physical address or symbol is used A constant or word address in I O memory can be used for the offset If a word address is specified the contents of the word is used as th...

Page 63: ... to 15 or DR 0 to 15 IR0 MOVR 1 02 IR0 Stores the PLC memory address for CIO 0010 in IR0 IR1 MOVR 10 IR1 Stores the PLC memory address for CIO 0010 in IR1 Specifying an indirect address using a reg ister See note Indirect address No off set The bit or word with the PLC mem ory address contained in IR will be specified Specify IR to specify bits and words for instruction oper ands IR0 LD IR0 Loads ...

Page 64: ...quivalent 4 digit hexadeci mal Unsigned binary 0 to 65535 0000 to FFFF Signed binary 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 i...

Page 65: ...ues 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 mantissa 10Exponent the value before the e is the man tissa and the value after the ...

Page 66: ...en an instruction is executing if a real I O bit in the CPU Unit s 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 afte...

Page 67: ...ymbol With symbol Application example MOV 10 D0 Stores 10 decimal 000A hex in D0 MOV 000A D0 Stores 000A hex 10 decimal in D0 Precautions for correct use An error will occur and the left bus bar will be displayed in red if a hexadecimal value including A to F is input with from the CX Programmer The input will be treated as an address in the CIO Area and the contents of that address will be specif...

Page 68: ...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 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 Data type Decimal values BCD values Notation None Application exa...

Page 69: ...r Data type Decimal values Hexadecimal values Notation With or With symbol for single precision data Application example FIX 0 10 D0 Converts floating point 0 10 into 16 bit signed binary data and stores the integer portion in D0 FIX 3DCCCCCD D0 Converts floating point 3DCCCCCD 0 10 deci mal into 16 bit signed binary data and stores the integer portion in D0 Precautions for correct use The input w...

Page 70: ...sically Index Registers are used with the following steps 1 Use MOVR to store the PLC memory address of the desired bit or word in an Index Register 2 Specify the Index Register as the operand in almost any instruction to indirectly address the desired bit or word 3 Offset or increment the original PLC memory address see below to redirect the pointer to another address 4 Continue steps 2 and 3 to ...

Page 71: ...R0 Operation When the PLC memory address CIO 0 13 is stored in IR0 The input condition is OFF P_Off is the Always OFF Flag so the OUT instruction sets CIO 0 13 which is indirectly addressed by IR0 to OFF The OUT instruction is executed so IR0 is incre mented As a result the PLC memory address CIO 0 14 which was incremented by 1 in the IR0 is stored Therefore in the following cycle the OUT instruct...

Page 72: ...Index Register at the point when the function block starts or before the Index Register is used and when the function block is completed or after the Index Register has been used incorporate processing in the program to return the Index Register to the saved value Always set the value before using Index Registers Operation will not be stable if Index Regis ters are used without the values being se...

Page 73: ...ectly addressed by IR0 is added to the addend data indirectly addressed by IR1 with the SIGNED BINARY ADD WITHOUT CARRY instruction 400 and the result is output to the word indirectly addressed by IR2 Index registers IR0 IR1 and IR2 are automatically incremented after being referenced in the 400 instruction Repeated 100 times When execution condition a goes ON upwardly differentiated condition the...

Page 74: ...n then be edited using the CX Programmer Host Link commands or FINS commands Instruction group Instruction name Mnemonic Primary function Data Movement Instructions MOVE TO REGISTER MOVR 560 Stores the PLC memory address of a bit or word in an Index Register MOVE TIMER COUNTER PV TO REGISTER MOVRW 561 DOUBLE MOVE MOVL 498 Transfers between Index Registers Used for exchanges and comparisons Compari...

Page 75: ...000 IR0 MOVR 0005 IR0 MOVL IR0 D2000 IR0 IR0 0000C005Hex D2000 D2001 IR0 C 0 0 5 0 0 0 0 D2000 D2001 a a a a D1001 and D1000 stored in IR0 or Actual memory address of CIO 0000 0000C000 Hex stored in IR0 Contents of IR0 stored in D1001 and D1000 D2001 and D2000 stored in IR0 or Actual memory address CIO 0005 0000C005 Hex stored in IR0 Contents of IR0 stored in D2001 and D2000 Peripheral servicing R...

Page 76: ...t 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 indire...

Page 77: ...s 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 10 0 2 10 02 10 02 a 2 10 02 10...

Page 78: ...eeded 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 exce...

Page 79: ...uctions will not be executed 4 8 1 Special Program Sections Program sections Instructions Instruction conditions Status Subroutine sections SBS SBN and RET instruc tions Subroutine program is executed The subroutine program section between SBN and RET instructions is exe cuted IL ILC sections IL and ILC instructions During IL The output bits are turned OFF and timers are reset Other instructions w...

Page 80: ...hen the interlock condition is ON Instructions not Supported in Subroutines Classification by function Mnemonic Instruction Step Ladder Instructions STEP STEP DEFINE SNXT STEP NEXT Instructions not Supported in Step Ladder Program Sections Classification by function Mnemonic Instruction Sequence Con trol Instructions FOR NEXT and BREAK FOR NEXT and BREAK LOOP END END IL and ILC INTERLOCK and INTER...

Page 81: ...nce Manual Cat No W483 for detailed information on programming instructions 5 1 Overview of I O Memory Areas 5 2 5 1 1 I O Memory Areas 5 2 5 1 2 I O Memory Area Address Notation 5 5 5 1 3 I O Memory Areas 5 6 5 2 I O Bits 5 7 5 3 Work Area W 5 8 5 4 Holding Area H 5 9 5 5 Data Memory Area D 5 11 5 6 Timer Area T 5 13 5 7 Counter Area C 5 15 5 8 Index Registers IR 5 17 5 9 Data Registers DR 5 21 5...

Page 82: ... CIO 199 and addresses for serial PLC links range from CIO 200 to CIO 289 The bits and words in the CIO Area are allocated to built in I O terminals on the CP2E CPU Unit and to the Expansion Units and Expansion I O Units Input words and output bits that are not allocated may be used as work bits in programming Refer to 5 2 I O Bits 5 1 1 I O Memory Areas CIO Area CIO 0 to CIO 289 Input bits starti...

Page 83: ...PROGRAM mode and RUN or MONITOR mode Automatically retained in the built in non volatile RAM even if the power supply is interrupted Refer to 5 4 Holding Area H z Data Memory Area D This data area is used for general data storage and manipulation and is accessible only by word 16 bits These words retain their content when the PLC is turned ON or the operating mode is switched between PROGRAM mode ...

Page 84: ...d to store PLC memory addresses i e absolute memory addresses in RAM to indirectly address words in I O memory Refer to 5 8 Index Registers IR z Data Registers DR Data registers DR0 to DR15 are used together with Index Registers When a Data Register is input just before an Index Register the content of the Data Register is added to the PLC memory address in the Index Register to offset that addres...

Page 85: ...mber and bit number are separated with a period On the CX Programmer addresses in the CIO Area including addresses for Serial PLC Links are given with no I O memory area designator CIO is used as the I O memory area designator in this manual for clarity 5 1 2 I O Memory Area Address Notation W 1 0 0 I O memory area designator Examples D A W The word number within the area given in decimal W 1 0 0 ...

Page 86: ...ally retained even if the power supply is interrupted Data in specified words of the DM Area can be retained in the built in Flash Memory by using a bit in the Auxiliary Area Applicable words D0 to D6999 N type CPU Unit 256K bits 16K words D0 to D16383 Automatically retained even if the power supply is interrupted Data in specified words of the DM Area can be retained in the built in Flash Memory ...

Page 87: ... 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 ex...

Page 88: ... store the final condition to simplify programming work and program design 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 f...

Page 89: ...e and RUN or MONITOR mode The Holding Area is automatically retained in the built in non volatile RAM even if the power supply is interrupted The Holding area contains 128 words with addresses ranging from H0 to H127 The Holding Area words from H512 to H1535 can be set for use with function blocks These words can not be specified as instruction operands in the user program The Holding Area is used...

Page 90: ...power is reset 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 Precautions for Correct Use Precautions for Correct Use When a Holding Area bit is used in a KEEP instruction never use a normally closed condition for the reset input When the power supply goes OFF or is temporarily interrupted the i...

Page 91: ...resses ranging from D0 to D16383 Of these D0 to D14999 can be backed up in backup memory built in Flash Memory Overview Notation Range D 200 Word number 200 I O memory area designator D D1300 D1200 D1399 D15999 D0 D1299 D1300 D1299 D8191 D1400 D1499 D1500 D1199 D4095 to to D1200 D0 D1199 to to to to to to to to to E type CPU Unit D6999 D7000 D1499 D1500 Words that can be backed up to backup memory...

Page 92: ...unction for how to use the DM Area words and bits z DM Fixed Allocation Words for Ethernet Socket Services D16000 to D16047 are used as setting status and parameter areas with the Socket Service func tion These words are used for other applications if the Ethernet Socket Service function is not served Refer to 15 6 6 Data Memory Area Allocations for how to use the DM Area words and bits z Indirect...

Page 93: ...ng table shows which instructions are used to refresh timer PVs in BCD and binary mode Timer numbers 0 to 255 are used by all timers listed above Note Only timer numbers 0 to 15 can be used in 1ms TIMER TMHH TMHHX z Timer Example Timer Number 0 and a Timer Set Value of 1 s Overview Notation Range Details Timer instruction BCD mode Binary mode HUNDRED MS TIMER TIM TIMX TEN MS TIMER TIMH TIMHX ONE M...

Page 94: ...ing 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 det...

Page 95: ... in the built in non volatile RAM even if the power supply is interrupted Counter numbers range from C0 to C255 z Types of Counters The following table shows which instructions are used to refresh counter PVs in BCD and binary mode Counter numbers 0 to 255 are used by all counters given above Built in high speed counters 0 to 5 do not use counter numbers Overview Notation Range Details Counter ins...

Page 96: ...Vs can be refreshed indirectly by force setting resetting the Counter Completion Flag There are no restrictions in the order of using counter numbers or in the number of N C or N O conditions that can be programmed Counter PVs can be read as word data and used in programming The following table shows when counters PVs are reset or maintained Instruction CNT CNTX CNTR CNTRX COUNTER REVERSIBLE COUNT...

Page 97: ... Register itself Basi cally the Index Registers are I O memory pointers All addresses in I O memory except Index Registers Data Registers and Condition Flags can be specified seamlessly with PLC memory addresses It isn t necessary to specify the data area I O memory addresses for IR DR and Condition Flags however cannot be held In addition to basic indirect addressing the PLC memory address in an ...

Page 98: ...ddressing The content of IR is treated as the PLC memory address of a bit or word IR LD IR0 Loads the bit at the PLC memory address contained in IR0 Indirect addressing with constant offset The constant prefix is added to the content of IR and the result is treated as the PLC memory address of a bit or word The constant may be any integer from 2 048 to 2 047 Constant IR Include a or in the constan...

Page 99: ...used as is as the PLC memory address of a word In this example MOVR sets the PLC memory address of CIO 2 in IR2 and the MOV instruction copies the contents of D0 to CIO 2 Bit Operand MOVR 000013 IR2 SET 5 IR2 When the operand is treated as a bit the leftmost 7 digits of the Index Register specify the word address and the rightmost digit specifies the bit number In this example MOVR sets the PLC me...

Page 100: ...orm multiple tasks it is only pos sible with the CX Programmer to read the Index Register value for the last task performed within the cycle from the multiple tasks Nor is it possible to write the Index Register value from the CX Pro grammer Additional Information The contents of an index register used inside a function block may be corrupted when the func tion block is called Always save the cont...

Page 101: ...the absolute memory address of a bit or word in I O memory Data Registers contain signed binary data so the content of an Index Register can be offset to a lower or higher address Normal instructions can be use to store data in Data Registers Data Registers cannot be force set or force reset Example The following examples show how Data Registers are used to offset the PLC memory addresses in Index...

Page 102: ... Setup A fatal error occurs except for one created with FALS Note If the IOM Hold Bit A500 12 is ON the Data Registers will not be cleared when a FALS error occurs or the operating mode is changed from PROGRAM mode to RUN MONITOR mode or vice versa Precautions for Correct Use Precautions for Correct Use Do not use Data Registers until a value has been set in the register The register s operation w...

Page 103: ...top when the power supply is turned ON When the clock stops the data in the Auxiliary Area A related to clock will be reset to 01 01 01 01 01 01 Sunday For an E type CPU Unit the data is always 01 01 01 01 01 01 Sunday The Auxiliary Area contains 960 words with addresses ranging from A0 to A959 Overview Word Bit Name Data retained when the clock of an S N type stops or in an E type A100 A199 CH Er...

Page 104: ... and words that can be read and written A448 to A959 Even the read write bits in the Auxiliary Area cannot be force set and force reset continuously z Auxiliary Area Words and Bits in the CX Programmer s System defined Symbols The following table gives the Auxiliary Area bits and words pre registered in the CX Programmer s global symbol table as system defined symbols Refer to A 2 Auxiliary Area A...

Page 105: ...uction error Instruction Error Operation program execution will be stopped and the Instruction Processing Error Flag A295 08 will be turned ON when the Error Flag is turned ON Access Error Flag P_AER Turned ON when an Illegal Access Error occurs The Illegal Access Error indicates that an instruction attempted to access an area of memory that should not be accessed When the PLC Setup is set to stop...

Page 106: ...han 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 capacit...

Page 107: ...es are read only they cannot be written from instructions or from the CX Programmer z Clock Pulses Overview Notation Details Name Name in CX Programmer Description 0 02 s Clock Pulse P_0_02s ON for 0 01 s OFF for 0 01 s 0 1 s clock pulse P_0_1s ON for 0 05 s OFF for 0 05 s 0 2 s clock pulse P_0_2s ON for 0 1 s OFF for 0 1 s 1 s clock pulse P_1s ON for 0 5 s OFF for 0 5 s 1 min clock pulse P_1min O...

Page 108: ...emory 5 28 CP2E CPU Unit Software User s Manual W614 z Using the Clock Pulses The following example turns a bit ON and OFF at 0 5 s intervals P_1s 100 00 Instruction Operand LD P_1s OUT 100 00 0 5s 0 5s 100 00 ...

Page 109: ...nd other units Be sure you understand the information in the section before attempting to write ladder diagrams 6 1 Allocation of Input Bits and Output Bits 6 2 6 1 1 I O Allocation 6 2 6 1 2 I O Allocation Concepts 6 3 6 1 3 Allocations on the CPU Unit 6 3 6 1 4 Allocations to Expansion Units and Expansion I O Units 6 4 I O Allocation ...

Page 110: ...lt in I O on the CPU Units 6 1 1 I O Allocation Inputs CPU Unit 100CH CIO 100 Outputs 00 to 11 00 to 07 Expansion I O Unit 101CH CIO 101 00 to 11 00 to 07 Allocated 12 bits Allocated 12 bits in the next word Allocated 8 bits Allocated 8 bits in the next word C C C 3 c 6 0 1 2 4 5 7 C 1 3 5 7 9 11 0 2 4 6 8 10 CPU Unit 0CH CIO 0 Inputs Outputs Bit 03 in CIO 0 Bit 03 in CIO 100 100CH CIO 100 C C C 3...

Page 111: ... CPU Unit with 40 I O Points 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 out...

Page 112: ...Units and Expansion I O Units Allocations to Expansion I O Units Model Input bits Output bits No of bits No of words Addresses No of bits No of words Addresses 8 point Input Unit CP1W 8ED 8 1 CIO m bits 00 to 07 None None 8 point Output Unit Relay outputs CP1W 8ER None None 8 1 CIO n bits 00 to 07 Sinking transistor outputs CP1W 8ET Sourcing transis tor outputs CP1W 8ET1 16 point Output Unit Relay...

Page 113: ... Unit is allocated to the next Unit that requires it 15 14 13 11 12 09 08 07 06 05 04 02 01 00 Cannot be used 03 10 Input bits Output bits CIO m CIO m 1 CIO n CIO n 1 bit Cannot be used CPU Unit with 30 I O Points Input bits Output bits CIO 0 00 to CIO 0 11 CIO 1 00 to CIO 1 05 18 inputs 12 outputs CIO 100 00 to CIO 100 07 CIO 101 00 to CIO 101 03 1st Unit 8 point Expansion Input Unit CIO 2 00 to ...

Page 114: ...o of words Addresses Analog I O Unit CP1W MAD11 2 words CIO m to m 1 1 word CIO n CP1W MAD42 4 words CIO m to m 3 2 word CIO n to CIO n 1 CP1W MAD44 4 words CIO m to m 3 4 word CIO n to CIO n 3 Analog Input Unit CP1W AD041 4 words CIO m to m 3 2 words CIO n to CIO n 1 CP1W AD042 4 words CIO m to m 3 2 words CIO n to CIO n 1 Analog Output Unit CP1W DA021 None 2 words CIO n to CIO n 1 CP1W DA041 Non...

Page 115: ...101 00 to CIO 101 07 1st Unit CP1W TS002 Temperature Sensor Unit CIO 2 to CIO 5 2nd Unit CP1W DA041 Analog Output Unit 3rd Unit Expansion I O Unit with 40 I O Points CIO 102 to CIO 105 CIO 6 00 to CIO 6 11 CIO 7 00 to CIO 7 11 CIO 106 00 to CIO 106 07 CIO 107 00 to CIO 107 07 24 inputs 16 outputs bit Input bits Output bits 15 14 13 11 12 09 08 07 06 05 04 02 01 00 03 10 CIO 0 CIO 1 CIO 2 CIO 3 CIO...

Page 116: ...6 I O Allocation 6 8 CP2E CPU Unit Software User s Manual W614 ...

Page 117: ...nit Settings 7 3 7 2 2 Timing and Interrupt Settings 7 4 7 2 3 Input Constants Settings 7 4 7 2 4 Serial Option Port 1 Built in RS 232C Port 7 5 7 2 5 Serial Option Port 2 Built in RS 485 Port 7 9 7 2 6 Serial Option Port 1 EX 7 13 7 2 7 Built in Inputs 7 16 7 2 8 Pulse Output 0 Settings 7 18 7 2 9 Pulse Output 1 Settings 7 19 7 2 10 Pulse Output 2 Settings 7 21 7 2 11 Pulse Output 3 Settings 7 22...

Page 118: ...ter Reading the DM area words saved to the backup memory when power is turned ON Startup Data Read Changing the Startup Mode to PROGRAM or MONITOR mode when debugging Startup Mode Detection of low battery errors is not required when using bat tery free operation Detect Low Battery Finding instruction errors when debugging Stop CPU on Instruction Error A minimum cycle time setting to create a consi...

Page 119: ...ault Possible settings When setting is read by CPU Unit 1 Startup Mode Setting Run RUN mode Program PROGRAM mode When power is turned ON Monitor MONITOR mode Run RUN mode Execute Process Settings Name Default Possible settings When setting is read by CPU Unit 1 Stop CPU on Instruction Error Do not stop Do not stop At start of operation Stop 2 Do not register FAL to error log Register Register When...

Page 120: ... 10 ms 2 Constant Cycle Time No setting variable Setting At start of operation 1ms 1 000 ms 7 2 3 Input Constants Settings Input Constants Name Default Possible settings When setting is read by 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 C...

Page 121: ...ned ON Custom 2 Mode When custom settings have been selected Host Link Host Link When power is turned ON NT Link 1 N RS 232C No protocol PC Link Slave PC Link Master Modbus RTU Easy Master Modbus RTU Slave 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 data length stop bits parity...

Page 122: ...bit odd 8 bits 1 bit no parity 2 3 3 Start Code Disable Disable When power is turned ON Set 2 3 4 Start Code setting 00 Hex 00 Hex When power is turned ON FF hex 2 3 5 End Code None Received Bytes Received Bytes no end code When power is turned ON CR LF Set End Code 2 3 6 Received Bytes setting 256 bytes 256 bytes When power is turned ON 1 byte 255 bytes 2 3 7 Set End Code setting 00 Hex 00 Hex Wh...

Page 123: ...er is turned ON 1 100 ms 255 100 ms 2 6 PC Link Slave Settings 2 6 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 6 2 PLC Link Unit No 0 0 When power is turned ON 7 2 7 PC Link Master Settings 2 7 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 ...

Page 124: ...bps 4 800 bps 9 600 bps 19 200 bps 38 400 bps 57 600 bps 115 200 bps 2 8 2 Format data length stop bits parity 8 bits 1 bit even 8 bits 1 bit even When power is turned ON 8 bits 2 bits no parity 8 bits 1 bit odd 2 8 3 Modbus Slave Address 1 0 Slave Address 1 When power is turned ON 1 247 Name Default Possible settings When setting is read by CPU Unit ...

Page 125: ...s When power is turned ON Custom 2 Mode Host Link Host Link When power is turned ON NT Link 1 N RS 232C No protocol PC Link Slave PC Link Master Modbus RTU Easy Master Modbus RTU Slave 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 data length stop bits par ity 7 bits 2 bits even ...

Page 126: ...bit odd 8 bits 1 bit no parity 2 3 3 Start Code Disable Disable When power is turned ON Set 2 3 4 Start Code setting 00 hex 00 hex When power is turned ON FF hex 2 3 5 End Code None Received Bytes Received Bytes no end code When power is turned ON CR LF Set End Code 2 3 6 Received Bytes setting 256 bytes 256 bytes When power is turned ON 1 byte 255 bytes 2 3 7 Set End Code setting 00 hex 00 hex Wh...

Page 127: ...er is turned ON 1 100 ms 255 100 ms 2 6 PC Link Slave Settings 2 6 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 6 2 PLC Link Unit No 0 0 When power is turned ON 7 2 7 PC Link Master Settings 2 7 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 ...

Page 128: ... bps 4 800 bps 9 600 bps 19 200 bps 38 400 bps 57 600 bps 115 200 bps 2 8 2 Format data length stop bits parity 8 bits 1 bit even 8 bits 1 bit even When power is turned ON 8 bits 2 bits no parity 8 bits 1 bit odd 2 8 3 Modbus Slave Address 1 0 Slave Address 1 When power is turned ON 1 247 Name Default Possible settings When setting is read by CPU Unit ...

Page 129: ...ustom 2 Mode When custom settings have been selected RS 232C No protocol RS 232C No protocol When power is turned ON PC Link Slave PC Link Master Modbus RTU Easy Master Modbus RTU Slave 2 1 RS 232C No protocol 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 data length stop bits parity 7 bits 2 ...

Page 130: ...rmat data length stop bits parity 7 bits 2 bits even 7 bits 2 bits even When power is turned ON 7 bits 2 bits odd 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 3 3 Response Timeout 5 s 0 5 s When power is turned ON 1 100 ms 255 100 ms 2 4 PC L...

Page 131: ...ected to the PLC 0 0 When power is turned ON 7 2 6 Modbus RTU Slave Settings 2 6 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 6 2 Format data length stop bits par ity 7 bits 2 bits even 7 bits 2 bits even When power is turned ON 7 bits 2 bits odd 7 bits 2 bits no parity 7 bits 1 bit even 7 bits 1 bit odd 7 bits 1 bi...

Page 132: ... speed counter 1 Do not use Do not use When power is turned ON Use 2 1 Counting mode Linear mode Linear mode At start of operation Circular mode 2 1 1 Circular Max Count 0 0 At start of operation 4 294 967 295 2 2 Reset Note Only a software reset can be set if an increment pulse input is set for the input set ting Z phase software reset stop comparing Z phase software reset stop comparing When pow...

Page 133: ...Increment pulse input Increment pulse input When power is turned ON 6 Use high speed counter 5 Do not use Do not use When power is turned ON Use 6 1 Counting mode Linear mode Linear mode At start of operation Circular mode 6 1 1 Circular Max Count 0 0 At start of operation 4 294 967 295 6 2 Reset Software reset Software reset When power is turned ON Software reset comparing 6 3 Input Setting Incre...

Page 134: ...peration NO 4 Search Return Initial Speed 0 pps 0 pps At start of operation 100 000 pps Origin Search Settings Name Default Possible settings When setting is read by CPU Unit 1 Use define origin operation Do not use Do not use When power is turned ON Use 1 1 Search Direction CW CW At start of operation CCW 1 2 Detection Method Method 0 Method 0 At start of operation Method 1 Method 2 1 3 Search Op...

Page 135: ...gs Name Default Possible settings When setting is read by CPU Unit 1 Speed 0 pps disabled 1 pps At start of operation 100 000 pps 2 Acceleration Ratio rate 0 disabled 1 pulse 4 ms At start of operation 65 535 pulse 4 ms 3 Deceleration rate 0 disabled 1 pulse 4 ms At start of operation 65 535 pulse 4 ms 7 2 9 Pulse Output 1 Settings Base Settings Name Default Possible settings When setting is read ...

Page 136: ... of operation Mode 1 Mode 2 1 5 Origin Input Signal NC NC When power is turned ON NO 1 6 Proximity Input Signal NC NC At start of operation NO 1 7 Search High Speed 0 pps disabled 1 pps At start of operation 100 000 pps 1 8 Search Proximity Speed 0 pps disabled 1 pps At start of operation 100 000 pps 1 9 Origin Compensation Value 0 pps 2 147 483 648 At start of operation 0 2 147 483 647 1 10 Origi...

Page 137: ...operation for limit signal turning ON Hold Hold At start of operation 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 Origin Search Settings Name Default Possible settings When setting is read by CPU Unit 1 Use define origin...

Page 138: ... At start of operation 9 999 ms Origin Return Settings Name Default Possible settings When setting is read by CPU Unit 1 Speed 0 pps disabled 1 pps At start of operation 100 000 pps 2 Acceleration Ratio rate 0 disabled 1 pulse 4 ms At start of operation 65 535 pulse 4 ms 3 Deceleration rate 0 disabled 1 pulse 4 ms At start of operation 65 535 pulse 4 ms 7 2 11 Pulse Output 3 Settings Base Settings...

Page 139: ... Mode Mode 0 Mode 0 At start of operation Mode 1 Mode 2 1 5 Origin Input Signal NC NC When power is turned ON NO 1 6 Proximity Input Signal NC NC At start of operation NO 1 7 Search High Speed 0 pps disabled 1 pps At start of operation 100 000 pps 1 8 Search Proximity Speed 0 pps disabled 1 pps At start of operation 100 000 pps 1 9 Origin Compensation Value 0 pps 2 147 483 648 At start of operatio...

Page 140: ... 2 IP Address 0 0 0 0 0 0 0 0 When power is turned ON or when Ethernet is reset 255 255 255 255 3 Subnet Mask 0 0 0 0 0 0 0 0 When power is turned ON or when Ethernet is reset 255 255 255 255 4 TCP Keep alive Time 120 min Default value 0 0 120 min When power is turned ON or when Ethernet is reset 1 min 65 535 min 5 FINS Node Address Node address 1 Default value 0 0 1 When power is turned ON or whe...

Page 141: ... when Ethernet is reset Client 8 6 Connection IP Address 0 0 0 0 0 0 0 0 When power is turned ON or when Ethernet is reset 255 255 255 255 8 7 Auto FINS Node Allocation Address Only valid for FINS TCP Server mode 252 Default value 0 0 252 When power is turned ON or when Ethernet is reset 253 8 8 Keep alive Disable Disable When power is turned ON or when Ethernet is reset Enable FINS TCP Connection...

Page 142: ...ead by CPU Unit 12 DNS Server IP Address 0 0 0 0 0 0 0 0 When power is turned ON or when Ethernet is reset 255 255 255 255 13 DNS Port Number 53 Default value 0 0 53 When power is turned ON or when Ethernet is reset 1 65 535 14 Retry Time 10s Default value 0 0 10s When power is turned ON or when Ethernet is reset 1s 65 535s SNTP Server Name Default Possible Settings When setting is read by CPU Uni...

Page 143: ...er 123 Default value 0 0 123 When power is turned ON or when Ethernet is reset 1 65 535 15 4 Retry Time 10s Default value 0 0 10s When power is turned ON or when Ethernet is reset 1s 255s 15 5 Difference Time 0h0m 12h00m When power is turned ON or when Ethernet is reset 13h00m Name Default Possible Settings When setting is read by CPU Unit ...

Page 144: ...7 PLC Setup 7 28 CP2E CPU Unit Software User s Manual W614 ...

Page 145: ...uilt in Functions 8 2 8 2 Overall Procedure for Using CP2E Built in Functions 8 3 8 3 Terminal Allocations for Built in Functions 8 4 8 3 1 Specifying the Functions to Use 8 4 8 3 2 Selecting Functions in the PLC Setup 8 4 8 3 3 Allocating Built in Input Terminals 8 6 8 3 4 Allocating Built in Output Temrinals 8 8 Overview of Built in Functions and Allocations ...

Page 146: ...ts Incremental 100 kHz 3 counters 10 kHz 3 counters Up down 100 kHz 2 counters Pulse plus direction 100 kHz 2 counters Differential phases 4 50 kHz 2 counters Section 11 Pulse outputs Not supported 2 outputs pulse plus direction only An external power supply is required for pulse outputs N14 20 CPU Units 2 outputs pulse plus direction only N30 40 60 CPU Units 4 outputs pulse plus direction only An...

Page 147: ...pts Quick response inputs High speed counters Origin searches Minimum cycle time Serial communications Ethernet Analog Option Board 3 Write ladder diagrams using the CX Pro grammer Example Permitting interrupts with the MSKS instruction and program ming high speed counters with the CTBL instruction Example Stopping high speed counters Refer to A 2 Auxil iary Area Allocations by Address Example Rea...

Page 148: ...d by setting parameters in the PLC Setup Set the functions so that no more than one function uses the same terminal Select function numbers so that high speed counter inputs and inputs for other functions such as interrupt inputs quick response inputs and origin inputs do no con flict with each other Input functions can be selected by selecting the Use high speed counter Check Box in a High speed ...

Page 149: ...Terminal Allocations for Built in Functions 8 8 3 2 Selecting Functions in the PLC Setup 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 Select the Use define origin operation Check Box ...

Page 150: ...phase A or up input Counter 0 pulse input 01 Normal input 1 Counter 1 increment input Counter 0 phase B or down input Counter 1 pulse input 02 Normal input 2 Interrupt input 2 Quick response input 2 Counter 2 increment input Counter 1 phase A or up input Counter 0 direction 03 Normal input 3 Interrupt input 3 Quick response input 3 Counter 1 phase B or down input Counter 1 direction 04 Normal inpu...

Page 151: ...nput Tab Page High speed counter 0 to 5 settings on Built in Input Tab Page Origin search settings on Pulse Output 0 1 Tab Page Normal Interrupt Quick Use Use Normal input Interruptinputs Quick response inputs Increment pulse input Differential phase 4 or up down Pulse direction Origin search CIO 0 00 Normal input 0 Counter 0 increment input Counter 0 phase A or up input Counter 0 pulse input 01 N...

Page 152: ...FEED is executed PLC Setup When the PWM instruction is exe cuted Origin search settings on Pulse Output 0 to 3 Tab Page Terminal block label Terminal number Normal outputs Fixed duty ratio pulse output Variable duty fac tor output 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 ...

Page 153: ...s Manual W614 9 This section describes the quick response inputs that can be used to read signals that are shorter than the cycle time 9 1 Quick response Inputs 9 2 9 1 1 Overview 9 2 9 1 2 Flow of Operation 9 3 Quick response Inputs ...

Page 154: ...e time Use the quick response inputs to read signals shorter than the cycle time such as inputs from photomicrosensors The pulse widths of quick response input signals must meet the following conditions 9 1 1 Overview END Cycle time Can read ON signals shorter than this time Pulse signal from photomicrosensor or other device Built in input Cycle time Input bit Input bit ON for one scan in the next...

Page 155: ...ngs Built in Input Tab Page 9 1 2 Flow of Operation 1 Set IN2 to IN9 for quick response inputs on the Built in Input Tab Page of the PLC Setup using the CX Programmer The terminals 02 to 09 of CIO 0 can be used for quick response inputs Bits CIO 0 02 to CIO 0 09 correspond to ter minals 02 to 09 2 Read the status of CIO 0 02 to CIO 0 09 using the LD instruction or other instructions PLC Setup Quic...

Page 156: ... IN2 to Quick in the PLC Setup Interrupt Settings 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 Quick response Input Terminal Creating Ladder Programs L1 L2 N COM 01 03 05 07 09 11 NC 00 02 04 06 08 10 Upper Terminal Block Quick respon...

Page 157: ...0 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 8 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...

Page 158: ...cution 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 Interrupts are classified by the interrupt factor There are the following three types of interrupts Changes in status of built in inputs on the CPU Unit Input Interrupts in Page 10 3 Speci...

Page 159: ...pt input signals must meet the following conditions 10 2 1 Overview END END Interrupt input Built in input Interrupt input bit turns ON or OFF Cycle Cyclic tasks ladder programs I O refreshing Interrupt occurs Interrupt task Ladder program Condition for accepting interrupt Example CIO 0 02 interrupt input IN2 MSKS instruction executed to enable the interrupt Cyclic task execution Cyclic task execu...

Page 160: ...he Built in Input Tab Page of the PLC Setup using the CX Programmer Terminals 02 to 09 on the CIO 0 terminal block can be used for interrupt inputs Bits CIO 0 02 to CIO 0 09 cor respond to terminals 02 to 09 2 Write the program in the interrupt task Interrupt tasks 2 to 9 correspond to interrupt inputs 2 to 9 Specify whether the interrupt is executed when the input turns ON or when it turns OFF in...

Page 161: ...d for the corresponding interrupt inputs Right click a program in the CX Programmer and select Properties Select interrupt tasks 2 to 9 in the Task Type Field of the Program Properties Dialog Box Interrupt input settings Corresponding bit address Input interrupt task IN2 Select Interrupt for IN2 to IN9 CIO 0 02 2 IN3 CIO 0 03 3 IN4 CIO 0 04 4 IN5 CIO 0 05 5 IN6 CIO 0 06 6 IN7 CIO 0 07 7 IN8 CIO 0 ...

Page 162: ...als Interrupt input 8 and 9 are only supported by N20 30 40 60 CPU Units Terminal Corresponding bit address PLC Setup on Built in Input Tab Page Interrupt task number Operand N Operand C Interrupt identifier Specifying up down differentiation of an interrupt input 02 on CIO 0 terminal block CIO 0 02 Interrupt input IN2 2 112 0000 Up differentiation 0001 Down differentiation 03 on CIO 0 terminal bl...

Page 163: ...put IN4 4 104 05 on CIO 0 terminal block CIO 0 05 Interrupt input IN5 5 105 06 on CIO 0 terminal block CIO 0 06 Interrupt input IN6 6 106 07 on CIO 0 terminal block CIO 0 07 Interrupt input IN7 7 107 08 on CIO 0 terminal block CIO 0 08 Interrupt input IN8 8 108 09 on CIO 0 terminal block CIO 0 09 Interrupt input IN9 9 109 MSKS 112 0000 END END 01 03 07 05 09 11 00 02 04 06 08 10 MSKS 102 0000 Cycl...

Page 164: ...s to interrupt input 2 10 2 3 Application Example Sensor input interrupt Workpiece Sensor input 1 Sensor input 2 Sensor input 3 Sensor input interrupt input 2 CIO 0 02 Sensor input Sensor input Sensor input CIO 0 00 CIO 0 01 CIO 0 03 Reset input CIO 0 04 OK output CIO 100 00 NG output 1 CIO 100 01 NG output 2 CIO 100 02 NG output 3 CIO 100 03 NG output 4 CIO 100 04 Interrupt task execution Interru...

Page 165: ... turns ON Unmasks the input interrupt The MSKS instruction is used to specify an interrupt when the input turns ON and then it is used to unmask the input interrupt NG output sensor input 1 P_First_Cycle NG output sensor input 2 NG output sensor input 3 Reset input Sensor input 1 Sensor input 1 Sensor input 2 Sensor input 2 Sensor input 3 Sensor input 3 OK output NG output 2 Sensor input 1 NG outp...

Page 166: ...der programs I O refresh Interrupt occurs Interrupt task Ladder program Specified interval Minimum interval 1 ms 1ms 1ms 1ms Condition for accepting interrupts Internal timer Cyclic task execution MSKS instruction executed to set the scheduled interrupt interval Scheduled Interrupt Interval 0 5 ms example Execution interrupted Execution interrupted Execution interrupted Cyclic task execution Cycli...

Page 167: ... program in a cyclic task in order to use scheduled interrupts 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 10 3 2 Flow of Operation Write the program for the corresponding interrupt task 1 fixed Use MSKS to specify the scheduled interrupt interval The setting can be ...

Page 168: ...s the scheduled interrupt will not be exe cuted until the other interrupt task had been completed Even in this case measurement of internal timer is continually executed in parallel so the exe cution of scheduled interrupt tasks will not be delayed Scheduled interrupt interval cannot be changed during the startup of scheduled interrupt Change the interval after the scheduled interrupt has stopped ...

Page 169: ... restored when processing returns to the cyclic task To prevent certain instructions from being interrupted during processing insert the DI or EI instruction 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...

Page 170: ...10 Interrupts 10 14 CP2E CPU Unit Software User s Manual W614 ...

Page 171: ...11 2 High speed Counter Inputs 11 8 11 2 1 Pulse Input Methods Settings 11 8 11 2 2 Counting Ranges Settings 11 10 11 2 3 Reset Methods 11 11 11 2 4 Reading the Present Value 11 12 11 2 5 Frequency Measurement 11 13 11 3 High speed Counter Interrupts 11 14 11 3 1 Overview 11 14 11 3 2 Present Value Comparison 11 17 11 3 3 High speed Counter Interrupt Instruction 11 20 11 4 Related Auxiliary Area B...

Page 172: ... 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 11 1 1 Overview Encoder Phase A phase B Up down pulse inputs Reset input phase Z Etc High speed counter PV stored ...

Page 173: ...speed counters 0 to 5 Set the counting mode reset method and input setting 11 1 2 Flow of Operation 1 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 used...

Page 174: ...rement pulse input Differential phase 4 or up down input Pulse direction input Normal input Interrupt input Quick response input Originsearches for pulse out puts 0 to 3 CIO 0 00 High speed Counter 0 increment input High speed Counter 0 phase A or up input High speed Counter 0 pulse input Normal input 0 01 High speed Counter 1 increment input High speed Counter 0 phase B or down input High speed C...

Page 175: ... Terminal block label Terminal Increment pulse input Differential phase 4 or up down input Pulse direction input Normal input Interrupt input Quick response input Origin searches for pulse outputs 0 and 1 CIO 0 00 High speed Counter 0 increment input High speed Counter 0 phase A or up input High speed Counter 0 pulse input Normal input 0 01 High speed Counter 1 increment input High speed Counter 0...

Page 176: ...m the Auxiliary Area and convert it to position or length data using instruc tions or measure the length using con mparison instructions such as and 11 2 4 Reading the Present Value Reading the high speed counter frequency speed Execute a PRV instruction 11 2 5 Frequency Measurement 0V 24V 0 00 0 01 0 04 COM COM 24V 0 00 0 01 0 04 COM 0V 24V 0V IA IB IZ Encoder power supply 24 VDC Example E6B2 CWZ...

Page 177: ... digits 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 e...

Page 178: ...tions for Incrementing Decrementing the Count Up Down Pulse Input Conditions for Incrementing Decrementing the Count Pulse 14 2 15 1 16 0 9 10 8 7 6 11 5 12 4 13 3 Pulse Count value Increment No change No change No change Only rising edges are counted OFF ON ON ON OFF OFF 11 12 11 10 10 9 9 8 8 8 7 7 7 6 6 6 5 5 5 4 4 4 3 3 3 2 2 2 1 1 0 Phase A Phase B 4 Phase A Phase B Count value Increment Incr...

Page 179: ...in one cycle is stored in A442 If the direction signal is ON or OFF at a high frequency count values may not agree Cycle time exceeded error possibly occurs when changing the direction at a high frequency Therefore please do not connect chattering equipment as direction signal input such as relay and switch Interval of pulse input after direction changing If the input setting is set for pulse dire...

Page 180: ...e and Circular Ring Mode that counts in a set range of any maximum value 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 Up Down Mode High speed counter Address of High speed Counter Count Direction Flag High speed counter 0 A274 10 Hig...

Page 181: ...tive values in Ring Mode If the maximum ring count is set to 0 in the PLC Setup the counter will operate with a maxi mum ring count of FFFF FFFF hex It is called reset that a high speed counter s PV is set to 0 There are two reset methods Phase Z signal software reset software reset The high speed counter s PV is reset when the phase Z signal reset input goes from OFF to ON while the corresponding...

Page 182: ...L instruction or other instructions z Reading the High speed Counter PV with a PRV Instruction Software Reset 11 2 4 Reading the Present Value Value refreshed at the I O refresh timing Read PV from Auxiliary Area Value updated when a ladder program is executed Read PV by executing a PRV instruction Reading the Value Refreshed at the I O Refresh Timing Read PV Auxiliary Area word High speed counter...

Page 183: ...rect Use Precautions for Correct Use The frequency measurement function can be used with high speed counter 0 only z Specifications If the frequency exceeds the maximum value the maximum value will be stored 11 2 5 Frequency Measurement Overview Item Specifications Number of frequency mea surement inputs 1 input high speed counter 0 only Frequency measurement range High speed counter 0 Differentia...

Page 184: ...rrupt program can be started when the present value of the high speed counter enters a set range END END Cycle Rotary Encoder Built in input Present value Present value matches set target value Time Interrupt task Ladder diagram Interrupt occurs Cyclic tasks ladder programs I O refresh 0 Instruction execution condition CTBL instruction executed High speed Counter Unit High speed counter PV Target ...

Page 185: ...rminals 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 2 Write a program for interrupt tasks 0 to 15 Set the comparison values for the high speed counter and the interrupt tasks 0 to 15 to be started using the CTBL instruction Start the comparison using the INI instruction The comparison can be started simultaneous...

Page 186: ...ounter interrupts Refer to 8 3 3 Allocating Built in Input Terminals for high speed counter interrupt Refer to 10 1 Interrupts for the interrupts excluding high speed counter interrupts z Writing the Interrupt Task Program Create programs for interrupt tasks 0 to 15 which are executed for the corresponding high speed counter interrupts Right click a program in the CX programmer and select Properti...

Page 187: ...s cycled through the comparison table it will return and wait for a match with the first target value again The following examples show the operation of an interrupt task for a comparison table Example 1 Register the comparison table with the CTBL COMPARISON TABLE LOAD instruction Specify the interrupt tasks to be started in this step Start comparison with the CTBL COMPARISON TABLE LOAD or INI MOD...

Page 188: ... Unit N30 40 60 CPU Unit High speed counter 0 Incremental pulse 100kHz 100kHz Up and down pulses Pulse plus direction Differential phase 4 50kHz 50kHz High speed counter 1 Incremental pulse 100kHz 100kHz Up and down pulses 10kHz Pulse plus direction 100kHz Differential phase 4 5kHz 50kHz High speed counter 2 Incremental pulse 10kHz 100kHz High speed counter 3 Incremental pulse 10kHz High speed cou...

Page 189: ...red 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 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 wit...

Page 190: ...speed counter PV is within a registered range 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 11 3 3 High speed Counter Interrupt Instruction COMPARISON TABLE LOAD Instruction CTBL Operand Settings C1 Port specifier 0000 High speed counter 0 0005 High speed count...

Page 191: ... speed counter interrupts are always valid the INI instruction is not required MODE CONTROL Instruction INI S 1 S 2 S 3 S 0 15 0 3 4 7 8 0 0 0 0 11 12 14 15 S 16 S 17 S 18 Upper word of target value 1 Interrupt task number for target value 1 00000000 to FFFFFFFF hex 00000000 to FFFFFFFF hex Number of target values 0001 to 0006 hex 1 to 6 target values Interrupt Task Number Interrupt task number 00...

Page 192: ...e first word of the new PV when C is set to 0002 change the PV Example 1 Target Value Comparison Item Setting High speed counter 0 Use counter Counting mode Linear mode Circular Max Count Reset method Software reset Input Setting Up Down inputs Word Setting Function D1000 0002 Number of target values 2 D1001 7530 Rightmost 4 digits of the target value 1 data 30000 Target value 30 000 0000 7530 hex...

Page 193: ...e high speed counter 1 operates in circular ring mode and starts interrupt task 12 when the PV is between 25 000 0000 61A8 hex and 25 500 0000 639C hex The maximum ring count is set to 50 000 0000 C350 hex 1 Set high speed counter 1 on the PLC Setup s Built in Input Tab Page Example 2 Range Comparison Item Setting High speed counter 1 Use counter Counting mode Circular mode Circular Max Count 50 0...

Page 194: ...limit Lower limit value 25 000 D2001 0000 Leftmost 4 digits of range 1 lower limit D2002 639C Rightmost 4 digits of range 1 upper limit Upper limit value 25 500 D2003 0000 Leftmost 4 digits of range 1 upper limit D2004 000C Range 1 interrupt task number 12 C hex D2005 to D2008 All 0000 Range 2 lower and upper limit values Not used and do not need to be set Range 2 settings D2009 FFFF Disables rang...

Page 195: ...01 A321 01 A326 01 A327 01 Range 3 Compari son Condition Met Flag ON for match A274 02 A275 02 A320 02 A321 02 A326 02 A327 02 Range 4 Compari son Condition Met Flag ON for match A274 03 A275 03 A320 03 A321 03 A326 03 A327 03 Range 5 Compari son Condition Met Flag ON for match A274 04 A275 04 A320 04 A321 04 A326 04 A327 04 Range 6 Compari son Condition Met Flag ON for match A274 05 A275 05 A320 ...

Page 196: ...a specific target value or range z Operation Overview A sheet feeder is controlled to feed constant lengths in a given direction e g for vacuum packing of food products 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 Using a Rotary Encoder to Measure Positions M...

Page 197: ...e PLC Settings Dialog Box 2 Click the Built in Input Tab Encoder power supply 24 VDC Example E6B2 CWZ6C NPN open collector output Phase A Black White Phase B Orange Phase Z Brown Blue 100 to 240 VAC 24 VDC power supply Start motor Motor running CIO 100 00 Motor low speed output CIO 100 01 Example Inverter CP2E N20DR A Error stop position output CIO 100 03 indicator Normal stop position output CIO ...

Page 198: ...wing 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 Motor start Reset with motor stopped The High speed Counter Reset Bit 0 is turned ON and the reset process is performed Specifies high speed counter 0 Specifies comparision with target values and starts comparison First w...

Page 199: ...p 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 Interrupt task 4 Turns ON the motor low speed output Interru...

Page 200: ...11 High speed Counters 11 30 CP2E CPU Unit Software User s Manual W614 ...

Page 201: ...e 12 20 12 4 Implementing Interrupt Feeding 12 23 12 4 1 Interrupt Feeding 12 23 12 4 2 Flow of Operation 12 23 12 4 3 Application Example 12 24 12 5 Positioning Linear Interpolation 12 26 12 5 1 Positioning Linear Interpolation 12 26 12 5 2 Positioning Linear Interpolation Configuration 12 27 12 5 3 Application Example 12 28 12 6 Defining Origin Position 12 30 12 6 1 Origin Searches 12 30 12 6 2 ...

Page 202: ...9 1 Vertically Conveying PCBs Multiple Progressive Positioning 12 46 12 9 2 Feeding Wrapping Material Interrupt Feeding 12 51 12 10Precautions when Using Pulse Outputs 12 59 12 11Pulse Output Pattern 12 64 12 11 1 Speed Control Continuous Mode 12 64 12 11 2 Positioning Control Independent Mode 12 66 ...

Page 203: ...a servomotor or stepping motor in the following configuration 12 1 1 Overview Built in output Pulse output Servo Drive or stepping driver Servomotor or stepping motor zTrapezoidal control Frequency speed Frequency speed Frequency speed Travel distance Time Travel distance Time Travel distance Time zJogging zOrigin search ORG PLS2 SPED ACC CP2E Trapezoidal control with a PLS2 instruction Jogging wi...

Page 204: ... them externally Do not connect an external power supply to N type CPU Units Wiring for S type CPU Unit 12 1 2 Flow of Operation 1 Setting is required for the following situations Performing an origin search Using the Limit Input Signal as an input to func tions other than origin searches 2 Execute instructions related to pulse control Set pulse output 0 to 03 and whether to use termi nals 00 and ...

Page 205: ...p Item Setting Description Base Settings Undefined Origin Hold When a Limit Input Signal is input the pulse output is stopped and the previous status is held Undefined When a Limit Input Signal is input the pulse output is stopped and origin becomes undefined Limit Input Signal Operation Search Only The CW CCW Limit Input Signal is used for origin searches only Always The CW CCW Limit Input Signal...

Page 206: ...nals and Wiring Output terminal block Pulse output method Other functions that cannot be used at the same time Terminal block label Terminal number Pulse plus direction Normal output PWM output CIO 100 00 Pulse output 0 pulse Normal output 0 01 Pulse output 1 pulse Normal output 1 PWM output 02 Pulse output 0 direction Normal output 2 03 Pulse output 1 direction Normal output 3 CIO 101 00 Pulse ou...

Page 207: ... 8 Note 2 Quick response input 8 Note 2 09 Pulse 3 Origin input signal Note 1 Normal input 9 Interrupt input 9 Note 2 Quick response input 9 Note 2 10 Pulse 0 Origin proximity input signal Normal input 10 11 Pulse 1 Origin proximity input signal Normal input 11 CIO 1 00 Pulse 2 Origin proximity input signal Note 1 Normal input 12 01 Pulse 3 Origin proximity input signal Note 1 Normal input 13 Inpu...

Page 208: ... PULS 02 CIO 100 02 Direction Connect to Servo Drive s direction input SIGN Normal input The external signal must be received as an input and the input status must be written to A540 08 in the ladder program CW limit sensor Connect sensor to a normal input terminal Normal input The external signal must be received as an input and the input status must be written to A540 09 in the ladder program CC...

Page 209: ... external signal must be received as an input and the input status must be written to A541 10 in the ladder program Positioning completed input Not used Connect the Posi tioning Completed Signal INP from the Servo Drive to a normal input ter minal Terminal block Addresses Signal Origin search Terminal block label Terminal number Operating mode 0 Operating mode 1 Operating mode 2 CIO 101 00 CIO 101...

Page 210: ...al input The external signal must be received as an input and the input status must be written to A543 09 in the ladder program CCW limit sensor Connect sensor to a normal input terminal CIO 0 09 CIO 0 09 Origin input Connect to open collector output from sensor or other device Connect to the phase Z signal from the Servo Drive Connect to the phase Z signal from the Servo Drive CIO 1 01 CIO 1 01 O...

Page 211: ...nding to CIO 100 00 and CIO 100 01 has been internally connected with V for sinking output models with V for sourcing output models PULS PULS SGN SGN CP2E CPU Unit built in output terminals Pulse output Direction output 24 VDC power supply 100 00 100 01 100 02 100 03 COM Servo Drive for 24 VDC input Instruction pulse mode feed pulse and forward reverse signal PULS PULS SGN SGN V COM V CP2E CPU Uni...

Page 212: ... OMRON Servo Drives OMRON Servo Drive Cable mode Indicates the cable length 1m or 2m G5 Series General purpose Input Type R88D KT R88A CPG S 24VCW PULS ECRST 3 ZGND 24VIN Z RUN ALMCOM BKIRCOM ALM FG X1 XB 24 VDC X1 24 VDC BKIR 24VCCW SIGN PIN 1 4 2 6 25 19 7 29 36 10 37 11 Hood Output terminal block CP2E N S type CPU Unit Sinking outputs Pulse output 0 Pulse output CIO 100 00 Direction output CIO ...

Page 213: ...Red 3 SI7 6 White Black 1 CCW SIGN FB 31 Yellow Black 3 SI8 7 Yellow Red 1 24VIN 32 Gray Black 4 SI9 8 Pink Red 1 SI1 33 Orange Red 4 SI10 9 Pink Black 1 SI2 34 White Red 4 SO2 10 Orange Red 2 SO1 35 White Black 4 SO2 11 Orange Black 2 SO1 36 Yellow Red 4 ALMCOM 12 Yellow Black 1 37 Yellow Black 4 ALM 13 Gray Black 2 SENGND 38 Pink Red 4 SO4 14 White Red 2 REF TREF1 VLIM 39 Pink Black 4 SO4 15 Whi...

Page 214: ...ERRUPT FEEDING Refer to 12 4 Positioning Linear Interpolation Performs 2 axis to 4 axis linear inter polation ITPL LINEAR INTERPOLATION Refer to 12 5 Performing origin searches Actually moves the motor with pulse outputs and defines the machine ori gin based on the Origin Proximity Input and Origin Input signals ORG ORIGIN SEARCH Refer to 12 6 4 Performing origin returns Returns to the origin posi...

Page 215: ...F 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 PV s relative absolute coordinate specifications Absolute coordinates are specified automatically when the origin location has been defined by setting the pulse output PV with the INI instruction or perform ing an origin search with ...

Page 216: ...Control Configuration Target frequency 1 Hz to 100 kHz in increments of 1 Hz Starting frequency 0 Hz to 100 kHz in increments of 1 Hz Acceleration rate Set in increments of 1 Hz from 1 to 65 535 Hz every 4 ms Deceleration rate Set in increments of 1 Hz from 1 to 65 535 Hz every 4 ms Direction specification Set to CW or CCW Specified number of pulses Relative coordinates 0000 0000 to 7FFF FFFF hex ...

Page 217: ...pulse output PV after instruction execution PV Number of movement pulses The following example shows the num ber of pulses setting 100 counterclock wise Pulse output PV range 8000 0000 to 7FFF FFFF hex Number of pulses setting range 0000 0000 to 7FFF FFFF hex Absolute pulse specification The absolute pulse specification cannot be used when the origin location is undefined i e when the system is op...

Page 218: ...ming the origin searches again When the pulse output reset flag is turned ON When the RUN or MONITOR mode is changed to the PROGRAM mode When the start input CIO 0 00 goes ON this example program outputs 600 000 pulses from pulse output 1 to turn the motor PLS2 z PLC Setup There are no settings that need to be made in the PLC Setup 12 2 3 Application Example Specifications and Operation Applicable...

Page 219: ... 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 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 pulses D4 27C0 D5 000...

Page 220: ...ed for low speed jogging Clockwise low speed jogging will be executed from pulse output 1 while CIO 0 00 is ON Counterclockwise low speed jogging will be executed from pulse output 1 while CIO 0 01 is ON 12 3 1 High speed Jogging 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 ...

Page 221: ...PLC Setup z DM Area Settings Settings to Control Speed while Jogging D0 to D1 and D10 to D15 Preparations 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 Not used D13 0064 Target frequency stop 0 Hz D14 0000 D15 0000 CW CCW Pulse freque...

Page 222: ... 0 05 Low speed CW Start Low speed CW Start Pulse Output in Progress Pulse Output in Progress Pulse Output in Progress Pulse Output in Progress Low speed CW output in progress Low speed CCW Start Low speed CCW output in progress High speed CW Start High speed CW Start Low speed CCW Start High speed CW output in progress High speed CCW Start High speed CCW Start High speed CCW output in progress Pu...

Page 223: ... if you want to change set tings during pulse output use the ACC and PLS2 instructions together If the ACC and PLS2 instructions are used delays will occur for the interrupt startup time and possibly for other interrupts The IFEED instruction cannot be executed when the pulse output port specified by the axis specifier of the IFEED instruction is already outputting pulses by the SPED ACC PLS2 ORG ...

Page 224: ...4 Pulse output 0 and interrupt input 6 are used Pulse output 2 and pulse output 3 can be used with N30 40 60 CPU unit 12 4 3 Application Example PLC Setup Pulse Ouptput Interrupt Input Pulse Ouptput 0 IN6 Pulse Ouptput 1 IN7 Pulse Ouptput 2 IN8 Pulse Ouptput 3 IN9 ...

Page 225: ...t Feeding In progress Flag A280 08 A281 08 A56 08 A57 08 Cleared when power is turned ON Cleared when starting stopping operation Cleared after completing interrupt feeding Turned ON when interrupt input is received after starting pulse output with IFEED instruc tion Interrupt Feeding Error Flag A280 09 A281 09 A56 09 A57 09 Cleared when power is turned ON Cleared when operation starts Cleared whe...

Page 226: ...he specified postion Positioning by linear interpolation enables higher speed positioning than single axis positioning Two linear interpolations can be used for an N14 20 CPU Unit and up to four linear interpolations can be used for an N30 40 60 CPU Unit Linear interpolation can be used with absolute coordinates it cannot be used with relative coordi nates Execute the ITPL instruction after the or...

Page 227: ...top In the case of a deceleration stop it stops on a linear interpolation line Please execute the linear interpolation instruction again to restart Precautions for Correct Use Precautions for Correct Use The linear interpolation positioning can not be performed with the origin undefined Please spec ify them when the origin is defined by performing the origin searches If the output speed is less th...

Page 228: ...rates at the target frequency The ITPL instruction uses pulse output 0 and pulse output 1 to perform linear interpolation positioning When W1 00 is turned ON the linear interpolation will decelerate to stop Note The origin must be defined before executing the ITPL instruction 12 5 3 Application Example Target position 0 800 000 Target position 1 70 000 Target frequency 30kHz Startup frequency 1000...

Page 229: ...ion in PLC Setting is Always CCW Limit Input Signal Flag Valid only when Limit Input Signal Operation in PLC Setting is Always Accel Decel Flag ON when the linear interpolation is accelerating or decelerating All the pulse outputs specified by the linear interpolation instruction operate in the same way It still operates when the linear interpolation movement length is 0 Output Completed Flag ON w...

Page 230: ...ors or limit switches 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 p...

Page 231: ...ameters on the Pulse Output 0 to 3 Tab Pages in the PLC Setup 12 6 2 Flow of Operation 1 Set the origin search parameters in the Pulse Output 0 to 3 Tab Pages of the PLC Setup using the CX Programmer 2 Set pulse output 0 to 3 Output the status of the Limit Signal Inputs and Positioning Completed Signal to Auxil iary Area bits Execute ORG Specify an origin search 12 6 3 Settings in PLC Setup PLC Se...

Page 232: ...igin Proximity Input Signal Method 0 The direction is reversed at the Origin Proximity Input Signal The Origin Input Signal is accepted after the Origin Proximity Input Signal turns ON and then OFF Method 1 The direction is not reversed at the Origin Proximity Input Signal The Origin Input Signal is accepted after the Origin Proximity Input Signal turns ON Method 2 The Origin Proximity Input Signa...

Page 233: ...osition motor replacement or other change Setting range 2 147 483 648 to 2 147 483 647 pulses Once the origin has been detected in an origin search the number of pulses specified in the origin compensation is output the present position is reset to 0 and the pulse output s No origin Flag is turned OFF Search Acceleration Ratio Sets the motor s acceleration rate when the origin search is executed S...

Page 234: ...it A540 08 Pulse Output 0 CW Limit Input Signal Signals received from external sen sors connected to normal inputs must be written to the Auxiliary Area bits in the user program 09 Pulse Output 0 CCW Limit Input Signal A541 08 Pulse Output 1 CW Limit Input Signal 09 Pulse Output 1 CCW Limit Input Signal A542 08 Pulse Output 2 CW Limit Input Signal 09 Pulse Output 2 CCW Limit Input Signal A543 08 P...

Page 235: ...gin Input Signal is received during deceleration it is ignored After the motor has reached the origin search proximity speed and the Origin Input Signal is received the motor stops com pleting the origin search process Positioning Completed Signal The Positioning Completed Signal from the driver is not connected The Positioning Com pleted Signal from the driver is not connected Use this mode when ...

Page 236: ... without Positioning Completed Input Connect the phase Z signal from the Servo Drive to the Origin Input Signal When the Origin Input Signal is received the pulse output will be stopped and the Error Counter Reset Signal will be output for about 20 to 30 ms Though the Origin Proximity Input Signal is received the signal will be ignored and the motor will begin decelerating from the origin search h...

Page 237: ...put Signal s dog setting is long enough longer than the deceleration time Origin Input Signal is ignored during deceleration Motor stopped by an Origin Input Signal received after deceleration Starts when ORG is executed Starts when ORG is executed Stop Ideal time for the Origin Proximity Input Signal to go OFF Settings when the deceleration time is short Stop The Origin Input Signal can be detect...

Page 238: ...ied the Positioning Completed Sig nal is checked after the compensation operation is completed z Origin Detection Method 0 Origin Proximity Input Signal Reversal Required Recommended Method Origin Detection Method Setting 1 0 1 0 Pulse output Error Counter Reset Output Positioning Completed Signal Stop Time 1 0 1 0 CCW CW Origin Proximity Input Signal Origin Input Signal Pulse output Deceleration ...

Page 239: ...igin Input Signal Pulse output Deceleration starts when Origin Proximity Input Signal turns ON Initial speed Acceleration High speed for origin search Deceleration Proximity speed for origin search Start when ORG is executed Stop After the Origin Proximity Input Signal turns ON the motor is stopped when the Origin Input Signal turns ON 1 0 Origin Input Signal Pulse output Initial speed Acceleratio...

Page 240: ...not required 2 Origin Proximity Input Signal not used 1 0 1 0 CCW CCW CCW CW CW CW Origin Proximity Input Signal Origin Input Signal Pulse output High speed for origin search Proximity speed for origin search Start Start Start Stop Stop Stop CW Limit Input Signal See note Note When the Limit Input Signal is received the motor stops without deceleration reverses direction and accelerates 1 0 1 0 CC...

Page 241: ... Stop Start Stop Start CW Limit Input Signal See note Limit stop error code 0200 Note When the Limit Input Signal is received the motor stops without deceleration 1 0 1 0 CCW CCW CCW CW CW CW Origin Proximity Input Signal Origin Input Signal Pulse output Start Stop Stop Start Start CW Limit Input Signal See note Limit stop error code 0200 Note When the Limit Input Signal is received the motor stop...

Page 242: ...ings Search Return Initial Speed Sets the motor s starting speed when the origin return is executed Specify the speed in the number of pulses per second pps 0 to 100k pps Origin Return Speed Sets the motor s target speed when the origin return is executed Specify the speed in the number of pulses per second pps 1 to 100k pps Acceleration Ratio Rate Sets the motor s acceleration rate when the origi...

Page 243: ...g the Present Position as the Origin 12 6 7 Changing the Present Value of the Pulse Output Operands Settings C1 Port specifier 0000 Pulse output 0 0001 Pulse output 1 0002 Pulse output 2 0003 Pulse output 3 C2 Control data 0002 Changes PV S First word with new PV Store the new PV in S and S 1 32 bits INI instruction executed Pulse output PV New origin Present origin 0000 0002 D100 D100 D101 INI 15...

Page 244: ...s executed Æ Read PV by executing a PRV instruction Reading the PV Refreshed at the I O Refresh Timing Read PV Auxiliary Area words Pulse output 0 A277 upper digits and A276 lower digits Pulse output 1 A279 upper digits and A278 lower digits Pulse output 2 A53 upper digits and A52 lower digits Pulse output 3 A55 upper digits and A54 lower digits Reading the Value When a Program is Executed 0000 00...

Page 245: ...al input must be written to A540 10 A541 10 A542 10 or A543 10 ON when turned ON from an external input A540 10 A541 10 A542 10 A543 10 Accel Decel Flag ON when pulses are being output accord ing to an ORG ACC PLS2 IFEED or ITPL instruction and the output frequency is being changed in steps accelerating or decelerating 0 Constant speed 1 Accelerating or decelerating A280 00 A281 00 A56 00 A57 00 O...

Page 246: ...tance positioning is repeated 3 The system is returned to the original position 12 9 1 Vertically Conveying PCBs Multiple Progressive Positioning Specifications and Operation From mounter 1 3 2 Stocker conveyance position 3 Return to start CW CCW 1 Origin search CW CCW Origin proximity 10 000 2710 Hex 50 000 Hz C350 Hex CCW limit Origin servo phase Z 2 Fixed distance positioning repeated CW limit ...

Page 247: ...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 Emergency Stop Switch CIO 0 01 PCB Storage Completed CIO 0 03 PCB Storage Enabled CIO 100 03 G5 series Servo Drive R88A CPG S Stocker Moved CIO 100 01 Stocker Movement Completed CIO 0 04 Origin Search Start Switch CIO 0 00 Ins...

Page 248: ...ulse output 0 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 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 C3...

Page 249: ... 100 03 100 03 PCB storage enabled Positioning Lift 10 000 pulses relative at a time Lift positioning completed Lift positioning completed Lift positioning in progress P_First_Cycle First Cycle Flag A280 03 Pulse Output Completed Flag Counter for number of lifts number of PCBs stored Lower positioning completed No origin Flag Lift positioning start Lift positioning start Lift positioning start PCB...

Page 250: ...g output 0 04 Stocker movement completed Positioning Lower to 0 position absolute pulses W0 09 W0 09 W0 07 W0 07 W0 08 W0 08 Lower positioning completed Lower positioning start Lower positioning in progress A280 03 Pulse Output Completed Flag Emergency stop Pulse output stopped Repeat limit input settings Limit inputs are allocated to external sensors using the following programming Emergency stop...

Page 251: ...cuting the IFEED instruction when the Start Switch CIO 0 00 is activated 2 When the Marker Sensor Input CIO 0 06 is received the operation is switched to position con trol 3 The axis is moved the specified travel amount and then stopped 4 An emergency stop is executed to stop pulse output with the Emergency Stop Switch input CIO 0 01 12 9 2 Feeding Wrapping Material Interrupt Feeding Specification...

Page 252: ...ction In this example the MSKS instruction can be omitted because it is rising Preparations Setting Enable using built in input IN6 as an interrupt input Setting Address Data Acceleration rate 500 Hz 4 ms D10 01F4 Deceleration rate 500 Hz 4 ms D11 01F4 Target frequency 10 000 Hz D12 2710 D13 0000 Number of output pulses 5 000 pulses D14 1388 D15 0000 Ladder Program Feeding Material with Speed Cont...

Page 253: ...g Specifications and Operation Y axis Pulse output 1 X axis Pulse output 0 Origin Search Start Switch CIO 0 00 Immediate Stop Switch CIO 0 01 Limit input Pulse output 0 CW CIO 1 00 Pulse output 0 CCW CIO 1 01 Pulse output 1 CW CIO 1 02 Pulse output 1 CCW CIO 1 03 G5 series Servo Drive X axis Y axis Cylinder Workpiece is grasped and moved B C A D X axis CW Pulse output 0 35000 25000 5000 Origin 500...

Page 254: ... operations are performed continuously using lin ear interpolation 0 Move in to A Move to B and return to A Move to C and return to A Move to D and return to A 3 An immediate stop is executed to stop pulse output with the Immediate Stop input CIO 0 01 z PLC Setup Note The setting of the option to use the origin search is read from the PLC Setup when the power supply is turned ON Preparations Setti...

Page 255: ...8 D19 5 000 Setting Address Data Acceleration rate 2 000 pps 4 ms D30 2 000 Deceleration rate 2 000 pps 4 ms D31 2 000 Target frequency 80 000 pps D32 D33 80 000 Starting frequency 0 pps D34 D35 0 Number of output pulses X axis 25 000 pulses D36 D37 25 000 Number of output pulses Y axis 50 000 pulses D38 D39 50 000 Setting Address Data Acceleration rate 2 000 pps 4 ms D50 2 000 Deceleration rate 2...

Page 256: ...ng to C completed Bit address Resetting Positioning to C start Bit address Setting Bit address Resetting Positioning to A start Bit address Setting Bit address Resetting Positioning to B start Bit address Setting Bit address Resetting Positioning to A start Bit address Setting Bit address Resetting Origin search start Bit address Setting 0 00 W0 00 W0 01 W0 02 W0 03 W1 15 W0 00 W1 14 W2 00 W0 01 W...

Page 257: ...ata Origin Search Control data Origin Search Port specifier Pulse output 0 Port specifier Pulse output 1 Port specifier Linear interpolation 0 A280 05 A281 05 W1 14 W1 15 A280 03 A281 03 W1 00 W3 00 W3 01 W3 02 W2 00 W0 04 W0 05 W2 00 W0 05 W3 01 W2 00 W0 07 W3 02 W2 03 W0 06 W0 06 W1 03 W0 05 SET W0 05 RSET W0 06 SET W0 06 RSET W0 07 SET W0 07 RSET ORG 889 0 0 ORG 889 0 1 0030 ITPL 893 0101 D10 O...

Page 258: ...ion for X and Y Axes Positioning to D start Positioning to D completed First word of setting table Control data Linear interpolation Port specifier Linear interpolation 0 First word of setting table Control data Linear interpolation Port specifier Linear interpolation 0 First word of setting table Control data Linear interpolation Port specifier Linear interpolation 0 0 01 A540 08 A540 09 A541 08 ...

Page 259: ...or a pulse output function The CP2E CPU Unit s pulse output frequency is determined by dividing the source clock frequency 15 MHz by an integer ratio Consequently there may be a slight difference between the set frequency and the actual frequency and that difference increases as the frequency increases The actual fre quency can be calculated from the following equations z Pulse Output System z Equ...

Page 260: ...to 100 000 100 000 99 010 to 99 667 99 338 49 917 to 50 083 50 000 49 752 to 49 916 49 834 49 587 to 49 751 49 669 9 997 to 10 003 10 000 9 991 to 9 996 9 993 9 984 to 9 990 9 987 Combinations of Pulse Control Instructions Instruction being executed Instruction being started INI SPED Inde pendent SPED Contin uous ACC Inde pendent ACC Contin uous PLS2 ORG IFEED ITPL SPED Independent Yes Yes 1 No Ye...

Page 261: ...cannot be changed The frequency can be changed The acceleration deceleration rate can be changed The rate can even be changed during acceleration or deceleration 5 SPED Continuous to ACC Continuous or ACC Continuous to ACC Continuous The frequency can be changed The target frequency can even be changed during acceleration or decel eration The acceleration deceleration rate can be changed The rate ...

Page 262: ...dur ing the deceleration started after the Origin Proximity Input Signal was received Take one or both of the following steps so that the Origin Input Signal is received after deceleration is completed Increase the distance between the Origin Proximity Input Signal sensor and Origin Input Signal sensor Decrease the origin search high speed Decelerates to a stop No effect on other port Limit Inputs...

Page 263: ...Origin Input Signal was reversing Check the installation positions of the Origin Proximity Input Signal Origin Input Signal and Limit Input Signal as well as the PLC Setup s I O settings Also check the PLC Setup s Signal Type settings NC or NO for each input signal and then execute the ori gin search again Immediate stop No effect on other port Positioning Timeout Error 0300 The Servo Drive s Posi...

Page 264: ...y at a fixed rate Outputs pulses and changes the frequency at a fixed rate ACC Continuous Port Pulse direction Continuous Acceleration deceleration rate Target frequency Changing Settings Operation Example application Frequency changes Description Procedure Instruction Settings Change speed in one step Changing the speed during operation Changes the frequency higher or lower of the pulse output in...

Page 265: ... pulse output Immediate stop Stops the pulse output immediately SPED or ACC Continuous INI Port Stop pulse output Stop pulse output Immediate stop Stops the pulse output immediately SPED Continuous SPED Continuous Port Continuous Target frequency 0 Stop pulse output smoothly Decelerate to a stop Decelerates the pulse out put to a stop SPED or ACC Continuous ACC Continuous Port Continuous Target fr...

Page 266: ...pen dent Number of pulses Relative or absolute pulse speci fication Port Pulse Direction Independent Accelera tion and decelera tion rate Target fre quency Complex trapezoidal control Positioning with trapezoi dal accelera tion and deceleration Separate rates used for acceleration and decelera tion starting speed The number of pulses can be changed dur ing position ing Accelerates and decelerates ...

Page 267: ... tion rate decelera tion rate ACC can be exe cuted during posi tioning to change the acceleration deceleration rate and target fre quency The target position specified number of pulses is not changed PULS ACC Independent ACC Independent Number of pulses Relative or absolute pulse speci fication Port Pulse Direction Indepen dent Accelera tion decel eration rate Target fre quency PLS2 ACC Independen...

Page 268: ...ulses When the target position cannot be changed without maintaining the same speed range an error will occur and the original operation will con tinue to the original target position PULS ACC Independent PLS2 Number of pulses Relative or absolute pulse speci fication Port Pulse Direction Accelera tion rate Decelera tion rate Target fre quency Starting fre quency PLS2 PLS2 Operation Example applic...

Page 269: ...he acceleration rate or deceleration rate PLS2 PLS2 Number of pulses Accelera tion rate Decelera tion rate Change direction Change the direc tion during positioning PLS2 can be executed during positioning with absolute pulse specifica tion to change to absolute pulses and reverse direc tion PULS ACC Indepen dent PLS2 Number of pulses Absolute pulse spec ification Port Pulse Direction Accelera tion...

Page 270: ...SPED Independent Port Indepen dent Target fre quency 0 Stop sloped pulse out put smoothly Number of pulses set ting is not preserved Decelerate to a stop Decelerates the pulse output to a stop If ACC started the operation the original acceleration decel eration rate will remain in effect If SPED started the operation the acceleration deceleration rate will be invalid and the pulse output will stop...

Page 271: ...eed interrupt High speed interrupt feeding When an interrupt input occurs during speed con trol for the IFEED instruc tion operation changes to positioning An interrupt task is not used There is no delay for the starting time of the inter rupt task improving the feeding accuracy IFEED Port Acceleration rate Target fre quency Pulse output set value Deceleration rate Time Target frequency Execution ...

Page 272: ...12 Pulse Outputs 12 72 CP2E CPU Unit Software User s Manual W614 ...

Page 273: ...User s Manual W614 13 This section describes the PWM Outputs variable duty factor pulse outputs 13 1 PWM Outputs Variable duty factor Pulse Outputs 13 2 13 1 1 Flow of Operation 13 4 13 1 2 Ladder Program Example 13 4 PWM Outputs ...

Page 274: ...portional basis using the PWM output Controlling the brightness of lighting 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 CPU Units the output indicator of terminal 01 on terminal block CIO100 is always lit during PWM output Specifications Item Specification Duty factor 0 0 t...

Page 275: ...ovide a DC24V external power supply to V and V terminals as follows z Wiring Example Sinking outputs Although V and COM V are connected internally also wire them externally Sourcing outputs Although V and COM V are connected internally also wire them externally Do not connect an external power supply to N type CPU Units Wiring for S type CPU Unit V 00 V COM V COM 03 02 01 L V 00 V COM V COM 03 02 ...

Page 276: ...ck Specifications made with PWM instruction Other functions that cannot be used at the same time Terminal block label Terminal number Pulse output method Normal output Pulse direction CIO 100 00 Pulse output 0 pulse Normal output 0 01 PWM output 0 Pulse output 1 pulse Normal output 1 02 Pulse output 0 direction Normal output 2 03 Pulse output 1 direction Normal output 3 CIO 101 00 Pulse output 2 p...

Page 277: ...he PLC Setup z DM Area Settings PWM Operand Settings D0 and D1 z Ladder Diagram Applicable Instructions Preparations Setting Operand Data Frequency 2 000 0 Hz D0 4E20 Duty factor 40 0 D1 0190 PWM 1000 D0 D1 1000 0003 D10 0 00 0 01 Start input Stop input PWM output 0 Duty factor in increments of 0 1 Frequency in increments of 0 1 Hz Frequency setting Duty factor setting PWM output 0 Stops pulse out...

Page 278: ...13 PWM Outputs 13 6 CP2E CPU Unit Software User s Manual W614 ...

Page 279: ...em Settings 14 8 14 3 No protocol Communications with General Components 14 10 14 3 1 Overview 14 10 14 3 2 Flow of Operation 14 11 14 3 3 PLC Setup 14 11 14 3 4 Related Auxiliary Area Bits and Words 14 12 14 4 Modbus RTU Easy Master Function 14 14 14 4 1 Overview 14 14 14 4 2 Flow of Operation 14 14 14 4 3 Setting and Word Allocation 14 15 14 4 4 Programming Examples 14 18 14 5 Serial PLC Links 1...

Page 280: ...tware User s Manual W614 14 7 2 Flow of Operation 14 43 14 7 3 PLC Setup 14 43 14 7 4 Operation Specifications 14 44 14 7 5 Command and Response Details 14 45 14 7 6 Related special auxiliary relay 14 51 14 8 Precautions on the usage of RS 485 14 52 ...

Page 281: ...2C Port E14 20 CPU Unit Built in RS 485 Port S30 40 60 CPU Unit only Built in RS 232C Port E30 40 60 S30 40 60 CPU Unit Serial Port 1 When CP1W CIF01 CIF11 CIF12 V1 CP2W CIFD Option Board is mounted Serial Port 1 EX Only when CP2W CIFD Option Board with 2 ports is mounted N14 20 CPU Unit Serial Port 2 When CP1W CIF01 CIF11 CIF12 V1 Option Board is mounted Option Board with 2 ports cannot be used N...

Page 282: ... company s PLC Modbus RTU Slave 2 General component No protocol communications Modbus RTU Easy Master communications Inverter Host computer A Programming Device cannot be connected Host Link Connected devices Connected devices NB series PT NS series PT or NV series PT 1 N NT Link Host Link General component Inverter No protocol communications Modbus RTU Easy Master communications Host computer A P...

Page 283: ...t without a command response for mat The TXD and RXD instructions are executed in the ladder program in the CPU Unit to transmit data from the transmis sion port or read data in the reception port No protocol communications OK OK OK Modbus RTU slave devices such as inverters Data can be easily exchanged with general devices that support Mod bus RTU slave functional ity such as inverters and are eq...

Page 284: ...nication wiring Connected devices Description Communications protocol Built in RS 232C Serial Port 1 Built in RS 485 Serial Port 2 Serial Port 1 EX Host computers PLC data can be read by the host computer or writ ten to the PLC from the computer The host com puter sends a Host Link command C Mode or a FINS command to the CPU Unit to read write I O memory change the operating mode or to force set r...

Page 285: ...nit and PT with Host Link or NT Link 1 N communication mode and connect the CP2E CPU Unit and PT 1 1 as shown below z Connectable Programmable Terminals PTs High speed Links 115 200 bps can be used with NB series NS series or NV series PTs Precautions for Correct Use Precautions for Correct Use Communications are not possible for CP2E CPU Units using the 1 1 NT Link protocol Do not connect more th...

Page 286: ...ner Transfer the PLC Setup NB series PT System Menu Set the same communications settings in the CP2E CPU Unit s PLC Setup and in the NB series PT PLC Setup Select Built in RS 232C Built in RS 485 or Serial Port in the PLC Setup of the CP2E CPU Unit using the CX Programmer Set the serial communication mode to Host Link and set the baud rate Create a project using the NB Designer and select COM1 or ...

Page 287: ...etup is the same as setting high speed for the PT Select Host Link in the serial communications mode settings of the CP2E CPU Unit and set all other communications parameters to the same values as the other company s display device Parameter Setting Communications Settings Select the Custom Option and set the baud rate to 115 200 and the format to 7 2 E It is not necessary to change the format set...

Page 288: ...owing table lists the no protocol communication functions supported by CP2E PLCs Note 1 Because the built in RS 485 port of the S type CPU Unit and the RS 485 port of CP2W CIFD2 CIFD3 use 2 wire connections so they can only communicate in half duplex Communications are not possible in full duplex 14 3 1 Overview Communica tions Transfer direction Method Max amountof data Frame format Other functio...

Page 289: ...ted by the RS 232C and RS 485 port of CP2W CIFD1 CIFD2 CIFD3 Option Board with two ports Click the Built in RS 232C Built in RS 485 or Serial Port Tab in the PLC Settings Dialog Box 14 3 2 Flow of Operation 1 Connect the CP2E CPU Unit and external device using RS 232C or RS 422A 485 ports 2 Select Built in RS 232C Built in RS 485 or Serial Port in the PLC Setup and transfer the PLC Setup from the ...

Page 290: ... of bytes was specified ON when the specified number of bytes is received When the end code was specified ON when the end code is received or 256 bytes are received A392 07 Serial Port 1 Built in RS 232C Port Reception Overflow Flag No protocol mode ON when a data overflow occurred during reception through the serial port 1 or built in RS 232C port in no protocol mode When the number of bytes was ...

Page 291: ...ception in no proto col mode When the number of bytes was specified ON when the specified number of bytes is received When the end code was specified ON when the end code is received or 256 bytes are received A50 07 Serial Port 1 EX Reception Overflow Flag No protocol mode ON when a data overflow occurred during reception through the serial port 1 EX in no protocol mode When the number of bytes wa...

Page 292: ... ports 2 Select Built in RS 232C Built in RS 485 or Serial Port in the PLC Setup and transfer the PLC Setup from the CX Programmer to the CP2E CPU Unit Set the serial com munications mode to Modbus Easy Master and set the communications conditions 3 Set the Modbus RTU frame in the DM Fixed Allocation Words Turn ON the Modbus RTU Master Execution Bit A640 00 A641 00 or A638 00 Modbus RTU 15 08 07 0...

Page 293: ... D1399 A641 00 to A641 02 Serial Port 1 EX D1400 to D1499 A638 00 to A638 02 Word Bits Contents Built in RS232C port of CP2E E S type CPU Unit or Serial Port 1 of CP2E N type CPU Unit Built in RS 485 port of CP2E S type CPU Unit or Serial Port 2 of CP2E N30 40 60 CPU Unit Serial Port 1 EX of CP2E N type CPU Unit D1200 D1300 D1400 00 to 07 Command Slave address 00 to F7 hex 08 to 15 Reserved Always...

Page 294: ...n the request 86 hex Incorrect confirmation function code The function code in the response is different from the one in the request 87 hex Response size overflow The response frame is larger than the storage area 92 bytes 88 hex Exception response An exception response was received from the slave 89 hex Service being executed A service is already being executed reception traffic congestion 8A hex...

Page 295: ...ed ON Execution in progress OFF Not executed or execution completed Address Name Contents A392 04 Serial Port 1 Built in RS 232C Port Communication Error Flag Turns ON when a timeout error an overrun error a framing error or a parity error occurs on Modbus RTU Easy Master with serial port 1 or built in RS 232C port A392 12 Serial Port 2 Built in RS 485 Port Com munication Error Flag Turns ON when ...

Page 296: ...of the thread is constant The start stop and target speed is changed according to inputs from multiple contacts Acceleration and deceleration are controlled using the acceleration and deceleration of an inverter 14 4 4 Programming Examples Initial frequency setting W0 00 ON RUN Command W1 00 Frequency setting 60 00Hz 55 00Hz 50 00Hz Constant thread speed Fast rotation Slow rotation Frequency setti...

Page 297: ...IP switch as shown in the following table Wiring Examples No Setting ON OFF Description 1 Terminating resistance selection ON Connects terminating resistance 2 2 4 wire selection ON 2 wire connections 3 2 4 wire selection ON 2 wire connections 4 OFF Always OFF 5 RS control for RD ON Enabled 6 RS control for SD ON Enabled CP1W CIF11 CIF12 V1 RS 422A 485 Option Board CP1W CIF11 CIF12 V1 RS 422A 485 ...

Page 298: ... 03 A002 RUN Command Selection 1 03 Modbus communication Modbus RTU 02 03 C071 Communication Speed Selection 03 2 400 bps 05 05 9600bps 04 4 800 bps 05 9 600 bps 06 19 2 kbps 07 38 4 kbps 08 57 6 kbps 09 76 8 kbps 10 115 2 kbps C072 Communication Station No Selection 1 to 247 1 1 1 C074 Communication Parity Selection 00 No parity 00 01 Even 01 Even 02 Odd C075 Communication Stop Bit Selection 1 1 ...

Page 299: ...PLC Settings Dialog Box Built in RS 232C Built in RS 485 or Serial Port Tab Page Parameter Settings Communications Settings Set the Modbus communications settings to match those of the Inverter If the Inverter is set to 9 600 bps one stop bit and even parity select the Custom Option and set the baud rate to 9 600 Set the format to 8 1 E Mode Select Modbus RTU Easy Master Response Timeout Set the d...

Page 300: ...ation data 4 bytes Hex Frequency setting 60 00 Hz 1770 Hex Slave address 01 Hex FUNCTION code 05 Hex Communication data 4 bytes Hex ON FF00 Hex Register number 0001 Hex Register number 1 0001 Hex Register number 0002 Hex Register number 1 0001 Hex D1301 MOV 021 6 D1302 MOV 021 4 D1303 MOV 021 1 D1304 MOV 021 1770 RUN Command Start operation Write ON FF00 Hex to coil number 0001 Hex D1300 MOV 021 1...

Page 301: ...ress 01 Hex FUNCTION code 06 Hex Communication data 4 bytes Hex Frequency setting 55 00 Hz 1388 Hex Register number 0002 Hex Register number 1 0001 Hex Frequency setting A Write 55 00 Hz 157C Hex to register number 0002 Hex Frequency setting B Write 50 00 Hz 1388 Hex to register number 0002 Hex Frequency Setting A D1300 MOV 021 1 D1301 MOV 021 6 D1302 MOV 021 4 D1303 MOV 021 1 D1304 MOV 021 157C W...

Page 302: ...0001 Hex Register number 1 0001 Hex Stop operation Write OFF 0000 Hex to coil number 0001 Hex Start and continue Modbus communications from 1 second after turning ON the power supply Modbus RTU Master Execution Bit RUN Command D1300 MOV 021 1 D1301 MOV 021 5 D1302 MOV 021 4 D1303 MOV 021 0 D1304 MOV 021 0000 W1 00 Always ON flag A641 01 10 TIMX 550 000 P On SET A641 00 T000 ...

Page 303: ...0 3 If a communications error occurs A641 02 Execution Error Flag will turn ON and the error code will be stored in D1352 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 Commu...

Page 304: ...e address FUNCTION code Communication data bytes Communication data D1303 to D1349 maximum 94 bytes 47 words max Address D1300 D1301 D1302 D1303 D1304 Value 00 01 00 05 00 04 00 00 Description 3G3MX2 V1 Slave address 01 Hex Coil writing command 05 Hex Communication data 4 bytes Hex Coil number for RUN command 0001 Hex Coil number 1 Start FF00 Hex Stop 0000 Hex Setting Slave address FUNCTION code C...

Page 305: ...P2E CP1H CP1L CP1E or CJ2M CPU Units 1 N 8 Nodes Maximum z Connecting CP2E CP1H CP1L CP1E or CJ2M CPU Units 1 1 Precautions for Correct Use Precautions for Correct Use With the CP2E CPU Units a Programmable Terminal PT cannot be included in a Serial PLC Link 14 5 1 Overview Configuration RS 422A 485 CP2E CPU Unit Polling Unit RS 422A 485 Option Board or Built in RS 485 Port Shared data CP2E CPU Un...

Page 306: ...C Setup Setting Error Flag A402 10 will turn ON 14 5 2 Flow of Operation 1 Connect the CP2E CPU Unit and other CPU Units using RS 232C or RS 422A 485 ports 2 Set Built in RS 232C Built in RS 485 or Serial Port in the PLC Setup and transfer the PLC Setup from the CX Programmer to the CP2E CPU Unit Set the serial com munications mode to Serial PC Link Master or Serial PC Link Slave and set the commu...

Page 307: ...Option set the baud rate to 115200 The format can be set to any value Mode Select PC Link Master Link Words Set to 10 default for the Master only 10 words default PC Link Mode Select All or Master NT PC Link Max Set the highest unit number of the connected slaves Settings at the Polled Unit Parameter Setting Communications Settings Set the communications settings to the same values as the connecte...

Page 308: ...Built in RS 232C ports built in RS 485 ports or serial option ports If more than two ports are set for Serial PLC Links either as polling node or polled node a PLC Setup setting error nonfatal error will occur and the PLC Setup Setting Error Flag A402 10 will turn ON Connection method RS 422A 485 or RS 232C connection via RS 422A 485 Option Board built in RS 485 port or RS 232C port Words allocate...

Page 309: ...nit No 1 Polled Unit No 3 Undefined Not used Not used Not used Not used Polling Unit Local area Polled Unit No 0 Polled Unit No 1 Polled Unit No 3 Undefined Not used Not used Not used Not used Polling Unit Local area Polled Unit No 0 Polled Unit No 1 Polled Unit No 3 Undefined Not used Not used Not used Not used CP2E CPU Unit Polling Unit CP2E CPU Unit Polled Unit No 0 Serial PLC Link Words Serial...

Page 310: ... same words CIO 200 to CIO 209 in all other CPU Units The Polled Units either CP2E CP1E CP1H CP1L or CJ2M send their data CIO 210 to CIO 219 to consecutive sets of 10 words CIO 210 to CIO 289 in the Polling Unit Polling Unit Local area Polled Unit No 0 Not used Not used Not used Not used Not used Not used Not used Polling Unit Local area Polled Unit No 0 Polled Unit No 1 Polled Unit No 3 Undefined...

Page 311: ...ed Unit No 6 CIO 207 CIO 214 to 215 CIO 221 to 223 CIO 270 to 279 Polled Unit No 7 CIO 208 CIO 216 to 217 CIO 224 to 226 CIO 280 to 289 CIO 289 Not used CIO 209 to 289 CIO 218 to 289 CIO 227 to 289 Address Link words 1 word 2 words 3 words to 10 words CIO 200 Serial PLC Link Words Polling Unit CIO 200 CIO 200 to 201 CIO 200 to 202 CIO 200 to 209 Polled Unit No 0 CIO 201 CIO 202 to 203 CIO 203 to 2...

Page 312: ...tically turned OFF by the system when restart processing has been completed Serial Port 1 Built in RS 232C Port Error Flags A528 00 to A528 07 When an error occurs at the serial port 1 or built in RS 232C port the corresponding error bit is turned ON Bit 0 Not used Bit 1 Not used Bit 2 Parity error Bit 3 Framing error Bit 4 Overrun error Bit 5 Timeout error Bit 6 Not used Bit 7 Not used Read write...

Page 313: ...utomatically turned OFF by the system when restart processing has been completed Serial Port 2 Built in RS 485 Port Error Flags A528 08 to A528 15 When an error occurs at the serial port 2 or built in RS 485 port the corresponding error bit is turned ON Bit 8 Not used Bit 9 Not used Bit 10 Parity error Bit 11 Framing error Bit 12 Overrun error Bit 13 Timeout error Bit 14 Not used Bit 15 Not used R...

Page 314: ...eared when power is turned ON Turns ON the bit corresponding to the unit number of the Polled Unit that is communicating via the serial port 1 EX in Serial PLC Link mode Bits 00 to 07 correspond to unit numbers 0 to 7 respectively Serial Port 1 EX Restart Bit A526 02 Turn ON this bit to restart the serial port 1 EX Read write Cleared when power is turned ON Turn ON to restart the serial port 1 EX ...

Page 315: ...bled 6 RS control selection for SD ON ON ON Control enabled Boiler A Boiler B Boiler C Boiler A CP2E Polling Unit CP2E CPU Unit CP2E CPU Unit CP2E CPU Unit CP1W CIF11 RS 422A 485 Option Board CP1W CIF11 RS 422A 485 Option Board CP1W CIF11 RS 422A 485 Option Board CP1W TS101 Temperature Sensor Unit CP1W TS101 Temperature Sensor Unit CP1W TS101 Temperature Sensor Unit Two Pt100 Sensor Inputs Two Pt1...

Page 316: ... A_Temperature data 1 B_Temperature data 0 B_Temperature data 1 C_Temperature data 0 C_Temperature data 1 A_Temperature data 0 A_Temperature data 1 B_Temperature data 0 B_Temperature data 1 C_Temperature data 0 C_Temperature data 1 A_Temperature data 0 A_Temperature data 1 B_Temperature data 0 B_Temperature data 1 C_Temperature data 0 C_Temperature data 1 B_Temperature data 0 B_Temperature data 1 ...

Page 317: ...nect the host com puter in a 1 1 or 1 N system Use this method when communicating primarily from the host com puter to the PLC FINS command with Host Link header and terminator sent Directly connect the host com puter in a 1 1 system or 1 N system Use these methods when communicating primarily from the host com puter to PLCs in the network The FINS com mand must be placed between a Host Link heade...

Page 318: ...ds of Holding area H in the unit of word I O memory write WC Timer and Counter PV area write Write the specified source words from the specified words of Timer and Counter present value area in the unit of word WD DM area write Write the specified source words from the specified words of DM area D in the unit of word WJ Auxiliary area write Write the specified source words from the specified words...

Page 319: ...unable to execute in MONITOR or RUN mode 02 03 Parameter area write clear all at once Replenish the specified ranges of parameter area with the same data Operating mode change 04 01 Operating mode change Operation start Change the operating mode of CPU Unit to RUN or MONITOR mode 04 02 Operating mode change Operation stop Change the operating mode of CPU Unit to PRO GRAM mode System con figuration...

Page 320: ...stop bits is determined by the parity setting When setting with parity even odd 1 bit When setting without parity 2 bits 3 The address cannot be set to 0 In commands 0 is used to indicate broadcast commands 14 7 1 Overview Specifications Item Contents Mode Modbus RTU Slave Baud rate 1200 2400 4800 9600 19200 38400 57600 115200 bps Data length 8 bits 1 Parity Odd Even None Stop bits 1 bit 2 bits on...

Page 321: ...cation mode to Modbus RTU Slave Set the baud rate and format Set Modbus Slave address 2 When receiving a Modbus RTU command from a Modbus RTU Master it automatically responds without a ladder program 3 14 7 3 PLC Setup Parameter Settings Communications Settings Set the communications settings to the same values as the connected Mod bus RTU master device If the connected device is set to 19 200 bps...

Page 322: ... CPU unit I O Memory allcation Discrete Inputs Bit read None Coils Bit read Auxiliary Area W Input Registers Word 16 bit read write None Holding Registers Word 16 bit read write Data Memory D Modbus data model Modbus address Address specified in Modbus RTU commands Corresponding CP2E I O Memory address Discrete Inputs Coils 1 to 2048 0 to 2047 W0 00 to W127 15 Input Registers Holding Registers 1 t...

Page 323: ...Modbus RTU Master Note The maximum number of coils depends on the assigned starting address Response CP2E 14 7 5 Command and Response Details Supported Command List Function Code Modbus Name Function 01 Hex Read Coils Reads multiple bits from the Auxiliary Area W of I O Memory 03 Hex Read Holding Registers Reads multiple words from the Data Memory D 06 Hex Write Single Register Write a channel to ...

Page 324: ...bits W1 04 Coil status 27 to 20 CD Hex W1 11 to W1 04 Quantity of coils H 00 Hex Coil status 35 to 28 B6 Hex W2 03 to W1 12 Quantity of coils L 13 Hex 19 bits W1 04 to W2 06 Coil status 38 to 36 05 Hex W3 06 to W3 04 Field name Data length Data Function code 1 byte 03 Hex Register starting address 2 bytes E type 0 to 0FFF Hex D0 to D4095 S type 0 to 1FFF Hex D0 to D8191 N type 0 to 3FFF Hex D0 to ...

Page 325: ...ters H 00 Hex Register value L 12 Hex D1000 L Quantity of Registers L 03Hex 3CH D1000 to D1002 Register value H 56 Hex D1001 H Register value L 78 Hex D1001 L Register value H 97 Hex D1002 H Register value L 13 Hex D1002 L Field name Data length Data Function code 1 byte 06 Hex Register address 2 bytes E type 0 to 0FFF Hex D0 to D4095 S type 0 to 1FFF Hex D0 to D8191 N type 0 to 3FFF Hex D0 to D16...

Page 326: ... L D0 Hex Register value H 3A Hex Register value H 3A Hex D1000 H Register value L C5 Hex Register value L C5 Hex D1000 L Field name Data length Data Function code 1 byte 0F Hex Starting address 2 bytes 0 to 07FF Hex 0 to 2047 W0 00 to W127 15 Quantity of output 2 bytes 0001 to 07B0 Hex 1 to 1968 Byte count 1 byte N Quantity of output 8 if the remainder is not 0 N 1 Output value N bytes Field name...

Page 327: ...x W1 04 Starting address L 14 Hex Quantity of output H 00 Hex Quantity of output H 00 Hex Quantity of output L 0A Hex 10 bits Quantity of output L 0A Hex Byte count 02 Hex Output value H 3A Hex Output value L 01 Hex Field name Data length Data Function code 1 byte 10 Hex Starting address 2 bytes E type 0 to 0FFF Hex D0 to D4095 S type 0 to 1FFF Hex D0 to D8191 N type 0 to 3FFF Hex D0 to D16383 Qua...

Page 328: ...of registers L 02 Hex Byte count 04 Hex Registers value H 3A Hex Registers value L C5 Hex Registers value H 97 Hex Registers value L 13 Hex Field name Data length Data Function code 1 byte Function code 80 Hex For example 86 Hex for Write Single Register 06Hex Exception code 1 byte Reference below Error code Field name Description 01 Hex Illegal function code An unsupported function code is specif...

Page 329: ... error CRC error occurs in the built in RS 485 port or serial port 2 If this flag occurs it is necessary to restart the port How ever in the case of a CRC error port restart is not neces sary because it turns off automatically when the next normal Modbus RTU command is received A526 01 Built in RS 485 Port Serial Port 2 Restart Flag To restart the port for built in RS 485 port or serial port 2 per...

Page 330: ...sing the RS 485 2 wire it can only communicate in half duplex Please secure the waiting time shown below till the next data transmission after the remote device receives data from CP2E If the receive data are transmitted from the remote device within the waiting time shown below after CP2E data transmission the data may not be received by CP2E Remote device CP2E Send data Send data Send data Secur...

Page 331: ...Models Ethernet Related 15 8 15 3 Basic Setting for Ethernet 15 10 15 3 1 Overview of Startup Procedure 15 10 15 3 2 PLC Setup Procedure 15 11 15 3 3 Basic Settings 15 13 15 3 4 Communications Test 15 15 15 4 FINS Communications 15 16 15 4 1 FINS Communications Service Specifications 15 16 15 4 2 FINS Communications Service 15 17 15 4 3 Procedure for Using FINS UDP FINS TCP 15 17 15 4 4 PLC Setup ...

Page 332: ...fying Servers by Host Name 15 54 15 6 1 Automatic Clock Adjustment Function 15 54 15 6 2 Specifying Servers by Host Name 15 54 15 6 3 Procedure for Using the Automatic Clock Adjustment Function 15 55 15 6 4 PLC Setup for DNS and Automatic clock Adjustment 15 55 15 6 5 Auxiliary Area Allocations 15 58 ...

Page 333: ... following diagram shows an example of an overall system configuration using CP2E N type CPU Units 1 Connecting the CX Programmer to the PLCs online via Ethernet CX Programmer FINS IP router Internet Intranet 3 Configuring an independent communications protocol for the host application using TCP IP UDP IP Firewall Server Room DNS server SNTP server Router Ethernet Office Floor CX Programmer Ethern...

Page 334: ...n of the FINS communications service i e FINS TCP It provides automatic recovery at the TCP IP layer from communications errors such as packet loss that occur during multi level routing For CX Programmer FINS TCP can be used to directly connect to the PLC online Depending on whether or not the connection will be within the same segment either use an IP address conversion method for dynamic IP addr...

Page 335: ...dling communications errors Use the FINS TCP and construct applications using the SEND 090 RECV 098 and CMND 490 instructions in the ladder program FINS TCP is supported by many OMRON products and is compati ble with earlier OMRON Ethernet Units It provides automatic recovery at the TCP IP layer from com munications errors such as packet loss that occur during multilevel routing 15 1 2 Exchanging ...

Page 336: ...matically adjusting the built in clock of the PLC The adjustment can be regularly executed at a speci fied time once a day and it can be executed each time by the ladder program To use the automatic clock adjustment function there must be a separate SNTP server on the network Aside from the IP address the host name used for DNS service can be specified for the SNTP server In addition to directly s...

Page 337: ...X 10 Mbit s 10Base T Half full auto negotiation for each port Link speed auto sensing for each port Transmission media Unshielded twisted pair UDP cable Categories 5 5e Shielded twisted pair STP cable Categories 100Ω at 5 5e Unshielded twisted pair UDP cable Categories 3 4 5 5e Shielded twisted pair STP cable Categories 100Ω at 3 4 5 5e Transmission distance 100 m distance between hub and node Cas...

Page 338: ... PLC and receive responses A computer automatically acquiring IP addresses can send commands to the PLC and receive responses FINS communication with computer without fixed node address Possible with automatic allocation Client FINS automatic node address allocation function TCP IP only Possible with automatic allocation Client FINS automatic node address allocation function TCP IP only Possible w...

Page 339: ...ent FINS node address allocation function makes it possible to connect online to the PLC even if no FINS node address has been set for the host computer FINS message communications are enabled in both UDP IP and TCP IP and it is enabled in TCP IP with up to 3 simultaneous connections Previously CP1W CIF41 is enabled in TCP IP with up to 2 simultaneous connections and all can only be set to server ...

Page 340: ...e same network 15 3 1 Overview of Startup Procedure Determine the local IP address and address conversion method Refer to Ethernet Units Construction of Networks Operation Manual for CS CJ Series Cat No W420 SECTION 5 Determining IP Addresses Refer to CP2E CPU Unit Hardware User s Manual Cat No W613 A 4 Network Installation Connect to the network using twisted pair cable Create the routing tables ...

Page 341: ...o IP function CX Programmer s online connection command can be executed without any IP setting in computer side when the PLC is physically connected with the computer directly For details on connecting the CX Programmer to the PLC refer to 4 3 Connection Method with an Ethernet Port in the CP2E CPU Unit Hardware User s Manual Cat No W613 2 Move the cursor to the Settings and double click Select th...

Page 342: ...following dialog box 5 In order for the Ethernet Setup to go into effect the Ethernet Port must be restarted Please use the following way to reset the Ethernet Port After the LNK ACT indicator has turned OFF and then turned ON again Ethernet cable should be connected the Ethernet port will recognize the new settings ...

Page 343: ... mask can be set between 192 0 0 0 and 255 255 255 252 0 0 0 0 default net mask for IP address setting Broadcast Set the method for specifying IP addresses for broadcasting in FINS UDP All 1 4 3BSD Broadcast with host number set to all ones All 0 4 2BSD Broadcast with host number set to all zeros Normally the default setting should be used All 1 4 3BSD TCP IP keep alive Set the liveness checking i...

Page 344: ... 36 253 Set the IP Address to the network number i e the net ID of the other IP network segment with which communications are to be executed The length of the network number i e the number of bytes will vary depending on the IP address class Four bytes are reserved for setting the IP Address so set the network number from the beginning and then set 00 in the remaining space A maximum of eight sett...

Page 345: ... remote node is communicating correctly The PING command uses the ICMP echo request and responses The echo response packet is automatically returned by the ICMP The PING command is normally used to check the connections of remote nodes when configuring a network The PLC supports the ICMP echo reply functions If the PLC returns a normal response to the PING command then the remote nodes are physica...

Page 346: ... for each UDP port Broadcast Address conversion method Items set for each connection Server client specification Remote IP address specification Server Specify IP addresses of clients permitted to connect Client Specify remote Ethernet Unit server IP address Automatic FINS node address allocation Specify automatic allocation of client FINS node addresses Keep alive Specify whether remote node keep...

Page 347: ...with a PLC or computer on another network e g remote programming or monitor ing using FINS messages or a CX Programmer When routing tables are used for one or more other nodes on the same network It is not necessary to set routing tables if the nodes are connected as one network Routing table can be set by CX Integrator version 2 67 or higher CX One version 4 51 or higher For the details of the ro...

Page 348: ...ary depending on the particular communications applications that are used All these settings are in the Built in Ethernet Tab Click on the relative button can open the setup dialog z FINS UDP z FINS TCP Procedure for Using FINS TCP 15 4 4 PLC Setup for FINS UDP and FINS TCP Applications FINS UDP and FINS TCP Setting Button name Settings FINS UDP Setting Conversion FINS UDP Port IP Address Table De...

Page 349: ...tton to display the FINS UDP setup dialog Built in Ethernet Tab FINS UDP CX Programmer Setup Item Contents Default Fins Node No Set the node address of the CP2E N type CPU Unit When conversion method is set to Auto Dynamic Static Fins Node Address Host ID of IP Address IP Address xx xx xx FINS Node Address When conversion method is set to IP address table or Combined the node address can be set re...

Page 350: ...yer i e the FINS communications service in this case Default 9 600 User defined Setting range 1 to 65 535 Note Make the settings so that UDP port number does not overlap with port number 123 for SNTP and port number 53 for DNS 0 9 600 Conversion Select any of the following as the method for finding and converting IP addresses from FINS node addresses Enabled for FINS UDP only Automatic generation ...

Page 351: ... client When the PLC is used as a server The PLC opens a connection with that connection number and waits for service requests from clients Connection numbers are used in ascending order and allocated to clients in the order connections are made When the PLC is used as a client The PLC establishes a connection with the server set as the destination IP address Once the connection has been establish...

Page 352: ...TCP Connection Flag 1 ON Turned ON by the Unit when a connection is estab lished Read only OFF Turned OFF by the Unit when the connection is ter minated 1 FINS TCP Connection Flag 2 ON Turned ON by the Unit when a connection is estab lished OFF Turned OFF by the Unit when the connection is ter minated 2 FINS TCP Connection Flag 3 ON Turned ON by the Unit when a connection is estab lished OFF Turne...

Page 353: ...the network relay The following diagram describes what is a response code The MRES codes are shown in the following table along with the results they indicate Refer to the SYSMAC CS CJ CP NSJ series Communications Commands Reference Manual Cat No W342 or the operation manuals for the relevant unit for further information on response codes Response Code List MRES Execution results 00 Normal complet...

Page 354: ...e codes applicable to the command are described at the end of the command description If any UNIX error codes are generated these are also described Refer to your UNIX error symbol defini tion file usr include sys errno h for details UNIX errors are returned in the results storage area Note Except for special cases all send receive data is in hexadecimal format z Command Code List The command code...

Page 355: ...ersion IP address subnet mask FINS UDP port number mode settings Ethernet address Command Block Response Block Parameters Model Version Response The PLC model and version are returned as ASCII characters occupying 20 bytes each i e 20 characters each If all bytes are not used the remaining bytes will be all spaces ASCII 20 Hex Example Model CP2E ETN21 Version V1 00 IP Address Subnet Mask Response ...

Page 356: ...p value FFINS TCP Port Number Setting 0 Default 9600 1 Unit Setup value FINS UDP Destination IP Mode 0 Dynamical mode 1 Static mode SNTP Server Specification Method 0 IP address 1 Host name Ethernet Address Response The Ethernet address of the Ethernet port is returned The Ethernet address is the address marked on the label on the top of the PLC Response Codes Response code Description 0000 Normal...

Page 357: ...sponse Block Parameters FINS TCP Connection No Command Specifies in two bytes the FINS TCP connection number 1 to 3 for which the change is to be made Remote IP Address Command Specifies the remote node s IP address must be non zero in hexadecimal Remote Port Number Command Specifies the remote TCP port number must be non zero with this command New FINS Commands Addressed to CPU Port 0x00 Command ...

Page 358: ...l TCP Port Number Response Specifies the TCP port number for the local node Remote IP Address Response Specifies the IP address for the remote node in hexadecimal Response code Description 0000 Normal 0105 Node address setting error Local IP address setting error 1004 Command format error 1100 Connection number not set from 1 to 3 Remote IP address set to 0 Remote TCP port number set to 0 2230 Con...

Page 359: ...e registered Number Status Meaning 00000000 CLOSED Connection closed 00000001 LISTEN Waiting for connection 00000002 SYN SENT SYN sent in active status 00000003 SYN RECEIVED SYN received and sent 00000004 ESTABLISHED Already established 00000005 CLOSE WAIT FIN received and waiting for completion 00000006 FIN WAIT 1 Completed and FIN sent 00000007 CLOSING Completed and exchanged FIN Awaiting ACK 00...

Page 360: ...fective until the PC is restarted or the Ethernet Unit is reset An error response will be returned if the IP address conversion method in the system mode set tings is set for automatic generation Response Codes z IP ROUTER TABLE WRITE 2751 Writes the IP router table Command Block Response Block Response code Description 0000 Normal echo reply received from the remote node 1004 Command format error...

Page 361: ...Network Address The network ID from the IP address in hexadecimal The network ID part corresponding to the address class determined by the leftmost 3 bits set here is enabled Router IP Address The IP address in hexadecimal of a router connected to a network specified with IP addresses Response Codes z IP ADDRESS TABLE READ 2760 Reads the IP address table Command Block Response Block Response code ...

Page 362: ...s in the IP address table records is calculated as the number of records 6 bytes record The configuration of the 6 bytes of data in each record is as shown in the following dia gram FINS Node Address Node address for communications via the FINS command in hexadecimal IP Address IP number used by TCP IP protocol in hexadecimal Precautions for Correct Use Precautions for Correct Use If the IP addres...

Page 363: ...er is returned The total number of bytes in the IP router table records is calculated as the number of records 8 bytes record The configuration of the 8 bytes of data in each record is shown below IP Network Address The network ID from the IP address in hexadecimal The network ID part corresponding to the address class determined by the leftmost 3 bits set here is enabled Router IP Address The IP ...

Page 364: ...ddress 3 transmitted to cCP2E N type and stored in D200 to D219 using the RECV instruction 15 4 7 CMND SEND RECV Instructions Sample Program 20 words D200 D201 D219 20 words D100 D101 D119 Send request RECV instruction c CP2E N type CPU Unit Port number 7 Response requested Retries 3 Response monitoring time 10s Response data d CP2E N type CPU Unit Node address 3 Unit address 00 CPU Unit RECV 15 8...

Page 365: ...rammer with the PLCs or computers on the network by Host Link CP2E N type CPU Unit can be only configed as the end point of the network It cannot be used as a rely node for the network It can send or receive FINS command through up to 3 layers of the network 15 4 8 Restrictions When Using FINS Communication Services Built in Ethernet port Serial port CS CJ CP Series Ethernet port PT Network Host L...

Page 366: ...ry locations specified in the parameter area A total of three ports UDP and TCP combined can be used for socket services 15 5 1 Overview of Socket Service 15 5 2 Procedure for Using Socket Service Functions Ethernet Service request switch Parameters UNIX computer etc node with socket services interface CP2E N type CPU Unit TCP UDP protocol TCP UDP protocol IP TCP UDP Socket 1 Make the basic settin...

Page 367: ...imilar for other socket services Replace the names of the appropriate flags in the flowchart to adapt it to other socket ser vices Note For details about timing charts refer to SECTION 6 Socket Services in the Ethernet Units Construction of Applications Operation Manual Cat No W421 Socket services cannot support CMND command 15 5 3 Socket Services and Socket Status Check TCP Connection UDP Open Fl...

Page 368: ...keep alive Item Contents Default TCP IP keep alive Set the liveness checking interval When socket services using either FINS TCP or TCP IP are used the connection will be terminated if there is no response from the remote node either a server or client within the time set here Enabled for socket services using FINS TCP or TCP IP only Setting range 0 to 65 535 minutes This setting applies to the ke...

Page 369: ... this switch before it is automatically turned OFF by the PLC Ports used exclusively by the Ethernet Unit will not be closed z Status of TCP UDP Sockets 1 to 3 15 5 5 Auxiliary Area Allocations Ethernet Service Request Address Bit s Name Status Unit operation Access A566 2 Socket Force close Switch ON All sockets are forcibly closed when this bit turns ON Read Write OFF Turned OFF by Unit after so...

Page 370: ...it ON during close processing Turns ON when close request is received OFF Unit OFF when close processing has been com pleted 4 to 12 Not used 13 Data Received Flag ON Unit ON when data from a remote node has been received at an open TCP socket Read only OFF Unit OFF when receive processing has been requested for an open TCP socket 14 Results Storage Error Flag ON Unit CP2E CPU Units are supported ...

Page 371: ...ocket opened when switch is turned ON OFF Unit Unit turns OFF switch when open processing has been completed i e when a connection has been made 11 3 Send Request Switch ON User Send processing executed when switch is turned ON The protocol TCP UDP is determined when the socket is opened OFF Unit Unit turns OFF switch when send processing has been completed 12 4 Receive Request Switch ON User Rece...

Page 372: ... bytes is stored and the Data Received Flag turns ON again Before a receive request is executed a check is performed to confirm that the required data is avail able z TCP Socket No 1 to 3 Connection Status The connection status for each TCP socket is stored by code in this word For details refer to A 6 1 TCP Status Transitions 15 5 6 Data Memory Area Allocations Word Bit D16000 D16001 D16002 D1600...

Page 373: ... No 0001 to 0003 hexadecimal 1 to 3 W W W W Local UDP TCP port No 1 0000 to FFFF hexadecimal 0 to 65 535 W Remote IP address 2 00000000 to FFFFFFFF hexadecimal 0 0 0 0 to 255 255 255 255 R W Remote UDP TCP port No 1 0000 to FFFF hexadecimal 0 to 65 535 R W Number of bytes to send receive 1 0000 to 0400 hexadecimal 0 to 1 024 bytes RW RW Send Receive data address 2 Memory area address W W Time out ...

Page 374: ...umber 9600 in an open request for a TCP active or passive socket As a rule use port numbers 1 024 and higher If port number 0 is specified when for an active TCP open the TCP port number will be automati cally allocated and the number of the port that was opened will be stored in the local UDP TCP port number in the Socket Service Parameter Area i e the actual port number will be overwritten on th...

Page 375: ...y to a node using the specified TCP port number z Remote UDP TCP Port No Specify the UDP or TCP port number used by the remote device This parameter is not used when making a receive request for a UDP socket The remote UDP TCP port number will be stored with the response data and will be written as the Remote UDP TCP Port No in the Socket Service Parameter Area When opening a passive TCP socket th...

Page 376: ... address hexadecimal CIO HR and AR Areas CIO 0000 to 0289 B0 0000 to 0121 HR H000 to H127 B2 0000 to 007F AR A448 to A959 B3 01C0 to 03BF DM Area DM D00000 to D16383 82 0000 to 3FFF Response code Meaning 0000 Normal end 0105 Local IP address setting error 1100 UDP socket number is not 1 to 8 or local UDP port number is 0 110C Request Switch turned ON during other processing 220F Specified socket i...

Page 377: ...nd 0302 CPU Unit error cannot execute 1100 Number of bytes to send is not in allowable range or the remote IPaddress is 0 1101 The area designation of the Send Receive Data Address is not inallowable range 1103 The bit number in the Send Receive Data Address is not 00 110C Request Switch turned ON during other processing 220F Specified socket is already processing a send request 2210 The specified...

Page 378: ...n communications with remote node ETIMEDOUT or remotenode does not exist 0080 Open request timed out 0081 The specified socket was closed during open processing Response code Meaning 0000 Normal end 0105 Local IP address setting error 1100 TCP socket number is not 1 to 8 or local TCP port number is 0 110C Request Switch turned ON during other processing 220F Specified socket is already open or alr...

Page 379: ...or in communications with remote node ECONNABORTED 0053 Error in communications with remote host ETIMEDOUT 0080 Receive request timed out 0081 The specified socket was closed during receive processing Response code Meaning 0000 Normal end 0302 CPU Unit error cannot execute 1100 Number of bytes to send not in allowable range 1101 The area designation of the Send Receive Data Address is not inallowa...

Page 380: ... open z Data Flow The data will flow between the CPU Unit Ethernet Unit and host computer as shown in the following diagram Note Here execution bits refer to W0 00 to W0 03 which are used in the ladder diagram to con trol execution of communications Responsecode Meaning 0000 Normal end 0302 CPU Unit error cannot execute 2210 The specified socket is not been connected 2607 Specified Socket Service ...

Page 381: ...that is received 100 bytes is stored beginning at D01000 One of the bits between W1 00 and W1 03 will turn ON if an error occurs Refer to 15 7 5 Socket Service Request Switches for information on errors z Program Memory Map The send and receive data and bits flags used by the program are shown in the following diagram DM Area Send data 100 bytes 100 0064 Hex Receive data 100 bytes 100 0064 Hex D00...

Page 382: ...n set the Close Request Switch A571 05 is turned ON and the TCP Closing Flag W2 01 is turned OFF When the TCP Closing Flag W2 01 turns ON the following parameter is written to the parameter area for socket number 1 D16008 0001 Hex UDP TCP socket No 1 When the TCP Close Bit W0 01 turns ON the TCP Close Error Flag W1 01 is turned OFF and the TCP Closing Flag W2 01 is turned ON to initialize processi...

Page 383: ...571 03 is turned ON and the TCP Sending Flag W2 02 is turned OFF If the Send Request Switch A571 03 turns OFF while the TCP Sending Flag W2 02 is OFF the contents of the response code D16017 in the Socket Service Pa rameter Area is checked and if it is not 0000 Hex normal end the TCP Send Error Flag W1 02 is turned ON After the execution results have been checked the TCP Send Bit W0 02 is turned O...

Page 384: ...red to use this function 2 SNTP server settings require specialized knowledge so they should always be handled by the network administrator 3 When using the Internet depending on the condition of the network it may not be possible to acquire the clock information SNTP servers can be specified by host name rather than by IP address by using of the DNS client func tion This enables automatic searche...

Page 385: ...erver Setting Auto Adjustment Designation Method IP Address Host Name Port No Retry Timer Time Lag Adjustment 1 Make the basic settings Refer to 15 3 3 Basic Settings 3 To perform automatic clock adjustment manually turn the Automatic Clock Adjustment Switch A566 4 from OFF to ON 4 Select Transfer to PLC from the Options Menu and click the Yes button The PLC Setup will be transferred to the CPU Un...

Page 386: ... Clock Auto Adjustment button to display the Clock Auto Adjustment setup dialog CX Programmer Setup Item Contents Default IP Address Set the IP address for the DNS server The DNS server is required when specifying the SNTP servers by host name None Port No Set the port to be used for connecting to the DNS server This setting does not normally need to be changed 0 Number 53 is used Retry timer Set ...

Page 387: ...by IP address or by host domain name i e by host name IP Address IP Address Set the IP address for the SNTP server that is to be used for auto matic clock adjustment This setting is enabled only when server specification by IP address has been selected 0 0 0 0 Host Name Set the host domain name i e the host name for the SNTP server that is to be used for automatic clock adjustment This setting is ...

Page 388: ...6 5 Auxiliary Area Allocations Service Status Address Bit s Name Status Unit operation Access A46 5 DNS Server Error ON ON when the following errors occur during DNS server operation An illegal server IP address is set A timeout occurs during communications with the server Read only OFF OFF when DNS server operation is normal 11 SNTP Server Error ON ON when the following errors occur during SNTP s...

Page 389: ...only OFF OFF when the IP address is normal 3 IP Address Table Error Flag ON ON if the IP address table information is incorrect OFF OFF when the IP address table is normal 4 IP Router Table Error Flag ON ON if the IP router table information is incor rect OFF OFF when the IP address table is normal 5 DNS Server Error Flag ON ON when the following errors occur during DNS server operation An illegal...

Page 390: ...ection is established OFF Turned OFF by the Unit when the connection is terminated 2 FINS TCP Con nection Flag 3 ON Turned ON by the Unit when a connection is established OFF Turned OFF by the Unit when the connection is terminated A500 11 Ethernet Commu nication Error Clear Flag ON If this flag is set to ON Ethernet communica tion error flag A46 15 will be cleared OFF Read write OFF OFF after Eth...

Page 391: ...ure Control 16 2 16 1 1 Overview 16 2 16 1 2 Flow of Operation 16 3 16 1 3 Application Example 16 4 16 2 Clock 16 7 16 3 DM Backup Function 16 9 16 3 1 Backing Up and Restoring DM Area Data 16 9 16 3 2 Procedure 16 11 16 4 Security Functions 16 13 16 4 1 Ladder Program Read Protection 16 13 16 4 2 Protecting Program Execution Using the Lot Number 16 15 Other Functions ...

Page 392: ... W483 for the PIDAT instruction 16 1 1 Overview Temperature input Input from Temperature Sensor Unit to words in the Input Area 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 transi...

Page 393: ...a Example 500 0 C multiplied by 10 is 5000 decimal This is converted to 1388 in hexadecimal and stored If the temperature is negative it is stored as signed hexadecimal Example 200 C is stored as FF38 hex z 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...

Page 394: ...o 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 instruction s input condition PID control will be started with the specified PID constants 3 Turn ON bit 15 in C 9 the AT Co...

Page 395: ... 1 D301 2000 C 2 D302 0 C 3 D303 0 C 4 D304 C 6 D306 APR S 2 C D500 D D600 C D500 0800 C 1 D501 200 C 2 D502 0000 C 3 D503 1300 C 4 D504 1FFF 0000 8000 Pulse output Work Area Work Area PV Scale PV to within 0000 to 1FFF hex MV MV Specify 16 bit signed data bit 11 ON bit 10 OFF Number of coordinates in data table 1 bits 0 to 7 00 hex Minimum manipulated variable input 200 decimal FF38 hex Minimum v...

Page 396: ...o 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 0...

Page 397: ...day 01 Monday 02 Tuesday 03 Wednesday 04 Thursday 05 Friday 06 Saturday Name Address Contents Start up Time A510 and A511 The time at which the power was turned ON day of month hour minutes and seconds Power Interruption Time A512 and A513 The time at which the power was last interrupted day of month hour minutes and seconds Power ON Clock Data 1 A720 to A722 Consecutive times at which the power w...

Page 398: ...e clock during 3 seconds after the power is ON the following error response will occur DATE instruction The clock cannot be set Error flag P_ER is ON When the clock is set with a FINS command command code 0702 the response end code will be 2108 Cannot be set during clock initialization Name Mnemonic Function CALENDAR ADD CADD Adds time to the calendar data in the specified words CALENDAR SUBTRACT ...

Page 399: ...en if power is interrupted z Conditions for Executing Backup Specified words starting from D0 in the I O memory can be saved to the built in Flash Memory by turning ON A751 15 These words are called the DM backup words and the data is called the DM backup data A751 15 DM Backup Save Start Bit can be used in any operating mode RUN MON ITOR or PROGRAM mode z Words that can be Backed Up E type CPU Un...

Page 400: ...urned ON and OFF while the DM Backup Save Flag A751 14 is ON it will be ignored and the data will not be backed up again To backup the data again make sure that A751 14 is OFF and then turn ON A751 15 A751 15 is turned OFF when the power supply is turned ON DM Backup Save Flag A751 14 This flag turns ON when A751 15 is turned ON to start the saving operation This flag stays ON while data is being ...

Page 401: ... 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 Flash Memory Using a Ladder Program When the saving operation has been completed A751 14 DM Backup Save Flag w...

Page 402: ...ng in the ladder program so that contents of the DM Area words in the I O memory that are set to be backed up are not changed during a backup operation Data can be written up to 100 000 times to the built in Flash Memory Data cannot be written once this limit is exceeded If writing fails A315 15 Backup Memory Error Flag will turn ON Additional Information Confirming Completion of DM Area Backup If...

Page 403: ... the password is entered in the Disable Password Dia log Box from the CX Programmer This enables improved security for PLC data in equipment z Read Protection Using Extended Passwords Extend protection with UM read protection to ensure better protection for your design assets Also if the password is incorrect five times in a row a password cannot be entered for two hours z Setting Protection 16 4 ...

Page 404: ... limits to the password text string lengths are 16 characters z Protection Release Procedure 1 Go online and select Protection Release Password from the PLC menu The Release Read Protection Dia log Box will be displayed 2 Enter the registered password If the password is incorrect the message shown on the right will be displayed and protection will not be released If incorrect passwords are entered...

Page 405: ...upper digits of the lot number are stored in A311 and the lower digits are stored in A310 as shown below X Y and Z in the lot number are converted to 10 11 and 12 respectively in A310 and A311 z Programming Example 1 The following instructions will create a fatal error to prevent the program from being executed when the lot number is not 23905 Name Bit address Description Status after mode change ...

Page 406: ...ng executed when the lot number does not end in 05 3 The following instructions will create a fatal error to prevent the program from being executed when the lot number does not begin with 23Y A200 11 First Cycle Flag ANDL 610 A310 00FF0000 D0 FALS 007 1 D100 D0 50000 L 306 ANDL 610 A310 0000FFFF D0 FALS 007 1 D100 D0 1123 A200 11 First Cycle Flag L 306 ...

Page 407: ...Allocation 17 6 17 4 2 Auxiliary Area Allocation 17 6 17 5 Analog Input Option Board 17 8 17 5 1 Main Specifications 17 8 17 5 2 Analog Input Signal Ranges 17 8 17 5 3 Wiring 17 9 17 6 Analog Output Option Board 17 12 17 6 1 Main Specifications 17 12 17 6 2 Analog Output Signal Ranges 17 12 17 6 3 Wiring 17 13 17 7 Analog I O Option Board 17 16 17 7 1 Main Specifications 17 16 17 7 2 Analog I O Si...

Page 408: ...log units which allow you to easily realize analog input output function for CP2E N type CPU Unit Analog Option Board Voltage Input 0V 10V Resolution 1 4000 Current Input 0mA 20mA Resolution 1 2000 Voltage Output 0V 10V Resolution 1 4000 Analog I O Option Board CP1W MAB221 2CH 2CH Analog Input Option Board CP1W ADB21 2CH Analog Output Option Board CP1W DAB21V 2CH ...

Page 409: ...are connected in inner circuit Terminal Arrangement VI1 II1 VI2 II2 COM VO1 VO2 COM VI1 II1 VI2 II2 COM VO1 VO2 COM LED pattern LED Color Description Status Remark ERR Red Fault condition indicator Flash A communication error with CPU Unit has occurred at the unit Lit Other errors except the communication error Not lit Operation is normal Analog I O terminal Error LED red ...

Page 410: ...e same time to unlock the cover and then pull the cover out 2 Check the alignment to make the corner cut of the Analog Option Board fit in the Option Board slot and firmly press the Analog Option Board in until it snaps into place Only one Analog Option Board can be installed If two Analog Option Boards are mounted on a CP2E N30 40 60 CPU Unit an option board error non fatal error will occur Both ...

Page 411: ...necessary to set the baud rate to 115 200 and the mode to Host Link However except the settings mentioned above ERR LED will be lit if the communications is impossible between the CPU Unit and the Analog Option Board Check and change the settings Always turn OFF the power supply to the CPU unit and wait until all the operation indicators go out Press the up down lock levers on both sides of the An...

Page 412: ...Contents CP1W ADB21 CP1W DAB21V CP1W MAB221 CIO80 Analog Input 1 Analog Input 1 CIO81 Analog Input 2 Analog Input 2 CIO82 to CIO84 CIO85 Analog Output 1 Analog Output 1 CIO86 Analog Output 2 Analog Output 2 CIO87 to CIO89 17 4 2 Auxiliary Area Allocation Analog Option Unit Status Area CPU Unit Option board slot AR bits Content Error Process CP2E N30 N40 N60 CPU Unit Option board slot 1 left A435 1...

Page 413: ...tion Boards are installed in both option board slots A424 00 and A424 01 are all set ON CPU Unit Option board slot AR bits Content Error Process CP2E N30 N40 N60 CPU Unit Option board slot 1 left A424 00 Option board error detail information 0 Cleared at the timing when the cause is released 1 An option board error occurs Option board slot 2 right A424 01 CP2E N14 N20 CPU Unit Option board slot A4...

Page 414: ... 4000 The entire data range is 0000 to 0FFF 0 to 4095 17 5 1 Main Specifications Item Specifications Voltage Input Current Input Input signal range 0 V to 10 V 0 mA to 20 mA Max rated input 0 V to 15 V 0 mA to 30 mA External input impedance 200 kΩ min Approx 250 Ω Resolution 1 4000 full scale 1 2000 full scale Overall accuracy 25 C 0 5 full scale 0 6 full scale 0 to 60 C 1 0 full scale 1 2 full sc...

Page 415: ...hat the input current must not exceed 30 mA Note When using current inputs voltage input terminals must be short circuited with current input terminals Analog Input Terminal Arrangement 17 5 3 Wiring Internal Circuits Converted Data Hexadecimal Decimal 0mA 20mA 07D0 2000 0000 0 VI1 Voltage Input 1 Current Input 1 Voltage Input 2 Current Input 2 II1 VI2 II2 COM Input Common Analog input 2 Analog gr...

Page 416: ...screwdriver and lock it inside To disconnect the wiring press the release button in with a small flat blade screwdriver and pull the line out while the lock is released Note 1 Ferrules without plastic sleeve cannot be used 2 When using stranded wire twist the core so that the barbed wires cannot protrude 3 Do not solder plate the end of cable The screwdriver shown below is recommended for wiring A...

Page 417: ...alog option board to an outside analog device either ground the 0 V side of the PLC s external power supply or do not ground the PLC s external power supply at all Otherwise the PLC s external power supply may be shorted depending on the connection meth ods of the outside analog device DO NOT ground the 24 V side of the PLC s external power supply as shown in the following diagram Wiring for Analo...

Page 418: ... correspond to an analog voltage range of 0 to 10 V The entire output range is 10 to 10 24 V 17 6 1 Main Specifications Item Specifications Voltage Output Current Output Output signal range 0 V to 10 V External output allowable load resistance 2 kΩ min External output impedance 0 5 Ω max Resolution 1 4 000 full scale Overall accuracy 25 C 0 5 full scale 0 to 60 C 1 0 full scale 20 to 0 C 1 3 full ...

Page 419: ...not connect bare stranded wires directly to terminals Analog Output Terminal Arrangement 17 6 3 Wiring Internal Circuits Applicable Cables and Terminal Wiring Wire type Wire size Solid Wire 0 2mm2 to 0 5mm2 AWG24 to AWG20 Manufacturer Model Applicable wire Phoenix Contact AI 0 25 12 0 2mm2 AWG24 VO1 Voltage Output 1 VO2 Voltage Output 2 COM Output Common Analog output 1 Analog ground V O 1 COM V O...

Page 420: ...mended for wiring To prevent noise 2 core shielded twisted pair cable should be used Note 1 Separate wiring from power lines AC power supply lines high voltage lines etc 2 When there is noise in the power supply line install a noise filter on the input section and the power supply 3 When external power is supplied or when the power is interrupted there may be a pulse status analog output of up to ...

Page 421: ...ce either ground the 0 V side of the PLC s external power supply or do not ground the PLC s external power supply at all Otherwise the PLC s external power supply may be shorted depending on the connection meth ods of the outside analog device DO NOT ground the 24 V side of the PLC s external power supply as shown in the following diagram 24 V 0 V 0 V Non insulated DC power supply 0 V Analog Devic...

Page 422: ...al input impedance 200 kΩ min Approx 250 Ω Resolution 1 4 000 full scale 1 2 000 full scale Overall accuracy 25 C 0 5 full scale 0 6 full scale 0 to 60 C 1 0 full scale 1 2 full scale 20 to 0 C 1 3 full scale 1 5 full scale A D conversion data 0000 to 0FA0 hex 0000 to 07D0 hex Averaging function Not supported Analog Output Section Output signal range 0 V to 10 V External output allowable load resi...

Page 423: ...signal will be fixed at either the lower limit or upper limit z 0 to 10 V The 0 to 10 V range corresponds to the hexadecimal values 0000 to 0FA0 0 to 4000 The entire data range is 0000 to 0FFF 0 to 4095 z 0 to 20 mA The 0 to 20 mA range corresponds to the hexadecimal values 0000 to 07D0 0 to 2000 The possi ble data range is 0000 to 0FFF 0 to 4095 But it is strongly suggested that the input current...

Page 424: ...to 10 24 V Note When using current inputs voltage input terminals must be short circuited with current input terminals Analog Ouput Signal Ranges Analog I O Terminal Arrangement 0V 10V 0FA0 FFFF 0FFF 4000 4095 0000 0 Converted Data Hexadecimal Decimal 10 24V VI1 Voltage Input 1 II1 Current Input 1 VI2 Voltage Input 2 II2 Current Input 2 COM Analog I O Common VO1 Voltage Output 1 VO2 Voltage Output...

Page 425: ...reat either solid or stranded wires directly 17 7 3 Wiring Internal Circuits Applicable Cables and Terminal Wiring Wire type Wire size Solid Wire 0 2mm2 to 0 5mm2 AWG24 to AWG20 Manufacturer Model Applicable wire Phoenix Contact AI 0 25 12 0 2mm2 AWG24 Analog input Analog output Analog input 2 Analog ground I I 1 V I 1 COM I I 2 V I 2 56 kΩ 250 Ω 250 Ω 180 kΩ 180 kΩ Internal circuits Analog input ...

Page 426: ... IN and COM terminals 2 Separate wiring from power lines AC power supply lines high voltage lines etc 3 When there is noise in the power supply line install a noise filter on the input section and the power supply 4 When external power is supplied or when the power is interrupted there may be a pulse status analog output of up to 1 ms If this status is a problem take the following measures Turn ON...

Page 427: ...e either ground the 0 V side of the PLC s external power supply or do not ground the PLC s external power supply at all Otherwise the PLC s external power supply may be shorted depending on the connection meth ods of the outside analog device DO NOT ground the 24 V side of the PLC s external power supply as shown in the following diagram 24 V 0 V 0 V Non insulated DC power supply 0 V Analog Device...

Page 428: ... completed flag in related status area Refer to 17 4 2 Auxiliary Area Allocation A435 will be set Therefore status monitor content must be added in ladder Only when the initialization process has finished user can use the A D conversion data or write the output data The analog input data will be 0000 until the initial processing is completed It takes about 3 seconds from the CP2E CPU Unit running ...

Page 429: ...of the Analog Option Board is 2ms point The refresh time of data conversion in the CPU Unit is shown as follows The refresh time differs in accordance with the cycle time Below are typical values for reference only Analog Option Board Cycle time ms 1ms 10ms 20ms CP1W ADB21 16 40 20 60 20 100 CP1W DAB21V 9 37 26 58 46 86 CP1W MAB221 AD 14 62 18 109 20 160 CP1W MAB221 DA 9 53 26 102 46 150 ...

Page 430: ...stop The analog input conver sion data stops refreshing and the analog output con version output becomes 0V Option board error An error occurred in the Analog Option Board Restart the CPU Unit Replace the Analog Option Board if the error recurs Two Analog Option Boards are installed Install one Ana log Option Board only A353 13 will be ON Flashing Communica tion error The communi cation between PL...

Page 431: ... Option Board into the option port Connect to the analog input output device Set communication protocol in PLC Settings to Host Link 115200bps 7 2 E Turn the power of the CPU Unit OFF and ON again Wait until the Analog Option Board finishes initialization and works normally Read the analog input data write the analog output data Note 1 If PLC communication protocol setting is error the option boar...

Page 432: ... Analog input2 0 20mA Analog output1 0 10V System composing CP2E N D CP1W MAB221 17 11 2 Program Example 80 D0 MOV 021 81 D1 MOV 021 D2 85 MOV 021 Execution condition Execution condition Execution condition Reads analog input 1 s converted value to D0 Reads analog input 2 s converted value to D1 The content of D2 is written to the analog output 1 A435 15 A435 15 A435 15 A435 15 sets on if the anal...

Page 433: ... from Startup to Operation 18 3 18 2 3 Help 18 6 18 3 Creating a Ladder Program 18 7 18 3 1 Inputting a Ladder Program 18 7 18 3 2 Saving and Reading Ladder Programs 18 14 18 3 3 Editing Ladder Programs 18 16 18 4 Connecting Online to the CP2E and Transferring the Program 18 18 18 4 1 Connecting Online 18 18 18 4 2 Changing Operating Modes 18 19 18 4 3 Transferring a Ladder Program and the PLC Set...

Page 434: ... Device in the CP2E CPU Unit Hardware User s Manual Cat No W613 for the connection method with a CP2E CPU Unit Precautions for Correct Use Precautions for Correct Use When using the full version of CX Programmer provided in CX One refer to the CX Program mer Operation Manual Cat No W446 A Programing Console cannot be used for the CP2E Use the CX Programmer ...

Page 435: ...l Cat No W463 for details For details on the operation of the CX Programmer refer to the CX Programmer Online Help The flow of using the CX Programmer from startup through starting PLC operation is shown below 18 2 1 CX Programmer 18 2 2 CX Programmer Flow from Startup to Operation 1 Select Start Programs OMRON CX One CX Programmer CX Programmer 2 Select CP2E or CP2E N in the Change PLC Dialog Box...

Page 436: ...The title display will appear followed by the Main Window This section describes the names and functions of each part of the Main Window of the CX Programmer For details on the functions and operation of CX Programmer refer to the CX Programmer Online Help z Main Window Start CX Programmer Names and Functions of Parts of the Main Window 1 2 3 4 5 7 8 6 9 10 ...

Page 437: ...ions Allow ladder programming to be split up into a number of parts 7 Ladder Section Window A window that is used to create and edit ladder programs 8 I O Comment Bar Displays the name address value and I O comment of the symbol selected with the cursor 9 Output Window Displays messages such as search results and errors 10 Status Bar Displays information such as the PLC name online offline status ...

Page 438: ...the CX Programmer Instruc tion Reference z Displaying the Instruction Reference from the Main Menu of the CX Programmer Select Instruction Reference CP2E from the Help Menu The CX Programmer Instruction Reference Window will be displayed z Displaying the Instruction Reference while Creating a Ladder Program While creating an instruction in a ladder program in Smart Input Mode press the F1 Key to d...

Page 439: ...to input a ladder program for an example application using the CX Programmer commands To use the CX Programmer the first step is to create a new project To create a new project we must specify the PLC type and CPU Unit model for which the ladder program and data to be created will be used 18 3 1 Inputting a Ladder Program Creating a New Project 1 Select New from the File Menu The Change PLC Dialog...

Page 440: ...hat the USB driver has been installed correctly 3 Click the Settings Button The PLC Type Settings Dialog Box will be displayed 4 Select a CPU Unit model in the CPU Type box and then click the OK But ton The PLC Type Settings Dialog Box will close 5 Confirm that USB is displayed as the network type and then click the OK Button The Change PLC Dialog Box will close and the Main Window will be display...

Page 441: ...er Key and then enter the address z Inputting a NO Input Condition Entering NO and NC Input Conditions 1 Press either the L or C Key LD 0 00 will be displayed 2 Press the Enter Key Bit 1 1 will be displayed and 0 00 will be displayed in reverse video 3 If the address is not CIO 0 00 input the correct address from the key board For example input 0 02 To select an Auxiliary Area bit press the Down C...

Page 442: ...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 To input an OUTPUT instruction press the O Key and select OUT To input an OUTPUT NOT instruction press the O or Q Key and then select OUT NOT Press the Enter Key and then enter the a...

Page 443: ... the Enter Key to make a selection Then input the operands z Example TIM Instruction 3 For an address other than CIO 100 00 input the address from the keyboard Here 100 02 has been input 4 Press the Enter Key This completes inputting the OUT PUT instruction Inputting Instructions 1 Press the T Key A list of instructions beginning with T will be displayed 2 Press the Enter Key Timer number 1 2 will...

Page 444: ...ord address can be incremented by 10 when pasting the rung 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 5 Press t...

Page 445: ...arting from 1 are appended I O comments Increment the numbers found from tail The I O comment is searched for a number starting from the end and any number that is found is incremented by 1 If no number is found an underbar and a sequential number starting from 1 are appended Addresses are automatically incremented when the rung is pasted Bits Example Incrementing by 16 Bits One Word Example CIO 0...

Page 446: ... appended Assign a new number to the end of the symbol name And underbar and sequential number starting from 1 are appended to the end of the symbol name I O comments Increment the numbers found from head The I O comment is searched for a number starting from the beginning and any number that is found is incre mented by 1 If no number is found an underbar and a sequential number starting from 1 ar...

Page 447: ...ck the error message displayed in the Output Window The cursor will move to the location of the error Correct the ladder pro gram as required Note When there is more than one error press the Shift J keys to search for errors in order Saving a Ladder Program 1 Select Save As from the File Menu The Save CX Programmer File Dia log Box will be displayed 2 Specify the save location input the file name ...

Page 448: ...y 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 z Inputting by Editing I O Comments Multiple I O comments can be input or changed from an address list 18 3 3 Editing Ladder Programs Inputting and Editing I O Comments 1 Select Edit I O Comment from the Edit Menu The I O Co...

Page 449: ...s can be added to rungs in the program Inputting Rung Comments 1 Double click the header of the rung to which a comment is to be attached The Rung Properties Dialog Box will be displayed 2 Input a comment into the Comment Field on the General Tab Page 3 Close the Rung Properties Dialog Box The input rung comment will be dis played in the ladder program ...

Page 450: ...g programs from the CX Programmer to the CP2E it is first necessary to place the CX Programmer online with the CP2E Online is the state in which communications is possible between the computer and the CP2E 18 4 1 Connecting Online 1 Open the project containing the program to be transferred from the CX Programmer 2 Select Work Online from the PLC Menu of the CX Programmer A dialog box to confirm go...

Page 451: ...s To check them double click New PLC1 CP2E Offline in the project tree For details on these settings refer to Creating a New Project in 18 3 1 Inputting a Ladder Program The operating mode can be changed to PROGRAM mode The procedure for changing to PROGRAM mode is given below Once the online connection has been established the color of the Ladder Section Window will change to light gray 18 4 2 Ch...

Page 452: ...er can be transferred to the CP2E 18 4 3 Transferring a Ladder Program and the PLC Setup 1 Change to PROGRAM mode select Operating Mode Program from the PLC Menu and then click the Yes Button 2 Select Transfer Transfer PC PLC from the PLC Menu The Download Options Dialog Box will be displayed 3 Click the OK Button A dialog box to confirm the transfer will be displayed To transfer the PLC Setup sel...

Page 453: ...or Correct Use Precautions for Correct Use To start operation when the power is turned ON set the operation mode at startup in the PLC Setup to MONITOR or RUN mode 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 Precautions for Safe Use Always confirm the safety of the controlled ...

Page 454: ... 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 1 Select Operating Mode Run from the PLC Menu A dialog box to confirm changing the operating mode will be displayed 2 Click the Yes Button The CP2E will change to RUN mode and operation will start ...

Page 455: ...xecution status of a ladder program This enables checking the execution of the ladder program Change the CP2E s operating mode to MONITOR mode to display the execution status The execution status of the ladder program will be displayed The Ladder Section Window can be split This enables displaying multiple locations within a ladder pro gram so that you can check them at the same time 18 5 1 Monito...

Page 456: ...tion 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 Monitoring Specified Addresses 1 While online selec...

Page 457: ...o see the effect of establishing conditions when debugging I O bits Word Area bits W Timer Completion Flags Holding Area Bits H Counter Completion Flags Precautions for Safe Use Always check the safety of the system before force setting or force resetting a bit and before releasing forced status Force setting a bit 18 5 2 Force set Reset Bits Bits that can be Force set Reset Force setting 1 Set th...

Page 458: ...me 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 CP2E 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 indicato...

Page 459: ...he CP2E s operating mode to MONITOR or PROGRAM mode 2 Click the header of the rung to be edited 3 Select Online Edit Begin from the PLC Menu The gray color will be cleared from the Ladder Section Window to indi cate that the ladder program can be edited 4 Edit the ladder program 5 Select Online Edit Send Changes from the PLC Menu The edited rung will be transferred to the CP2E ...

Page 460: ...18 Programming Device Operations 18 28 CP2E CPU Unit Software User s Manual W614 ...

Page 461: ...Instructions A 37 A 1 17 Interrupt Control Instructions A 38 A 1 18 High speed Counter Pulse Output Instructions A 39 A 1 19 Step Instructions A 50 A 1 20 Basic I O Unit Instructions A 50 A 1 21 Serial Communications Instructions A 54 A 1 23 Clock Instructions A 56 A 1 24 Failure Diagnosis Instructions A 57 A 1 25 Other Instructions A 57 A 2 Auxiliary Area Allocations by Address A 58 A 2 1 Read on...

Page 462: ...ified 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 Takes a logical OR of the ON OFF status of the specified operand bit and the current execution condition OR NOT OR NOT Reverses the status of the specified bit and takes a logical OR with the current execut...

Page 463: ...xecu tion condition is OFF when the specified bit in the specified word is ON and ON when the bit is OFF OR BIT TEST OR TST OR TST 350 is used in the program like OR the execution condi tion is ON when the specified bit in the specified word is ON and OFF when the bit is OFF OR BIT TEST NOT OR TSTN OR TSTN 351 is used in the program like OR NOT the execution condition is OFF when the specified bit...

Page 464: ...specified bit in the specified word when the execution condition is ON Unlike the SET instruction SETB 532 can be used to reset a bit in a DM word SINGLE BIT RESET RSTB RSTB 533 turns OFF the specified bit in the specified word when the execution condition is ON Unlike the RSET instruction RSTB 533 can be used to reset a bit in a DM word Instruction Mnemonic Variations Symbol Operand Function DIFU...

Page 465: ...MILR 518 is OFF the outputs for all instructions between that MILR 518 instruction and the next MILC 519 instruction are interlocked MILR 518 and MILC 519 are used as a pair MILR 518 MILC 519 interlocks can be nested e g MILR 518 MILR 518 MILC 519 MILC 519 If there is a differentiated instruction DIFU DIFD or instruction with a or prefix between MILR 518 and the corresponding MILC 519 that instruc...

Page 466: ...to cancel the execution of the loop for a given execution condition The remaining instructions in the loop are processed as NOP 000 instructions FOR NEXT LOOPS NEXT The instructions between FOR 512 and NEXT 513 are repeated a specified number of times FOR 512 and NEXT 513 are used in pairs Instruction Mnemonic Variations Symbol Operand Function N Interlock number CJP 510 N Instructions jumped Exec...

Page 467: ...range for the set value SV is 0 to 9 999 s for TMHH BCD and 0 to 65 535 s for TMHHX Binary The timing charts for TMHH 540 and TMHHX 552 are the same as those given above for TIMH 015 TMHHX BCD TIM N S N Timer number S Set value SV SV Timer input ON OFF 0 0 ON OFF ON OFF ON OFF Timer PV Completion Flag Timer input Timer PV Completion Flag Timer Input Turned OFF before Completion Flag Turns ON TIMX ...

Page 468: ...ue SV is 0 to 9 999 for CNT BCD and 0 to 65 535 for CNTX Binary CNTX Binary Instruction Mnemonic Variations Symbol Operand Function TTIM 087 N S N Timer number S Set value Reset input Timer input Timer input Timer PV SV Reset input PV maintained Timing resumes Completion Flag ON OFF 0 ON OFF ON OFF TTIMX 555 N S N Timer number S Set value Reset input Timer input TIML 542 D1 D2 S D1 Completion Flag...

Page 469: ...value SV to the maximum of 9999 for CNR BCD and FFFF for CNRX Binary CNRX Binary Instruction Mnemonic Variations Symbol Operand Function CNTR 012 N S Increment input Decrement input Reset input N Counter number S Set value SV SV 1 1 Increment input Counter PV Decrement input Counter PV Completion Flag Counter PV Completion Flag ON OFF ON OFF 0 0 0 CNTRX 548 N S Increment input Decrement input Rese...

Page 470: ...not the time data will be masked for the comparison Bits 00 to 05 mask the seconds minutes hours day month and year respectively If all 6 val ues are masked the instruction will not be executed the execu tion condition will be OFF and the Error Flag will be turned ON UNSIGNED COMPARE CMP Compares two unsigned binary values constants and or the con tents of specified words and outputs the result to...

Page 471: ...es the source data to 16 ranges defined by 16 lower limits and 16 upper limits and turns ON the corresponding bit in the result word when the source data is within the range B First word of block Instruction Mnemonic Variations Symbol Operand Function CMPL 060 S1 S2 S1 Comparison data 1 S2 Comparison data 2 S1 1 S2 1 Unsigned binary comparison Arithmetic Flags CPS 114 S1 S2 S1 Comparison data 1 S2...

Page 472: ...ariations Symbol Operand Function MOVE MOV Transfers a word of data to the specified word DOUBLE MOVE MOVL Transfers two words of data to the specified words MOVE NOT MVN Transfers the complement of a word of data to the specified word Instruction Mnemonic Variations Symbol Operand Function ZCP 088 CD LL UL CD Comparison data 1 word LL Lower limit of range UL Upper limit of range ZCPL 116 CD LL UL...

Page 473: ...Function S C D MOVB 082 S Source word or data C Control word D Destination word C m n Source bit 00 to 0F 0 to 15 decimal Destination bit 00 to 0F 0 to 15 decimal 0 7 8 15 S C D MOVD 083 S Source word or data C Control word D Destination word S m n D l C 0 l 8 11 12 15 n m 0 3 4 7 15 8 0 11 3 7 4 12 C 0 First digit in S m 0 to 3 Number of digits n 0 to 3 0 1 digit 1 2 digits 2 3 digits 3 4 digits ...

Page 474: ...he destination word MOVE TO REGISTER MOVR Sets the PLC memory address of the specified word bit or timer counter Completion Flag in the specified Index Register Instruction Mnemonic Variations Symbol Operand Function XFER 070 N S D N Number of words S 1st source word D 1st destination word S N 1 D N 1 to to N words 15 0 S S N 1 to 15 0 D D N 1 to BSET 071 S St E S Source word St Starting word E En...

Page 475: ...Wd one bit to the left DOUBLE SHIFT LEFT ASLL Shifts the contents of Wd and Wd 1 one bit to the left Instruction Mnemonic Variations Symbol Operand Function MOVRW 561 S D S Source desired TC number D Destination Index Register Internal I O memory address of S Timer counter PV only Index Register SFT 010 St E Data input Shift input Reset input St Starting word E End word E St 1 St 2 St Status of da...

Page 476: ...ncluding the Carry Flag CY DOUBLE ROTATE RIGHT RORL Shifts all Wd and Wd 1 bits one bit to the right including the Carry Flag CY ONE DIGIT SHIFT LEFT SLD Shifts data by one digit 4 bits to the left ONE DIGIT SHIFT RIGHT SRD Shifts data by one digit 4 bits to the right Instruction Mnemonic Variations Symbol Operand Function ASR 026 Wd Wd Word 0 15 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 CY 0 1 Wd 100CH 1...

Page 477: ... NSLL Instruction Mnemonic Variations Symbol Operand Function NASL 580 D C D Shift word C Control word Shift n bits Lost N bits Contents of a or 0 shifted in 15 8 0 11 7 12 C 0 No of bits to shift 00 to 10 Hex Always 0 Data shifted into register 0 Hex 0 shifted in 8 Hex Contents of rightmost bit shifted in 15 8 0 11 7 12 C 0 No of bits to shift 00 to 20 Hex Always 0 Data shifted into register 0 He...

Page 478: ...d word by 1 DOUBLE DEC REMENT BINARY L Decrements the 8 digit hexadecimal content of the specified words by 1 INCREMENT BCD B Increments the 4 digit BCD content of the specified word by 1 Instruction Mnemonic Variations Symbol Operand Function NASR 581 D C D Shift word C Control word Lost N bits Contents of a or 0 shifted in 15 8 0 11 7 12 C 0 No of bits to shift 00 to 10 Hex Always 0 Data shifted...

Page 479: ...he Carry Flag CY DOUBLE SIGNED BINARY ADD WITH CARRY CL Adds 8 digit double word hexadecimal data and or constants with the Carry Flag CY Instruction Mnemonic Variations Symbol Operand Function BL 595 Wd Wd 1st word Wd 1 Wd Wd 1 Wd B 596 Wd Wd Word 1 Wd Wd BL 597 Wd Wd 1st word Wd 1 Wd Wd 1 Wd 400 Au Ad R Au Augend word Ad Addend word R Result word Au Ad R CY Signed binary Signed binary Signed bin...

Page 480: ...perand Function B 404 Au Ad R Au Augend word Ad Addend word R Result word Au Ad R CY BCD BCD BCD CY will turn ON when there is a carry BL 405 Au Ad R Au 1st augend word Ad 1st addend word R 1st result word Ad 1 R 1 CY Au Ad R Au 1 BCD BCD BCD CY will turn ON when there is a carry BC 406 Au Ad R Au Augend word Ad Addend word R Result word CY Au Ad R CY BCD BCD BCD CY will turn ON when there is a ca...

Page 481: ...ry Flag CY Instruction Mnemonic Variations Symbol Operand Function C 412 Mi Su R Mi Minuend word Su Subtrahend word R Result word CY Mi Su R CY Signed binary Signed binary Signed binary CY will turn ON when there is a borrow CL 413 Mi Su R Mi Minuend word Su Subtrahend word R Result word Mi 1 Su 1 R 1 CY Mi Su R CY Signed binary Signed binary Signed binary CY will turn ON when there is a borrow B ...

Page 482: ... Function 420 Md Mr R Md Multiplicand word Mr Multiplier word R Result word Md Mr R 1 R Signed binary Signed binary Signed binary L 421 Md Mr R Md 1st multiplicand word Mr 1st multiplier word R 1st result word Md 1 Mr 1 R 1 R R 3 R 2 Md Mr Signed binary Signed binary Signed binary U 422 Md Mr R Md Multiplicand word Mr Multiplier word R Result word R 1 Md Mr Unsigned binary Unsigned binary Unsigned...

Page 483: ...tants Instruction Mnemonic Variations Symbol Operand Function L 431 Dd Dr R Dd 1st dividend word Dr 1st divisor word R 1st result word Dd 1 Dr 1 R 1 R R 3 R 2 Dd Dr Remainder Quotient Signed binary Signed binary Signed binary Dd Dividend word Dr Divisor word R Result word U 432 Dd Dr R R 1 R Dd Dr Remainder Unsigned binary Unsigned binary Unsigned binary Quotient UL 433 Dd Dr R Dd 1st dividend wor...

Page 484: ...d of binary data to a word of BCD data DOUBLE BINARY TO DOUBLE BCD BCDL Converts 8 digit hexadecimal 32 bit binary data to 8 digit BCD data 2 S COMPLE MENT NEG Calculates the 2 s complement of a word of hexadecimal data BIN 023 S R S Source word R Result word BCD BIN R BINL 058 S R S 1st source word R 1st result word BCD BIN BCD BIN R R 1 BCD 024 S R S Source word R Result word BCD BIN R BCDL 059 ...

Page 485: ...17 R 30 R 31 R R 1 C C Two 16 word ranges are used when l specifies 2 bytes 8 to 256 bit decoding Bit m of R to R 15 is turned ON n 1 Start with first byte 8 to 256 bit conversion l 1 Convert 2 bytes n 2 Start with second digit 4 to 16 bit decoding Bit m of R is turned ON l 1 Convert 2 digits 4 to 16 bit conversion C 0 8 11 12 15 l n 0 3 4 7 Conversion process 0 4 to 16 bits digit to word Always 0...

Page 486: ...ftmost bit m is writ ten to R n 2 Start with digit 2 256 to 8 bit conversion l 0 Convert one 16 word range 256 to 8 bit decoding The location of the leftmost bit in the 16 word range m is written to R n 1 Start with byte 1 C 0 8 11 12 15 l n 0 3 4 7 Conversion process 0 16 to 4 bits word to digit Bit to encode 0 Leftmost bit highest bit address 1 Rightmost bit lowest bit address Number of digits b...

Page 487: ...destination word Di Right 0 Left 1 First digit to convert Number of digits n 1 Specifies the first digit in S to be converted 0 to 3 Number of digits to be converted 0 to 3 0 1 digit 1 2 digits 2 3 digits 3 4 digits First byte of D to be used 0 Rightmost byte 1 Leftmost byte Parity 0 None 1 Even 2 Odd Digit number 3 2 1 0 HEX 162 S Di D S 1st source word Di Digit designator D Destination word C 00...

Page 488: ...ing bits in single words of word data and or constants DOUBLE EXCLUSIVE OR XORL Takes the logical exclusive OR of corresponding bits in double words of word data and or constants I1 I2 R ANDW 034 I1 Input 1 I2 Input 2 R Result word I1 I2 R I1 1 1 0 0 I2 1 0 1 0 R 1 0 0 0 ANDL 610 I1 I2 R I1 Input 1 I2 Input 2 R Result word I1 I1 1 I2 I2 1 R R 1 I1 I1 1 1 1 0 0 I2 I2 1 1 0 1 0 R R 1 1 0 0 0 I1 I2 R...

Page 489: ...Converts a 32 bit floating point value to 16 bit signed binary data and places the result in the specified result word FLOATING TO 32 BIT FIXL Converts a 32 bit floating point value to 32 bit signed binary data and places the result in the specified result words 16 BIT TO FLOATING FLT Converts a 16 bit signed binary value to 32 bit floating point data and places the result in the specified result ...

Page 490: ...Function S R FLTL 453 S 1st source word R 1st result word R 1 R S S 1 Signed binary data 32 bits Floating point data 32 bits F 454 Au Ad R Au 1st augend word AD 1st addend word R 1st result word R 1 R Au Ad Ad 1 Au 1 Augend floating point data 32 bits Addend floating point data 32 bits Result floating point data 32 bits F 455 Mi Su R Mi 1st Minuend word Su 1st Subtrahend word R 1st result word R 1...

Page 491: ... text string ASCII representation of sin gle precision floating point data decimal point or exponential for mat to 32 bit single precision floating point data and outputs the result to the destination words Instruction Mnemonic Variations Symbol Operand Function S1 S1 S2 S1 S2 S1 Comparison data 1 S2 Comparison data 2 S2 Using LD Using AND Using OR Symbol option Symbol option Symbol option F S1 S2...

Page 492: ... Number of words R1 1st word in range N R1 Byte position is swapped MAX 182 C R1 D C First control word R1 First word in range D Destination word R1 W 1 C W Max W words PC memory address value MIN 183 C R1 D C First control word R1 First word in range D Destination word R1 W 1 R1 C W W words Min value PC memory address C First control word R1 First word in range D First destination word FCS 180 C ...

Page 493: ...t word 15 8 0 7 C 5 0 3 1 4 C C 1 C 2 C 3 C 4 0 15 C 6 8 11 12 13 14 15 0 0 0 0 3 4 7 2 Set value SV Proportional band P Integral constant Tik Derivative constant Tdk Sampling period τ Forward reverse designation PID constant update timing designation Manipulated variable output setting Output range Integral and derivative unit Input range Manipulated variable output limit control 2 PID parameter ...

Page 494: ...istor Output Unit SCALING SCL Converts unsigned binary data into unsigned BCD data according to the specified linear function P1 First Parameter Word Instruction Mnemonic Variations Symbol Operand Function TPO 685 S C R S Input word C 1st parameter word R Pulse output bit C 8 15 12 11 0 3 4 7 Manipulated variable range Input type Input read timing Output limit function C 1 C 2 C 3 C 4 C 5 C 6 0 15...

Page 495: ... 2 must be in the same area Instruction Mnemonic Variations Symbol Operand Function SCL2 486 S P1 R S Source word P1 1st parameter word R Result word ΔY ΔX ΔY ΔX ΔY ΔX ΔY ΔX P1 P1 1 P1 2 R signed BCD Offset R signed BCD Offset R signed BCD Offset of 0000 Offset Signed BCD Signed binary Signed binary Offset 0000 hex S signed binary S signed binary S signed binary Positive Offset Negative Offset P1 ...

Page 496: ...1 R S Source word P1 1st parameter word R Result word ΔX ΔY ΔX ΔY ΔX ΔY S signed BCD Offset S signed BCD Negative Offset Offset S signed BCD Offset of 0000 Positive Offset R signed binary R signed binary Max conversion Max conver sion Min conver sion Min conversion R signed binary Max conver sion Min conversion P1 P1 1 P1 2 P1 3 P1 4 15 0 15 0 15 0 15 0 15 0 ΔX ΔY Offset of linear function 8000 to...

Page 497: ...executes that program SUBROUTINE ENTRY SBN Indicates the beginning of the subroutine program with the speci fied subroutine number SUBROUTINE RETURN RET Indicates the end of a subroutine program Instruction Mnemonic Variations Symbol Operand Function S N R AVG 195 S Source word N Number of cycles R Result word R N 1 R R 1 R 2 R 3 S Source word N Number of cycles Average N values Average Valid Flag...

Page 498: ...upts DISABLE INTERRUPTS DI Disables execution of all interrupt tasks ENABLE INTERRUPTS EI Enables execution of all interrupt tasks that were disabled with DI 693 MSKS 690 N C N Interrupt number C Control data Set scheduled interrupt time interval Mask 1 or unmask 0 interrupt inputs 2 to 9 IN8 and IN9 can only be used in CP2E N20 30 40 60D Time interval Scheduled interrupt I O interrupt CLI 691 N C...

Page 499: ...lues in NV and NV 1 are ignored when C is not 0002 hex INI 880 P C NV P Port specifier C Control data NV First word with new PV INI instruction executed Pulse output PV New origin Present origin 0000 0002 D100 D100 D101 INI 15 0 0 0 0 0 0 0 0 0 Execution condition C1 Port specifier example for pulse output 0 C2 Control data example for changing PV S First word with new PV 0000 hex Pulse output 0 0...

Page 500: ...ounter 1 0012 hex High speed counter 2 0013 hex High speed counter 3 0014 hex High speed counter 4 0015 hex High speed counter 5 1000 hex PWM 891 output 0 0000 hex Reads the PV 0001 hex Reads status 0002 hex Reads range comparison results 00 3 hex P 0000 or 0001 Reads the output fre quency of pulse output 0 or pulse output 1 C 0003 hex P 0010 Reads the frequency of high speed counter input 0 C 001...

Page 501: ...t value Present value matches set target value Time Interrupt task Ladder diagram Interrupt occurs Cyclic tasks ladder programs I O refresh 0000 hex High speed counter 0 0001 hex High speed counter 1 0002 hex High speed counter 2 0003 hex High speed counter 3 0004 hex High speed counter 4 0005 hex High speed counter 5 0000 hex Registers a target value comparison table and starts comparison 0001 he...

Page 502: ...number 0000 0000 to FFFF FFFF hex See note 0000 0000 to FFFF FFFF hex See note 0000 0000 to FFFF FFFF hex See note 0000 0000 to FFFF FFFF hex See note Interrupt task number 0000 to 000F hex Interrupt task number 0 to 15 AAAA hex Do not execute interrupt task FFFF hex Ignore the settings for this range Lower word of range 1 lower limit Upper word of range 1 lower limit Lower word of range 1 upper l...

Page 503: ...d in CP2E N30 40 60D T Pulse type N Number of pulses Instruction Mnemonic Variations Symbol Operand Function PULS 886 P T N P Port specifier T Pulse type N Number of pulses 0000 hex Pulse output 0 0001 hex Pulse output 1 0002 hex Pulse output 2 0003 hex Pulse output 3 0000 hex Relative 0001 hex Absolute N N 1 0 15 Lower word with number of pulses Upper word with number of pulses Relative pulse out...

Page 504: ... 11 12 15 M Relative absolute specifier 0 hex Relative pulses 1 hex Absolute pulses Direction 0 hex CW 1 hex CCW Pulse output method 1 hex Pulse direction Always 0 hex S1 4 S1 5 S1 2 S1 3 S1 0 15 S1 1 1 to 100 000 Hz 0000 0000 to 0001 86A0 hex Specify the frequency after acceleration deceleration in Hz 1 to 65535 Hz 0001 to FFFF Specify the increase or decrease in the frequency per pulse control p...

Page 505: ...settings table ACC 888 P M S Target frequency Pulse output started Pulse output stopped Acceleration and deceleration rate 0000 hex Pulse output 0 0001 hex Pulse output 1 0002 hex Pulse output 2 0003 hex Pulse output 3 0 3 4 7 8 11 12 15 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 S 1 S 2 S 0 15 Lower word ...

Page 506: ...p Indicated by the Origin Input Signal Time Example for reversal mode 1 and method 0 described later Origin search Origin return Origin Search Function Enable Disable Origin Search Operating Mode Origin Search Operation Setting Origin Detection Method Origin Search Direction Setting Origin Search Return Initial Speed Origin Search High Speed Origin Search Proximity Speed Origin Compensation Origin...

Page 507: ...o 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 Instruction Mnemonic Variations Symbol Operand Function P Port specifier F Frequency D Duty factor PWM 891 P F D Duty factor 50 100 50 15 Duty factor 15 Built in output PWM output Peri...

Page 508: ...rate Input interrupt occurs Speed control Position control Execution of IFEED 892 Number of output pulses Deceleration rate 0000 hex Pulse output 0 0001 hex Pulse output 2 0002 hex Pulse output 3 0003 hex Pulse output 4 C 15 12 11 8 7 4 3 0 0 hex 0 hex Direction 0 hex CW 1 hex CCW Pulse output method 1 hex Pulse direction outputs S S 1 S 2 S 3 S 4 S 5 Acceleration Rate Deceleration Rate Lower word...

Page 509: ... 0 Only can be used in CP2E N30 40 60D C2 15 12 11 8 7 4 3 0 Always 0 hex Relative absolute specifier pulses1 hex Absolute pulses Pulse output method See note 1 1 hex Pulse direction Specify axis See note 2 3 4 5 0 hex 2 axes interpolation 1 hex 3 axes interpolation 2 hex 4 axes interpolation S1 6 S1 7 S1 8 S1 9 S1 10 S1 11 S1 12 S1 13 Target position0 L Target position0 H Target position1 L Targe...

Page 510: ...s Symbol Operand Function I O REFRESH IORF Refreshes the specified I O words 7 SEGMENT DECODER SDEC Converts the hexadecimal contents of the designated digit s into 8 bit 7 segment display code and places it into the upper or lower 8 bits of the specified destination words Di Digit designator STEP 008 B B Bit STEP 008 SNXT 009 B B Bit IORF 097 St E St Starting word E End word St E I O refreshing I...

Page 511: ...and con nect the digital switch s control signals CS and RD signals to the Output Unit as shown in the following diagram C1 Number of Digits Specifies the number of digits that will be read from the exter nal digital switch Set C1 to 0000 hex to read 4 digits or 0001 hex to read 8 digits C2 System Word Specifies a work word used by the instruction This word can not be used in any other application...

Page 512: ... the output word allocated to the Output Unit and con nect the 8 selection signals to the Output Unit as shown in the following diagram C System Word Specifies a work word used by the instruction This word can not be used in any other application Instruction Mnemonic Variations Symbol Operand Function MTR 213 I O D C I Data input word O Output word D 1st destination word C System word 0 1 2 3 4 5 ...

Page 513: ...ed by the instruction This word can not be used in any other application Instruction Mnemonic Variations Symbol Operand Function 7SEG 214 S O C D S 1st source word O Output word C Control data D System word 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 O D0 D1 D2 D3 LE3 LE2 LE1 LE0 4 digit data output Latch outputs One Round Flag 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 O D0 D1 D2 D3 LE3 LE2 LE1 LE0 D0 D1 D2...

Page 514: ...l word N Number of bytes 0000 to 0100 hex 0 to 256 decimal 15 8 0 11 3 7 4 12 C Byte order 0 Most significant bytes first 1 Least significant bytes first RS and ER signal control 0 No RS and ER signal control 1 RS signal control 2 ER signal control 3 RS and ER signal control Always 0 Serial port specifier 1 Built in RS 232C port Serial option port 1 2 Built in RS485 port Serial option port 2 3 Ser...

Page 515: ...VER COMMAND CMND Sends an FINS command and receives the response S First source word local node D First destination word remote node C First control word SEND 090 S D C Local node Destination node Number of words to trans mission S First source word remote node D First destination word local node C First control word RECV 098 S D C Local node Source node remote node Number of words to receive S Fi...

Page 516: ...he specified source words C 1st calendar word T 1st time word R 1st result word CADD 730 C T R C 1 C 15 8 7 0 15 8 7 0 15 8 7 0 C 2 T 1 T R 1 R R 2 Hours Minutes Seconds Minutes Seconds Day Hour Year Month Minutes Seconds Day Hour Year Month C 1st calendar word T 1st time word R 1st result word CSUB 731 C T R 15 8 7 0 15 8 7 0 15 8 7 0 Hours Minutes Minutes Seconds Seconds Day Hour Year Month Minu...

Page 517: ...SET CARRY STC Sets the Carry Flag CY CLEAR CARRY CLC Turns OFF the Carry Flag CY EXTEND MAXIMUM CYCLE TIME WDT Extends the maximum cycle time but only for the cycle in which this instruction is executed N S FAL 006 N FAL number S 1st message word or error code to generate FAL Error Flag ON Corresponding Executed FAL Number Flag ON Error code written to A400 Error code and time written to Error Log...

Page 518: ...Timer This word contains the system timer used after the power is turned ON A value of 0000 hex is set when the power is turned ON and this value is automatically incremented by 1 every 100 ms The value returns to 0000 hex after reaching FFFF hex 6 553 500 ms and then continues to be automatically incremented by 1 every 100 ms Note The timer will continue to be incremented when the operating mode ...

Page 519: ...le Error Flag ON when the IP router table is abnormal ON Error OFF Normal Cleared 05 DNS Server Error Flag ON when DNS server meets the following conditions The IP address of the server is invalid Time out occurs in server communi cation ON Error OFF Normal Cleared 06 Routing Table Error Flag ON when the routing table setting is abnormal ON Error OFF Normal Cleared 11 SNTP Server Error Flag ON whe...

Page 520: ...low Retained Cleared Written after transmission A51 00 to 07 Serial Port 1 EX Polled Unit Communications Flags The corresponding bit will be ON when the Serial Port 1 EX is communicating with Serial PLC Link mode Bits 0 to 7 correspond to Units 0 to 7 ON Communicating OFF Not communicating Retained Cleared Refreshed when there is a normal response to the token 00 to 15 Serial Port 1 EX Reception C...

Page 521: ... ON Outputting pulses OFF Stopped Cleared Refreshed when pulse output starts or stops 05 Pulse Output 2 No origin Flag ON when the origin has not been determined for pulse output 2 and goes OFF when the origin has been determined ON Origin not established OFF Origin established ON ON Refreshed each cycle during the overseeing processes 06 Pulse Output 2 At origin Flag ON when the pulse output 2 PV...

Page 522: ...leared Refreshed when pulse output starts or stops 05 Pulse Output 3 No origin Flag ON when the origin has not been determined for pulse output 3 and goes OFF when the origin has been determined ON Origin not established OFF Origin established ON ON Refreshed each cycle during the overseeing processes 06 Pulse Output 3 At origin Flag ON when the pulse output 3 PV matches the origin 0 ON Stopped at...

Page 523: ...e Error contents Address of Aux Area word with details or 0000 hex if there is no related word Seconds 00 to 59 BCD Minutes 00 to 59 BCD Hours 00 to 23 BCD Day of month 01 to 31 BCD Month 01 to 12 BCD Year 00 to 99 BCD Retained Retained Refreshed when error occurs A500 14 A300 A400 A200 11 First Cycle Flag ON for one cycle after PLC operation begins after the mode is switched from PROGRAM to RUN o...

Page 524: ...n Each bit 00 to 07 corresponds to communication port 0 to 7 If the flag is 1 ON please identify the cause of error refer to the network communication response code A203 to A210 ON First cycle after communications error only OFF Other status Cleared Refreshed when commu nications fin ished A216 to A217 Network Communications Completion Code Storage Address The communication response code is stored...

Page 525: ...ange Cleared Cleared Refreshed each cycle during the overseeing processes Refreshed when PRV instruction is executed to read the results of range com parison Refreshed when range comparison table is reg istered 01 High speed Counter 0 Range 2 Comparison Condition Met Flag 02 High speed Counter 0 Range 3 Comparison Condition Met Flag 03 High speed Counter 0 Range 4 Comparison Condition Met Flag 04 ...

Page 526: ...09 High speed Counter 1 Overflow Underflow Flag This flag indicates when an overflow or underflow has occurred in the high speed counter 1 PV Used with the linear mode counting range only ON Overflow or underflow OFF Normal Cleared Cleared Refreshed when an overflow or underflow occurs Refreshed when PV is changed 10 High speed Counter 1 Count Direction This flag indicates whether the high speed c...

Page 527: ...0 ON Outputting pulses OFF Stopped Cleared Refreshed when pulse output starts or stops 05 Pulse Output 0 No origin Flag ON when the origin has not been determined for pulse output 0 and goes OFF when the origin has been determined ON Origin not established OFF Origin established ON ON Refreshed each cycle during the overseeing processes 06 Pulse Output 0 At origin Flag ON when the pulse output 0 P...

Page 528: ...the origin has not been determined for pulse output 1 and goes OFF when the origin has been determined ON Origin not established OFF Origin established ON ON Refreshed each cycle during the overseeing processes 06 Pulse Output 1 At origin Flag ON when the pulse output 1 PV matches the origin 0 ON Stopped at origin OFF Not stopped at origin Cleared Refreshed each cycle during the overseeing process...

Page 529: ...tion will stop and the ERR ALM indicator will light when this flag goes ON Note The task number where the error occurred will be stored in A294 and the program address will be stored in A298 and A299 ON Not BCD OFF Normal Cleared Cleared When program error occurs A294 A298 A299 PLC Setup Operatio n when instruction error has occurred 10 Illegal Access Error Flag This flag and the Access Error Flag...

Page 530: ...gram except the function block This word contains the data other than FFFF hex when the stop position is in the function block FFFF hex Stop in the program Except FFFF hex Stop in the function block Retained Cleared When program error occurs A295 A297 A298 A298 Program Address Where Program Stopped Lower digits These words contain the program address of the instruction where program execution was ...

Page 531: ...rds are mounted CPU Unit operation will continue and the ERR ALM indicator will flash Note OFF when the error has been cleared ON Error OFF Normal Cleared Cleared Refreshed when a non fatal error occurs A402 00 A424 15 Backup Memory Error Flag ON when writing to the built in Flash Memory fails CPU Unit operation will continue and the ERR ALM indicator will flash Note OFF when the error has been cl...

Page 532: ...low or underflow occurs Refreshed when PV is changed 10 High speed Counter 2 Count Direction This flag indicates whether the high speed counter 2 is currently being incremented or decremented The counter PV for the current cycle is compared with the PV in last cycle to determine the direction ON Incrementing OFF Decrementing Cleared Setting used for high speed counter valid during counter operatio...

Page 533: ...ounter 5 A325 contains the upper 4 digits and A324 contains the lower 4 digits Cleared Cleared Refreshed each cycle during the overseeing processes Refreshed when PRV instruction is executed to read PV Refreshed when INI instruction is executed A326 00 High speed Counter 4 Range 1 Comparison Condition Met Flag These flags indicate whether the PV is within the specified ranges when high speed count...

Page 534: ...ondition Met Flag 03 High speed Counter 5 Range 4 Comparison Condition Met Flag 04 High speed Counter 5 Range 5 Comparison Condition Met Flag 05 High speed Counter 5 Range 6 Comparison Condition Met Flag 08 High speed Counter 5 Comparison In progress Flag This flag indicates whether a comparison operation is being executed for high speed counter 5 ON Being executed OFF Stopped Cleared Refreshed wh...

Page 535: ...o A354 07 Day of the week 00 to 06 BCD 00 Sunday 01 Monday 02 Tuesday 03 Wednesday 04 Thursday 05 Friday 06 Saturday Note In an E type CPU Unit or when time alignment cannot be executed with an N S type CPU Unit the data will be for 1 01 01 on Sunday January 1 2001 Retained Retained Written every cycle A360 to A391 01 to 15 Executed FAL Number Flags The flag corresponding to the specified FAL numb...

Page 536: ...S 485 Port Communications Error Flag CP2E N30 40 60 or S type CPU Unit only ON when a communications error has occurred at the serial port 2 or built in RS 485 port Not valid in NT Link mode ON Error OFF No error Retained Cleared Refreshed when error occurs 13 Serial Port 2 Built in RS 485 Port Send Ready Flag No protocol Mode CP2E N30 40 60 or S type CPU Unit only ON when the serial port 2 or bui...

Page 537: ... Clock Stop Flag ON if Clock stop working Cleared when Clock set ON Clock stops OFF Clock is running Retained Cleared Refreshed when power is ON A400 Error code When a non fatal error user defined FALS or system error or a fatal error user defined FALS or system error occurs the 4 digit hexadecimal error code is written to this word Note When two or more errors occur simultaneously the highest err...

Page 538: ...and the ERR ALM indicator on the front of the CPU Unit will light ON Error OFF Normal Cleared Cleared Refreshed when error occurs A407 14 I O Bus Error Flag fatal error ON in the following cases When an error occurs in a data transfer between the CPU Unit and an Expansion Unit or Expansion I O Unit If this happens 0A0A hex will be output to A404 CPU Unit operation will stop and the ERR ALM indicat...

Page 539: ... The bit in A360 to A391 that corresponds to the FAL number specified in FALS will be turned ON and the corresponding error code will be written to A400 Error codes 4101 to 42FF correspond to FAL numbers 001 to 2FF 0 to 511 Note This flag will be turned OFF when the error is cleared ON FAL error occurred OFF FAL not executed Cleared Cleared Refreshed when error occurs A360 to A391 A400 A403 00 to ...

Page 540: ...00 to 0006 hex Retained Cleared Retained when error occurs A438 Pulse Output 2 Stop Error Code If a Pulse Output Stop Error occurs for pulse output 2 the error code is written to this word Retained Cleared Retained when error occurs A439 Pulse Output 3 Stop Error Code If a Pulse Output Stop Error occurs for pulse output 3 the error code is written to this word Retained Cleared Retained when error ...

Page 541: ...rd Retained Cleared Refreshed when origin search starts Refreshed when a pulse output stop error occurs A445 Pulse Output 1 Stop Error Code If a Pulse Output Stop Error occurs for pulse output 1 the error code is written to this word Retained Cleared Refreshed when origin search starts Refreshed when a pulse output stop error occurs Address Name Function Settings Status after mode change Status at...

Page 542: ...the Error Log Pointer is reset OFF to ON Clear Retained Cleared A100 to A199 A300 15 Output OFF Bit Turn this bit ON to turn OFF all outputs from the CPU Unit CP series Expan sion Units and CP series Expansion I O Units The INH indicator on the front of the CPU Unit will light while this bit is ON ON All output OFF OFF Normal opera tion Retained Retained A508 09 Differentiate Monitor Completed Fla...

Page 543: ...s been interrupted since the power was first turned ON The data is stored in binary To reset this value overwrite the current value with 0000 0000 to FFFF hex Retained Retained Refreshed when power is turned ON A515 to A517 Operation Start Time The time that operation started as a result of changing the operating mode to RUN or MONITOR mode is stored here in BCD A515 00 to A515 07 Seconds 00 to 59...

Page 544: ... Polling Unit Bit 05 ON for timeout error Serial PLC Link Polled Unit Bit 02 ON for parity error Bit 03 ON for framing error Bit 04 ON for overrun error These bits can be cleared by the CX Programmer Bits 00 and 01 Not used Bit 02 ON for parity error Bit 03 ON for fram ing error Bit 04 ON for over run error Bit 05 ON for time out error Bits 06 and 07 Not used Retained Cleared Refreshed when commu ...

Page 545: ...framing error Bit 12 ON for overrun error These bits can be cleared by the CX Programmer Bits 08 and 09 Not used Bit 10 ON for parity error Bit 11 ON for fram ing error Bit 12 ON for over run error Bit 13 ON for time out error Bits 14 and 15 Not used Retained Cleared Refreshed when commu nication error occurs A529 FAL FALS Number for System Error Simula tion Set a dummy FAL FALS number to use to s...

Page 546: ...s flag Retained Cleared 09 Pulse Output 1 CCW Limit Input Signal Flag This is the CCW limit input signal for pulse output 1 which is used in the 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 Retained Cleared 10 Pulse Output 1 Positioning Completed Signal This is the positioning completed input ...

Page 547: ... from the actual sensor as an input condition in the ladder programand output the result to this flag Retained Cleared 10 Pulse Output 3 Positioning Completed Signal This is the positioning completed input signal used in the origin search for pulse output 3 The input signal from the servo driver is output to this bit from the ladder program to enable using the signal Retained Cleared A566 02 Socke...

Page 548: ...essing OFF Close completed Cleared Refreshed at the start or completion of close process 13 Data Received Present Not Present Flag for Socket No 1 Flag keeps ON when data is received from the other node on an open TCP socket Flag turns OFF when the reception request is executed ON Data reception completed OFF Waiting for reception Cleared Refreshed after recep tion Refreshed when reception process...

Page 549: ...lag turns OFF ON During close processing OFF Close completed Cleared Refreshed at the start or completion of close process 13 Data Received Present Not Present Flag for Socket No 2 Flag keeps ON when data is received from the other node on an open TCP socket Flag turns OFF when the reception request is executed ON Data reception completed OFF Waiting for reception Cleared Refreshed after recep tio...

Page 550: ...Code other than normal end is stored OFF Normal end Cleared Refreshed when socket request process is completed 15 TCP UDP Open Flag for Socket No 3 When open processing of socket No 3 is completed the flag turns ON When closing process is completed or while closing the flag turns OFF When open processing ends abnormally the flag remains OFF ON Close com pleted OFF Open completed Cleared Refreshed ...

Page 551: ...g automatically turns OFF OFF to ON UDP open Cleared 01 TCP Passive Open Request Switch for Socket No 3 When the flag changes from OFF to ON TCP passive open processing is executed When open process is completed the flag automatically turns OFF OFF to ON TCP passive open Cleared 02 TCP Active Open Request Switch for Socket No 3 When the flag changes from OFF to ON TCP active open processing is exe...

Page 552: ... when power is turned ON 02 Stop bit 0 2 bits 1 1 bit Retained See Function column Refreshed when power is turned ON 03 Data length 0 7 bits 1 8 bits Retained See Function column Refreshed when power is turned ON 04 Start bit 0 1 bit fixed Retained See Function column Refreshed when power is turned ON 08 to 11 Communication speed 0 hex Default 9600 3 hex 1200 4 hex 2400 5 hex 4800 6 hex 9600 7 hex...

Page 553: ...5200 Retained See Function column Refreshed when power is turned ON 12 to 15 Communication mode 0 hex Default Host 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 D hex Modbus RTU Slave Retained See Function column Refreshed when power is turned ON A618 00 Serial Port 2 Built in RS 485 Port Communicatio...

Page 554: ...ter function Note This bit will be turned OFF auto matically by the system when communications have been com pleted Turned ON Execu tion started ON Execution in progress OFF Not executed or execution completed Retained Cleared DM Area words for serial port 1 EX Mod bus RTU Easy Master D1400 to D1499 01 Serial Port 1 EX Modbus RTU Easy Master Normal End Flag CP2E N type CPU Unit only ON when one co...

Page 555: ...asy master function Note This bit will be turned OFF auto matically by the system when communications have been com pleted Turned ON Execu tion started ON Execution in progress OFF Not executed or execution completed Retained Cleared DM Area words for serial port 2 or built in RS 485 port Mod bus RTU Easy Master D1300 to D1399 01 Serial Port 2 Built in RS 485 Port Modbus RTU Master Execution Norma...

Page 556: ...A510 to A511 A729 00 to A729 07 Seconds 00 to 59 A729 08 to A729 15 Minutes 00 to 59 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 See at left Retained Retained Written when power is turned ON A732 to A734 Power ON Clock Data 5 These words contain the time at which the power was turned ON five times befo...

Page 557: ... 01 to 12 A743 08 to A743 15 Year 00 to 99 See at left Retained Retained Written when power is turned ON A744 to A746 Power ON Clock Data 9 These words contain the time at which the power was turned ON nine times before the startup time stored in words A510 to A511 A744 00 to A744 07 Seconds 00 to 59 A744 08 to A744 15 Minutes 00 to 59 A745 00 to A745 07 Hour 00 to 23 A745 08 to A745 15 Day of mon...

Page 558: ...5 DM Backup Save Start Bit Saving the specified words from the DM Area in RAM to the built in Flash Memory is started when this bit is turned ON This bit will not turn OFF automatically even when saving the data has been completed If this bit is turned ON and OFF while the DM Backup Save Flag A751 14 is ON it will be ignored and the data will not be backed up again Note Select the Restore D0 from ...

Page 559: ... 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 z Maximum I O Response Time The I O response time is longest when data is retrieved immediately after I O refresh period of the CPU Unit The maximum I O response time is calculated as follows A 3 1 I O Response Time Minimum I O response time Input ON delay Cycle time Outp...

Page 560: ...fects of chattering and noise Decreasing the input constants fasters the input response time and allows reception of shorter input pulses but the pulse width must be longer than the cycle time z PLC Setup Note The input constants of CP1W 40EDR EDT EDT1 are always 16ms regardless of the settings Input Constant Setting Name Description Setting Default Input Constant Settings Input Constants 00 hex 8...

Page 561: ... 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 The interrupt response time of input interrupt tasks is calculated as fol...

Page 562: ...cautions for Correct Use The scheduled task will not be executed while the CPU Unit suspends operation for online editing The response times for CPU Units connected via a Serial PLC Link polling unit to polled unit or polled unit to polling unit can be calculated as shown below Note A PT cannot be used in the Serial PLC Link A 3 3 Serial PLC Link Response Performance Maximum I O response time not ...

Page 563: ... 250Hz 1 control cycle will be equal to the time of pulse output Example The change response time of 100Hz pulse output is above 1 control cycle 10ms and below 2 control cycles 20ms A 3 4 Pulse Output Start Time Pulse output instruction Start time SPED continuous Minimum 500µs Wait time SPED independent ACC continuous ACC independent trapezoidal ACC independent triangular PLS2 trapezoidal PLS2 tri...

Page 564: ...s interruped for longer than 10 ms 2ms for DC power supply a momentary power interruption will be detected or undetected If the momentary power interruption is detected the CPU Unit will be stopped and outputs will be turned OFF z Automatic Recovery Operation is automatically restarted when the power supply voltage is restored Overview of Operation for Power Interruptions 10ms 10 ms min 2ms min fo...

Page 565: ...d 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 oc...

Page 566: ...al to CP2E Power OFF detection time AC 10 ms min DC 2 ms min Power OFF detected Cyclic task or interrupt task If the external power supply input turns OFF before the power interruption is detected the CPU Unit will read the input as being OFF CP2E COM 0 00 0 01 L1 L2 Emergency stop input 100 VAC External power supply input 0 00 0 01 Emergency stop input Emergency stop release input External power ...

Page 567: ...BLE SIGNED BINARY ADD WITHOUT CARRY L 401 DOUBLE SIGNED BINARY SUBTRACT WITHOUT CARRY L 411 The PLC memory addresses all are continuous and the user must be aware of the order and bound aries of the memory areas As reference the PLC memory addresses are provided in a table at the end of this appendix Note Directly setting PLC memory addresses in the program should be avoided whenever possible If P...

Page 568: ... Auxiliary Area 01980 to 01B7F A448 to A959 Read Write Auxiliary Area 01B80 to 01CA1 CIO 0 to 289 CIO Area 01CA2 to 01CBF Reserved for system 01CC0 to 01D3F H0 to H127 Holding Area 01D40 to 022BF Reserved for system 022C0 to 0233F W0 to W127 Work Area 02340 to 0253F T000 to T511 Timer PVs 02540 to 0273F C000 to C511 Counter PVs E type CPU Unit 02740 to 0373F S type CPU Unit 02740 to 0473F N type C...

Page 569: ...IT 1 Completed and FIN sent 00000007 CLOSING Completed and exchanged FIN Awaiting ACK 00000008 LAST ACK FIN sent and completed Awaiting ACK 00000009 FIN WAIT 2 Completed and ACK received Awaiting FIN 0000000A TIME WAIT After closing pauses twice the maximum segment life 2MSL rcv FIN snd ACK CLOSE rcv ACK of FIN rcv ACK of SYN CLOSED LISTEN SYN RECEIVED SYN SENT ESTABLISHED CLOSING CLOSED WAIT CLOS...

Page 570: ...ddress is not referred to for 20 minutes it is removed from the table An incomplete ARP table entry no response yet returned to the ARP request is removed from the table after 5 seconds Window size 2 144 bytes The initial value of the maximum capacity used to control the conver gence of TCP sockets Actually the node negotiates with the remote node and uses the smaller of the values for the two nod...

Page 571: ... Circular Ring mode high speed counter 11 11 clock automatic adjustment 15 6 15 54 Clock function 16 7 Clock Pulses 5 4 5 27 Close Request Switch 15 41 Closing Flag 15 40 CMND 490 instruction 15 17 commands FINS commands 15 27 Communications settings 7 5 7 9 7 13 Condition Flags 5 4 5 25 Connecting the Servo Drive and external sensors 12 8 Constants 4 23 CONTROLLER DATA READ 15 25 Conversion field...

Page 572: ...ost Link 14 6 14 39 Host Link command 14 6 14 39 Host name field 15 57 I I O allocation 6 2 CPU Unit 6 3 Expansion I O Unit 6 4 Expansion Unit 6 6 I O allocations DM Area 15 42 I O memory 3 3 5 2 addresses A 107 I O memory Areas 5 6 Initializing method 3 7 I O refresh 3 2 I O refresh timing 4 22 I O response time A 99 Immediate refresh 4 22 Increment pulse input 11 8 Index Registers 4 26 index reg...

Page 573: ...eater Than or Equals Flag 5 26 P_GT Greater Than Flag 5 25 P_LE Less than or Equals Flag 5 26 P_LT Less Than Flag 5 26 P_N Negative Flag 5 26 P_NE Not Equal Flag 5 26 P_OF Overflow Flag 5 26 P_Off Always OFF Flag 5 25 P_On Always ON Flag 5 25 P_UF Underflow Flag 5 26 Peripheral servicing 3 2 Phase Z signal software reset 11 11 PID temperature control 16 2 PIDAT instruction 16 3 PING 15 15 echo tes...

Page 574: ...cation 14 37 PLC Setup 14 28 Related Auxiliary Area 14 34 Server specification type field 15 57 servers specifying 15 54 Setup Tab 15 19 SNTP server 15 54 socket services 15 36 15 38 Parameter Areas 15 43 Socket Service Request Switches 15 40 TCP IP 15 6 UDP IP 15 6 sockets status 15 39 TCP sockets status 15 42 A 109 Software reset 11 12 Specifying addresses 4 18 Specifying offsets for addresses 4...

Page 575: ...ser s Manual W614 Revision History A manual revision code appears as a suffix to the catalog number on the front cover of the manual Revision code Date Revised content 01 September 2019 Original production Cat No W614 E1 01 Revision code ...

Page 576: ...Revision 2 CP2E CPU Unit Software User s Manual W614 ...

Page 577: ......

Page 578: ... 60169 U S A Tel 1 847 843 7900 Fax 1 847 843 7787 Regional Headquarters OMRON EUROPE B V Wegalaan 67 69 2132 JD Hoofddorp The Netherlands Tel 31 2356 81 300 Fax 31 2356 81 388 Contact www ia omron com Kyoto JAPAN OMRON ASIA PACIFIC PTE LTD No 438A Alexandra Road 05 05 08 Lobby 2 Alexandra Technopark Singapore 119967 Tel 65 6835 3011 Fax 65 6835 2711 OMRON CHINA CO LTD Room 2211 Bank of China Towe...

Reviews: