Page 2 - OPERATION MANUAL
K-type Programmable Controllers OPERATION MANUAL Revised July 1999
Page 3 - WARNING; Caution; OMRON Product References
! ! ! 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...
Page 4 - iii; Installation Guide. A table of other manuals that can be used in
iii About this Manual: The OMRON K-type Programmable Controllers offer an effective way to automate processing, man-ufacturing, assembly, packaging, and many other processes to save time and money. Distributed con-trol systems can also be designed to allow centralized monitoring and supervision of s...
Page 5 - TABLE OF CONTENTS
v TABLE OF CONTENTS PRECAUTIONS ix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Intended Audience x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 General Precautions x . . . . . . . . . . . . . ....
Page 6 - Table of contents; SECTION 5 – Instruction Set
Table of contents vi 4-4 The Programming Console 44 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4-1 The Keyboard 44 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4-2 PC Modes 45 . . . . . . . . . . . . . . . . . . . ...
Page 8 - ix; PRECAUTIONS
ix PRECAUTIONS This section provides general precautions for using the K-type Programmable Controllers (PCs) and related devices. The information contained in this section is important for the safe and reliable application of Programmable Control-lers. You must read this section and understand the i...
Page 9 - Application Precautions; Intended Audience; Personnel in charge of installing FA systems.; General Precautions; Safety Precautions; Operating Environment Precautions; Do not operate the control system in the following locations:
! ! ! ! ! 5 Application Precautions x 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...
Page 10 - xi
! ! ! ! 5 Application Precautions xi • Locations subject to corrosive or flammable gases. • Locations subject to dust (especially iron dust) or salts. • Locations subject to exposure to water, oil, or chemicals. • Locations subject to shock or vibration. Caution Take appropriate and sufficient count...
Page 11 - xii; Wire all connections correctly.
5 Application Precautions xii • Do not apply voltages to the Input Units in excess of the rated input voltage.Excess voltages may result in burning. • Do not apply voltages or connect loads to the Output Units in excess of themaximum switching capacity. Excess voltages or loads may result in burning...
Page 13 - Relay term; Relay vs. PC Terminology; Relay Circuits: The Roots of PC Logic
2 1-1 Introduction A Programmable Controller (PC) is basically a central processing unit (CPU)containing a program and connected to input and output (I/O) devices (I/ODevices). The program controls the PC so that when an input signal from aninput device turns ON, the appropriate response is made. Th...
Page 14 - PC Terminology; Although also provided in the; Appendix A Standard Models list products by these groups.; PC; OMRON Product Terminology
3 Actually there is not a total equivalence between these terms, because theterm condition is used only to describe ladder diagram programs in generaland is specifically equivalent to one of certain basic instructions. The termsinput and output are not used in programming per se, except in reference...
Page 15 - Control System Design; Overview of PC Operation
4 Special I/O Units are dedicated Units that are designed to meet specificneeds. These include Analog Timer Units and Analog I/O Units. Link Units are used to create Link Systems that link more than one PC orlink a single PC to remote I/O points. Link Units include I/O Link Units thatare used to con...
Page 16 - Operation Manuals and System Manuals.; Appendix A Standard Models. OMRON product; Input/Output Requirements; Peripheral Devices
5 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 sig-nal from the PC. Keep in mind that the number of I/O points a...
Page 17 - Operation Manuals and/or Operation Guides are; Name; PROM Writer; Available Manuals
6 A Host Link Unit is required to interface a computer running LSS to the PC.Using an Optical Host Link Unit also enables the use of optical fiber cable toconnect the FIT to the PC. Wired Host Link Units are available when desired.(Although FIT does not have optical connectors, conversion to optical...
Page 18 - Introduction
7 SECTION 2 Hardware Considerations 2-1 Introduction 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 Indicators 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 PC C...
Page 19 - Indicator; CPU Indicators; PC Configuration
8 2-1 Introduction This section provides information on hardware aspects of K-type PCs thatare relevant to programming and software operation. These include indica-tors on the CPU and basic PC configuration. This information is covered indetail in the Installation Guide. 2-2 Indicators CPU indicator...
Page 21 - Area; Section 4 Writing; Work Bits and Words; Data Area Structure
10 3-1 Introduction Various types of data are required to achieve effective and correct control. Tofacilitate managing this data, the PC is provided with various memory areasfor data, each of which performs a different function. The areas generally ac-cessible by the user for use in programming are ...
Page 22 - Section 4 Writing and Inputting the Pro-; Note
11 used to store execution conditions at branching points in ladder diagrams.The use of TR bits is described in Section 4 Writing and Inputting the Pro- gram. The TC area consists of TC numbers, each of which is used for a spe-cific timer or counter defined in the program. Refer to 3-7 Timer/Counter...
Page 23 - Decimal Points
12 When referring to the entire word, the digit numbered 0 is called the right-most digit; the one numbered 3, the leftmost digit. When inputting data into data areas, it must be input in the proper form forthe intended purpose. This is no problem when designating individual bits,which are merely tu...
Page 25 - I/O Bits Available in CPUs
14 The following table shows which bits can be used as I/O bits in each of theK-type CPUs. Bits in the shaded areas can be used as work bits but not asoutput bits. 08 09 10 11 12 13 14 15 Word 00 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 Word 01 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 ...
Page 32 - Battery Alarm Flag
21 3-4 Special Relay (SR) Area The SR area contains flags and control bits used for monitoring system op-eration, accessing clock pulses, and signalling errors. SR area word ad-dresses range from 18 through 19; bit addresses, from 1804 through 1907. The following table lists the functions of SR area...
Page 33 - -11 Timer and Counter Instructions for an example of this.; Pulse width; Step Flag; and
! ! 22 These clock pulse bits are often used with counter instructions to create tim-ers. Refer to 5-11 Timer and Counter Instructions for an example of this. Pulse width 0.1 s 0.2 s 1.0 s Bit 1900 1901 1902 Bit 19000.1-s clock pulse 0.1 s .05 s .05 s Bit 19010.2-s clock pulse 0.2 s 0.1 s 0.1 s Bit ...
Page 34 - The DM area retains status during power interruptions.; Greater Than Flag, GR
23 SR bit 1904 turns ON when there is a carry in the result of an arithmetic op-eration. The content of CY is also used in some arithmetic operations, e.g., itis added or subtracted along with other operands. This flag can be set andcleared from the program using the SET CARRY and CLEAR CARRY in-str...
Page 37 - Instruction Terminology
26 4-1 Introduction This section explains how to convert ladder diagrams to mnemonic code andinput them into the PC. It then describes the basic steps and concepts in-volved in programming and introduces the instructions used to build the basicstructure of the ladder diagram and control its executio...
Page 38 - Other terms used in describing instructions are introduced in; The Ladder Diagram
27 Most instructions have at least one or more operands associated with them.Operands indicate or provide the data on which an instruction is to be per-formed. These are sometimes input as the actual numeric values, but areusually the addresses of data area words or bits that contain the data to beu...
Page 39 - Basic Terms; Mnemonic Code; Execution Conditions
28 4-3-1 Basic Terms Each condition in a ladder diagram is either ON or OFF depending on thestatus of the operand bit that has been assigned to it. A normally open condi-tion is ON if the operand bit is ON; OFF if the operand bit is OFF. An normallyclosed condition is ON if the operand bit is OFF; O...
Page 40 - Program Memory Structure
29 The program is input into addresses in Program Memory. Addresses in Pro-gram Memory are slightly different to those in other memory areas becauseeach address does not necessarily hold the same amount of data. Rather,each address holds one instruction and all of the definers and operands (de-scrib...
Page 41 - Ladder Instructions; LOAD and LOAD NOT
30 4-3-3 Ladder Instructions The ladder instructions are those that correspond to the conditions on theladder diagram. Ladder instructions, either independently or in combinationwith the logic block instructions described next, form the execution conditionsupon which all other instructions are execu...
Page 42 - OR and OR NOT
31 When two or more conditions lie on separate instruction lines running in par-allel and then joining together, the first condition corresponds to a LOAD orLOAD NOT instruction; the rest of the conditions correspond to OR or ORNOT instructions. The following example shows three conditions which cor...
Page 43 - Logic Block Instructions
32 4-3-4 OUT and OUT NOT The OUT and OUT NOT instructions are used to control the status of thedesignated operand bit according to the execution condition. With the OUTinstruction, the operand bit will be turned ON as long as the execution condi-tion is ON and will be turned OFF as long as the execu...
Page 44 - AND LOAD
33 Although simple in appearance, the diagram below requires an AND LOADinstruction. Instruction 0002 0003 0000 0001 Address Instruction Operands 0000 LD 0000 0001 OR 0001 0002 LD 0002 0003 OR NOT 0003 0004 AND LD --- The two logic blocks are indicated by dotted lines. Studying this exampleshows tha...
Page 46 - Complicated Diagrams
35 Both of the coding methods described above can also be used when usingboth AND LD and OR LD, as long as the number of blocks being combineddoes not exceed eight. The following diagram contains only two logic blocks as shown. It is not nec-essary to break block b down further, because it can coded...
Page 50 - Diagram B: Needs Correction
39 4-3-7 Coding Multiple Right-hand Instructions If there is more than one right-hand instruction executed with the same exe-cution condition, they are coded consecutively following the last condition onthe instruction line. In the following example, the last instruction line containsone more condit...
Page 51 - Diagram B: Corrected Using a TR bit; The following example shows an application using two TR bits.; TR Bits
40 There are two means of programming branching programs to preserve theexecution conditions. One is to use TR bits; the other, to use interlocks(IL(02)/ILC(03)). The TR area provides eight bits, TR 0 through TR 7, that can be used to tem-porarily preserve execution conditions. If a TR bit is used a...
Page 53 - Diagram B: Corrected with an Interlock; Interlocks
42 The problem of storing execution conditions at branching points can also behandled by using the INTERLOCK (IL(02)) and INTERLOCK CLEAR(ILC(03)) instructions. The branching point and all the conditions leading to itare placed on a separate line followed by all of the lines from the branchingpoint....
Page 54 - Jumps; Diagram B: Corrected with a Jump
43 If 0000 in the above diagram was OFF (i.e., if the execution condition for thefirst INTERLOCK instruction was OFF), instructions 1 through 4 would beexecuted with OFF execution conditions and execution would move to theinstruction following the INTERLOCK CLEAR instruction. If 0000 was ON, thestat...
Page 55 - The Keyboard; White Numeric Keys; The Programming Console
44 JUMP END instruction with a jump number of 00. Although, as in all jumps,no status is changed and no instructions are executed between the JUMP 00and JUMP END 00 instructions, the program must search for the next JUMPEND 00 instruction, producing a slightly longer execution time. Execution of pro...
Page 56 - PC Modes
45 Except for the SHIFT key on the upper right, the gray keys are used to inputinstructions and designate data area prefixes when inputting or changing aprogram. The SHIFT key is similar to the shift key of a typewriter, and is usedto alter the function of the next key pressed. (It is not necessary ...
Page 57 - Mode Changes; Preparation for Operation
! ! 46 In PROGRAM mode, the PC does not execute the program. PROGRAMmode is for creating and changing programs, clearing memory areas, andregistering and changing the I/O table. A special Debug operation is alsoavailable within PROGRAM mode that enables checking a program for cor-rect execution befo...
Page 58 - Set the mode switch to PROGRAM mode.; Entering the Password; Clearing Memory; Section 7 Program Debugging and Execution.
47 3. Connect the Programming Console to the PC. Make sure that the Pro-gramming Console is securely connected or mounted to the CPU; im-proper connection may inhibit operation. 4. Set the mode switch to PROGRAM mode. 5. Turn on PC power. 6. Enter the password. 7. Clear memory. Each of these operati...
Page 59 - Key Sequence; The following procedure is used to clear memory completely.; All Clear
48 Key Sequence The following procedure is used to clear memory completely. 0000 0000MEMORY CLR? HR CNT DM 0000MEMORY CLREND HR CNT DM 0000 0000 It is possible to retain the data in specified areas and/or part of the ProgramMemory. To retain the data in the HR and TC, and/or DM areas, press theappro...
Page 60 - Clearing Error Messages; Inputting, Modifying, and Checking the Program
49 For example, to leave the TC area uncleared and retaining Program Memoryaddresses 0000 through 0122, input as follows: 0000 0000 0000 0000MEMORY CLR? HR CNT DM 0000MEMORY CLR? HR DM 0123MEMORY CLR? HR DM 0000MEMORY CLREND HR DM 4-5-3 Clearing Error Messages Any error messages recorded in memory s...
Page 61 - Setting and Reading from Program Memory Address
50 Before starting to input a program, check to see whether there is a programalready loaded. If there is a program already loaded that you do not need,clear it first using the program memory clear key sequence, then input thenew program. If you need the previous program, be sure to check it with th...
Page 62 - Inputting or Overwriting Programs; Programs can be input or overwritten only in PROGRAM mode.; Enter function codes with care.; Designating Instructions
! 51 4-6-2 Inputting or Overwriting Programs Programs can be input or overwritten only in PROGRAM mode. The same procedure is used to either input a program for the first time or tooverwrite a program that already exists. In either case, the current contentsof Program Memory are overwritten, i.e., i...
Page 63 - Message; Example
52 The following ladder diagram can be input using the key inputs shown below.Displays will appear as indicated. 0000 0200 0200LD 0002 0201READNOP (00) 0201TIM 00 0201 TIM DATA #0000 0201 TIM #0123 0202READNOP (00) 0202FUN (??) 0202TIMH (15) 01 0202 TIMH DATA #0000 0202 TIMH #0500 0203READNOP (00) A...
Page 64 - Checking the Program; A syntax check can be performed on a program only in PROGRAM mode.; -7 Controlling Bit Status or to Section 5 Instruction Set; Error Messages
53 4-6-3 Checking the Program Once a program has been input, it should be checked for syntax to be surethat no programming rules have been violated. This check should also beperformed if the program has been changed in any way that might create asyntax error. To check the program, input the key sequ...
Page 65 - Displaying the Cycle Time; Section 6 Program Execution Timing for details; Note Cycle time is displayed as scan time.
54 Message Meaning and appropriate response SBS UNDEFD A defined subroutine is not called by the main program. When this message is displayed becauseof interrupt routine definition, there is no problem. In all other cases, correct the program. STEP OVER STEP is used for more than 16 program sections...
Page 66 - Program Searches
55 Example 0000 0000SCAN TIME AVG 054.1MS 0000SCAN TIME AVG 053.9MS 4-6-5 Program Searches The program can be searched for occurrences of any designated instructionor data area bit address used in an instruction. Searches can be performedfrom any currently displayed address or from a cleared display...
Page 67 - Example: Instruction Search
56 Example: Instruction Search 0000 0000LD 0000 0200SRCHLD 0000 0202LD 0000 1082SRCHEND (01) 0000 0100 0100TIM 01 0203SRCHTIM 01 0203 TIM DATA #0123 Example: Bit Search 0000 0000 CONT 0005 0200CONT SRCHLD 0005 0203CONT SRCHAND 0005 1078CONT SRCHEND (01) Inputting, Modifying, and Checking the Program...
Page 68 - Inserting and Deleting Instructions; Original Program
! 57 4-6-6 Inserting and Deleting Instructions In PROGRAM mode, any instruction that is currently displayed can be de-leted or another instruction can be inserted before it. These are not possiblein RUN or MONITOR modes. To insert an instruction, display the instruction before which you want the new...
Page 69 - Program After Insertion; Inserting an Instruction
58 The following key inputs and displays show the procedure for achieving theprogram changes shown above. Find the address priorto the insertion point Insert theinstruction Program After Insertion Inserting an Instruction 0000 0000OUT 0000 0000OUT 0201 0207SRCHOUT 0201 0206READAND NOT 0104 0206AND 0...
Page 70 - Program After Deletion; Deleting an Instruction; DIFFERENTIATE UP and DIFFERENTIATE DOWN; Controlling Bit Status
59 Find the instructionthat requires deletion. Confirm that this is the instruction to be deleted. Program After Deletion Deleting an Instruction 0000 0000OUT 0000 0000OUT 0201 0208SRCHOUT 0201 0207READAND NOT 0104 0207 DELETE?AND NOT 0104 0207DELETE ENDOUT 0201 0206READAND 0105 Address Instruction ...
Page 72 - Work Bit Applications; Section 5 Instruction Set use work bits. Under-
61 4-8 Work Bits (Internal Relays) In programming, combining conditions to directly produce execution condi-tions is often extremely difficult. These difficulties are easily overcome, how-ever, by using certain bits to trigger other instructions indirectly. Such pro-gramming is achieved by using wor...
Page 74 - Differentiated Conditions; Diagram B; Programming Precautions
63 Differentiated Conditions Work bits can also be used if differential treatment is necessary for some, butnot all, of the conditions required for execution of an instruction. In this exam-ple, IR 0100 must be left on continuously as long as IR 0001 is ON and bothIR 0002 and IR 0003 are OFF, or as ...
Page 75 - Section 5 Instruction Set
64 Often, complicated programs are the result of attempts to reduce the numberof times a bit is used. Every instruction line must also have at least one condition on it to determinethe execution condition for the instruction at the right. Again, diagram A , be-low, must be redrawn as diagram B. If a...
Page 76 - Section 6 Program Execution Timing for details.; Program Execution
65 4-10 Program Execution When program execution is started, the CPU cycles the program from top tobottom, checking all conditions and executing all instructions accordingly as itmoves down the bus bar. It is important that instructions be placed in theproper order so that, for example, the desired ...
Page 78 - Appendix B Programming Instructions and Execu-; Instruction Format
68 5-1 Introduction The K-type PCs have large programming instruction sets that allow for easyprogramming of complicated control processes. This section explains eachinstruction individually and provides the ladder diagram symbol, data areas,and flags used with each. Basic application examples are a...
Page 79 - The; Abbreviation; Flags subsection of each instruction lists; Coding Other Instructions; Designating Constants
! 69 paired with which JUMP END instruction. Bit operands are also contained inthe same word as the instruction itself, although these are not considereddefiners. 5-4 Data Areas, Definer Values, and Flags Each instruction is introduced with the ladder diagram symbol(s), the dataareas that can be use...
Page 83 - Ladder Diagram Instructions
73 5-5 Ladder Diagram Instructions Ladder diagram instructions include ladder instructions and logic block in-structions. Ladder instructions correspond to the conditions on the ladderdiagram. Logic block instructions are used to relate more complex parts ofthe diagram that cannot be programmed with...
Page 84 - AND LOAD and OR LOAD; AND LOAD – AND LD; There are no flags affected by these instructions.
74 These six basic instructions correspond to the conditions on a ladder dia-gram. As described in Section 4 Writing and Inputting the Program, the status of the bits assigned to each instruction determines the execution con-ditions for all other instructions. Each of these instructions can be used ...
Page 85 - OUTPUT and OUTPUT NOT – OUT and OUT NOT; OUTPUT – OUT; Bit Control Instructions
75 5-6 Bit Control Instructions There are five instructions that can be used generally to control individual bitstatus. These are OUT, OUT NOT, DIFU(13), DIFD(14), and KEEP(11).These instructions are used to turn bits ON and OFF in different ways. 5-6-1 OUTPUT and OUTPUT NOT – OUT and OUT NOT B: Bit...
Page 86 - Limitations
76 Any output bit can be used in only one instruction that controls its status. See3-3 Internal Relay (IR) Area for details. DIFU(13) and DIFD(14) are used to turn the designated bit ON for one cycleonly. Whenever executed, DIFU(13) compares its current execution with the previ-ous execution conditi...
Page 87 - There are no flags affected by this instruction.; Description
77 5-6-3 KEEP – KEEP(11) B: Bit IR, HR Ladder Symbol Operand Data Areas S R KEEP(11) B KEEP(11) is used to maintain the status of the designated bit based on twoexecution conditions. These execution conditions are labeled S and R. S isthe set input; R, the reset input. KEEP(11) operates like a latch...
Page 88 - NEVER; Bits used in KEEP are not reset in interlocks. Refer to the; Ladder Symbol
78 Never use an input bit in an normally closed condition on the reset (R) forKEEP(11) when the input device uses an AC power supply. The delay inshutting down the PC’s DC power supply (relative to the AC power supply tothe input device) can cause the designated bit of KEEP(11) to be reset. Thissitu...
Page 89 - Precautions
79 If the execution condition for IL(02) condition is OFF, the interlocked sectionbetween IL(02) and ILC(03) will be treated as shown in the following table: Instruction Treatment OUT and OUT NOT Designated bit turned OFF. TIM and TIMH(15) Reset. CNT, CNTR(12) PV maintained. KEEP(11) Bit status main...
Page 92 - Timer and Counter Instructions
82 5-11 Timer and Counter Instructions TIM and TIMH are decrementing ON-delay timer instructions which require aTC number and a set value (SV). CNT is a decrementing counter instruction and CNTR is a reversible counterinstruction. Both require a TC number and a SV. Both are also connected tomultiple...
Page 93 - TIMER – TIM
83 5-11-1 TIMER – TIM N: TC number # (00 through 47) Ladder Symbol Definer Values SV: Set value (word, BCD) IR, HR, # Operand Data Areas TIM N SV SV may be between 000.0 and 999.9 seconds. The decimal point of SV isnot input. Each TC number can be used as the definer in only one timer or counter in-...
Page 94 - In this example, 0200 will be turned ON 30 minutes after 0000 goes ON.; Examples
84 All of the following examples use OUT in diagrams that would generally beused to control output bits in the IR area. There is no reason, however, whythese diagrams cannot be modified to control execution of other instructions. The following example shows two timers, one set with a constant and on...
Page 96 - Refer to
86 Bits can be programmed to turn ON and OFF at a regular interval while adesignated execution condition is ON by using TIM twice. One TIM functionsto turn ON and OFF a specified bit, i.e., the completion flag of this TIM turnsthe specified bit ON and OFF. The other TIM functions to control the oper...
Page 97 - Analog Timer Unit; The Analog Timer Unit uses two I/O words to provide four timers (T; Bit
87 Timers in interlocked program sections are reset when the execution condi-tion for IL(02) is OFF. Power interruptions also reset timers. If a timer that isnot reset under these conditions is desired, SR area clock pulse bits can becounted to produce timers using CNT. Refer to 5-11-4 COUNTER – CNT...
Page 98 - Analog Timer Unit Installation Guide for hardware details.; Setup
88 Timer ranges are set in the output words as shown in the following table. Timer Output word bit 0.1 to 1s 1 to 10s 10 to 60s 1 to 10m T 0 08 OFF ON OFF ON 09 OFF OFF ON ON T 1 10 OFF ON OFF ON 11 OFF OFF ON ON T 2 12 OFF ON OFF ON 13 OFF OFF ON ON T 3 14 OFF ON OFF ON 15 OFF ON OFF ON Example Thi...
Page 100 - COUNTER – CNT
90 5-11-4 COUNTER – CNT N: TC number # (00 through 47) Ladder Symbol Definer Values SV: Set value (word, BCD) IR, HR, # Operand Data Areas CP R CNT N SV Each TC number can be used as the definer in only one timer or counter in-struction. CNT is used to count down from SV when the execution condition...
Page 104 - The count signal must be at least 250
94 CNTR(12) is reset with a reset input, R. When R goes from OFF to ON, thePV is reset to zero. The PV will not be incremented or decremented while Ris ON. Counting will begin again when R goes OFF. The PV for CNTR(12)will not be reset in interlocked program sections or for power interruptions. Chan...
Page 105 - ately before the power failure is retained.; General
95 In the hard reset mode, the reset signal must have an ON time of at least250 µ s. 250 µ s max. Input0001 Description The high-speed counter counts the signals input from an external device con-nected to input 0000 and, when the high-speed counter instruction is ex-ecuted, compares the current val...
Page 106 - Soft Reset
96 SR bit 1807 is the soft reset. When it is turned ON, the present value in thehigh-speed counter buffer is reset to “0000.” As for the hard reset, when thesoft reset is ON, the count signal from input 0000 is not accepted. When pro-grammed with the soft reset, the high-speed counter would appear a...
Page 107 - Response Speed
97 The values must be four-digit BCD in the range 0000 to 9999. Note that fail-ure to enter BCD values will not activate the ERR flag. Always set a lowerlimit which is less than the corresponding upper limit. MOV is useful in settinglimits. The following ladder diagram shows the use of MOV for setti...
Page 108 - Where S3; Extending the Counter
98 Examples The high-speed counter normally provides 16 output bits. If more than 16 arerequired, the high-speed counter may be programmed more than once. Inthe following program example, the high-speed counter is used twice to pro-vide 32 output bits. 1813 (normally ON) 0002 MOV(21) “S1” DM 32 MOV(...
Page 109 - More than 16 output bits may be obtained using CMP.
99 Note that in the program just mentioned, the present value in the counterbuffer is transferred to counter number 47 at points A and B. In this case, ifS31 (=1,000) < S < S32 (=2,000) and S33 (=2,000) < S < S34 (=3,000), andif the present count value of the first high-speed counter (at...
Page 112 - Here is the program example for the application.
102 Here is the program example for the application. MOV(21) #0905 DM 32 MOV(21) #1150 DM 33 MOV(21) #1450 DM 34 MOV(21) #1550 DM 35 1815 1807 HDM(61) 47 HR 0 HR 000 0011 0006 0005 0100 0005 0003 0100 0004 0102 0004 0102 0003 0103 1000 0005 0006 0101 DIFU(13) 1000 0005 0002 1813 (normally ON) HR 001...
Page 114 - Dedicated Bits
104 The transferred count value is then compared with the upper and lower limitsof a set of ranges which have been preset in DM 00 through DM 31. If thecurrent value is within any of the preset ranges, the corresponding bit of theresults word, R, is turned ON. The bit in the result word will remain ...
Page 116 - The following timing example uses HR 0 as the results word.; Operand Data Areas; Example 2: Controlling Bits in Shift; Timing Example; Data Shifting
106 The following timing example uses HR 0 as the results word. Start input 0002 HR 000Limits: 0001 to 0002 Count input (1805) 0000 0001 0002 0003 0004 0005 0004 0003 0002 0001 0000 9999 9998 9997 0000 0000 0000 HR 001Limits: 0002 to 0004 Present value Reset input (1804) UP/DOWN selection (1806) HR ...
Page 119 - Ladder Symbols
109 The program is set up so that a rotary encoder (0000) controls execution ofSFT(10) through a DIFU(13), the rotary encoder is set up to turn ON andOFF each time a product passes the first sensor. Another sensor (0002) isused to detect faulty products in the chute so that the pusher output and HR0...
Page 120 - St and E are not in the same data area or St is greater than E.; St and E must be in the same data area and St must be less than E.
! 110 SFTR(84) is used to create a single- or multiple-word shift register that canbe shifted to either the right or the left. To create a single-word shift register,designate the same word for St and E. The control word provides the shiftdirection, the status to be input into the register, the shif...
Page 121 - St and E are not in the same data area.; ON when all zeros are transferred to D.; Data Movement
111 When the execution condition is OFF, WSFT(16) is not executed and thenext instruction is moved to. When the execution condition is ON, 0000 ismoved into St, the content of St is moved to St + 1, the content of St + 1 ismoved to St + 2, etc., and the content of E is lost. F 0 C 2 3 4 5 2 1 0 2 9 ...
Page 122 - Cp1 : First compare word; ON if Cp1 equals Cp2.
112 5-13-2 MOVE NOT – MVN(22) S : Source word IR, SR, DM, HR, TC, # D : Destination word IR, DM, HR Ladder Symbol Operand Data Areas MVN(22) S D When the execution condition is OFF, MVN(22) is not executed and the nextinstruction is moved to. When the execution condition is ON, MOV(21) trans-fers th...
Page 125 - The content S is not BCD; Data Conversion
115 5-15 Data Conversion The conversion instructions convert word data that is in one format into an-other format and output the converted data to specified result word(s). Con-versions are available to convert between binary (hexadecimal) and BCDand between multiplexed and non-multiplexed data. All...
Page 126 - Di : Digit designator; R : First result word; The rightmost two digits of Di must each be between D and 3.
116 5-15-3 4-TO-16 DECODER – MLPX(76) S : Source word IR, SR, DM, HR, TC Di : Digit designator IR, DM, HR, TC, # Ladder Symbol Operand Data Areas R : First result word IR, DM, HR MLPX(76) S Di R The rightmost two digits of Di must each be between D and 3. All result words must be in the same data ar...
Page 127 - Flags
117 Some example Di 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 Di : 0031 Di : 0023 Di : 0030 Di : 0010 S S S ER: Undefined digit designator, or R plus number of digits exce...
Page 128 - S : First source word; The digits of Di are set as shown below.
118 5-15-4 16-TO-4 ENCODER – DMPX(77) S : First source word IR, SR, DM, HR, TC R : Result word IR, DM, HR Ladder Symbol Operand Data Areas Di : Digit designator IR, DM, HR, TC, # DMPX(77) S R Di The rightmost two digits of Di must each be between 0 and 3. All sourcewords must be in the same data are...
Page 129 - Content of a source word is 0000.
119 Some example Di values and the word-to-digit conversions that they produceare shown below. 0 1 2 3 R Di : 0011 S S + 1 0 1 2 3 S S + 1 S + 2 S + 3 Di : 0030 R S S + 1 S + 2 S + 3 0 1 2 3 Di : 0032 R Di : 0013 0 1 2 3 S S + 1 R ER: Undefined digit designator, or S plus number of digits exceeds a ...
Page 130 - CY; ON when there is a carry in the result.; BCD Calculations
120 5-16 BCD Calculations The BCD calculation instructions perform mathematic operations on BCDdata. These instructions change only the content of the words in which results areplaced, i.e., the contents of source words are the same before and after exe-cution of any of the BCD calculation instructi...
Page 132 - Mi – Su – CY; ON when the result is 0.
! 122 case DM 05 and DM 04 are used to represent the intermediate 4 digits andthe 4 right digits respectively. DM 06 represents the leftmost digit, the 9th dig-it. If a carry is generated, SR 1904 (CY) is turned ON and the constant 0001 istransferred to DM 06. If a carry is not generated SR 1904 rem...
Page 133 - R and R + 1 must be in the same data area.
123 If CY is not set by executing SUB(31), the result is positive, the second sub-traction is not performed and HR 300 is not turned ON. HR 300 is pro-grammed as a self-maintaining bit so that a change in the status of CY willnot turn it OFF when the program is recycled. CLC(41) SUB(31) 10 DM 01 HR ...
Page 134 - Md or Mr is not in BCD.
124 When the execution condition is OFF, MUL(32) is not executed and the nextinstruction is moved to. When the execution condition is ON, the contents ofMd and Mr are multiplied and the rightmost four digits of the result are placedin R; the leftmost four digits, in R + 1. Md word Mr word R +1 word ...
Page 136 - There are no flags directly affected by these instructions.; Subroutines
126 5-17 Subroutines Subroutines can be used for one of two different purposes: either to separateoff sections of large control tasks so that they can be handled as smallerones and to enable you to reuse a given set of instructions at different placeswithin one program or as a part of different prog...
Page 138 - Step Instructions
128 5-18 Step Instructions The step instructions STEP(08) and SNXT(09) are used in conjunction to setup breakpoints between sections in large programs so that the sections canbe executed as units and reset upon completion. A step of program will usu-ally be defined to correspond with an actual proce...
Page 145 - s x number of words refreshed); Special Instructions
135 5-19 Special Instructions The following instructions provide for special purposes: refreshing I/O bitsduring program execution, designating minimum cycle time, and insertingcomments into a program. 5-19-1 I/O REFRESH – IORF(97) St : Starting word IR (00 through 09) Ladder Symbol E : End word IR ...
Page 149 - Cycle Time
139 6-2 Cycle Time To aid in PC operation, the average cycle time can be displayed on the Pro-gramming Console or any other Programming Device. Understanding theoperations that occur during the cycle and the elements that affect cycle timeis essential to effective programming and PC operations. The ...
Page 150 - Overseeing; Possible adverse affects
140 The first three operations immediately after power application are performedonce each time the PC is turned on. The then on the operations shownabove are performed in cyclic fashion, with each cycle forming one cycle.The cycle time is the time that is required for the CPU to complete one ofthese...
Page 151 - Single PC Unit; The equation for the cycle time from above is as follows:; Cycle time = Overseeing time; s respectively, the average instruction ex-; Calculations; Calculating Cycle Time
141 6-3 Calculating Cycle Time The PC configuration, the program, and program execution conditions mustbe taken into consideration when calculating the cycle time. This means tak-ing into account such things as the number of I/O points, the programminginstructions used, and whether or not Peripheral...
Page 152 - PC with Additional Units
142 The cycle time is the total of all these calculations. 1.6 ms + 0.51 ms + 4.43 ms = 6.54 ms If a peripheral device had been present it would have been: 1.6 ms + 0.51 ms + 4.43 ms + 1 ms = 7.54 ms Process Formula Peripheral device servicing (ms) With Without 1. Overseeing 2. Input/output refreshi...
Page 153 - Instruction Execution Times
143 The cycle time is the total of all these calculations. 1.6 ms + 0.75 ms + 34.50 ms = 36.85 ms If a peripheral device had been present it would have been: 1.6 ms + 0.75 ms + 34.50 ms + 1.50 ms = 38.35 ms Process Formula Peripheral device servicing (ms) With Without 1. Overseeing 2. Input/output r...
Page 156 - Calculation Example
146 The PC takes longest to respond when it receives the input signal just afterthe input refresh phase of the cycle. In this case the CPU does not recognizethe input signal until the end of the next cycle. The maximum response timeis thus one cycle longer than the minimum I/O response time, except ...
Page 158 - Appendix A Standard Models for model num-; Debugging
148 7-1 Introduction This section provides the procedures for inputting and debugging a programand monitoring and controlling the PC through a Programming Console. TheProgramming Console is the most commonly used Programming Device forthe K-type PCs. It is compact and available both in hand-held mod...
Page 159 - MEMORY ERR; Monitoring Operation and Modifying Data
149 The following displays show some of the messages that may appear. Referto Section 8 Troubleshooting for an inclusive list of error messages, mean- ings, and appropriate responses. Note Cycle time is displayed as scan time. Fatalerrors Non-fatalerrors All errorshave beencleared 0000 0000FUN (??) ...
Page 161 - Program Read then Monitor
151 The following examples show various applications of this monitor operation. Program Read then Monitor Indicates Completion flag is ON Monitor operationis cancelled 0100 0100READTIM 00 T00 1234 T00!0000 0100TIM 01 Key Sequence Examples Monitoring Operation and Modifying Data Section 7-3
Page 163 - Multiple Address Monitoring
153 Multiple Address Monitoring 0000 0000TIM 00 T00 0100 0000 T00 0100 0001 T00 0100 0001 T00 OFF 0100 D00 0001 T00 OFF 0100 D00 0001 T00 10FF OFF 0100 T00 D00 0001 0100 10FF OFF D00 0001 10FF^ OFF 0001 OFF 0000CONT 0001 0000CHANNEL DM 00 Cancels monitoring of leftmost address Cancels Monitor operat...
Page 165 - Hexadecimal/BCD Data Modification
155 The following displays show what happens when TIM 00 is set with 0100OFF (i.e., 0500 is turned ON) and what happens when TIM 00 is reset with0100 ON (i.e., timer starts operation, turning OFF 0500, which is turned backON when the timer has finished counting down the SV). Indicates that thetime i...
Page 166 - Changing Timer/Counter SV; Overwriting Programs.
156 To change contents of the leftmost word address, press CHG, input the de-sired value, and press WRITE. Key Sequence The following example shows the effects of changing the PV of a timer. This example is in MONITOR mode Timing Timing PV changed Timing Timing 0000 0000TIM 00 T00 0122 0000PRES VAL?...
Page 167 - Be sure to label the contents of all cassette tapes clearly.; Program Backup and Restore Operations
157 Key Sequence The following example shows inputting a new constant and changing from aconstant to a word designation. Inputting New SV 0000 0000TIM 00 0201SRCHTIM 00 0201 TIM DATA #0123 0201 TIM DATAT00 #0123 #???? 0201 TIM DATAT00 #0123 #0124 0201 TIM DATA #0124 0201 DATA?T00 #0123 c??? 0201 DAT...
Page 168 - The PC must be in PROGRAM mode for all cassette tape operations.; Saving Program Memory Data
158 The PC must be in PROGRAM mode for all cassette tape operations. While the operation is in progress, the cursor will blink and the block countwill be incremented on the display. Cassette tape operations may be halted at any time by pressing the CLR key. The following error messages may appear du...
Page 169 - Restoring or Comparing Program Memory Data; Specify the number of the file to be restored or compared.
159 Example 0000 0000MTFILE NO!00000012 0000MTFILE NO!00000000 Blinking Continue within 5 seconds Recording in progress When it comes to END Stop recording with CLR Saved up to stop address Start recording 0000MT RECORD ~FILE NO!00000012 0075MT RECORD ~FILE NO!00000012 0145MT RECORD ~END (01) 0145MT...
Page 172 - DANGER; Reading and Clearing Errors and Messages; -3 Monitoring Operation and Modifying Data. Procedures for the
! 162 8-1 Introduction The K-type PCs provide self-diagnostic functions to identify many types ofabnormal system conditions. These functions minimize downtime and enablequick, smooth error correction. This section provides information on hardware and software errors that occurduring PC operation. Pr...
Page 173 - Non-fatal Operating Errors
163 The following error messages appear for errors that occur after program exe- cution has been started. PC operation and program execution will continue after one or more of these error have occurred. The POWER, RUN, and ALARM indicators will be lit and the ERR indicator will not be lit for any of...
Page 174 - SR Area; -4 Program Backup and Restore Operations.; Other Error Messages; Error Flags
164 8-4 Error Flags The following table lists the flags and other information provided in the SRarea that can be used in troubleshooting. Details are provided in 3-4 Special Relay (SR) Area. SR Area Address Function 1808 Battery Alarm Flag 1809 Cycle Time Error Flag 1903 Instruction Execution Error ...
Page 175 - Appendix A; Standard Models; CPUs
165 Appendix A Standard Models There are four K-type C-series CPUs. A CPU can be combined with any of six types of Expansion I/O Unitand/or an Analog Timer, Analog I/O Unit, or I/O Link Unit. CPUs Expansion I/O Units Analog Timer Unit Analog I/O Units I/O Link Unit C20K-C jj - j C28K-C jj - j C40K-C...
Page 178 - Special Units
Standard Models Appendix A 168 Special Units Name Specifications Model number Standards Analog Timer Unit Settings: 0.1 s to 10 min (one cable, C4K-CN502,included) C4K-TM U, C Analog Timer ExternalConnector 2-m cable and connector C4K-CN223 --- Analog Input Unit 1 input; input ranges: 4 to 20 mA, 1 ...
Page 179 - Mounting Rail and Accessories
Appendix A Standard Models 169 Mounting Rail and Accessories Name Specifications Model number Standards DIN Track Length: 50 cm Not usable withC60K PFP-50N Length: 1 m PFP-100N --- PFP-100N2 End Plate --- PFP-M Spacer --- PFP-S Factory Intelligent Terminal (FIT) Name Specifications Model number Stan...
Page 181 - Appendix B; Programming Instructions and Execution Times; Function code
171 Appendix B Programming Instructions and Execution Times Function code Name Mnemonic Page - LOAD LD 73 - LOAD NOT LD NOT 73 - AND AND 73 - AND NOT AND NOT 73 - OR OR 73 - OR NOT OR NOT 73 - AND LOAD AND LD 74 - OR LOAD OR LD 74 - OUTPUT OUT 75 - OUTPUT NOT OUT NOT 75 - TIMER TIM 83 - COUNTER CNT ...
Page 183 - Function
Appendix B Programming Instructions and Execution Times 173 Function code Conditions Execution time( µ s) Instruction --- TIM 95 When timing 95.5 to 186.5 When reset CNT 80.5 When counting 91.5 TO 184 When reset 00 NOP 2 Always 01 END — Refer to Cycle Time Calculation Example. 02 IL 2.5 Always 03 IL...
Page 192 - Appendix C; Programming Console Operations; System Operations
183 Appendix C Programming Console Operations Name Function Page Data Clear Used to erase data, either selectively or totally, from the Program Memory andthe IR, AR, HR, DM, and TC areas. 47 Address Designation Displays the specified address. 50 Program Search Searches a program for the specified da...
Page 193 - Programming Operations; Debugging Operations
Programming Console Operations Appendix C 184 Programming Operations Operation/Description Modes* Key sequence Address DesignationDisplays the specified address. Canbe used to start programming froma non-zero address or to access anaddress for editing. Leading zerosneed not be entered. The contentso...
Page 194 - Monitoring and Data Changing Operations
Appendix C Programming Console Operations 185 Monitoring and Data Changing Operations Operation/Description Modes* Key sequence Bit/Word MonitorUp to six memory addresses,containing either words or bits, or acombination of the two, can bemonitored at once. Only three canbe displayed at any one time....
Page 196 - Cassette Tape Operations
Appendix C Programming Console Operations 187 Cassette Tape Operations Operation/Description Modes* Key sequence Program Memory SaveCopies data from the ProgramMemory to tape. The file no.specified in the instructions providesan identifying address for theinformation within the tape. Each filenumber...
Page 197 - Appendix D; Error and Arithmetic Flag Operation; Section 5 Instruction Set for details.; Instructions
189 Appendix D Error and Arithmetic Flag Operation The following table shows which instructions affect the ER, CY, GT, LT and EQ flags. In general, ER indicatesthat operand data is not within requirements. CY indicates arithmetic or data shift results. GT indicates that acompared value is larger tha...
Page 198 - Appendix E; Binary–Hexadecimal–Decimal Table; Decimal
191 Appendix E Binary–Hexadecimal–Decimal Table 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 0...
Page 199 - Appendix F; Word Assignment Recording Sheets
193 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 on the Racks, as well as details of work bits, data storage areas, timers, and counters.
Page 201 - Work Bits
Appendix F Word Assignment Recording Sheets 195 Programmer: Program: Date: Page: Area: Word: Bit Usage Notes 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 Area: Word: Bit Usage Notes 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 Area: Word: Bit Usage Notes 00 01 02 03 04 05 06 07 08 09 10 11 12 ...
Page 203 - Timers and Counters
Appendix F Word Assignment Recording Sheets 197 Programmer: Program: Date: Page: TC address T or C Set value Notes TC address T or C Set value Notes Timers and Counters
Page 204 - Appendix G; Program Coding Sheet
199 Appendix G Program Coding Sheet The following page can be copied for use in coding ladder diagram programs. It is designed for flexibility, al-lowing the user to input all required addresses and instructions. When coding programs, be sure to specify all function codes for instructions and data a...
Page 205 - Program Coding Sheets
Program Coding Sheets Appendix G 200 Programmer: Program: Date: Page: Address Instruction Operand(s) Address Instruction Operand(s) Address Instruction Operand(s)
Page 206 - Glossary; A temporary storage space for data in a computerized device.
201 Glossary address The location in memory where data is stored. For data areas, an addressconsists of a two-letter data area designation and a number that designatethe word and/or bit location. For the UM area, an address designates the in-struction location (UM area); for the FM area, the block l...
Page 207 - The devices that are being controlled by a PC System.
Glossary 202 call A process by which instruction execution shifts from the main program to asubroutine. The subroutine may be called by an instruction or by an interrupt. carry flag A flag that is used with arithmetic operations to hold a carry from an additionor multiplication operation or to indic...
Page 208 - Decreasing a numeric value by 1.
Glossary 203 data area boundary The highest address available in a data area. When designating an operandthat requires multiple words, it is necessary that the highest address in thedata area is not exceeded. debug A process by which a draft program is corrected until it operates as intended.Debuggi...
Page 209 - Short for Factory Intelligent Terminal.
Glossary 204 exection condition The ON or OFF status under which an instruction is executed. The executioncondition is determined by the logical combination of conditions on the sameinstruction line and up to the instruction being executed. execution time The time required for the CPU to execute eit...
Page 210 - A word in the IR area that is allocated to a Unit in the PC System.
Glossary 205 Host Link System One or more host computers connected to one or more PCs through HostLink Units so that the host computer can be used to transfer data to and re-ceive data from the PC(s). Host Link Systems enable centralized manage-ment and control of a PC System. Host Link Unit An inte...
Page 211 - A bit in the IR area that is allocated to hold the status of an input.
Glossary 206 input bit A bit in the IR area that is allocated to hold the status of an input. input device An external device that sends signal(s) into the PC System. input point The point at which an input enters the PC System. An input point physicallycorresponds to terminals or connector pin(s). ...
Page 212 - A symbol used in a ladder-diagram program.
Glossary 207 ladder diagram symbol A symbol used in a ladder-diagram program. ladder instruction An instruction that represents the ‘rung’ portion of a ladder-diagram program.The other instructions in a ladder diagram fall along the right side of the dia-gram and are called terminal instructions. le...
Page 213 - A bit designated as an operand for an instruction.
Glossary 208 nonfatal error A hardware or software error that produces a warning but does not stop thePC from operating. normally closed condition A condition that produces an ON execution condition when the bit assignedto it is OFF, and an OFF execution condition when the bit assigned to it isON. n...
Page 214 - An external device that receives a signal(s) from the PC System.
Glossary 209 output bit A bit in the IR area that is allocated to hold the status to be sent to an outputdevice. output device An external device that receives a signal(s) from the PC System. output point The point at which an output leaves the PC System. An output point physical-ly corresponds to t...
Page 215 - Short for present value.
Glossary 210 Programming Device A peripheral device used to input a program into a PC or to alter or monitor aprogram already held in the PC. There are dedicated programming devices,such as Programming Consoles, and there are non-dedicated devices, suchas a host computer. PROGRAM mode A mode of oper...
Page 216 - Another term for terminal instruction.
Glossary 211 right-hand instruction Another term for terminal instruction. rightmost (bit/word) The lowest numbered bits of a group of bits, generally of an entire word, orthe lowest numbered words of a group of words. These bits/words are oftencalled least significant bits/words. RUN mode The opera...
Page 217 - The voltage/current that a relay can switch on and off.
Glossary 212 SV Short for set value. switching capacity The voltage/current that a relay can switch on and off. syntax error An error in the way in which a program is written. Syntax errors can include‘spelling’ mistakes (i.e., a function code that does not exit), mistakes in speci-fying operands wi...
Page 218 - Wired Slave Rack; A Slave Rack connected through a Wired Remote I/O Slave Unit.; word; A bit in a work word.; work word
Glossary 213 Wired Slave Rack A Slave Rack connected through a Wired Remote I/O Slave Unit. word A unit of storage in memory that consists of 16 bits. All data areas consists ofwords. Some data areas can be accessed by words; others, by either wordsor bits. word address The location in memory where ...
Page 219 - Index; Numbers
215 Index Numbers 16−TO−4 ENCODER − DMPX(77). See instruction set 4−TO−16 DECODER − MLPX(76). See instruction set A ADD(30). See instruction set Always ON/OFF flags. See data areas Analog Timer Unit. See instruction set AND. See instruction set AND LD. See instruction set AND LOAD. See instruction s...