Automationdirect.com DL205 PLC User Manual

Volume 2 of 2
Table of Contents

Advertisement

Quick Links

DL205 PLC User Manual
Volume 2 of 2
Manual Number: D2-USER-M

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DL205 PLC and is the answer not in the manual?

Questions and answers

Summary of Contents for Automationdirect.com DL205 PLC

  • Page 1 DL205 PLC User Manual Volume 2 of 2 Manual Number: D2-USER-M...
  • Page 2 Notes...
  • Page 3 ~ WARNING ~ Thank you for purchasing automation equipment from Automationdirect.com ® , doing business as, AutomationDirect. We want your new automation equipment to operate safely. Anyone who installs or uses this equipment should read this publication (and any other relevant publications) before installing or operating the equipment.
  • Page 4: Marcas Registradas

    Esta publicación puede contener referencias a productos producidos y/u ofrecidos por otras compañías. Los nombres de las compañías y productos pueden tener marcas registradas y son propiedad única de sus respectivos dueños. Automationdirect.com, renuncia cualquier interés propietario en las marcas y nombres de otros.
  • Page 5: Marques De Commerce

    AVERTISSEMENT ® Nous vous remercions d’avoir acheté l’équipement d’automatisation de Automationdirect.com , en faisant des affaires comme, AutomationDirect. Nous tenons à ce que votre nouvel équipement d’automatisation fonctionne en toute sécurité. Toute personne qui installe ou utilise cet équipement doit lire la présente publication (et toutes les autres publications pertinentes) avant de l’installer ou de l’utiliser.
  • Page 6 Notes:...
  • Page 7 olume able of onTenTs Volume One: Table of Contents Volume Two: Table of Contents Chapter 1: Getting Started – Introduction 1–2 The Purpose of this Manual 1–2 Where to Begin 1–2 Supplemental Manuals 1–2 Technical Support 1–2 Conventions Used 1–3 Key Topics for Each Chapter 1–3 DL205 System Components...
  • Page 8 Table of Contents Chapter 2: Installation, Wiring and Specifications 2–1 Safety Guidelines 2–2 Plan for Safety 2–2 Three Levels of Protection 2–3 Emergency Stops 2–3 Emergency Power Disconnect 2–4 Orderly System Shutdown 2–4 Class 1, Division 2, Approval 2–4 Mounting Guidelines 2–5 Base Dimensions 2–5...
  • Page 9 Table of Contents Slot Numbering 2–26 Module Placement Restrictions 2–26 Special Placement Considerations for Analog Modules 2–27 Discrete Input Module Status Indicators 2–27 Color Coding of I/O Modules 2–27 Wiring the Different Module Connectors 2–28 I/O Wiring Checklist 2–29 D2-08ND3, DC Input 2–30 D2-16ND3-2, DC Input 2–30...
  • Page 10 Connecting the Programming Devices 3–10 CPU Setup Information 3–11 Status Indicators 3–12 Mode Switch Functions 3–12 Changing Modes in the DL205 PLC 3–13 Mode of Operation at Power-up 3–13 Using Battery Backup 3–14 DL230 and DL240 3–14 DL250-1 and DL260 3–14...
  • Page 11 Table of Contents Initializing System Memory 3–16 Setting the Clock and Calendar 3–16 Setting the CPU Network Address 3–17 Setting Retentive Memory Ranges 3–17 Using a Password 3–18 Setting the Analog Potentiometer Ranges 3–19 CPU Operation 3–21 CPU Operating System 3–21 Program Mode Operation 3–22...
  • Page 12 Table of Contents PLC Numbering Systems 3–35 PLC Resources 3–35 V–Memory 3–36 Binary-Coded Decimal Numbers 3–36 Hexadecimal Numbers 3–36 Memory Map 3–37 Octal Numbering System 3–37 Discrete and Word Locations 3–37 V–Memory Locations for Discrete Memory Areas 3–37 Input Points (X Data Type) 3–38 Output Points (Y Data Type) 3–38...
  • Page 13 Table of Contents Chapter 4: System Design and Configuration 4–1 DL205 System Design Strategies 4–2 I/O System Configurations 4–2 Networking Configurations 4–2 Module Placement 4–3 Slot Numbering 4–3 Module Placement Restrictions 4–3 Automatic I/O Configuration 4–4 Manual I/O Configuration 4–4 Removing a Manual Configuration 4–5 Power–On I/O Configuration Check...
  • Page 14 Table of Contents 10BaseFL Network Cabling 4–25 Maximum Cable Length 4–25 Add a Serial Remote I/O Master/Slave Module 4–26 Configuring the CPU’s Remote I/O Channel 4–27 Configure Remote I/O Slaves 4–29 Configuring the Remote I/O Table 4–29 Remote I/O Setup Program 4–30 Remote I/O Test Program 4–31...
  • Page 15 Table of Contents MWX Slave Memory Address 4–51 MWX Master Memory Addresses 4–51 MWX Number of Elements 4–51 MWX Exception Response Buffer 4–51 MRX/MWX Example in DirectSOFT 4–52 Multiple Read and Write Interlocks 4–52 Non–Sequence Protocol (ASCII In/Out and PRINT) 4–54 Configure the DL260 Port 2 for Non-Sequence 4–54...
  • Page 16 Table of Contents Timer Example Using Comparative Contacts 5–43 Accumulating Timer (TMRA) 5–44 Accumulating Timer Example using Discrete Status Bits 5–45 Accumulator Timer Example Using Comparative Contacts 5–45 Counter Example Using Discrete Status Bits 5–47 Counter Example Using Comparative Contacts 5–47 Stage Counter Example Using Discrete Status Bits 5–49...
  • Page 17 olume able of onTenTs Chapter 6: Drum Instruction Programming (DL250-1/DL260 only) 6–1 Introduction 6–2 Purpose 6–2 Drum Terminology 6–2 Drum Chart Representation 6–3 Output Sequences 6–3 Step Transitions 6–4 Drum Instruction Types 6–4 Timer-Only Transitions 6–4 Timer and Event Transitions 6–5 Event-Only Transitions 6–6...
  • Page 18 Table of Contents Chapter 7: RLL Stage Programming 7–1 PLUS Introduction to Stage Programming 7–2 Overcoming “Stage Fright” 7–2 Learning to Draw State Transition Diagrams 7–3 Introduction to Process States 7–3 The Need for State Diagrams 7–3 A 2–State Process 7–3 RLL Equivalent 7–4...
  • Page 19 Table of Contents Parallel Processes 7–19 Converging Processes 7–19 Convergence Stages (CV) 7–19 Convergence Jump (CVJMP) 7–20 Convergence Stage Guidelines 7–20 Managing Large Programs 7–21 Stage Blocks (BLK, BEND) 7–21 Block Call (BCALL) 7–22 PLUS (Stage) Instructions 7–23 Stage (SG) 7–23 Initial Stage (ISG) 7–24...
  • Page 20 Table of Contents Bumpless Transfer 8–13 Loop Alarms 8–13 Loop Operating Modes 8–14 Special Loop Calculations 8–14 Ten Steps to Successful Process Control 8–16 PID Loop Setup 8–18 Some Things to Do and Know Before Starting 8–18 PID Error Flags 8–18 Establishing the Loop Table Size and Location 8–18...
  • Page 21 Table of Contents Use the DirectSOFT 5 Filter Intelligent Box (IBOX) Instruction 8–58 FilterB Example 8–58 Ramp/Soak Generator 8–59 Introduction 8–59 Ramp/Soak Table 8–60 Ramp/Soak Table Flags 8–62 Ramp/Soak Generator Enable 8–62 Ramp/Soak Controls 8–62 Ramp/Soak Profile Monitoring 8–63 Ramp/Soak Programming Errors 8–63 Testing Your Ramp/Soak Profile 8–63...
  • Page 22 Table of Contents Diagnostics 9–3 Diagnostics 9–3 Fatal Errors 9–3 Non-fatal Errors 9–3 Finding Diagnostic Information 9–4 V-memory Locations Corresponding to Error Codes 9–4 Special Relays (SP) Corresponding to Error Codes 9–5 I/O Module Codes 9–6 Error Message Tables 9–7 System Error Codes 9–8 Program Error Codes...
  • Page 23 Table of Contents Forcing I/O Points 9–26 Regular Forcing with Direct Access 9–28 Bit Override Forcing 9–29 Bit Override Indicators 9–29 Reset the PLC to Factory Defaults 9-30 Appendix A: Auxiliary Functions A–1 Introduction A–2 What are Auxiliary Functions? A–2 Accessing AUX Functions via DirectSOFT A–3 Accessing AUX Functions via the Handheld Programmer...
  • Page 24 Table of Contents AUX 58 Test Operations A–9 AUX 59 Bit Override A–10 AUX 5B Counter Interface Configuration A–10 AUX 5C Display Error History A–11 AUX 6* — Handheld Programmer Configuration A–12 AUX 61, 62 and 65 A–12 AUX 61 Show Revision Numbers A–12 AUX 62 Beeper On/Off A–12...
  • Page 25 Table of Contents Timer, Counter and Shift Register Instructions C–15 Accumulator Data Instructions C–16 Logical Instructions C–18 Math Instructions C–20 Differential Instructions C–23 Bit Instructions C–24 Number Conversion Instructions C–25 Table Instructions C–25 CPU Control Instructions C–27 Program Control Instructions C–27 Interrupt Instructions C–28...
  • Page 26 Real (Floating Point) Numbering System H–5 BCD/Binary/Decimal/Hex/Octal -What is the Difference? H–6 Data Type Mismatch H–7 Signed vs. Unsigned Integers H–8 AutomationDirect.com Products and Data Types H–9 DirectLOGIC PLCs H–9 C-more/C-more Micro-Graphic Panels H–9 DL205 User Manual, 4th Edition, Rev. D...
  • Page 27 Table of Contents Appendix I: European Union Directives (CE) European Union (EU) Directives Member Countries Applicable Directives Compliance General Safety Special Installation Manual Other Sources of Information Basic EMC Installation Guidelines Enclosures Electrostatic Discharge (ESD) AC Mains Filters Suppression and Fusing Internal Enclosure Grounding Equi–potential Grounding Communications and Shielded Cables...
  • Page 28 Table of Contents Notes xxii DL205 User Manual, 4th Edition, Rev. D...
  • Page 29: Table Of Contents

    hapter hapter hapter nstructIon rogrammIng (DL250-1/DL260 o In This Chapter... Introduction ................6–2 Step Transitions................6–4 Overview of Drum Operation .............6–8 Drum Control Techniques ............6–10 Drum Instruction ................6–12...
  • Page 30: Chapter 6: Drum Instruction Programming

    Chapter 6: Drum Instruction Programming Introduction Purpose The four types of drum instructions available in the DL250-1 and DL260 CPUs electronically simulate an electro-mechanical drum sequencer. The instructions offer slight variations on the basic principle. Drum Terminology Drum instructions are best suited for repetitive processes that consist of a finite number of steps.
  • Page 31: Drum Chart Representation

    Chapter 6: Drum Instruction Programming Drum Chart Representation For editing purposes, the electronic drum is presented in chart form in DirectSOFT and in this manual. Imagine slicing the surface of a hollow drum cylinder between two rows of pegs, then pressing it flat.
  • Page 32: Step Transitions

    Chapter 6: Drum Instruction Programming Step Transitions Drum Instruction Types There are four types of Drum instructions in the DL250-1 and DL260 CPUs: • Timed Drum with Discrete Outputs (DRUM) • Time and Event Drum with Discrete Outputs (EDRUM) • Masked Event Drum with Discrete Outputs (MDRMD) •...
  • Page 33: Timer And Event Transitions

    Chapter 6: Drum Instruction Programming For example, if you program a 5 second time base and 12 counts for Step 1, then the drum will spend 60 seconds in Step 1. The maximum time for any step is given by the formula: Max Time per step = 0.01 seconds X 9999 X 9999 = 999,800 seconds = 277.7 hours = 11.6 days NOTE: When first choosing the timebase resolution, a good rule of thumb is to make it about 1/10 the...
  • Page 34: Event-Only Transitions

    Chapter 6: Drum Instruction Programming Event-Only Transitions Step transitions do not require both the event and the timer criteria programmed for each step. You have the option of programming just one of the two, and even mixing transition types among all the steps of the drum. For example, you might want Step 1 to transition on an event, Step 2 to transition on time only, and Step 3 to transition on both time and an event.
  • Page 35: Last Step Completion

    Chapter 6: Drum Instruction Programming Last Step Completion The last step in a drum sequence may be any step number, since partial drums are valid. Refer to the following figure. When the transition conditions of the last step are met, the drum sets the counter bit corresponding to the counter named in the drum instruction box (such as CT10).
  • Page 36: Overview Of Drum Operation

    Chapter 6: Drum Instruction Programming Overview of Drum Operation Drum Instruction Block Diagram The drum instruction utilizes various inputs and outputs in addition to the drum pattern itself. Refer to the figure below. Inputs DRUM INSTRUCTION Outputs Block Diagram Start Real time Inputs Reset...
  • Page 37: Powerup State Of Drum Registers

    Chapter 6: Drum Instruction Programming • Counts/Step – The number of timer counts the drum spends in each step. Each step has its own counts parameter. However, programming the counts/step is optional. • Timer Value – the current value of the counts/step timer. •...
  • Page 38: Drum Control Techniques

    Chapter 6: Drum Instruction Programming Drum Control Techniques Start Drum Control Inputs Setup Now we are ready to put together the concepts Outputs Info on the previous pages and demonstrate general Reset control of the drum instruction box. The drawing to the right shows a simplified generic Steps drum instruction.
  • Page 39: Self-Resetting Drum

    Chapter 6: Drum Instruction Programming In the figure below, we focus on how the Jog input works on event drums. To the left of the diagram, note that the off-to-on transitions of the Jog input increments the step. Start may be either on or off (however, Reset must be off).
  • Page 40: Drum Instruction

    Chapter 6: Drum Instruction Programming Drum Instructions All of the DL250-1 and DL260 drum instructions may be programmed using DirectSOFT. The EDRUM is the only drum instruction that can be programmed with a handheld programmer (firmware version v2.21 or later). This section covers entry using DirectSOFT for all instructions plus the handheld mnemonics for the EDRUM instruction.
  • Page 41 Chapter 6: Drum Instruction Programming Drum instructions use four counters in the CPU. The ladder program can read the counter values for the drum’s status. The ladder program may write a new preset step number to CTA(n+2) at any time. However, the other counters are for monitoring purposes only. DL250-1 Ranges DL260 Ranges Counter Number...
  • Page 42: Event Drum (Edrum)

    Chapter 6: Drum Instruction Programming Event Drum (EDRUM) The Event Drum (EDRUM) features time-based and event-based step transitions. It operates according to the general principles of drum operation covered in the beginning of this chapter. Below is the instruction as displayed by DirectSOFT. 250-1 Direct SOFT 5 Display Step Preset...
  • Page 43 Chapter 6: Drum Instruction Programming Drum instructions use four counters in the CPU. The ladder program can read the counter values for the drum’s status. The ladder program may write a new preset step number to CTA(n+2) at any time. However, the other counters are for monitoring purposes only. Counter Number DL250-1 Ranges DL260 Ranges Function...
  • Page 44: Handheld Programmer Drum Mnemonics

    Chapter 6: Drum Instruction Programming Handheld Programmer Drum Mnemonics The EDRUM instruction can also be programmed using a Handheld Programmer. This section explains entry via the Handheld Programmer. First, enter Store instructions for the ladder rungs Start controlling the drum’s ladder inputs. In the Outputs Setup Info...
  • Page 45 Chapter 6: Drum Instruction Programming Using the DRUM entry chart (two pages before), we show the method of entry for the basic time/event drum instruction. First, we convert the output pattern for each step to the equivalent hex number, as shown in the following example. Step Outputs : f f f f...
  • Page 46 Chapter 6: Drum Instruction Programming Handheld Programmer Keystrokes cont’d Handheld Programmer Keystrokes cont’d skip over unused event ( DEF 0000 ) NEXT step 1 pattern = 0000 NEXT ( DEF K0000 ) ( DEF 0000 ) SHFT NEXT NEXT ( DEF K0000 ) SHFT NEXT ( DEF 0000 )
  • Page 47: Masked Event Drum With Discrete Outputs (Mdrmd)

    Chapter 6: Drum Instruction Programming Masked Event Drum with Discrete Outputs (MDRMD) The Masked Event Drum with Discrete Outputs has all the features of the basic Event Drum plus final output control for each step. It operates according to the general principles of drum operation covered in the beginning of this section.
  • Page 48 Chapter 6: Drum Instruction Programming Drum instructions use four counters in the CPU. The ladder program can read the counter values for the drum’s status. The ladder program may write a new preset step number to CTA(n+2) at any time. However, the other counters are for monitoring purposes only. Counter Number DL250-1 Ranges DL260 Ranges Function...
  • Page 49: Masked Event Drum With Word Output (Mdrmw)

    Chapter 6: Drum Instruction Programming Masked Event Drum with Word Output (MDRMW) The Masked Event Drum with Word Output features outputs organized as bits of a single word, rather than discrete points. It operates according to the general principles of drum operation covered in the beginning of this section.
  • Page 50 Chapter 6: Drum Instruction Programming Drum instructions use four counters in the CPU. The ladder program can read the counter values for the drum’s status. The ladder program may write a new preset step number to CTA(n+2) at any time. However, the other counters are for monitoring purposes only. DL250-1 Ranges DL260 Ranges Counter Number...
  • Page 51 hapter hapter hapter PLUS tage RogRamming In This Chapter... Introduction to Stage Programming ...........7–2 Learning to Draw State Transition Diagrams .......7–3 Using the Stage Jump Instruction for State Transitions ....7–7 Stage Program Example: Toggle On/Off Lamp Controller ...7–8 Four Steps to Writing a Stage Program ........7–9 Stage Program Example: A Garage Door Opener ......7–10 Stage Program Design Considerations ........7–15 Parallel Processing Concepts ............7–19...
  • Page 52: Introduction To Stage Programming

    Chapter 7: RLL Stage Programming PLUS Introduction to Stage Programming Stage Programming (available in all DL205 CPUs) provides a way to organize and program complex applications with relative ease, when compared to purely relay ladder logic (RLL) solutions. Stage programming does not replace or negate the use of traditional boolean ladder 250-1 programming.
  • Page 53: Learning To Draw State Transition Diagrams

    Chapter 7: RLL Stage Programming PLUS Learning to Draw State Transition Diagrams Introduction to Process States Ladder Inputs Outputs Those familiar with ladder program execution know the Program CPU must scan the ladder program repeatedly, over and over. Its three basic steps are: 1.
  • Page 54: Rll Equivalent

    Chapter 7: RLL Stage Programming PLUS The state transition diagram to the right is a picture of the solution we need to create. The beauty of it is this: it expresses the problem independently of the programming language we may use to realize it. In other words, by drawing the diagram we have already solved the control problem! Output equation Y0 = ON...
  • Page 55: Let's Compare

    Chapter 7: RLL Stage Programming PLUS Let’s Compare Right now, you may be thinking “I don’t see the big advantage to Stage Programming... in fact, the stage program is longer than the plain RLL program”. Well, now is the time to exercise a bit of faith.
  • Page 56: What Stage Bits Do

    Chapter 7: RLL Stage Programming PLUS Powerup We can mark our desired powerup state as shown to the right, which helps us remember to use the appropriate Initial Stages when creating a stage program. It is permissible to have as many initial stages as the process requires.
  • Page 57: Using The Stage Jump Instruction For State Transitions

    Chapter 7: RLL Stage Programming PLUS Using the Stage Jump Instruction for State Transitions Stage Jump, Set, and Reset Instructions The Stage JMP instruction we have used deactivates the stage in which the instruction occurs, while activating the stage in the JMP instruction. Refer to the state transition shown below. When contact X0 energizes, the state transition from S0 to S1 occurs.
  • Page 58: Stage Program Example: Toggle On/Off Lamp Controller

    Chapter 7: RLL Stage Programming PLUS Stage Program Example: Toggle On/Off Lamp Controller A 4–State Process In the process shown to the right, we use an ordinary Inputs Outputs momentary pushbutton to control a light bulb. The ladder program will latch the switch input, so that we will Toggle Ladder push and release to turn on the light, push and release...
  • Page 59: Four Steps To Writing A Stage Program

    Chapter 7: RLL Stage Programming PLUS Four Steps to Writing a Stage Program By now, you’ve probably noticed that we follow the same steps to solve each example problem. The steps will probably come to you automatically if you work through all the examples in this chapter.
  • Page 60: Stage Program Example: A Garage Door Opener

    Chapter 7: RLL Stage Programming PLUS Stage Program Example: A Garage Door Opener Garage Door Opener Example In this next stage programming example we will create a garage door opener controller. Hopefully most readers are familiar with this application, and we can have fun besides! The first step we must take is to describe how the door opener works.
  • Page 61: Draw The State Diagram

    Chapter 7: RLL Stage Programming PLUS Draw the State Diagram Now we are ready to draw the state transition diagram. Like the previous light bulb controller example, this application also has only one switch for the command input. Refer to the figure below.
  • Page 62 Chapter 7: RLL Stage Programming PLUS Add Safety Light Feature Next we will add a safety light feature to the door opener system. It’s best to get the main function working first as we have done, then adding the secondary features. Safety light The safety light is standard on many commercially- available garage door openers.
  • Page 63: Using A Timer Inside A Stage

    Chapter 7: RLL Stage Programming PLUS Using a Timer Inside a Stage The finished modified program is shown to the right. The shaded areas indicate the program additions. In the Push-UP stage S1, we add the Set Stage Bit S6 instruction.
  • Page 64: Exclusive Transitions

    Chapter 7: RLL Stage Programming PLUS Add Emergency Stop Feature Some garage door openers today will detect an object under the door. This halts further lowering of the door. Usually implemented with a photocell (“electric-eye”), a door in the process of being lowered will halt and begin raising.
  • Page 65: Stage Program Design Considerations

    Chapter 7: RLL Stage Programming PLUS Stage Program Design Considerations Stage Program Organization The examples so far in this chapter used one self-contained state diagram to represent the main process. However, we can have multiple processes implemented in stages, all in the same ladder program.
  • Page 66: How Instructions Work Inside Stages

    Chapter 7: RLL Stage Programming PLUS How Instructions Work Inside Stages We can think of states or stages as simply dividing our ladder program as depicted in the figure below. Each stage contains only the ladder rungs which are needed for the corresponding state of the process.
  • Page 67: Stage Counter

    Chapter 7: RLL Stage Programming PLUS Using a Stage as a Supervisory Process You may recall the light bulb on-off controller example from earlier in this chapter. For the purpose of illustration, suppose we want to monitor the Toggle Ladder “productivity”...
  • Page 68: Power Flow Transition Technique

    Chapter 7: RLL Stage Programming PLUS Unconditional Outputs As in most example programs in this chapter and Stage 0 to the right, your application may require a particular output to be ON unconditionally when a particular stage is active. Until now, the examples always use the SP1 special relay contact (always on) in series with the output coils.
  • Page 69: Parallel Processing Concepts

    Chapter 7: RLL Stage Programming PLUS Parallel Processing Concepts Parallel Processes Previously in this chapter we discussed how a state may transition to either one state or another, called an exclusive transition. In other cases, we may need to branch simultaneously to two or more parallel processes, as shown below.
  • Page 70: Convergence Jump (Cvjmp)

    Chapter 7: RLL Stage Programming PLUS Convergence Jump (CVJMP) Recall the last convergence stage only has power flow when all CV stages in the group are active. Convergence Jump To complement the convergence stage, we need a new jump instruction. The Convergence Jump 250-1 (CVJMP) shown to the right will transition to Stage S5 when X3 is active (as one might expect), but it...
  • Page 71: Managing Large Programs

    Chapter 7: RLL Stage Programming PLUS Managing Large Programs A stage may contain a lot of ladder rungs, or only one or two program rungs. For most applications, good program design will ensure the average number of rungs per stage will be small.
  • Page 72: Block Call (Bcall)

    Chapter 7: RLL Stage Programming PLUS Block Call (BCALL) The purpose of the Block Call instruction is to activate a stage block. At powerup or upon Program-to-Run mode transitions, all stage blocks and the stages within them are inactive. Shown in the figure below, the Block Call instruction is a type of output coil. When the X0 contact is closed, the BCALL will cause the stage block referenced in the instruction (C0) to 250-1 become active.
  • Page 73: Rll Plus (Stage) Instructions

    Chapter 7: RLL Stage Programming PLUS (Stage) Instructions PLUS Stage (SG) The Stage instructions are used to create structured RLL PLUS programs. Stages are program segments that can be activated by transitional logic, a Jump or a Set Stage that is executed from an active stage.
  • Page 74: Initial Stage (Isg)

    Chapter 7: RLL Stage Programming PLUS Initial Stage (ISG) The Initial Stage instruction is normally used as the first segment of an RLL program. Initial stages will be active PLUS when the CPU enters the run mode allowing for a starting point in the program.
  • Page 75 Chapter 7: RLL Stage Programming PLUS In the following example, when the CPU begins program execution, only ISG 0 will be active. When X1 is on, the program execution will jump from Initial Stage 0 to Stage 1. In Stage 1, if X2 is on, output Y5 will be turned on.
  • Page 76: Stage Programming

    Chapter 7: RLL Stage Programming PLUS In the following example, when Converge Stages S10 and S11 are both active, the CVJMP instruction will be executed when X4 is on. The CVJMP will deactivate S10 and S11, and activate S20. Then, if X5 is on, the program execution will jump back to the initial stage, S0. DirectSOFT Handheld Programmer Keystrokes S(SG)
  • Page 77: Block End (Bend)

    Chapter 7: RLL Stage Programming PLUS Block Call (BCALL) The stage block instructions are used to activate a block of C aaa stages. The Block Call, Block, and Block End instructions BCALL must be used together. The BCALL instruction is used to activate a stage block.
  • Page 78: Stage View In Directsoft

    Chapter 7: RLL Stage Programming PLUS In this example, the Block Call is executed when DirectSOFT stage 1 is active and X6 is on. The Block Call then automatically activates stage S10, which immediately follows the Block instruction. This allows the stages between S10 and the Block End instruction to operate as programmed.
  • Page 79: Questions And Answers About Stage Programming

    Chapter 7: RLL Stage Programming PLUS Questions and Answers about Stage Programming We include the following commonly-asked questions about Stage Programming as an aid to new students. All question topics are covered in more detail in this chapter. Q. What does stage programming do that I can’t do with regular RLL programs? A.
  • Page 80 Chapter 7: RLL Stage Programming PLUS Q. Can I have a stage that is active for only one scan? A. Yes, but this is not the intended use for a stage. Instead, make a ladder rung active for one scan by including a stage Jump instruction at the bottom of the rung. Then the ladder will execute on the last scan before its stage jumps to a new one.
  • Page 81 hapter hapter hapter PID L PeratIon In This Chapter... DL205 PID Control ................8–2 Introduction to PID Control ..............8–4 Introducing DL205 PID Control ............8–6 PID Loop Operation ................8–9 Ten Steps to Successful Process Control ..........8–16 PID Loop Setup .................. 8–18 PID Loop Tuning ................
  • Page 82: Chapter 8: Pid Loop Operation

    Chapter 8: PID Loop Operation DL250-1 and DL260 PID Loop Features Main Features The DL250-1 and DL260 CPUs process loop control offers a sophisticated set of feature to address many application needs. The main features are: • DL250-1 - up to 4 loops, individual programmable sample rates •...
  • Page 83: Specifications

    Chapter 8: PID Loop Operation PID Loop Feature Specifications Number of loops DL250-1 - selectable up to 4; DL260 - selectable up to 16 CPU V-memory needed 32 words (V locations) per loop selected, 64 words if using ramp/soak PID algorithm Position or Velocity form of the PID equation Control Output polarity Selectable direct-acting or reverse-acting...
  • Page 84: Introduction To Pid Control

    Chapter 8: PID Loop Operation Introduction to PID Control What is PID Control? In this discussion, we will explain why PID control is used in process control instead of trying to provide control by simply using an analog input and a discrete output. There are many types of analog controllers available, and the proper selection will depend upon the particular application.
  • Page 85 Chapter 8: PID Loop Operation The PID controller controls a continuous feedback loop that keeps the process output (control variable) flowing normally by taking corrective action whenever there is a deviation from the desired value (setpoint) of the process variable (PV) such as, rate of flow, temperature, voltage, etc.
  • Page 86: Introducing Dl205 Pid Control

    (setpoint) as long as there are no disturbances (cold water) in the process. The DL205 PLC has the ability to directly accept signals from electronic sensors, such as thermocouples, pressure, VFDs, etc. These signals may be used in mathematically derived control systems.
  • Page 87 Chapter 8: PID Loop Operation Standard DL205 analog input modules are used to interface to field transmitters to obtain the PV. These transmitters normally provide a 4-20mA current or an analog voltage of various ranges for the control loop. For temperature control, thermocouple or RTD can be connected directly to the appropriate module.
  • Page 88: Process Control Definitions

    Chapter 8: PID Loop Operation Process Control Definitions Manufacturing Process – The set of actions that adds value to raw materials. The process can involve physical changes and/or chemical changes to the material. The changes render the material more useful for a particular purpose, ultimately used in a final product. Process Variable –...
  • Page 89: Pid Loop Operation

    Chapter 8: PID Loop Operation PID Loop Operation The Proportional–Integral–Derivative (PID) algorithm is widely used in process control. The PID method of control adapts well to electronic solutions, whether implemented in analog or digital (CPU) components. The DL205 CPU implements the PID equations digitally by solving the basic equations in software.
  • Page 90: Reset Windup Protection

    Chapter 8: PID Loop Operation The DL205 also combines the integral sum and the initial output into a single term called the bias (Mx). This results in the following set of equations: Mx = Ki * e + Mx = Kc * e - Kr(PV ) + Mx The DL205 by default will keep the normalized output M in the range of 0.0 to 1.0.
  • Page 91: Freeze Bias

    Chapter 8: PID Loop Operation Freeze Bias If the “Freeze Bias” option is selected when setting up the PID loop (discussed later), then the CPU simply stops changing the bias (Mx) whenever the computed normalized output (M) goes outside the interval 0.0 to 1.0. Mx = Ki * e + Mx M = Kc * e...
  • Page 92: Step Bias Proportional To Step Change In Sp

    Chapter 8: PID Loop Operation Step Bias Proportional to Step Change in SP This feature reduces oscillation caused by a step change in setpoint when the adjusting bias feature is used. Mx = Mx * SP / SP if the loop is direct acting Mx = Mx * SP / SP if the loop is reverse acting...
  • Page 93: Bumpless Transfer

    Chapter 8: PID Loop Operation Bumpless Transfer The DL205 loop controller provides for bumpless mode changes. A bumpless transfer from manual mode to automatic mode is achieved by preventing the control output from changing immediately after the mode change. When a loop is switched from Manual mode to Automatic mode, the setpoint and Bias are initialized as follows: Position PID Algorithm Velocity PID Algorithm...
  • Page 94: Loop Operating Modes

    V-memory. All alarms are monitored while in automatic. Cascade Cascade mode is an option with the DL205 PLC and is used in special control applications. If the cascade feature is used, the loop will operate as it would if in automatic mode except for the fact that a cascaded loop has a setpoint which is the control output from another loop.
  • Page 95: Derivative Gain Limiting

    Chapter 8: PID Loop Operation Error Deadband Control With error deadband control, no control action is taken if the PV is within the specified deadband area around the setpoint. The error deadband is the same above and below the setpoint. Once the PV is outside of the error deadband around the setpoint, the entire error is used in the loop calculation.
  • Page 96: Ten Steps To Successful Process Control

    Chapter 8: PID Loop Operation Ten Steps to Successful Process Control Controllers such as the DL205 PLC provide sophisticated process control features. Automated control systems can be difficult to debug, because a given symptom can have many possible causes. We recommend a careful, step-by-step approach to bringing new control loops online: Step 1: Know the Recipe The most important is –...
  • Page 97 Chapter 8: PID Loop Operation DL06 CPU V-memory Input Digital Module Output Loop 1 Data Process 1 Channel 1 Channel 1 Loop 2 Data Process 2 Channel 2 Channel 2 Channel 3 Channel 4 Step 5: Wiring and Installation After selection and procurement of all loop components and I/O module(s), you can perform the wiring and installation.
  • Page 98: Pid Loop Setup

    Have your analog module installed and operational before beginning the loop setup (refer to the DL205 Analog Modules User Manual, D2-ANLG-M). The DL205 PLC gets its PID loop processing instructions from V-memory tables. There isn’t a PID instruction that can be used in RLL, such as a block, to set up the PID loop control.
  • Page 99 Chapter 8: PID Loop Operation NOTE: The DL205 CPU’s PID algorithm requires DirectSOFT and the DL250-1 or L260 CPUs with any firmware version. See our website for more information: www.automationdirect.com. V–Memory The Loop Table contains data for only the number of loops User Data that are selected.
  • Page 100: Loop Table Word Definitions

    Chapter 8: PID Loop Operation Loop Table Word Definitions These are the loop parameters associated with each of the four loops available in the DL205. The parameters are listed in the following table. The address offset is in octal, to help you locate specific parameters in the loop table.
  • Page 101: Pid Mode Setting 1 Bit Descriptions (Addr + 00)

    Chapter 8: PID Loop Operation PID Mode Setting 1 Bit Descriptions (Addr + 00) The individual bit definitions of the PID Mode Setting 1 word (Addr+00) are listed in the following table. PID Mode Setting 1 Description Read/Write Bit=0 Bit=1 Manual Mode Loop Operation request write –...
  • Page 102: Pid Mode Setting 2 Bit Descriptions (Addr + 01)

    Chapter 8: PID Loop Operation PID Mode Setting 2 Bit Descriptions (Addr + 01) The individual bit definitions of the PID Mode Setting 2 word (Addr+01) are listed in the following table. PID Mode 2 Word Description Read/Write Bit=0 Bit=1 Input (PV) and Control Output Range Unipolar/Bipolar write unipolar...
  • Page 103: Mode/Alarm Monitoring Word (Addr + 06)

    Chapter 8: PID Loop Operation Mode/Alarm Monitoring Word (Addr + 06) The individual bit definitions of the Mode / Alarm monitoring (Addr+06) word are listed in the following table. Mode/Alarm Bit Description Read/Write Bit=0 Bit=1 Manual Mode Indication read – Manual Automatic Mode Indication read...
  • Page 104 Chapter 8: PID Loop Operation Ramp/Soak Table Location (Addr + 34) Each loop that you configure has the option of using a built-in Ramp/Soak generator dedicated to that loop. This feature generates SP values that follow a profile. To use the Ramp Soak feature, you must program a separate table of 32 words with appropriate values.
  • Page 105 Chapter 8: PID Loop Operation PV Auto Transfer (Addr + 36) from I/O Module Base/Slot/Channel Option The nibble definitions for PV Auto Transfer word (Addr + 36) are listed in the table below for the Transfer from Base/Slot option. When this option is used for any channel on an analog input module, the ladder logic pointer method cannot be used for this module.
  • Page 106: Configure The Pid Loop

    Chapter 8: PID Loop Operation Configure the PID Loop Once the PID table is established in V-memory, configuring the PID loop continues with the DirectSOFT PID set-up configuration dialog. You will need to check and fill in the data required to control the PID loop. Select Configure and the following dialog box will appear for this process.
  • Page 107 Chapter 8: PID Loop Operation Select Forward/Reverse It is important to know in which direction the control output will respond to the error (SP- PV), either forward or reverse. A forward (direct) acting control loop means that whenever the control output increases, the process variable will also increase. The control outputs of most PID loops are forward acting, such as a heating control loop.
  • Page 108 Chapter 8: PID Loop Operation Setpoint V+02 Control Output V+05 Loop Calculation – Process Variable V+03 PID Mode 2 Setting V+01 Data formats 12 bit unipolar 0 to 0FFF (0 to 4095) Select data 0 to 0FFF, 8FFF to 8001 12 bit bipolar format using (0 to 4095, *–4095 to 4095)
  • Page 109 Chapter 8: PID Loop Operation In Cascade Mode, the loop operates as it does in Automatic Mode, with one important difference. The data source for the SP changes from its normal location at V+02 to using the control output value, V+05, from another loop. So in Auto or Manual modes, the loop calculation uses the data at V+02.
  • Page 110 Chapter 8: PID Loop Operation If you need to operate the PID loops while the RLL program is halted, in Program Mode, either select the Independent of CPU mode in the dialog or edit your program to set and reset bit 15 of PID Mode 1 word (V+00) in your RLL program.
  • Page 111 Chapter 8: PID Loop Operation You may optionally configure each loop to access its analog I/O (PV and control output) by placing proper values in the associated loop table registers in your RLL program. The following figure shows the loop table parameters at V+36 and V+37 and their auto transfer role to access the analog values directly Error Control output V+05...
  • Page 112 Chapter 8: PID Loop Operation Set the limits around the SP value to prevent an operator from entering a setpoint value outside of a safe range. The Square root box is only checked for certain PID loops, such as a flow control loop.
  • Page 113 Chapter 8: PID Loop Operation Enter PID Parameters Another PID setup dialog, Tuning, is for entering the PID parameters shown as: Gain (Proportional Gain), Reset (Integral Gain) and Rate (Derivative Gain). Recall the position and velocity forms of the PID loop equations which were introduced earlier. The equations basically show the three components of the PID calculation: Proportional Gain (P), Integral Gain (I) and Derivative Gain (D).
  • Page 114 Chapter 8: PID Loop Operation NOTE: You may elect to leave the tuning dialog blank and enter the tuning parameters in the DirectSOFT PID View. Derivative Gain Limiting The derivative gain (rate) has an optional gain-limiting feature. This is provided because the derivative gain reacts badly to PV signal noise or other causes of sudden PV fluctuations.
  • Page 115: Recovery Time

    Chapter 8: PID Loop Operation Enable Deadband – When selected, the enable deadband function takes a range of small error values near zero, and simply substitutes zero as the value of the error. If the error is larger than the deadband range, then the error value is used normally. Freeze Bias The term reset windup refers to an undesirable characteristic of integrator behavior which occurs naturally under certain conditions.
  • Page 116 Chapter 8: PID Loop Operation Set Up the PID Alarms Although the setup of the PID alarms is optional, you surely would not want to operate a process without monitoring it. The performance of a process control loop may generally be measured by how closely the process variable matches the setpoint.
  • Page 117: Pv Deviation Alarms

    Chapter 8: PID Loop Operation If the process remains out of control for some time, the PV will eventually cross one of the outer alarm thresholds, named High-high alarm and Low-low alarm. Their threshold values are programmed using the loop table registers listed above. A High-high or Low-low alarm indicates a serious condition exists, and needs the immediate attention of the operator.
  • Page 118: Pv Rate-Of-Change Alarm

    Chapter 8: PID Loop Operation PV Rate-of-Change Alarm An excellent way to get an early warning of a process fault is to monitor the rate-of-change of the PV. Most batch processes have large masses and slowly-changing PV values. A relatively fast-changing PV will result from a broken signal wire for either the PV or control output, an SP value error, or other causes.
  • Page 119 Loop Calculation Overflow/Underflow Error reached setpoint. NOTE: Overflow/underflow can be alarmed in PID View. The optional C-more operator interface panel (see the automationdirect.com website) can also be set up to read these error bits using the PID Faceplate templates. 8-39...
  • Page 120 Chapter 8: PID Loop Operation Ramp/Soak R/S (Ramp/Soak) is the last dialog available in the PID setup. The basic PID does not require any entries to be made in order to operate the PID loop. Ramp/Soak will be discussed in another section.
  • Page 121: Pid Loop Tuning

    Chapter 8: PID Loop Operation PID Loop Tuning Once you have set up a PID loop, it must be tuned in order for it to work. The goal of loop tuning is to adjust the loop gains so the loop has optimal performance in dynamic conditions. The quality of a loop’s performance may generally be judged by how well the PV follows the SP after an SP step change.
  • Page 122: Manual Tuning Procedure

    Chapter 8: PID Loop Operation Manual Tuning Procedure It is not necessary to try to obtain the best values for the P, I and D parameters in the PID loop by trial and error. Following is a typical procedure for tuning a temperature control loop, which you may use to tune your loop.
  • Page 123 Chapter 8: PID Loop Operation • Increase the Proportional gain, for example to 2.0. The control output will be greater and the response time will be quicker. The trend should resemble the figure below. Error 60% here 50% here • Increase the Proportional gain in small increments, such as 4, 6, 7, etc., until the control output response begins to oscillate.
  • Page 124 Chapter 8: PID Loop Operation The foregone method is the most common method used to tune a PID loop. Derivative gain is almost never used in a temperature control loop. This method can also be used for other control loops, but other parameters may need to be added for a stable control output. Test your loop for a high PV of 80% and again for a low PV of 20%, and correct the values if necessary.
  • Page 125: Alternative Manual Tuning Procedures By Others

    Chapter 8: PID Loop Operation Alternative Manual Tuning Procedures by Others The following tuning procedures have been extracted from various publications about PID process control. These procedures are for comparison to the procedure in this manual. Tuning PID Controllers Two-Mode Simple Method – for P-I controllers 1.
  • Page 126: Auto Tuning Procedure

    Chapter 8: PID Loop Operation Auto Tuning Procedure The auto tuning feature for the DL205 loop controller will only run once each time it is enabled in the PID table. Therefore, auto tuning does not run continuously during operation (this would be adaptive control). Whenever there is a substantial change in loop dynamics, such as mass of process, size of actuator, etc., the tuning process will need to be repeated in order to derive new gains required for optimal control.
  • Page 127 Chapter 8: PID Loop Operation Open-Loop Auto Tuning During an open-loop auto tuning cycle, the loop controller operates as shown in the diagram below. Before starting this procedure, place the loop in Manual Mode and ensure the PV and control output values are in the middle of their ranges (away from the end points). PLC System Process Variable Response...
  • Page 128 Chapter 8: PID Loop Operation When the loop tuning observations are complete, the loop controller computes Rr (maximum slope in %/sec.) and Lr (dead time in sec). The auto tune function computes the gains according to the Zeigler-Nichols equations, shown below: PID Tuning PI Tuning P=1.2*im/LrRr...
  • Page 129: Auto Tuning Error

    Chapter 8: PID Loop Operation The following timing diagram shows the events which occur in the closed-loop auto tuning cycle. The auto tune function examines the direction of the offset of the PV from the SP. The auto tune function then takes control of the control output and induces a full-span step change in the opposite direction.
  • Page 130: Open A New Data View Window

    Chapter 8: PID Loop Operation Use Direct SOFT Data View with PID View The Data View window is a very useful tool which can be used to help tune your PID loop. You can compare the variables in the PID View with the actual values in the V-memory location with Data View.
  • Page 131: Open Pid View

    Chapter 8: PID Loop Operation Open PID View The PID View can only be opened after a loop has been setup in your ladder program. PID View is opened by selecting it from the View submenu on the Menu bar, View > PID View. The PID View can also be opened by clicking on the PID View button from the PLC Setup toolbar if it is in view.
  • Page 132 Chapter 8: PID Loop Operation The two views are now ready to be used to tune your loop. You will be able to see where the PID values have been set and see the process that it is controlling. The diagram below illustrates how the to use the views to see the current SP, PV and Output values, along with the other PID addresses.
  • Page 133 Chapter 8: PID Loop Operation With both windows positioned in this manner, you are able to see where the PID values have been set and see the process that it is controlling. In the diagram below, you can see the current SP, PV and Output values, along with the other PID addresses.
  • Page 134: Using The Special Pid Features

    Chapter 8: PID Loop Operation Using the Special PID Features It’s a good idea to understand the special features of the DL205 and how to use them. You may want to incorporate some of these features for your PID. How to Change Loop Modes PID Mode 1 Setting V+00 The first three bits of the PID Mode 1 word (V+00) request the operating mode of the corresponding loop.
  • Page 135: Operator Panel Control Of Pid Modes

    Chapter 8: PID Loop Operation Operator Panel Control of PID Modes Since the modes Manual, Auto and Cascade are the most fundamental and important PID loop controls, you may want to hard-wire mode control switches to an operator’s panel. Most applications will need only Manual and Auto selections (Cascade is used in special applications).
  • Page 136: Pv Analog Filter

    Chapter 8: PID Loop Operation PV Analog Filter A noisy PV signal can make tuning difficult and can cause the control output to be more extreme than necessary, as the output tries to respond to the peaks and valleys of the PV. There are two equivalent methods of filtering the PV input to make the loop more stable.
  • Page 137: Creating An Analog Filter In Ladder Logic

    Chapter 8: PID Loop Operation The algorithm that the built-in filter follows is: y i = k (x i – y i –1) + y i –1 where: y i is the current output of the filter x i is the current input to the filter y i –1 is the previous output of the filter k is the PV Analog Input Filter Factor Creating an Analog Filter in Ladder Logic...
  • Page 138: Use The Directsoft 5 Filter Intelligent Box Instruction

    Chapter 8: PID Loop Operation Use the DirectSOFT 5 Filter Intelligent Box Instruction For those who are using DirectSOFT 5, you have the opportunity to use Intelligent Box (IBox) instruction IB-402, Filter Over Time in Binary (decimal). This IBox will perform a first-order filter on the Raw Data on a defined time interval.
  • Page 139: Ramp/Soak Generator

    Chapter 8: PID Loop Operation Ramp/Soak Generator Introduction Our discussion of basic loop operation noted the setpoint for a loop will be generated in various ways, depending on the loop operating mode and programming preferences. In the figure below, the ramp/soak generator is one of the ways the SP may be generated. It is the responsibility of your ladder program to ensure only one source attempts to write the SP value at V+02 at any particular time.
  • Page 140: Ramp/Soak Table

    Chapter 8: PID Loop Operation Now that we have described the general ramp/soak generator operation, we list its specific features: • Each loop has its own ramp/soak generator (use is optional). • You may specify up to eight ramp/soak steps (16 segments). •...
  • Page 141 Chapter 8: PID Loop Operation The parameters in the ramp/soak table must be user-defined. The most convenient way is to use DirectSOFT, which features a special editor for this table. Four parameters are required to define a ramp and soak segment pair, as pictured below. •...
  • Page 142: Ramp/Soak Table Flags

    Chapter 8: PID Loop Operation Many applications do not require all 16 ramp/soak steps. Use all zeros in the table for unused steps. The ramp/soak generator ends the profile when it finds ramp slope = 0. Ramp/Soak Table Flags The individual bit definitions of the Ramp/Soak Table Flag (Addr+33) word is listed in the following table.
  • Page 143: Ramp/Soak Profile Monitoring

    Chapter 8: PID Loop Operation The normal state for the ramp/soak control bits is all zeros. Ladder logic must set only one control bit at a time. • Start – a 0 to 1 transition will start the ramp/soak profile. The CPU must be in Run Mode, and the loop can be in Manual or Auto Mode.
  • Page 144: Directsoft Ramp/Soak Example

    Chapter 8: PID Loop Operation DirectSOFT Ramp/Soak Example The following example will step you through the Ramp/Soak setup. Set Up the Profile in PID Setup The first step is to use Setup PID in DirectSOFT to set the profile of your process. Open the Setup PID window and select the R/S tab, and then enter the Ramp and Soak data.
  • Page 145 Chapter 8: PID Loop Operation Test the Profile Test your profile using PID View. 8-65 DL205 User Manual, 4th Edition, Rev. D...
  • Page 146: Cascade Control

    Chapter 8: PID Loop Operation Cascade Control Introduction Using cascaded loops is an advanced control technique, superior to individual loop control in certain situations. As the name implies, cascade means that one loop is connected to another loop. In addition to Manual (open loop) and Auto (closed loop) Modes, the DL205 also provides Cascaded Mode.
  • Page 147 Chapter 8: PID Loop Operation Cascaded Loops in the DL205 CPU In using of the term cascaded loops, we must make an important distinction. Only the minor loop will actually be in the Cascade Mode. In normal operation, the major loop must be in Auto Mode.
  • Page 148: Tuning Cascaded Loops

    Chapter 8: PID Loop Operation Tuning Cascaded Loops In tuning cascaded loops, you will need to de-couple the cascade relationship and tune the loops individually, using one of the loop tuning procedures previously covered. If you are not using auto tuning, then find the loop sample rate for the minor loop, using the method discussed earlier in this chapter.
  • Page 149: Time-Proportioning Control

    Chapter 8: PID Loop Operation Time-Proportioning Control The PID loop controller in the DL205 CPU generates a smooth control output signal across a numerical range. The control output value is suitable to drive an analog output module, which connects to the process. In the process control field, this is called continuous control, because the output is on (at some level) continuously.
  • Page 150: On/Off Control Program Example

    Chapter 8: PID Loop Operation On/Off Control Program Example The following ladder segment provides a time-proportioned on/off control output. It converts the continuous output in V2005 to on/off control using the output coil, Y0. Time Loop V2005 Process Proportioning Calculation –...
  • Page 151: Feedforward Control

    Chapter 8: PID Loop Operation Feedforward Control Feedforward control is an enhancement to standard closed-loop control. It is most useful for diminishing the effects of a quantifiable and predictable loop disturbance or sudden change in setpoint. Use of this feature is an option available to you on the DL205. However, it’s best to implement and tune a loop without feedforward, and adding it only if better loop performance is still needed.
  • Page 152: Feedforward Example

    Chapter 8: PID Loop Operation To change the bias (operating point), ladder logic only has to write the desired value to V+04. The PID loop calculation first reads the bias value from V+04 and modifies the value based on the current integrator calculation. Then it writes the result back to location V+04. This arrangement creates a sort of transparent bias term.
  • Page 153: Pid Example Program

    Chapter 8: PID Loop Operation PID Example Program Program Setup for the PID Loop After setting up the PID loop or loops, with DirectSOFT, you will need to edit your RLL program to include the rungs needed to set up the analog I/O module to be used by the PID loop(s).
  • Page 154 Chapter 8: PID Loop Operation Example program continued Note: The value stored in V1400 must be in the same scale as the PV value, or tenths of a degree in this example. Manual Mode Request B2100.0 Auto Mode Request B2100.1 8-74 DL205 User Manual, 4th Edition, Rev.
  • Page 155 For a step-by-step tutorial, go to the Technical Support section located on our website, www. automationdirect.com. Once you are at the website, click on Technical Support Home. After this page opens, find and select Guided Tutorials located under the Using Your Products column.
  • Page 156: Troubleshooting Tips

    Chapter 8: PID Loop Operation Troubleshooting Tips Q. The loop will not go into Automatic Mode. A. Check the following for possible causes: • A PV alarm exists, or a PV alarm programming error exists. • The loop is the major loop of a cascaded pair, and the minor loop is not in Cascade Mode. Q.
  • Page 157 Chapter 8: PID Loop Operation Q. The Derivative gain doesn’t seem to have any affect on the output. A. The derivative limit is probably enabled (see section on derivative gain limiting). Q. The loop Setpoint appears to be changing by itself. A.
  • Page 158: Glossary Of Pid Loop Terminology

    Chapter 8: PID Loop Operation Glossary of PID Loop Terminology Automatic Mode: An operational mode of a loop, in which it makes PID calculations and updates the loop’s control output. Bias Freeze: A method of preserving the bias value (operating point) for a control output, by inhibiting the integrator when the output goes out of range.
  • Page 159 Chapter 8: PID Loop Operation PID Loop: A mathematical method of closed-loop control involving the sum of three terms based on proportional, integral, and derivative error values. The three terms have independent gain constants, allowing one to optimize (tune) the loop for a particular physical system. Position Algorithm: The control output is calculated so it responds to the displacement (position) of the PV from the SP (error term) Process: A manufacturing procedure which adds value to raw materials.
  • Page 160: Bibliography

    Chapter 8: PID Loop Operation Bibliography Fundamentals of Process Control Theory, Second Edition Application Concepts of Process Control Author: Paul W. Murrill Author: Paul W. Murrill Publisher: Instrument Society of America Publisher: Instrument Society of America ISBN 1–55617–297–4 ISBN 1–55617–080–7 PID Controllers: Theory, Design, and Tuning, 2nd Edition Author: Fundamentals of Temperature, Pressure, and Flow Measurements, K.
  • Page 161: Maintenance And Troubleshooting

    hapter hapter hapter aintenance and roubleshooting In This Chapter... Hardware Maintenance ..............9–2 Diagnostics ................9–3 CPU Error Indicators ..............9–10 PWR Indicator ................9–11 Communications Problems ............9–13 I/O Module Troubleshooting ............9–14 Noise Troubleshooting ...............9–17 Machine Startup and Program Troubleshooting ......9–18...
  • Page 162: Hardware Maintenance

    Chapter 9: Maintenance and Troubleshooting Hardware Maintenance Standard Maintenance The DL205 is a low maintenance system requiring only a few periodic checks to help reduce the risk of problems. Routine maintenance checks should be made regarding two key items. • Air quality (cabinet temperature, airflow, etc), and •...
  • Page 163: Diagnostics

    Chapter 9: Maintenance and Troubleshooting To install the D2–BAT–1 CPU battery in the DL250–1 and DL260 CPUs: (#CR2354) DL250–1 1. Press the retaining clip on the battery door down DL260 and swing the battery door open. 2. Remove the old battery and insert the new battery into the coin–type slot with the larger (+) side outwards.
  • Page 164 Chapter 9: Maintenance and Troubleshooting Finding Diagnostic Information Diagnostic information can be found in several places with varying levels of message detail. • The CPU automatically logs error codes and any FAULT messages into two separate tables which can be viewed with the Handheld Programmer or DirectSOFT. •...
  • Page 165: Special Relays (Sp) Corresponding To Error Codes

    Chapter 9: Maintenance and Troubleshooting Special Relays (SP) Corresponding to Error Codes Startup and Real-time Relays Accumulator Status Relays On first scan only SP60 Acc. is less than value SP61 Acc. is equal to value Always ON Always OFF SP62 Acc.
  • Page 166 Chapter 9: Maintenance and Troubleshooting I/O Module Codes Each system component has a code identifier. This code identifier is used in some of the error messages related to the I/O modules. The following table shows these codes. Code Code Component Type Component Type (Hex) (Hex)
  • Page 167: Error Message Tables

    Chapter 9: Maintenance and Troubleshooting Error Message Tables The DL240/250-1/260 CPUs will automatically log any system error codes and any custom messages you have created in your application program with the FAULT instructions. The CPU logs the error code, the date, and the time the error occurred. Two separate tables store this information.
  • Page 168: System Error Codes

    Chapter 9: Maintenance and Troubleshooting System Error Codes The System error log contains 32 of the most recent errors that have been detected. The errors that are trapped in the error log are a subset of all the error messages which the DL205 systems generate.
  • Page 169: Program Error Codes

    Chapter 9: Maintenance and Troubleshooting Program Error Codes The following list shows the errors that can occur when there are problems with the program. These errors will be detected when you try to place the CPU into Run Mode or when you use AUX 21 –...
  • Page 170: Cpu Error Indicators

    Chapter 9: Maintenance and Troubleshooting CPU Error Indicators The DL205 CPUs have indicators on the front to help you diagnose problems with the system. The table below gives a quick reference of potential problems associated with each status indicator. Following the table will be a detailed analysis of each of these indicator problems. Indicator Status Potential Problems 1.
  • Page 171: Pwr Indicator

    Chapter 9: Maintenance and Troubleshooting PWR Indicator There are four general reasons for the CPU power status LED (PWR) to be OFF: • Power to the base is incorrect or is not applied. • Base power supply is faulty. • Other component(s) have the power supply shut down.
  • Page 172 Chapter 9: Maintenance and Troubleshooting Device or Module causing the Power Supply to Shutdown It is possible a faulty module or external device using the system 5V can shut down the power supply. This 5V can be coming from the base or from the CPU communication ports. To test for a device causing this problem: 1.
  • Page 173: Communications Problems

    Chapter 9: Maintenance and Troubleshooting Run Indicator If the CPU will not enter the Run mode (the RUN indicator is off), the problem is usually in the application program, unless the CPU has a fatal error. If a fatal error has occurred, the CPU LED should be on.
  • Page 174: I/O Module Troubleshooting

    Chapter 9: Maintenance and Troubleshooting I/O Module Troubleshooting Things to Check If you suspect an I/O error, there are several things that could be causing the problem. • A blown fuse. • A loose terminal block. • The 24VDC supply has failed. •...
  • Page 175: Some Quick Steps

    Chapter 9: Maintenance and Troubleshooting Some Quick Steps When troubleshooting the DL205 series I/O modules, you should be aware of a few facts you that may assist you in quickly correcting an I/O problem: • The output modules cannot detect shorted or open output points. If you suspect one or more points on an output module to be faulty, you should measure the voltage drop from the common to the suspect point.
  • Page 176: Handheld Programmer Keystrokes Used To Test An Output Point

    Chapter 9: Maintenance and Troubleshooting Testing Output Points Output points can be set on or off in the DL205 series CPUs. In the DL240 and DL250- 1, you can use AUX 59, Bit Override, to force a point even while the program is running. However, this is not a recommended method to test the output points.
  • Page 177: Noise Troubleshooting

    Chapter 9: Maintenance and Troubleshooting Noise Troubleshooting Electrical Noise Problems Noise is one of the most difficult problems to diagnose. Electrical noise can enter a system in many different ways and falls into one of two categories: conducted or radiated. It may be difficult to determine how the noise is entering the system, but the corrective actions for either type of noise problem are similar.
  • Page 178: Machine Startup And Program Troubleshooting

    Chapter 9: Maintenance and Troubleshooting Machine Startup and Program Troubleshooting The DL205 CPUs provide several features to help you debug your program before and during machine startup. This section discusses the following topics which can be very helpful. • Program Syntax Check •...
  • Page 179: Duplicate Reference Check

    Chapter 9: Maintenance and Troubleshooting Duplicate Reference Check You can also check for multiple uses of the same output coil. Both programming devices offer a way to check for this condition. For example, you can AUX 21, CHECK PROGRAM to check for duplicate references from a Handheld Programmer, or you can use the PLC Diagnostics menu option within DirectSOFT.
  • Page 180 Chapter 9: Maintenance and Troubleshooting TEST-PGM and TEST-RUN Modes Test Mode allows the CPU to start in TEST-PGM mode, enter TEST-RUN mode, run a fixed number of scans, and return to TEST-PGM mode. You can select from 1 to 65,525 scans. Test Mode also allows you to maintain output status while you switch between Test-Program and Test-Run Modes.
  • Page 181 Chapter 9: Maintenance and Troubleshooting Test Displays: With the Handheld Programmer you also have a more detailed display when you use TEST Mode. For some instructions, the TEST-RUN mode display is more detailed than the status displays shown in RUN mode. The following diagram shows an example of a Timer instruction display during TEST-RUN mode.
  • Page 182: Special Instructions

    Chapter 9: Maintenance and Troubleshooting Special Instructions Several instructions can be used to help you debug your program during machine start-up operations. • END • PAUSE • STOP END Instruction: If you need a way to quickly disable part of the program, insert an END statement prior to the portion that should be disabled.
  • Page 183 Chapter 9: Maintenance and Troubleshooting STOP Instruction: Sometimes during machine startup you need a way to quickly turn off all the outputs and return to Program Mode. In addition to using the Test Modes and AUX 58 (to configure each individual point), you can also use the STOP instruction. When this instruction is executed, the CPU automatically exits Run Mode and enters Program Mode.
  • Page 184: Run Time Edits

    Chapter 9: Maintenance and Troubleshooting Run Time Edits The DL205 CPUs allow you to make changes to the application program during Run Mode. These edits are not “bumpless.” Instead, CPU scan is momentarily interrupted (and the outputs are maintained in their current state) until the program change is complete. This means if the output is off, it will remain off until the program change is complete.
  • Page 185 Chapter 9: Maintenance and Troubleshooting Use the program logic shown to describe how this process works. In the example, change X0 to C10. Note, the example assumes you have already placed the CPU in Run Mode. Use the MODE key to select Run Time Edits *MODE CHANGE* MODE NEXT...
  • Page 186: Forcing I/O Points

    Chapter 9: Maintenance and Troubleshooting Forcing I/O Points There are many times, especially during machine startup and troubleshooting, where you need the capability to force an I/O point to be either on or off. Before you use a programming device to force any data type, it is important to understand how the DL205 CPUs process the forcing requests.
  • Page 187 Chapter 9: Maintenance and Troubleshooting The following diagrams show how the bit override works for both input and output points. 9–27 The example uses a simple rung, but the concepts are similar for any type of bit memory. Program Rung Override holds previous state and disables image register update by CPU...
  • Page 188: Regular Forcing With Direct Access

    Chapter 9: Maintenance and Troubleshooting The following diagrams show a brief example of how you could use the DL205 Handheld Programmer to force an I/O point. Remember, if you are using the Bit Override feature, the CPU will retain the forced value until you disable the Bit Override or until you remove the force.
  • Page 189: Bit Override Forcing

    Chapter 9: Maintenance and Troubleshooting Bit Override Forcing From a clear display, use the following keystrokes to turn on the override bit for Y10. Solid fill indicates point is on. 250-1 SHFT BIT FORCE SET Y 10 Small box indicates override bit is on. NOTE: At this point you can use the PREV and NEXT keys to move to adjacent memory locations and use the SHFT ON keys to set the override bit on.
  • Page 190: Reset The Plc To Factory Defaults

    Chapter 9: Maintenance and Troubleshooting Reset the PLC to Factory Defaults NOTE: Resetting to factory defaults will not clear any password stored in the PLC. Resetting a DirectLogic PLC to Factory Defaults is a two-step process. Be sure to have a verified backup of your program using “Save Project to Disk”...
  • Page 191 Chapter 9: Maintenance and Troubleshooting The PLC has now been reset to factory defaults and you can proceed to program the PLC DL205 User Manual, 4th Edition, Rev. D 9-31...
  • Page 192 Chapter 9: Maintenance and Troubleshooting Notes 9-32 DL205 User Manual, 4th Edition, Rev. D...
  • Page 193: Auxiliary Functions

    ppendix ppendix ppendix uxiliAry unctions In This Appendix... Introduction ................A–2 AUX 2* — RLL Operations ............A–4 AUX 3* — V-memory Operations ..........A–5 AUX 4* — I/O Configuration .............A–5 AUX 5* — CPU Configuration ............A–7 AUX 6* — Handheld Programmer Configuration .......A–12 AUX 7* —...
  • Page 194: Introduction

    Appendix A: Auxiliary Functions Introduction What are Auxiliary Functions? Many CPU set-up tasks involve the use of Auxiliary (AUX) Functions. The AUX Functions perform many different operations, ranging from clearing ladder memory, displaying the scan time, copying programs to EEPROM in the Handheld Programmer, etc. They are divided into categories that affect different system parameters.
  • Page 195 Appendix A: Auxiliary Functions Accessing AUX Functions via DirectSOFT DirectSOFT provides various menu options during both online and offline programming. Some of the AUX functions are only available during online programming, some only during offline programming, and some during both online and offline programming. The following diagram shows an example of the PLC operations menu available within DirectSOFT.
  • Page 196: Aux 2* - Rll Operations

    Appendix A: Auxiliary Functions AUX 2* — RLL Operations AUX 21-24 Four AUX functions are available to perform various operations on the control program. • AUX 21 - Check Program • AUX 22 - Change Reference • AUX 23 - Clear Ladder Range •...
  • Page 197: Aux 3* - V-Memory Operations

    Appendix A: Auxiliary Functions AUX 3* — V-memory Operations AUX 31 • AUX 31 - Clear V-memory AUX 31 Clear V-Memory AUX 31 clears all the information from the V-memory locations available for general use. This AUX function is available on the PLC/Clear PLC sub-menu within DirectSOFT. AUX 4* —...
  • Page 198 Appendix A: Auxiliary Functions AUX 45 Select Configuration Even though the CPU can automatically detect configuration changes, you may actually want the new I/O configuration to be used. For example, you may have intentionally changed a module to use with a new program. You can use AUX 45 to select the new configuration, or, keep the existing configuration that is stored in memory.
  • Page 199: Aux 5* - Cpu Configuration

    Appendix A: Auxiliary Functions AUX 5* — CPU Configuration AUX 51-5C Several AUX functions are available to set up, view, or change the CPU configuration. • AUX 51 — Modify Program Name • AUX 52 — Display / Change Calendar •...
  • Page 200 Appendix A: Auxiliary Functions AUX 53 Display Scan Time AUX 53 displays the current, minimum, and maximum scan times. The minimum and maximum times are the ones that have occurred since the last Program Mode to Run Mode transition. You can also perform this operation from within DirectSOFT by using the PLC/ Diagnostics sub-menu.
  • Page 201: Aux 58 Test Operations

    Appendix A: Auxiliary Functions AUX 57 Set Retentive Ranges The DL205 CPUs provide certain ranges of retentive memory by default. The default ranges are suitable for many applications, but you can change them if your application requires additional retentive ranges or no retentive ranges at all. The default settings are: DL230 DL240 DL250-1...
  • Page 202: Aux 59 Bit Override

    Appendix A: Auxiliary Functions AUX 59 Bit Override Bit override can be enabled on a point-by-point basis by using AUX 59 from the Handheld Programmer or, by a menu option from within DirectSOFT. Bit override basically disables any changes to the discrete point by the CPU. For example, if you enable bit override for X1, and X1 is off at the time, then the CPU will not change the state of X1.
  • Page 203 Appendix A: Auxiliary Functions AUX 5C Display Error History The DL240, DL250–1 and DL260 CPU will automatically log any system error codes and custom messages created with the FAULT instructions. The CPU logs the error code, date, and time the error occurred. There are two separate tables that store this information. •...
  • Page 204: Aux 6* - Handheld Programmer Configuration

    Appendix A: Auxiliary Functions AUX 6* — Handheld Programmer Configuration AUX 61, 62 and 65 Several AUX functions are available that you can use to set up, view, or change the Handheld Programmer configuration. • AUX 61 — Show Revision Numbers •...
  • Page 205: Aux 71 Cpu To Hpp Eeprom

    Appendix A: Auxiliary Functions Transferrable Memory Areas Many of these AUX functions allow you to copy different areas of memory to and from the CPU and Handheld Programmer. The following table shows the areas that may be mentioned. Option and Memory Type DL240 Default Range DL230 Default Range 1:PGM —...
  • Page 206: Aux 8* - Password Operations

    Appendix A: Auxiliary Functions AUX 8* — Password Operations AUX 81 - 83 AUX functions are available to modify or enable the CPU password. You can use these features during on-line communications with the CPU, or, you can also use them with an EEPROM installed in the Handheld Programmer during off-line operation.
  • Page 207: Dl05 E Rror C Odes

    ppendix ppendix ppendix DL05 E rror oDEs In This Appendix... Error Code Table ................B–2...
  • Page 208 Appendix B: DL205 Error Codes DL205 Error Code Description If the program scan time exceeds the time allotted to the watchdog timer, this error will E003 occur. SP51 will be on and the error code will be stored in V7755. To correct this problem SOFTWARE add RSTWT instructions in FOR NEXT loops and subroutines or use AUX 55 to extend the TIME-OUT...
  • Page 209 Appendix B: DL205 Error Codes DL205 Error Code Description E313 An address error was encountered during communications with the CPU. Clear the error and retry the request. If the error continues, check the cabling between the two devices; replace HP COMM the Handheld Programmer;...
  • Page 210 Appendix B: DL205 Error Codes DL205 Error Code Description E413 There are more than 64 FOR/NEXT loops in the application program. SP52 will be on and FOR/NEXT>64 the error code will be stored in V7755. (DL240/250–1/260) E421 Two or more SG or ISG labels exist in the application program with the same number. A DUPLICATE STAGE unique number must be allowed for each Stage and Initial Stage.
  • Page 211 Appendix B: DL205 Error Codes DL205 Error Codes Description E451 MLS instructions must be numbered in ascending order from top to bottom. BAD MLS/MLR E452 An X data type is being used as a coil output. X AS COIL E453 A timer or counter contact is being used where the associated timer or counter does not exist.
  • Page 212 Appendix B: DL205 Error Codes DL205 Error Code Description E473 DUPLICATE CNT Two or more CNT instructions reference the same number. REFERENCE E480 The CV instruction is used in a subroutine or program interrupt routine. INVALID CV The CV instruction may only be used in the main program area (before the END statement). ADDRESS E481 CONFLICTING...
  • Page 213 Appendix B: DL205 Error Codes DL205 Error Code Description E491 INVALID ISG There is an ISG instruction between the BLK and BEND instructions. INSTRUCTION ADDRESS E492 The BEND instruction is used in a subroutine or a program interrupt routine. INVALID BEND The BEND instruction is not followed by a BLK instruction.
  • Page 214 Appendix B: DL205 Error Codes DL205 Error Code Description E521 An operation which is invalid in the TEST RUN mode was attempted by the Handheld Programmer. BAD OP–TRUN E523 An operation which is invalid in the TEST PROGRAM mode was attempted by the Handheld Programmer.
  • Page 215 Appendix B: DL205 Error Codes DL205 Error Code Description E610 The application program has referenced an I/O module as the incorrect type of module. BAD I/O TYPE An attempt to transfer more data between the CPU and Handheld Programmer than the E620 receiving device can hold.
  • Page 216 Appendix B: DL205 Error Codes Notes B-10 DL205 User Manual, 4th Edition, Rev. D...
  • Page 217 ppendix ppendix ppendix nstructIon nstructIon xEcutIon xEcutIon ImEs ImEs In This Appendix... Introduction ................C–2 Boolean Instructions ..............C–3 Comparative Boolean Instructions ..........C–4 Bit of Word Boolean Instructions ..........C–13 Immediate Instructions ...............C–14 Timer, Counter and Shift Register Instructions ......C–15 Accumulator Data Instructions ...........C–16 Logical Instructions ..............C–18 Math Instructions ...............C–20 Differential Instructions ..............C–23...
  • Page 218: Introduction

    Appendix C: Instruction Execution Times Introduction This appendix contains several tables that provide the instruction execution times for the DL205 CPUs. One thing you will notice is that many of the execution times depend on the type of data being used with the instruction. For example, you’ll notice that some of the instructions that use V-memory locations are further defined by the following items: •...
  • Page 219: Boolean Instructions

    Appendix C: Instruction Execution Times Boolean Instructions Boolean Instructions DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute X, Y, C, T, CT, S, SP 3.3 µs 3.3 µs 1.4 µs 1.4 µs .67 µs 0 µs .67 µs...
  • Page 220: Comparative Boolean Instructions

    Appendix C: Instruction Execution Times Comparative Boolean Instructions Comparative Boolean Instructions DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute STRE V: Data Reg. 77 µs 13.8 µs 46 µs 16.2 µs 7.6 µs 7.6 µs 7.6 µs 7.6 µs...
  • Page 221 Appendix C: Instruction Execution Times Comparative Boolean Instructions (cont’d) Comparative Boolean Instructions DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute V: Data Reg. 75 µs 12.0 µs 44 µs 13.9 µs 7.6 µs 7.6 µs 7.6 µs 7.6 µs...
  • Page 222 Appendix C: Instruction Execution Times Comparative Boolean Instructions (cont’d) Comparative Boolean Instructions DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute ANDE V: Data Reg. 75 µs 12.0 µs 44 µs 13.9 µs 7.6 µs 7.6 µs 7.6 µs...
  • Page 223 Appendix C: Instruction Execution Times Comparative Boolean Instructions (cont’d) Comparative Boolean Instructions DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute V: Data Reg. 76 µs 13.8 µs 46 µs 16.2 µs 7.6 µs 7.6 µs 7.6 µs 7.6 µs...
  • Page 224 Appendix C: Instruction Execution Times Comparative Boolean Instructions (cont’d) Comparative Boolean Instructions DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute STRN V: Data Reg. 78 µs 13.8 µs 46 µs 16.2 µs 7.6 µs 7.6 µs 7.6 µs...
  • Page 225 Appendix C: Instruction Execution Times Comparative Boolean Instructions (cont’d) Comparative Boolean Instructions DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute V: Data Reg. 75 µs 12.0 µs 44 µs 13.9 µs 7.6 µs 7.6 µs 7.6 µs 7.6 µs...
  • Page 226 Appendix C: Instruction Execution Times Comparative Boolean Instructions (cont’d) Comparative Boolean Instructions DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute V: Data Reg. 75 µs 12.0 µs 44 µs 13.9 µs 7.6 µs 7.6 µs 7.6 µs 7.6 µs...
  • Page 227 Appendix C: Instruction Execution Times Comparative Boolean Instructions (cont’d) Comparative Boolean Instructions DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute V: Data Reg. 76 µs 12.0 µs 44 µs 13.9 µs 7.6 µs 7.6 µs 7.6 µs 7.6 µs...
  • Page 228 Appendix C: Instruction Execution Times Comparative Boolean Instructions (cont’d) Comparative Boolean Instructions DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute ANDN V: Data Reg. 76 µs 12.0 µs 44 µs 13.9 µs 7.6 µs 7.6 µs 7.6 µs...
  • Page 229: Bit Of Word Boolean Instructions

    Appendix C: Instruction Execution Times Bit of Word Boolean Instructions Bit of Word Boolean Instructions DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute STRB V: Data Reg. 3.1 µs 3.1 µs 3.1 µs 3.1 µs V: Bit Reg.
  • Page 230: Immediate Instructions

    Appendix C: Instruction Execution Times Immediate Instructions Immediate Instructions DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute 20.6 µs 1.1 µs LDIF 1st#: 26.6 µs + 2nd#: K:Constant 1.4 µs 0.9 µs x N STRI 27 µs 9.8 µs...
  • Page 231: Timer, Counter And Shift Register Instructions

    Appendix C: Instruction Execution Times Timer, Counter and Shift Register Instructions Timer, Counter and Shift Register DL230 DL240 DL250-1 DL260 Instructions Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute V: Data Reg. 75 µs 31 µs 61 µs 23.5 µs 26.8 µs...
  • Page 232: Accumulator Data Instructions

    Appendix C: Instruction Execution Times Accumulator Data Instructions Accumulator/Stack Load and DL230 DL240 DL250-1 DL260 Output Data Instructions Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute V: Data Reg. 68 µs 8.4 µs 68 µs 8.4 µs 11.8 µs 1.0 µs 11.8 µs...
  • Page 233 Appendix C: Instruction Execution Times Accumulator Data Instructions (cont’d) Accumulator/Stack Load and DL230 DL240 DL250-1 DL260 Output Data Instructions Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute OUTF 53 µs + 54 µs + 54 µs + X, Y, C K: Constant 8.4 µs...
  • Page 234: Logical Instructions

    Appendix C: Instruction Execution Times Logical Instructions Logical (Accumulator) Instructions DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute V: Data Reg. 58 µs 10.4 µs 54 µs 8.4 µs 7.9 µs 1.0 µs 7.9 µs 1.0 µs V: Bit Reg.
  • Page 235 Appendix C: Instruction Execution Times Logical Instructions (cont’d) Logical (Accumulator) Instructions DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute XORF X, Y, C, S, T, 20.9 µs + 20.9 µs + CT, SP K: Constant 1.0 µs 1.0 µs...
  • Page 236: Math Instructions

    Appendix C: Instruction Execution Times Math Instructions Math Instructions (Accumulator) DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute V: Data Reg. 198 µs 10.6 µs 291 µs 8.4 µs 78.4 µs 0.9 µs 78.4 µs 0.9 µs V: Bit Reg.
  • Page 237 Appendix C: Instruction Execution Times Math Instructions (cont’d) Math Instructions (Accumulator) DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute V: Data Reg. 47.5 µs 1.0 µs 47.5 µs 1.0 µs V: Bit Reg. 47.5 µs 1.0 µs 47.5 µs...
  • Page 238 Appendix C: Instruction Execution Times Math Instructions (cont’d) Math Instructions (Accumulator) DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute DIVB V: Data Reg. 28.7 µs 1.0 µs 28.7 µs 1.0 µs V: Bit Reg. 28.7 µs 1.0 µs 28.7 µs...
  • Page 239: Differential Instructions

    Appendix C: Instruction Execution Times Math Instructions (cont’d) Math Instructions Accumulator DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute DIVF X, Y, C, S, T, 477.3 µs + CT, SP K: Constant 1.0 µs 0.8 µs x N GX, GY...
  • Page 240: Bit Instructions

    Appendix C: Instruction Execution Times Bit Instructions Bit Instructions (Accumulator) DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute None 6.7 µs 1.0 µs SHFR 44 µs + 35 µs + 12.1 µs + 12.1 µs + V: Data Reg.
  • Page 241: Number Conversion Instructions

    Appendix C: Instruction Execution Times Number Conversion Instructions Number Conversion Instructions DL230 DL240 DL250-1 DL260 (Accumulator) Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute None 359 µs 7.2 µs 267 µs 8.4 µs 100.2 µs 0.9 µs 100.2 µs 0.9 µs None...
  • Page 242 Appendix C: Instruction Execution Times Table Instructions (cont’d) Table Instructions DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute 60.2 µs + 0.9 µs 60.2 µs + 0.9 µs Move V: data reg. to V: 450 µs + 586 µs + 6.2 µs...
  • Page 243: Cpu Control Instructions

    Appendix C: Instruction Execution Times Table Instructions (cont’d) Table Instructions DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute MOVMC 356 µs + 33.5 µs + Move V: Data Reg. to 7689 µs 8.4 µs 10.4 µs x N 0.9 µs...
  • Page 244: Interrupt Instructions

    Appendix C: Instruction Execution Times Interrupt Instructions Interrupt Instructions DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute None 9 µs 5 µs 10.5 µs 8.4 µs 5.0 µs 1.0 µs 5.0 µs 1.0 µs DISI None...
  • Page 245: Message Instructions

    Appendix C: Instruction Execution Times Message Instructions Message Instructions DL230 DL240 DL250-1 DL260 Instruction Legal Data Types Execute Execute Execute Execute Execute Execute Execute Execute FAULT V: Data Reg. 171 µs 8.4 µs 23176 µs 8.4 µs 84.9 µs 1.1 µs 84.9 µs 1.1 µs V: Bit Reg.
  • Page 246: Clock / Calender Instructions

    Appendix C: Instruction Execution Times Clock / Calender Instructions Clock / Calender Instructions DL230 DL240 DL250-1 DL260 Instruction Execute Execute Execute Execute Execute Execute Execute Execute DATE V: Data Reg. 24.0 µs 1.2 µs 24.0 µs 1.2 µs V: Bit Reg. TIME V: Data Reg.
  • Page 247: S Pecial R Elays

    ppendix ppendix ppendix pecial elayS In This Appendix... DL230 CPU Special Relays ............D-2 DL240/DL250-1/DL260 CPU Special Relays .......D-5...
  • Page 248: Cpu Status Relays

    Appendix D: Special Relays DL230 CPU Special Relays Startup and Real-Time Relays On for the first scan after a power cycle or program to run transition only. The relay First scan is reset to off on the second scan. It is useful where a function needs to be performed only on program startup.
  • Page 249: Accumulator Status

    Appendix D: Special Relays Accumulator Status SP60 Value less than On when the accumulator value is less than the instruction value. SP61 Value equal to On when the accumulator value is equal to the instruction value. SP62 Greater than On when the accumulator value is greater than the instruction value. SP63 Zero On when the result of the instruction is zero (in the accumulator).
  • Page 250 Appendix D: Special Relays Equal Relays for Multi-step Presets with Up/Down Counter #1 / DL230 (for use with a Counter Interface Module) SP540 Current = target value On when the counter current value equals the value in V3630. SP541 Current = target value On when the counter current value equals the value in V3632.
  • Page 251 Appendix D: Special Relays DL240/DL250-1/DL260 CPU Special Relays Startup and Real-Time Relays On for the first scan after a power cycle or program to run transition only. The relay First scan is reset to off on the second scan. It is useful where a function needs to be performed only on program startup.
  • Page 252 Appendix D: Special Relays System Monitoring Relays SP40 Critical error On when a critical error such as I/O communication loss has occurred. SP41 Warning On when a non-critical error such as a low battery has occurred. On when the CPU battery voltage is low or dead. Note: The CPU must have a battery SP43 Battery low/dead installed.
  • Page 253 Appendix D: Special Relays Counter Interface Module Relays SP100 X0 is on X0 - on when corresponding input is on. SP101 X1 is on X1 - on when corresponding input is on. SP102 X2 is on X2 - on when corresponding input is on. SP103 X3 is on X3 - on when corresponding input is on.
  • Page 254 Appendix D: Special Relays Communications Monitoring Relays DL240 CPU SP116 On when the CPU is communicating with another device communication DL250-1/260 SP116 On when Port 2 is communicating with another device communication Comm error Port 2 SP117 On when Port 2 has encountered a communication error. (DL250-1/260) On when the communication module in slot 0 is busy transmitting or receiving.
  • Page 255 Appendix D: Special Relays Equal Relays for Multi-step Presets with Up/Down Counter #1 (for use with a Counter Interface Module) SP540 Current = target value On when the counter current value equals the value in V3630. SP541 Current = target value On when the counter current value equals the value in V3632.
  • Page 256 Appendix D: Special Relays Equal Relays for Multi-step Presets with Up/Down Counter #2 (for use with a Counter Interface Module) SP570 Current = target value On when the counter current value equals the value in V3710 SP571 Current = target value On when the counter current value equals the value in V3712 SP572 Current = target value...
  • Page 257: Plc M Emory

    PLC M eMory In This Appendix... DL205 PLC Memory ..............E-2...
  • Page 258 Appendix E: PLC Memory DL205 PLC Memory When designing a PLC application, it is important for the PLC user to understand the different types of memory in the PLC. The DL205 CPUs use two types of memory: RAM and EEPROM.
  • Page 259 Appendix E: PLC Memory Non-volatile V-memory in the DL205 Two types of memory are assigned for the non-volatile V-memory area: RAM and flash ROM (EEPROM). They are sharing the same V-memory addresses; however, you can only use the MOV instruction, D2-HPP and DirectSOFT to write data to the flash ROM. When you write data to the flash ROM, the same data is also written to RAM.
  • Page 260 Appendix E: PLC Memory Notes DL205 User Manual, 4th Edition, Rev. D...
  • Page 261 ppendix ppendix ppendix DL205 P roDuct eight abLe In This Appendix... DL205 Product Weight Table .............F-2...
  • Page 262 Appendix F: Product Weight Tables DL205 Product Weight Table Analog Modules Weight CPUs Weight DC Output Modules F2-04AD-1 3.0 oz (86g) D2-230 2.8 oz. (80g) D2-04TD1 2.8 oz. (80g) F2-04AD-2 3.0 oz (86g) D2-240 2.8 oz. (80g) D2-08TD1 2.3 oz. (65g) F2-04AD-1L 3.0 oz (86g) D2-250-1...
  • Page 263: Ascii Table

    ppendix ppendix ppendix ASCII T AscII t Able AblE In This Appendix... ASCII Conversion Table ..............G-2...
  • Page 264: Ascii Conversion Table

    Appendix G: ASCII Table ASCII Conversion Table DECIMAL TO HEX TO ASCII CONVERTER ASCII ASCII ASCII ASCII space “ & ‘ < > DL205 User Manual, 4th Edition, Rev. D...
  • Page 265: N Umbering S Ystems

    Hexadecimal Numbering System ..........H–3 Octal Numbering System ............H–4 Binary Coded Decimal (BCD) Numbering System .....H–5 Real (Floating Point) Numbering System ........H–5 BCD/Binary/Decimal/Hex/Octal -What is the Difference? ..H–6 Data Type Mismatch ..............H–7 Signed vs. Unsigned Integers ............H–8 AutomationDirect.com Products and Data Types ......H–9...
  • Page 266: Introduction

    Appendix H: Numbering Systems Introduction As almost anyone who uses a computer is somewhat aware, the actual operations of a computer are done with a binary number system. Traditionally, the two possible states for a binary system are represented by the digits “zero” (0) and “one” (1), although “off” and “on” or sometimes “no”...
  • Page 267: Hexadecimal Numbering System

    Appendix H: Numbering Systems Hexadecimal Numbering System The binary numbering system can be difficult and cumbersome to interpret for some users. Therefore, the hexadecimal numbering system was developed as a convenience for humans since the PLC (computer) only understands pure binary. The hexadecimal system is useful because it can represent every byte (8 bits) as two consecutive hexadecimal digits.
  • Page 268: Octal Numbering System

    Appendix H: Numbering Systems Octal Numbering System Many of the early computers used the octal numbering system for compiled printouts. Today, the PLC is about the only device that uses the Octal numbering system. The octal numbering system uses eight values to represent numbers. The values are 0-7 being Base 8. Table 4 shows the first 31 decimal digits in octal.
  • Page 269: Binary Coded Decimal (Bcd) Numbering System

    Appendix H: Numbering Systems Binary Coded Decimal (BCD) Numbering System BCD is a numbering system where four bits are used to represent each decimal digit. The binary codes corresponding to the hexadecimal digits A-F are not used in the BCD system. For this reason numbers cannot be coded as efficiently using the BCD system.
  • Page 270: Bcd/Binary/Decimal/Hex/Octal -What Is The Difference

    Appendix H: Numbering Systems BCD/Binary/Decimal/Hex/Octal - What is the Difference? Sometimes there is confusion about the differences between the data types used in a PLC. The PLC’s native data format is BCD, while the I/O numbering system is octal. Other numbering formats used are binary and Real.
  • Page 271: Data Type Mismatch

    Appendix H: Numbering Systems Data Type Mismatch Data type mismatching is a common problem when using an operator interface. Diagnosing it can be a challenge until you identify the symptoms. Since the PLC uses BCD as the native format, many people tend to think it is interchangeable with binary (unsigned integer) format. This is true to some extent, but not in this case.
  • Page 272: Signed Vs. Unsigned Integers

    Appendix H: Numbering Systems Signed vs. Unsigned Integers So far, we have dealt with unsigned data types only. Now we will deal with signed data types (negative numbers). The BCD and hexadecimal numbering systems do not use signed data types. In order to signify that a number is negative or positive, we must assign a bit to it.
  • Page 273: Automationdirect.com Products And Data Types

    Appendix H: Numbering Systems AutomationDirect.com Products and Data Types DirectLOGIC PLCs The DirectLOGIC PLC family uses the octal numbering system for all addressing which includes: inputs, outputs, internal V-memory locations, timers, counters, internal control relays (bits), etc. Most data in the PLC, including timer and counter current values, is in BCD format by default.
  • Page 274 Appendix H: Numbering Systems Notes H-10 DL205 User Manual, 4th Edition, Rev. D...
  • Page 275: European Union

    ppendix ppendix ppendix uropEan nion (cE) irEctivEs In This Appendix... European Union (EU) Directives ..........I-2 Basic EMC Installation Guidelines ..........I-5...
  • Page 276: European Union (Eu) Directives

    Appendix I: European Union Directives (CE) European Union (EU) Directives NOTE: The information contained in this section is intended as a guideline and is based on our interpretation of the various standards and requirements. Since the actual standards are issued by other parties, and in some cases governmental agencies, the requirements can change over time without advance warning or notice.
  • Page 277 Appendix I: European Union Directives (CE) Ultimately, we are all responsible for our various pieces of the puzzle. As manufacturers, we must test our products and document any test results and/or installation procedures that are necessary to comply with the Directives. As an end user, you are responsible for installing the products applying “good engineering practices”...
  • Page 278: General Safety

    Appendix I: European Union Directives (CE) • Warning on Radio Interference (RFI) This is a class A product. In a domestic environment this product may cause radio interference in which case the user may be required to take adequate preventative measures. General Safety •...
  • Page 279: Basic Emc Installation Guidelines

    Appendix I: European Union Directives (CE) Basic EMC Installation Guidelines Enclosures The following diagram illustrates good engineering practices supporting the requirements of the Machinery and Low Voltage Directives. House all control equipment in an industry- standard, lockable steel enclosure and use metallic conduit for wire runs and cables. *may be required for CE compliance (see Declaration of Conformity for specific product requirements).
  • Page 280: Ac Mains Filters

    Appendix I: European Union Directives (CE) AC Mains Filters The DL205 AC powered base power supplies require extra mains filtering to comply with the EMC Directive Schaffner FN2010 on conducted RF emissions. All PLC Filter equipment has been tested with filters from Schaffner, which reduce emissions levels if the filters are properly grounded (earth ground).
  • Page 281: Equipotential Grounding

    Appendix I: European Union Directives (CE) Equipotential Grounding Serial Communication Cable Equi-potential Bond Adequate site earth grounding must be provided for equipment containing modern electronic circuitry. The use of isolated earth electrodes for electronic systems is forbidden in some countries. Make sure you check any requirements for your particular destination. IEC 1000– 5–2 covers equipotential bonding of earth grids adequately, but special attention should be given to apparatus and control cubicles that contain I/O devices, remote I/O racks, or have inter-system communications with the primary PLC system enclosure.
  • Page 282: Analog And Rs232 Cables

    Appendix I: European Union Directives (CE) The recommendation is to use shielded cables as electrostatic “pipes” between apparatus and systems, and to run heavy gauge equipotential bond wires alongside all shielded cables. When a shielded cable runs through the metallic wall of an enclosure or machine, it is recommended in IEC 1000–5–2 that the shield should be connected over its full perimeter to the wall, preferably using a conducting adapter, and not via a pigtail wire connection to an earth ground bolt.
  • Page 283: Analog Modules And Rf Interference

    Appendix I: European Union Directives (CE) Analog Modules and RF Interference All Automationdirect products are tested to withstand field strength levels up to 10V/m, which is the maximum required by the relevant EU standards. While all products pass this test, analog modules will typically exhibit deviations of their readings. This is quite normal; however, systems designers should be aware of this and plan accordingly.
  • Page 284 Appendix I: European Union Directives (CE) Items Specific to the DL205 • The rating between all circuits in this product are rated as basic insulation only, as appropriate for single fault conditions. • There is no isolation offered between the PLC and the analog inputs of this product. •...

Table of Contents