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.
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.
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 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 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 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...
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.
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.
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) •...
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...
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.
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).
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...
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. •...
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.
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).
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...
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...
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 )
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...
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...
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.
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.
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...
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.
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.
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.
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...
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.
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.
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.
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.
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.
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.
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.
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”...
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.
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.
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...
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.
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.
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.
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.
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)
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.
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.
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 ................
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 •...
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...
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.
(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.
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 –...
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.
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.
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...
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...
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...
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.
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.
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.
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.
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.
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 –...
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...
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.
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.
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.
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.
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.
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.
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.
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.
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...
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.
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.
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.
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.
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).
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.
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...
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.
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.
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. •...
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.
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.
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...
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.
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.
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.
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 –...
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.
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.
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.
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.
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.
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.
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 •...
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. •...
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)
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.
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.
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 –...
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.
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.
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.
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. •...
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.
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.
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.
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 •...
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.
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.
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...
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...
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.
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.
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...
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* —...
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.
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 •...
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.
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.
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...
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. •...
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 •...
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 —...
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.
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.
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: •...
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.
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.
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...
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.
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...
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”...
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.
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.
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.
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.
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.
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.
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...
ppendix ppendix ppendix uropEan nion (cE) irEctivEs In This Appendix... European Union (EU) Directives ..........I-2 Basic EMC Installation Guidelines ..........I-5...
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”...
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 •...
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).
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).
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.
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.
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. •...
Need help?
Do you have a question about the DL205 PLC and is the answer not in the manual?
Questions and answers