Omron C200HS- Manuals
Omron C200HS– User Manual, Manual in PDF format online.
Manuals:
User Manual Omron C200HS
Summary
C200HS Programmable Controllers Operation Manual Revised February 2002
! ! ! ii Notice: OMRON products are manufactured for use according to proper procedures by a qualified operatorand only for the purposes described in this manual. The following conventions are used to indicate and classify precautions in this manual. Always heedthe information provided with them. Fa...
iii About this Manual: This manual describes the operation of the C200HS C-series Programmable Controllers, and it includesthe sections described below. Installation information is provided in the C200HS Programmable Control- ler Installation Guide. A table of other manuals that can be used in conju...
v TABLE OF CONTENTS PRECAUTIONS xiii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Intended Audience xiv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 General Precautions xiv . . . . . . . . . . ....
Table of contents vi 3-4-10 I/O Verification Error Flag 43 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-11 First Cycle Flag 43 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-12 Clock Pulse Bits 43 . . . . . . . . . . . . . . . . . . ....
Table of contents vii 4-5-1 The Keyboard 78 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5-2 PC Modes 80 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5-3 The Display Message Switch 80 . . . . . . . . . . . ...
Table of contents viii 5-15 Data Shifting 150 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15-1 SHIFT REGISTER – SFT(10) 150 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15-2 REVERSIBLE SHIFT REGISTER – SFTR(84) 152 . ...
Table of contents ix 5-19-11 BCD DIVIDE – DIV(33) 212 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-19-12 DOUBLE BCD DIVIDE – DIVL(57) 213 . . . . . . . . . . . . . . . . . . . . . . . . . 5-19-13 FLOATING POINT DIVIDE – FDIV(79) 214 . . . . . . . . . . . . . . . . . . . . ...
Table of contents x 5-28 Advanced I/O Instructions 301 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-28-1 7-SEGMENT DISPLAY OUTPUT – 7SEG(––) 301 . . . . . . . . . . . . . . . . . 5-28-2 DIGITAL SWITCH INPUT – DSW(––) 304 . . . . . . . . . . . . . . . . . . . ...
Table of contents xi SECTION 10 – Troubleshooting 391 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1 Alarm Indicators 392 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2 Programmed Alarms and Error Messages 392 . . . ...
Table of contents xii Appendix 433 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A – Standard Models 433 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B – Programming Instructions ...
xiii PRECAUTIONS This section provides general precautions for using the Programmable Controller (PC) and related devices. The information contained in this section is important for the safe and reliable application of the PC. You must readthis section and understand the information contained before...
! ! ! xiv 1 Intended Audience This manual is intended for the following personnel, who must also have knowl-edge of electrical systems (an electrical engineer or the equivalent). • Personnel in charge of installing FA systems. • Personnel in charge of designing FA systems. • Personnel in charge of m...
! ! ! ! xv Caution The operating environment of the PC System can have a large effect on the lon-gevity and reliability of the system. Improper operating environments can lead tomalfunction, failure, and other unforeseeable problems with the PC System. Besure that the operating environment is within...
xvi 6 Conformance to EC Directives Observe the following precautions when installing the C200HS-CPU01-EC andC200HS-CPU21-EC that conform to the EC Directives. Provide reinforced insulation or double insulation for the DC power source con-nected to the DC I/O Unit and for the Power Supply Unit.Use a ...
2 1-1 Overview A PC (Programmable Controller) is basically a CPU (Central Processing Unit)containing a program and connected to input and output (I/O) devices. The pro-gram controls the PC so that when an input signal from an input device turns ON,the appropriate response is made. The response norma...
3 1-3 PC Terminology Although also provided in the Glossary at the back of this manual, the following terms are crucial to understanding PC operation and are thus explained here. PC Because the C200HS is a Rack PC, there is no one product that is a C200HSPC. That is why we talk about the configurati...
4 High-density I/O Units are designed to provide high-density I/O capability andinclude Group 2 High-density I/O Units and Special I/O High-density I/O Units. Special I/O Units are dedicated Units that are designed to meet specific needs.These include some of the High-density I/O Units, Position Con...
5 Input/Output Requirements The first thing that must be assessed is the number of input and output pointsthat the controlled system will require. This is done by identifying each devicethat is to send an input signal to the PC or which is to receive an output signalfrom the PC. Keep in mind that th...
7 1-8-1 Improved Memory Capabilities Internal Memory (UM) The C200HS CPUs come equipped with 16 KW of RAM in the PC itself, so a verylarge memory capacity is available without purchasing a separate Memory Unit.Furthermore, the Ladder Program Area has been increased to 15.2 KW. Memory Cassettes Two t...
8 I/O Refreshing Time The I/O refreshing time has been reduced for all units, as shown in the followingtable. I/O Unit Time Required for Refreshing Standard I/O Units ! @ 3 of the C200H I/O refreshing time Group-2 High-density I/O Units ! @ 3 of the C200H I/O refreshing time Special I/O Units $ @ 5 ...
9 TRSM(45) TRACE MEMORY SAMPLEMCRO(99) MACROMAX(--) FIND MAXIMUM MIN(--) FIND MINIMUM SUM(--) SUM SRCH(--) DATA SEARCH FPD(--) FAILURE POINT DETECTION PID(--) PID CONTROL HEX(--) ASCII TO HEX XDMR(--) EXPANSION DM READ DSW(--) DIGITAL SWITCH INPUT TKY(--) TEN-KEY INPUT MTR(--) MATRIX INPUT HKY(--) 1...
10 1-8-7 Built-in RS-232C Connector Host link communications are possible using the RS-232C connector built intothe C200HS-CPU21-E/CPU23-E/CPU31-E/CPU33-E CPU. By using the TXDand RXD instructions, RS-232C communications is possible without using time-consuming procedures. A 1-to-1 link using the LR...
11 I/O Comments Stored in PC By allocating a part of UM as the I/O Comment area, it is no longer necessary toread I/O Comments from a Peripheral Device’s floppy disk. If the Peripheral De-vice is connected to the C200HS online, the ladder diagram can be viewed withI/O comments. Online Editing A “CYC...
12 7. Transfer the program and and any other require data to the C200HS. You will probably want to transfer DM data and the I/O table, if you have createdan I/O table for the C200H. 8. Turn the C200HS off and then back on to reset it. 9. Test program execution before attempting actual operation. Usi...
! 16 2-1 CPU Components There are two groups of CPUs available, one that uses an AC power supply, andone that uses a DC power supply. Select one of the models shown below accord-ing to requirements of your control system. CPU model Power supply voltage C200HS-CPU01-E/CPU21-E/CPU31-E 100 to 120 VAC o...
17 C200HS-CPU21-E/CPU23-E/CPU31-E/CPU33-E Memory Casette compartment Bus connector: Available only with the CPU31-Eand CPU33-E. Use this connectorwhen SYSMAC NET Link Unit orSYSMAC LINK Unit is used. RS-232Cconnector Cable connector forperipheral devices Battery/Switch compartment Power fuse (MF51NR...
18 2-1-2 Peripheral Device Connection A Programming Console or IBM PC/AT running LSS can be used to programand monitor the C200HS PCs. Programming Console A C200H-PR027-E or CQM1-PRO01-E Programming Console can be con-nected as shown in the following diagram. The C200H-PR027-E is connectedvia the C2...
19 Expansion I/O Racks An Expansion I/O Rack can be thought of as an extension of the PC because itprovides additional slots to which other Units can be mounted. It is built onto anExpansion I/O Backplane to which a Power Supply and up to ten other Units aremounted. An Expansion I/O Rack is always c...
20 C200HS Function C200HS CPU01-E CPU21-E CPU31-E CPU03-E CPU23-E CPU33-E Built-in clock/calendar Yes Error log Yes 1 Data Trace Yes Differential Monitor Yes Expansion DM 3K words max. 2 General-use DM 6K words Ladder Program capacity 15.2K words max 2 SR Area SR 236 to SR 255 and SR 256 to SR 299 N...
! 21 C200HS-MP j 16K (EPROM) The program is written using a PROM Writer. The ROM is mounted to theMemory Casette and then installed in the CPU. I/O data cannot be stored. Notch 2-5 Installing Memory Cassettes An optional Memory Cassette can be installed in the C200HS. (The C200HMemory Unit cannot be...
22 3. Remove the bracket from the Memory Cassette, as shown in the illustration below. Metal bracket 4. Check that the connector side goes in first and that the Cassette’s circuit components face right and then insert the Cassette into the CPU. The Cas-sette slides in along a track in the CPU. 5. Re...
23 2-6 CPU DIP Switch The DIP switch on C200HS CPUs is located between the Memory Cassettecompartment and battery. The 6 pins on the DIP switch control 6 of the CPU’s operating parameters. Pin no. Item Setting Function 1 Memory protect ON Program Memory and read-only DM (DM 6144 to DM 6655)data cann...
26 3-1 Introduction Details, including the name, size, and range of each area are summarized in thefollowing table. Data and memory areas are normally referred to by their acro-nyms, e.g., the IR Area, the SR Area, etc. Area Size Range Comments I/O Area 480 bits IR 000 to IR 029 I/O words are alloca...
27 Work Bits and Words When some bits and words in certain data areas are not being used for their in-tended purpose, they can be used in programming as required to control otherbits. Words and bits available for use in this fashion are called work words andwork bits. Most, but not all, unused bits ...
28 The same TC number can be used to designate either the present value (PV) ofthe timer or counter, or a bit that functions as the Completion Flag for the timer orcounter. This is explained in more detail in 3-8 TC Area. Area Word designation Bit designation IR 000 00015 (leftmost bit in word 000) ...
29 Decimal Points Decimal points are used in timers only. The least significant digit representstenths of a second. All arithmetic instructions operate on integers only. Signed and Unsigned Binary Data This section explains signed and unsigned binary data formats. Many instruc-tions can use either s...
31 3-3 IR (Internal Relay) Area The IR area is used both as data to control I/O points, and as work bits to manipu-late and store data internally. It is accessible both by bit and by word. In theC200HS PC, the IR area is comprised of words 000 to 235 and 298 to 511. Words in the IR area that are use...
32 Up to ten Special I/O Units may be mounted in any slot of the CPU Rack or Ex-pansion I/O Racks. Up to five Slave Racks may be used, whether one or twoMasters are used. IR area words are allocated to Special I/O Units and SlaveRacks by the unit number on the Unit, as shown in the following tables....
33 Group-2 High-density I/O Units and B7A Interface Units are allocated words be-tween IR 030 and IR 049 according to I/O number settings made on them and donot use the words allocated to the slots in which they are mounted. For 32-pointUnits, each Unit is allocated two words; for 64-point Units, ea...
37 Word(s) Function Bit(s) 273 00 Save IOM to Cassette Bit Data transferred to Memory Cassette when Bit is turnedON in PROGRAM mode. Bit will automatically turn OFF. 01 Load IOM from Cassette Bit ON in PROGRAM mode. Bit will automatically turn OFF.An error will be produced if turned ON in any otherm...
39 SYSMAC NET Operating l l 0 Operating l l 1 Bit (Node numbers below) p g level 0 p g level 1 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 SR 238 SR 242 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1 SR 239 SR 243 16 15 14 13 12 11 10 9 16 15 14 13 12 11 10 9 SR 240 SR 244 24 23 22 21 20 19 18 17 24 23 22 21 2...
40 Host Link Systems Both Error flags and Restart bits are provided for Host Link Systems. Error flagsturn ON to indicate errors in Host Link Units. Restart bits are turned ON and thenOFF to restart a Host Link Unit. SR bits used with Host Link Systems are summa-rized in the following table. Rack-mo...
41 Flag type Bit no. SR 247 SR 248 SR 249 SR 250 Run flags 00 Unit #8,level 1 Unit #0,level 1 Unit #8,level 0 Unit #0,level 0 01 Unit #9,level 1 Unit #1,level 1 Unit #9,level 0 Unit #1,level 0 02 Unit #10,level 1 Unit #2,level 1 Unit #10,level 0 Unit #2,level 0 03 Unit #11,level 1 Unit #3,level 1 Un...
42 The status of SR 25211 and thus the status of force-set and force-reset bits canbe maintained when power is turned off and on by enabling the Forced StatusHold Bit in the PC Setup. If the Forced Status Hold Bit is enabled, the status ofSR 25211 will be preserved when power is turned off and on. I...
43 This bit can be programmed to activate an external warning for a low battery volt-age. The operation of the battery alarm can be disabled in the PC Setup if desired.Refer to 3-6-4 PC Setup for details. 3-4-9 Cycle Time Error Flag SR bit 25309 turns ON if the cycle time exceeds 100 ms. The ALM/ERR...
! 44 3-4-13 Step Flag SR bit 25407 turns ON for one cycle when step execution is started with theSTEP(08) instruction. 3-4-14 Group-2 Error Flag SR bit 25414 turns ON for any of the following errors for Group-2 High-densityI/O Units and B7A Interface Units: the same I/O number set twice, the samewor...
45 Overflow Flag, OF SR bit 25404 turns ON when the result of a binary addition or subtraction ex-ceeds 7FFF or 7FFFFFFF. Underflow Flag, UF SR bit 25405 turns ON when the result of a signed binary addition or subtractionexceeds 8000 or 80000000. Carry Flag, CY SR bit 25504 turns ON when there is a ...
46 3-4-20 Peripheral Port Communications Areas Peripheral Port Error Code SR bits 26408 to 26411 are set when there is a peripheral port error in the Gener-al I/O Mode. Setting Error type 0 No error 1 Parity error 2 Framing error 3 Overrun error F Connected in Peripheral Mode SR bit 26412 turns ON w...
48 Save IOM to Cassette Bit SR bit 27300 turns ON when IOM is saved to a Memory Cassette. Load IOM from Cassette Bit SR bit 27301 turns ON when loading to IOM from a Memory Cassette. 3-4-26 Transfer Error Flags Data will not be transferred from IOM to the Memory Cassette if an error occurs(except fo...
51 number, 0 through 31, and a letter, L or H. Bits are allocated as shown in the fol-lowing table. Bits AR03 allocation AR04 allocation AR05 allocation AR06 allocation 00 0 L 8 L 16 L 24 L 01 0 H 8 H 16 H 24 H 02 1 L 9 L 17 L 25 L 03 1 H 9 H 17 H 25 H 04 2 L 10 L 18 L 26 L 05 2 H 10 H 18 H 26 H 06 ...
53 30-second Compensation Bit AR 2113 is turned ON to round the seconds of the Calendar/clock Area to zero, i.e., if the seconds is 29 or less, it is merely set to 00; if the seconds is 30 or great-er, the minutes is incremented by 1 and the seconds is set to 00. Clock Stop Bit AR 2114 is turned OFF...
54 3-5-11 Power OFF Counter AR 23 provides in 4-digit BCD the number of times that the PC power has beenturned off. This counter can be reset as necessary using the PV Change 1 op-eration from the Programming Console. (Refer to 7-1-4 Hexadecimal/BCD Data Modification for details.) The Power OFF Coun...
55 3-6 DM (Data Memory) Area The DM area is divided into various parts as described in the following table. Aportion of UM (up to 3,000 words in 1,000-word increments) can be allocated asExpansion DM. Addresses User read/write Usage DM 0000 to DM 0999 Read/Write Normal DM. DM 1000 to DM 1999 Special...
57 whether DM 1000 to DM 1999 or DM 7000 to 7999 will be used. Refer to 3-6-4 PC Setup for details. Unit Addresses 0 DM 1000 to DM 1099 or DM 7000 to DM 7099 1 DM 1100 to DM 1199 or DM 7100 to DM 7199 2 DM 1200 to DM 1299 or DM 7200 to DM 7299 3 DM 1300 to DM 1399 or DM 7300 to DM 7399 4 DM 1400 to ...
58 The following table lists the possible error codes and corresponding errors. Error severity Error code Error Fatal errors 00 Power Interruption 01 to 99 System error (FALS) 9F Cycle time error C0 to C2 I/O bus error E0 Input-output I/O table error E1 Too many Units F0 No END(01) instruction F1 Me...
60 3-7 HR (Holding Relay) Area The HR area is used to store/manipulate various kinds of data and can be ac-cessed either by word or by bit. Word addresses range from HR 00 through HR99; bit addresses, from HR 0000 through HR 9915. HR bits can be used in anyorder required and can be programmed as oft...
61 3-9 LR (Link Relay) Area The LR area is used as a common data area to transfer information betweenPCs. This data transfer is achieved through a PC Link System. Certain words will be allocated as the write words of each PC. These words arewritten by the PC and automatically transferred to the same...
64 4-1 Basic Procedure There are several basic steps involved in writing a program. Sheets that can becopied to aid in programming are provided in Appendix F Word Assignment Re- cording Sheets and Appendix G Program Coding Sheet. 1, 2, 3... 1. Obtain a list of all I/O devices and the I/O points that...
65 4-3 Program Capacity The maximum user program size varies with the amount of UM allocated to ex-pansion DM and the I/O Comment Area. Approximately 10.1 KW are availablefor the ladder program when 3 KW are allocated to expansion DM and 2 KW areallocated to I/O comments as shown below. Refer to the...
66 4-4-1 Basic Terms Each condition in a ladder diagram is either ON or OFF depending on the statusof the operand bit that has been assigned to it. A normally open condition is ON ifthe operand bit is ON; OFF if the operand bit is OFF. A normally closed conditionis ON if the operand bit is OFF; OFF ...
68 LOAD and LOAD NOT The first condition that starts any logic block within a ladder diagram corre-sponds to a LOAD or LOAD NOT instruction. Each of these instruction requiresone line of mnemonic code. “Instruction” is used as a dummy instruction in thefollowing examples and could be any of the righ...
69 OR and OR NOT When two or more conditions lie on separate instruction lines which run in paral-lel and then join together, the first condition corresponds to a LOAD or LOADNOT instruction; the other conditions correspond to OR or OR NOT instructions.The following example shows three conditions wh...
71 Now you have all of the instructions required to write simple input-output pro-grams. Before we finish with ladder diagram basic and go onto inputting the pro-gram into the PC, let’s look at logic block instruction (AND LOAD and OR LOAD),which are sometimes necessary even with simple diagrams. 4-...
72 Analyzing the above ladder diagram in terms of mnemonic instructions, the con-dition for IR 00000 is a LOAD instruction and the condition below it is an OR in-struction between the status of IR 00000 and that of IR 00001. The condition atIR 00002 is another LOAD instruction and the condition belo...
74 The following diagram contains only two logic blocks as shown. It is not neces-sary to further separate block b components, because it can be coded directlyusing only AND and OR. 00000 00001 00002 00003 00201 00501 00004 Block a Block b Address Instruction Operands 00000 LD 00000 00001 AND NOT 00...
78 4-4-7 Coding Multiple Right-hand Instructions If there is more than one right-hand instruction executed with the same execu-tion condition, they are coded consecutively following the last condition on theinstruction line. In the following example, the last instruction line contains onemore condit...
! ! 80 4-5-2 PC Modes The Programming Console is equipped with a switch to control the PC mode. Toselect one of the three operating modes—RUN, MONITOR, or PROGRAM—use the mode switch. The mode that you select will determine PC operation aswell as the procedures that are possible from the Programming...
81 4. Confirm that the CPU’s POWER LED is lit and the following display appears on the Programming Console screen. (If the ALM/ERR LED is lit or flashingor an error message is displayed, clear the error that has occurred.) <PROGRAM>PASSWORD! 5. Enter the password. See 4-6-1 Entering the Passwo...
82 4-6-3 Clearing Memory Using the Memory Clear operation it is possible to clear all or part of the UM area(RAM or EEPROM), and the IR, HR, AR, DM and TC areas. Unless otherwisespecified, the clear operation will clear all of the above memory areas. The UMarea will not be cleared if the write-prote...
83 The following procedure is used to clear memory completely. Continue pressingthe CLR key once foreach error messageuntil “00000” appearson the display All clear MEMORY ERR I/O VER ERR 00000 00000MEMORY CLR? HR CNT DM 00000MEM ALLCLR? 00000 00000MEM ALLCLREND Partial Clear It is possible to retain...
84 To leave the TC area uncleared and retain Program Memory addresses 00000through 00122, input as follows: 00000 00000 00000 00000MEMORY CLR? HR CNT DM 00000MEMORY CLR? HR DM 00123MEMORY CLR? HR DM 00000MEMORY CLR END HR DM Memory Clear The memory clear operation clears all memory areas except the ...
85 It is necessary to register the I/O table if I/O Units are changed, otherwise an I/Overification error message, “I/O VER ERR” or “I/O SET ERROR”, will appearwhen starting programming operations. I/O Table Registration can be performed only in PROGRAM mode with the write-protection switch (pin 1 o...
86 4-6-6 Verifying the I/O Table The I/O Table Verification operation is used to check the I/O table registered inmemory to see if it matches the actual sequence of I/O Units mounted. The firstinconsistency discovered will be displayed as shown below. Every subsequentpressing of VER displays the nex...
88 Meaning of Displays I/O Unit Designations for Displays(see I/O Units Mounted in Remote Slave Racks, page 89) No. of points 16 32 64 Input Unit Output Unit C500, 1000H/C2000H I/O Units No. of points 8 16 Input Unit Output Unit 0 0 0 0 0 0 * * 0 * * * I * * * I I * * I I I I i(*)* * i i * * o o * *...
89 I/O word number I/O type: I, O i, o (see tables on previous page) Unit number (0 to 9) Remote I/O Slave Unit number (0 to 4) Remote I/O Master Unit number (0 or 1) Indicates a Remote I/O Rack 00000IOTBL READR**-*U=**** *** Unit number (0 to 9) Indicates Group-2 HIgh-density I/O Unit 00000IOTBL RE...
90 Key Sequence 00000 00000FUN (??) 00000IOTBL ?-?U= 00000IOTBL CANC ???? 00000IOTBL CANC 9713 00000IOTBL CANCOK 00000IOTBL WRIT ???? 4-6-9 SYSMAC NET Link Table Transfer (CPU31/33-E Only) The SYSMAC NET Link Table Transfer operation transfers a copy of the SYS-MAC NET Link Data Link table to RAM or...
92 4-7 Inputting, Modifying, and Checking the Program Once a program is written in mnemonic code, it can be input directly into the PCfrom a Programming Console. Mnemonic code is keyed into Program Memoryaddresses from the Programming Console. Checking the program involves asyntax check to see that ...
93 If the following mnemonic code has already been input into Program Memory,the key inputs below would produce the displays shown. 00000 00200 00200READ OFFLD 00000 00201READ ONAND 00001 00202READ OFFTIM 000 00202TIM #0123 00203READ ONLD 00100 Address Instruction Operands 00200 LD 00000 00201 AND 0...
96 Error Messages The following error messages may appear when inputting a program. Correctthe error as indicated and continue with the input operation. The asterisks in thedisplays shown below will be replaced with numeric data, normally an address,in the actual display. Message Cause and correctio...
98 Example The following example shows some of the displays that can appear as a result ofa program check. Display #2 Display #3 Halts program check Check continues until END(01) When errors are found Display #1 00699CHK ABORTD 02000PROG CHKEND (01)(02.7KW) 00178CIRCUIT ERROUT 00200 00200IL-ILC ERRI...
100 00000 00000LD 00000 00200SRCHLD 00000 00202LD 00000 02000SRCHEND (01)(02.7KW) 00000 00100 00100TIM 001 00203SRCHTIM 001 00203 TIM DATA #0123 00000 00000CONT SRCHCONT 00005 00200CONT SRCHLD 00005 00203CONT SRCHAND 00005 02000END (01)(02.7K) 4-7-6 Inserting and Deleting Instructions In PROGRAM mod...
! 101 To delete an instruction, display the instruction word of the instruction to be de-leted and then press DEL and the up key. All the words for the designated in-struction will be deleted. Caution Be careful not to inadvertently delete instructions; there is no way to recover them without reinpu...
102 Find the addressprior to the inser-tion point Insert theinstruction Program After Insertion Inserting an Instruction 00000 00000OUT 00000 00000OUT 00201 00207SRCHOUT 00201 00206READAND NOT 00104 00206AND 00000 00206AND 00105 00206INSERT?AND 00105 00207INSERT ENDAND NOT 00104 00206READAND 00105 A...
103 4-7-7 Branching Instruction Lines When an instruction line branches into two or more lines, it is sometimes neces-sary to use either interlocks or TR bits to maintain the execution condition thatexisted at a branching point. This is because instruction lines are executedacross to a right-hand in...
104 The previous diagram B can be written as shown below to ensure correct execu-tion. In mnemonic code, the execution condition is stored at the branching pointusing the TR bit as the operand of the OUTPUT instruction. This execution con-dition is then restored after executing the right-hand instru...
105 When drawing a ladder diagram, be careful not to use TR bits unless necessary.Often the number of instructions required for a program can be reduced andease of understanding a program increased by redrawing a diagram that wouldotherwise required TR bits. In both of the following pairs of diagram...
107 If IR 00000 in the above diagram is OFF (i.e., if the execution condition for thefirst INTERLOCK instruction is OFF), instructions 1 through 4 would be ex-ecuted with OFF execution conditions and execution would move to the instruc-tion following the INTERLOCK CLEAR instruction. If IR 00000 is O...
108 The other type of jump is created with a jump number of 00. As many jumps asdesired can be created using jump number 00 and JUMP instructions using 00can be used consecutively without a JUMP END using 00 between them. It iseven possible for all JUMP 00 instructions to move program execution to t...
109 4-8-1 DIFFERENTIATE UP and DIFFERENTIATE DOWN DIFFERENTIATE UP and DIFFERENTIATE DOWN instructions are used toturn the operand bit ON for one cycle at a time. The DIFFERENTIATE UP in-struction turns ON the operand bit for one cycle after the execution condition forit goes from OFF to ON; the DIF...
110 To create a self-maintaining bit, the operand bit of an OUTPUT instruction isused as a condition for the same OUTPUT instruction in an OR setup so that theoperand bit of the OUTPUT instruction will remain ON or OFF until changes oc-cur in other bits. At least one other condition is used just bef...
111 Work bits can be used to simplify programming when a certain combination ofconditions is repeatedly used in combination with other conditions. In the follow-ing example, IR 00000, IR 00001, IR 00002, and IR 00003 are combined in alogic block that stores the resulting execution condition as the s...
112 This action is easily programmed by using IR 22500 as a work bit as the operandof the DIFFERENTIATE UP instruction (DIFU(13)). When IR 00000 turns ON, IR22500 will be turned ON for one cycle and then be turned OFF the next cycle byDIFU(13). Assuming the other conditions controlling IR 00100 are ...
113 Except for instructions for which conditions are not allowed (e.g., INTERLOCKCLEAR and JUMP END, see below), every instruction line must also have atleast one condition on it to determine the execution condition for the instructionat the right. Again, diagram A , below, must be drawn as diagram ...
114 4-11 Program Execution When program execution is started, the CPU cycles the program from top to bot-tom, checking all conditions and executing all instructions accordingly as itmoves down the bus bar. It is important that instructions be placed in the properorder so that, for example, the desir...
118 5-1 Notation In the remainder of this manual, all instructions will be referred to by their mne-monics. For example, the Output instruction will be called OUT; the AND Loadinstruction, AND LD. If you’re not sure of the instruction a mnemonic is used for,refer to Appendix B Programming Instructio...
! 119 Caution The IR and SR areas are considered as separate data areas. If an operand has access to onearea, it doesn’t necessarily mean that the same operand will have access to the other area. Theborder between the IR and SR areas can, however, be crossed for a single operand, i.e., the lastbit i...
! 120 A non-differentiated instruction is executed each time it is cycled as long as itsexecution condition is ON. A differentiated instruction is executed only once af-ter its execution condition goes from OFF to ON. If the execution condition hasnot changed or has changed from ON to OFF since the ...
122 5-6 Coding Right-hand Instructions Writing mnemonic code for ladder instructions is described in Section 4 Writing and Inputting the Program. Converting the information in the ladder diagramsymbol for all other instructions follows the same pattern, as described below,and is not specified for ea...
124 Multiple Instruction Lines If a right-hand instruction requires multiple instruction lines (such as KEEP(11)),all of the lines for the instruction are entered before the right-hand instruction.Each of the lines for the instruction is coded, starting with LD or LD NOT, to form‘logic blocks’ that ...
Instruction Set Lists Section 5-7 125 5-7 Instruction Set Lists This section provides tables of the instructions available in the C200HS. The firsttable can be used to find instructions by function code. The second table can beused to find instruction by mnemonic. In both tables, the @ symbol indica...
129 5-8 Ladder Diagram Instructions Ladder Diagram instructions include Ladder instructions and Logic Blockinstructions and correspond to the conditions on the ladder diagram. Logic blockinstructions are used to relate more complex parts. 5-8-1 LOAD, LOAD NOT, AND, AND NOT, OR, and OR NOT B: Bit IR,...
130 5-8-2 AND LOAD and OR LOAD Ladder Symbol AND LOAD – AND LD 00002 00003 00000 00001 Ladder Symbol OR LOAD – OR LD 00000 00001 00002 00003 Description When instructions are combined into blocks that cannot be logically combinedusing only OR and AND operations, AND LD and OR LD are used. WhereasAND...
132 Precautions DIFU(13) and DIFD(14) operation can be uncertain when the instructions areprogrammed between IL and ILC, between JMP and JME, or in subroutines. Re-fer to 5-10 INTERLOCK and INTERLOCK CLEAR – IL(02) and ILC(03), 5-11 JUMP and JUMP END – JMP(04) and JME(05), and 5-23 Subroutines and I...
134 Description KEEP(11) is used to maintain the status of the designated bit based on two exe-cution conditions. These execution conditions are labeled S and R. S is the setinput; R, the reset input. KEEP(11) operates like a latching relay that is set by Sand reset by R. When S turns ON, the design...
135 Example If a HR bit or an AR bit is used, bit status will be retained even during a powerinterruption. KEEP(11) can thus be used to program bits that will maintain statusafter restarting the PC following a power interruption. An example of this that canbe used to produce a warning display follow...
137 Example The following diagram shows IL(02) being used twice with one ILC(03). 00000 00001 ILC(03) IL(02) 00004 00005 00003 00002 IL(02) 00502 TIM 511 CP R CNT 001 IR 010 00100 001.5 s TIM 511 #0015 Address Instruction Operands 00000 LD 00000 00001 IL(02) 00002 LD 00001 00003 TIM 511 # 0015 00004...
138 If the jump number for JMP(04) is 00, the CPU will look for the next JME(05) witha jump number of 00. To do so, it must search through the program, causing alonger cycle time (when the execution condition is OFF) than for other jumps.The status of timers, counters, bits used in OUT, bits used in...
139 Any one TC number cannot be defined twice, i.e., once it has been used as thedefiner in any of the timer or counter instructions, it cannot be used again. Oncedefined, TC numbers can be used as many times as required as operands ininstructions other than timer and counter instructions. TC number...
140 If the execution condition remains ON long enough for TIM to time down to zero,the Completion Flag for the TC number used will turn ON and will remain ONuntil TIM is reset (i.e., until its execution condition is goes OFF). The following figure illustrates the relationship between the execution c...
142 The length of time that a bit is kept ON or OFF can be controlled by combiningTIM with OUT or OUT NO. The following diagram demonstrates how this is pos-sible. In this example, 00204 would remain ON for 1.5 seconds after 00000 goesON regardless of the time 00000 stays ON. This is achieved by usi...
150 5-15 Data Shifting All of the instructions described in this section are used to shift data, but in differ-ing amounts and directions. The first shift instruction, SFT(10), shifts an execu-tion condition into a shift register; the rest of the instructions shift data that is al-ready in memory. 5...
153 Description SFTR(84) is used to create a single- or multiple-word shift register that can shiftdata to either the right or the left. To create a single-word register, designate thesame word for St and E. The control word provides the shift direction, the statusto be put into the register, the sh...
156 5-15-7 ONE DIGIT SHIFT LEFT – SLD(74) Ladder Symbols Operand Data Areas SLD(74) St E @SLD(74) St E St: Starting word IR, SR, AR, DM, HR, LR E: End word IR, SR, AR, DM, HR, LR Limitations St and E must be in the same data area, and St must be less than or equal to E. Description When the executio...
158 Description When the execution condition is OFF, ASFT(17) does nothing and the programmoves to the next instruction. When the execution condition is ON, ASFT(17) isused to create and control a reversible asynchronous word shift register be-tween St and E. This register only shifts words when the...
160 5-16-3 BLOCK SET – BSET(71) S: Source data IR, SR, AR, DM, HR, TC, LR, # St: Starting word IR, SR, AR, DM, HR, TC, LR Ladder Symbols Operand Data Areas E: End Word IR, SR, AR, DM, HR, TC, LR BSET(71) S St E @BSET(71) S St E Limitations St must be less than or equal to E, and St and E must be in ...
161 Example The following example shows how to use BSET(71) to change the PV of a timerdepending on the status of IR 00003 and IR 00004. When IR 00003 is ON, TIM010 will operate as a 50-second timer; when IR 00004 is ON, TIM 010 will oper-ate as a 30-second timer. TIM 010 #9999 @BSET(71) #0500 TIM 0...
162 Flags ER: N is not BCD between 0000 and 2000. S and S+N or D and D+N are not in the same data area. Indirectly addressed DM word is non-existent. (Content of ∗ DM word is not BCD, or the DM area boundary has been exceeded.) 5-16-5 DATA EXCHANGE – XCHG(73) E1: Exchange word 1 IR, SR, AR, DM, HR, ...
163 When the execution condition is OFF, DIST(80) is not executed. When the exe-cution condition is ON, DIST(80) operates a stack from DBs to DBs+C–9000.DBs is the stack pointer, so S is copied to the word indicated by DBs and DBs isincremented by 1. Specifies the stack length (000 to 999). A value ...
164 5-16-7 DATA COLLECT – COLL(81) SBs: Source base word IR, SR, AR, DM, HR, TC, LR C: Offset data (BCD) IR, SR, AR, DM, HR, TC, LR, # Ladder Symbols Operand Data Areas D: Destination word IR, SR, AR, DM, HR, TC, LR COLL(81) SBs C D @COLL(81) SBs C D Limitations C must be a BCD. If C ≤ 6655, SBs mus...
167 Description When the execution condition is OFF, MOVB(82) is not executed. When the exe-cution condition is ON, MOVB(82) copies the specified bit of S to the specified bitin D. The bits in S and D are specified by Bi. The rightmost two digits of Bi desig-nate the source bit; the leftmost two bit...
168 Digit Designator The following show examples of the data movements for various values of Di. 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 S Di: 0031 Di: 0023 Di: 0030 Di: 0010 S S S 0 1 2 3 D 0 1 2 3 D 0 1 2 3 D 0 1 2 3 D Flags ER: At least one of the rightmost three digits of Di is not between 0 and 3. Indi...
169 Example In the following example, XFRB(62) is used to transfer 5 bits from IR 020 toLR 21 when IR 00001 is ON. The starting bit in IR 020 is 0, and the starting bit inLR 21 is 4, so IR 02000 to IR 02004 are copied to LR 2104 to LR 2108. XFRB(62) #0540 IR 020 LR 21 00001 Address Instruction Opera...
170 Example The following example shows the comparisons made and the results providedfor MCMP(19). Here, the comparison is made during each cycle when 00000 isON. IR 100 0100 DM 0200 0100 DM 030000 0 IR 101 0200 DM 0201 0200 DM 030001 0 IR 102 0210 DM 0202 0210 DM 030002 0 IR 103 ABCD DM 0203 0400 D...
171 Flags ER: Indirectly addressed DM word is non-existent. (Content of ∗ DM word is not BCD, or the DM area boundary has been exceeded.) EQ: ON if Cp1 equals Cp2. LE: ON if Cp1 is less than Cp2. GR: ON if Cp1 is greater than Cp2. Flag Address C1 < C2 C1 = C2 C1 > C2 GR 25505 OFF OFF ON EQ 255...
174 5-17-4 BLOCK COMPARE – BCMP(68) CD: Compare data IR, SR, AR, DM, HR, TC, LR, # CB: First comparison block word IR, DM, HR, TC, LR Ladder Symbols Operand Data Areas R: Result word IR, SR, AR, DM, HR, TC, LR BCMP(68) CD CB R @BCMP(68) CD CB R Limitations Each lower limit word in the comparison blo...
175 Example The following example shows the comparisons made and the results providedfor BCMP(68). Here, the comparison is made during each cycle when 00000 isON. CD 001 Lower limits Upper limits R: HR 05 001 0210 HR 10 0000 HR 11 0100 HR 0500 0 HR 12 0101 HR 13 0200 HR 0501 0 HR 14 0201 HR 15 0300 ...
176 Example The following example shows the comparisons made and the results providedfor TCMP(85). Here, the comparison is made during each cycle when 00000 isON. CD: 001 Upper limits R: HR 05 001 0210 HR 10 0100 HR 0500 0 HR 11 0200 HR 0501 0 HR 12 0210 HR 0502 1 HR 13 0400 HR 0503 0 HR 14 0500 HR ...
180 5-18 Data Conversion The conversion instructions convert word data that is in one format into anotherformat and output the converted data to specified result word(s). Conversionsare available to convert between binary (hexadecimal) and BCD, to 7-segmentdisplay data, to ASCII, and between multipl...
185 5-18-7 4-TO-16 DECODER – MLPX(76) S: Source word IR, SR, AR, DM, HR, TC, LR C: Control word IR, SR, AR, DM, HR, TC, LR, # Ladder Symbols Operand Data Areas R: First result word IR, SR, AR, DM, HR, LR MLPX(76) S C R @MLPX(76) S C R Limitations When the leftmost digit of C is 0, the rightmost two ...
186 Some example C values and the digit-to-word conversions that they produceare shown below. 0 1 2 3 R R + 1 R R + 1 R + 2 0 1 2 3 0 1 2 3 0 1 2 3 R R + 1 R + 2 R + 3 R R + 1 R + 2 R + 3 S C: 0031 C: 0023 C: 0030 C: 0010 S S S The following is an example of a one-digit decode operation from digit n...
187 The 4 possible C values and the conversions that they produce are shown be-low. (In S, 0 indicates the rightmost byte and 1 indicates the leftmost byte.) 0 1 R to R+15 R+16 to R+31 S C: 1000 0 1 R to R+15 R+16 to R+31 S C: 1010 0 1 R to R+15 R+16 to R+31 S C: 1011 0 1 R to R+15 R+16 to R+31 S C:...
188 The following program converts three digits of data from LR 20 to bit positionsand turns ON the corresponding bits in three consecutive words starting withHR 10. 00000 MLPX(76) DM 0020 #0021 HR 10 Address Instruction Operands 00000 LD 00000 00001 MLPX(76) LR 20 # 0021 HR 10 S: LR 20 R: HR 10 R+1...
191 When 00000 is ON, the following diagram encodes IR words 010 and 011 to thefirst two digits of HR 20 and then encodes LR 10 and 11 to the last two digits ofHR 20. Although the status of each source word bit is not shown, it is assumedthat the bit with status 1 (ON) shown is the highest bit that ...
192 Any or all of the digits in S may be converted in sequence from the designatedfirst digit. The first digit, the number of digits to be converted, and the half of D toreceive the first 7-segment display code (rightmost or leftmost 8 bits) are desig-nated in Di. If multiple digits are designated, ...
196 Limitations Di must be within the values given below. All source words must be in the same data area. Bytes in the source words must contain the ASCII code equivalent of hexadeci-mal values, i.e., 30 to 39 (0 to 9), 41 to 46 (A to F), or 61 to 66 (a to f). Description When the execution conditio...
197 Some examples of Di values and the 8-bit ASCII to 4-bit hexadecimal conver-sions that they produce are shown below. 0 1 2 3 D Di: 0011 S Di: 0030 Di: 0133 Di: 0023 1 st byte 2 nd byte S 1 st byte 2 nd byte S+1 1 st byte 2 nd byte 0 1 2 3 D S 1 st byte 2 nd byte S+1 1 st byte 2 nd byte 0 1 2 3 D ...
198 Flags ER: Incorrect digit designator, or data area for destination exceeded. Indirectly addressed DM word is non-existent. (Content of ∗ DM word is not BCD, or the DM area boundary has been exceeded.) Example In the following example, the 2 nd byte of LR 10 and the 1 st byte of LR 11 are con- ve...
199 The following table shows the functions and ranges of the parameter words: Parameter Function Range Comments P1 BCD point #1 (A Y ) 0000 to 9999 --- P1+1 Hex. point #1 (A X ) 0000 to FFFF Do not set P1+1=P1+3. P1+2 BCD point #2 (B Y ) 0000 to 9999 --- P1+3 Hex. point #2 (B X ) 0000 to FFFF Do no...
200 5-18-13 COLUMN TO LINE – LINE(63) S: First word of 16 word source set IR, SR, AR, DM, HR, TC, LR C: Column bit designator (BCD) IR, SR, AR, DM, HR, TC, LR, # Ladder Symbols Operand Data Areas D: Destination word IR, SR, AR, DM, HR, TC, LR LINE(63) S C D @LINE(63) S C D Limitations S and S+15 mus...
201 5-18-14 LINE TO COLUMN – COLM(64) S: Source word IR, SR, AR, DM, HR, TC, LR C: Column bit designator (BCD) IR, SR, AR, DM, HR, TC, LR, # Ladder Symbols Operand Data Areas D: First word of the destination set IR, AR, DM, HR, TC, LR COLM(64) S D C @COLM(64) S D C Limitations D and D+15 must be in ...
204 5-19 BCD Calculations The BCD calculation instructions – INC(38), DEC(39), ADD(30), ADDL(54),SUB(31), SUBL(55), MUL(32), MULL(56), DIV(33), DIVL(57), FDIV(79), andROOT(72) – all perform arithmetic operations on BCD data. For INC(38) and DEC(39) the source and result words are the same. That is, ...
207 Flags ER: Au and/or Ad is not BCD. Indirectly addressed DM word is non-existent. (Content of ∗ DM word is not BCD, or the DM area boundary has been exceeded.) CY: ON when there is a carry in the result. EQ: ON when the result is 0. Example When 00000 is ON, the following program adds two 12-digi...
209 Note The actual SUB(31) operation involves subtracting Su and CY from 10,000 plus Mi. For positive results the leftmost digit is truncated. For negative results the10s complement is obtained. The procedure for establishing the correct answeris given below. First SubtractionIR 010 1029DM 0100 – 3...
214 Description When the execution condition is OFF, DIVL(57) is not executed. When the exe-cution condition is ON, DIVL(57) the eight-digit content of Dd and D+1 is dividedby the content of Dr and Dr+1 and the result is placed in R to R+3: the quotient inR and R+1, the remainder in R+2 and R+3. R+1...
215 To represent the floating point values, the rightmost seven digits are used for themantissa and the leftmost digit is used for the exponent, as shown below. Themantissa is expressed as a value less than one, i.e., to seven decimal places. 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 First wor...
217 5-19-14 SQUARE ROOT – ROOT(72) Sq: First source word (BCD) IR, SR, AR, DM, HR, TC, LR R: Result word IR, SR, AR, DM, HR, LR, Ladder Symbols Operand Data Areas ROOT(72) Sq R @ROOT(72) Sq R Limitations Sq and Sq+1 must be in the same data area. Description When the execution condition is OFF, ROOT...
219 5-20 Binary Calculations Binary calculation instructions — ADB(50), SBB(51), MLB(52), DVB(53),ADBL(––), SBBL(––), MBS(––), MBSL(––), DBS(––), and DBSL(––) — performarithmetic operations on hexadecimal data. Four of these instructions (ADB(50), SBB(51), ADBL(––), and SBBL(––)) canact on both norm...
221 In the case below, 25,321 +(–13,253) = 12,068 (62E9 + CC3B = 2F24). NeitherOF nor UF are turned ON. Au: LR 20 6 2 E 9 Ad: DM 0010 C C 3 B + Ad: DM 0010 2 F 2 4 Note The status of the CY flag can be ignored when adding signed binary data since it is relevant only in the addition of normal hexadec...
222 Example 1: Normal Data The following example shows a four-digit subtraction with CY used to place ei-ther #0000 or #0001 into R+1 to ensure that any carry is preserved. CLC(41) 00001 SBB(51) 001 LR20 HR 21 MOV(21) #0000 HR 22 MOV(21) #0001 HR 22 TR 1 25504 25504 = R = R+1 = R+1 Address Instructi...
226 ADBL(––) can also be used to add signed binary data. The underflow and over-flow flags (SR 25404 and SR 25405) indicate whether the result has exceededthe lower or upper limits of the 32-bit signed binary data range. Refer to page 29for details on signed binary data. Flags ER: Indirectly address...
229 In the case below, 1,799,100,099 – (–282,751,929) = 2,081,851,958(6B3C 167D – {EF25 8C47 – 1 0000 0000} = 7C16 8A36). Neither OF nor UFare turned ON. Au + 1 : 001 Au : 000 Ad + 1 : DM 0021 Ad : DM 0020 6 B 3 C 1 6 7 D E F 2 5 8 C 4 7 0 – R + 1 : LR 22 R : LR 21 8 A 3 6 7 C 1 6 0 CY (Cleared with...
230 Example In the following example, MBS(––) is used to multiply the signed binary contentsof IR 001 with the signed binary contents of DM 0020 and output the result toLR 21 and LR 22. MBS(––) 001 DM 0020 LR 21 Address Instruction Operands 00000 LD 00000 00001 MBS(––) 001 DM 0020 LR 21 00000 Md: IR...
233 Example In the following example, DBSL(––) is used to divide the signed binary contentsof IR 002 and IR 001 with the signed binary contents of DM 0021 and DM 0020and output the result to LR 24 through LR 21. DBSL(––) 001 DM 0020 LR 21 Address Instruction Operands 00000 LD 00000 00001 DBSL(––) 00...
! 235 If bit 14 of C is ON and more than one address contains the same minimum val-ue, the position of the lowest of the addresses will be output to D+1. The number of words within the range (N) is contained in the 3 rightmost digits ofC, which must be BCD between 001 and 999. When bit 15 of C is OF...
236 On the N th cycle, the previous value of S is written to last word in the range D+2 to D+N+1. The average value of the previous values stored in D+2 to D+N+1 is cal-culated and written to D, bit 15 of D+1 is turned ON, and the previous value point-er (the first 2 digits of D+1) is reset to zero....
237 Example In the following example, the content of IR 040 is set to #0000 and then increm-ented by 1 each cycle. For the first two cycles, AVG(––) moves the content ofIR 040 to DM 1002 and DM 1003. The contents of DM 1001 will also change(which can be used to confirm that the results of AVG(––) ha...
238 Description When the execution condition is OFF, SUM(––) is not executed. When the ex-ecution condition is ON, SUM(––) adds either the contents of words R 1 to R 1 +N–1 or the bytes in words R 1 to R 1 +N/2–1 and outputs that value to the desti- nation words (D and D+1). The data can be summed a...
239 Example In the following example, the BCD contents of the 8 words from DM 0000 toDM 0007 are added when IR 00001 is ON and the result is written to DM 0010and DM 0011. @SUM(––) DM 0000 #4008 00001 DM 0010 Address Instruction Operands 00000 LD 00001 00001 @SUM(––) # 4008 DM 0000 DM 0010 DM 0000 0...
240 Examples Sine Function The following example demonstrates the use of the APR(69) sine function to cal-culate the sine of 30 ° . The sine function is specified when C is #0000. Input data, x Result data S: DM 0000 D: DM 0100 0 10 1 10 0 10 –1 10 –1 10 –2 10 –3 10 –4 0 3 0 0 5 0 0 0 APR(69) #0000 ...
Y 0 X 0 X 1 X 2 X 3 X 4 X m X Y Y m Y 4 Y 3 Y 1 Y 2 241 Enter the coordinates of the m+1 end-points, which define the m line segments,as shown in the following table. Enter all coordinates in BIN form. Always enterthe coordinates from the lowest X value (X 1 ) to the highest (X m ). X 0 is 0000, and...
! 242 In this case, the input data word, IR 010, contains #0014, and f(0014) = #0726 isoutput to R, IR 011. X Y $1F20 $0F00 $0726 $0402 (0,0) $0005 $0014 $001A $05F0 (x,y) 5-21-6 PID CONTROL – PID(––) S: Input word IR, SR, AR, DM, HR, LR, C: First parameter word IR, SR, DM, HR, LR Operand Data Areas...
243 Parameter Settings Item Contents Setting range Set value (SV) This is the target value of the process beingcontrolled. Binary data (of the samenumber of bits as specified forthe input range) Proportional band This is the parameter for P control expressingthe proportional control range/total cont...
244 When overshooting is prevented with simple PID control, stabilization of distur-bances is slowed (1). If stabilization of disturbances is speeded up, on the otherhand, overshooting occurs and response toward the target value is slowed (2).With feed-forward PID control, there is no overshooting, ...
246 without hunting, integral operation to automatically correct any offset, and deriv-ative operation to speed up the response to disturbances. PID Operation Output Step Response PID Operation Output Lamp Response PID operationI operationP operation D operation Ramp response 0 0 Deviation Operation...
247 hunting will be reduced if the integral time is increased or the proportional bandis enlarged. Control by measured PID (when loose hunting occurs) Enlarge I or P. SV • If the period is short and hunting occurs, it may be that the control system re-sponse is quick and the derivative operation is ...
248 Creating the Program Follow the procedure outlined below in creating the program. 1, 2, 3... 1. Set the target value (binary 0000 to 0FFF) in DM 0000. 2. Input the PV of the temperature sensing element (binary 000 to 0FFF) in bits 0 to 11 of word 101. 3. Output the operation amount of the heater...
249 Note When using PID(––) or SCL(––), make the data settings in advance with a Pe- ripheral Device such as the Programming Console or LSS. Target value HR Proportional band Integral time/sampling period Derivative time/sampling period Sampling period Forward/reverse designation/PID parametersI/O r...
253 5-22-5 EXCLUSIVE NOR – XNRW(37) I1: Input 1 IR, SR, AR, DM, HR, TC, LR, # I2: Input 2 IR, SR, AR, DM, HR, TC, LR, # Ladder Symbols Operand Data Areas R: Result word IR, SR, AR, DM, HR, LR XNRW(37) I1 I2 R @XNRW(37) I1 I2 R Description When the execution condition is OFF, XNRW(37) is not executed...
254 INT(89) is used to control the interrupt signals received from the Interrupt InputUnit, and also to control the scheduling of the scheduled interrupt. INT(89) pro-vides such functions as masking of interrupts (so that they are recorded but ig-nored) and clearing of interrupts. Refer to 5-23-2 In...
256 The PC Setup for the C200HS contains settings in DM 6620 that disable refresh-ing in the normal cycle for specific Special I/O Units. This settings are as shownbelow. Interrupt mode(1 = high-speed) Bit 15 00 1 0 0 * * * * * * * * * * Unit #0 Unit #1 ... Unit #9 DM6620 12 Note Disabling special I...
! 259 The following diagram illustrates program execution flow for various executionconditions for two SBS(91). SBS(91) 00 SBS(91) 01 SBN(92) 00 RET(93) SBN(92) 01 RET(93) END(01) Main program Subroutines A B C D E A A A A B B B B C C C C D D E E OFF execution conditions for subroutines 00 and 01 ON...
260 All subroutines must be programmed at the end of the main program. When oneor more subroutines have been programmed, the main program will be ex-ecuted up to the first SBN(92) before returning to address 00000 for the nextcycle. Subroutines will not be executed unless called by SBS(91). END(01) ...
263 Description INT(89) is used to control interrupts and performs one of 8 functions dependingon the values of C and N. As shown in the following tables, three of the functionsact on input interrupts, three act on the scheduled interrupt, and the other twomask or unmask all interrupts. Interrupt Va...
264 Flags ER: Indirectly addressed DM word is non-existent. (Content of : DM word is not BCD, or the DM area boundary has been exceeded.) C, and/or N are not within specified values. Example 1: Input Interrupt This example shows how to unmask a particular interrupt input. Input interruptsubroutines ...
266 5-24 Step Instructions The step instructions STEP(08) and SNXT(09) are used in conjunction to set upbreakpoints between sections in a large program so that the sections can be ex-ecuted as units and reset upon completion. A section of program will usually bedefined to correspond to an actual pro...
268 Flags 25407: Step Start Flag; turns ON for one cycle when STEP(08) is executed and can be used to reset counters in steps as shown below if necessary. SNXT(09) 01000 CP R CNT 01 #0003 00000 00100 25407 STEP(08) 01000 1 cycle 25407 01000 Start Address Instruction Operands Address Instruction Oper...
275 Address Instruction Operands Address Instruction Operands 00000 LD 00001 00001 SNXT(09) LR 0000 00002 SNXT(09) LR 0002 00003 STEP(08) LR 0000 Process A 00100 LD 00002 00101 SNXT(09) LR 0001 00102 STEP(08) LR 0001 Process B 00100 LD 01101 00101 OUT LR 0003 00101 AND 00004 00101 SNXT(09) LR 0004 0...
276 FAL(06) produces a non-fatal error and FAL(07) produces a fatal error. WhenFAL(06) is executed with an ON execution condition, the ALARM/ERROR indi-cator on the front of the CPU will flash, but PC operation will continue. WhenFALS(07) is executed with an ON execution condition, the ALARM/ERROR i...
277 5-25-3 TRACE MEMORY SAMPLING – TRSM(45) Data tracing can be used to facilitate debugging programs. To set up and usedata tracing it is necessary to have a host computer running LSS; no datatracing is possible from a Programming Console. Data tracing is described indetail in the LSS Operation Man...
278 The sampled data is written to trace memory, jumping to the beginning of thememory area once the end has been reached and continuing up to the startmarker. This might mean that previously recorded data (i.e., data from this sam-ple that falls before the start marker) is overwritten (this is espe...
MSGABCDEFGHIJKLMNOP 279 In handling indirectly addressed messages (i.e. : DM), those with the lowest DM address values have higher priority. Clearing Messages To clear a message, execute FAL(06) 00 or clear it via a Programming Consoleusing the procedure in 4-6-5 Clearing Error Messages. If the mess...
280 Description LMSG(47) is used to output a 32-character message to a Programming Con-sole. The message to be output must be in ASCII beginning in word S and end-ing in S+15, unless a shorter message is desired. A shorter message can be pro-duced by placing a null character (00) into the string; no...
281 Example In the following example, TERM(48) is used to switch the Programming Consoleto TERMINAL mode when 00000 is ON. Be sure that pin 6 of the CPU’s DIPswitch is OFF. TERM(48) 000 000 000 00000 Address Instruction Operands 00000 LD 00000 00001 TERM(48) 000 000 000 5-25-7 WATCHDOG TIMER REFRESH...
282 To refresh I/O words allocated to Special I/O Units (IR 100 to IR 199), indicate theunit numbers of the Units by designating IR 040 to IR 049 (see note). IR 040 toIR 049 correspond to Special I/O Units 0 to 9. For example, set St to IR 043 and Eto IR 045 to refresh the I/O words allocated to Spe...
283 Refer to 6-1 Cycle Time for a table showing I/O refresh times for Group-2 High-density I/O Units. Flags ER: St or E is not BCD between #0000 and #0009. St is greater than E. 5-25-10 BIT COUNTER – BCNT(67) N: Number of words (BCD) IR, SR, AR, DM, HR, TC, LR, # SB: Source beginning word IR, SR, AR...
284 The function of bits in C are shown in the following diagram and explained inmore detail below. 15 14 13 12 11 00 Number of items in range (N, BCD)001 to 999 words or bytes First byte (when bit 13 is ON)1 (ON): Rightmost 0 (OFF): Leftmost Calculation units1 (ON): Bytes 0 (OFF): Words C: Not used...
285 Example When IR 00000 is ON in the following example, the frame checksum (0008) iscalculated for the 8 words from DM 0000 to DM 0007 and the ASCII equivalent(30 30 30 38) is written to DM 0011 and DM 0010. @FCS(––) DM 0000 #0008 00000 DM 0010 Address Instruction Operands 00000 LD 00000 00001 @FC...
286 When the execution condition is OFF, FPD(––) is not executed. When the exe-cution condition is ON, FPD(––) monitors the time until the logic diagnosticscondition goes ON, turning ON the diagnostic output. If this time exceeds T, thefollowing will occur: 1, 2, 3... 1. An FAL(06) error is generate...
290 Example In the following example, the 10 word range from DM 0010 to DM 0019 issearched for addresses that contain the same data as DM 0000 (#FFFF). SinceDM 0012 contains the same data, the EQ Flag (SR 25506) is turned ON and#0012 is written to DM 0001. @SRCH(––) DM 0010 #0010 00001 DM 0000 Addre...
291 Example In the following example, the 100 word range from DM 7000 through DM 7099 iscopied to DM 0010 through DM 0109 when IR 00001 is ON. @XDMR(––) #7000 #0100 00001 DM 0010 Address Instruction Operands 00000 LD 00001 00001 @XDMR(––) # 0100 # 7000 DM 0010 DM 7000 DM 9999 DM 7000 to DM 7099 DM 0...
292 The status of bit 15 of C+1 determines whether the instruction is for a SYSMACNET Link System or a SYSMAC LINK System. Control Data SYSMAC NET Link Systems The destination port number is always set to 0. Set the destination node numberto 0 to send the data to all nodes. Set the network number to...
293 Flags ER: The specified node number is greater than 126 in a SYSMAC NET LinkSystem or greater than 62 in a SYSMAC LINK System. The sent data overruns the data area boundaries. Indirectly addressed DM word is non-existent. (Content of : DM word is not BCD, or the DM area boundary has been exceede...
294 SYSMAC LINK Systems Refer to the SYSMAC LINK System Manual for details. Word Bits 00 to 07 Bits 08 to 15 C Number of words (0 to 256 in 4-digit hexadecimal, i.e., 0000 hex to 0100 hex ) C+1 Response time limit (0.1 and 25.4seconds in 2-digit hexadecimalwithout decimal point, i.e., 00 hex to FF h...
295 5-26-3 About Network Communications SEND(90) and RECV(98) are based on command/response processing. Thatis, the transmission is not complete until the sending node receives and ac-knowledges a response from the destination node. Note that theSEND(90)/RECV(98) Enable Flag is not turned ON until t...
297 Address Instruction Operands Address Instruction Operands 00000 LD 00000 00001 AND 25204 00002 AND NOT 12802 00003 LD 12801 00004 KEEP(11) 12800 00005 LD 12800 00006 @MOV(21) # 000A DM 0000 00007 @MOV(21) # 0000 DM 0001 00008 @MOV(21) # 0003 DM 00002 00009 @XFER(70) # 0010 000 DM 0002 00010 @SEN...
! 298 Note RXD(––) is required to receive data via the peripheral port or RS-232C port only. Transmission sent from a host computer to a Host Link Unit are processed auto-matically and do not need to be programmed. Caution The PC will be incapable of receiving more data once 256 bytes have been rece...
299 5-27-2 TRANSMIT – TXD(––) S: First source word IR, SR, AR, DM, HR, TC, LR C: Control word IR, SR, AR, DM, HR, TC, LR, # Ladder Symbols Operand Data Areas N: Number of bytes IR, SR, AR, DM, HR, TC, LR, # TXD(––) S C N @TXD(––) S C N Limitations S and S+(N ÷ 2)–1 must be in the same data area. N m...
300 The following diagram shows the format for host link command (TXD) sent fromthe C200HS. The C200HS automatically attaches the prefixes and suffixes,such as the node number, header, and FCS. @ X X X X X X ......... X X X ∗ CR Header code (EX) Data (122 ASCII characters max.) FCS Node number Termi...
301 5-28 Advanced I/O Instructions Advanced I/O instructions enable control, with a single instruction, of previouslycomplex operations involving external I/O devices (digital switches, 7-segmentdisplays, etc.). There are five advanced I/O instructions, as shown in the following table. All ofthese a...
302 If there are 8 digits of source data, they are placed in S and S+1, with the mostsignificant digits placed in S+1. If there are 4 digits of source data, they areplaced in S. 7SEG(––) displays the 4 or 8-digit data in 12 cycles, and then starts over andcontinues displaying the data. The 7-segment...
303 2. The 7-segment display may require either positive or negative logic, de- pending on the model. 3. The 7-segment display must have 4 data signal lines and 1 latch signal line for each digit. Using the Instruction If the first word holding the data to be displayed is specified at S, and the out...
305 Hardware With this instruction, 8-digit BCD set values are read from a digital switch.DSW(––) utilizes 5 output bits and 8 input bits. Connect the digital switch and theInput and Output Units as shown in the diagram below. Output point 5 will beturned ON when one round of data is read, but there...
306 The following example illustrates connections for an A7B Thumbwheel Switch. 1 3 5 7 9 11 13 15 COM 0 2 4 6 8 10 12 14 COM ID212 Input Unit Switch no. 8 1 3 5 7 9 11 13 15 COM 0 2 4 6 8 10 12 14 DC OD212 1 2 4 8 7 6 5 4 3 2 1 C Output Unit A7BThumbwheelSwitch Note The data read signal is not requ...
307 Using the Instruction If the input word for connecting the digital switch is specified at for word A, andthe output word is specified for word B, then operation will proceed as shownbelow when the program is executed. 00 01 02 03 04 05 Wd 0 10 0 10 1 10 2 10 3 D+1 D Four digits: 00 to 03 Eight d...
308 5-28-3 HEXADECIMAL KEY INPUT – HKY(––) OW: Control signal output word IR, SR, AR, HR, LR IW: Input word IR, SR, AR, HR, LR Ladder Symbols Operand Data Areas HKY(––) IW OW D D: First register word IR, SR, AR, DM, HR, LR Limitations D and D+2 must be in the same data area. Overview When the execut...
313 5-28-5 MATRIX INPUT – MTR(––) OW: Output word IR, SR, AR, HR, LR IW: Input word IR, SR, AR, HR, LR Ladder Symbols Operand Data Areas MTR(––) IW OW D D: First destination word IR, SR, AR, DM, HR, LR Limitations D and D+3 must be in the same data area. Overview When the execution condition is OFF,...
318 6-1 Cycle Time To aid in PC operation, the average, maximum, and minimum cycle times can bedisplayed on the Programming Console or any other Programming Device andthe maximum cycle time and current cycle time values are held in AR 26 andAR 27. Understanding the operations that occur during the c...
319 Flowchart of CPU Operation YES NO NO Power application Clears IR area andresets all timers Checks I/O Unit connections Resets watchdog timer Checks hardware andProgram Memory Check OK? Services Host Link ALARM/ERROR Sets error flags and turnsON or flashes indicator Executes user program Resets w...
321 I/O pts to refresh Time required (ms) 512 7.4 256 4.1 128 2.7 64 1.7 Unit Time required per Unit C200H-ID501/215 0.6 ms C200H-OD501/215 0.6 ms when set for 32 I/O pts. C200H-MD501/215 1.6 ms when set for dynamic I/O C200H-CT001-V1/CT002 2.6 ms C200H-NC111/NC112 2.5 ms C200H-NC211 5.0 ms C200H-AD...
! 322 Even if the cycle time does not exceed the set value of the watchdog timer, a longcycle time can adversely affect the accuracy of system operations as shown inthe following table. Cycle time (ms) Possible adverse affects 10 or greater TIMH(15) inaccurate when TC 016 through TC 511 are used.(Ac...
323 Calculations The equation for the cycle time from above is as follows: Cycle time = Overseeing time + Program execution time + I/O refresh time +Peripheral device servicing time Process Calculation With Peripheral Device Without Peripheral Device Overseeing Fixed 0.7 ms 0.7 ms Program execution ...
324 Calculations The equation for the cycle time is as follows:Cycle time = Overseeing time + Program execution time+ I/O refreshing time + Host Link Unit servicing time+ Peripheral device servicing time Process Calculation With Peripheral Device Without Peripheral Device Overseeing Fixed 0.7 ms 0.7...
334 The PC takes longest to respond when it receives the input signal just after theI/O refresh phase of the cycle. In this case the CPU does not recognize the inputsignal until the end of the next cycle. The maximum response time is thus onecycle longer than the minimum I/O response time, except th...
! 335 In looking at the following timing charts, it is important to remember the se-quence in which processing occurs during the PC scan, particular that inputs willnot produce programmed actions until the program has been executed. When calculating the response times involving inputs and outputs fr...
336 Example Calculations Calculations would be as shown below for an input ON delay of 1.5 ms, an out-put ON delay of 15 ms, and a cycle time of 20 ms. Minimum I/O Response Time Time = 1.5 ms + (20 ms x 3) + 15 ms = 76.5 ms Maximum I/O Response Time Time = 1.5 ms + (20 ms x 4) + 15 ms = 96.5 ms Note...
! 337 6-4-4 PC Link Systems The processing that determines and the methods for calculating maximum andminimum response times from input to output are provided in this subsection.The following System and I/O program steps will be used in all examples below.This System contains eight PC Link Units. In...
338 Inserting the following values into this equation produces a minimum I/O re-sponse time of 149.3 ms. Input ON delay: 1.5 ms Output ON delay: 15 ms Cycle time for PC of Unit 0: 20 ms Cycle time for PC of Unit 7: 50 ms The following diagram illustrates the data flow that will produce the maximumre...
339 Induction sequence processing: 15 ms x (8 PCs – 8 PCs) = 0 ms I/O refresh bits for Unit 0 256 I/O refresh bits for Unit 7 256 Reducing Response Time IORF(97) can be used in programming to shorten the I/O response time greaterthan is possible by setting a high number of refresh bits. (Remember, i...
341 3. Communications are completed just after the slave executes communica- tions servicing. I/O refresh Overseeing, communica-tions, etc. Input ON delay Master Inputpoint Inputbit CPUprocessing Cycle time Instructionexecution Instructionexecution Instructionexecution Instructionexecution Instructi...
342 Scheduled Interrupts Hardware time clock Scheduled interruptsubroutine execution t3 Scheduled in-terrupt interval t3 t3 t3 t3 = Software interrupt response time Total interrupt response time = t3 (software interrupt response time) The software interrupt response time depends on the interrupt res...
346 7-1 Monitoring Operation and Modifying Data The simplest form of operation monitoring is to display the address whose oper-and bit status is to be monitored using the Program Read or one of the searchoperations. As long as the operation is performed in RUN or MONITOR mode,the status of any bit d...
349 +Multiple Address Monitoring 00000 00000TIM 000 T000 0100 00000 T000 0100 00001 T000 0100 00001 T000 OFF 0100 D000000001 T000 ^OFF 0100 D000000001 T000 10FF^ OFF 0100 T000D000000001 0100 10FF^ OFF D000000001 10FF^ OFF 00001^ OFF 00000CONT 00001 00000CHANNEL DM 0000 0000000001S ONR OFF Indicates ...
351 The following displays show what happens when TIM 000 is set with 00100 OFF(i.e., 00500 is turned ON) and what happens when TIM 000 is reset with 00100ON (i.e., timer starts operation, turning OFF 00500, which is turned back ONwhen the timer has finished counting down the SV). (This example is p...
352 Example The following example shows the displays that appear when Restore Status iscarried out normally. 00000 00000 00000FORCE RELE? 00000FORCE RELEEND 7-1-4 Hexadecimal/BCD Data Modification When the Bit/Digit Monitor operation is being performed and a BCD or hexadeci-mal value is leftmost on ...
354 7-1-5 Hex/ASCII Display Change This operation converts DM data displays from 4-digit hexadecimal data to AS-CII and vice versa. Key Sequence Word currently displayed. 00000 00000CH DM 0000 D0000 4412 D0000”AB” D0000 4142 Press TR to change the displayto ASCII code. Press TR again to return thedi...
357 7-1-8 Differentiation Monitor This operation can be used to monitor the up or down differentiation status of bitsin the IR, SR, AR, LR, HR, and TC areas. To monitor up or down differentiationstatus, display the desired bit leftmost on the bit monitor display, and then pressSHIFT and the Up or Do...
358 7-1-9 3-word Monitor To monitor three consecutive words together, specify the lowest numberedword, press MONTR, and then press EXT to display the data contents of thespecified word and the two words that follow it. A CLR entry changes the Three-word Monitor operation to a single-word display. Ke...
359 Example 3-word Monitor in progress. Stops in the middleof monitoring. Resumes previousmonitoring. D0002D0001D0000 0123 4567 89AB D0002 3CH CHG? = 0123 4567 89AB D0002 3CH CHG? 0001 4567 89AB D0002 3CH CHG? 0001 = 4567 89AB D0002 3CH CHG? 0001 = 2345 89AB D0002D0001D0000 0001 2345 89AB D0002D0001...
361 7-1-12 Binary Data Modification This operation assigns a new 16-digit binary value to an IR, HR, AR, LR, or DMword. The cursor, which can be shifted to the left with the up key and to the right with thedown key, indicates the position of the bit that can be changed. After positioningto the desir...
362 IR bit 00115 IR bit 00100 00000 00000CHANNEL 000 00000CHANNEL 001 c001 MONTR0000010101010101 c001 CHG? = 000010101010101 c001 CHG?1 = 00010101010101 c001 CHG?10 = 0010101010101 c001 CHG?100 = 010101010101 c001 CHG?100S = 10101010101 c001 CHG?100 = 010101010101 c001 CHG?10 = S010101010101 c001 MO...
365 7-1-14 Expansion Instruction Function Code Assignments This operation is used to read or change the function codes assigned to expan-sion instructions. There are 18 function codes that can be assigned to expansioninstructions: 17, 18, 19, 47, 48, 60 to 69, and 87 to 89. More than one functioncod...
366 7-1-15 UM Area Allocation This operation is used to allocate part of the UM Area for use as expansion DM. Itcan be performed in PROGRAM mode only. Memory allocated to expansion DMis deducted from the ladder program area. The amount of memory available for the ladder program depends on the amount...
367 7-1-16 Reading and Setting the Clock This operation is used to read or set the CPU’s clock. The clock can be read inany mode, but it can be set in MONITOR or PROGRAM mode only. The CPU will reject entries outside of the acceptable range, i.e., 01 to 12 for themonth, 01 to 31 for the day of the m...
368 Expansion TERMINAL Mode The Programming Console can be put into Expansion TERMINAL mode by turn-ing ON AR 0709. Pin 6 of the CPU’s DIP switch must be ON. Switch the Programming Console to ExpansionTERMINAL mode by turning AR 0709 ON. PROGRAM BZ <MESSAGE>NO MESSAGE PROGRAM BZ CONSOLE mode T...
369 All bits from SR 27700 through SR 27909 will be turned OFF when AR 0708 isturned ON. Expansion keyboard mapping inputs are disabled when AR 0708 isON. In addition to the keyboard mapping function, expansion TERMINAL mode al-lows messages output by MSG(46) and LMSG(47) to be displayed on the Pro-...
374 8-1 Introduction The C200HS supports the following types of communications. • Communications with Programming Devices (e.g., Programming Console,LSS, or SSS.) • Host Link communications with personal computers and other external de-vices. • RS-232C (no-protocol) communications with personal comp...
375 8-2-1 Standard Communications Parameters The settings in DM 6645 and DM 6650 determine the main communications pa-rameters, as shown in the following diagram. The settings in bits 00 through 07 and bits 12 through 15 are valid only when pin5 on the CPU’s DIP switch is OFF. Bits 08 though 11 are ...
376 8-2-2 Specific Communications Parameters The following settings are valid only when pin 5 on the CPU’s DIP switch isturned OFF and DM 6645 and DM 6655 are set to specify using the settings inwords DM 6646 and DM 6656. Be sure to set the communications parameters to the same settings for bothends...
377 8-2-3 Wiring Ports Use the wiring diagram shown below as a guide in wiring the port to the externaldevice. Refer to documentation provided with the computer or other external de-vice for wire details for it. The connections between the C200HS and a personal computer are illustratedbelow as an ex...
379 TXD(––) instruction. In all other cases, data transmission based on aTXD(––) instruction will be given first priority. Application Example This example shows a program for using the RS-232C port in the Host Linkmode to transmit 10 bytes of data (DM 0000 to DM 0004) to a computer. FromDM 0000 to ...
380 PC Setup Start and end codes or the amount of data to be received can be set as shown inthe following diagrams if required for RS-232C communications. This setting isrequired only for RS-232C communications. The following settings are valid only with pin 5 on the CPU’s DIP switch is turnedOFF. E...
381 Start and end codes are not included when the number of bytes to be transmittedis specified. The largest transmission that can be sent with or without start andend codes in 256 bytes, i.e., N will be between 254 and 256 depending on thedesignations for start and end codes. If the number of bytes...
382 Application Example This example shows a program for using the RS-232C port in the RS-232Cmode to transmit 10 bytes of data (DM 0100 to DM 0104) to the computer, and tostore the data received from the computer in the DM area beginning withDM 0200. Before executing the program, the following PC S...
384 When the program is executed at both the master and the slave, the status ofIR 001 of each Unit will be reflected in IR 100 of the other Unit. IR 001 is an inputword and IR 100 is an output word. In the Master 25313 (Always ON) MOV(21) 001 LR00 MOV(21) LR08 100 In the Slave MOV(21) 001 LR08 MOV(...
! ! 386 9-1 Memory Cassettes The C200HS comes equipped with a built-in RAM for the user’s program so pro-grams can be created even without installing a Memory Cassette. An optionalMemory Cassette, however, can provide flexibility in handling program data, PCSetup data, DM data, I/O comment data, and...
387 Word Function Bit(s) SR 270 00 Save UM to Cassette Bit Data transferred to Memory Cassette when Bit is turnedON in PROGRAM mode. Bit will automatically turn OFF. 01 Load UM from Cassette Bit ON in PROGRAM mode. Bit will automatically turn OFF.An error will be produced if turned ON in any othermo...
388 4. Turn on the CPU.5. If the desired program or UM Area data is not already in the CPU, write the data or transfer it to the CPU. 6. Switch the C200HS to PROGRAM mode.7. Turn ON SR 27000 from the LSS or a Programming Console. The UM Area data will be written to the Memory Card and SR 27000 will ...
389 Note The data inside the Memory Cassette should be protected by turning on the write-protect switch whenever you are not planning to write to the Cassette. Writing Data The following procedure is used to write IOM data from the C200HS CPU to aMemory Cassette mounted in the CPU. 1, 2, 3... 1. Tur...
391 SECTION 10 Troubleshooting The C200HS provides self-diagnostic functions to identify many types of abnormal system conditions. These functions mini-mize downtime and enable quick, smooth error correction. This section provides information on hardware and software errors that occur during PC oper...
! 392 10-1 Alarm Indicators The ALM/ERR indicator on the front of the CPU provides visual indication of anabnormality in the PC. When the indicator is ON (ERROR), a fatal error (i.e.,ones that will stop PC operation) has occurred; when the indicator is flashing(ALARM), a nonfatal error has occurred....
393 The type of error can be quickly determined from the indicators on the CPU, asdescribed below for the three types of errors. If the status of an indicator is notmentioned in the description, it makes no difference whether it is lit or not. After eliminating the cause of an error, clear the error...
395 Fatal Operating Errors The following error messages appear for errors that occur after program execu-tion has been started. PC operation and program execution will stop and all out-puts from the PC will be turned OFF when any of the following errors occur. NoCPU indicators will be lit for the po...
396 Error and message Possible correction Probable cause FAL no. Too many Units I/O UNIT OVER E1 Two or more Special I/OUnits are set to thesame unit number Two or more Group-2High-density I/O Unitsare set to the same I/Onumber or I/O word. The I/O number of a64-pt Group-2High-density I/O Unit isset...
397 10-5 Error Flags The following table lists the flags and other information provided in the SR andAR areas that can be used in troubleshooting. Details are provided in 3-4 SR Area and 3-5 AR Area. SR Area Address(es) Function 23600 to 23615 Node loop status for SYSMAC NET Link system 23700 to 237...
399 10-6 Host Link Errors These error codes are received as the response code (end code) when a com-mand received by the C200HS from a host computer cannot be processed. Theerror code format is as shown below. @ X X ↵ : X X X X X X Nodeno. Headercode Terminator FCS End code The header code will vary...
401 SECTION 11 Host Link Commands This section explains the methods and procedures for using host link commands, which can be used for host link communica-tions via the C200HS ports. 11-1 Communications Procedure 402 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....
402 11-1 Communications Procedure Command Chart The commands listed in the chart below can be used for host link communica-tions with the C200HS. These commands are all sent from the host computer tothe PC. Header code PC mode Name Page RUN MON PRG g RR Valid Valid Valid IR/SR AREA READ 407 RL Valid...
403 Host link communications are executed by means an exchange of commandsand responses between the host computer and the PC. With the C200HS, thereare two communications methods that can be used. One is the normal method,in which commands are issued from the host computer to the PC. The othermethod...
404 When commands are issued to the host computer, the data is transmitted in onedirection from the PC to the host computer. If a response to a command is re-quired use a host link communications command to write the response from thehost computer to the PC. 11-2 Command and Response Formats This se...
405 Long Transmissions The largest block of data that can be transmitted as a single frame is 131 charac-ters. A command or response of 132 characters or more must therefore be di-vided into more than one frame before transmission. When a transmission issplit, the ends of the first and intermediate ...
406 time a frame is received and checking the result against the FCS that is includedin the frame makes it possible to check for data errors in the frame. FCS : ↵ 0 1 R R 0 @ 0 0 1 4 2 Text Node no. Header code FCS calculation range Terminator @ 40 0100 0000 EOR 1 31 0011 0001 EOR 0 30 0011 0000 EOR...
407 Reception Format When TXD(––) is executed, the data stored in the words beginning with the firstsend word is converted to ASCII and output to the host computer as a host linkcommand in the format shown below. The “@” symbol, node number, headercode, FCS, and delimiter are all added automatically...
409 cimal as a response. The PVs are returned in order, starting with the specifiedbeginning timer/counter. 11-3-5 TC STATUS READ –– RG Reads the status of the Completion Flags of the specified number of timers/counters, starting from the specified timer/counter. Command Format @ R G FCS x 10 1 x 10...
412 11-3-11 PV WRITE –– WC Writes the PVs (present values) of timers/counters starting from the specifiedtimer/counter. Command Format @ W C FCS x 10 1 x 10 0 x 10 3 x 10 2 : ↵ x 10 1 x 10 0 x 16 3 x 16 2 x 16 1 x 16 0 Node no. Headercode Terminator Beginning timer/counter(0000 to 0511) Write data (...
413 Note If data is specified for writing which exceeds the allowable range, an error will be generated and the writing operation will not be executed. If, for example, 510 isspecified as the beginning word for writing, and three words of data are speci-fied, then 512 will become the last word for w...
414 Parameters Write Data (Command)Specify in order the contents of the number of words to be written to the AR areain hexadecimal, starting with the specified beginning word. Note If data is specified for writing which exceeds the allowable range, an error will be generated and the writing operatio...
419 Parameters Name, TC Number (Command)In “Name”, specify the name of the instruction, in four characters, for changingthe SV. In “TC number”, specify the timer/counter number used for the instruc-tion. Instruction name Classification TC number OP1 OP2 OP3 OP4 range T I M (S) TIMER 0000 to 0511 T I...
420 Parameters Status Data, Message (Response)“Status data” consists of four digits (two bytes) hexadecimal. The leftmost byteindicates CPU operation mode, and the rightmost byte indicates the size of theprogram area. 15 14 13 12 11 10 9 8 0 0 0 9 8 0 0 1 0 1 1 x 16 3 x 16 2 This area is differentfr...
423 Parameters Name, Word address, Bit (Command)In “Name”, specify the area (i.e., IR, SR, LR, HR, AR, or TC) that is to be forcedset. Specify the name in four characters. In “Word address”, specify the addressof the word, and in “Bit” the number of the bit that is to be forced set. Name Classificat...
424 Note 1. The area specified under “Name” must be in four characters. Fill any gaps with spaces to make a total of four characters. 2. Words 253 to 255 cannot be set when the CIO Area is specified. 11-3-26 MULTIPLE FORCED SET/RESET –– FK Force sets, force resets, or cancels the status of the bits ...
425 Forced set/reset/cancel Data (Command)A separate hexadecimal digit is used to specify the desired process for each bitin the specified word, bits 00 to bit 5. The bits that are merely set or reset maychange status the next time the program is executed, but bits that are force-setor force-reset w...
427 Parameters Program (Response)The program is read from the entire program area. Note To stop this operation in progress, execute the ABORT (XZ) command. 11-3-31 PROGRAM WRITE –– WP Writes to the PC user’s program area the machine language (object code) pro-gram transmitted from the host computer....
428 Command Format @ Q Q x 10 0 x 10 1 x 10 3 x 10 2 x 10 1 x 10 0 OP1 OP2 OP3 OP4 M OP1 OP2 x 10 3 x 10 2 x 10 1 x 10 0 OP1 OP2 OP3 OP4 OP1 OP2 ↵ : Node no. Headercode Terminator FCS Sub-headercode Read area Read word address Dataformat Data break Single read information Total read information (128...
429 Data Break (Command)The read information is specified one item at a time separated by a break code(,). The maximum number of items that can be specified is 128. (When the PV ofa timer/counter is specified, however, the status of the Completion Flag is alsoreturned, and must therefore be counted ...
431 11-4 Host Link Errors These error codes are received as the response code (end code) when a com-mand received by the C200HS from a host computer cannot be processed. Theerror code format is as shown below. @ X X ↵ : X X X X X X Nodeno. Headercode Terminator FCS End code The header code will vary...
433 Appendix A Standard Models C200HS Racks Name Specifications Model number Backplane (same for all Racks) 10 slots C200H-BC101-V2 ( ) 8 slots C200H-BC081-V2 5 slots C200H-BC051-V2 3 slots C200H-BC031-V2 CPU Rack CPU 100 to 120/200 to 240 VAC w/built-in ––– C200HS-CPU01-E power supply Conforms to E...
Standard Models Appendix A 434 C200H Standard I/O Units Name Specifications Model number Input Units AC Input Unit 8 pts 100 to 120 VAC C200H-IA121 16 pts 100 to 120 VAC C200H-IA122/122V 8 pts 200 to 240 VAC C200H-IA221 16 pts 200 to 240 VAC C200H-IA222/222V DC Input Unit 8 pts No-voltage contact; N...
Appendix A Standard Models 435 C200H Group-2 High-density I/O Units Name Specifications Model number DC Input Unit 32 pts. 24 VDC C200H-ID216 C200H-ID218 64 pts. 24 VDC C200H-ID217 C200H-ID219 Transistor Output Unit 32 pts. 16 mA 4.5 VDC to 100 mA 26.4 VDC C200H-OD218 0.5 A (5A/Unit) 24 VDC C200H-OD...
Appendix A Standard Models 437 SYSMAC LINK Unit/SYSMAC NET Link Unit The SYSMAC LINK Units and SYSMAC NET Link Unit can only be used with the C200HS-CPU31-E and C200HS-CPU33-E CPUs. Name Specifications Model number SYSMAC LINK Unit Wired via coaxial cable.Bus Connection Unit required separately. One...
Standard Models Appendix A 438 Mounting Rails and Accessories Name Specifications Model number DIN Track Mounting Bracket 1 set (2 included) C200H-DIN01 DIN Track Length: 50 cm; height: 7.3 mm PFP-50N Length: 1 m; height: 7.3 mm PFP-100N Length: 1 m; height: 16 mm PFP-100N2 End Plate --- PFP-M Space...
Appendix A Standard Models 439 Name Model number Specifications All Plastic Optical Fiber Cable Set 1-m cable with an Optical Connector A connected to eachend 3G5A2-PF101 Optical Fiber Processing Kit Accessory: 125-mm nipper (Muromoto Tekko’s 550M) forAPF 3G2A9-TL101 H-PCF Name Specifications Model ...
Standard Models Appendix A 440 Optical Power Tester Name Specifications Head Unit Model number Optical Power Tester (see note)(provided with a connector adapter,light source unit, small single-headplug, hard case, and AC adapter) SYSMAC BUS: C200H-RM001-PV1C200H-RT001/RT002-PC500-RM001-(P)V1C500-RT0...
Appendix A Standard Models 441 An Optical Fiber Cable Bracket must be used to support an optical fiber cable connected to the C200HS-SNT32SYSMAC NET Link Unit or C200HS-SLK12 SYSMAC LINK Unit. User optical fiber cables with both tension members and power supply lines. The following half-lock connect...
443 Appendix B Programming Instructions A PC instruction is input either by pressing the corresponding Programming Console key(s) (e.g., LD, AND, OR,NOT) or by using function codes. To input an instruction with its function code, press FUN, the function code, andthen WRITE. Refer to the pages listed...
449 Appendix C Error and Arithmetic Flag Operation The following table shows the instructions that affect the ER, CY, GR, LE and EQ flags. In general, ER indicatesthat operand data is not within requirements. CY indicates arithmetic or data shift results. GT indicates that a com-pared value is large...
Appendix C Error and Arithmetic Flag Operation 451 Instructions Page 25507 (LE) 25506 (EQ) 25505 (GR) 25504 (CY) 25503 (ER) FPD(––) Unaffected Unaffected Unaffected 285 HEX(––) Unaffected Unaffected Unaffected Unaffected 195 HMS(66) Unaffected Unaffected Unaffected 184 INT(89) Unaffected Unaffected ...
453 Appendix D Memory Areas Overview The following table shows the data areas in PC memory. Area Size Range Comments I/O Area 480 bits IR 000 to IR 029 Group-2 High-densityI/O Unit Area 320 bits IR 030 to IR 049 Can be used as ordinary I/O or, if not used forreal I/O, can be used as work bits. SYSMA...
461 Appendix E PC Setup Word(s) Bit(s) Function Default Startup Processing (DM 6600 to DM 6614) The following settings are effective after transfer to the PC only after the PC is restarted. DM 6600 00 to 07 Startup mode (effective when bits 08 to 15 are set to 02).00: PROGRAM; 01: MONITOR 02: RUN PR...
Appendix E PC Setup 463 Word(s) Default Function Bit(s) DM 6648 00 to 07 Node number (Host link)00 to 31 (BCD) 0 08 to 11 Start code enable (RS-232C)0: Disable; 1: Set Disabled 12 to 15 End code enable (RS-232C)0: Disable (number of bytes received)1: Set (specified end code)2: CR, LF Disabled DM 664...
465 Appendix F Word Assignment Recording Sheets This appendix contains sheets that can be copied by the programmer to record I/O bit allocations and terminalassignments, as well as details of work bits, data storage areas, timers, and counters.
468 Programmer: Program: Date: Page: Word Contents Notes Word Contents Notes Data Storage
469 Programmer: Program: Date: Page: TC address T or C Set value Notes TC address T or C Set value Notes Timers and Counters
471 Appendix G Program Coding Sheet The following page can be copied for use in coding ladder diagram programs. It is designed for flexibility, allowingthe user to input all required addresses and instructions. When coding programs, be sure to specify all function codes for instructions and data are...
473 Appendix H Data Conversion Tables Normal Data Decimal BCD Hex Binary 00 00000000 00 00000000 01 00000001 01 00000001 02 00000010 02 00000010 03 00000011 03 00000011 04 00000100 04 00000100 05 00000101 05 00000101 06 00000110 06 00000110 07 00000111 07 00000111 08 00001000 08 00001000 09 00001001...
Data Conversion Tables Appendix H 474 Signed Binary Data Decimal 16-bit Hex 32-bit Hex 21474836472147483646 ... 327683276732766 ... 543210 –1–2–3–4–5 ... –32767–32768–32769 ... –2147483647–2147483648 –––––– ... ––– 7FFF 7FFE ... 000500040003000200010000 FFFF FFFE FFFDFFFC FFFB ... 80018000 ––– ... –...
475 Appendix I Extended ASCII Programming Console Displays Bits 0 to 3 Bits 4 to 7 BIN 0000 0001 0010 0011 0100 0101 0110 0111 1010 1011 1100 1101 1110 1111 HEX 0 1 2 3 4 5 6 7 A B C D E F 0000 0 NUL DLE Space 0 @ P ‘ p 0 @ P ‘ p 0001 1 SOH DC 1 ! 1 A Q a q ! 1 A Q a q 0010 2 STX DC 2 ” 2 B R b r ” ...
477 Glossary address The location in memory where data is stored. For data areas, an address con-sists of a two-letter data area designation and a number that designates theword and/or bit location. For the UM area, an address designates the instructionlocation (UM area). In the FM area, the address...
Glossary 478 bit designator An operand that is used to designate the bit or bits of a word to be used by aninstruction. bit number A number that indicates the location of a bit within a word. Bit 00 is the rightmost(least-significant) bit; bit 15 is the leftmost (most-significant) bit. buffer A temp...
Glossary 479 through a TC bit and used to count the number of times the status of a bit or anexecution condition has changed from OFF to ON. CPU An acronym for central processing unit. In a PC System, the CPU executes theprogram, processes I/O signals, communicates with external devices, etc. CPU Ba...
Glossary 480 differentiated instruction An instruction that is executed only once each time its execution condition goesfrom OFF to ON. Nondifferentiated instructions are executed each cycle as longas the execution condition stays ON. differentiation instruction An instruction used to ensure that th...
Glossary 481 extended timer A timer created in a program by using two or more timers in succession. Such atimer is capable of timing longer than any of the standard timers provided by theindividual instructions. Factory Intelligent Terminal A programming device provided with advanced programming and...
Glossary 482 initialization error An error that occurs either in hardware or software during the PC System star-tup, i.e., during initialization. initialize Part of the startup process whereby some memory areas are cleared, systemsetup is checked, and default values are set. input The signal coming ...
Glossary 483 I/O Control Unit A Unit mounted to the CPU Rack in certain PCs to monitor and control I/O pointson Expansion I/O Units. I/O devices The devices to which terminals on I/O Units, Special I/O Units, or Intelligent I/OUnits are connected. I/O devices may be either part of the Control System...
Glossary 484 Ladder Support Software A software package that provides most of the functions of the Factory IntelligentTerminal on an IBM AT, IBM XT, or compatible computer. LAN An acronym for local area network. leftmost (bit/word) The highest numbered bits of a group of bits, generally of an entire...
Glossary 485 main program All of a program except for the subroutines. masking ‘Covering’ an interrupt signal so that the interrupt is not effective until the mask isremoved. Master Short for Remote I/O Master Unit. memory area Any of the areas in the PC used to hold data or programs. mnemonic code ...
Glossary 487 output point The point at which an output leaves the PC System. Output points correspondphysically to terminals or connector pins. output signal A signal being sent to an external device. Generally an output signal is said toexist when, for example, a connection point goes from low to h...
Glossary 488 grammable Controllers are used to automate control of external devices. Al-though single-component Programmable Controllers are available, build-ing-block Programmable Controllers are constructed from separate compo-nents. Such building-block Programmable Controllers are formed only whe...
Glossary 489 Remote I/O Unit Any of the Units in a Remote I/O System. Remote I/O Units include Masters,Slaves, Optical I/O Units, I/O Link Units, and Remote Terminals. remote I/O word An I/O word allocated to a Unit in a Remote I/O System. reset The process of turning a bit or signal OFF or of chang...
Glossary 490 slot A position on a Rack (Backplane) to which a Unit can be mounted. software error An error that originates in a software program. software protect A means of protecting data from being changed that uses software as opposedto a physical switch or other hardware setting. source The loc...
Glossary 491 timer A location in memory accessed through a TC bit and used to time down from thetimer’s set value. Timers are turned ON and reset according to their executionconditions. TM area A memory area used to store the results of a trace. transmission distance The distance that a signal can b...
493 Revision History A manual revision code appears as a suffix to the catalog number on the front cover of the manual. Cat. No. W235-E1-05 Revision code The following table outlines the changes made to the manual during each revision. Page numbers refer to theprevious version. Revision code Date Re...
497 Index A address tracing. See tracing, data tracing. addresses, in data area: sec3 27 advanced I/O instructions 7-SEGMENT DISPLAY OUTPUT: 5–24 on 305 DIGITAL SWITCH INPUT: 5–24 on 308 functions: 5–24 on 304 HEXADECIMAL KEY INPUT: 5–24 on 312 MATRIX INPUT: 5–24 on 317 TEN-KEY INPUT: 5–24 on 314 ap...
Index 498 converting between hex and ASCII: sec7 354 I/O Unit designations: 4–1 to 4–6 88 Programming Console, English/Japanese switch: 4–1 to 4–6 80 DM area, allocating UM to expansion DM: sec7 366 E ER. See flag, Instruction Execution Error error codes, programming: 5–24 on 278 error history, dedi...
Index 499 WC: sec11 412 WD: sec11 413 WG: sec11 412 WH: sec11 411 WJ: sec11 413 WL: sec11 411 WP: sec11 427 WR: sec11 410 XZ: sec11 429 host link errors: sec11 431 Host Link Systems, error bits and flags: sec3 40 HR area: sec3 60 I I/O bit definition: sec3 31 limits: sec3 31 I/O numbers: sec3 33 I/O...
Manual Omron C200HS
Summary
C200HS Programmable Controllers Operation Manual Revised February 2002
! ! ! ii Notice: OMRON products are manufactured for use according to proper procedures by a qualified operatorand only for the purposes described in this manual. The following conventions are used to indicate and classify precautions in this manual. Always heedthe information provided with them. Fa...
iii About this Manual: This manual describes the operation of the C200HS C-series Programmable Controllers, and it includesthe sections described below. Installation information is provided in the C200HS Programmable Control- ler Installation Guide. A table of other manuals that can be used in conju...
v TABLE OF CONTENTS PRECAUTIONS xiii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Intended Audience xiv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 General Precautions xiv . . . . . . . . . . ....
Table of contents vi 3-4-10 I/O Verification Error Flag 43 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-11 First Cycle Flag 43 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-12 Clock Pulse Bits 43 . . . . . . . . . . . . . . . . . . ....
Table of contents vii 4-5-1 The Keyboard 78 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5-2 PC Modes 80 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5-3 The Display Message Switch 80 . . . . . . . . . . . ...
Table of contents viii 5-15 Data Shifting 150 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15-1 SHIFT REGISTER – SFT(10) 150 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15-2 REVERSIBLE SHIFT REGISTER – SFTR(84) 152 . ...
Table of contents ix 5-19-11 BCD DIVIDE – DIV(33) 212 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-19-12 DOUBLE BCD DIVIDE – DIVL(57) 213 . . . . . . . . . . . . . . . . . . . . . . . . . 5-19-13 FLOATING POINT DIVIDE – FDIV(79) 214 . . . . . . . . . . . . . . . . . . . . ...
Table of contents x 5-28 Advanced I/O Instructions 301 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-28-1 7-SEGMENT DISPLAY OUTPUT – 7SEG(––) 301 . . . . . . . . . . . . . . . . . 5-28-2 DIGITAL SWITCH INPUT – DSW(––) 304 . . . . . . . . . . . . . . . . . . . ...
Table of contents xi SECTION 10 – Troubleshooting 391 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1 Alarm Indicators 392 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2 Programmed Alarms and Error Messages 392 . . . ...
Table of contents xii Appendix 433 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A – Standard Models 433 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B – Programming Instructions ...
xiii PRECAUTIONS This section provides general precautions for using the Programmable Controller (PC) and related devices. The information contained in this section is important for the safe and reliable application of the PC. You must readthis section and understand the information contained before...
! ! ! xiv 1 Intended Audience This manual is intended for the following personnel, who must also have knowl-edge of electrical systems (an electrical engineer or the equivalent). • Personnel in charge of installing FA systems. • Personnel in charge of designing FA systems. • Personnel in charge of m...
! ! ! ! xv Caution The operating environment of the PC System can have a large effect on the lon-gevity and reliability of the system. Improper operating environments can lead tomalfunction, failure, and other unforeseeable problems with the PC System. Besure that the operating environment is within...
xvi 6 Conformance to EC Directives Observe the following precautions when installing the C200HS-CPU01-EC andC200HS-CPU21-EC that conform to the EC Directives. Provide reinforced insulation or double insulation for the DC power source con-nected to the DC I/O Unit and for the Power Supply Unit.Use a ...
2 1-1 Overview A PC (Programmable Controller) is basically a CPU (Central Processing Unit)containing a program and connected to input and output (I/O) devices. The pro-gram controls the PC so that when an input signal from an input device turns ON,the appropriate response is made. The response norma...
3 1-3 PC Terminology Although also provided in the Glossary at the back of this manual, the following terms are crucial to understanding PC operation and are thus explained here. PC Because the C200HS is a Rack PC, there is no one product that is a C200HSPC. That is why we talk about the configurati...
4 High-density I/O Units are designed to provide high-density I/O capability andinclude Group 2 High-density I/O Units and Special I/O High-density I/O Units. Special I/O Units are dedicated Units that are designed to meet specific needs.These include some of the High-density I/O Units, Position Con...
5 Input/Output Requirements The first thing that must be assessed is the number of input and output pointsthat the controlled system will require. This is done by identifying each devicethat is to send an input signal to the PC or which is to receive an output signalfrom the PC. Keep in mind that th...
7 1-8-1 Improved Memory Capabilities Internal Memory (UM) The C200HS CPUs come equipped with 16 KW of RAM in the PC itself, so a verylarge memory capacity is available without purchasing a separate Memory Unit.Furthermore, the Ladder Program Area has been increased to 15.2 KW. Memory Cassettes Two t...
8 I/O Refreshing Time The I/O refreshing time has been reduced for all units, as shown in the followingtable. I/O Unit Time Required for Refreshing Standard I/O Units ! @ 3 of the C200H I/O refreshing time Group-2 High-density I/O Units ! @ 3 of the C200H I/O refreshing time Special I/O Units $ @ 5 ...
9 TRSM(45) TRACE MEMORY SAMPLEMCRO(99) MACROMAX(--) FIND MAXIMUM MIN(--) FIND MINIMUM SUM(--) SUM SRCH(--) DATA SEARCH FPD(--) FAILURE POINT DETECTION PID(--) PID CONTROL HEX(--) ASCII TO HEX XDMR(--) EXPANSION DM READ DSW(--) DIGITAL SWITCH INPUT TKY(--) TEN-KEY INPUT MTR(--) MATRIX INPUT HKY(--) 1...
10 1-8-7 Built-in RS-232C Connector Host link communications are possible using the RS-232C connector built intothe C200HS-CPU21-E/CPU23-E/CPU31-E/CPU33-E CPU. By using the TXDand RXD instructions, RS-232C communications is possible without using time-consuming procedures. A 1-to-1 link using the LR...
11 I/O Comments Stored in PC By allocating a part of UM as the I/O Comment area, it is no longer necessary toread I/O Comments from a Peripheral Device’s floppy disk. If the Peripheral De-vice is connected to the C200HS online, the ladder diagram can be viewed withI/O comments. Online Editing A “CYC...
12 7. Transfer the program and and any other require data to the C200HS. You will probably want to transfer DM data and the I/O table, if you have createdan I/O table for the C200H. 8. Turn the C200HS off and then back on to reset it. 9. Test program execution before attempting actual operation. Usi...
! 16 2-1 CPU Components There are two groups of CPUs available, one that uses an AC power supply, andone that uses a DC power supply. Select one of the models shown below accord-ing to requirements of your control system. CPU model Power supply voltage C200HS-CPU01-E/CPU21-E/CPU31-E 100 to 120 VAC o...
17 C200HS-CPU21-E/CPU23-E/CPU31-E/CPU33-E Memory Casette compartment Bus connector: Available only with the CPU31-Eand CPU33-E. Use this connectorwhen SYSMAC NET Link Unit orSYSMAC LINK Unit is used. RS-232Cconnector Cable connector forperipheral devices Battery/Switch compartment Power fuse (MF51NR...
18 2-1-2 Peripheral Device Connection A Programming Console or IBM PC/AT running LSS can be used to programand monitor the C200HS PCs. Programming Console A C200H-PR027-E or CQM1-PRO01-E Programming Console can be con-nected as shown in the following diagram. The C200H-PR027-E is connectedvia the C2...
19 Expansion I/O Racks An Expansion I/O Rack can be thought of as an extension of the PC because itprovides additional slots to which other Units can be mounted. It is built onto anExpansion I/O Backplane to which a Power Supply and up to ten other Units aremounted. An Expansion I/O Rack is always c...
20 C200HS Function C200HS CPU01-E CPU21-E CPU31-E CPU03-E CPU23-E CPU33-E Built-in clock/calendar Yes Error log Yes 1 Data Trace Yes Differential Monitor Yes Expansion DM 3K words max. 2 General-use DM 6K words Ladder Program capacity 15.2K words max 2 SR Area SR 236 to SR 255 and SR 256 to SR 299 N...
! 21 C200HS-MP j 16K (EPROM) The program is written using a PROM Writer. The ROM is mounted to theMemory Casette and then installed in the CPU. I/O data cannot be stored. Notch 2-5 Installing Memory Cassettes An optional Memory Cassette can be installed in the C200HS. (The C200HMemory Unit cannot be...
22 3. Remove the bracket from the Memory Cassette, as shown in the illustration below. Metal bracket 4. Check that the connector side goes in first and that the Cassette’s circuit components face right and then insert the Cassette into the CPU. The Cas-sette slides in along a track in the CPU. 5. Re...
23 2-6 CPU DIP Switch The DIP switch on C200HS CPUs is located between the Memory Cassettecompartment and battery. The 6 pins on the DIP switch control 6 of the CPU’s operating parameters. Pin no. Item Setting Function 1 Memory protect ON Program Memory and read-only DM (DM 6144 to DM 6655)data cann...
26 3-1 Introduction Details, including the name, size, and range of each area are summarized in thefollowing table. Data and memory areas are normally referred to by their acro-nyms, e.g., the IR Area, the SR Area, etc. Area Size Range Comments I/O Area 480 bits IR 000 to IR 029 I/O words are alloca...
27 Work Bits and Words When some bits and words in certain data areas are not being used for their in-tended purpose, they can be used in programming as required to control otherbits. Words and bits available for use in this fashion are called work words andwork bits. Most, but not all, unused bits ...
28 The same TC number can be used to designate either the present value (PV) ofthe timer or counter, or a bit that functions as the Completion Flag for the timer orcounter. This is explained in more detail in 3-8 TC Area. Area Word designation Bit designation IR 000 00015 (leftmost bit in word 000) ...
29 Decimal Points Decimal points are used in timers only. The least significant digit representstenths of a second. All arithmetic instructions operate on integers only. Signed and Unsigned Binary Data This section explains signed and unsigned binary data formats. Many instruc-tions can use either s...
31 3-3 IR (Internal Relay) Area The IR area is used both as data to control I/O points, and as work bits to manipu-late and store data internally. It is accessible both by bit and by word. In theC200HS PC, the IR area is comprised of words 000 to 235 and 298 to 511. Words in the IR area that are use...
32 Up to ten Special I/O Units may be mounted in any slot of the CPU Rack or Ex-pansion I/O Racks. Up to five Slave Racks may be used, whether one or twoMasters are used. IR area words are allocated to Special I/O Units and SlaveRacks by the unit number on the Unit, as shown in the following tables....
33 Group-2 High-density I/O Units and B7A Interface Units are allocated words be-tween IR 030 and IR 049 according to I/O number settings made on them and donot use the words allocated to the slots in which they are mounted. For 32-pointUnits, each Unit is allocated two words; for 64-point Units, ea...
37 Word(s) Function Bit(s) 273 00 Save IOM to Cassette Bit Data transferred to Memory Cassette when Bit is turnedON in PROGRAM mode. Bit will automatically turn OFF. 01 Load IOM from Cassette Bit ON in PROGRAM mode. Bit will automatically turn OFF.An error will be produced if turned ON in any otherm...
39 SYSMAC NET Operating l l 0 Operating l l 1 Bit (Node numbers below) p g level 0 p g level 1 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 SR 238 SR 242 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1 SR 239 SR 243 16 15 14 13 12 11 10 9 16 15 14 13 12 11 10 9 SR 240 SR 244 24 23 22 21 20 19 18 17 24 23 22 21 2...
40 Host Link Systems Both Error flags and Restart bits are provided for Host Link Systems. Error flagsturn ON to indicate errors in Host Link Units. Restart bits are turned ON and thenOFF to restart a Host Link Unit. SR bits used with Host Link Systems are summa-rized in the following table. Rack-mo...
41 Flag type Bit no. SR 247 SR 248 SR 249 SR 250 Run flags 00 Unit #8,level 1 Unit #0,level 1 Unit #8,level 0 Unit #0,level 0 01 Unit #9,level 1 Unit #1,level 1 Unit #9,level 0 Unit #1,level 0 02 Unit #10,level 1 Unit #2,level 1 Unit #10,level 0 Unit #2,level 0 03 Unit #11,level 1 Unit #3,level 1 Un...
42 The status of SR 25211 and thus the status of force-set and force-reset bits canbe maintained when power is turned off and on by enabling the Forced StatusHold Bit in the PC Setup. If the Forced Status Hold Bit is enabled, the status ofSR 25211 will be preserved when power is turned off and on. I...
43 This bit can be programmed to activate an external warning for a low battery volt-age. The operation of the battery alarm can be disabled in the PC Setup if desired.Refer to 3-6-4 PC Setup for details. 3-4-9 Cycle Time Error Flag SR bit 25309 turns ON if the cycle time exceeds 100 ms. The ALM/ERR...
! 44 3-4-13 Step Flag SR bit 25407 turns ON for one cycle when step execution is started with theSTEP(08) instruction. 3-4-14 Group-2 Error Flag SR bit 25414 turns ON for any of the following errors for Group-2 High-densityI/O Units and B7A Interface Units: the same I/O number set twice, the samewor...
45 Overflow Flag, OF SR bit 25404 turns ON when the result of a binary addition or subtraction ex-ceeds 7FFF or 7FFFFFFF. Underflow Flag, UF SR bit 25405 turns ON when the result of a signed binary addition or subtractionexceeds 8000 or 80000000. Carry Flag, CY SR bit 25504 turns ON when there is a ...
46 3-4-20 Peripheral Port Communications Areas Peripheral Port Error Code SR bits 26408 to 26411 are set when there is a peripheral port error in the Gener-al I/O Mode. Setting Error type 0 No error 1 Parity error 2 Framing error 3 Overrun error F Connected in Peripheral Mode SR bit 26412 turns ON w...
48 Save IOM to Cassette Bit SR bit 27300 turns ON when IOM is saved to a Memory Cassette. Load IOM from Cassette Bit SR bit 27301 turns ON when loading to IOM from a Memory Cassette. 3-4-26 Transfer Error Flags Data will not be transferred from IOM to the Memory Cassette if an error occurs(except fo...
51 number, 0 through 31, and a letter, L or H. Bits are allocated as shown in the fol-lowing table. Bits AR03 allocation AR04 allocation AR05 allocation AR06 allocation 00 0 L 8 L 16 L 24 L 01 0 H 8 H 16 H 24 H 02 1 L 9 L 17 L 25 L 03 1 H 9 H 17 H 25 H 04 2 L 10 L 18 L 26 L 05 2 H 10 H 18 H 26 H 06 ...
53 30-second Compensation Bit AR 2113 is turned ON to round the seconds of the Calendar/clock Area to zero, i.e., if the seconds is 29 or less, it is merely set to 00; if the seconds is 30 or great-er, the minutes is incremented by 1 and the seconds is set to 00. Clock Stop Bit AR 2114 is turned OFF...
54 3-5-11 Power OFF Counter AR 23 provides in 4-digit BCD the number of times that the PC power has beenturned off. This counter can be reset as necessary using the PV Change 1 op-eration from the Programming Console. (Refer to 7-1-4 Hexadecimal/BCD Data Modification for details.) The Power OFF Coun...
55 3-6 DM (Data Memory) Area The DM area is divided into various parts as described in the following table. Aportion of UM (up to 3,000 words in 1,000-word increments) can be allocated asExpansion DM. Addresses User read/write Usage DM 0000 to DM 0999 Read/Write Normal DM. DM 1000 to DM 1999 Special...
57 whether DM 1000 to DM 1999 or DM 7000 to 7999 will be used. Refer to 3-6-4 PC Setup for details. Unit Addresses 0 DM 1000 to DM 1099 or DM 7000 to DM 7099 1 DM 1100 to DM 1199 or DM 7100 to DM 7199 2 DM 1200 to DM 1299 or DM 7200 to DM 7299 3 DM 1300 to DM 1399 or DM 7300 to DM 7399 4 DM 1400 to ...
58 The following table lists the possible error codes and corresponding errors. Error severity Error code Error Fatal errors 00 Power Interruption 01 to 99 System error (FALS) 9F Cycle time error C0 to C2 I/O bus error E0 Input-output I/O table error E1 Too many Units F0 No END(01) instruction F1 Me...
60 3-7 HR (Holding Relay) Area The HR area is used to store/manipulate various kinds of data and can be ac-cessed either by word or by bit. Word addresses range from HR 00 through HR99; bit addresses, from HR 0000 through HR 9915. HR bits can be used in anyorder required and can be programmed as oft...
61 3-9 LR (Link Relay) Area The LR area is used as a common data area to transfer information betweenPCs. This data transfer is achieved through a PC Link System. Certain words will be allocated as the write words of each PC. These words arewritten by the PC and automatically transferred to the same...
64 4-1 Basic Procedure There are several basic steps involved in writing a program. Sheets that can becopied to aid in programming are provided in Appendix F Word Assignment Re- cording Sheets and Appendix G Program Coding Sheet. 1, 2, 3... 1. Obtain a list of all I/O devices and the I/O points that...
65 4-3 Program Capacity The maximum user program size varies with the amount of UM allocated to ex-pansion DM and the I/O Comment Area. Approximately 10.1 KW are availablefor the ladder program when 3 KW are allocated to expansion DM and 2 KW areallocated to I/O comments as shown below. Refer to the...
66 4-4-1 Basic Terms Each condition in a ladder diagram is either ON or OFF depending on the statusof the operand bit that has been assigned to it. A normally open condition is ON ifthe operand bit is ON; OFF if the operand bit is OFF. A normally closed conditionis ON if the operand bit is OFF; OFF ...
68 LOAD and LOAD NOT The first condition that starts any logic block within a ladder diagram corre-sponds to a LOAD or LOAD NOT instruction. Each of these instruction requiresone line of mnemonic code. “Instruction” is used as a dummy instruction in thefollowing examples and could be any of the righ...
69 OR and OR NOT When two or more conditions lie on separate instruction lines which run in paral-lel and then join together, the first condition corresponds to a LOAD or LOADNOT instruction; the other conditions correspond to OR or OR NOT instructions.The following example shows three conditions wh...
71 Now you have all of the instructions required to write simple input-output pro-grams. Before we finish with ladder diagram basic and go onto inputting the pro-gram into the PC, let’s look at logic block instruction (AND LOAD and OR LOAD),which are sometimes necessary even with simple diagrams. 4-...
72 Analyzing the above ladder diagram in terms of mnemonic instructions, the con-dition for IR 00000 is a LOAD instruction and the condition below it is an OR in-struction between the status of IR 00000 and that of IR 00001. The condition atIR 00002 is another LOAD instruction and the condition belo...
74 The following diagram contains only two logic blocks as shown. It is not neces-sary to further separate block b components, because it can be coded directlyusing only AND and OR. 00000 00001 00002 00003 00201 00501 00004 Block a Block b Address Instruction Operands 00000 LD 00000 00001 AND NOT 00...
78 4-4-7 Coding Multiple Right-hand Instructions If there is more than one right-hand instruction executed with the same execu-tion condition, they are coded consecutively following the last condition on theinstruction line. In the following example, the last instruction line contains onemore condit...
! ! 80 4-5-2 PC Modes The Programming Console is equipped with a switch to control the PC mode. Toselect one of the three operating modes—RUN, MONITOR, or PROGRAM—use the mode switch. The mode that you select will determine PC operation aswell as the procedures that are possible from the Programming...
81 4. Confirm that the CPU’s POWER LED is lit and the following display appears on the Programming Console screen. (If the ALM/ERR LED is lit or flashingor an error message is displayed, clear the error that has occurred.) <PROGRAM>PASSWORD! 5. Enter the password. See 4-6-1 Entering the Passwo...
82 4-6-3 Clearing Memory Using the Memory Clear operation it is possible to clear all or part of the UM area(RAM or EEPROM), and the IR, HR, AR, DM and TC areas. Unless otherwisespecified, the clear operation will clear all of the above memory areas. The UMarea will not be cleared if the write-prote...
83 The following procedure is used to clear memory completely. Continue pressingthe CLR key once foreach error messageuntil “00000” appearson the display All clear MEMORY ERR I/O VER ERR 00000 00000MEMORY CLR? HR CNT DM 00000MEM ALLCLR? 00000 00000MEM ALLCLREND Partial Clear It is possible to retain...
84 To leave the TC area uncleared and retain Program Memory addresses 00000through 00122, input as follows: 00000 00000 00000 00000MEMORY CLR? HR CNT DM 00000MEMORY CLR? HR DM 00123MEMORY CLR? HR DM 00000MEMORY CLR END HR DM Memory Clear The memory clear operation clears all memory areas except the ...
85 It is necessary to register the I/O table if I/O Units are changed, otherwise an I/Overification error message, “I/O VER ERR” or “I/O SET ERROR”, will appearwhen starting programming operations. I/O Table Registration can be performed only in PROGRAM mode with the write-protection switch (pin 1 o...
86 4-6-6 Verifying the I/O Table The I/O Table Verification operation is used to check the I/O table registered inmemory to see if it matches the actual sequence of I/O Units mounted. The firstinconsistency discovered will be displayed as shown below. Every subsequentpressing of VER displays the nex...
88 Meaning of Displays I/O Unit Designations for Displays(see I/O Units Mounted in Remote Slave Racks, page 89) No. of points 16 32 64 Input Unit Output Unit C500, 1000H/C2000H I/O Units No. of points 8 16 Input Unit Output Unit 0 0 0 0 0 0 * * 0 * * * I * * * I I * * I I I I i(*)* * i i * * o o * *...
89 I/O word number I/O type: I, O i, o (see tables on previous page) Unit number (0 to 9) Remote I/O Slave Unit number (0 to 4) Remote I/O Master Unit number (0 or 1) Indicates a Remote I/O Rack 00000IOTBL READR**-*U=**** *** Unit number (0 to 9) Indicates Group-2 HIgh-density I/O Unit 00000IOTBL RE...
90 Key Sequence 00000 00000FUN (??) 00000IOTBL ?-?U= 00000IOTBL CANC ???? 00000IOTBL CANC 9713 00000IOTBL CANCOK 00000IOTBL WRIT ???? 4-6-9 SYSMAC NET Link Table Transfer (CPU31/33-E Only) The SYSMAC NET Link Table Transfer operation transfers a copy of the SYS-MAC NET Link Data Link table to RAM or...
92 4-7 Inputting, Modifying, and Checking the Program Once a program is written in mnemonic code, it can be input directly into the PCfrom a Programming Console. Mnemonic code is keyed into Program Memoryaddresses from the Programming Console. Checking the program involves asyntax check to see that ...
93 If the following mnemonic code has already been input into Program Memory,the key inputs below would produce the displays shown. 00000 00200 00200READ OFFLD 00000 00201READ ONAND 00001 00202READ OFFTIM 000 00202TIM #0123 00203READ ONLD 00100 Address Instruction Operands 00200 LD 00000 00201 AND 0...
96 Error Messages The following error messages may appear when inputting a program. Correctthe error as indicated and continue with the input operation. The asterisks in thedisplays shown below will be replaced with numeric data, normally an address,in the actual display. Message Cause and correctio...
98 Example The following example shows some of the displays that can appear as a result ofa program check. Display #2 Display #3 Halts program check Check continues until END(01) When errors are found Display #1 00699CHK ABORTD 02000PROG CHKEND (01)(02.7KW) 00178CIRCUIT ERROUT 00200 00200IL-ILC ERRI...
100 00000 00000LD 00000 00200SRCHLD 00000 00202LD 00000 02000SRCHEND (01)(02.7KW) 00000 00100 00100TIM 001 00203SRCHTIM 001 00203 TIM DATA #0123 00000 00000CONT SRCHCONT 00005 00200CONT SRCHLD 00005 00203CONT SRCHAND 00005 02000END (01)(02.7K) 4-7-6 Inserting and Deleting Instructions In PROGRAM mod...
! 101 To delete an instruction, display the instruction word of the instruction to be de-leted and then press DEL and the up key. All the words for the designated in-struction will be deleted. Caution Be careful not to inadvertently delete instructions; there is no way to recover them without reinpu...
102 Find the addressprior to the inser-tion point Insert theinstruction Program After Insertion Inserting an Instruction 00000 00000OUT 00000 00000OUT 00201 00207SRCHOUT 00201 00206READAND NOT 00104 00206AND 00000 00206AND 00105 00206INSERT?AND 00105 00207INSERT ENDAND NOT 00104 00206READAND 00105 A...
103 4-7-7 Branching Instruction Lines When an instruction line branches into two or more lines, it is sometimes neces-sary to use either interlocks or TR bits to maintain the execution condition thatexisted at a branching point. This is because instruction lines are executedacross to a right-hand in...
104 The previous diagram B can be written as shown below to ensure correct execu-tion. In mnemonic code, the execution condition is stored at the branching pointusing the TR bit as the operand of the OUTPUT instruction. This execution con-dition is then restored after executing the right-hand instru...
105 When drawing a ladder diagram, be careful not to use TR bits unless necessary.Often the number of instructions required for a program can be reduced andease of understanding a program increased by redrawing a diagram that wouldotherwise required TR bits. In both of the following pairs of diagram...
107 If IR 00000 in the above diagram is OFF (i.e., if the execution condition for thefirst INTERLOCK instruction is OFF), instructions 1 through 4 would be ex-ecuted with OFF execution conditions and execution would move to the instruc-tion following the INTERLOCK CLEAR instruction. If IR 00000 is O...
108 The other type of jump is created with a jump number of 00. As many jumps asdesired can be created using jump number 00 and JUMP instructions using 00can be used consecutively without a JUMP END using 00 between them. It iseven possible for all JUMP 00 instructions to move program execution to t...
109 4-8-1 DIFFERENTIATE UP and DIFFERENTIATE DOWN DIFFERENTIATE UP and DIFFERENTIATE DOWN instructions are used toturn the operand bit ON for one cycle at a time. The DIFFERENTIATE UP in-struction turns ON the operand bit for one cycle after the execution condition forit goes from OFF to ON; the DIF...
110 To create a self-maintaining bit, the operand bit of an OUTPUT instruction isused as a condition for the same OUTPUT instruction in an OR setup so that theoperand bit of the OUTPUT instruction will remain ON or OFF until changes oc-cur in other bits. At least one other condition is used just bef...
111 Work bits can be used to simplify programming when a certain combination ofconditions is repeatedly used in combination with other conditions. In the follow-ing example, IR 00000, IR 00001, IR 00002, and IR 00003 are combined in alogic block that stores the resulting execution condition as the s...
112 This action is easily programmed by using IR 22500 as a work bit as the operandof the DIFFERENTIATE UP instruction (DIFU(13)). When IR 00000 turns ON, IR22500 will be turned ON for one cycle and then be turned OFF the next cycle byDIFU(13). Assuming the other conditions controlling IR 00100 are ...
113 Except for instructions for which conditions are not allowed (e.g., INTERLOCKCLEAR and JUMP END, see below), every instruction line must also have atleast one condition on it to determine the execution condition for the instructionat the right. Again, diagram A , below, must be drawn as diagram ...
114 4-11 Program Execution When program execution is started, the CPU cycles the program from top to bot-tom, checking all conditions and executing all instructions accordingly as itmoves down the bus bar. It is important that instructions be placed in the properorder so that, for example, the desir...
118 5-1 Notation In the remainder of this manual, all instructions will be referred to by their mne-monics. For example, the Output instruction will be called OUT; the AND Loadinstruction, AND LD. If you’re not sure of the instruction a mnemonic is used for,refer to Appendix B Programming Instructio...
! 119 Caution The IR and SR areas are considered as separate data areas. If an operand has access to onearea, it doesn’t necessarily mean that the same operand will have access to the other area. Theborder between the IR and SR areas can, however, be crossed for a single operand, i.e., the lastbit i...
! 120 A non-differentiated instruction is executed each time it is cycled as long as itsexecution condition is ON. A differentiated instruction is executed only once af-ter its execution condition goes from OFF to ON. If the execution condition hasnot changed or has changed from ON to OFF since the ...
122 5-6 Coding Right-hand Instructions Writing mnemonic code for ladder instructions is described in Section 4 Writing and Inputting the Program. Converting the information in the ladder diagramsymbol for all other instructions follows the same pattern, as described below,and is not specified for ea...
124 Multiple Instruction Lines If a right-hand instruction requires multiple instruction lines (such as KEEP(11)),all of the lines for the instruction are entered before the right-hand instruction.Each of the lines for the instruction is coded, starting with LD or LD NOT, to form‘logic blocks’ that ...
Instruction Set Lists Section 5-7 125 5-7 Instruction Set Lists This section provides tables of the instructions available in the C200HS. The firsttable can be used to find instructions by function code. The second table can beused to find instruction by mnemonic. In both tables, the @ symbol indica...
129 5-8 Ladder Diagram Instructions Ladder Diagram instructions include Ladder instructions and Logic Blockinstructions and correspond to the conditions on the ladder diagram. Logic blockinstructions are used to relate more complex parts. 5-8-1 LOAD, LOAD NOT, AND, AND NOT, OR, and OR NOT B: Bit IR,...
130 5-8-2 AND LOAD and OR LOAD Ladder Symbol AND LOAD – AND LD 00002 00003 00000 00001 Ladder Symbol OR LOAD – OR LD 00000 00001 00002 00003 Description When instructions are combined into blocks that cannot be logically combinedusing only OR and AND operations, AND LD and OR LD are used. WhereasAND...
132 Precautions DIFU(13) and DIFD(14) operation can be uncertain when the instructions areprogrammed between IL and ILC, between JMP and JME, or in subroutines. Re-fer to 5-10 INTERLOCK and INTERLOCK CLEAR – IL(02) and ILC(03), 5-11 JUMP and JUMP END – JMP(04) and JME(05), and 5-23 Subroutines and I...
134 Description KEEP(11) is used to maintain the status of the designated bit based on two exe-cution conditions. These execution conditions are labeled S and R. S is the setinput; R, the reset input. KEEP(11) operates like a latching relay that is set by Sand reset by R. When S turns ON, the design...
135 Example If a HR bit or an AR bit is used, bit status will be retained even during a powerinterruption. KEEP(11) can thus be used to program bits that will maintain statusafter restarting the PC following a power interruption. An example of this that canbe used to produce a warning display follow...
137 Example The following diagram shows IL(02) being used twice with one ILC(03). 00000 00001 ILC(03) IL(02) 00004 00005 00003 00002 IL(02) 00502 TIM 511 CP R CNT 001 IR 010 00100 001.5 s TIM 511 #0015 Address Instruction Operands 00000 LD 00000 00001 IL(02) 00002 LD 00001 00003 TIM 511 # 0015 00004...
138 If the jump number for JMP(04) is 00, the CPU will look for the next JME(05) witha jump number of 00. To do so, it must search through the program, causing alonger cycle time (when the execution condition is OFF) than for other jumps.The status of timers, counters, bits used in OUT, bits used in...
139 Any one TC number cannot be defined twice, i.e., once it has been used as thedefiner in any of the timer or counter instructions, it cannot be used again. Oncedefined, TC numbers can be used as many times as required as operands ininstructions other than timer and counter instructions. TC number...
140 If the execution condition remains ON long enough for TIM to time down to zero,the Completion Flag for the TC number used will turn ON and will remain ONuntil TIM is reset (i.e., until its execution condition is goes OFF). The following figure illustrates the relationship between the execution c...
142 The length of time that a bit is kept ON or OFF can be controlled by combiningTIM with OUT or OUT NO. The following diagram demonstrates how this is pos-sible. In this example, 00204 would remain ON for 1.5 seconds after 00000 goesON regardless of the time 00000 stays ON. This is achieved by usi...
150 5-15 Data Shifting All of the instructions described in this section are used to shift data, but in differ-ing amounts and directions. The first shift instruction, SFT(10), shifts an execu-tion condition into a shift register; the rest of the instructions shift data that is al-ready in memory. 5...
153 Description SFTR(84) is used to create a single- or multiple-word shift register that can shiftdata to either the right or the left. To create a single-word register, designate thesame word for St and E. The control word provides the shift direction, the statusto be put into the register, the sh...
156 5-15-7 ONE DIGIT SHIFT LEFT – SLD(74) Ladder Symbols Operand Data Areas SLD(74) St E @SLD(74) St E St: Starting word IR, SR, AR, DM, HR, LR E: End word IR, SR, AR, DM, HR, LR Limitations St and E must be in the same data area, and St must be less than or equal to E. Description When the executio...
158 Description When the execution condition is OFF, ASFT(17) does nothing and the programmoves to the next instruction. When the execution condition is ON, ASFT(17) isused to create and control a reversible asynchronous word shift register be-tween St and E. This register only shifts words when the...
160 5-16-3 BLOCK SET – BSET(71) S: Source data IR, SR, AR, DM, HR, TC, LR, # St: Starting word IR, SR, AR, DM, HR, TC, LR Ladder Symbols Operand Data Areas E: End Word IR, SR, AR, DM, HR, TC, LR BSET(71) S St E @BSET(71) S St E Limitations St must be less than or equal to E, and St and E must be in ...
161 Example The following example shows how to use BSET(71) to change the PV of a timerdepending on the status of IR 00003 and IR 00004. When IR 00003 is ON, TIM010 will operate as a 50-second timer; when IR 00004 is ON, TIM 010 will oper-ate as a 30-second timer. TIM 010 #9999 @BSET(71) #0500 TIM 0...
162 Flags ER: N is not BCD between 0000 and 2000. S and S+N or D and D+N are not in the same data area. Indirectly addressed DM word is non-existent. (Content of ∗ DM word is not BCD, or the DM area boundary has been exceeded.) 5-16-5 DATA EXCHANGE – XCHG(73) E1: Exchange word 1 IR, SR, AR, DM, HR, ...
163 When the execution condition is OFF, DIST(80) is not executed. When the exe-cution condition is ON, DIST(80) operates a stack from DBs to DBs+C–9000.DBs is the stack pointer, so S is copied to the word indicated by DBs and DBs isincremented by 1. Specifies the stack length (000 to 999). A value ...
164 5-16-7 DATA COLLECT – COLL(81) SBs: Source base word IR, SR, AR, DM, HR, TC, LR C: Offset data (BCD) IR, SR, AR, DM, HR, TC, LR, # Ladder Symbols Operand Data Areas D: Destination word IR, SR, AR, DM, HR, TC, LR COLL(81) SBs C D @COLL(81) SBs C D Limitations C must be a BCD. If C ≤ 6655, SBs mus...
167 Description When the execution condition is OFF, MOVB(82) is not executed. When the exe-cution condition is ON, MOVB(82) copies the specified bit of S to the specified bitin D. The bits in S and D are specified by Bi. The rightmost two digits of Bi desig-nate the source bit; the leftmost two bit...
168 Digit Designator The following show examples of the data movements for various values of Di. 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 S Di: 0031 Di: 0023 Di: 0030 Di: 0010 S S S 0 1 2 3 D 0 1 2 3 D 0 1 2 3 D 0 1 2 3 D Flags ER: At least one of the rightmost three digits of Di is not between 0 and 3. Indi...
169 Example In the following example, XFRB(62) is used to transfer 5 bits from IR 020 toLR 21 when IR 00001 is ON. The starting bit in IR 020 is 0, and the starting bit inLR 21 is 4, so IR 02000 to IR 02004 are copied to LR 2104 to LR 2108. XFRB(62) #0540 IR 020 LR 21 00001 Address Instruction Opera...
170 Example The following example shows the comparisons made and the results providedfor MCMP(19). Here, the comparison is made during each cycle when 00000 isON. IR 100 0100 DM 0200 0100 DM 030000 0 IR 101 0200 DM 0201 0200 DM 030001 0 IR 102 0210 DM 0202 0210 DM 030002 0 IR 103 ABCD DM 0203 0400 D...
171 Flags ER: Indirectly addressed DM word is non-existent. (Content of ∗ DM word is not BCD, or the DM area boundary has been exceeded.) EQ: ON if Cp1 equals Cp2. LE: ON if Cp1 is less than Cp2. GR: ON if Cp1 is greater than Cp2. Flag Address C1 < C2 C1 = C2 C1 > C2 GR 25505 OFF OFF ON EQ 255...
174 5-17-4 BLOCK COMPARE – BCMP(68) CD: Compare data IR, SR, AR, DM, HR, TC, LR, # CB: First comparison block word IR, DM, HR, TC, LR Ladder Symbols Operand Data Areas R: Result word IR, SR, AR, DM, HR, TC, LR BCMP(68) CD CB R @BCMP(68) CD CB R Limitations Each lower limit word in the comparison blo...
175 Example The following example shows the comparisons made and the results providedfor BCMP(68). Here, the comparison is made during each cycle when 00000 isON. CD 001 Lower limits Upper limits R: HR 05 001 0210 HR 10 0000 HR 11 0100 HR 0500 0 HR 12 0101 HR 13 0200 HR 0501 0 HR 14 0201 HR 15 0300 ...
176 Example The following example shows the comparisons made and the results providedfor TCMP(85). Here, the comparison is made during each cycle when 00000 isON. CD: 001 Upper limits R: HR 05 001 0210 HR 10 0100 HR 0500 0 HR 11 0200 HR 0501 0 HR 12 0210 HR 0502 1 HR 13 0400 HR 0503 0 HR 14 0500 HR ...
180 5-18 Data Conversion The conversion instructions convert word data that is in one format into anotherformat and output the converted data to specified result word(s). Conversionsare available to convert between binary (hexadecimal) and BCD, to 7-segmentdisplay data, to ASCII, and between multipl...
185 5-18-7 4-TO-16 DECODER – MLPX(76) S: Source word IR, SR, AR, DM, HR, TC, LR C: Control word IR, SR, AR, DM, HR, TC, LR, # Ladder Symbols Operand Data Areas R: First result word IR, SR, AR, DM, HR, LR MLPX(76) S C R @MLPX(76) S C R Limitations When the leftmost digit of C is 0, the rightmost two ...
186 Some example C values and the digit-to-word conversions that they produceare shown below. 0 1 2 3 R R + 1 R R + 1 R + 2 0 1 2 3 0 1 2 3 0 1 2 3 R R + 1 R + 2 R + 3 R R + 1 R + 2 R + 3 S C: 0031 C: 0023 C: 0030 C: 0010 S S S The following is an example of a one-digit decode operation from digit n...
187 The 4 possible C values and the conversions that they produce are shown be-low. (In S, 0 indicates the rightmost byte and 1 indicates the leftmost byte.) 0 1 R to R+15 R+16 to R+31 S C: 1000 0 1 R to R+15 R+16 to R+31 S C: 1010 0 1 R to R+15 R+16 to R+31 S C: 1011 0 1 R to R+15 R+16 to R+31 S C:...
188 The following program converts three digits of data from LR 20 to bit positionsand turns ON the corresponding bits in three consecutive words starting withHR 10. 00000 MLPX(76) DM 0020 #0021 HR 10 Address Instruction Operands 00000 LD 00000 00001 MLPX(76) LR 20 # 0021 HR 10 S: LR 20 R: HR 10 R+1...
191 When 00000 is ON, the following diagram encodes IR words 010 and 011 to thefirst two digits of HR 20 and then encodes LR 10 and 11 to the last two digits ofHR 20. Although the status of each source word bit is not shown, it is assumedthat the bit with status 1 (ON) shown is the highest bit that ...
192 Any or all of the digits in S may be converted in sequence from the designatedfirst digit. The first digit, the number of digits to be converted, and the half of D toreceive the first 7-segment display code (rightmost or leftmost 8 bits) are desig-nated in Di. If multiple digits are designated, ...
196 Limitations Di must be within the values given below. All source words must be in the same data area. Bytes in the source words must contain the ASCII code equivalent of hexadeci-mal values, i.e., 30 to 39 (0 to 9), 41 to 46 (A to F), or 61 to 66 (a to f). Description When the execution conditio...
197 Some examples of Di values and the 8-bit ASCII to 4-bit hexadecimal conver-sions that they produce are shown below. 0 1 2 3 D Di: 0011 S Di: 0030 Di: 0133 Di: 0023 1 st byte 2 nd byte S 1 st byte 2 nd byte S+1 1 st byte 2 nd byte 0 1 2 3 D S 1 st byte 2 nd byte S+1 1 st byte 2 nd byte 0 1 2 3 D ...
198 Flags ER: Incorrect digit designator, or data area for destination exceeded. Indirectly addressed DM word is non-existent. (Content of ∗ DM word is not BCD, or the DM area boundary has been exceeded.) Example In the following example, the 2 nd byte of LR 10 and the 1 st byte of LR 11 are con- ve...
199 The following table shows the functions and ranges of the parameter words: Parameter Function Range Comments P1 BCD point #1 (A Y ) 0000 to 9999 --- P1+1 Hex. point #1 (A X ) 0000 to FFFF Do not set P1+1=P1+3. P1+2 BCD point #2 (B Y ) 0000 to 9999 --- P1+3 Hex. point #2 (B X ) 0000 to FFFF Do no...
200 5-18-13 COLUMN TO LINE – LINE(63) S: First word of 16 word source set IR, SR, AR, DM, HR, TC, LR C: Column bit designator (BCD) IR, SR, AR, DM, HR, TC, LR, # Ladder Symbols Operand Data Areas D: Destination word IR, SR, AR, DM, HR, TC, LR LINE(63) S C D @LINE(63) S C D Limitations S and S+15 mus...
201 5-18-14 LINE TO COLUMN – COLM(64) S: Source word IR, SR, AR, DM, HR, TC, LR C: Column bit designator (BCD) IR, SR, AR, DM, HR, TC, LR, # Ladder Symbols Operand Data Areas D: First word of the destination set IR, AR, DM, HR, TC, LR COLM(64) S D C @COLM(64) S D C Limitations D and D+15 must be in ...
204 5-19 BCD Calculations The BCD calculation instructions – INC(38), DEC(39), ADD(30), ADDL(54),SUB(31), SUBL(55), MUL(32), MULL(56), DIV(33), DIVL(57), FDIV(79), andROOT(72) – all perform arithmetic operations on BCD data. For INC(38) and DEC(39) the source and result words are the same. That is, ...
207 Flags ER: Au and/or Ad is not BCD. Indirectly addressed DM word is non-existent. (Content of ∗ DM word is not BCD, or the DM area boundary has been exceeded.) CY: ON when there is a carry in the result. EQ: ON when the result is 0. Example When 00000 is ON, the following program adds two 12-digi...
209 Note The actual SUB(31) operation involves subtracting Su and CY from 10,000 plus Mi. For positive results the leftmost digit is truncated. For negative results the10s complement is obtained. The procedure for establishing the correct answeris given below. First SubtractionIR 010 1029DM 0100 – 3...
214 Description When the execution condition is OFF, DIVL(57) is not executed. When the exe-cution condition is ON, DIVL(57) the eight-digit content of Dd and D+1 is dividedby the content of Dr and Dr+1 and the result is placed in R to R+3: the quotient inR and R+1, the remainder in R+2 and R+3. R+1...
215 To represent the floating point values, the rightmost seven digits are used for themantissa and the leftmost digit is used for the exponent, as shown below. Themantissa is expressed as a value less than one, i.e., to seven decimal places. 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 First wor...
217 5-19-14 SQUARE ROOT – ROOT(72) Sq: First source word (BCD) IR, SR, AR, DM, HR, TC, LR R: Result word IR, SR, AR, DM, HR, LR, Ladder Symbols Operand Data Areas ROOT(72) Sq R @ROOT(72) Sq R Limitations Sq and Sq+1 must be in the same data area. Description When the execution condition is OFF, ROOT...
219 5-20 Binary Calculations Binary calculation instructions — ADB(50), SBB(51), MLB(52), DVB(53),ADBL(––), SBBL(––), MBS(––), MBSL(––), DBS(––), and DBSL(––) — performarithmetic operations on hexadecimal data. Four of these instructions (ADB(50), SBB(51), ADBL(––), and SBBL(––)) canact on both norm...
221 In the case below, 25,321 +(–13,253) = 12,068 (62E9 + CC3B = 2F24). NeitherOF nor UF are turned ON. Au: LR 20 6 2 E 9 Ad: DM 0010 C C 3 B + Ad: DM 0010 2 F 2 4 Note The status of the CY flag can be ignored when adding signed binary data since it is relevant only in the addition of normal hexadec...
222 Example 1: Normal Data The following example shows a four-digit subtraction with CY used to place ei-ther #0000 or #0001 into R+1 to ensure that any carry is preserved. CLC(41) 00001 SBB(51) 001 LR20 HR 21 MOV(21) #0000 HR 22 MOV(21) #0001 HR 22 TR 1 25504 25504 = R = R+1 = R+1 Address Instructi...
226 ADBL(––) can also be used to add signed binary data. The underflow and over-flow flags (SR 25404 and SR 25405) indicate whether the result has exceededthe lower or upper limits of the 32-bit signed binary data range. Refer to page 29for details on signed binary data. Flags ER: Indirectly address...
229 In the case below, 1,799,100,099 – (–282,751,929) = 2,081,851,958(6B3C 167D – {EF25 8C47 – 1 0000 0000} = 7C16 8A36). Neither OF nor UFare turned ON. Au + 1 : 001 Au : 000 Ad + 1 : DM 0021 Ad : DM 0020 6 B 3 C 1 6 7 D E F 2 5 8 C 4 7 0 – R + 1 : LR 22 R : LR 21 8 A 3 6 7 C 1 6 0 CY (Cleared with...
230 Example In the following example, MBS(––) is used to multiply the signed binary contentsof IR 001 with the signed binary contents of DM 0020 and output the result toLR 21 and LR 22. MBS(––) 001 DM 0020 LR 21 Address Instruction Operands 00000 LD 00000 00001 MBS(––) 001 DM 0020 LR 21 00000 Md: IR...
233 Example In the following example, DBSL(––) is used to divide the signed binary contentsof IR 002 and IR 001 with the signed binary contents of DM 0021 and DM 0020and output the result to LR 24 through LR 21. DBSL(––) 001 DM 0020 LR 21 Address Instruction Operands 00000 LD 00000 00001 DBSL(––) 00...
! 235 If bit 14 of C is ON and more than one address contains the same minimum val-ue, the position of the lowest of the addresses will be output to D+1. The number of words within the range (N) is contained in the 3 rightmost digits ofC, which must be BCD between 001 and 999. When bit 15 of C is OF...
236 On the N th cycle, the previous value of S is written to last word in the range D+2 to D+N+1. The average value of the previous values stored in D+2 to D+N+1 is cal-culated and written to D, bit 15 of D+1 is turned ON, and the previous value point-er (the first 2 digits of D+1) is reset to zero....
237 Example In the following example, the content of IR 040 is set to #0000 and then increm-ented by 1 each cycle. For the first two cycles, AVG(––) moves the content ofIR 040 to DM 1002 and DM 1003. The contents of DM 1001 will also change(which can be used to confirm that the results of AVG(––) ha...
238 Description When the execution condition is OFF, SUM(––) is not executed. When the ex-ecution condition is ON, SUM(––) adds either the contents of words R 1 to R 1 +N–1 or the bytes in words R 1 to R 1 +N/2–1 and outputs that value to the desti- nation words (D and D+1). The data can be summed a...
239 Example In the following example, the BCD contents of the 8 words from DM 0000 toDM 0007 are added when IR 00001 is ON and the result is written to DM 0010and DM 0011. @SUM(––) DM 0000 #4008 00001 DM 0010 Address Instruction Operands 00000 LD 00001 00001 @SUM(––) # 4008 DM 0000 DM 0010 DM 0000 0...
240 Examples Sine Function The following example demonstrates the use of the APR(69) sine function to cal-culate the sine of 30 ° . The sine function is specified when C is #0000. Input data, x Result data S: DM 0000 D: DM 0100 0 10 1 10 0 10 –1 10 –1 10 –2 10 –3 10 –4 0 3 0 0 5 0 0 0 APR(69) #0000 ...
Y 0 X 0 X 1 X 2 X 3 X 4 X m X Y Y m Y 4 Y 3 Y 1 Y 2 241 Enter the coordinates of the m+1 end-points, which define the m line segments,as shown in the following table. Enter all coordinates in BIN form. Always enterthe coordinates from the lowest X value (X 1 ) to the highest (X m ). X 0 is 0000, and...
! 242 In this case, the input data word, IR 010, contains #0014, and f(0014) = #0726 isoutput to R, IR 011. X Y $1F20 $0F00 $0726 $0402 (0,0) $0005 $0014 $001A $05F0 (x,y) 5-21-6 PID CONTROL – PID(––) S: Input word IR, SR, AR, DM, HR, LR, C: First parameter word IR, SR, DM, HR, LR Operand Data Areas...
243 Parameter Settings Item Contents Setting range Set value (SV) This is the target value of the process beingcontrolled. Binary data (of the samenumber of bits as specified forthe input range) Proportional band This is the parameter for P control expressingthe proportional control range/total cont...
244 When overshooting is prevented with simple PID control, stabilization of distur-bances is slowed (1). If stabilization of disturbances is speeded up, on the otherhand, overshooting occurs and response toward the target value is slowed (2).With feed-forward PID control, there is no overshooting, ...
246 without hunting, integral operation to automatically correct any offset, and deriv-ative operation to speed up the response to disturbances. PID Operation Output Step Response PID Operation Output Lamp Response PID operationI operationP operation D operation Ramp response 0 0 Deviation Operation...
247 hunting will be reduced if the integral time is increased or the proportional bandis enlarged. Control by measured PID (when loose hunting occurs) Enlarge I or P. SV • If the period is short and hunting occurs, it may be that the control system re-sponse is quick and the derivative operation is ...
248 Creating the Program Follow the procedure outlined below in creating the program. 1, 2, 3... 1. Set the target value (binary 0000 to 0FFF) in DM 0000. 2. Input the PV of the temperature sensing element (binary 000 to 0FFF) in bits 0 to 11 of word 101. 3. Output the operation amount of the heater...
249 Note When using PID(––) or SCL(––), make the data settings in advance with a Pe- ripheral Device such as the Programming Console or LSS. Target value HR Proportional band Integral time/sampling period Derivative time/sampling period Sampling period Forward/reverse designation/PID parametersI/O r...
253 5-22-5 EXCLUSIVE NOR – XNRW(37) I1: Input 1 IR, SR, AR, DM, HR, TC, LR, # I2: Input 2 IR, SR, AR, DM, HR, TC, LR, # Ladder Symbols Operand Data Areas R: Result word IR, SR, AR, DM, HR, LR XNRW(37) I1 I2 R @XNRW(37) I1 I2 R Description When the execution condition is OFF, XNRW(37) is not executed...
254 INT(89) is used to control the interrupt signals received from the Interrupt InputUnit, and also to control the scheduling of the scheduled interrupt. INT(89) pro-vides such functions as masking of interrupts (so that they are recorded but ig-nored) and clearing of interrupts. Refer to 5-23-2 In...
256 The PC Setup for the C200HS contains settings in DM 6620 that disable refresh-ing in the normal cycle for specific Special I/O Units. This settings are as shownbelow. Interrupt mode(1 = high-speed) Bit 15 00 1 0 0 * * * * * * * * * * Unit #0 Unit #1 ... Unit #9 DM6620 12 Note Disabling special I...
! 259 The following diagram illustrates program execution flow for various executionconditions for two SBS(91). SBS(91) 00 SBS(91) 01 SBN(92) 00 RET(93) SBN(92) 01 RET(93) END(01) Main program Subroutines A B C D E A A A A B B B B C C C C D D E E OFF execution conditions for subroutines 00 and 01 ON...
260 All subroutines must be programmed at the end of the main program. When oneor more subroutines have been programmed, the main program will be ex-ecuted up to the first SBN(92) before returning to address 00000 for the nextcycle. Subroutines will not be executed unless called by SBS(91). END(01) ...
263 Description INT(89) is used to control interrupts and performs one of 8 functions dependingon the values of C and N. As shown in the following tables, three of the functionsact on input interrupts, three act on the scheduled interrupt, and the other twomask or unmask all interrupts. Interrupt Va...
264 Flags ER: Indirectly addressed DM word is non-existent. (Content of : DM word is not BCD, or the DM area boundary has been exceeded.) C, and/or N are not within specified values. Example 1: Input Interrupt This example shows how to unmask a particular interrupt input. Input interruptsubroutines ...
266 5-24 Step Instructions The step instructions STEP(08) and SNXT(09) are used in conjunction to set upbreakpoints between sections in a large program so that the sections can be ex-ecuted as units and reset upon completion. A section of program will usually bedefined to correspond to an actual pro...
268 Flags 25407: Step Start Flag; turns ON for one cycle when STEP(08) is executed and can be used to reset counters in steps as shown below if necessary. SNXT(09) 01000 CP R CNT 01 #0003 00000 00100 25407 STEP(08) 01000 1 cycle 25407 01000 Start Address Instruction Operands Address Instruction Oper...
275 Address Instruction Operands Address Instruction Operands 00000 LD 00001 00001 SNXT(09) LR 0000 00002 SNXT(09) LR 0002 00003 STEP(08) LR 0000 Process A 00100 LD 00002 00101 SNXT(09) LR 0001 00102 STEP(08) LR 0001 Process B 00100 LD 01101 00101 OUT LR 0003 00101 AND 00004 00101 SNXT(09) LR 0004 0...
276 FAL(06) produces a non-fatal error and FAL(07) produces a fatal error. WhenFAL(06) is executed with an ON execution condition, the ALARM/ERROR indi-cator on the front of the CPU will flash, but PC operation will continue. WhenFALS(07) is executed with an ON execution condition, the ALARM/ERROR i...
277 5-25-3 TRACE MEMORY SAMPLING – TRSM(45) Data tracing can be used to facilitate debugging programs. To set up and usedata tracing it is necessary to have a host computer running LSS; no datatracing is possible from a Programming Console. Data tracing is described indetail in the LSS Operation Man...
278 The sampled data is written to trace memory, jumping to the beginning of thememory area once the end has been reached and continuing up to the startmarker. This might mean that previously recorded data (i.e., data from this sam-ple that falls before the start marker) is overwritten (this is espe...
MSGABCDEFGHIJKLMNOP 279 In handling indirectly addressed messages (i.e. : DM), those with the lowest DM address values have higher priority. Clearing Messages To clear a message, execute FAL(06) 00 or clear it via a Programming Consoleusing the procedure in 4-6-5 Clearing Error Messages. If the mess...
280 Description LMSG(47) is used to output a 32-character message to a Programming Con-sole. The message to be output must be in ASCII beginning in word S and end-ing in S+15, unless a shorter message is desired. A shorter message can be pro-duced by placing a null character (00) into the string; no...
281 Example In the following example, TERM(48) is used to switch the Programming Consoleto TERMINAL mode when 00000 is ON. Be sure that pin 6 of the CPU’s DIPswitch is OFF. TERM(48) 000 000 000 00000 Address Instruction Operands 00000 LD 00000 00001 TERM(48) 000 000 000 5-25-7 WATCHDOG TIMER REFRESH...
282 To refresh I/O words allocated to Special I/O Units (IR 100 to IR 199), indicate theunit numbers of the Units by designating IR 040 to IR 049 (see note). IR 040 toIR 049 correspond to Special I/O Units 0 to 9. For example, set St to IR 043 and Eto IR 045 to refresh the I/O words allocated to Spe...
283 Refer to 6-1 Cycle Time for a table showing I/O refresh times for Group-2 High-density I/O Units. Flags ER: St or E is not BCD between #0000 and #0009. St is greater than E. 5-25-10 BIT COUNTER – BCNT(67) N: Number of words (BCD) IR, SR, AR, DM, HR, TC, LR, # SB: Source beginning word IR, SR, AR...
284 The function of bits in C are shown in the following diagram and explained inmore detail below. 15 14 13 12 11 00 Number of items in range (N, BCD)001 to 999 words or bytes First byte (when bit 13 is ON)1 (ON): Rightmost 0 (OFF): Leftmost Calculation units1 (ON): Bytes 0 (OFF): Words C: Not used...
285 Example When IR 00000 is ON in the following example, the frame checksum (0008) iscalculated for the 8 words from DM 0000 to DM 0007 and the ASCII equivalent(30 30 30 38) is written to DM 0011 and DM 0010. @FCS(––) DM 0000 #0008 00000 DM 0010 Address Instruction Operands 00000 LD 00000 00001 @FC...
286 When the execution condition is OFF, FPD(––) is not executed. When the exe-cution condition is ON, FPD(––) monitors the time until the logic diagnosticscondition goes ON, turning ON the diagnostic output. If this time exceeds T, thefollowing will occur: 1, 2, 3... 1. An FAL(06) error is generate...
290 Example In the following example, the 10 word range from DM 0010 to DM 0019 issearched for addresses that contain the same data as DM 0000 (#FFFF). SinceDM 0012 contains the same data, the EQ Flag (SR 25506) is turned ON and#0012 is written to DM 0001. @SRCH(––) DM 0010 #0010 00001 DM 0000 Addre...
291 Example In the following example, the 100 word range from DM 7000 through DM 7099 iscopied to DM 0010 through DM 0109 when IR 00001 is ON. @XDMR(––) #7000 #0100 00001 DM 0010 Address Instruction Operands 00000 LD 00001 00001 @XDMR(––) # 0100 # 7000 DM 0010 DM 7000 DM 9999 DM 7000 to DM 7099 DM 0...
292 The status of bit 15 of C+1 determines whether the instruction is for a SYSMACNET Link System or a SYSMAC LINK System. Control Data SYSMAC NET Link Systems The destination port number is always set to 0. Set the destination node numberto 0 to send the data to all nodes. Set the network number to...
293 Flags ER: The specified node number is greater than 126 in a SYSMAC NET LinkSystem or greater than 62 in a SYSMAC LINK System. The sent data overruns the data area boundaries. Indirectly addressed DM word is non-existent. (Content of : DM word is not BCD, or the DM area boundary has been exceede...
294 SYSMAC LINK Systems Refer to the SYSMAC LINK System Manual for details. Word Bits 00 to 07 Bits 08 to 15 C Number of words (0 to 256 in 4-digit hexadecimal, i.e., 0000 hex to 0100 hex ) C+1 Response time limit (0.1 and 25.4seconds in 2-digit hexadecimalwithout decimal point, i.e., 00 hex to FF h...
295 5-26-3 About Network Communications SEND(90) and RECV(98) are based on command/response processing. Thatis, the transmission is not complete until the sending node receives and ac-knowledges a response from the destination node. Note that theSEND(90)/RECV(98) Enable Flag is not turned ON until t...
297 Address Instruction Operands Address Instruction Operands 00000 LD 00000 00001 AND 25204 00002 AND NOT 12802 00003 LD 12801 00004 KEEP(11) 12800 00005 LD 12800 00006 @MOV(21) # 000A DM 0000 00007 @MOV(21) # 0000 DM 0001 00008 @MOV(21) # 0003 DM 00002 00009 @XFER(70) # 0010 000 DM 0002 00010 @SEN...
! 298 Note RXD(––) is required to receive data via the peripheral port or RS-232C port only. Transmission sent from a host computer to a Host Link Unit are processed auto-matically and do not need to be programmed. Caution The PC will be incapable of receiving more data once 256 bytes have been rece...
299 5-27-2 TRANSMIT – TXD(––) S: First source word IR, SR, AR, DM, HR, TC, LR C: Control word IR, SR, AR, DM, HR, TC, LR, # Ladder Symbols Operand Data Areas N: Number of bytes IR, SR, AR, DM, HR, TC, LR, # TXD(––) S C N @TXD(––) S C N Limitations S and S+(N ÷ 2)–1 must be in the same data area. N m...
300 The following diagram shows the format for host link command (TXD) sent fromthe C200HS. The C200HS automatically attaches the prefixes and suffixes,such as the node number, header, and FCS. @ X X X X X X ......... X X X ∗ CR Header code (EX) Data (122 ASCII characters max.) FCS Node number Termi...
301 5-28 Advanced I/O Instructions Advanced I/O instructions enable control, with a single instruction, of previouslycomplex operations involving external I/O devices (digital switches, 7-segmentdisplays, etc.). There are five advanced I/O instructions, as shown in the following table. All ofthese a...
302 If there are 8 digits of source data, they are placed in S and S+1, with the mostsignificant digits placed in S+1. If there are 4 digits of source data, they areplaced in S. 7SEG(––) displays the 4 or 8-digit data in 12 cycles, and then starts over andcontinues displaying the data. The 7-segment...
303 2. The 7-segment display may require either positive or negative logic, de- pending on the model. 3. The 7-segment display must have 4 data signal lines and 1 latch signal line for each digit. Using the Instruction If the first word holding the data to be displayed is specified at S, and the out...
305 Hardware With this instruction, 8-digit BCD set values are read from a digital switch.DSW(––) utilizes 5 output bits and 8 input bits. Connect the digital switch and theInput and Output Units as shown in the diagram below. Output point 5 will beturned ON when one round of data is read, but there...
306 The following example illustrates connections for an A7B Thumbwheel Switch. 1 3 5 7 9 11 13 15 COM 0 2 4 6 8 10 12 14 COM ID212 Input Unit Switch no. 8 1 3 5 7 9 11 13 15 COM 0 2 4 6 8 10 12 14 DC OD212 1 2 4 8 7 6 5 4 3 2 1 C Output Unit A7BThumbwheelSwitch Note The data read signal is not requ...
307 Using the Instruction If the input word for connecting the digital switch is specified at for word A, andthe output word is specified for word B, then operation will proceed as shownbelow when the program is executed. 00 01 02 03 04 05 Wd 0 10 0 10 1 10 2 10 3 D+1 D Four digits: 00 to 03 Eight d...
308 5-28-3 HEXADECIMAL KEY INPUT – HKY(––) OW: Control signal output word IR, SR, AR, HR, LR IW: Input word IR, SR, AR, HR, LR Ladder Symbols Operand Data Areas HKY(––) IW OW D D: First register word IR, SR, AR, DM, HR, LR Limitations D and D+2 must be in the same data area. Overview When the execut...
313 5-28-5 MATRIX INPUT – MTR(––) OW: Output word IR, SR, AR, HR, LR IW: Input word IR, SR, AR, HR, LR Ladder Symbols Operand Data Areas MTR(––) IW OW D D: First destination word IR, SR, AR, DM, HR, LR Limitations D and D+3 must be in the same data area. Overview When the execution condition is OFF,...
318 6-1 Cycle Time To aid in PC operation, the average, maximum, and minimum cycle times can bedisplayed on the Programming Console or any other Programming Device andthe maximum cycle time and current cycle time values are held in AR 26 andAR 27. Understanding the operations that occur during the c...
319 Flowchart of CPU Operation YES NO NO Power application Clears IR area andresets all timers Checks I/O Unit connections Resets watchdog timer Checks hardware andProgram Memory Check OK? Services Host Link ALARM/ERROR Sets error flags and turnsON or flashes indicator Executes user program Resets w...
321 I/O pts to refresh Time required (ms) 512 7.4 256 4.1 128 2.7 64 1.7 Unit Time required per Unit C200H-ID501/215 0.6 ms C200H-OD501/215 0.6 ms when set for 32 I/O pts. C200H-MD501/215 1.6 ms when set for dynamic I/O C200H-CT001-V1/CT002 2.6 ms C200H-NC111/NC112 2.5 ms C200H-NC211 5.0 ms C200H-AD...
! 322 Even if the cycle time does not exceed the set value of the watchdog timer, a longcycle time can adversely affect the accuracy of system operations as shown inthe following table. Cycle time (ms) Possible adverse affects 10 or greater TIMH(15) inaccurate when TC 016 through TC 511 are used.(Ac...
323 Calculations The equation for the cycle time from above is as follows: Cycle time = Overseeing time + Program execution time + I/O refresh time +Peripheral device servicing time Process Calculation With Peripheral Device Without Peripheral Device Overseeing Fixed 0.7 ms 0.7 ms Program execution ...
324 Calculations The equation for the cycle time is as follows:Cycle time = Overseeing time + Program execution time+ I/O refreshing time + Host Link Unit servicing time+ Peripheral device servicing time Process Calculation With Peripheral Device Without Peripheral Device Overseeing Fixed 0.7 ms 0.7...
334 The PC takes longest to respond when it receives the input signal just after theI/O refresh phase of the cycle. In this case the CPU does not recognize the inputsignal until the end of the next cycle. The maximum response time is thus onecycle longer than the minimum I/O response time, except th...
! 335 In looking at the following timing charts, it is important to remember the se-quence in which processing occurs during the PC scan, particular that inputs willnot produce programmed actions until the program has been executed. When calculating the response times involving inputs and outputs fr...
336 Example Calculations Calculations would be as shown below for an input ON delay of 1.5 ms, an out-put ON delay of 15 ms, and a cycle time of 20 ms. Minimum I/O Response Time Time = 1.5 ms + (20 ms x 3) + 15 ms = 76.5 ms Maximum I/O Response Time Time = 1.5 ms + (20 ms x 4) + 15 ms = 96.5 ms Note...
! 337 6-4-4 PC Link Systems The processing that determines and the methods for calculating maximum andminimum response times from input to output are provided in this subsection.The following System and I/O program steps will be used in all examples below.This System contains eight PC Link Units. In...
338 Inserting the following values into this equation produces a minimum I/O re-sponse time of 149.3 ms. Input ON delay: 1.5 ms Output ON delay: 15 ms Cycle time for PC of Unit 0: 20 ms Cycle time for PC of Unit 7: 50 ms The following diagram illustrates the data flow that will produce the maximumre...
339 Induction sequence processing: 15 ms x (8 PCs – 8 PCs) = 0 ms I/O refresh bits for Unit 0 256 I/O refresh bits for Unit 7 256 Reducing Response Time IORF(97) can be used in programming to shorten the I/O response time greaterthan is possible by setting a high number of refresh bits. (Remember, i...
341 3. Communications are completed just after the slave executes communica- tions servicing. I/O refresh Overseeing, communica-tions, etc. Input ON delay Master Inputpoint Inputbit CPUprocessing Cycle time Instructionexecution Instructionexecution Instructionexecution Instructionexecution Instructi...
342 Scheduled Interrupts Hardware time clock Scheduled interruptsubroutine execution t3 Scheduled in-terrupt interval t3 t3 t3 t3 = Software interrupt response time Total interrupt response time = t3 (software interrupt response time) The software interrupt response time depends on the interrupt res...
346 7-1 Monitoring Operation and Modifying Data The simplest form of operation monitoring is to display the address whose oper-and bit status is to be monitored using the Program Read or one of the searchoperations. As long as the operation is performed in RUN or MONITOR mode,the status of any bit d...
349 +Multiple Address Monitoring 00000 00000TIM 000 T000 0100 00000 T000 0100 00001 T000 0100 00001 T000 OFF 0100 D000000001 T000 ^OFF 0100 D000000001 T000 10FF^ OFF 0100 T000D000000001 0100 10FF^ OFF D000000001 10FF^ OFF 00001^ OFF 00000CONT 00001 00000CHANNEL DM 0000 0000000001S ONR OFF Indicates ...
351 The following displays show what happens when TIM 000 is set with 00100 OFF(i.e., 00500 is turned ON) and what happens when TIM 000 is reset with 00100ON (i.e., timer starts operation, turning OFF 00500, which is turned back ONwhen the timer has finished counting down the SV). (This example is p...
352 Example The following example shows the displays that appear when Restore Status iscarried out normally. 00000 00000 00000FORCE RELE? 00000FORCE RELEEND 7-1-4 Hexadecimal/BCD Data Modification When the Bit/Digit Monitor operation is being performed and a BCD or hexadeci-mal value is leftmost on ...
354 7-1-5 Hex/ASCII Display Change This operation converts DM data displays from 4-digit hexadecimal data to AS-CII and vice versa. Key Sequence Word currently displayed. 00000 00000CH DM 0000 D0000 4412 D0000”AB” D0000 4142 Press TR to change the displayto ASCII code. Press TR again to return thedi...
357 7-1-8 Differentiation Monitor This operation can be used to monitor the up or down differentiation status of bitsin the IR, SR, AR, LR, HR, and TC areas. To monitor up or down differentiationstatus, display the desired bit leftmost on the bit monitor display, and then pressSHIFT and the Up or Do...
358 7-1-9 3-word Monitor To monitor three consecutive words together, specify the lowest numberedword, press MONTR, and then press EXT to display the data contents of thespecified word and the two words that follow it. A CLR entry changes the Three-word Monitor operation to a single-word display. Ke...
359 Example 3-word Monitor in progress. Stops in the middleof monitoring. Resumes previousmonitoring. D0002D0001D0000 0123 4567 89AB D0002 3CH CHG? = 0123 4567 89AB D0002 3CH CHG? 0001 4567 89AB D0002 3CH CHG? 0001 = 4567 89AB D0002 3CH CHG? 0001 = 2345 89AB D0002D0001D0000 0001 2345 89AB D0002D0001...
361 7-1-12 Binary Data Modification This operation assigns a new 16-digit binary value to an IR, HR, AR, LR, or DMword. The cursor, which can be shifted to the left with the up key and to the right with thedown key, indicates the position of the bit that can be changed. After positioningto the desir...
362 IR bit 00115 IR bit 00100 00000 00000CHANNEL 000 00000CHANNEL 001 c001 MONTR0000010101010101 c001 CHG? = 000010101010101 c001 CHG?1 = 00010101010101 c001 CHG?10 = 0010101010101 c001 CHG?100 = 010101010101 c001 CHG?100S = 10101010101 c001 CHG?100 = 010101010101 c001 CHG?10 = S010101010101 c001 MO...
365 7-1-14 Expansion Instruction Function Code Assignments This operation is used to read or change the function codes assigned to expan-sion instructions. There are 18 function codes that can be assigned to expansioninstructions: 17, 18, 19, 47, 48, 60 to 69, and 87 to 89. More than one functioncod...
366 7-1-15 UM Area Allocation This operation is used to allocate part of the UM Area for use as expansion DM. Itcan be performed in PROGRAM mode only. Memory allocated to expansion DMis deducted from the ladder program area. The amount of memory available for the ladder program depends on the amount...
367 7-1-16 Reading and Setting the Clock This operation is used to read or set the CPU’s clock. The clock can be read inany mode, but it can be set in MONITOR or PROGRAM mode only. The CPU will reject entries outside of the acceptable range, i.e., 01 to 12 for themonth, 01 to 31 for the day of the m...
368 Expansion TERMINAL Mode The Programming Console can be put into Expansion TERMINAL mode by turn-ing ON AR 0709. Pin 6 of the CPU’s DIP switch must be ON. Switch the Programming Console to ExpansionTERMINAL mode by turning AR 0709 ON. PROGRAM BZ <MESSAGE>NO MESSAGE PROGRAM BZ CONSOLE mode T...
369 All bits from SR 27700 through SR 27909 will be turned OFF when AR 0708 isturned ON. Expansion keyboard mapping inputs are disabled when AR 0708 isON. In addition to the keyboard mapping function, expansion TERMINAL mode al-lows messages output by MSG(46) and LMSG(47) to be displayed on the Pro-...
374 8-1 Introduction The C200HS supports the following types of communications. • Communications with Programming Devices (e.g., Programming Console,LSS, or SSS.) • Host Link communications with personal computers and other external de-vices. • RS-232C (no-protocol) communications with personal comp...
375 8-2-1 Standard Communications Parameters The settings in DM 6645 and DM 6650 determine the main communications pa-rameters, as shown in the following diagram. The settings in bits 00 through 07 and bits 12 through 15 are valid only when pin5 on the CPU’s DIP switch is OFF. Bits 08 though 11 are ...
376 8-2-2 Specific Communications Parameters The following settings are valid only when pin 5 on the CPU’s DIP switch isturned OFF and DM 6645 and DM 6655 are set to specify using the settings inwords DM 6646 and DM 6656. Be sure to set the communications parameters to the same settings for bothends...
377 8-2-3 Wiring Ports Use the wiring diagram shown below as a guide in wiring the port to the externaldevice. Refer to documentation provided with the computer or other external de-vice for wire details for it. The connections between the C200HS and a personal computer are illustratedbelow as an ex...
379 TXD(––) instruction. In all other cases, data transmission based on aTXD(––) instruction will be given first priority. Application Example This example shows a program for using the RS-232C port in the Host Linkmode to transmit 10 bytes of data (DM 0000 to DM 0004) to a computer. FromDM 0000 to ...
380 PC Setup Start and end codes or the amount of data to be received can be set as shown inthe following diagrams if required for RS-232C communications. This setting isrequired only for RS-232C communications. The following settings are valid only with pin 5 on the CPU’s DIP switch is turnedOFF. E...
381 Start and end codes are not included when the number of bytes to be transmittedis specified. The largest transmission that can be sent with or without start andend codes in 256 bytes, i.e., N will be between 254 and 256 depending on thedesignations for start and end codes. If the number of bytes...
382 Application Example This example shows a program for using the RS-232C port in the RS-232Cmode to transmit 10 bytes of data (DM 0100 to DM 0104) to the computer, and tostore the data received from the computer in the DM area beginning withDM 0200. Before executing the program, the following PC S...
384 When the program is executed at both the master and the slave, the status ofIR 001 of each Unit will be reflected in IR 100 of the other Unit. IR 001 is an inputword and IR 100 is an output word. In the Master 25313 (Always ON) MOV(21) 001 LR00 MOV(21) LR08 100 In the Slave MOV(21) 001 LR08 MOV(...
! ! 386 9-1 Memory Cassettes The C200HS comes equipped with a built-in RAM for the user’s program so pro-grams can be created even without installing a Memory Cassette. An optionalMemory Cassette, however, can provide flexibility in handling program data, PCSetup data, DM data, I/O comment data, and...
387 Word Function Bit(s) SR 270 00 Save UM to Cassette Bit Data transferred to Memory Cassette when Bit is turnedON in PROGRAM mode. Bit will automatically turn OFF. 01 Load UM from Cassette Bit ON in PROGRAM mode. Bit will automatically turn OFF.An error will be produced if turned ON in any othermo...
388 4. Turn on the CPU.5. If the desired program or UM Area data is not already in the CPU, write the data or transfer it to the CPU. 6. Switch the C200HS to PROGRAM mode.7. Turn ON SR 27000 from the LSS or a Programming Console. The UM Area data will be written to the Memory Card and SR 27000 will ...
389 Note The data inside the Memory Cassette should be protected by turning on the write-protect switch whenever you are not planning to write to the Cassette. Writing Data The following procedure is used to write IOM data from the C200HS CPU to aMemory Cassette mounted in the CPU. 1, 2, 3... 1. Tur...
391 SECTION 10 Troubleshooting The C200HS provides self-diagnostic functions to identify many types of abnormal system conditions. These functions mini-mize downtime and enable quick, smooth error correction. This section provides information on hardware and software errors that occur during PC oper...
! 392 10-1 Alarm Indicators The ALM/ERR indicator on the front of the CPU provides visual indication of anabnormality in the PC. When the indicator is ON (ERROR), a fatal error (i.e.,ones that will stop PC operation) has occurred; when the indicator is flashing(ALARM), a nonfatal error has occurred....
393 The type of error can be quickly determined from the indicators on the CPU, asdescribed below for the three types of errors. If the status of an indicator is notmentioned in the description, it makes no difference whether it is lit or not. After eliminating the cause of an error, clear the error...
395 Fatal Operating Errors The following error messages appear for errors that occur after program execu-tion has been started. PC operation and program execution will stop and all out-puts from the PC will be turned OFF when any of the following errors occur. NoCPU indicators will be lit for the po...
396 Error and message Possible correction Probable cause FAL no. Too many Units I/O UNIT OVER E1 Two or more Special I/OUnits are set to thesame unit number Two or more Group-2High-density I/O Unitsare set to the same I/Onumber or I/O word. The I/O number of a64-pt Group-2High-density I/O Unit isset...
397 10-5 Error Flags The following table lists the flags and other information provided in the SR andAR areas that can be used in troubleshooting. Details are provided in 3-4 SR Area and 3-5 AR Area. SR Area Address(es) Function 23600 to 23615 Node loop status for SYSMAC NET Link system 23700 to 237...
399 10-6 Host Link Errors These error codes are received as the response code (end code) when a com-mand received by the C200HS from a host computer cannot be processed. Theerror code format is as shown below. @ X X ↵ : X X X X X X Nodeno. Headercode Terminator FCS End code The header code will vary...
401 SECTION 11 Host Link Commands This section explains the methods and procedures for using host link commands, which can be used for host link communica-tions via the C200HS ports. 11-1 Communications Procedure 402 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....
402 11-1 Communications Procedure Command Chart The commands listed in the chart below can be used for host link communica-tions with the C200HS. These commands are all sent from the host computer tothe PC. Header code PC mode Name Page RUN MON PRG g RR Valid Valid Valid IR/SR AREA READ 407 RL Valid...
403 Host link communications are executed by means an exchange of commandsand responses between the host computer and the PC. With the C200HS, thereare two communications methods that can be used. One is the normal method,in which commands are issued from the host computer to the PC. The othermethod...
404 When commands are issued to the host computer, the data is transmitted in onedirection from the PC to the host computer. If a response to a command is re-quired use a host link communications command to write the response from thehost computer to the PC. 11-2 Command and Response Formats This se...
405 Long Transmissions The largest block of data that can be transmitted as a single frame is 131 charac-ters. A command or response of 132 characters or more must therefore be di-vided into more than one frame before transmission. When a transmission issplit, the ends of the first and intermediate ...
406 time a frame is received and checking the result against the FCS that is includedin the frame makes it possible to check for data errors in the frame. FCS : ↵ 0 1 R R 0 @ 0 0 1 4 2 Text Node no. Header code FCS calculation range Terminator @ 40 0100 0000 EOR 1 31 0011 0001 EOR 0 30 0011 0000 EOR...
407 Reception Format When TXD(––) is executed, the data stored in the words beginning with the firstsend word is converted to ASCII and output to the host computer as a host linkcommand in the format shown below. The “@” symbol, node number, headercode, FCS, and delimiter are all added automatically...
409 cimal as a response. The PVs are returned in order, starting with the specifiedbeginning timer/counter. 11-3-5 TC STATUS READ –– RG Reads the status of the Completion Flags of the specified number of timers/counters, starting from the specified timer/counter. Command Format @ R G FCS x 10 1 x 10...
412 11-3-11 PV WRITE –– WC Writes the PVs (present values) of timers/counters starting from the specifiedtimer/counter. Command Format @ W C FCS x 10 1 x 10 0 x 10 3 x 10 2 : ↵ x 10 1 x 10 0 x 16 3 x 16 2 x 16 1 x 16 0 Node no. Headercode Terminator Beginning timer/counter(0000 to 0511) Write data (...
413 Note If data is specified for writing which exceeds the allowable range, an error will be generated and the writing operation will not be executed. If, for example, 510 isspecified as the beginning word for writing, and three words of data are speci-fied, then 512 will become the last word for w...
414 Parameters Write Data (Command)Specify in order the contents of the number of words to be written to the AR areain hexadecimal, starting with the specified beginning word. Note If data is specified for writing which exceeds the allowable range, an error will be generated and the writing operatio...
419 Parameters Name, TC Number (Command)In “Name”, specify the name of the instruction, in four characters, for changingthe SV. In “TC number”, specify the timer/counter number used for the instruc-tion. Instruction name Classification TC number OP1 OP2 OP3 OP4 range T I M (S) TIMER 0000 to 0511 T I...
420 Parameters Status Data, Message (Response)“Status data” consists of four digits (two bytes) hexadecimal. The leftmost byteindicates CPU operation mode, and the rightmost byte indicates the size of theprogram area. 15 14 13 12 11 10 9 8 0 0 0 9 8 0 0 1 0 1 1 x 16 3 x 16 2 This area is differentfr...
423 Parameters Name, Word address, Bit (Command)In “Name”, specify the area (i.e., IR, SR, LR, HR, AR, or TC) that is to be forcedset. Specify the name in four characters. In “Word address”, specify the addressof the word, and in “Bit” the number of the bit that is to be forced set. Name Classificat...
424 Note 1. The area specified under “Name” must be in four characters. Fill any gaps with spaces to make a total of four characters. 2. Words 253 to 255 cannot be set when the CIO Area is specified. 11-3-26 MULTIPLE FORCED SET/RESET –– FK Force sets, force resets, or cancels the status of the bits ...
425 Forced set/reset/cancel Data (Command)A separate hexadecimal digit is used to specify the desired process for each bitin the specified word, bits 00 to bit 5. The bits that are merely set or reset maychange status the next time the program is executed, but bits that are force-setor force-reset w...
427 Parameters Program (Response)The program is read from the entire program area. Note To stop this operation in progress, execute the ABORT (XZ) command. 11-3-31 PROGRAM WRITE –– WP Writes to the PC user’s program area the machine language (object code) pro-gram transmitted from the host computer....
428 Command Format @ Q Q x 10 0 x 10 1 x 10 3 x 10 2 x 10 1 x 10 0 OP1 OP2 OP3 OP4 M OP1 OP2 x 10 3 x 10 2 x 10 1 x 10 0 OP1 OP2 OP3 OP4 OP1 OP2 ↵ : Node no. Headercode Terminator FCS Sub-headercode Read area Read word address Dataformat Data break Single read information Total read information (128...
429 Data Break (Command)The read information is specified one item at a time separated by a break code(,). The maximum number of items that can be specified is 128. (When the PV ofa timer/counter is specified, however, the status of the Completion Flag is alsoreturned, and must therefore be counted ...
431 11-4 Host Link Errors These error codes are received as the response code (end code) when a com-mand received by the C200HS from a host computer cannot be processed. Theerror code format is as shown below. @ X X ↵ : X X X X X X Nodeno. Headercode Terminator FCS End code The header code will vary...
433 Appendix A Standard Models C200HS Racks Name Specifications Model number Backplane (same for all Racks) 10 slots C200H-BC101-V2 ( ) 8 slots C200H-BC081-V2 5 slots C200H-BC051-V2 3 slots C200H-BC031-V2 CPU Rack CPU 100 to 120/200 to 240 VAC w/built-in ––– C200HS-CPU01-E power supply Conforms to E...
Standard Models Appendix A 434 C200H Standard I/O Units Name Specifications Model number Input Units AC Input Unit 8 pts 100 to 120 VAC C200H-IA121 16 pts 100 to 120 VAC C200H-IA122/122V 8 pts 200 to 240 VAC C200H-IA221 16 pts 200 to 240 VAC C200H-IA222/222V DC Input Unit 8 pts No-voltage contact; N...
Appendix A Standard Models 435 C200H Group-2 High-density I/O Units Name Specifications Model number DC Input Unit 32 pts. 24 VDC C200H-ID216 C200H-ID218 64 pts. 24 VDC C200H-ID217 C200H-ID219 Transistor Output Unit 32 pts. 16 mA 4.5 VDC to 100 mA 26.4 VDC C200H-OD218 0.5 A (5A/Unit) 24 VDC C200H-OD...
Appendix A Standard Models 437 SYSMAC LINK Unit/SYSMAC NET Link Unit The SYSMAC LINK Units and SYSMAC NET Link Unit can only be used with the C200HS-CPU31-E and C200HS-CPU33-E CPUs. Name Specifications Model number SYSMAC LINK Unit Wired via coaxial cable.Bus Connection Unit required separately. One...
Standard Models Appendix A 438 Mounting Rails and Accessories Name Specifications Model number DIN Track Mounting Bracket 1 set (2 included) C200H-DIN01 DIN Track Length: 50 cm; height: 7.3 mm PFP-50N Length: 1 m; height: 7.3 mm PFP-100N Length: 1 m; height: 16 mm PFP-100N2 End Plate --- PFP-M Space...
Appendix A Standard Models 439 Name Model number Specifications All Plastic Optical Fiber Cable Set 1-m cable with an Optical Connector A connected to eachend 3G5A2-PF101 Optical Fiber Processing Kit Accessory: 125-mm nipper (Muromoto Tekko’s 550M) forAPF 3G2A9-TL101 H-PCF Name Specifications Model ...
Standard Models Appendix A 440 Optical Power Tester Name Specifications Head Unit Model number Optical Power Tester (see note)(provided with a connector adapter,light source unit, small single-headplug, hard case, and AC adapter) SYSMAC BUS: C200H-RM001-PV1C200H-RT001/RT002-PC500-RM001-(P)V1C500-RT0...
Appendix A Standard Models 441 An Optical Fiber Cable Bracket must be used to support an optical fiber cable connected to the C200HS-SNT32SYSMAC NET Link Unit or C200HS-SLK12 SYSMAC LINK Unit. User optical fiber cables with both tension members and power supply lines. The following half-lock connect...
443 Appendix B Programming Instructions A PC instruction is input either by pressing the corresponding Programming Console key(s) (e.g., LD, AND, OR,NOT) or by using function codes. To input an instruction with its function code, press FUN, the function code, andthen WRITE. Refer to the pages listed...
449 Appendix C Error and Arithmetic Flag Operation The following table shows the instructions that affect the ER, CY, GR, LE and EQ flags. In general, ER indicatesthat operand data is not within requirements. CY indicates arithmetic or data shift results. GT indicates that a com-pared value is large...
Appendix C Error and Arithmetic Flag Operation 451 Instructions Page 25507 (LE) 25506 (EQ) 25505 (GR) 25504 (CY) 25503 (ER) FPD(––) Unaffected Unaffected Unaffected 285 HEX(––) Unaffected Unaffected Unaffected Unaffected 195 HMS(66) Unaffected Unaffected Unaffected 184 INT(89) Unaffected Unaffected ...
453 Appendix D Memory Areas Overview The following table shows the data areas in PC memory. Area Size Range Comments I/O Area 480 bits IR 000 to IR 029 Group-2 High-densityI/O Unit Area 320 bits IR 030 to IR 049 Can be used as ordinary I/O or, if not used forreal I/O, can be used as work bits. SYSMA...
461 Appendix E PC Setup Word(s) Bit(s) Function Default Startup Processing (DM 6600 to DM 6614) The following settings are effective after transfer to the PC only after the PC is restarted. DM 6600 00 to 07 Startup mode (effective when bits 08 to 15 are set to 02).00: PROGRAM; 01: MONITOR 02: RUN PR...
Appendix E PC Setup 463 Word(s) Default Function Bit(s) DM 6648 00 to 07 Node number (Host link)00 to 31 (BCD) 0 08 to 11 Start code enable (RS-232C)0: Disable; 1: Set Disabled 12 to 15 End code enable (RS-232C)0: Disable (number of bytes received)1: Set (specified end code)2: CR, LF Disabled DM 664...
465 Appendix F Word Assignment Recording Sheets This appendix contains sheets that can be copied by the programmer to record I/O bit allocations and terminalassignments, as well as details of work bits, data storage areas, timers, and counters.
468 Programmer: Program: Date: Page: Word Contents Notes Word Contents Notes Data Storage
469 Programmer: Program: Date: Page: TC address T or C Set value Notes TC address T or C Set value Notes Timers and Counters
471 Appendix G Program Coding Sheet The following page can be copied for use in coding ladder diagram programs. It is designed for flexibility, allowingthe user to input all required addresses and instructions. When coding programs, be sure to specify all function codes for instructions and data are...
473 Appendix H Data Conversion Tables Normal Data Decimal BCD Hex Binary 00 00000000 00 00000000 01 00000001 01 00000001 02 00000010 02 00000010 03 00000011 03 00000011 04 00000100 04 00000100 05 00000101 05 00000101 06 00000110 06 00000110 07 00000111 07 00000111 08 00001000 08 00001000 09 00001001...
Data Conversion Tables Appendix H 474 Signed Binary Data Decimal 16-bit Hex 32-bit Hex 21474836472147483646 ... 327683276732766 ... 543210 –1–2–3–4–5 ... –32767–32768–32769 ... –2147483647–2147483648 –––––– ... ––– 7FFF 7FFE ... 000500040003000200010000 FFFF FFFE FFFDFFFC FFFB ... 80018000 ––– ... –...
475 Appendix I Extended ASCII Programming Console Displays Bits 0 to 3 Bits 4 to 7 BIN 0000 0001 0010 0011 0100 0101 0110 0111 1010 1011 1100 1101 1110 1111 HEX 0 1 2 3 4 5 6 7 A B C D E F 0000 0 NUL DLE Space 0 @ P ‘ p 0 @ P ‘ p 0001 1 SOH DC 1 ! 1 A Q a q ! 1 A Q a q 0010 2 STX DC 2 ” 2 B R b r ” ...
477 Glossary address The location in memory where data is stored. For data areas, an address con-sists of a two-letter data area designation and a number that designates theword and/or bit location. For the UM area, an address designates the instructionlocation (UM area). In the FM area, the address...
Glossary 478 bit designator An operand that is used to designate the bit or bits of a word to be used by aninstruction. bit number A number that indicates the location of a bit within a word. Bit 00 is the rightmost(least-significant) bit; bit 15 is the leftmost (most-significant) bit. buffer A temp...
Glossary 479 through a TC bit and used to count the number of times the status of a bit or anexecution condition has changed from OFF to ON. CPU An acronym for central processing unit. In a PC System, the CPU executes theprogram, processes I/O signals, communicates with external devices, etc. CPU Ba...
Glossary 480 differentiated instruction An instruction that is executed only once each time its execution condition goesfrom OFF to ON. Nondifferentiated instructions are executed each cycle as longas the execution condition stays ON. differentiation instruction An instruction used to ensure that th...
Glossary 481 extended timer A timer created in a program by using two or more timers in succession. Such atimer is capable of timing longer than any of the standard timers provided by theindividual instructions. Factory Intelligent Terminal A programming device provided with advanced programming and...
Glossary 482 initialization error An error that occurs either in hardware or software during the PC System star-tup, i.e., during initialization. initialize Part of the startup process whereby some memory areas are cleared, systemsetup is checked, and default values are set. input The signal coming ...
Glossary 483 I/O Control Unit A Unit mounted to the CPU Rack in certain PCs to monitor and control I/O pointson Expansion I/O Units. I/O devices The devices to which terminals on I/O Units, Special I/O Units, or Intelligent I/OUnits are connected. I/O devices may be either part of the Control System...
Glossary 484 Ladder Support Software A software package that provides most of the functions of the Factory IntelligentTerminal on an IBM AT, IBM XT, or compatible computer. LAN An acronym for local area network. leftmost (bit/word) The highest numbered bits of a group of bits, generally of an entire...
Glossary 485 main program All of a program except for the subroutines. masking ‘Covering’ an interrupt signal so that the interrupt is not effective until the mask isremoved. Master Short for Remote I/O Master Unit. memory area Any of the areas in the PC used to hold data or programs. mnemonic code ...
Glossary 487 output point The point at which an output leaves the PC System. Output points correspondphysically to terminals or connector pins. output signal A signal being sent to an external device. Generally an output signal is said toexist when, for example, a connection point goes from low to h...
Glossary 488 grammable Controllers are used to automate control of external devices. Al-though single-component Programmable Controllers are available, build-ing-block Programmable Controllers are constructed from separate compo-nents. Such building-block Programmable Controllers are formed only whe...
Glossary 489 Remote I/O Unit Any of the Units in a Remote I/O System. Remote I/O Units include Masters,Slaves, Optical I/O Units, I/O Link Units, and Remote Terminals. remote I/O word An I/O word allocated to a Unit in a Remote I/O System. reset The process of turning a bit or signal OFF or of chang...
Glossary 490 slot A position on a Rack (Backplane) to which a Unit can be mounted. software error An error that originates in a software program. software protect A means of protecting data from being changed that uses software as opposedto a physical switch or other hardware setting. source The loc...
Glossary 491 timer A location in memory accessed through a TC bit and used to time down from thetimer’s set value. Timers are turned ON and reset according to their executionconditions. TM area A memory area used to store the results of a trace. transmission distance The distance that a signal can b...
493 Revision History A manual revision code appears as a suffix to the catalog number on the front cover of the manual. Cat. No. W235-E1-05 Revision code The following table outlines the changes made to the manual during each revision. Page numbers refer to theprevious version. Revision code Date Re...
497 Index A address tracing. See tracing, data tracing. addresses, in data area: sec3 27 advanced I/O instructions 7-SEGMENT DISPLAY OUTPUT: 5–24 on 305 DIGITAL SWITCH INPUT: 5–24 on 308 functions: 5–24 on 304 HEXADECIMAL KEY INPUT: 5–24 on 312 MATRIX INPUT: 5–24 on 317 TEN-KEY INPUT: 5–24 on 314 ap...
Index 498 converting between hex and ASCII: sec7 354 I/O Unit designations: 4–1 to 4–6 88 Programming Console, English/Japanese switch: 4–1 to 4–6 80 DM area, allocating UM to expansion DM: sec7 366 E ER. See flag, Instruction Execution Error error codes, programming: 5–24 on 278 error history, dedi...
Index 499 WC: sec11 412 WD: sec11 413 WG: sec11 412 WH: sec11 411 WJ: sec11 413 WL: sec11 411 WP: sec11 427 WR: sec11 410 XZ: sec11 429 host link errors: sec11 431 Host Link Systems, error bits and flags: sec3 40 HR area: sec3 60 I I/O bit definition: sec3 31 limits: sec3 31 I/O numbers: sec3 33 I/O...
Omron Manuals
-
Omron VIBRATING MESH NEBULIZER NE-U22V
User Manual
- Omron ZS-MDC User Manual
- Omron ZS-MDC Manual
- Omron W343-E1-07 User Manual
- Omron W343-E1-07 Manual
-
Omron V720-SERIES V720-HS04
User Manual
-
Omron V600-HA
User Manual
-
Omron V600-HA
Manual
-
Omron V530-R160E
User Manual
-
Omron V530-R160E
Manual
-
Omron SYSMAC CP CP1E-N@@D@-@
User Manual
- Omron SYSMAC CJ1W-EIP21 User Manual
-
Omron Sysmac CJ1 CPU6 HR
User Manual
-
Omron V400-H111
User Manual
-
Omron V400-H111
Manual
-
Omron STRAPLESS HR-210
User Manual
-
Omron sc100
User Manual
-
Omron sc100
Manual
-
Omron RX-3
User Manual
-
Omron RX-3
Manual