Page View / The Manual D3350

User Manual: View / the Manual D3-350 CPU User Manual

Open the PDF directly: View PDF PDF.
Page Count: 561 [warning: Documents this large are best viewed by clicking the View PDF Link!]

1
DL350 PLC User Manual
Manual Number: D3--350--M
1
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.
To minimize the risk of potential safety problems, you should follow all applicable local and national codes that regulate
the installation and operation of your equipment. These codes vary from area to area and usually change with time. It is
your responsibility to determine which codes should be followed, and to verify that the equipment, installation, and
operation are in compliance with the latest revision of these codes.
At a minimum, you should follow all applicable sections of the National Fire Code, National Electrical Code, and the
codes of the National Electrical Manufacturer’s Association (NEMA). There may be local regulatory or government
offices that can also help determine which codes and standards are necessary for safe installation and operation.
Equipment damage or serious injury to personnel can result from the failure to follow all applicable codes and
standards. We do not guarantee the products described in this publication are suitable for your particular application,
nor do we assume any responsibility for your product design, installation, or operation.
Our products are not fault--tolerant and are not designed, manufactured or intended for use or resale as on--line control
equipment in hazardous environments requiring fail--safe performance, such as in the operation of nuclear facilities,
aircraft navigation or communication systems, air traffic control, direct life support machines, or weapons systems, in
which the failure of the product could lead directly to death, personal injury, or severe physical or environmental
damage (”High Risk Activities”). AutomationDirect specifically disclaims any expressed or implied warranty of fitness
for High Risk Activities.
For additional warranty and safety information, see the Terms and Conditions section of our Desk Reference. If you
have any questions concerning the installation or operation of this equipment, or if you need additional information,
please call us at 770--844--4200.
This publication is based on information that was available at the time it was printed. We at AutomationDirect
constantly strive to improve our products and services, so we reserve the right to make changes to the products and/or
publications at any time without notice and without any obligation. This publication may also discuss features that may
not be available in certain revisions of the product.
Trademarks
This publication may contain references to products produced and/or offered by other companies. The product and
company names may be trademarked and are the sole property of their respective owners. AutomationDirect
disclaims any proprietary interest in the marks and names of others.
Copyright 2010, Automationdirect.comIncorporated
All Rights Reserved
No part of this manual shall be copied, reproduced, or transmitted in any way without the prior, written consent of
Automationdirect.com Incorporated.AutomationDirect retains the exclusive rights to all information included in
this document.
AVERTISSEMENT
Nous vous remercions d’avoir acheté l’équipement d’automatisation de Automationdirect.comMC, 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.
Afin de réduire au minimum le risque d’éventuels problèmes de sécurité, vous devez respecter tous les codes locaux et
nationaux applicables régissant l’installation et le fonctionnement de votre équipement. Ces codes diffèrent d’une région à
l’autre et, habituellement, évoluent au fil du temps. Il vous incombe de déterminer les codes à respecter et de vous assurer
que l’équipement, l’installation et le fonctionnement sont conformes aux exigences de la version la plus récente de ces
codes.
Vous devez, à tout le moins, respecter toutes les sections applicables du Code national de prévention des incendies, du
Code national de l’électricité et des codes de la National Electrical Manufacturer’s Association (NEMA). Des organismes de
réglementation ou des services gouvernementaux locaux peuvent également vous aider à déterminer les codes ainsi que
les normes à respecter pour assurer une installation et un fonctionnement sûrs.
L’omission de respecter la totalité des codes et des normes applicables peut entraîner des dommages à l’équipement ou
causer de graves blessures au personnel. Nous ne garantissons pas que les produits décrits dans cette publication
conviennent à votre application particulière et nous n’assumons aucune responsabilité à l’égard de la conception, de
l’installation ou du fonctionnement de votre produit.
Nos produits ne sont pas insensibles aux défaillances et ne sont ni conçus ni fabriqués pour l’utilisation ou la revente en tant
qu’équipement de commande en ligne dans des environnements dangereux nécessitant une sécurité absolue, par
exemple, l’exploitation d’installations nucléaires, les systèmes de navigation aérienne ou de communication, le contrôle de
la circulation aérienne, les équipements de survie ou les systèmes d’armes, pour lesquels la défaillance du produit peut
provoquer la mort, des blessures corporelles ou de graves dommages matériels ou environnementaux (”activités à risque
élevé”). La société AutomationDirect nie toute garantie expresse ou implicite d’aptitude à l’emploi en ce qui a trait aux
activités à risque élevé.
Pour des renseignements additionnels touchant la garantie et la sécurité, veuillez consulter la section Modalités et
conditions de notre documentation. Si vous avez des questions au sujet de l’installation ou du fonctionnement de cet
équipement, ou encore si vous avez besoin de renseignements supplémentaires, n’hésitez pas à nous téléphoner au
770--844--4200.
Cette publication s’appuie sur l’information qui était disponible au moment de l’impression. À la société AutomationDirect,
nous nous efforçons constamment d’améliorer nos produits et services. C’est pourquoi nous nous réservons le droit
d’apporter des modifications aux produits ou aux publications en tout temps, sans préavis ni quelque obligation que ce soit.
La présente publication peut aussi porter sur des caractéristiques susceptibles de ne pas être offertes dans certaines
versions révisées du produit.
Marques de commerce
La présente publication peut contenir des références à des produits fabriqués ou offerts par d’autres entreprises. Les
désignations des produits et des entreprises peuvent être des marques de commerce et appartiennent exclusivement à
leurs propriétaires respectifs. AutomationDirect nie tout intérêt dans les autres marques et désignations.
Copyright 2010, Automationdirect.com Incorporated
Tous droits réservés
Nulle partie de ce manuel ne doit être copiée, reproduite ou transmise de quelque façon que ce soit sans le consentement
préalable écrit de la société Automationdirect.com Incorporated.AutomationDirect conserve les droits exclusifs à
l’égard de tous les renseignements contenus dans le présent document.
1
Manual Revisions
If you contact us in reference to this manual, remember to include the revision number.
Title: DL350 PLC User Manual
Manual Number: D 3 -- 3 5 0 -- M
Issue Date Description of Changes
Original 8/97 Original Issue
Rev A 6/98 Minor corrections
Rev B 5/99 Automationdirect.com
Rev C 8/02 Replaced F3--16TA--1 with F3--16TA--2
2nd Edition 3/10 Updated entire manual
1
1
DL350 User Manual, 2nd Edition
i
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........................................................
DL305 System Components 1--4..........................................................
CPUs 1--4............................................................................
Bases 1--4...........................................................................
I/O Configuration 1--4..................................................................
I/O Modules 1--4......................................................................
Programming Methods 1--4...............................................................
DirectSOFT Programming for Windows 1--4..............................................
Handheld Programmer 1--4.............................................................
DL305 System Diagrams 1--5...........................................................
DirectLOGIC Part Numbering System 1--8.................................................
Quick Start for PLC Validation and Programming 1--10......................................
Steps to Designing a Successful System 1--13..............................................
Step 1: Review the Installation Guidelines 1--13............................................
Step 2: Understand the CPU Setup Procedures 1--13.......................................
Step 3: Understand the I/O System Configurations 1--13.....................................
Step 4: Determine the I/O Module Specifications and Wiring Characteristics 1--13...............
Step 5: Understand the System Operation 1--13............................................
Step 6: Review the Programming Concepts 1--14...........................................
Step 7: Choose the Instructions 1--14.....................................................
Step 8: Understand the Maintenance and Troubleshooting Procedures 1--14...................
Chapter 2: Installation, Wiring, and Specifications
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.................................................................
Panel Mounting and Layout 2--6.........................................................
Enclosures 2--7.......................................................................
Environmental Specifications 2--8.......................................................
ii Table of Contents
DL350 User Manual, 2nd Edition
Agency Approvals 2--8.................................................................
Marine Use 2--8.......................................................................
Power 2--9...........................................................................
Component Dimensions 2--10............................................................
Installing DL305 Bases 2--11...............................................................
Choosing the Base Type 2--11...........................................................
Mounting the Base 2--11................................................................
Installing Components in the Base 2--12....................................................
Base Wiring Guidelines 2--13............................................................
Base Wiring 2--13......................................................................
Expansion Base Wiring 2--13............................................................
I/O Wiring Strategies 2--14.................................................................
PLC Isolation Boundaries 2--14..........................................................
Powering I/O Circuits with the Auxiliary Supply 2--15........................................
Powering I/O Circuits Using Separate Supplies 2--16........................................
Sinking / Sourcing Concepts 2--17........................................................
I/O “Common” Terminal Concepts 2--18...................................................
Connecting DC I/O to “Solid State” Field Devices 2--19......................................
Solid State Input Sensors 2--19..........................................................
Solid State Output Loads 2--19...........................................................
Relay Output Guidelines 2--21...........................................................
Surge Suppresion For Inductive Loads 2--21...............................................
Prolonging Relay Contact Life 2--23.......................................................
I/O Modules Position, Wiring, and Specification 2--24........................................
Slot Numbering 2--24...................................................................
I/O Module Placement Rules 2--24........................................................
Discrete Module Status Indicators 2--25...................................................
Color Coding of I/O Modules 2--25........................................................
Wiring the Different Module Connectors 2--25..............................................
I/O Wiring Checklist 2--26...............................................................
Glossary of Specification Terms 2--27......................................................
D3--08ND2, 24 VDC Input Module 2--29.....................................................
D3--16ND2--1, 24 VDC Input Module 2--30...................................................
D3--16ND2--2, 24 VDC Input Module Module 2--31............................................
D3--16ND2F, 24 VDC Fast Response Input Module 2--32......................................
F3--16ND3F, TTL/24 VDC Fast Response Input Module 2--33..................................
Selection of Operating Mode 2--34........................................................
D3--08NA--1, 110 VAC Input Module 2--35...................................................
D3--08NA--2, 220 VAC Input Module 2--36...................................................
D3--16NA, 110 VAC Input Module 2--37......................................................
D3--08NE3, 24 VAC/DC Input Module 2--38..................................................
D3--16NE3, 24 VAC/DC Input Module 2--39..................................................
D3--08SIM, Input Simulator 2--40...........................................................
D3--08TD1, 24 VDC Output Module 2--41....................................................
D3--08TD2, 24 VDC Output Module 2--42....................................................
iii
Table of Contents
D3--16TD1--1, 24 VDC Output Module 2--43..................................................
D3--16TD1--2, 24 VDC Output Module 2--44..................................................
D3--16TD2, 24 VDC Output Module 2--45....................................................
D3--04TAS, 110--220 VAC Output Module 2--46...............................................
F3--08TAS, 250 VAC Isolated Output Module 2--47...........................................
F3--08TAS--1, 125 VAC Isolated Output Module 2--48.........................................
D3--08TA--1, 110--220 VAC Output Module 2--49..............................................
D3--08TA--2, 110--220 VAC Output Module 2--50..............................................
F3--16TA--2, 20--125 VAC Output Module 2--51...............................................
D3--16TA--2, 15--220 VAC Output Module 2--52...............................................
D3--08TR, Relay Output Module 2--53.......................................................
F3--08TRS--1, Relay Output Module 2--54...................................................
F3--08TRS--2, Relay Output Module 2--55...................................................
D3--16TR, Relay Output Module 2--56.......................................................
Chapter 3: CPU Specifications and Operations
Overview 3--2...........................................................................
General CPU Features 3--2.............................................................
DL350 CPU Features 3--2..............................................................
CPU General Specifications 3--3..........................................................
CPU Hardware Features 3--4..............................................................
Mode Switch Functions 3--4............................................................
Status Indicators 3--4..................................................................
Port 1 Specifications 3--5...............................................................
Port 2 Specifications 3--5...............................................................
Using Battery Backup 3--6................................................................
Enabling the Battery Backup 3--6........................................................
CPU Setup 3--7..........................................................................
Installing the CPU 3--7.................................................................
Connecting the Programming Devices 3--7...............................................
Auxiliary Functions 3--8................................................................
Clearing an Existing Program 3--9.......................................................
Setting the Clock and Calendar 3--9.....................................................
Initializing System Memory 3--9.........................................................
Setting the CPU Network Address 3--10...................................................
Setting Retentive Memory Ranges 3--10...................................................
Password Protection 3--10...............................................................
CPU Operation 3--11......................................................................
CPU Operating System 3--11............................................................
Program Mode Operation 3--12..........................................................
Run Mode Operation 3--12..............................................................
Read Inputs 3--13......................................................................
Read Inputs from Specialty and Remote I/O 3--13..........................................
iv Table of Contents
DL350 User Manual, 2nd Edition
Service Peripherals and Force I/O 3--13...................................................
Update Clock, Special Relays, and Special Registers 3--13..................................
Solve Application Program 3--14.........................................................
Solve PID Loop Equations 3--14..........................................................
Write Outputs 3--14.....................................................................
Write Outputs to Specialty and Remote I/O 3--15...........................................
Diagnostics 3--15.......................................................................
I/O Response Time 3--16..................................................................
Is Timing Important for Your Application? 3--16.............................................
Normal Minimum I/O Response 3--16.....................................................
Normal Maximum I/O Response 3--16.....................................................
Improving Response Time 3--17..........................................................
CPU Scan Time Considerations 3--18......................................................
Intialization Process 3--19...............................................................
Service Peripherals 3--19................................................................
CPU Bus Communication 3--19..........................................................
Update Clock / Calendar, Special Relays, Special Registers 3--19............................
Diagnostics 3--19.......................................................................
Application Program Execution 3--20......................................................
PLC Numbering Systems 3--21............................................................
PLC Resources 3--21...................................................................
V--Memory 3--22.......................................................................
Binary-Coded Decimal Numbers 3--22....................................................
Hexadecimal Numbers 3--22.............................................................
Memory Map 3--23........................................................................
Octal Numbering System 3--23...........................................................
Discrete and Word Locations 3--23.......................................................
V--Memory Locations for Discrete Memory Areas 3--23......................................
Input Points (X Data Type) 3--24..........................................................
Output Points (Y Data Type) 3--24........................................................
Control Relays (C Data Type) 3--24.......................................................
Timers and Timer Status Bits (T Data type) 3--24...........................................
Timer Current Values (V Data Type) 3--25.................................................
Counters and Counter Status Bits (CT Data type) 3--25......................................
Counter Current Values (V Data Type) 3--25...............................................
Word Memory (V Data Type) 3--26........................................................
Stages (S Data type) 3--26..............................................................
Special Relays (SP Data Type) 3--26......................................................
DL350 System V-memory 3--27............................................................
DL350 Memory Map 3--29...............................................................
DL350 Aliases 3--30.......................................................................
X Input / Y Output Bit Map 3--31............................................................
Control Relay Bit Map 3--32................................................................
Stage Control / Status Bit Map 3--34........................................................
Timer and Counter Status Bit Maps 3--36...................................................
Chapter 4: System Design and Configuration
DL305 System Design Strategies 4--2.....................................................
v
Table of Contents
I/O System Configurations 4--2..........................................................
Networking Configurations 4--2..........................................................
Base Configurations 4--2...............................................................
Module Placement 4--3...................................................................
Slot Numbering 4--3...................................................................
I/O Module Placement Rules 4--3........................................................
I/O Configuration 4--3..................................................................
Calculating the Power Budget 4--4........................................................
Managing your Power Resource 4--4....................................................
Base Power Specifications 4--4.........................................................
I/O Points Required for Each Module 4--5.................................................
Module Power Requirements 4--5.......................................................
Power Budget Calculation Example 4--7..................................................
Power Budget Calculation Worksheet 4--8................................................
Local I/O Expansion 4--9.................................................................
Base Uses Table 4--9..................................................................
Local/Expansion Connectivity 4--9.......................................................
Connecting Expansion Bases 4--10.......................................................
Setting the Base Switches 4--11...........................................................
Jumper Switch 4--11....................................................................
I/O Configurations with a 5 Slot Local CPU Base 4--12.......................................
Switch settings 4--12....................................................................
5SlotBase 4--12.......................................................................
5 Slot Base and up to two 5 Slot Expansion Bases 4--12.....................................
I/O Configurations with an 8 Slot Local CPU Base 4--13......................................
8SlotBase 4--13.......................................................................
8 Slot Base and 5 Slot Expansion Base 4--13..............................................
8 Slot Base and One 8 slot and one 5 slot Expansion Bases 4--13............................
8 Slot Base and two 8 slot Expansion Bases 4--14..........................................
I/O Configurations with a 10 Slot Local CPU Base 4--15......................................
10 Slot Base 4--15......................................................................
10 Slot Base and 5 Slot Expansion Base with 16 Point I/O 4--15..............................
10 Slot Base and 10 Slot Expansion Base with 16 Point I/O 4--15.............................
Remote I/O Expansion 4--16...............................................................
How to Add Remote I/O Channels 4--16...................................................
Configuring the CPU’s Remote I/O Channel 4--17...........................................
Configure Remote I/O Slaves 4--19.......................................................
Configuring the Remote I/O Table 4--19...................................................
Remote I/O Setup Program 4--20.........................................................
Remote I/O Test Program 4--21..........................................................
Network Connections to MODBUS and DirectNET 4--22......................................
Configuring the CPU’s Comm Port 4--22...................................................
MODBUS Port Configuration 4--23........................................................
DirectNET Port Configuration 4--24.......................................................
Network Slave Operation 4--25.............................................................
MODBUS Function Codes Supported 4--25................................................
Determining the MODBUS Address 4--25..................................................
If Your Host Software Requires the Data Type and Address... 4--26...........................
Example 1: V2100 4--27.................................................................
vi Table of Contents
DL350 User Manual, 2nd Edition
Example 2: Y20 4--27...................................................................
Example 3: T10 Current Value 4--27......................................................
Example 4: C54 4--27...................................................................
If Your MODBUS Host Software Requires an Address ONLY 4--28............................
Example 1: V2100 584/984 Mode 4--29...................................................
Example 2: Y20 584/984 Mode 4--29......................................................
Example 3: T10 Current Value 484 Mode 4--29.............................................
Example 4: C54 584/984 Mode 4--29.....................................................
Determining the DirectNET Address 4--29.................................................
Network Master Operation 4--30...........................................................
Step 1: Identify Master Port # and Slave # 4--31............................................
Step 2: Load Number of Bytes to Transfer 4--31............................................
Step 3: Specify Master Memory Area 4--32................................................
Step 4: Specify Slave Memory Area 4--32..................................................
Communications from a Ladder Program 4--33.............................................
Multiple Read and Write Interlocks 4--33...................................................
Chapter 5: Standard RLL Instructions
Introduction 5--2.........................................................................
Using Boolean Instructions 5--4..........................................................
END Statement 5--4...................................................................
Simple Rungs 5--4.....................................................................
Normally Closed Contact 5--4...........................................................
Contacts in Series 5--4.................................................................
Midline Outputs 5--5...................................................................
Parallel Elements 5--5.................................................................
Joining Series Branches in Parallel 5--5..................................................
Joining Parallel Branches in Series 5--5..................................................
Combination Networks 5--6.............................................................
Boolean Stack 5--6....................................................................
Comparative Boolean 5--7..............................................................
Immediate Boolean 5--7................................................................
Boolean Instructions 5--8................................................................
Store (STR) 5--8......................................................................
Store Not (STRN) 5--8.................................................................
Store Bit-of-Word (STRB) 5--9..........................................................
Store Not Bit-of-Word (STRNB) 5--9.....................................................
Or (OR) 5--10.........................................................................
Or Not (ORN) 5--10....................................................................
Or Bit-of-Word (ORB) 5--11.............................................................
Or Not Bit-of-Word (ORNB) 5--11.........................................................
And (AND) 5--12.......................................................................
And Not (ANDN) 5--12..................................................................
And Bit-of-Word (ANDB) 5--13...........................................................
And Not Bit-of-Word (ANDNB) 5--13......................................................
And Store (AND STR) 5--14.............................................................
Or Store (OR STR) 5--14................................................................
Out (OUT) 5--15........................................................................
Out Bit-of-Word (OUTB) 5--16............................................................
Or Out (OR OUT) 5--17.................................................................
Not (NOT) 5--17........................................................................
Positive Differential (PD) 5--18...........................................................
vii
Table of Contents
Store Positive Differential (STRPD) 5--19..................................................
Store Negative Differential (STRND) 5--19.................................................
Or Positive Differential (ORPD) 5--20......................................................
Or Negative Differential (ORND) 5--20.....................................................
And Positive Differential (ANDPD) 5--21...................................................
And Negative Differential (ANDND) 5--21..................................................
Set (SET) 5--22........................................................................
Reset (RST) 5--22......................................................................
Set Bit-of-Word (SETB) 5--23............................................................
Reset Bit-of-Word (RSTB) 5--23..........................................................
Comparative Boolean 5--24................................................................
Store If Equal (STRE) 5--24..............................................................
Store If Not Equal (STRNE) 5--24.........................................................
Or If Equal (ORE) 5--25.................................................................
Or If Not Equal (ORNE) 5--25............................................................
And If Equal (ANDE) 5--26...............................................................
And If Not Equal (ANDNE) 5--26..........................................................
Store (STR) 5--27......................................................................
Store Not (STRN) 5--27.................................................................
Or (OR) 5--28..........................................................................
Or Not (ORN) 5--28.....................................................................
And (AND) 5--29.......................................................................
And Not (ANDN) 5--29..................................................................
Immediate Instructions 5--30..............................................................
Store Immediate (STRI) 5--30............................................................
Store Not Immediate (STRNI) 5--30.......................................................
Or Immediate (ORI) 5--31...............................................................
Or Not Immediate (ORNI) 5--31..........................................................
And Immediate (ANDI) 5--32.............................................................
And Not Immediate (ANDNI) 5--32........................................................
Out Immediate (OUTI) 5--33.............................................................
Or Out Immediate (OROUTI) 5--33........................................................
Set Immediate (SETI) 5--34..............................................................
Reset Immediate (RSTI) 5--34...........................................................
Timer, Counter and Shift Register Instructions 5--35.........................................
Using Timers 5--35.....................................................................
Timer (TMR) and Timer Fast (TMRF) 5--36................................................
Timer Example Using Discrete Status Bits 5--37............................................
Timer Example Using Comparative Contacts 5--37..........................................
Accumulating Timer (TMRA) Accumulating Fast Timer (TMRAF) 5--38.........................
Accumulating Timer Example using Discrete Status Bits 5--39................................
Accumulator Timer Example Using Comparative Contacts 5--39..............................
Counter (CNT) 5-
-40....................................................................
Counter Example Using Discrete Status Bits 5--41..........................................
Counter Example Using Comparative Contacts 5--41........................................
Stage Counter (SGCNT) 5--42...........................................................
Stage Counter Example Using Discrete Status Bits 5--43....................................
Stage Counter Example Using Comparative Contacts 5--43..................................
Up Down Counter (UDC) 5--44...........................................................
Up / Down Counter Example Using Discrete Status Bits 5--45................................
Up / Down Counter Example Using Comparative Contacts 5--45..............................
Shift Register (SR) 5--46................................................................
Accumulator / Stack Load and Output Data Instructions 5--47................................
viii Table of Contents
DL350 User Manual, 2nd Edition
Using the Accumulator 5--47.............................................................
Copying Data to the Accumulator 5--47....................................................
Changing the Accumulator Data 5--48.....................................................
Using the Accumulator Stack 5--49.......................................................
Using Pointers 5--51....................................................................
Load (LD) 5--52........................................................................
Load Double (LDD) 5--53................................................................
Load Formatted (LDF) 5--54.............................................................
Load Address (LDA) 5--55...............................................................
Load Accumulator Indexed (LDX) 5--56...................................................
Load Accumulator Indexed from Data Constants (LDSX) 5--57...............................
Load Real Number (LDR) 5--58..........................................................
Out (OUT) 5--59........................................................................
Out DOUBLE (OUTD) 5--60..............................................................
Out Formatted (OUTF) 5--61.............................................................
Out Indexed (OUTX) 5--62...............................................................
Pop (POP) 5--63.......................................................................
Accumulator Logical Instructions 5--64.....................................................
And (AND) 5--64.......................................................................
And Double (ANDD) 5--65...............................................................
And Formatted (ANDF) 5--66............................................................
Or (OR) 5--67..........................................................................
Or Double (ORD) 5--68..................................................................
Or Formatted (ORF) 5--69...............................................................
Exclusive Or (XOR) 5--70................................................................
Exclusive Or Double (XORD) 5--71.......................................................
Exclusive Or Formatted (XORF) 5--72.....................................................
Compare (CMP) 5--73..................................................................
Compare Double (CMPD) 5--74..........................................................
Compare Formatted (CMPF) 5--75........................................................
Compare Real Number (CMPR) 5--76.....................................................
Math Instructions 5--77....................................................................
Add (ADD) 5--77.......................................................................
Add Double (ADDD) 5--78...............................................................
Add Real (ADDR) 5--79.................................................................
Subtract (SUB) 5--80....................................................................
Subtract Double (SUBD) 5--81...........................................................
Subtract Real (SUBR) 5--82.............................................................
Multiply (MUL) 5--83....................................................................
Multiply Double (MULD) 5--84............................................................
Multiply Real (MULR) 5--85..............................................................
Divide (DIV) 5--86......................................................................
Divide Double (DIVD) 5--87..............................................................
Divide Real (DIVR) 5--88................................................................
Increment (INC) 5--89...................................................................
Decrement (DEC) 5--89.................................................................
Add Binary (ADDB) 5--90................................................................
Subtract Binary (SUBB) 5--91............................................................
Multiply Binary (MULB) 5--92.............................................................
Divide Binary (DIVB) 5--93...............................................................
Increment Binary (INCB) 5--94...........................................................
Decrement Binary (DECB) 5--95..........................................................
Bit Operation Instructions 5--96............................................................
ix
Table of Contents
Sum (SUM) 5--96.......................................................................
Shift Left (SHFL) 5--97..................................................................
Shift Right (SHFR) 5--98................................................................
Rotate Left (ROTL) 5--99................................................................
Rotate Right (ROTR) 5--100..............................................................
Encode (ENCO) 5--101...................................................................
Decode (DECO) 5--102..................................................................
Number Conversion Instructions (Accumulator) 5--103.......................................
Binary (BIN) 5--103......................................................................
Binary Coded Decimal (BCD) 5--104.......................................................
Invert (INV) 5--105.......................................................................
Ten’s Complement (BCDCPL) 5--106.......................................................
Binary to Real Conversion (BTOR) 5--107..................................................
Real to Binary Conversion (RTOB) 5--108..................................................
ASCII to HEX (ATH) 5--109...............................................................
HEX to ASCII (HTA) 5--110...............................................................
Segment (SEG) 5--112...................................................................
Gray Code (GRAY) 5--113................................................................
Shuffle Digits (SFLDGT) 5--114............................................................
Shuffle Digits Block Diagram 5--114........................................................
Table Instructions 5--116...................................................................
Move (MOV) 5--116......................................................................
Move Memory Cartridge / Load Label (MOVMC) (LDLBL) 5--117...............................
Copy Data From a Data Label Area to V--Memory 5--118.....................................
Copy Data From V--Memory to a Data Label Area 5--119.....................................
Clock / Calendar Instructions 5--120.........................................................
Date (DATE) 5--120......................................................................
Time (TIME) 5--121......................................................................
CPU Control Instructions 5--122............................................................
No Operation (NOP) 5--122...............................................................
End (END) 5--122.......................................................................
Stop (STOP) 5--123......................................................................
Reset Watch Dog Timer (RSTWT) 5--123...................................................
Program Control Instructions 5--124........................................................
Goto Label (GOTO) (LBL) 5--124..........................................................
For / Next (FOR) (NEXT) 5--125...........................................................
Goto Subroutine (GTS) (SBR) 5--127.......................................................
Subroutine Return (RT) 5--127............................................................
Subroutine Return Conditional (RTC) 5--127................................................
Master Line Set(MLS) 5--130..............................................................
Master Line Reset(MLR) 5--130...........................................................
Understanding Master Control Relays 5--130................................................
MLS/MLR Example 5--131................................................................
Interrupt Instructions 5--132................................................................
Interrupt (INT) 5--132....................................................................
Interrupt Return (IRT) 5--133..............................................................
Interrupt Return Conditional (IRTC) 5--133..................................................
Enable Interrupts (ENI) 5--133.............................................................
Disable Interrupts (DISI) 5--133............................................................
Interrupt Example for Software Interrupt 5--134..............................................
5--134..
xTable of Contents
DL350 User Manual, 2nd Edition
Intelligent I/O Instructions 5--135............................................................
Read from Intelligent Module (RD) 5--135...................................................
Write to Intelligent Module (WT) 5--136.....................................................
Network Instructions 5--137................................................................
Read from Network (RX) 5--137...........................................................
Write to Network (WX) 5--139.............................................................
Message Instructions 5--141................................................................
Fault (FAULT) 5--141.....................................................................
Fault Example 5--142....................................................................
Data Label (DLBL) 5--143................................................................
ASCII Constant (ACON) 5--143............................................................
Numerical Constant (NCON) 5--143........................................................
Data Label Example 5--144...............................................................
Print Message (PRINT) 5--145............................................................
Chapter 6: Drum Instruction Programming
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.............................................................
Counter Assignments 6--6..............................................................
Last Step Completion 6--7..............................................................
Overview of Drum Operation 6--8.........................................................
Drum Instruction Block Diagram 6--8.....................................................
Powerup State of Drum Registers 6--9...................................................
Drum Control Techniques 6--10............................................................
Drum Control Inputs 6--10...............................................................
Self-Resetting Drum 6--11...............................................................
Initializing Drum Outputs 6--11...........................................................
Drum Instructions 6--12...................................................................
Timed Drum with Discrete Outputs (DRUM) 6--12...........................................
Event Drum with Discrete Outputs (EDRUM) 6--14..........................................
Masked Event Drum with Discrete Outputs(MDRUMD) 6--18.................................
Masked Event Drum with Word Output (MDRUMW) 6--20....................................
Chapter 7: RLLPLUS Stage Programming
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................................................................
xi
Table of Contents
RLL Equivalent 7--4...................................................................
Stage Equivalent 7--4..................................................................
Let’s Compare 7--5....................................................................
Initial Stages 7--5......................................................................
What Stage Bits Do 7--6................................................................
Stage Instruction Characteristics 7--6....................................................
Using the Stage Jump Instruction for State Transitions 7--7.................................
Stage Jump, Set, and Reset Instructions 7--7.............................................
Stage Program Example: Toggle On/Off Lamp Controller 7--8...............................
A 4--State Process 7--8................................................................
Four Steps to Writing a Stage Program 7--9................................................
Stage Program Example: A Garage Door Opener 7--10.......................................
Garage Door Opener Example 7--10......................................................
Draw the Block Diagram 7--10...........................................................
Draw the State Diagram 7--11............................................................
Add Safety Light Feature 7--12...........................................................
Modify the Block Diagram and State Diagram 7--12.........................................
UsingaTimerInsideaStage 7--13.......................................................
Add Emergency Stop Feature 7--14.......................................................
Exclusive Transitions 7--14..............................................................
Stage Program Design Considerations 7--15................................................
Stage Program Organization 7--15........................................................
How Instructions Work Inside Stages 7--16................................................
Using a Stage as a Supervisory Process 7--17.............................................
Stage Counter 7--17....................................................................
Unconditional Outputs 7--18.............................................................
Power Flow Transition Technique 7--18....................................................
Parallel Processing Concepts 7--19........................................................
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................................................................
RLLPLUS Instructions 7--23.................................................................
Stage (SG) 7--23.......................................................................
Initial Stage (ISG) 7--24.................................................................
Jump (JMP) 7--24......................................................................
Not Jump (NJMP) 7--24.................................................................
Converge Stage (CV) and Converge Jump (CVJMP) 7--25...................................
Block Call (BCALL) 7--27................................................................
Block (BLK) 7--27......................................................................
Block End (BEND) 7--27.................................................................
Stage View in DirectSOFT 7--28.........................................................
Questions and Answers about Stage Programming 7--29....................................
xii Table of Contents
DL350 User Manual, 2nd Edition
Chapter 8: PID Loop Operation
DL350 PID Loop Features 8--2............................................................
Main Features 8--2....................................................................
Introduction to PID Control 8--4...........................................................
What is PID Control? 8--4..............................................................
Introducing DL350 PID Control 8--6.......................................................
Process Control Definitions 8--8.........................................................
PID Loop Operation 8--9..................................................................
PID Position Algorithm 8--9.............................................................
Reset Windup Protection 8--10...........................................................
Freeze Bias 8--11......................................................................
Adjusting the Bias 8--11.................................................................
Step Bias Proportional to Step Change SP 8--12............................................
Eliminating Proportional, Integral or Derivative Action 8--12..................................
Velocity Form of the PID Equation 8--12...................................................
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.............................................
Step 1: Know the Recipe 8--16...........................................................
Step 2: Plan Loop Control Strategy 8--16..................................................
Step 3: Size and Scale Loop Components 8--16............................................
Step 4: Select I/O Modules 8--16.........................................................
Step 5: Wiring and Installation 8--17......................................................
Step 6: Loop Parameters 8--17...........................................................
Step 7: Check Open Loop Performance 8--17..............................................
Step 8: Loop Tuning 8--17...............................................................
Step 9: Run Process Cycle 8--17.........................................................
Step 10: Save Loop Parameters 8--17.....................................................
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--19........................................
Loop Table Word Definitions 8--21........................................................
PID Mode Setting 1 Bit Descriptions (Addr + 00) 8--22.......................................
PID Mode Setting 2 Descriptions (Addr + 01) 8--23..........................................
Mode/Alarm Monitoring Word (Addr + 06) 8--24.............................................
Ramp/Soak Table Flags (Addr + 33) 8--24.................................................
Ramp/Soak Table Location (Addr + 34) 8--25...............................................
Ramp/Soak Table Programming Error Flags (Addr + 35) 8--25................................
Configure the PID Loop 8--26............................................................
PID Loop Tuning 8--40....................................................................
Open--Loop Test 8--40..................................................................
Manual Tuning Procedure 8--41..........................................................
Auto Tuning Procedure 8--44.............................................................
Use DirectSOFT5DataViewwithPIDView 8--48..........................................
Open a New Data View Window 8--48.....................................................
Open PID View 8--48...................................................................
Using Other PID Features 8--51............................................................
xiii
Table of Contents
How to Change Loop Modes 8--51........................................................
Operator Panel Control of PID Modes 8--52................................................
PLC Modes’ Effect on Loop Modes 8--52..................................................
Loop Mode Override 8--52...............................................................
Creating an Analog Filter in Ladder Logic 8--53.............................................
Use the DirectSOFT 5 Filter Intelligent Box Instruction 8--54.................................
FilterB Example 8--54...................................................................
Ramp/Soak Generator 8--55...............................................................
Introduction 8--55.......................................................................
Ramp/Soak Table 8--56.................................................................
Ramp/Soak Table Flags 8--58............................................................
Ramp/Soak Generator Enable 8--58......................................................
Ramp/Soak Controls 8--58...............................................................
Ramp/Soak Profile Monitoring 8--59......................................................
Ramp/Soak Programming Errors 8--59....................................................
Testing Your Ramp/Soak Profile 8--59.....................................................
DirectSOFT Ramp/Soak Example 8--60.....................................................
Setup the Profile in PID Setup 8--60......................................................
Program the Ramp/Soak Control in Relay Ladder 8--61......................................
Program the Ramp/Soak Control in Relay Ladder 8--62......................................
Cascade Control 8--63....................................................................
Introduction 8--63.......................................................................
Cascaded Loops in the DL350 CPU 8--64.................................................
Tuning Cascaded Loops 8--65...........................................................
Time-Proportioning Control 8--66..........................................................
On/Off Control Program Example 8--67....................................................
Feedforward Control 8--68.................................................................
Feedforward Example 8--69.............................................................
PID Example Program 8--70...............................................................
Program Setup for the PID Loop 8--70.....................................................
Troubleshooting Tips 8--72................................................................
Glossary of PID Loop Terminology 8--74....................................................
Bibliography 8--76........................................................................
Chapter 9: Maintenance and Troubleshooting
Hardware Maintenance 9--2...............................................................
Diagnostics 9--3.........................................................................
CPU Indicators 9--9......................................................................
PWR Indicator 9--10.......................................................................
RUN Indicator 9--12.......................................................................
CPU Indicator 9--12.......................................................................
BATT Indicator 9--12......................................................................
Communications Problems 9--12..........................................................
I/O Module Troubleshooting 9--13..........................................................
xiv Table of Contents
DL350 User Manual, 2nd Edition
Noise Troubleshooting 9--16...............................................................
Machine Startup and Program Troubleshooting 9--17........................................
Appendix A: Auxiliary Functions
Introduction A--2.........................................................................
What are Auxiliary Functions? A--2......................................................
Accessing AUX Functions via DirectSOFT A--3...........................................
Accessing AUX Functions via the Handheld Programmer A--3...............................
AUX 2* — RLL Operations A--4............................................................
AUX 21, 22, 23 and 24 A--4.............................................................
AUX 21 Check Program A--4............................................................
AUX 22 Change Reference A--4.........................................................
AUX 23 Clear Ladder Range A--4........................................................
AUX 24 Clear Ladders A--4.............................................................
AUX 3* — V-memory Operations A--4......................................................
AUX 31 Clear V--Memory A--4...........................................................
AUX 4* — I/O Configuration A--5..........................................................
AUX 41 Show I/O Configuration A--5.....................................................
AUX 5* — CPU Configuration A--5.........................................................
AUX 51 -- 58 A--5......................................................................
AUX 51 Modify Program Name A--5......................................................
AUX 52 Display /Change Calendar A--5..................................................
AUX 53 Display Scan Time A--6.........................................................
AUX 54 Initialize Scratchpad A--6........................................................
AUX 55 Set Watchdog Timer A--6........................................................
AUX 56 CPU Network Address A--6......................................................
AUX 57 Set Retentive Ranges A--7......................................................
AUX 5C Display Error History A--7.......................................................
AUX 6* — Handheld Programmer Configuration A--8.......................................
AUX 61 Show Revision Numbers A--8....................................................
AUX 7* — EEPROM Operations A--8.......................................................
AUX 71 -- 76 A--8......................................................................
AUX 71 CPU to HPP EEPROM A--8.....................................................
AUX 72 HPP EEPROM to CPU A--8.....................................................
AUX 73 Compare HPP EEPROM to CPU A--8.............................................
AUX 74 HPP EEPROM Blank Check A--8.................................................
AUX 75 Erase HPP EEPROM A--8.......................................................
AUX 76 Show EEPROM Type A--8.......................................................
AUX 8* — Password Operations A--9......................................................
AUX 81 -- 83 A--9......................................................................
AUX 81 Modify Password A--9..........................................................
AUX 82 Unlock CPU A--9...............................................................
AUX 83 Lock CPU A--9.................................................................
xv
Table of Contents
Appendix B: Error Codes
Appendix C: Instruction Execution Times
Introduction C--2.........................................................................
V-Memory Data Registers C--2..........................................................
V-Memory Bit Registers C--2............................................................
How to Read the Tables C--3............................................................
Boolean Instructions C--4................................................................
Comparative Boolean C--5................................................................
Immediate Instructions C--11..............................................................
Timer, Counter, Shift Register Instructions C--12............................................
Accumulator Data Instructions C--13.......................................................
Logical Instructions C--14.................................................................
Math Instructions C--15....................................................................
Bit Instructions C--16......................................................................
Number Conversion Instructions C--16.....................................................
Table Instructions C--17...................................................................
CPU Control Instructions C--17............................................................
Program Control Instructions C--17........................................................
Interrupt Instructions C--18................................................................
Network Instructions C--18................................................................
Message Instructions C--18................................................................
RLLPLUS Instructions C--18.................................................................
Clock / Calendar Instructions C--19.........................................................
Drum Instructions C--19...................................................................
Appendix D: Special Relays
DL350 CPU Special Relays D--2...........................................................
Startup and Real-Time Relays D--2......................................................
CPU Status Relays D--2................................................................
System Monitoring Relays D--3..........................................................
Accumulator Status Relays D--3.........................................................
Communications Monitoring Relays D--4..................................................
Appendix E: DL305 Product Weights
Product Weight Table E--2................................................................
xvi Table of Contents
DL350 User Manual, 2nd Edition
Appendix F: I/O Addressing Conventional Method
Understanding Conventional I/O Numbering F--2...........................................
DL305 I/O Configuration History F--2.....................................................
Octal Numbering System F--2...........................................................
Fixed I/O Numbering F--2...............................................................
I/O Numbering Guidelines F--3..........................................................
Number of I/O Points Required for Each Module F--3.......................................
I/O Module Placement Rules F--4........................................................
Conventional Base Specifications F--5....................................................
Auxiliary 24VDC Output at Base Terminal F--5.............................................
Power Supply Schematics F--6..........................................................
Using the Run Relay on the Base Power Supply F--7.......................................
Local or Expansion I/O Systems F--8......................................................
Base Uses Table F--8..................................................................
Local/Expansion Connectivity F--8.......................................................
Connecting Expansion Bases F--9.......................................................
Setting the Base Switches F--10...........................................................
5 Slot Bases F--10......................................................................
10 Slot Base F--10......................................................................
Example I/O Configurations F--11..........................................................
16 Point I/O Allocation Example F--11.....................................................
Examples Show Maximum I/O Points Available F--11........................................
I/O Configurations with a 5 Slot Local CPU Base F--12.......................................
Switch settings F--12....................................................................
5SlotBasewith8PointI/O F--12.........................................................
5SlotBasewith16PointI/O F--12........................................................
5 Slot Base and 5 Slot Expansion Base with 8 Point I/O F--13................................
5 Slot Base and 5 Slot Expansion Base with 16 Point I/O F--13...............................
5 Slot Base and Two 5 Slot Expansion Bases with 8 Point I/O F--14...........................
5 Slot Base and Two 5 Slot Expansion Bases with 16 and 8 Point I/O F--14....................
I/O Configurations with an 8 Slot Local CPU Base F--15......................................
8SlotBasewith8PointI/O F--15.........................................................
8SlotBasewith16PointI/O F--15........................................................
8 Slot Base and 5 Slot Expansion Base with 8 Point I/O F--15................................
8 Slot Base and 5 Slot Expansion Base with 16 Point I/O F--15...............................
I/O Configurations with a 10 Slot Local CPU Base F--16......................................
Switch settings F--16....................................................................
Last Slot Address Range 100 to 107 F--16.................................................
Last Slot Address Range 700 to 707 F--16.................................................
10 Slot Expansion Base with 16 Point I/O F--17.............................................
Configuration 1 F--17...................................................................
Configuration 2 F--17...................................................................
10 Slot Base and 5 Slot Expansion Base with 16 Point I/O F--18..............................
Expansion Addresses Depend on Local CPU Base Configuration. F--19.......................
10 Slot Base and 10 Slot Expansion Base with 8 Point I/O F--19..............................
10 Slot Base and 10 Slot Expansion Base with 16 Point I/O F--19.............................
xvii
Table of Contents
Appendix G: PLC Memory
DL350 PLC Memory G--2..................................................................
Non--volatile V--memory in the DL350 G--3................................................
Appendix H: ASCII Table
Table H--2...............................................................................
Appendix I: Numbering Systems
Introduction I--2.........................................................................
Binary Numbering System I--2...........................................................
Hexadecimal Numbering System I--3.....................................................
Octal Numbering System I--4.............................................................
Binary Coded Decimal (BCD) Numbering System I--5......................................
Real (Floating Point) Numbering System I--6..............................................
BCD/Binary/Decimal/Hex/Octal -- What is the Difference? I--7...............................
Data Type Mismatch I--8.................................................................
Signed vs. Unsigned Intergers I--9........................................................
AutomationDirect.com Products and Data Types I--10.......................................
DirectLOGIC PLCs I--10................................................................
C--more/C--more Micro--Graphic Panels I--10..............................................
Appendix J: European Union Directives (CE)
European Union (EU) Directives J--2......................................................
Member Countries J--2.................................................................
General Safety J--4....................................................................
Special Installation Manual J--4.........................................................
Other Sources of Information J--4.......................................................
Basic EMC Installation Guidelines J--5....................................................
Enclosures J--5.......................................................................
Suppression and Fusing J--5...........................................................
Internal Enclosure Grounding J--6.......................................................
Equi--potential Grounding J--6..........................................................
Communications and Shielded Cables J--6...............................................
Analog and RS232 Cables J--7.........................................................
Multidrop Cables J--7..................................................................
Shielded Cables within Enclosures J--8..................................................
Caution Regarding RF Interference near Analog Modules J--8...............................
Network Isolation J--8..................................................................
Items Specific to the DL350 J--9.........................................................
Index
11
Getting Started
In This Chapter....
— Introduction
— DL305 System Components
— Programming Methods
DirectLOGICPart Numbering System
Quick Start for PLC Validation and Programming
— Steps to Designing a Successful System
Getting Started
1--2 Getting Started
DL350 User Manual, 2nd Edition
Introduction
Thank you for purchasing our DL305
family of products. This manual shows you
how to install, program, and maintain the
equipment. It also helps you understand
how to interface them to other devices in a
control system.
This manual contains important
information for personnel who will install
DL305 PLCs, DL350 CPU and
components, and for the PLC
programmer. If you understand PLC
systems, our manuals will provide all the
information you need to start and keep
your system up and running.
If you already understand PLCs please read Chapter 2, “Installation, Wiring, and
Specifications”, and proceed on to other chapters as needed. Keep this manual
handy for reference when you have questions. If you are a new DL305 customer, we
suggest you read this manual completely to understand the wide variety of features
in the DL305 family of products. We believe you will be pleasantly surprised with how
much you can accomplish with AutomationDirectproducts.
If you have purchased operator interfaces or DirectSOFT, you will need to
supplement this manual with the manuals that are written for these products.
We realize that even though we strive to be the best, we may have arranged our
information in such a way you cannot find what you are looking for. First, check these
resources for help in locating the information:
STable of Contents -- chapter and section listing of contents, in the front
of this manual
SAppendices -- reference material for key topics, near the end of this
manual
SIndex -- alphabetical listing of key words, at the end of this manual
You can also check our online resources for the latest product support information:
SInternet -- Our Web address is http://www.automationdirect.com
If you still need assistance, please call us at 770--844--4200. Our technical support
group is glad to work with you in answering your questions. They are available
Monday through Friday from 9:00 A.M. to 6:00 P.M. Eastern Standard Time. If you
have a comment or question about any of our products, services, or manuals, please
fill out and return the ‘Suggestions’ card that was shipped with this manual.
The Purpose of
this Manual
Where to Begin
Supplemental
Manuals
Technical Support
Getting Started
1--3
Getting Started
DL350 User Manual, 2nd Edition
Conventions Used
When you see the “light bulb” icon in the left--hand margin, the paragraph to its
immediate right will give you a special tip.
The word TIP: in boldface will mark the beginning of the text.
When you see the “notepad” icon in the left--hand margin, the paragraph to its
immediate right will be a special note.
The word NOTE: in boldface will mark the beginning of the text.
When you see the “exclamation mark” icon in the left--hand margin, the paragraph to
its immediate right will be a warning. This information could prevent injury, loss of
property, or even death (in extreme cases).
The word WARNING: and text will be in boldface.
The beginning of each chapter will list the
key topics that can be found in that
chapter. 1
Key Topics for
Each Chapter
Getting Started
1--4 Getting Started
DL350 User Manual, 2nd Edition
DL305 System Components
The DL305 family is a versatile product line that provides a wide variety of features in
an extremely compact package. The CPUs are small, but offer many instructions
normally only found in larger, more expensive systems. The modular design also
offers more flexibility in the fast moving industry of control systems. The following is a
summary of the major DL305 system components.
There are three feature enhanced CPUs in this product line, the DL330, DL340, and
the DL350. This manual covers the DL350 CPU only. The DL330 and DL340 CPUs
are covered in detail in the DL305C User Manual. The DL350 CPU includes built-in
communication ports, a large amount of program memory, a substantial instruction
set and advanced diagnostics. It also features drum timers, floating--point math, and
built in PID loops with automatic tuning.
Three base sizes are available: 5 slot, 8 slot, and 10 slot. One slot is for the CPU, the
remaining slots are for I/O modules. All bases include a built-in power supply.
Currently there are two versions of the bases. The xxxxx--1 bases were designed to
compliment the DL350 CPU. Any of the three CPUs will work in either type of base
and the bases can be mixed in a system. When the DL350 CPU is used in an old
base, or if it is in a system of mixed bases, it will act similar to the DL340 CPU in
addressing and I/O configuration (See Appendix F).
The DL350 CPU can support up to 368 I/O points with the bases currently available.
These points can be assigned as input or output points. The DL305 system can also
be expanded by adding remote I/O. The DL350 also provides a built--in master for
remote I/O networks. The I/O configuration is explained in Chapter 4, System
Design and Configuration.
The DL305 has some of the most powerful modules in the industry. A complete
range of discrete modules which support 24 VDC, 110/220 VAC and up to 10A relay
outputs are offered. The analog modules provide 12 bit resolution and several
selections of input and output signal ranges (including bipolar).
Programming Methods
There are two programming methods available to the DL350 CPU, RLL (Relay
Ladder Logic) and RLLPLUS (Stage Programming). Both the DirectSOFT
programming package and the handheld programmer support RLL and Stage.
The DL305 can be programmed with one of the most advanced programming
packages in the industry ----DirectSOFT. DirectSOFT is a Windows-based software
package that supports many Windows-features you are already know, such as cut
and paste between applications, point and click editing, viewing and editing multiple
application programs at the same time, etc. DirectSOFT universally supports the
DirectLOGICCPU families. This means you can use the same DirectSOFT
package to program DL105, DL205, DL305, DL405 or any new CPUs we may add to
our product line. There is a separate manual that discusses the DirectSOFT
programming software.
The DL350 CPU has a built-in programming port for use with the DL205 handheld
programmer (D2--HPP). The handheld programmer can be used to create, modify
and debug your application program. A separate manual that discusses the
Handheld Programmer is available.
CPUs
Bases
I/O Configuration
I/O Modules
DirectSOFT
Programming for
Windows
Handheld
Programmer
Getting Started
1--5
Getting Started
DL350 User Manual, 2nd Edition
The diagram below shows the major components and configurations of the DL305
system. The next two pages show specific components for building your system.
Networking
RS232C
(max.50ft/16.2m) RS232C
(max.50ft/16.2m)(max. 4.6ft / 1.5m)
Handheld Programmer
Operator Interface
Programming or
Computer
Interface
Computer Controlled I/O
Industry Standard Computer I/O Protocol
OPTOMUX(Serial RS422/485)
PAMUX(Parallel)
Computer Interface
with OPTOMUXDriver
RS422/485
DL305
Machine Control
Packaging
Conveyors
Elevators
Programming or
Computer Interface
(.05m) RS232C
(max.50ft/16.2m)
Handheld Programmer
DL305
1.5ft (.05m)
1.5ft
RS232C/422
Convertor
RS232C/422
Convertor
RS232C/422
Convertor
DL305 DL305 DL305
RS422
DL305
DL305
DL305
DL305 System
Diagrams
Getting Started
1--6 Getting Started
DL350 User Manual, 2nd Edition
DC INPUT
8pt 24 VDC
16pt 24 VDC
16pt 5-24 VDC
16pt 12-24 VDC
AC INPUT
8pt 110 VAC
16pt 110 VAC
8pt 220 VAC
AC/DC INPUT
8pt 24 VAC/DC
16pt 24 VAC/DC
CPUs
DL350
7.6K Built in Flash memory
and2Built-inPorts
BASES
5 Slot Base w/Expansion Capability,
110/220 VAC P/S
5 Slot Base w/Expansion Capability,
24 VDC Supply
8 Slot Base w/Expansion Capability,
110/220 VAC P/S
10 Slot Base w/Expansion Capability,
110/220 VAC P/S
PROGRAMMING
Handheld Programmer for RLL and
RLLPLUS
DirectSOFT Programming for Windows
ASCII BASIC Modules
RS232C / RS422 / RS485
Built-in Radio Modem
Built-in Telephone Modem
Program Memory 64K/128K
DirectLOGIC
Getting Started
1--7
Getting Started
DL350 User Manual, 2nd Edition
SPECIALTY CPUs
Bridge CPU to connect
to host w/OPTOMUXDriver
Bridge CPU w/FACTS
Extended Basic Programming
Bridge CPU to connect to
High-speed PAMUX
compatible host
DC OUTPUT
8pt 5--24 VDC
16pt 5--24 VDC
AC OUTPUT
4 pt 110--220 VAC
8pt 110--220 VAC
8pt 12--220 VAC
16pt 12--220VAC
16pt 15--220VAC
RELAY OUTPUT
8pt 4A/pt AC
8pt 5A/pt DC
8pt 10A/pt
16pt 2A/pt
ANALOG
4ch INPUT
8ch INPUT
16ch INPUT
2ch OUTPUT
4ch OUTPUT
8ch TEMPERATURE
TRANSDUCER INPUT
8ch THERMOCOUPLE
INPUT
DL305 Family
SPECIALTY
MODULES / UNITS
8pt INPUT Simulator
1pt High Speed Counter
PROM Writer Unit
Filler Module
NETWORKING
RS232C Data Communication Unit
RS422 Data Communication Unit
MODBUS®Slave Module
MODBUS®Slave Module
w/Radio Modem
Universal connector:
RS232C / RS422/485 Convertor
Getting Started
1--8 Getting Started
DL350 User Manual, 2nd Edition
DirectLOGIC Part Numbering System
As you examine this manual, you will notice there are many different products available. Sometimes it is
difficult to remember the specifications for any given product. However, if you take a few minutes to
understand the numbering system, it may save you some time and confusion. The charts below show how
the part numbering systems work for each product category. Part numbers for accessory items such as
cables, batteries, memory cartridges, etc. are typically an abbreviation of the description for the item.
CPUs
Specialty CPUs
Product family D1/F1
D2/F2
D3/F3
D4/F4
Class of CPU / Abbreviation 230...,330...,430...
Denotes a differentiation between
Similar modules -- 1 , -- 2 , -- 3 , -- 4
Bases
Product family D2/F2
D3/F3
D4/F4
Number of slots ##B
Type of Base DC or empty
Discrete I/O
DL205 Product family D2/F2
y
DL305 Product family
D3/F3
y
DL405 Product family D4/F4
Number of points 04/08/12/16/32
Input N
p
Output T
p
Combination C
AC A
DC D
Either E
Relay R
Current Sinking 1
g
Current Sourcing 2
g
Current Sinking/Sourcing 3
High Current H
g
Isolation S
Fast I/O F
Denotes a differentiation between
Similar modules -- 1 , -- 2 , -- 3 , -- 4
D3-- 16 N D 2 --1
D4-- 16 N D 2 F
D3-- 05B DC
D4-- 440DC -- 1
Getting Started
1--9
Getting Started
DL350 User Manual, 2nd Edition
Analog I/O
DL205 Product family D2/F2
y
DL305 Product family
D3/F3
y
DL405 Product family D4/F4
Number of channels 02/04/08/16
Input (Analog to Digital) AD
p
(
g
g
)
Output (Digital to Analog) DA
p
(
g
g
)
Combination AND
Isolated S
Denotes a differentiation between
Similar modules -- 1 , -- 2 , -- 3 , -- 4
Communication and Networking
Special I/O and Devices
Programming
DL205 Product family
DL305 Product family
DL405 Product family
D2/F2
D3/F3
D4/F4
Name Abbreviation see example
CoProcessors and ASCII BASIC Modules
DL205 Product family D2/F2
y
DL305 Product family
D3/F3
y
DL405 Product family D4/F4
CoProcessor CP
ASCII BASIC AB
64K memory 64
y
128K memory 128
y
512K memory 512
Radio modem R
Telephone modem T
F4-- CP 128 -- R
F3-- 04 AD S --1
F3-- 08 THM -- n
note: --n indicates thermocouple type
Alternate example of Analog I/O
suchas:J,K,T,R,SorE
using abbreviations
D3-- HPP
D3-- HSC
D4-- DCM
HPP (RLL PLUS Handheld Program-
mer)
HSC (High Speed Counter)
DCM (Data Communication Module)
o
Getting Started
1--10 Getting Started
DL350 User Manual, 2nd Edition
Quick Start for PLC Validation and Programming
If you have experience with PLCs, or want to setup a quick example, this section is
what you want to use. This example is not intended to explain everything needed to
start-up your system. It is only intended to provide a general picture of what is
needed to get your system powered-up.
Unpack the DL305 equipment and verify you have the parts necessary to build this
demonstration system. The minimum parts needed are as follows:
SBase
SCPU
SD3--08ND2 DC input module or a D3--08SIM input simulator module
SD3--08TD2 DC output module
S*Power cord
S*Hook up wire
S*A 24 VDC toggle switch (if not using the input simulator module)
S*A screwdriver, regular or Phillips type
* These items are not supplied with your PLC.
You will need at least one of the following programming options:
SDirectSOFT Programming Software, DirectSOFT Manual, and a
programming cable (connects the CPU to a personal computer), or
SD2--HPP Handheld Programmer and the Handheld Programmer Manual
Step 1: Unpack the
DL305
Equipment
Getting Started
1--11
Getting Started
DL350 User Manual, 2nd Edition
Insert the CPU and I/O into the base. The CPU must go into the first slot of the base
(adjacent to the power supply).
SEach unit has a plastic retaining
clip at the top and bottom.
SWith the unit square to the base,
slide it in using the upper and
lower guides.
SGently push the unit back until it
is firmly seated in the backplane
and the plastic clips lock in place.
CPU must reside in first slot!
Placement of discrete, analog and relay modules are not critical and may go in any
slot in any base however for this example install the output module in the slot next to
the CPU and the input module in the next. Limiting factors for other types of modules
are discussed in Chapter 4, System Design and Configuration. You must also make
sure you do not exceed the power budget for each base in your system
configuration. Power budgeting is also discussed in Chapter 4.
Remove the terminal strip
cover. It is a small strip of
clear plastic that is located on
the base power supply. Lift off
To finish this quick start exercise or study other examples in this manual, you will
need to install an input simulator module (or wire an input switch as shown below),
and add an output module. Using an input simulator is the quickest way to get
physical inputs for checking out the system or a new program. To monitor output
status, any discrete output module will work.
Wire the switches or other field devices prior to applying power to the system to
ensure a point is not accidentally turned on during the wiring operation. Wire the
input module (X0) to the toggle switch and 24VDC auxiliary power supply on the
CPU terminal strip as shown. Chapter 2, Installation, Wiring, and Specifications
provides a list of I/O wiring guidelines.
Toggle switch
Step 2: Install the
CPU and I/O
Modules
Step 3: Remove
Terminal Strip
Access Cover
Step 4:
A
dd I
/
O
Simulation
Getting Started
1--12 Getting Started
DL350 User Manual, 2nd Edition
Connect the wires as shown. Observe all
precautions stated earlier in this manual. For
details on wiring see Chapter 2, Installation,
Wiring, and Specifications. When the wiring
is complete, replace the CPU and module
covers. Do not apply power at this time.
Ground
Line
Neutral
Connect the D2--HPP to the top port (RJ
style phone jack) of the CPU using the
appropriate cable.
Apply power to the system and ensure the PWR indicator on the CPU is on. If not,
remove power from the system and check all wiring and refer to the troubleshooting
section in Chapter 9 for assistance.
Slide the Mode Switch on the CPU to the STOP position and then back to the TERM
position. This puts the CPU in the program mode and allows access to the CPU
program. The PGM indicator should be illuminated on the HPP. Enter the following
keystrokes on the HPP:
NOTE: It is not necessary for you to configure the I/O for this system since the DL350
CPU automatically examines any installed modules and establishes the correct
configuration.
NOP
STR
$1
BENT
OUT
GX 2
CENT
Handheld Programmer Keystrokes X1 Y0
OUT
After entering the simple example program slide the switch from the TERM position
to the RUN position and back to TERM. The RUN indicator on the CPU will come on
indicating the CPU has entered the run mode. If not repeat Step 8 insuring the
program is entered properly or refer to the troubleshooting guide in chapter 9.
During Run mode operation, the output status indicator on the output module should
reflect the switch status. When the switch is on the output should be on.
Step 5: Connect
the Power Wiring
Step 6: Connect
the Handheld
Programmer
Step 7: Switch On
the System Power
Step 8: Enter the
Program
Getting Started
1--13
Getting Started
DL350 User Manual, 2nd Edition
Steps to Designing a Successful System
Always make safety your first priority in
any system application. Chapter 2
provides several guidelines that will help
provide a safer, more reliable system.
This chapter also includes wiring
guidelines for the various system
components.
The CPU is the heart of your automation
system. Make sure you take time to
understand the various features and
setup requirements.
It is important to understand how your
local I/O system can be configured. It is
also important to understand how the
system Power Budget is calculated. This
can affect your I/O placement and/or
configuration options.
X20
to
X37
Y40
to
Y57
X10
to
X17
There are many different I/O modules
available with the DL305 system.
Chapter 2 provides the specifications
and wiring diagrams for the discrete I/O
modules.
NOTE: Specialty modules have their
own manuals and are not included in this
manual.
Before you begin to enter a program, it is
very helpful to understand how the
DL305 system processes information.
This involves not only program execution
steps, but also involves the various
modes of operation and memory layout
characteristics. See Chapter 3 for more
information.
Power up
Initialize hardware
Check I/O module
config. and verify
Step 1:
Review the
Installation
Guidelines
Step 2:
Understand the
CPU Setup
Procedures
Step 3:
Understand the
I/O System
Configurations
Step 4:
Determine the I/O
Module
Specifications
and Wiring
Characteristics
Step 5:
Understand the
System Operation
Getting Started
1--14 Getting Started
DL350 User Manual, 2nd Edition
The DL305 provides four main approaches to solving the application program,
including the PID loop task depicted in the next figure.
SRLL diagram-style programming is the best tool for solving boolean logic
and general CPU register/accumulator manipulation. It includes dozens
of instructions, which will augment drums, stages, and loops.
SThe DL350 has four timer/event drum types, each with up to 16 steps.
They offer both time and/or event-based step transitions. Drums are
best for a repetitive process based on a single series of steps.
SStage programming (also called RLLPlus) is based on state-transition
diagrams. Stages divide the ladder program into sections which
correspond to the states in a flow chart of your process.
SThe DL350 PID Loop Operation uses setup tables to configure 4 loops.
Features include; auto tuning, alarms, SP ramp/soak generation, and
more.
Push--UP
UP
Push--
DOWN
DOWN
LOWER
RAISE
LIGHT
Stage Programming
(see Chapter 7)
Standard RLL Programming Timer/Event Drum Sequencer
(see Chapter 5) (see Chapter 6)
X0 LDD
V1076
CMPD
K309482
SP62
OUT
Y0
PID Loop Operation
(see Chapter 8)
PV
PID Process
SP Σ
+--
Once you have installed the system and
understand the theory of operation, you
can choose from one of the most
powerful instruction sets available.
TMR T1
K30 CNT CT3
K10
Equipment failures can occur at any time.
Switches fail, batteries need to be
replaced, etc. In most cases, the majority
of the troubleshooting and maintenance
time is spent trying to locate the problem.
The DL305 system has many built-in
features that help you quickly identify
problems. Refer to Chapter 9 for
diagnostics and troubleshooting tips.
Step 6:
Review the
Programming
Concepts
Step 7:
Choose the
Instructions
Step 8:
Understand the
Maintenance and
Troubleshooting
Procedures
12
Installation, Wiring,
and Specifications
In This Chapter....
— Safety Guidelines
— Mounting Guidelines
— Installing DL305 Bases
— Installing Components in the Base
— Base Wiring Guidelines
— I/O Wiring Strategies
— I/O Modules Position, Wiring, and Specifications
— Glossary of Specification Terms
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--2 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
Safety Guidelines
NOTE: Products with CE marks perform their required functions safely and adhere
to relevant standards as specified by CE directives provided they are usedaccording
to their intended purpose and that the instructions in this manual areadhered to. The
protection provided by the equipment may be impaired if thisequipment is used in a
manner not specified in this manual. A listing of ourinternational affiliates is available
on our web site: http://www.automationdirect.com.
WARNING: Providing a safe operating environment for personnel and
equipment is your responsibility and should be your primary goal during
system planning and installation. Automation systems can fail and may result
in situations that can cause serious injury to personnel or damage to
equipment. Do not rely on the automation system alone to provide a safe
operating environment. You should use external electromechanical devices,
such as relays or limit switches, that are independent of the PLC application to
provide protection for any part of the system that may cause personal injury or
damage.
Every automation application is different, so there may be special
requirements for your particular application. Make sure you follow all
national, state, and local government requirements for the proper installation
and use of your equipment.
The best way to provide a safe operating environment is to make personnel and
equipment safety part of the planning process. You should examine every aspect of
the system to determine which areas are critical to operator or machine safety.
If you are not familiar with PLC system installation practices, or your company does
not have established installation guidelines, you should obtain additional
information from the following sources.
NEMA — The National Electrical Manufacturers Association, located in
Washington, D.C., publishes many different documents that discuss
standards for industrial control systems. You can order these
publications directly from NEMA. Some of these include:
ICS 1, General Standards for Industrial Control and Systems
ICS 3, Industrial Systems
ICS 6, Enclosures for Industrial Control Systems
NEC — The National Electrical Code provides regulations concerning
the installation and use of various types of electrical equipment. Copies
of the NEC Handbook can often be obtained from your local electrical
equipment distributor or your local library.
SLocal and State Agencies — many local governments and state
governments have additional requirements above and beyond those
described in the NEC Handbook. Check with your local Electrical
Inspector or Fire Marshall office for information.
Plan for Safety
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--3
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
The publications mentioned provide many ideas and requirements for system
safety. At a minimum, you should follow these regulations. Using the techniques
listed below will further help reduce the risk of safety problems.
Emergency stop switch for disconnecting system power.
Mechanical disconnect for output module power.
Orderly system shutdown sequence in the PLC control program.
It is recommended that emergency stop circuits be incorporated into the system for
every machine controlled by a PLC. For maximum safety in a PLC system, these
circuits must not be wired into the controller, but should be hardwired external to the
PLC. The emergency stop switches should be easily accessed by the operator and
are generally wired into a master control relay (MCR) or a safety control relay (SCR)
that will remove power from the PLC I/O system in an emergency.
MCRs and SCRs provide a convenient means for removing power from the I/O
system during an emergency situation. by de--energizing an MCR (or SCR) coil,
power to the input (optional) and output devices is removed. This event occurs when
any emergency stop switch opens. However, the PLC continues to receive power
and operate even though all its inputs and outputs are disabled.
The MCR circuit could be extended by placing a PLC fault relay (closed during
normal PLC operation) in series with any other emergency stop conditions. This
would cause the MCR circuit to drop the PLC I/O power in case of a PLC failure
(memory error, I/O communications error. etc.).
Output
Module Saw
Arbor
ESTOP Master
Relay
PLC Power
Emergency
Stop
Power On
Master Relay Contacts
To disconnect output
module power
Use E-Stop and Master Relay
Guard
Limit
Guard Limit Switch
Master
Relay
Contacts
Three Levels of
Protection
Emergency Stops
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--4 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
A properly rated emergency power disconnect should be used to power the PLC
controlled system as ameans of removing the power from the entire control system.
It may be necessary to install a capacitor across the disconnect to protect against a
condition known as “outrush“. This condition occurs when the output triacs are
turned off by powering off the disconnect, thus causing the energy stored in the
inductive loads to seek the shortest distance to ground, which is often through the
triacs.
After an emergency shutdown or any other type of power interruption, there may be
requirements that must be met before the PLC control program can be restarted. For
example, there may be specific register values that must be established (or
maintained from the state prior to the shutdown) before operations can resume. In
this case, you may want to use retentive memory locations, or include constants in
the control program to ensure a known starting point.
Ideally, the first level of protection can be
provided with the PLC control program
by identifying machine problems.
Analyze your application and identify any
shutdown sequences that must be
performed. Typical problems such as
jammed or missing parts, empty bins,
etc., create a risk of personal injury or
equipment damage.
WARNING: The control program must
not be the only form of protection for
any problems that may result in a risk
of personal injury or equipment
damage.
Turn off
Saw
Jam
Detect
RST
RST
Retract
Arm
This equipment is suitable for use in Class 1, Division 2, groups A, B, C and D or
non--hazardous locations only.
WARNING: Explosion Hazard! -- Substitution of components may impair
suitability for Class 1, Division 2.
WARNING: Explosion Hazard! -- Do not disconnect equipment unless power
has been switched off or area is known to be non--hazardous.
Emergency Power
Disconnect
Orderly System
Shutdown
Class 1, Division 2
Approval
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--5
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
Mounting Guidelines
Before installing the PLC system you will need to know the dimensions for the
components. The diagrams on the following pages provide the component
dimensions to use in defining your enclosure specifications. Remember to leave
room for potential expansion.
NOTE: If you are using other components in your system, refer to the appropriate
manual to determine how those units can affect mounting dimensions.
The following information shows the proper mounting dimensions. The height
dimension is the same for all bases. The depth varies depending on your choice of
I/O module. The length varies as the number of slots increase. Make sure you have
followed the installation guidelines for proper spacing.
4.84”
123mm
4.84”
123mm
4.84”
123mm
11.41”
290mm
10.63”
270mm
15.55”
395mm
14.76”
375mm
18.30”
465mm
17.51”
445mm
3.54”
90mm
3.54”
90mm
3.54”
90mm
5 slot base
8 slot base
10 slot base
4.41”
112mm
Base Dimensions
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--6 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
It is important to design your panel properly to help ensure the DL305 products
operate within their environmental and electrical limits. The system installation
should comply with all appropriate electrical codes and standards. It is important the
system also conforms to the operating standards for the application to insure proper
performance.
1. Mount the bases horizontally to provide proper ventilation.
2. If you place more than one base in a cabinet, there should be a minimum of
7.2” (183mm) between bases.
3. Provide a minimum clearance of 2” (50mm) between the base and all sides
of the cabinet. There should also be at least 1.2” (30mm) of clearance
between the base and any wiring ducts.
4. There must be a minimum of 2” (50mm) clearance between the panel door
and the nearest DL305 component.
Earth Ground
Power
Source
Temperature
Probe
Star Washers
Panel
Ground Braid
Copper Lugs
Panel or
Single Point
Ground
Star Washers
Component
Chassis
Note: there is a minimum of 2” (50mm)
clearance between the panel door
and the nearest DL305 component.
2”
50mm
Panel Ground
Terminal
DL305 CPU Base
DL305 Local Expasion Base
BUS Bar
7.2” -- 13.75”
183 -- 350mm
2”
50mm
min.
min.
2”
50mm
min.
3”
75mm
min.
Panel Mounting
and Layout
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--7
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
5. The ground terminal on the DL305 base must be connected to a single
point ground. Use copper stranded wire to achieve a low impedance.
Copper eye lugs should be crimped and soldered to the ends of the
stranded wire to ensure good surface contact. Remove anodized finishes
and use copper lugs and star washers at termination points. A general rule
is to achieve a 0.1 ohm of DC resistance between the DL305 base and the
single point ground.
6. There must be a single point ground (i.e. copper bus bar) for all devices in
the panel requiring an earth ground return. The single point of ground must
be connected to the panel ground termination.
The panel ground termination must be connected to earth ground. For this
connection you should use #12 AWG stranded copper wire as a minimum.
Minimum wire sizes, color coding, and general safety practices should
comply with appropriate electrical codes and standards for your region.
A good common ground reference (Earth ground) is essential for proper
operation of the DL305. There are several methods of providing an
adequate common ground reference, including:
a) Installing a ground rod as close to the panel as possible.
b) Connection to incoming power system ground.
7. Properly evaluate any installations where the ambient temperature may
approach the lower or upper limits of the specifications. Place a
temperature probe in the panel, close the door and operate the system until
the ambient temperature has stabilized. If the ambient temperature is not
within the operating specification for the DL305 system, measures such as
installing a cooling/heating source must be taken to get the ambient
temperature within the DL305 operating specifications.
8. Device mounting bolts and ground braid termination bolts should be #10
copper bolts or equivalent. Tapped holes instead of nut--bolt arrangements
should be used whenever possible. To assure good contact on termination
areas impediments such as paint, coating or corrosion should be removed
in the area of contact.
9. The DL305 system is designed to be powered by 110/220 VAC, or 24 VDC
normally available throughout an industrial environment. Isolation
transformers and noise suppression devices are not normally necessary,
but may be helpful in eliminating/reducing suspect power problems.
Your selection of a proper enclosure is important to ensure safe and proper
operation of your DL305 system. Applications of DL305 systems vary and may
require additional features. The minimum considerations for enclosures include:
Conformance to electrical standards
Protection from the elements in an industrial environment
Common ground reference
Maintenance of specified ambient temperature
Access to equipment
Security or restricted access
SSufficient space for proper installation and maintenance of equipment
Enclosures
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--8 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
The following table lists the environmental specifications that generally apply to the
DL350 system (CPU, Bases, I/O Modules). The ranges that vary for the Handheld
Programmer are noted at the bottom of this chart. I/O module operation may
fluctuate depending on the ambient temperature and your application. Please refer
to the appropriate I/O module specifications for the temperature derating curves
applying to specific modules.
Specification Rating
Storage temperature -- 4 °F to 158°F(--20°Cto70°C)
Ambient operating temperature* 32°F to 131°F(0°Cto55°C)
Ambient humidity** 5% -- 95% relative humidity (non--condensing)
Vibration resistance MIL STD 810C, Method 514.2
Shock resistance MIL STD 810C, Method 516.2
Noise immunity NEMA (ICS3--304)
Atmosphere No corrosive gases
* Operating temperature for the Handheld Programmer and the DV--1000 is 32°to 122°F(0°to 50°C)
Storage temperature for the Handheld Programmer and the DV--1000 is --4°to 158°F(--20°to70°C).
**Equipment will operate below 30% humidity. However, static electricity problems occur much more frequently at
lower humidity levels. Make sure you take adequate precautions when you touch the equipment. Consider using
ground straps, anti-static floor coverings, etc. if you use the equipment in low humidity environments.
Some applications require agency approvals. Typical agency approvals which your
application may require are:
UL (Underwriters’ Laboratories, Inc.)
CSA (Canadian Standards Association)
FM (Factory Mutual Research Corporation)
SCUL (Canadian Underwriters’ Laboratories, Inc.)
American Bureau of Shipping (ABS) certification requires flame--retarding insulation
as per 4--8--3/5.3.6(a). ABS will accept Navy low smoke cables, cable qualified to
NEC “Plenum rated” (fire resistant level 4), or other similar flammablity resistant
rated cables. Use cable specifications for your system that meet a recognized flame
retardant standard (i.e. UL, IEEE, etc.), including evidence of cable test certification
(i.e. tests certificate, UL file number, etc.).
NOTE: Wiring needs to be “low smoke” per the above paragraph. Teflon coated wire
is also recommended.
Environmental
Specifications
Agency Approvals
Marine Use
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--9
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
The power source must be capable of supplying voltage and current complying with
the base power supply specifications.
Specifications D 3 -- 0 5 B -- 1 D3--05BDC--1 D 3 -- 0 8 B -- 1 D 3 -- 1 0 B -- 1
Input Voltage Range\ 85--264 VAC
47--63Hz 20.5--30 VDC <10%
ripple 85--264 VAC
47--63Hz 85--264 VAC
47--63Hz
Base Power Consumption 85 VA max 48 Watts 85 VA max 85 VA max
Inrush Current max. 30A 30A 30A 30A
Dielectric Strength 1500VAC for 1
minute between
terminals of AC P/S,
Run output,
Common, 24VDC
1500VAC for 1
minute between
24VDC input
terminals and Run
output
1500VAC for 1
minute between
terminals of AC P/S,
Run output,
Common, 24VDC
2000VAC for 1
minute between
terminals of AC P/S,
Run output,
Common, 24VDC
Insulation Resistance >10MΩat 500VDC >10MΩat 500VDC >10MΩat 500VDC >10MΩat 500VDC
Power Supply Output
(Voltage Ranges and
Ripple)
(5VDC) 4.75--5.25V
less than 0.25V p--p
(9VDC) 8.0--10.0V
less than 0.45 V p--p
(24VDC) 20--28V
less than 1.2V p--p
(5VDC) 4.75--5.25V
less than 0.25V p--p
(9VDC) 8.5--13.5V
less than 0.45 V p--p
(24VDC) 20--28V
less than 1.2V p--p
(5VDC) 4.75--5.25V
less than 0.25V p--p
(9VDC) 8.0--10.0V
less than 0.45 V p--p
(24VDC) 20--28V
less than 1.2V p--p
(5VDC) 4.75--5.25V
less than 0.25V p--p
(9VDC) 8.0--10.0V
less than 0.45 V p--p
(24VDC) 20--28V
less than 1.2V p--p
Power
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--10 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
Before installing your PLC system you will need to know the dimensions for the
components in your system. The diagrams on the following pages provide the
component dimensions and should be used to define your enclosure specifications.
Remember to leave room for potential expansion. Appendix E provides the weights
for each component.
NOTE: If you are using other components in your system, make sure you refer to the
appropriate manual to determine how those units can affect mounting dimensions.
(130mm)
5.12 ”
(125mm)
4.92 ”
(34mm)
1.34 ”
(72mm)
2.83 ”
(26mm)
1.03 ”
(67mm)
2.64 ”
D
i
r
ec
t
V
IEW 1000
4”
9.5”
Note: Space allowance should be made behind
the panel for the serial cable, and power
connector. If you will be adding or removing
panels for a multi-drop, then you may want to
allow for hand room to reach the address switch
on the back. We recommend 4 inches.
0.5”
1.75”
3.5”
2”
8.4”
Optimation Units
(Large panel rear view shown)
(241.3mm)
(50.8mm) (101.6m
m
(213.3mm)
(88.9mm)
(44.5mm)
(12.7mm)
Handheld programmer cable
1.37”
34.8mm 4.65”/118nn -- 8 I/O Pts
4.86”/123mm -- 16 I/O Pts
3.86”
98mm
1.37”
34.8mm 3.86”
98mm
4.84”
123mm
2.00”
51mm
2.06”
52.4mm
1.85”
47mm
0.4”
10.3mm
0.51”
13mm
I/O modules
I/O module w/24 pin connector
24 pin connector
4.67”
118.6mm
.55”
14mm
Component
Dimensions
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--11
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
Installing DL305 Bases
The DL305 system offers three different sizes of bases and two different power
supply options.
The following diagram shows an example of a 5-slot base.
Power Wiring
Connections
CPU Slot
I/O Slots
Your choice of base depends on three things.
Number of I/O modules required
Input power requirement (AC or DC power)
SAvailable power budget
All I/O configurations of the DL305 may use any of the base configurations. The
bases are secured to the equipment panel or mounting location using four M4
screws in the corner mounting cut--outs of the base. The full mounting dimensions
are given in the previous section on Mounting Guidelines.
Mounting Slots
WARNING: To minimize the risk of electrical shock, personal injury, or
equipment damage, always disconnect the system power before installing or
removing any system component.
Choosing the Base
Type
Mounting the Base
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--12 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
Installing Components in the Base
When inserting components into the base, align the PC board(s) of the module with
the grooves on the top and bottom of the base. Push the module straight into the
base until it is firmly seated in the backplane connector. Once the module is inserted
into the base, push in the retaining clips (located at the top and bottom of the module)
to firmly secure the module to the base.
Align module to
slots in base and slide in
CPU must be positioned in
the first slot of the base
WARNING: Minimize the risk of electrical shock, personal injury, or equipment
damage, always disconnect the system power before installing or removing
any system component.
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--13
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
Base Wiring Guidelines
The diagram shows the terminal connections located on the power supply of the
DL305 xxxxx--1 bases. The base terminals can accept up to 16 AWG.
NOTE: You can connect either a 115 VAC or 220 VAC supply to the AC
terminals. Special wiring or jumpers are not required as with some of the other
DirectLOGICproducts.
110/220 VAC Base Terminal Strip
230 VAC
G
24 VDC OUT
24 VDC Base Terminal Strip
24 VDC
G
--
+
--
+
RUN
115 VAC
RUN
LG LG
Logic Ground
Frame Ground
WARNING: Once the power wiring is connected, install the plastic protective
cover. When the cover is removed there is a risk of electrical shock if you
accidentally touch the wiring or wiring terminals.
The following example illustrates connections when using Expansion bases.
110VAC 220VAC 24VDC +
--
24VDC +
--
24VDC +
--
220VAC
220VAC
110VAC
110VAC
110VAC 220VAC 24VDC
+--
Local CPU
Expansion
Base 1
Expansion
Base 2
Local CPU
Expansion
Base 1
Expansion
Base 2
Local CPU
Expansion
Base 1
Expansion
Base 2
Line Neutral Line Neutral
Base Wiring
Expansion Base
Wiring
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--14 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
I/O Wiring Strategies
The DL305 PLC system is very flexible and will work in many different wiring
configurations. By studying this section before actual installation, you can probably
find the best wiring strategy for your application . This will help to lower system cost,
wiring errors, and avoid safety problems.
PLC circuitry is divided into three main regions separated by isolation boundaries,
shown in the drawing below. Electrical isolation provides safety, so that a fault in one
area does not damage another. A transformer in the power supply provides
magnetic isolation between the primary and secondary sides. Opto-couplers
provide optical isolation in Input and Output circuits. This isolates logic circuitry from
the field side, where factory machinery connects. Note the discrete inputs are
isolated from the discrete outputs, because each is isolated from the logic side.
Isolation boundaries protect the operator interface (and the operator) from power
input faults or field wiring faults. When wiring a PLC, it is extremely important to avoid
making external connections that connect logic side circuits to any other.
CPU
Input
Module
Main
Power
Supply
Inputs
Outputs
Power Input
Output
Module
Primary Side Secondary, or
Logic side
Field Side
PLC
Programming Device,
Operator Interface, or Network
Isolation
Boundary Isolation
Boundary
(backplane)
(backplane)
The next figure shows the physical layout of a DL305 PLC system, as viewed from
the front. In addition to the basic circuits covered above, AC-powered bases include
an auxiliary +24VDC power supply with its own isolation boundary. Since the supply
output is isolated from the other three circuits, it can power input and/or output
circuits!
Input Module
CPU
Comm.
Main
Power
Supply
Auxiliary
+24VDC
Supply
To Programming
Device, Operator
Inputs Commons CommonsOutputs
+24VDC Out
Power Input
PLC
DL305
Interface, Network
Output Module
Internal Backplane
Supply for
Output Circuit
Primary Side Secondary, or
Logic side
Field Side
PLC Isolation
Boundaries
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--15
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
In some cases, using the built-in auxiliary +24VDC supply can result in a cost
savings for your control system. It can power combined loads up to 100 mA. Be
careful not to exceed the current rating of the supply. If you are the system designer
for your application, you may be able to select and design in field devices which can
use the +24VDC auxiliary supply.
All AC powered DL305 bases feature the internal auxiliary supply. If input devices
AND output loads need +24VDC power, the auxiliary supply may be able to power
both circuits as shown in the following diagram.
Input Module
Auxiliary
+24VDC
Supply
Power Input DL305 PLC
Output Module
Loads
AC Power
+--
Inputs Com. Outputs Com.
DC-powered DL305 bases are designed for application environments in which
low-voltage DC power is more readily available than AC. These include a wide range
of battery--powered applications, such as remotely-located control, in vehicles,
portable machines, etc. For this application type, all input devices and output loads
typically use the same DC power source. Typical wiring for DC-powered applications
is shown in the following diagram.
Input Module
Power Input
DL305 PLC
Output Module
Loads
DC Power
+
--
+
--
Inputs Com. Outputs Com.
Powering I/O
Circuits with the
Auxiliary Supply
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--16 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
In most applications it will be necessary to power the input devices from one power
source, and to power output loads from another source. Loads often require
high-energy AC power, while input sensors use low-energy DC. If a machine
operator is likely to come in close contact with input wiring, then safety reasons also
require isolation from high-energy output circuits. It is most convenient if the loads
can use the same power source as the PLC, and the input sensors can use the
auxiliary supply, as shown to the left in the figure below.
If the loads cannot be powered from the PLC supply, then a separate supply must be
used as shown to the right in the figure below.
Input Module
Auxiliary
+24VDC
Supply
Power Input DL305 PLC
Output Module
Loads
AC Power
+--
Inputs Com. Outputs Com.
Input Module
Auxiliary
+24VDC
Supply
Power Input DL305 PLC
Output Module
Loads
AC Power
+--
Inputs Com. Outputs Com.
Load
Supply
Some applications will use the PLC external power source to also power the input
circuit. This typically occurs on DC-powered PLCs, as shown in the drawing below to
the left. The inputs share the PLC power source supply, while the outputs have their
own separate supply.
A worst-case scenario, from a cost and complexity view-point, is an application
which requires separate power sources for the PLC, input devices, and output loads.
The example wiring diagram below on the right shows how this can work, but also
the auxiliary supply output is an unused resource. You will want to avoid this situation
if possible.
Input Module
Power Input
DL305 PLC
Output Module
Loads
DC Power
+
--
+
--
Inputs Com. Outputs Com.
Load
Supply
Input Module
Auxiliary
+24VDC
Supply
Power Input DL305 PLC
Output Module
Loads
AC Power
+--
Inputs Com. Outputs Com.
Load
Supply
Input
Supply
Powering I/O
Circuits Using
Separate Supplies
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--17
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
Before going further in the study of wiring strategies, you must have a solid
understanding of “sinking” and “sourcing” concepts. Use of these terms occurs
frequently in input or output circuit discussions. It is the goal of this section to make
these concepts easy to understand, further ensuring your success in installation.
First the following short definitions are provided, followed by practical applications.
Sinking = provides a path to supply ground (--)
Sourcing = provides a path to supply source (+)
First you will notice these are only associated with DC circuits and not AC, because
of the reference to (+) and (--) polarities. Therefore, sinking and sourcing terminology
only applies to DC input and output circuits. Input and output points that are sinking
or sourcing only can conduct current in only one direction. This means it is possible
to connect the external supply and field device to the I/O point with current trying to
flow in the wrong direction, and the circuit will not operate. However, you can
successfully connect the supply and field device every time by understanding
“sourcing” and “sinking”.
For example, the figure to the right depicts
a “sinking” input. To properly connect the
external supply, you will have to connect it
so the input provides a path to ground (--).
Start at the PLC input terminal, follow
through the input sensing circuit, exit at
the common terminal, and connect the
supply (--) to the common terminal. By
adding the switch, between the supply (+)
and the input, the circuit has been
completed . Current flows in the direction
of the arrow when the switch is closed.
+
--
Input
Sensing
PLC
Input
Common
(sinking)
By applying the circuit principle above to the four possible combinations of
input/output sinking/sourcing types as shown below. The I/O module specifications
at the end of this chapter list the input or output type.
+
--
Input
Sensing
Load
Sinking Input Sinking Output
Sourcing Input Sourcing Output
PLC
Input
Common
+
--
Output
Switch
PLC Output
Common
+
--
Input
Sensing
Load
PLC
Input
Common
+
--
Output
Switch
PLC
Output
Common
Sinking / Sourcing
Concepts
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--18 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
In order for a PLC I/O circuit to operate,
current must enter at one terminal and exit
at another. Therefore, at least two
terminals are associated with every I/O
point. In the figure to the right, the Input or
Output terminal is the main path for the
current. One additional terminal must
provide the return path to the power
supply.
+
--
I/O
Circuit
PLC
(I/O Point)
Return Path
Field
Device Main Path
If there was unlimited space and budget
for I/O terminals, every I/O point could
have two dedicated terminals as the figure
above shows. However, providing this
level of flexibility is not practical or even
necessary for most applications.
Therefore, most Input or Output points on
PLCs are in groups which share the return
path (called commons). The figure to the
right shows a group (or bank) of 4 input
points which share a common return path.
In this way, the four inputs require only five
terminals instead of eight.
+
--
Input
Sensing
PLC
Input 4
Common
Input 3
Input 2
Input 1
NOTE: In the circuit above, the current in the common path is 4 times any channel’s
input current when all inputs are energized. This is especially important in output
circuits, where heavier gauge wire is sometimes necessary on commons.
I/O “Common”
Terminal Concepts
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--19
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
In the previous section on Sourcing and Sinking concepts, the DC I/O circuits were
explained to sometimes will only allow current to flow one way. This is also true for
many of the field devices which have solid-state (transistor) interfaces. In other
words, field devices can also be sourcing or sinking. When connecting two devices
in a series DC circuit, one must be wired as sourcing and the other as sinking.
Several DL305 DC input modules are flexible because they detect current flow in
either direction, so they can be wired as either sourcing or sinking. In the following
circuit, a field device has an open-collector NPN transistor output. It sinks current
from the PLC input point, which sources current. The power supply can be the +24
auxiliary supply or another supply (+12 VDC or +24VDC), as long as the input
specifications are met.
Field Device
+--
PLC DC Input
Output
Ground
Input
Common
Supply
(sinking) (sourcing)
In the next circuit, a field device has an open-emitter PNP transistor output. It
sources current to the PLC input point, which sinks the current back to ground. Since
the field device is sourcing current, no additional power supply is required.
Field Device
PLC DC Input
Output (sourcing)
Ground
Input
Common
+V
(sinking)
Sometimes an application requires connecting a PLC output point to a solid state
input on a device. This type of connection is usually made to carry a low-level control
signal, not to send DC power to an actuator.
Several of the DL305 DC output modules are the sinking type. This means that each
DC output provides a path to ground when it is energized. In the following circuit, the
PLC output point sinks current to the output common when energized. It is
connected to a sourcing input of a field device input.
Field Device
Output
Ground
Input
Common
+V
PLC DC Sinking Output
+DC pwr
+
--
(sourcing)
(sinking)
Power
10--30 VDC
Connecting DC I/O
to “Solid State”
Field Devices
Solid State
Input Sensors
Solid State
Output Loads
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--20 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
In the next example a PLC sinking DC output point is connected to the sinking input
of a field device. This is tricky, because both the PLC output and field device input are
sinking type. Since the circuit must have one sourcing and one sinking device, a
sourcing capability needs to be added to the PLC output by using a pull-up resistor.
In the circuit below, a Rpull-up is connected from the output to the DC output circuit
power input.
Field Device
Output
Ground
Input
Common
PLC DC Output
+DC pwr
+
--
(sourcing)
(sinking)
Power
(sinking)
Rpull-up
Supply
input
R
NOTE 1: DO NOT attempt to drive a heavy load (>25 mA) with this pull-up method
NOTE 2: Using the pull-up resistor to implement a sourcing output has the effect of
inverting the output point logic. In other words, the field device input is energized
when the PLC output is OFF, from a ladder logic point-of-view. Your ladder program
must comprehend this and generate an inverted output. Or, you may choose to
cancel the effect of the inversion elsewhere, such as in the field device.
It is important to choose the correct value of R pull-up. In order to do so, you need to
know the nominal input current to thefield device (Iinput) when the input is energized.
If this value is not known, it can be calculated as shown (a typical value is 15 mA).
Then use I input and the voltage of the external supply to compute R pull-up.Then
calculate the power Ppull-up (in watts), in order to size Rpull-up properly.
pull-up
Rinput
R
=supply
V-- 0 . 7 --
input
I
input
I=input (turn--on)
V
input
R
pull-up
P=supply
V2
pullup
R
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--21
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
Four output modules in the DL305 I/O family feature relay outputs: D3--08TR,
F3--08TRS--1, F3--08TRS--2, D3--16TR. Relays are best for the following
applications:
Loads that require higher currents than the solid-state outputs can
deliver
Cost-sensitive applications
Some output channels need isolation from other outputs (such as when
some loads require different voltages than other loads)
Some applications in which NOT to use relays:
Loads that require currents under 10 mA
SLoads which must be switched at high speed or heavy duty cycle
Relay outputs in the DL305 output
modules are available in two contact
arrangements, shown to the right. The
Form A type, or SPST (single pole, single
throw) type is normally open and is the
simplest to use. The Form C type, or
SPDT (single pole, double throw) type has
a center contact which moves and a
stationary contact on either side. This
provides a normally closed contact and a
normally open contact.
Some relay output module’s relays share
common terminals, which connect to the
wiper contact in each relay of the bank.
Other relay modules have relays which
are completely isolated from each other. In
all cases, the module drives the relay coil
when the corresponding output point is on.
Relay with Form A contacts
Relay with Form C contacts
Inductive load devices (devices with a coil) generate transient voltages when
de-energized with a relay contact. When a relay contact is closedit “bounces”, which
energizes and de-energizes the coil until the “bouncing” stops. The transient
voltages generated are much larger in amplitude than the supply voltage, especially
with a DC supply voltage.
When switching a DC-supplied inductive load the full supply voltage is always
present when the relay contact opens (or “bounces”). When switching an
AC-supplied inductive load there is one chance in 60 (60 Hz) or 50 (50 Hz) that the
relay contact will open (or “bounce”) when the AC sine wave is zero crossing. If the
voltage is not zero when the relay contact opens there is energy stored in the
inductor that is released when the voltage to the inductor is suddenly removed. This
release of energy is the cause of the transient voltages.
When inductive load devices (motors, motor starters, interposing relays, solenoids,
valves, etc.) are controlled with relay contacts, it is recommended that a surge
suppression device be connected directly across the coil of the field device. If the
inductive device has plug-type connectors, the suppression device can be installed
on the terminal block of the relay output.
Relay Output
Guidelines
Surge Suppresion
For Inductive
Loads
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--22 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
Transient Voltage Suppressors (TVS or transorb) provide the best surge and
transient suppression of AC and DC powered coils, providing the fastest response
with the smallest overshoot.
Metal Oxide Varistors (MOV) provide the next best surge and transient
suppression of AC and DC powered coils.
+24 VDC -- 2 4 V D C
Module Relay Contact
--324 VDC
+24 VDC
For example, the waveform in the figure below shows the energy released when
opening a contact switching a 24 VDC solenoid. Notice the large voltage spike.
This figure shows the same circuit with a transorb (T
V
S) across the coil. Notice that
the voltage spike is significantly reduced.
+24 VDC -- 2 4 V D C
Module Relay Contact
-- 4 2 V D C
+24 VDC
Use the following table to help select a TVS or MOV suppressor for your application
based on the inductive load voltage.
hhVendor / Catalog Type (TVS, MOV, Diode) Inductive Load Voltage Part Number
AutomationDirect
Transient Voltage
Suppressors,
LiteOn Diodes; from
DigiKey Catalog: Phone
1--800--344--4539
TVS
TVS
TVS
Diode
110/120 VAC
24 VDC
220/240 VAC
12/24 VDC or VAC
12/24 VDC
ZL--TD8--120
ZL--TD8--24
P6K350CA
Contact
Digi--key Corp.
Digi--key
www.didikey.com
MOV
MOV
110/120 VAC
220/240 VAC
Contact Digi--key Corp.
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--23
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
Relay contacts wear according to the amount of relay switching, amount of spark
created at the time of open or closure, and presence of airborne contaminants.
There are some steps you can take to help prolong the life of relay contacts, such as
switching the relay on or off only when it is necessary, and if possible, switching the
load on or off at a time when it will draw the least current. Also, take measures to
suppress inductive voltage spikes from inductive DC loads such as contactors and
solenoids.
For inductive loads in DC circuits we recommend using a suppression diode as
shown in the following diagram (DO NOT use this circuit with an AC power supply).
When the load is energized the diode is reverse-biased (highimpedance). When the
load is turned off, energy stored in its coil is released in the form of a negative-going
voltage spike. At this moment the diode is forward-biased (low impedance) and
shunts the energy to ground. This protects the relay contacts from the high voltage
arc that would occur just as the contacts are opening.
Place the diode as close to the inductive field device as possible. Use a diode with a
peak inverse voltage rating (PIV) at least 100 PIV, 3A forward current or larger. Use a
fast-recovery type (such as Schottky type). DO NOT use a small-signal diode such
as 1N914, 1N941, etc. Be sure the diode is in the circuit correctly before operation. If
installed backwards, it short-circuits the supply when the relay energizes.
Inductive Field Device
+--
PLC Relay Output
Output
Common
Input
Common
Supply
Prolonging Relay
Contact Life
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--24 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
I/O Modules Position, Wiring, and Specification
The DL305 bases each provide different numbers of slots for use with the I/O
modules. You may notice the bases refer to 5-slot, 8-slot, etc. One of the slots is
dedicated to the CPU, so you always have one less I/O slot. For example, you have
four I/O slots with a 5-slot base. The I/O slots are numbered 0 -- 3. The CPU slot
always contains a CPU and is not numbered.
The examples below show the I/O numbering for a 5 slot local CPU base with 8 point
I/Oanda5slotlocalCPUbasewith16pointI/Ousingthexxxxx--1 bases.
C
P
U
DL305
5 Slot Base Using 8 Point I
/
O Modules
C
P
U
000
to
007
010
to
017
020
to
027
060
to
067
to
037
050
to
057
070
to
077
DL305
5 Slot Base Using 16 Point I
/
O Modules
Slot Number: 32 10
Slot Number: 32 10
030
040
047
to
000020060 040
tototo to
007027067 047
There are some limitations that determine where you can place certain types of
modules. Some modules require certain locations and may limit the number or
placement of other modules. If you have difficulty with some of the explanations,
please look ahead to the illustrations in this chapter. They should clear up any gray
areas in the explanation and you will probably find the configuration you intend to
use in your installation.
In all of the configurations mentioned the number of slots from the CPU that are to be
used can roll over into an expansion base if necessary. For example if a rule states a
module must reside in one of the six slots adjacent to the CPU, and the system
configuration is comprised of two 5 slot bases, slots 1 and 2 of the expansion base
are valid locations.
The following table provides the general placement rules for the DL305
components.
Module Restriction
CPU The CPU must reside in the first slot of the local CPU
base. The first slot is the closest slot to the power supply.
16 Point I/O
Modules Any slot.
Analog Modules Analog modules must reside in any valid 16 point I/O slot.
ASCII Basic
Modules ASCII Basic modules must reside in any valid 16 point I/O
slot.
High Speed
Counter The D3--350 CPU does not support a high speed counter
module.
Slot Numbering
I/O Module
Placement Rules
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--25
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
The discrete modules provide LED status indicators to show status of input points.
The DL305 family of I/O modules have a color coding scheme to help you quickly
identify if a module is either an input module, output module, or a specialty module.
This is done through a color bar indicator located on the front of each module. The
color scheme is listed below:
Module Type
Discrete/Analog Output
Discrete/Analog Input
Other
Color Code
Red
Blue
White
Color Bar
0
1
2
3
4
5
6
7
110VAC INPUT
D3--16NA
6
C
1
3
I
0
2
4
5
7
7
0
2
4
C
1
3
5
6
II
0
1
2
3
4
5
6
7
III
Status Indicators
There are three types of module connectors for the DL305 I/O. Some modules have
normal screw terminal connectors. Other modules have connectors with recessed
screws. The recessed screws help minimize the risk of someone accidentally
touching active wiring. The third type has a D--shell connector for special cable
connections.
Both types of screw connectors can be easily removed. If you examine the
connectors closely, you will notice there are squeeze tabs on the top and bottom. To
remove the terminal block, press the squeeze tabs and pull the terminal block away
from the module.
We also have DIN rail mounted terminal blocks, DINnectors (refer to our catalog for a
complete listing of all available products). The DINnectors come with special
pre--assembled cables with the I/O connectors installed and wired.
WARNING: For some modules, field device power may still be present on the
terminal block even though the PLC system is turned off. To minimize the risk
of electrical shock, check all field device power before you remove the
connector.
Squeeze Tab
Removable Cover
Squeeze Tab
Removable
Terminal Block
D--shell
Connector
Discrete Module
Status Indicators
Color Coding of I/O
Modules
Wiring the Different
Module
Connectors
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--26 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
Use the following guidelines when wiring the I/O modules in your system.
1. There is a limit to the size of wire the modules can accept. The table below
lists the maximum AWG for each module type. Smaller AWG is acceptable
to use for each of the modules.
Module type Maximum AWG
8 point 12 AWG
16 point 16 AWG
2. Always use a continuous length of wire, do not combine wires to attain a
needed length.
3. Use the shortest possible wire length.
4. Use wire trays for routing where possible.
5. Avoid running wires near high energy wiring.
6. Avoid running input wiring close to output wiring where possible.
7. To minimize voltage drops when wires must run a long distance , consider
using multiple wires for the return line.
8. Avoid running DC wiring in close proximity to AC wiring where possible.
9. Avoid creating sharp bends in the wires.
10. To reduce the risk of having a module with a blown fuse, we suggest you
add external fuses to your I/O wiring. A fast blow fuse, with a lower current
rating than the I/O module fuse can be added to each common, or a fuse
with a rating of slightly less than the maximum current per output point can
be added to each output. Refer to our catalog for a complete line of
DINnectors, DIN rail mounted fuse blocks.
DINnector External Fuses
(DIN rail mounted Fuses)
NOTE: For modules which have soldered or non-replaceable fuses, we recommend
you return your module to us and let us replace your blown fuse(s) since
disassembling the module will void your warranty.
I/O Wiring
Checklist
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--27
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
Glossary of Specification Terms
Indicates number of input or output points per module and designates current
sinking, current sourcing, or either.
Number of commons per module and their electrical characteristics.
The operating voltage range of the input circuit.
The operating voltage range of the output circuit.
Maximum voltage allowed for the input circuit.
AC modules are designed to operate within a specific frequency range.
The voltage level at which the input point will turn ON.
The voltage level at which the input point will turn OFF.
Input impedance can be used to calculate input current for a particular operating
voltage.
Typical operating current for an active (ON) input.
The minimum current for the input circuit to operate reliably in the ON state.
The maximum current for the input circuit to operate reliably in the OFF state.
The minimum load current for the output circuit to operate properly.
Some output modules require external power for the output circuitry.
Sometimes called “saturation voltage”, it is the voltage measured from an output
point to its common terminal when the output is ON at max. load.
The maximum current a connected maximum load will receive when the output point
is OFF.
The maximum current used by a load for a short duration upon an OFF to ON
transition of a output point. It is greater than the normal ON state current and is
characteristic of inductive loads in AC circuits.
Power from the base power supply is used by the DL305 input modules and varies
between different modules. The guidelines for using module power is explained in
the power budget configuration section in Chapter 4--5.
Inputs or Outputs
Per Module
Commons Per
Module
Input Voltage
Range
Output Voltage
Range
Peak Voltage
AC Frequency
ON Voltage Level
OFF Voltage Level
Input Impedance
Input Current
Minimum ON
Current
Maximum OFF
Current
Minimum Load
External DC
Required
ON Voltage Drop
Maximum Leakage
Current
Maximum Inrush
Current
Base Power
Required
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--28 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
The time the module requires to process an OFF to ON state transition.
The time the module requires to process an ON to OFF state transition.
Indicates whether the terminal type is a removable or non-removable connector or a
terminal.
The LEDs that indicate the ON/OFF status of an input point. These LEDs are
electrically located on either the logic side or the field device side of the input circuit.
Indicates the weight of the module. See Appendix E for a list of the weights for the
various DL305 components.
Protective device for an output circuit, which stops current flow when current
exceeds the fuse rating. They may be replaceable or non--replaceable, or located
externally or internally.
OFFtoON
Response
ON to OFF
Response
Terminal Type
Status Indicators
Weight
Fuses
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--29
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--08ND2, 24 VDC Input Module
Inputs per module 8 (current sourcing) Base power required 9V 10 mA Max
2
4
V
1
4
A
/
O
N
t
Commons per module 2(internally connected)
p
q
24
V
14m
A
/
ON pt.
(
1
1
2
m
A
M
a
x
)
Input voltage range 18--36VDC
(
1
1
2
m
A
M
a
x
)
Input voltage Internally supplied OFF to ON response 4--15 ms
Peak voltage 40 VDC ON to OFF response 4--15 ms
AC frequency N/A Terminal type Non--removable
ON voltage level <3V Status indicators Field side
OFF voltage level >18 V Weight 4.2 oz. (120 g)
Input impedance 1.8 K ohm
Input current 12 mA Max
Minimum ON current 7mA
Maximum OFF current 3mA
0
1
2
3
4
5
6
7
0
2
4
6
C
1
1
3
5
7
C
2
24VDC INPUT
D3--08ND2
C1
01
23
45
67
C2
Internallly
Connected
Input
Common
Optical
Coupler
24VDC
-- +
1.8k
Other 7
Circuits
Derating Chart for D3--08ND2
0
2
4
6
8
Points
9V
0 102030405060
Ambient Temperature (°C/°F)
32 50 68 86 104 122 140C°F°
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--30 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--16ND2--1, 24 VDC Input Module
Inputs per module 16 (current sourcing) Base power required 9V 25 mA Max
2
4
V
1
4
A
/
O
N
t
Commons per module 2(internally connected)
p
q
24
V
14m
A
/
ON pt.
(
2
2
4
m
A
M
a
x
)
Input voltage range 18--36VDC
(
2
2
4
m
A
M
a
x
)
Input voltage Internally supplied OFF to ON response 3--15 ms
Peak voltage 36VDC ON to OFF response 4--15 ms
AC frequency N/A Terminal type Removable
ON voltage level <3V Status indicators Field side
OFF voltage level >19 V Weight 6.3 oz. (180 g)
Input impedance 1.8 K ohm
Input current 20 mA Max
Minimum ON current 5mA
Maximum OFF current 1mA
Derating Chart for D3--16ND2--1
0
4
8
12
16
Points
0
1
2
3
4
5
6
7
24VDC INPUT
D3--16ND2--1
6
C
1
3
I
0
2
4
5
7
7
0
2
4
C
1
3
5
6
II
0
1
2
3
4
5
6
7
III
CI
CII
6
1
3
0
2
4
5
7
7
0
2
4
1
3
5
6
1.5k
24VDC
Common
Common
Common
Optical
Coupler
1.8k
Other 15
Circuits
-- +
0.1μF
Internally
Connected
Input
9V
0 102030405060
Ambient Temperature (°C/°F)
32 50 68 86 104 122 140C°F°
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--31
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--16ND2--2, 24 VDC Input Module Module
Inputs per module 16 (current sourcing) Base power required 9V 3mA+1.3mA/ON pt
(
2
4
A
M
)
Commons per module 8 internally connected
p
q
p
(24 m
A
Ma
x
)
2
4
V
1
m
A
+
1
3
m
A
/
O
N
p
t
Input voltage range 18--36 VDC
2
4
V
1
m
A
+
1
3
m
A
/
O
N
pt
(
2
0
9
m
A
M
a
x
)
Input voltage Internally supplied
(
2
0
9
m
A
M
a
x
)
Peak voltage 36 VDC OFF to ON response 4--15 ms
AC frequency N/A ON to OFF response 4--15 ms
ON voltage level <3V Terminal type 24 Pin Removable
t
OFF voltage level >19V
y
p
connector
Input impedance 2.2 K ohm Status indicators Field side
Input current 20 mA Max Weight 5.3 oz. (150 g)
Minimum ON current 5mA
Maximum OFF current 2mA
680
Derating Chart for D3--16ND2--2
0
4
8
12
16
Points
DC GRND
0
1
2
3
4
5
6
7
24VDC INPUT
D3--16ND2--2
6
C
A
0
2
4
7
C
B
1
3
5
I
C C
6
C
0
2
4
7
C
1
3
5
C C
0
1
2
3
4
5
6
7
II
I
II
6
A
0
2
4
7
B
1
3
5
6
0
2
4
7
1
3
5
C
1
12
C
Internally
Connected
DC GRND
2.2K
24VDC
Common Optical
Coupler
-- +
Input
Internal
Power
Supply
9V
0 102030405060
Ambient Temperature (°C/°F)
32 50 68 86 104 122 140C°F°
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--32 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--16ND2F, 24 VDC Fast Response Input Module
Inputs per module 16 (current sourcing) Base power required 9V 25 mA Max
2
4
V
1
4
A
/
O
N
t
Commons per module 2(internally connected)
p
q
24
V
14 m
A
/
ON pt.
(
2
2
4
m
A
M
a
x
)
Input voltage range 18--36VDC
(
2
2
4
m
A
M
a
x
)
Input voltage Internally supplied OFF to ON response 0.8 ms
Peak voltage 36VDC ON to OFF response 0.8 ms
AC frequency N/A Terminal type Removable
ON voltage level < 13V Status indicators Field side
OFF voltage level >19 V Weight 6.3 oz. (180 g)
Input impedance 1.8 K ohm
Input current 20 mA Max
Minimum ON current 5mA
Maximum OFF current 1mA
Derating Chart for D3--16ND2F
0
4
8
12
16
Points
0
1
2
3
4
5
6
7
24VDC INPUT
D3--16ND2F
6
C
1
3
I
0
2
4
5
7
7
0
2
4
C
1
3
5
6
II
0
1
2
3
4
5
6
7
III
CI
CII
6
1
3
0
2
4
5
7
7
0
2
4
1
3
5
6
1.5k
24VDC
Common
Common
Common
Optical
Coupler
1.8k
Other 15
Circuits
-- +
0.1μF
Internally
Connected
Input
9V
0 102030405060
Ambient Temperature (°C/°F)
32 50 68 86 104 122 140C°F°
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--33
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
F3--16ND3F, TTL/24 VDC Fast Response Input Module
Inputs per module 16 sink/source
(jumper selectable sink/ Base power required 9V 148 mA Max
24V 68 mA Max
(
j
u
p
e
s
e
e
c
a
b
e
s
/
source)* Input current 1mA@5VDC
3 mA @ 12--24 DC
Commons per module 2 (non-isolated) Input impedance 4.7K
Input voltage range 5 VDC TTL & CMOS,
1
2
-
-
2
4
V
D
C
OFF to ON response 1ms
1
2
--
2
4
V
D
C
(jumper selectable)* ON to OFF response 1ms
Input voltage supplied Internal (used with sink-
i
n
g
l
o
a
d
s
)
Maximum input rate 500 Hz
i
ng
l
oa
d
s
)
External (used with
sourcing loads)
Minimum ON current 0.4 mA @ 5VDC
0.9 mA @ 12--24VDC
Peak voltage 100 VDC
(35 VDC Continuous) Maximum OFF current 0.8 mA @ 5VDC
2.2 mA @ 12--24VDC
AC frequency N/A Terminal type Removable
ON voltage level 0--1.5VDC @ 5VDC
0--4VDC @ 12--24VDC Status indicators Logic side
OFF voltage level 3.5--5VDC @ 5VDC
10--24VDC @12--24VDC Weight 5.4 oz. (153 g)
Derating Chart for F3--16ND3F
0
4
8
12
16
Points
0
1
2
3
4
5
6
7
TTL/24VDC INPUT
F3--16ND3F
6
1
3
I
0
2
4
5
7
7
0
2
4
C
1
3
5
6
II
0
1
2
3
4
5
6
7
III
CI
CII
6
1
3
0
2
4
5
7
7
0
2
4
1
3
5
6
Common
Common
Internally
Connected
O
M
C
O
M
* 12 Inputs are jumper selectable for
5VDC/12--24VDC and Sink Load/Source
Load
4 Inputs are jumper selectable for
5VDC/12--24VDC and Sink Load/Source
Load
10 30 50
0 204060
Ambient Temperature (°C/°F)
32 50 68 86 104 122 140C°F°
Sinking Load Configuration
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--34 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
Common
Input
5VDC
-- +
15VDC
-- +
Source Sink
+V
To other 12
or 4 circuits
4.7k
TTL
12-24
VDC
Optical
Coupler
+VCC
Common
Input
5VDC
-- +
15VDC
-- +
Source Sink
+V
To other 12
or 4 circuits
4.7k
TTL
12-24
VDC
Optical
Coupler
+VCC
12-24
VDC
Jumper selected for 12--24VDC, sinking load configuration
Jumper selected for sourcing load configuration. An external power supply must be used in this configuration.
Internal
Power
Sources
Internal
Power
Sources
The DC power to sense the state of the inputs when jumpers are installed for sinking
type signals is provided by the rack power supply. Sinking type inputs are turned ON
by switching the input circuit to common. Source type input signals assume the ON
state until the input device provides the voltage to turn the input OFF.
The mode of operation, either 5VDC or 12--24VDC sink or source, for each group of
circuits is determined by the position of jumper plugs on pins located on the edge of
the circuit board. There are four sets of pins (3 pins in each set), with two sets for
each group of inputs. The first two sets of pins are used to configure the first 12 inputs
(eg. 0 to 7 and 100 to 103) and are labeled 12 CIRCUITS. Above the first set of pins
are the labels 12/24V and 5V. Above the second set of pins are the labels SINK and
SRC (source). To select an operating mode for the first 12 circuits, place a jumper on
the two pins nearest the appropriate labels. For example, to select 24VDC Sink input
operation for the first 12 inputs, place a jumper on the two pins labeled 12/24V and on
the two pins labeled SINK. The last two sets of pins are used to configure the last 4
inputs (eg. 104 to 107) and are labeled 4 CIRCUITS. The operating mode selected
for the last group of 4 inputs can be different than the mode chosen for the first group
of 12 inputs. Correct module operation requires each set of three pins have a jumper
installed (four jumpers total).
NOTE:When a group of inputs are used with TTL logic, select the SINK operating
mode for that group. “Standard” TTL can sink several milliamps but can source less
than1mA.
Selection of
Operating Mode
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--35
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--08NA--1, 110 VAC Input Module
Inputs per module 8Minimum ON current 8mA
Commons per module 2 (isolated) Maximum OFF current 2mA
Input voltage range 85--132VAC Base power required 9V 10 mA Max
2
4
V
N
/
A
Input voltage supply External
p
q
24
V
N
/
A
Peak voltage 132VAC OFF to ON response 10--30 ms
AC frequency 47--63 Hz ON to OFF response 10--60 ms
ON voltage level >80 VAC Terminal type Non--removable
OFF voltage level <20 VAC Status indicators Field side
Input impedance 10 K ohm Weight 5 oz. (140 g)
Input current 15mA@50Hz
1
8
A
@
6
0
H
p
18 m
A
@60Hz
Derating Chart for D3--08NA--1
0
2
4
6
8
Points
0
1
2
3
4
5
6
7
0
2
4
6
C
1
1
3
5
7
C
2
110VAC INPUT
D3--08NA--1
C1
01
23
45
67
C2
110VAC
110VAC
Line
110VAC
Input
2.2k 0.33μF
Common
9V
0 102030405060
Ambient Temperature (°C/°F)
32 50 68 86 104 122 140C°F°
Optical
Coupler
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--36 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--08NA--2, 220 VAC Input Module
Inputs per module 8Minimum ON current 10 mA
Commons per module 2 (isolated) Maximum OFF current 2mA
Input voltage range 180--265VAC Base power required 9V 10 mA max
2
4
V
N
/
A
Input voltage supply External
p
q
24
V
N
/
A
Peak voltage 265 VAC OFF to ON response 5--50 ms
AC frequency 50--60Hz ON to OFF response 5--60 ms
ON voltage level >180 VAC Terminal type Non--removable
OFF voltage level <40VAC Status indicators Field side
Input impedance 18 K ohm Weight 5 oz. (140 g)
Input current 13mA@50Hz
1
8
A
@
6
0
H
p
18 m
A
@60Hz
0
1
2
3
4
5
6
7
0
2
4
6
C
1
1
3
5
7
C
2
220VAC INPUT
D3--08NA--2
C1
01
23
45
67
C2
180--265VAC
Line Neut
180--265VAC
Line Neut
Derating Chart for D3--08NA--2
0
2
4
6
8
Points
Optical
Coupler
Line
185--265
Input 1K
270
.15μF
Common
470K
9V
VAC
0 102030405060
Ambient Temperature (°C/°F)
32 50 68 86 104 122 140C°F°
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--37
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--16NA, 110 VAC Input Module
Inputs per module 16 Minimum ON current 8mA
Commons per module 2 (isolated) Maximum OFF current 1.5 mA
Input voltage range 80--132VAC Base power required* 9V 6.25 mA Max/ON pt.
1
0
0
A
Input voltage supply External
p
q
p
100m
A
ma
x
Peak voltage 132VAC OFF to ON response 5--50 ms
AC frequency 50--60 Hz ON to OFF response 5--60 ms
ON voltage level >80 VAC Terminal type Removable
OFF voltage level <15 VAC Status indicators Logic side
Input impedance 8 K ohm Weight 6.4 oz. (180 g)
Input current 16mA@50Hz
2
5
A
@
6
0
H
p
25 m
A
@60Hz
* 9V typical values are 4
mA/ON pt., 64 mA total
Derating Chart for D3--16NA
0
4
8
12
16
Points
0
1
2
3
4
5
6
7
110VAC INPUT
D3--16NA
Common
6
C
1
3
I
0
2
4
5
7
7
0
2
4
C
1
3
5
6
II
0
1
2
3
4
5
6
7
III
CI
CII
6
1
3
0
2
4
5
7
7
0
2
4
1
3
5
6
Line
80--132VAC
80--132VAC
Common
Line
0.33μF
Other 7
Circuits
150k
Line
110VAC
Common
Input
9V
0 102030405060
Ambient Temperature (°C/°F)
32 50 68 86 104 122 140C°F°
Optical
Coupler
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--38 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--08NE3, 24 VAC/DC Input Module
Inputs per module 8 (sink/source) Base power required 9V 10 mA max
2
4
V
N
/
A
Commons per module 2 (isolated)
p
q
24
V
N
/
A
Input voltage range 20--28 VAC/VDC OFF to ON response AC: 5--50 ms
D
C
6
3
0
Input voltage External
p
DC: 6--30 ms
Peak voltage 28 VAC/VDC ON to OFF response AC/DC: 5--60 ms
AC frequency 47--63 Hz Terminal type Non--removable
ON voltage level >20 V Status indicators Field side
OFF voltage level <6V Weight 4.2 oz. (120 g)
Input impedance 1.5 K ohm
Input current 19 mA Max
Minimum ON current 10 mA
Maximum OFF current 2mA
0
1
2
3
4
5
6
7
0
2
4
6
C
1
1
3
5
7
C
2
24VAC/DC INPUT
D3--08NE3
C1
01
23
45
67
C2
Common
Optical
Coupler
1.5k
270
LED
+--
24VAC/DC
+--
+24VDC
24VAC
Common
Common
Derating Chart for D3--08NE3
0
2
4
6
8
Points
24VAC/DC
-- +
Sinking Module Configuration
NOTE: This module can be wired in a sourcing configuration
and it will be operational except there will be no module
LED indication for each input.
9V
Input
0 102030405060
Ambient Temperature (°C/°F)
32 50 68 86 104 122 140C°F°
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--39
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--16NE3, 24 VAC/DC Input Module
Inputs per module 16 (sink/source) Base power required 9V 2.5 mA.+4.5mA/
O
N
t
(
1
3
0
A
)
Commons per module 2 (isolated)
p
q
ON pt.(130 m
A
ma
x
)
2
4
V
N
/
A
Input voltage range 14--30VAC/VDC
2
4
V
N
/
A
Input voltage supplied External OFF to ON response AC 5--30 ms
D
C
5
2
5
Peak voltage 30 VAC/VDC
p
DC 5--25 ms
AC frequency 47--63 Hz ON to OFF response AC 5--30 ms
D
C
5
2
5
ON voltage level >14 V
p
DC 5--25 ms
OFF voltage level <3 V Terminal type Removable
Input impedance 1.8 K ohm Status indicators Logic side
Input current 16 mA Max Weight 6 oz. (170 g)
Minimum ON current 7mA
Maximum OFF current 2mA
Derating Chart for D3--16NE3
0
4
8
12
16
Points
0
1
2
3
4
5
6
7
24VAC/DC INPUT
D3--16NE3
Common
6
C
1
3
I
0
2
4
5
7
7
0
2
4
C
1
3
5
6
II
0
1
2
3
4
5
6
7
III
CI
CII
6
1
3
0
2
4
5
7
7
0
2
4
1
3
5
6
24VAC
Common
1.8k
24VDC
Common
Line
24VDC
Vin=30V
Vin=24V
16 circuits ON
Vin=18V
10 circuits ON
7 circuits ON
5 circuits ON
Input
Sinking Module Configuration
24VAC
24VDC
9V
10 30 50
0 204060
Ambient Temperature (°C/°F)
32 50 68 86 104 122 140C°F°
Optical
Coupler
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--40 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--08SIM, Input Simulator
Inputs per module 8
Base Power re
q
uired 10m
A
@9
V
DC
B
a
s
e
P
o
w
e
r
r
e
q
u
i
r
e
d
1
0
m
A
@
9
V
D
C
112mA max @
@
24VDC
OFF to ON response 4--15 ms
ON to OFF response 4--15 ms
Terminal type None
Status indicators Switch side
Weight 3.0oz.(85g)
0
1
2
3
4
5
6
7
INPUT SIMULATOR
D3--08SIM
0
1
2
3
4
5
6
7
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--41
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--08TD1, 24 VDC Output Module
Outputs per module 8 (current sinking) Minimum load 1mA
Commons per module 2(internally connected) Base power required 9V 20 mA Max
2
4
V
3
A
/
t
Operating voltage 5--24VDC
p
q
24
V
3m
A
/
pt.
(
2
4
m
A
M
a
x
)
Output type NPN
(
l
l
t
)
(
2
4
m
A
M
a
x
)
p
y
p
(open collector) OFF to ON response 0.1 ms
Peak voltage 45VDC ON to OFF response 0.1 ms
AC frequency N/A Terminal type Non-removable
ON voltage drop 0.8V @ 0.5A Status indicators Logic Side
Max current 0.5A / point
1
8
/
Weight 4.2 oz. (120 g)
p
1.8
/
common Fuses (2)
O
3
A
Max leakage current 0.1 mA @ 40VDC
(
)
One 3
A
per common
N
o
n
r
e
p
l
a
c
e
a
b
l
e
Max inrush current 3A / 20ms
1A / 100ms
N
on--rep
l
acea
b
l
e
Derating Chart for D3--08TD1
0
2
4
6
8
Points
0
1
2
3
4
5
6
7
0
2
4
6
C
1
1
3
5
7
C
2
24VDC OUTPUT
D3--08TD1
3A
Output
Common
L
+-- C1
01
23
45
67
C2
L
L
L
L
L
L
L
Internally
Connected
5--24VDC
+--
L
5--24VDC
-- +
24VDC
Optical
Coupler
Internal
Power Supply
9V
0 102030405060
Ambient Temperature (°C/°F)
32 50 68 86 104 122 140C°F°
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--42 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--08TD2, 24 VDC Output Module
Outputs per module 8 (current sourcing) Minimum load 1mA
Commons per module 2(internally connected) Base power required 9V 30 mA Max
2
4
V
N
/
A
Operating voltage 5--24VDC
p
q
24
V
N
/
A
Output type NPN Transistor
(
i
t
t
f
l
l
)
OFF to ON response 0.1 ms
p
y
p
(emitter follower) ON to OFF response 0.1 ms
Peak voltage 40VDC Terminal type Non-removable
AC frequency N/A Status indicators Logic Side
ON voltage drop 1V @ 0.5A Weight 4.2 oz. (120 g)
Max current 0.5A / point
1
8
A
/
Fuses (2)
O
3
A
p
1.8
A
/
common
(
)
One 3
A
per common
N
o
n
r
e
p
l
a
c
e
a
b
l
e
Max leakage current 0.1 mA @ 24VDC
N
on--rep
l
acea
b
l
e
Max inrush current 3A / 20ms
1
A
/
1
0
0
1
A
/
100ms
Derating Chart for D3--08TD2
0
2
4
6
8
Points
0
1
2
3
4
5
6
7
0
2
4
6
C
1
1
3
5
7
C
2
24VDC OUTPUT
D3--08TD2
3A
Output
Common
L
-- + C1
01
23
45
67
C2
L
L
L
L
L
L
L
Internally
Connected
5--24VDC
-- +
L
5--24VDC
Optical
Coupler 9V
10 30 500 204060
Ambient Temperature (°C/°F)
32 50 68 86 104 122 140C°F°
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--43
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--16TD1--1, 24 VDC Output Module
Outputs per module 16 (current sinking) Minimum load 1mA
Commons per module 2(internally connected) Base power required 9V (40 mA Max)
3
A
2
3
A
/
O
N
t
Operating voltage 5--24VDC
p
q
(
)
3m
A
+2.3m
A
/
ON pt.
2
4
V
6
m
A
/
O
N
p
t
Output type NPN transistor
(open collector)
2
4
V
6
m
A
/
O
N
p
t
.
(96 mA Max)
Peak voltage 45VDC OFF to ON response 0.1 ms
AC frequency N/A ON to OFF response 0.1 ms
ON voltage drop 2V @ 0.5A Terminal type Removable
Max current 0.5A/ point
2
A
/
Status indicators Logic Side
p
2
A
/
common Weight 5.6 oz. (160 g)
Max leakage current 0.1mA @ 40VDC Fuses (2)
O
3
A
Max inrush current 3A / 20 ms
1A / 100 ms
(
)
One 3
A
per common
Non-replaceable
Derating Chart for D3--16TD1--1
0
4
8
12
16
Points
0
1
2
3
4
5
6
7
24VDC OUTPUT
D3--16TD1--1
6
C
1
3
I
0
2
4
5
7
7
0
2
4
C
1
3
5
6
II
0
1
2
3
4
5
6
7
III
CI
CII
6
1
3
0
2
4
5
7
7
0
2
4
1
3
5
6
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
+--
5--24VDC
+--
5--24VDC
0.25A
24VDC
L
+--
5--24VDC
3A
Internally
Connected
Common
Output
0.35A
0.5A
9V
10
Ambient Temperature (°C/°F)
30 500 204060
32 50 68 86 104 122 140C°F°
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--44 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--16TD1--2, 24 VDC Output Module
Outputs per module 16 (current sinking) Minimum load 1mA
Commons per module 4(internally connected) Base power required 9V (40mA Max)
3
m
A
+
2
3
m
A
/
O
N
p
t
Operating voltage 5--24VDC 3m
A
+2.3m
A
/
ON pt.
2
4
V
6
m
A
/
O
N
p
t
.
Output type NPN transistor
(
o
p
e
n
c
o
l
l
e
c
t
o
r
)
2
4
V
6
m
A
/
O
N
p
t
.
(96mA Max)
(open collector) OFF to ON response 0.1 ms
Peak voltage 45VDC ON to OFF response 0.1 ms
AC frequency N/A Terminal type Removable connector
ON voltage drop 2.0V @ 0.5A Status indicators Logic Side
Max current 0.5A / point
1
8
A
Weight 5.6 oz. (160 g)
p
1.8
A
common Fuses (4)
O
3
A
Max leakage current 0.3 mA @ 40VDC
(
)
One 3
A
per common
N
o
n
r
e
p
l
a
c
e
a
b
l
e
Max inrush current 3A / 20ms
1A / 100ms
N
on--rep
l
acea
b
l
e
Derating Chart for D3--16TD1--2
0
4
8
12
16
Points
0
1
2
3
4
5
6
7
24VDC OUTPUT
D3--16TD1--2
6
C
A
0
2
4
7
C
B
1
3
5
I
0.5A
Optical
L
+--
5--24VDC
Common
Coupler
-- +
24VDC
Internal
Power Supply
C C
6
C
0
2
4
7
C
1
3
5
C C
0
1
2
3
4
5
6
7
II
I
II
To Other
3 Circuits
Output
3A
Output 0, 2, 4, 6 (FUSED with 3A on Common)
Same circuit as shown below
Output 1, 3, 5, 7 (FUSED with 3A on Common)
Same circuit as shown below
To Other 3 Commons
10
Ambient Temperature (°C/°F)
30 500 204060
32 50 68 86 104 122 140C°F°
L
+--
5--24VDC
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
6
A
0
2
4
7
B
1
3
5
6
0
2
4
7
1
3
5
C
1
12
C
Internally
Connected
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--45
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--16TD2, 24 VDC Output Module
Outputs per module 16 (current sourcing) Minimum load 1mA
Commons per module 2 (isolated) Base power required 9V 7.5 mA/ON pt.
(
1
8
0
A
M
)
Operating voltage 5--24VDC
p
q
p
(180 m
A
Ma
x
)
2
4
V
N
/
A
Output type NPN transistor
(
i
t
t
f
l
l
)
2
4
V
N
/
A
p
y
p
(emitter follower) OFF to ON response 0.1 ms
Peak voltage 40VDC ON to OFF response 1ms
AC frequency N/A Terminal type Removable
ON voltage drop 1.5V @ 0.5A Status indicators Logic Side
Max current 0.5A / point
3
A
Weight 7.1 oz. (210 g)
p
3
A
common Fuses (2)
O
5
A
Max leakage current 0.01 mA @ 40VDC
(
)
One 5
A
per common
N
o
n
r
e
p
l
a
c
e
a
b
l
e
Max inrush current 3A / 20ms
1A / 100ms
N
on--rep
l
acea
b
l
e
Derating Chart for D3--16TD2
0
4
8
12
16
Points
0
1
2
3
4
5
6
7
24VDC OUTPUT
D3--16TD2
6
C
1
3
I
0
2
4
5
7
7
0
2
4
C
1
3
5
6
II
0
1
2
3
4
5
6
7
III
CI
CII
6
1
3
0
2
4
5
7
7
0
2
4
1
3
5
6
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
-- +
5--24VDC
-- +
5--24VDC
0.25A
0.5A
Optical
Isolator
9VDC
L
-- +
5--24VDC
5A
Common
Output
10
Ambient Temperature (°C/°F)
30 500 204060
32 50 68 86 104 122 140C°F°
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--46 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--04TAS, 110--220 VAC Output Module
Outputs per module 4Minimum load 10 mA
Commons per module 4 (isolated) Base power required 9V 12 mA Max
2
4
V
N
/
A
Operating voltage 80--265VAC
p
q
24
V
N
/
A
Output type Triac OFF to ON response 1msMax
Peak voltage 265 VAC ON to OFF response 10 ms Max
AC frequency 47--63 Hz Terminal type Non--removable
ON voltage drop 1.5VAC@2A Status indicators Logic Side
Max current 2A / point
2
A
/
Weight 6.4 oz. (180 g)
p
2
A
/
common Fuses (4)
O
3
A
Max leakage current 7 mA @ 220VAC
3.5 mA @ 110VAC
(
)
One 3
A
per common
User replaceable
Max inrush current 20A for 16 ms
1
0
A
f
1
0
0
10
A
for 100 ms
Derating Chart for D3--04TAS
0
1
2
3
4
Points
0
1
2
3
4
5
6
7
0
1
2
3
C
C
C
C
110/220VAC OUTPUT
D3--04TAS
0C0
1C1
2C2
3C3
80--265VAC
Line
80--265VAC
Output .33
47
LineNeut
Common
0
1
2
3
LineNeut
1A
2A
L
L
L
LL
80--265VAC
9V
3A
Ambient Temperature (°C/°F)
0 102030405060
32 50 68 86 104 122 140C°F°
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--47
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
F3--08TAS, 250 VAC Isolated Output Module
Outputs per module 8 (500V point-to-point
isolation) Base power required 9V 10mA / ON pt.
80mA Max.
V
N
/
A
Commons per module 8 (isolated) 24V N/A
Operating voltage 12--125 VAC
1
2
5
--
2
5
0
V
A
C
r
e
q
u
i
r
e
s
OFF to ON response 8msMax
1
2
5
--
2
5
0
V
A
C
r
e
q
u
i
r
e
s
external fuses ON to OFF response 8msMax
Output type SSR Array (TRIAC) Terminal type Removable
Peak voltage 400 VAC Status indicators Logic Side
AC frequency 47 -- 440 Hz Weight 6.3 oz. (178g)
ON voltage drop 1VAC@1A Fuses
B
K
/
P
C
E
5
B
(8) fast blow
O
5
A
(
1
2
5
V
f
t
Max current 1A / point BK
/
PCE--5 Bussman
(
O
n
e
s
p
a
r
e
f
u
s
e
(
)
One 5
A
(125
V
f
ast
b
l
o
w
)
p
e
r
e
a
c
h
c
i
r
c
u
i
t
Max leakage current 10 μA @ 240 VAC
(
O
ne spare
f
use
i
n
c
l
u
d
e
d
)
b
l
ow
)
per eac
h
c
i
rcu
i
t
U
s
e
r
r
e
p
l
a
c
e
a
b
l
e
Max inrush current* 20A for 16 ms
3
A
f
1
0
0
i
n
c
l
u
d
e
d
)
U
s
e
r
r
e
p
l
a
c
e
a
b
l
e
3
A
for 100 ms
Minimum load 0.5 mA
0
1
2
3
4
5
6
7
3
4
5
6
0
1
2
7
3
4
5
6
0
1
2
7
NO
NO
NO
NO
NO
NO
NO
NO
C
C
C
C
C
C
C
C
OUTPUT 250VAC
ISOLATED
Derating Chart for F3--08TAS
0
2
4
6
8
Points
4
3
5
6
0
1
2
7
3
4
5
6
0
1
2
7
L
L
L
L
L
L
L
L
12--250VAC
0.5A
Line
Output
5A
L
12--250VAC
0.75A
1A
Line
9V
*Fuse blows at 30 Amp surge
10 30 50
0 204060
Ambient Temperature (°C/°F)
32 50 68 86 104 122 140C°F°
Motor starters up to and including
a NEMA size 3 can be used with
this module.
Line
Line
Line
Line
Line
Line
Line
Neut
Neut
Neut
Neut
Neut
Neut
Neut
Neut
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--48 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
F3--08TAS--1, 125 VAC Isolated Output Module
Outputs per module 8 (1500V point-to-
point isolation) Base power required 9V 25mA/ON pt.
(200mA Max),
V
N
/
A
Commons per module 8 (isolated)
(
)
,
24V N/A
O
p
e
r
a
t
i
n
g
v
o
l
t
a
g
e
2
0
-
-
1
2
5
V
A
C
OFF to ON response 1msMax
O
p
e
r
a
t
i
n
g
v
o
l
t
a
g
e
2
0
--
1
2
5
V
A
C
ON to OFF response 9msMax
Output type SSR (TRIAC with zero
cross--over) Terminal type Removable
Peak voltage 140VAC Status indicators Logic Side
AC frequency 47 -- 63 Hz Weight 6.3 oz. (177g)
ON voltage drop 1.6V(rms) @ 1.5A 8 (1 per common)
5
A
1
2
5
V
f
t
b
l
Max current 1.5A/point
F
u
s
e
s
(
p
)
5
A
, 125
V
fast blow
O
r
d
e
r
D
3
F
U
S
E
4
Max leakage current 0.7mA (rms)
F
u
s
e
s
O
r
d
er
D
3
--
F
U
S
E
--
4
(
5
p
e
r
p
a
c
k
)
Max inrush current* 15A for 20 ms
8
A
f
1
0
0
(
5
p
e
r
p
a
c
k
)
8
A
for 100 ms
Minimum load 50mA
4
3
5
6
0
1
2
7
3
4
5
6
0
1
2
7
L
L
L
L
L
L
L
L
Lin e
Lin e
Lin e
Lin e
Lin e
Lin e
Lin e
Lin e
20----125VAC
Derating Chart
0
1
2
3
4
5
6
7
3
4
5
6
0
1
2
7
3
4
5
6
0
1
2
7
NO
NO
NO
NO
NO
NO
NO
NO
C
C
C
C
C
C
C
C
OUTPUT 125VAC
ISOLATED
F 3 -- 0 8 TA S -- 1
L
5A
Z
C
Output
COM
Line
To LED
20--125VAC
Derating Note: All outputs
can be run at the current
per point shown.
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--49
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--08TA--1, 110--220 VAC Output Module
Outputs per module 8Minimum load 25 mA
Commons per module 2 (isolated) Base power required 9V 20mA/ON pt.
(
1
6
0
A
M
)
Operating voltage 80--265VAC
p
q
p
(160 m
A
Ma
x
)
2
4
V
N
/
A
Output type Triac
2
4
V
N
/
A
Peak voltage 265VAC OFF to ON response 1msMax
AC frequency 47--63 Hz ON to OFF response 8.33 ms Max
ON voltage drop 1.5VAC@1A Terminal type Removable
Max current 1A / point
3
A
/
Status indicators Logic Side
p
3
A
/
common Weight 7.4 oz. (210 g)
Max leakage current 1.2 mA @ 220VAC
0.52 mA @ 110VAC Fuses (2)
One 5A per common
N
l
b
l
Max inrush current 10A for 16 ms
5A for 100 ms
p
Non-replaceable
Derating Chart for D3--08TA--1
0
2
4
6
8
Points
0.5A
1A
L
5A
Output
Common
80--265VAC 9V
10
Ambient Temperature (°C/°F)
30 500 204060
32 50 68 86 104 122 140C°F°
0
1
2
3
4
5
6
7
110--220VAC OUTPUT
D3--08TA--1
1
C
C
2
4
5
6
1
2
3
7
NC
NC
4
5
6
1
2
3
7
L
L
L
L
0
80--265VAC
C2
C2
C2
C2
INTERNALLY CONNECTED
INTERNALLY CONNECTED
L
L
L
L
80--265VAC
C1
C1
C1
C1
0
Neut Line
Neut Line
Neut Line
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--50 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--08TA--2, 110--220 VAC Output Module
Outputs per module 8Base power required 9V 20mA/ON pt.
(
1
6
0
A
M
)
Commons per module 2 (isolated)
p
q
p
(160 m
A
Ma
x
)
2
4
V
N
/
A
Operating voltage 80--265VAC
2
4
V
N
/
A
Output type Triac OFF to ON response 1msMax
Peak voltage 265VAC ON to OFF response 8.33 ms Max
AC frequency 47--63 Hz Terminal type Non-removable
ON voltage drop 1.5VAC@1A Status indicators Logic Side
Max current 1A / point
3
A
/
Weight 6.4 oz. (180 g)
p
3
A
/
common Fuses (2)
O
n
e
5
A
p
e
r
c
o
m
m
o
n
Max leakage current 1.2 mA @ 220VAC
0
5
2
m
A
@
1
1
0
V
A
C
O
n
e
5
A
p
e
r
c
o
m
m
o
n
Non--replaceable
0
.
5
2
m
A
@
1
1
0
V
A
C
Max inrush current 10A for 16 ms
5
A
f
1
0
0
5
A
for 100 ms
Minimum load 25 mA
L
Derating Chart for D3--08TA--2
Points
0
1
2
3
4
5
6
7
0
2
4
6
C
1
1
3
5
7
C
2
110-220VAC OUTPUT
D3--08TA--2
5A
80--265VAC
C1
01
23
45
67
C2
80--265VAC
L
L
L
L
L
L
L
0
2
4
6
8
1A
10
Ambient Temperature (°C/°F)
30 500 204060
32 50 68 86 104 122 140C°F°
LOutput
Common
80--265VAC
Neut Line 9V
Neut Line
Neut Line
0.5A
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--51
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
F3--16TA--2, 20--125 VAC Output Module
Outputs per module 16 Minimum load 50mA
Commons per module 2 (isolated) Base power required 9V 14mA / ON pt.
2
5
0
m
A
M
a
x
Operating voltage 20--125VAC
2
5
0
m
A
M
a
x
.
24V N/A
OFF to ON response 8ms Max
ON to OFF response 8ms Max
Output type SSR Array (TRIAC) Terminal type Removable
Peak voltage 140VAC Status indicators Logic Side
AC frequency 47 -- 63Hz Weight 7.7oz. (218g)
ON voltage drop 1.1VAC @ 1.1A Fuses 4 (One 5A 125V fast
b
l
h
Max current 1.1A / point
(
blow per each group
o
f
f
o
u
r
o
u
t
p
u
t
s
)
Max leakage current 0.7mA @ 125VAC o
f
f
our ou
t
pu
t
s
)
O
r
d
e
r
D
3
--
F
U
S
E
--
4
Max inrush current* 15A for 20 ms
8
A
f
1
0
0
O
r
d
e
r
D
3
--
F
U
S
E
--
4
(5 per pack)
8
A
for 100 ms
(
5
p
e
r
p
a
c
k
)
Derating Chart
0
4
8
12
16
Points
0
1
2
3
4
5
6
7
F3----1 6 TA ----2
6
H
1
3
I
0
2
4
5
7
7
0
2
4
H
1
3
5
6
II
0
1
2
3
4
5
6
7
III
H
H
6
1
3
0
2
4
5
7
7
0
2
4
1
3
5
6
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
0.5A
Output
5A
Common
L
20--125VAC
I
II
I
II
9V
To other 3 circuits
*Fuse blows at 20 Amp surge
10 30 500204060
32 50 68 86 104 122 140 C
F
Motor starters up to and including
a NEMA size 3 can be used with
this module.
1.0A
1.1A
To other 4 circuits
5A
20--125VAC OUTPUT
20--125VAC
20--125VAC
Ambient Temperature (degrees C / F)
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--52 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--16TA--2, 15--220 VAC Output Module
Outputs per module 16 Minimum load 10 mA @ 15VAC
Commons per module 2 (isolated) Base power required * 9V 25mA Max/ON pt.
4
0
0
A
M
Operating voltage 15--265 VAC
p
q
p
400 m
A
Ma
x
2
4
V
N
/
A
Output type Triac
2
4
V
N
/
A
Peak voltage 265 VAC OFF to ON response 1msMax
AC frequency 47--63 Hz ON to OFF response 9msMax
ON voltage drop 1.5VAC@0.5A Terminal type Removable
Max current 0.5A / point
3
A
/
Status indicators Logic Side
p
3
A
/
common
6
A
/
p
e
r
m
o
d
u
l
e
Weight 7.2 0z. (210 g)
6
A
/
per mo
d
u
l
eFuses (2)
O
5
A
Max leakage current 4 mA @ 265 VAC
(
)
One 5
A
per common
N
o
n
r
e
p
l
a
c
e
a
b
l
e
Max inrush current 10A for 10 ms
5A for 100 ms
N
on--rep
l
acea
b
l
e
* 9V typical values
17mA/ON pt., 272 mA
total
Derating Chart for D3--16TA--2
0
4
8
12
16
Points
0
1
2
3
4
5
6
7
110--220VAC OUTPUT
D3--16TA--2
6
C
1
3
I
0
2
4
5
7
7
0
2
4
C
1
3
5
6
II
0
1
2
3
4
5
6
7
III
CI
CII
6
1
3
0
2
4
5
7
7
0
2
4
1
3
5
6
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
15--265VAC
0.2A
15--265VAC
Line
Output
.33
47
Common
L
15--265VAC
0.30A
0.5A
Max 3A/common
5A 9V
10
Ambient Temperature (°C/°F)
30 500 204060
32 50 68 86 104 122 140C°F°
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--53
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--08TR, Relay Output Module
Outputs per module 8Minimum load 5mA@5v
Commons per module 2 (isolated) Base power required 9V 45 mA/ON pt.
(
3
6
0
A
M
)
Operating voltage 5--265VAC
5--30VDC
p
q
p
(360 m
A
Ma
x
)
24V N/A
Output type Form A (SPST) OFF to ON response 5ms
Peak voltage 265VAC / 30VDC ON to OFF response 5ms
AC frequency 47--63 Hz Terminal type Non-removable
ON voltage drop N/A Status indicators Logic Side
Max current 4A / point AC
5
A
/
i
t
D
C
Weight 7 oz. (200 g)
p
5
A
/
point DC
6
A
/
common Fuses (2)
O
n
e
1
0
A
p
e
r
c
o
m
m
o
n
6
A
/
c
o
m
m
o
n
O
n
e
1
0
A
p
e
r
c
o
m
m
o
n
User replaceable
Max leakage current 1 mA @ 220VAC
Max inrush current 5A
Derating Chart for D3--08TR
0
2
4
6
8
Points
0
1
2
3
4
5
6
7
0
2
4
6
C
1
1
3
5
7
C
2
RELAY OUTPUT
D3--08TR
L
-- +
C1
01
23
45
67
C2
L
L
L
L
L
L
L
5--30VDC
5--265VAC
L
Relay
Common
Output
10A
9V
Typical Relay Life (Operations)
220VAC 4A 0.5A 100k
220VAC 0.05A 800k
110VAC 4A 0.5A 100k
110VAC 0.1A 650k
24VDC 5A 0.5A 100k
Voltage Resistive Solenoid Closures
10
Ambient Temperature (°C/°F)
30 500 204060
32 50 68 86 104 122 140C°F°
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--54 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
F3--08TRS--1, Relay Output Module
Outputs per module 8Max leakage current N/A
Commons per module 8 (isolated) Max inrush current 10A Inductive
Operating voltage* 12--125 VAC
1
2
5
2
5
0
V
A
C
i
Minimum load 100 mA @12VDC
p
g
g
125--250
V
A
C requires
e
x
t
e
r
n
a
l
f
u
s
e
s
ex
t
erna
l
f
uses
12--30 VDC Base power required 9V 37mA / ON pt.
(296 mA Max)
24V N/A
Output type 6 Form A (SPST)
2
F
C
S
P
D
T
)
OFF to ON response 13 ms Max
p
y
p
(
2 Form C (SPDT) ON to OFF response 9msMax
Peak voltage 265 VAC / 120 VDC Terminal type Removable
AC frequency 47--63 Hz Status indicators Logic Side
ON voltage drop N/A Weight 8.9 oz. (252 g)
Max current (resistive) 10A / point AC/DC
3
0
A
/
m
o
d
u
l
e
A
C
/
D
C
Fuses (8) One 10A (125V)
p
e
r
c
o
m
m
o
n
3
0
A
/
mo
d
u
l
e
A
C
/
D
C
per common
Non-replaceable
NOTE: Contact life may be lengthened beyond those values shown by the use of an appropriate arc
suppression. This technique is discussed earlier in this chapter.
4C
3C
5C
6C
0C
1C
2C
7C
7NC
L
L
+--
L
L
-- +
L
L
L
L
-- +
L
L
Typical Relay Life (Operations)
Maximum Resistive
or Inductive Inrush
Load Current
1/4HP
10.0A
5.0A
3.0A
.05A
Operating Voltage
28VDC
50K
200K
325K
>50M
120VAC
25K
50K
100K
125K
240VAC
50K
L
10A
Common
NO
L
10A
Common
NO
NC
12--250VAC
L
12--30VDC
0
1
2
3
4
5
6
7
RELAY OUTPUT
F 3 -- 0 8 T R S -- 1
3
4
5
6
0
1
2
7
7
3
4
5
6
0
0
1
2
7
NC
NO
NO
NO
NO
NO
NO
NO
NO
3
4
5
6
0
0
1
2
7
NC
NO
NO
NO
NO
NO
NO
NO
NO
C
NC
C
C
C
C
C
C
C
-- +
9V
9V
Outputs 1--6
Outputs 0 & 7
*Maximum DC voltage rating is 120 VDC at
.5 Amp, 30,000 cycles typical
Derating Chart for F3--08TRS--1
0
2
4
6
8
Points
10
Ambient Temperature (°C/°F)
30 500 204060
32 50 68 86 104 122 140C°F°
Motor starters up to and including
a NEMA size 4 can be used with
this module.
Output Current
10A/point
(30A/module)
Installation, Wiring
and Specifications Installation and
Safety Guidelines
2--55
Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
F3--08TRS--2, Relay Output Module
Outputs per module 8Max leakage current N/A
Commons per module 8 (isolated) Max inrush current 10A Inductive
Operating voltage* 12--125 VAC
1
2
3
0
V
D
C
Minimum load 100 mA @12VDC
p
g
g
12--30
V
DC
Base power required 9V 37mA / ON pt.
(296 mA Max)
24V N/A
Output type 6 Form A (SPST)
2
F
C
S
P
D
T
)
OFF to ON response 13 ms Max
p
y
p
(
2 Form C (SPDT) ON to OFF response 9msMax
Peak voltage 265 VAC / 120 VDC Terminal type Removable
AC frequency 47--63 Hz Status indicators Logic Side
ON voltage drop N/A Weight 9 oz. (255 g)
Max current (resistive) 5A / point AC/DC
4
0
A
/
m
o
d
u
l
e
A
C
/
D
C
Fuses
1
9
3
7
9
-
-
K
-
-
1
0
A
(8) One 5A (125V) per
c
o
m
m
o
n
4
0
A
/
mo
d
u
l
e
A
C
/
D
C
1
9
3
7
9
--
K
--
1
0
A
Wickman common
User replaceable
NOTE: Contact life may be lengthened beyond those values shown by the use of an appropriate arc
suppression. This technique is discussed earlier in this chapter.
0
1
2
3
4
5
6
7
RELAY OUTPUT
F 3 -- 0 8 T R S -- 2
3
4
5
6
0
1
2
7
7
3
4
5
6
0
0
1
2
7
4C
3C
5C
6C
0C
1C
2C
7C
7NC
L
L
+--
L
L
-- +
L
L
L
L
-- +
L
L
Typical Relay Life (Operations)
Maximum Resistive
or Inductive Inrush
Load Current
5.0A
3.0A
.05A
Operating Voltage
28VDC
200K
325K
>50M
120VAC
100K
125K
240VAC
50K
L
5A
Common
NO
L
5A
Common
NO
NC
12--250VAC
L
12--30VDC
NC
NO
NO
NO
NO
NO
NO
NO
NO
3
4
5
6
0
0
1
2
7
NC
NO
NO
NO
NO
NO
NO
NO
NO
C
NC
C
C
C
C
C
C
C
-- +
9V
9V
Outputs 1--6
Outputs 0 & 7
*Maximum DC voltage rating is 120 VDC at
.5 Amp, 30,000 cycles typical
Expected mechanical relay life is 100 million operations.
Motor starters up to and including
a NEMA size 3 can be used with
this module.
Derating Chart for F3--08TRS--2
0
2
4
6
8
Points
10
Ambient Temperature (°C/°F)
30 500 204060
32 50 68 86 104 122 140C°F°
Output Current
5A/point
(40A/module)
Installation, Wiring,
and Specifications
Installation and
Safety Guidelines
2--56 Installation, Wiring, and Specifications
DL350 User Manual, 2nd Edition
D3--16TR, Relay Output Module
Outputs per module 16 Minimum load 5mA@5v
Commons per module 2 (isolated) Base power required 9V 30 mA/ON pt.
(
4
8
0
A
M
)
Operating voltage 5--265 VAC
5--30 VDC
p
q
p
(480 m
A
Ma
x
)
24V N/A
Output type 16 Form A (SPST) OFF to ON response 12 ms
Peak voltage 265 VAC / 30 VDC ON to OFF response 12 ms
AC frequency 47--63 Hz Terminal type Removable
ON voltage drop N/A Status indicators Logic Side
Max current 2A / point AC/DC
(
r
e
s
i
s
t
i
v
e
)
Weight 8.5 oz. (248g)
(
r
e
s
i
s
t
i
v
e
)
8A / common AC/DC Fuses None
Max leakage current 0.1mA @ 220 VAC
Max inrush current 2A
Derating Chart for D3--16TR
0
4
8
12
16
Points
0
1
2
3
4
5
6
7
RELAY OUTPUT
D3--16TR
6
C
1
3
I
0
2
4
5
7
7
0
2
4
C
1
3
5
6
II
0
1
2
3
4
5
6
7
III
CI
CII
6
1
3
0
2
4
5
7
7
0
2
4
1
3
5
6
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
5--265VAC
L
-- +
5--30VDC
Common
Output
5--30VDC 5--265
VAC
Relay
9V
10
Ambient Temperature (°C/°F)
30 500 204060
32 50 68 86 104 122 140C°F°
Typical Relay Life (Operations)
220VAC 2A 0.25A 100k
220VAC 0.03A 800k
110VAC 2A 0.25A 100k
110VAC 0.05A 650k
24VDC 2A 0.25A 100k
Voltage Resistive Solenoid Closures
13
CPU Specifications
and Operations
In This Chapter....
— Overview
— CPU General Specifications
— CPU Hardware Features
— Using Battery Backup
— Selecting the Program Storage Media
— CPU Setup
— CPU Operation
— I/O Response Time
— CPU Scan Time Considerations
— PLC Numbering Systems
— Memory Map
— DL350 System V-Memory
— X Input / Y Output Bit Map
— Control Relay Bit Map
— StageControl / Status Bit Map
— Timer and Counter Status Bit Maps
CPU Specifications
and Operation
3--2 CPU Specifications and Operation
DL350 User Manual, 2nd Edition
Overview
The CPU is the heart of the control
system. Almost all system operations are
controlled by the CPU, so it is important
that it is set-up and installed correctly.
This chapter provides the information
needed to understand:
Sthe differences between the
different models of CPUs
Sthe steps required to setup and
install the CPU
The DL350 is a modular CPU which can be installed in 5, 8, or 10 slot bases. All I/O
modules in the DL305 family will work with the CPU. The DL350 CPU offers a wide
range of processing power and program RLL and Stage program instructions (see
Chapters 5 and 7). It also provides extensive internal diagnostics that can be
monitored from the application program or from an operator interface. The DL350 is
different than the other CPUs in the DL305 family. It supports a 16 bit addressing
format where the DL330/340 are 8 bit. This has enabled the DL350 to expanded its
instruction set, memory, and features much like the DL205 and DL405 CPUs.
The DL350 has a maximum of 14.8K of program memory comprised of 7.6K of
ladder memory and 7.2K of V-memory (data registers). It supports a maximum of
368 points of local I/O, and 880 points with remote I/O. It includes an additional
internal RISC--based microprocessor for greater processing power. The DL350 has
over 150 instructions, including drum timers, a print function, floating point math, and
PID loop control for 4 loops.
The DL350 has a total of two communications ports. The top port is a 6 pin modular
that provides a built--in RS232 communication port. It can be used for easy
connection of the handheld programmer, PC, or used for a DirectNET slave. The
bottom port is a 25--pin RS232C/RS422 port. It will interface with DirectSOFT, and
operator interfaces, provides built--in Remote I/O, DirectNET and MODBUS RTU
Master/Slave connections.
General CPU
Features
DL350 CPU
Features
CPU Specifications
and Operation
3--3
CPU Specifications and Operation
DL350 User Manual, 2nd Edition
CPU General Specifications
Feature DL350
Total Program memory (words) 14.8K
Ladder memory (words) 7680 (Flash)
V-memory (words) 7168
Non-volatile V--Memory (words) No
Boolean execution /K 5--6 ms
RLL and RLLPLUS Programming Yes
Handheld programmer Yes
DirectSOFTprogramming for WindowsYes
Built-in communication ports (RS232C) Yes
CMOS RAM No
UVPROM No
EEPROM Flash
Local Discrete I/O points available 368
Remote I/O points available 512
Remote I/O Channels 1
Max Number of Remote Slaves 7
Local Analog input / output channels maximum 128 / 32
Counter Interface Module (quad., pulse out, pulse catch, etc.) No
I/O Module Point Density 8/16
Slots per Base 5/8/10
Number of instructions available (see Chapter 5 for details) 170
Control relays 1024
Special relays (system defined) 144
Stages in RLLPLUS 1024
Timers 256
Counters 128
Immediate I/O Yes
Interrupt input (hardware / timed) No / Yes
Subroutines Yes
Drum Timers Yes
For/Next Loops Yes
Math Integer,Floating Point
PID Loop Control, Built In Yes
Time of Day Clock/Calendar Yes
Run Time Edits Yes
Supports Overrides Yes
Internal diagnostics Yes
Password security Yes
System error log Yes
User error log Yes
Battery backup Yes (optional)
CPU Specifications
and Operation
3--4 CPU Specifications and Operation
DL350 User Manual, 2nd Edition
CPU Hardware Features
Port 1
Port 2
Status Indicators
Mode Switch
Battery Slot
6P6C Phone Jack
RS232C, 9600 baud
Communication Port
--K-sequence
-- DirectNETslave
--easily connect
DirectSOFT,
handhelds, operator interfaces,
any DirectNET master
25-pin D--Shell Connector
RS232C/RS422, up to 38.4K baud
Communication Port
--K-sequence
-- DirectNETMaster/Slave
--MODBUS RTU Master/Slave
--Built--in Remote I/O
--easily connect
DirectSOFT,
handhelds, operator interfaces,
any DirectNET or MODBUS
master or slave
The mode switch on the DL350 CPUs provide positions for enabling and disabling
program changes in the CPU. Unless the mode switch is in the TERM position, RUN
and STOP mode changes will not be allowed by any interface device, (handheld
programmer, DirectSOFT programing package or operator interface). If the switch is in
the TERM position and no program password is in effect, all operating modes as well as
program access will be allowed through the programming or monitoring device.
Mode--switch Position CPU Action
RUN (Run Program) CPU is forced into the RUN mode if no errors are encountered. No
changes are allowed by the attached programming/monitoring device.
TERM (Terminal) RUN, PROGRAM and the TEST modes are available. Mode and
program changes are allowed by the programming/monitoring device.
STOP (Stop Program) CPU is forced into the STOP mode. No change or monitoring is
allowed by the programming/monitoring device.
There are two ways to change the CPU mode.
1. Use the CPU mode switch to select the operating mode.
2. Place the CPU mode switch in the TERM position and use a programming
device to change operating modes. In this position, you can change
between Run and Program modes.
The status indicator LEDs on the CPU front panels have specific functions which can
help in programming and troubleshooting.
Indicator Status Meaning
PWR ON Power good
RUN ON CPU is in Run Mode
RUN FLASHING CPU is in Firmware upgrade mode
CPU ON CPU self diagnostics error
BATT ON CPU battery voltage is low
TX1 ON Transmitting Data from Port 1
RX1 ON Receiving Data at port 1
TX2 ON Transmitting Data from Port 2
RX2 ON Receiving Data at Port 2
Mode Switch
Functions
Status Indicators
CPU Specifications
and Operation
3--5
CPU Specifications and Operation
DL350 User Manual, 2nd Edition
The operating parameters for Port 1 on the DL350 CPU are fixed.
S6 Pin female modular (RJ12 phone jack) type connector
SDirectNet (slave), K--sequence protocol
SRS232C, 9600 baud
SConnect to DirectSOFT, D2--HPP, DV1000 or DirectNET master
Port 1 Pin Descriptions (DL350 only)
1 0V Power (--) connection (GND)
2 5V Power (+) connection
3 RXD Receive Data (RS232C)
4 TXD Transmit Data (RS232C
5 5V Power (+) connection
6 0V Power (--) connection (GND)
6-pin Female
Modular Connector
6
1
Port 2 on the DL350 CPU is located on the 25 pin D-shell connector. It is configurable
using AUX functions on a programming device.
S25 Pin female D type connector
SProtocol: K sequence, DirectNET Master/Slave, MODBUS RTU
Master/Slave, Remote I/O, non--procedure
SRS232C, non-isolated, distance within 15 m (approx. 50 feet)
SRS422C, non-isolated, distance within 1000 m
SUp to 38.4K baud
SAddress selectable (1--90)
SConnects to DirectSOFT, operator interfaces, any DirectNETor
MODBUS master or slave
25-pin Female
D Connector
Port 2 Pin Descriptions (DL350 CPU)
1 not used
2 TXD Transmit Data (RS232C)
3 RXD Receive Data (RS232C)
4 RTS Ready to Send (RS--232C)
5 CTS Clear to Send (RS--232C)
6 not used
7 0V Power (--) connection (GND)
8 0V Power (--) connection (GND)
9 RXD + Receive Data + (RS--422)
10 RXD -- Receive Data (RS--422)
11 CTS + Clear to Send + (RS422)
12 TXD + Transmit Data + (REMIO)
13 TXD -- Transmit Data -- (REMIO)
114
13 25
Port 2 Pin Descriptions (Cont’d)
14 TXD + Transmit Data + (RS--422
15 not used
16 TXD -- Transmit Data -- (RS--422)
17 not used
18 RTS -- Request to Send -- (RS--422)
19 RTS + Request to Send -- (RS--422)
20 not used
21 not used
22 not used
23 CTS -- Clear to Send -- (RS--422)
24 RXD + Receive Data + (REMIO)
25 RXD -- Receive Data -- (REMIO)
Port 1
Specifications
Port 2
Specifications
CPU Specifications
and Operation
3--6 CPU Specifications and Operation
DL350 User Manual, 2nd Edition
Using Battery Backup
An optional lithium battery is available to maintain the system RAM retentive
memory when the DL305 system is without external power. Typical CPU battery life
is five years, which includes PLC runtime and normal shutdown periods. However,
consider installing a fresh battery if your battery has not been changed recently and
the system will be shutdown for a period of more than ten days.
NOTE: Before installing or replacing your CPU battery, back-up your V-memory and
system parameters. You can do this by using DirectSOFT to save the program,
V-memory, and system parameters to hard/floppy disk on a personal computer.
To install the D2--BAT--1 CPU battery in the
DL350 CPU:
1. Press the retaining clip on the battery door
down and swing the battery door open.
2. Place the battery into the coin--type slot.
3. Close the battery door making sure that it
locks securely in place.
4. Make a note of the date the battery was
installed.
DL350
WARNING: Do not attempt to recharge the battery or dispose of an old battery
by fire. The battery may explode or release hazardous materials.
The battery can be enabled by setting bit 12 in V7633 (B7633.12) ON (see example
below). In this mode the battery Low LED will come on when the battery voltage is
less than 2.5VDC (SP43) and error E41 will occur. In this mode the CPU will maintain
the data in C,S,T,CT, and V--memory when power is removed from the CPU,
provided the battery is good. The use of a battery can also determine which
operating mode is entered when the system power is connected. See CPU Setup,
which is discussed later in this chapter.
If you have installed a battery, the battery circuit can be disabled by turning OFF
B7633.12. However, if you have a battery installed and select “No Battery”
operation, the battery LED will not turn on if the battery voltage is low.
Y0
OUT
SP0
OUT
B7633.12
LD
K1000
SP43 SP4
Battery Low Lamp
This rung will flash Y0 if
the battery gets low.
This rung enables the
battery operation.
Enabling the
Battery Backup
CPU Specifications
and Operation
3--7
CPU Specifications and Operation
DL350 User Manual, 2nd Edition
CPU Setup
The CPU must be installed in the first slot in the base (closest to the power supply).
You cannot install the CPU in any other slot. When inserting the CPU into the base,
align the PC board with the grooves on the top and bottomof the base. Push the CPU
straight into the base until it is firmly seated in the backplane connector.
CPU must reside in first slot!
WARNING: To minimize the risk of electrical shock, personal injury, or
equipment damage, always disconnect the system power before installing or
removing any system component.
The Handheld programmer is connected to the CPU with a handheld programmer
cable. You can connect the Handheld to port 1 on a DL350 CPU. The handheld
programmer is shipped with a cable. The cable is approximately 6.5 feet (200 cm).
Connect Handheld to Port 1
If you are using a Personal Computer with the DirectSOFTprogramming package,
you can use either the top or bottom port.
Connect PC to either Port
Installing the CPU
Connecting the
Programming
Devices
CPU Specifications
and Operation
3--8 CPU Specifications and Operation
DL350 User Manual, 2nd Edition
Many CPU setup 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. Appendix A provides a description of the AUX functions.
You can access the AUX Functions from DirectSOFTor from the Handheld
Programmer. The manuals for those products provide step-by-step procedures for
accessing the AUX Functions. Some of these AUX Functions are designed
specifically for the Handheld Programmer setup, so they will not be needed (or
available) with the DirectSOFT package. The following table shows a list of the
Auxiliary functions for the different CPUs and the Handheld Programmer. Note, the
Handheld Programmer may have additional AUX functions that are not supported
with the DL305 CPUs.
AUX Function and Description 350 HPP
AUX 2* — RLL Operations
21 Check Program --
22 Change Reference --
23 Clear Ladder Range --
24 Clear All Ladders --
AUX 3* — V-Memory Operations
31 Clear V Memory --
AUX 4* — I/O Configuration
41 Show I/O Configuration --
42 I/O Diagnostics --
44 Power-up I/O Configura-
tion Check
--
45 Select Configuration --
AUX 5* — CPU Configuration
51 Modify Program Name --
52 Display / Change Calen-
dar
--
53 Display Scan Time --
54 Initialize Scratchpad --
55 Set Watchdog Timer --
56 Set CPU Network Address --
57 Set Retentive Ranges --
58 Test Operations --
59 Bit Override --
5B Counter Interface Config. --
5C Display Error History --
AUX Function and Description 350 HPP
AUX 6* — Handheld Programmer Configura-
tion
61 Show Revision Numbers
62 Beeper On / Off  
65 Run Self Diagnostics  
AUX 7* — EEPROM Operations
71 Copy CPU memory to
HPP EEPROM
 
72 Write HPP EEPROM to CPU  
73 Compare CPU to
HPP EEPROM
 
74 Blank Check (HPP EEPROM)  
75 Erase HPP EEPROM  
76 Show EEPROM Type
(CPU and HPP)
 
AUX 8* — Password Operations
81 Modify Password --
82 Unlock CPU --
83 Lock CPU --
supported
not supported
-- not applicable
Auxiliary Functions
CPU Specifications
and Operation
3--9
CPU Specifications and Operation
DL350 User Manual, 2nd Edition
Before you enter a new program, you should always clear ladder memory. You can
use AUX Function 24 to clear the complete program.
You can also use other AUX functions to clear other memory areas.
SAUX 23 — Clear Ladder Range
SAUX 24 — Clear all Ladders
SAUX 31 — Clear V-Memory
The DL350 also has a Clock / Calendar that can be used for many purposes. If you
need to use this feature there are also AUX functions available that allow you set the
date and time. For example, you would use AUX 52, Display/Change Calendar to set
the time and date with the Handheld Programmer. With DirectSOFT you would use
the PLC Setup menu options using K--Sequence protocol only.
The CPU uses the following format to
display the date and time.
SDate — Year, Month, Date, Day of
week (0 -- 6, Sunday thru Saturday)
STime — 24 hour format, Hours,
Minutes, Seconds
23:08:17 97/05/20
Handheld Programmer Display
You can use the AUX function to change any component of the date or time.
However, the CPU will not automatically correct any discrepancy between the date
and the day of the week. For example, if you change the date to the 15thof the month
and the 15th is on a Thursday, you will also have to change the day of the week
(unless the CPU already shows the date as Thursday). The day of the week can only
be set using the handheld programmer.
The DL350 CPU maintains system parameters in a memory area referred to as the
“scratchpad”. In some cases, you may make changes to the system setup that will be
stored in system memory. For example, if you specify a range of Control Relays
(CRs) as retentive, these changes are stored.
AUX 54 resets the system memory to the default values.
WARNING: You may never have to use this feature unless you want to clear
any setup information that is stored in system memory. Usually, you’ll only
need to initialize the system memory if you are changing programs and the old
program required a special system setup. You can usually change from
program to program without ever initializing system memory.
Remember, this AUX function will reset all system memory. If you have set
special parameters such as retentive ranges, etc. they will be erased when
AUX 54 is used. Make sure you that you have considered all ramifications of
this operation before you select it.
Clearing an
Existing Program
Setting the Clock
and Calendar
Initializing System
Memory
CPU Specifications
and Operation
3--10 CPU Specifications and Operation
DL350 User Manual, 2nd Edition
The DL350 CPU has a built in DirectNET port. You can use the Handheld
Programmer to set the network address for the port and the port communication
parameters. The default settings are:
SStation Address 1
SHex Mode
SOdd Parity
S9600 Baud
The DirectNET Manual provides additional information about choosing the
communication settings for network operation.
The DL350 CPU provides 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:
M
e
m
o
r
y
A
r
e
a
DL350
M
emory
A
rea Default Range Avail. Range
Control Relays C1000 -- C1777 C0 -- C1777
V--Memory V1400 -- V37777 V0 -- V37777
Timers None by default T0 -- T377
Counters CT0 -- CT177 CT0 -- CT177
Stages None by default S0 -- S1777
You can use AUX 57 to set the retentive ranges. You can also use DirectSOFT
menus to select the retentive ranges.
WARNING: The DL350 CPU does not come with a battery. The super capacitor
will retain the values in the event of a power loss, but only for a short period of
time, depending on conditions. If the retentive ranges are important for your
application, make sure you obtain the optional battery.
The DL350 CPU allows you to use a password to help minimize the risk of
unauthorized program and/or data changes. The DL350 offers multi--level
passwords for even more security. Once you enter a password you can “lock” the
CPU against access. Once the CPU is locked you must enter the password before
you can use a programming device to change any system parameters.
You can select an 8-digit numeric password. The CPUs are shipped from the factory
with a password of 00000000. All zeros removes the password protection. If a
password has been entered into the CPU you cannot enter all zeros to remove it.
Once you enter the correct password, you can change the password to all zeros to
remove the password protection.
For more information on passwords, see Appendix A, Auxiliary Functions, Aux 8* --
Password Operations.
WARNING: Make sure you remember your password. If you forget your
password you will not be able to access the CPU. The CPU must be returned to
AutomationDirect to have the entire memory cleared in order to clear the
password which is the policy of the AutomationDirect.
Setting the CPU
Network Address
Setting Retentive
Memory Ranges
Password
Protection
CPU Specifications
and Operation
3--11
CPU Specifications and Operation
DL350 User Manual, 2nd Edition
CPU Operation
Achieving the proper control for your equipment or process requires a good
understanding of how DL350 CPUs control all aspects of system operation. The flow
chart below shows the main tasks of the CPU operating system. In this section, we
will investigate four aspects of CPU operation:
SCPU Operating System — the CPU manages
all aspects of system control.
SCPU Operating Modes — The three primary
modes of operation are Program Mode, Run
Mode, and Test Mode.
SCPU Timing — The two important areas we
discuss are the I/O response time and the
CPU scan time.
SCPU Memory Map — The CPUs memory map
shows the CPU addresses of various system
resources, such as timers, counters, inputs,
and outputs.
At powerup, the CPU initializes the internal
electronic hardware. Memory initialization starts
with examining the retentive memory settings. In
general, the contents of retentive memory is
preserved, and non-retentive memory is initialized
to zero (unless otherwise specified).
After the one-time powerup tasks, the CPU begins
the cyclical scan activity. The flowchart to the right
shows how the tasks differ, based on the CPU mode
and the existence of any errors. The “scan time” is
defined as the average time around the task loop.
Note that the CPU is always reading the inputs,
even during program mode. This allows
programming tools to monitor input status at any
time.
The outputs are only updated in Run mode. In
program mode, they are in the off state.
In Run Mode, the CPU executes the user ladder
program. Immediately afterwards, any PID loops
which are configured are executed (DL350 only).
Then the CPU writes the output results of these two
tasks to the appropriate output points.
Error detection has two levels. Non-fatal errors are
reported, but the CPU remains in its current mode. If
a fatal error occurs, the CPU is forced into program
mode and the outputs go off.
YES
Power up
Initialize hardware
Check I/O module
config. and verify
Initialize various memory
based on retentive
configuration
Update input
Read input data from
Specialty and Remote I/O
Service peripheral
PGM Mode?
RUN
Execute ladder program
Update output
Write output data to
Specialty and Remote I/O
Do diagnostics
OK
NO
NO
Fatal error
Force CPU into
PGM mode
OK?
Report the error, set flag,
register, turn on LED
YES
CPU Bus Communication
Update Clock / Calendar
PID Operations (DL350)
CPU Operating
System
CPU Specifications
and Operation
3--12 CPU Specifications and Operation
DL350 User Manual, 2nd Edition
In Program Mode the CPU does not
execute the application program or update
the output modules. The primary use for
Program Mode is to enter or change an
application program. You also use the
program mode to set up CPU parameters,
such as the network address, retentive
memory areas, etc. Download Program
You can use the mode switch on the DL350 CPU to select Program Mode operation.
Or, with the switch in TERM position, you can use a programming device such as the
Handheld Programmer to place the CPU in Program Mode.
In Run Mode, the CPU executes the
application program, does PID
calculations for configured PID loops
(DL350 only), and updates the I/Osystem.
You can perform many operations during
Run Mode. Some of these include:
SMonitor and change I/O point status
SUpdate timer/counter preset values
SUpdate Variable memory locations
Run Mode operation can be divided into
several key areas. It is very important you
understand how each of these areas of
execution can affect the results of your
application program solutions.
You can use the mode switch to select Run
Mode operation. Or, with the mode switch
in TERM position, you can use a
programming device, such as the
Handheld Programmer to place the CPU
in Run Mode.
Read Inputs
Read Inputs from Specialty I/O
Solve the Application Program
Write Outputs
Diagnostics
Service Peripherals, Force I/O
Write Outputs to Specialty I/O
CPU Bus Communication
Update Clock, Special Relays
Solve PID Equations (DL350)
You can also edit the program during Run Mode. The Run Mode Edits are not
“bumpless”. Instead, the CPU maintains the outputs in their last state while it accepts
the new program information. If an error is found in the new program, then the CPU
will turn all the outputs off and enter the Program Mode.
WARNING: Only authorized personnel fully familiar with all aspects of the
application should make changes to the program. Changes during Run Mode
become effective immediately. Make sure you thoroughly consider the impact
of any changes to minimize the risk of personal injury or damage to
equipment.
Program Mode
Operation
Run Mode
Operation
CPU Specifications
and Operation
3--13
CPU Specifications and Operation
DL350 User Manual, 2nd Edition
The CPU reads the status of all inputs, then stores it in the image register. Input
image register locations are designated with an X followed by a memory location.
Image register data is used by the CPU when it solves the application program.
Of course, an input may change after the CPU has read the inputs. Generally, the
CPU scan time is measured in milliseconds. If you have an application that cannot
wait until the next I/O update, you can use Immediate Instructions. These do not use
the status of the input image register to solve the application program. The
Immediate instructions immediately read the input status directly from I/O modules.
However, this lengthens the program scan since the CPU has to read the I/O point
status again. A complete list of the Immediate instructions is included in Chapter 5.
A
fter the CPU reads the inputs
f
rom the
input modules, it reads any input point
data from any Specialty modules that are
installed. This is also the portion of the
scan that reads the input status from
Remote I/O racks.
___
RSSS
DL305
DL205
NOTE: It may appear the Remote I/O point status is updated every scan. This is not
quite true. The CPU will receive information from the Remote I/O Master module
every scan, but the Remote Master may not have received an update from all the
Remote slaves. Remember, the Remote I/O link is managed by the Remote Master,
not the CPU.
After the CPU reads the inputs from the input modules, it reads any attached
peripheral devices. This is primarily a communications service for any attached
devices. For example, it would read a programming device to see if any input, output,
or other memory type status needs to be modified.
SForcing from a peripheral -- not a permanent force, good only for one
scan
Regular Forcing — This type of forcing can temporarily change the status of a
discrete bit. For example, you may want to force an input on, even though it is really
off. This allows you to change the point status that was stored in the image register.
This value will be valid until the image register location is written to during the next
scan. This is primarily useful during testing situations when you need to force a bit on
to trigger another event.
The DL350 CPUs has an internal real-time clock and calendar timer which is
accessible to the application program. Special V-memory locations hold this
information. This portion of the execution cycle makes sure these locations get
updated on every scan. Also, there are several different Special Relays, such as
diagnostic relays, etc., that are also updated during this segment.
Read Inputs
Read Inputs from
Specialty and
Remote I/O
Service Peripherals
and Force I/O
Update Clock,
Special Relays,
and Special
Registers
CPU Specifications
and Operation
3--14 CPU Specifications and Operation
DL350 User Manual, 2nd Edition
The CPU evaluates each instruction in the
application program during this segment
of the scan cycle. The instructions define
the relationship between input conditions
and the system outputs.
The CPU begins with the first rung of the
ladder program, evaluating it from left to
right and from top to bottom. It continues,
rung by rung, until it encounters the END
coil instruction. At that point, a new image
for the outputs is complete.
Read Inputs
Read Inputs from Specialty I/O
Solve the Application Program
Write Outputs
Diagnostics
Service Peripherals, Force I/O
Write Outputs to Specialty I/O
CPU Bus Communication
Update Clock, Special Relays
Solve PID equations (DL350)
X0 X1 Y0
OUT
C0
C100 LD K10
X5 X10 Y3
OUT
END
The internal control relays (C), the stages (S), and the variable memory (V) are also
updated in this segment.
You may recall the CPU may have obtained and stored forcing information when it
serviced the peripheral devices. If any I/O points or memory data have been forced,
the output image register also contains this information.
NOTE: If an output point was used in the application program, the results of the
program solution will overwrite any forcing information that was stored. For example,
if Y0 was forced on by the programming device, and a rung containing Y0 was
evaluated such that Y0 should be turned off, then the output image register will show
that Y0 should be off. Of course, you can force output points that are not used in the
application program. In this case, the point remains forced because there is no
solution that results from the application program execution.
The DL350 CPU can process up to 4 PID loops. The loop calculations are run as a
separate task from the ladder program execution, immediately following it. Only
loops which have been configured are calculated, and then only according to a
built-in loop scheduler. The sample time (calculation interval) of each loop is
programmable. Please refer to Chapter 8, PID Loop Operation, for more on the
effects of PID loop calculation on the overall CPU scan time.
Once the application program has solved the instruction logic and constructed the
output image register, the CPU writes the contents of the output image register to the
corresponding output points located in the local CPU base or the local expansion
bases. Remember, the CPU also made sure any forcing operation changes were
stored in the output image register, so the forced points get updated with the status
specified earlier.
Solve Application
Program
Solve PID
Loop Equations
Write Outputs
CPU Specifications
and Operation
3--15
CPU Specifications and Operation
DL350 User Manual, 2nd Edition
After the CPU updates the outputs in the local and expansion bases, it sends the
output point information that is required by any Specialty modules which are
installed. For example, this is the portion of the scan that writes the output status
from the image register to the Remote I/O racks.
NOTE: It may appear the Remote I/O point status is updated every scan. This is not
quite true. The CPU will send the information to the Remote I/OMaster module every
scan, but the Remote Master will update the actual remote modules during the next
communication sequence between the master and slave modules. Remember, the
Remote I/O link communication is managed by the Remote Master, not the CPU.
During this part o
f
the scan, the CPU
performs all system diagnostics and other
tasks, such as:
Scalculating the scan time
Supdating special relays
Sresetting the watchdog timer
The DL350 CPU automatically detects
and reports many different error
conditions. Appendix B contains a listing
of the various error codes available with
the DL305 system.
One of the more important diagnostic
tasks is the scan time calculation and
watchdog timer control. The DL350 CPU
has a “watchdog” timer that stores the
maximum time allowed for the CPU to
complete the solve application segment of
the scan cycle. The default value set from
the factory is 200 mS. If this time is
exceeded the CPU will enter the Program
Mode, turn off all outputs, and report the
error. For example, the Handheld
Programmer displays “E003 S/W
TIMEOUT” when the scan overrun occurs.
Read Inputs
Read Inputs from Specialty I/O
Solve the Application Program
Write Outputs
Diagnostics
Service Peripherals, Force I/O
Write Outputs to Specialty I/O
CPU Bus Communication
Update Clock, Special Relays
Solve PID Loop Equations
You can use AUX 53 to view the minimum, maximum, and current scan time. Use
AUX 55 to increase or decrease the watchdog timer value. There is also an RSTWT
instruction that can be used in the application program to reset the watch dog timer
during the CPU scan.
Write Outputs to
Specialty and
Remote I/O
Diagnostics
CPU Specifications
and Operation
3--16 CPU Specifications and Operation
DL350 User Manual, 2nd Edition
I/O Response Time
I/O response time is the amount of time required for the control system to sense a
change in an input point and update a corresponding output point. In the majority of
applications, the CPU performs this task practically instantaneously. However,
some applications do require extremely fast update times. There are four things that
can affect the I/O response time:
SThe point in the scan period when the field input changes states
SInput module Off to On delay time
SCPU scan time
SOutput module Off to On delay time
The I/O response time is shortest when the module senses the input change before
the Read Inputs portion of the execution cycle. In this case the input status is read,
the application program is solved, and the output point gets updated. The following
diagram shows an example of the timing for this situation.
Solve
Program
Read
Inputs Write
Outputs
Solve
Program
Scan Solve
Program
Field Input
Input Module
Off/On Delay
CPU Reads
Inputs
Output Module
Off/On Delay
I/O Response Time
Scan
Solve
Program
CPU Writes
Outputs
In this case, you can calculate the response time by simply adding the following
items.
Input Delay + Scan Time + Output Delay = Response Time
The I/O response time is longest when the module senses the input change after the
Read Inputs portion of the execution cycle. In this case the new input status does not
get read until the following scan. The following diagram shows an example of the
timing for this situation.
In this case, you can calculate the response time by simply adding the following
items.
Input Delay +(2 x Scan Time) + Output Delay = Response Time
Is Timing Important
for Your
Application?
Normal Minimum
I/O Response
Normal Maximum
I/O Response
CPU Specifications
and Operation
3--17
CPU Specifications and Operation
DL350 User Manual, 2nd Edition
Solve
Program
Read
Inputs Write
Outputs
Solve
Program
Scan Solve
Program
Field Input
Input Module
Off/On Delay
CPU Reads
Inputs
Output Module
Off/On Delay
I/O Response Time
Scan
Solve
Program
CPU Writes
Outputs
There are a few things you can do the help improve throughput.
SChoose instructions with faster execution times
SUse immediate I/O instructions (which update the I/O points during the
ladder program execution segment)
SChoose modules that have faster response times
Immediate I/O instructions are probably the most useful technique. The following
example shows immediate input and output instructions, and their effect.
Solve
Program
Read
Input
Immediate
Normal
Write
Outputs
Solve
Program
Scan Solve
Program
Field Input
Input Module
Off/On Delay
Output Module
Off/On Delay
I/O Response Time
Scan
Solve
Program
Normal Read
Input Write
Output
Immediate
In this case, you can calculate the response time by simply adding the following
items.
Input Delay + Instruction Execution Time + Output Delay = Response Time
The instruction execution time is calculated by adding the time for the immediate
input instruction, the immediate output instruction, and all instructions in between.
NOTE: When the immediate instruction reads the current status from a module, it
uses the results to solve that one instruction without updating the image register.
Therefore, any regular instructions that follow will still use image register values. Any
immediate instructions that follow will access the module again to update the status.
Improving
Response Time
CPU Specifications
and Operation
3--18 CPU Specifications and Operation
DL350 User Manual, 2nd Edition
CPU Scan Time Considerations
The scan time covers all the cyclical
tasks that are performed by the operating
system. You can use DirectSOFT or the
Handheld Programmer to display the
minimum, maximum, and current scan
times that have occurred since the
previous Program Mode to Run Mode
transition. This information can be very
important when evaluating the
performance of a system.
As shown previously, there are several
segments that make up the scan cycle.
Each of these segments requires a
certain amount of time to complete. Of all
the segments, the only one you really
have the most control over is the amount
of time it takes to execute the application
program. This is because different
instructions take different amounts of
time to execute. So, if you think you need
a faster scan, then you can try to choose
faster instructions.
Your choice of I/O modules and system
configuration, such as expansion or
remote I/O, can also affect the scan time.
However, these things are usually
dictated by the application.
For example, if you have a need to count
pulses at high rates of speed, then you’ll
probably have to use a High-Speed
Counter module. Also, if you have I/O
points that need to be located several
hundred feet from the CPU, then you
need remote I/O because it’s much faster
and cheaper to install a single remote I/O
cable than it is to run all those signal
wires for each individual I/O point.
The following paragraphs provide some
general information on how much time
some of the segments can require.
YES
Power up
Initialize hardware
Check I/O module
config. and verify
Initialize various memory
based on retentive
configuration
Update input
Read input data from
Specialty and Remote I/O
Service peripheral
PGM Mode?
RUN
Execute ladder program
Update output
Write output data to
Specialty and Remote I/O
Do diagnostics
OK
NO
NO
Fatal error
Force CPU into
PGM mode
OK?
Report the error, set flag,
register, turn on LED
YES
CPU Bus Communication
Update Clock / Calendar
PID Equations (DL350)
CPU Specifications
and Operation
3--19
CPU Specifications and Operation
DL350 User Manual, 2nd Edition
Communication requests can occur at any time during the scan, but the CPU only
“logs” the requests for service until the Service Peripherals portion of the scan. The
CPU does not spend any time on this if there are no peripherals connected.
To Service Request DL350
Minimum 1.2 μs
Maximum 1.5-- μs
Communication requests can occur at any time during the scan, but the CPU only
“logs” the requests for service until the Service Peripherals portion of the scan. The
CPU does not spend any time on this if there are no peripherals connected.
To Log Request (anytime) DL350
Nothing
Connected Min.&Max. 0μs
P
o
r
t
1
Send Min. / Max. 6.8/12.6 μs
P
or
t
1
Rec.Min./Max. 9.2/972 ms
P
o
r
t
2
Send Min. / Max. 6.8/12.6 μs
P
or
t
2
Rec.Min./Max. 9.2/972 ms
Some specialty modules can also communicate directly with the CPU via the CPU
bus. During this portion of the cycle the CPU completes any CPU bus
communications. The actual time required depends on the type of modules installed
and the type of request being processed.
NOTE: Some specialty modules can have a considerable impact on the CPU scan
time. If timing is critical in your application, consult the module documentation for any
information concerning the impact on the scan time.
The clock, calendar, and special relays are updated and loaded into special
V-memory locations during this time. This update is performed during both Run and
Program Modes.
Modes DL350
P
r
o
g
r
a
m
M
o
d
e
Minimum 79.0 μs
P
rogram
M
o
d
eMaximum 79.0 μs
R
u
n
M
o
d
e
Minimum 79.0 μs
R
un
M
o
d
eMaximum 79.0 μs
The DL305 CPUs perform many types of system diagnostics. The amount of time
required depends on many things, such as the number of I/O modules installed, etc.
The following table shows the minimum and maximum times that can be expected.
Diagnostic Time DL350
Minimum 104.0 μs
Maximum 139.6 μs
Intialization
Process
Service Peripherals
CPU Bus
Communication
Update Clock /
Calendar, Special
Relays, Special
Registers
Diagnostics
CPU Specifications
and Operation
3--20 CPU Specifications and Operation
DL350 User Manual, 2nd Edition
V2002
The CPU processes the program from the
top (address 0) to the END instruction.
The CPU executes the program left to
right and top to bottom. As each rung is
evaluated the appropriate image register
or memory location is updated.
The time required to solve the application
program depends on the type and number
of instructions used, and the amount of
execution overhead.
You can add the execution times for all the
instructions in your program to find the
total program execution time.
For example, the execution time for a
DL350 running the program shown would
be calculated as follows.
Instruction Time
STR X0 1.4μs
OR C0 1.0μs
ANDN X1 1.2μs
OUT Y0 7.95μs
STRN C100 1.6μs
LD K10 62μs
STRN C101 1.6μs
OUT V2002 21.0μs
STRN C102 1.6μs
LD K50 62μs
STRN C103 1.6μs
OUT V2006 21.0μs
STR X5 1.4μs
ANDN X10 1.2μs
OUT Y3 7.95μs
END 16μs
TOTAL 210.5μs
X0 X1 Y0
OUT
C0
C100 LD K10
C101 OUT
C102 LD K50
C103 OUT
V2006
X5 X10 Y3
OUT
END
Appendix C provides a complete list of instruction execution times for the DL350
CPU.
Program Control Instructions — the DL350 CPU offers additional instructions that
can change the way the program executes. These instructions include FOR/NEXT
loops, Subroutines, and Interrupt Routines. These instructions can interrupt the
normal program flow and effect the program execution time. Chapter 5 provides
detailed information on how these different types of instructions operate.
Application
Program Execution
CPU Specifications
and Operation
3--21
CPU Specifications and Operation
DL350 User Manual, 2nd Edition
PLC Numbering Systems
If you are a new PLC user or are using
AutomationDirect PLCs for the first time,
please take a moment to study how our
PLCs use numbers. You will find that each
PLC manufacturer has their own
conventions on the use of numbers in their
PLCs. Take a moment to familiarize
yourself with how numbers are used in
AutomationDirect PLCs. The
information you learn here applies to all
our PLCs!
1482 0402
1001011011
7
3
3A9
??
??
BCD
binary
decimal
octal
hexadecimal
ASCII
1011
--961428
177
?
--300124 A72B ?
49.832
?
PLCs store and manipulate numbers in binary form: ones and zeros. So why do we
have numbers in so many different forms? Numbers have meaning, and some
representations are more convenient than others for particular purposes.
Sometimes we use numbers to represent a size or amount of something. Other
numbers refer to locations or addresses, or to time. In science we attach engineering
units to numbers to give a particular meaning (see Appendix I for numbering system
details).
PLCs offer a fixed amount of resources, depending on the model and configuration.
The word “resources” includes variable memory (V-memory), I/O points, timers,
counters, etc. Most modular PLCs allow you to add I/O points in groups of eight. In
fact, all the resources of our PLCs are counted in octal. It’s easier for computers to
count in groups of eight than ten, because eight is an even power of 2.
Octal means simply counting in groups o
f
eight things at a time. In the figure to the
right, there are eight circles. The quantity
in decimal is “8”, but in octal it is “10” (8 and
9 are not valid in octal). In octal, “10”
means 1 group of 8 plus 0 (no individuals).
Decimal12345678
Octal 123456710
In the figure below, ther are two groups of eight circles. Counting in octal ther are“20”
items, meaning 2 groups of eight, plus 0 individuals Avoid saying “twenty”, say
“two--zero octal”. This makes a clear distinction between number systems.
Decimal 12345678
Octal 123456710
9 10111213141516
11 12 13 14 15 16 17 20
After counting PLC resources, it’s time to access PLC resources (there is a
difference). The CPU instruction set accesses resources of the PLC using octal
addresses. Octal addresses are the same as octal quantities, except they start
counting at zero. The number zero is significant to a computer, so we don’t skip it.
The circles are in an array of square
containers to the right. To access a
resource, the PLC instruction will address
its location using the octal references
shown. If these were counters, “CT14”
would access the black circle location.
01234567
2X
1X
X
X=
PLC Resources
CPU Specifications
and Operation
3--22 CPU Specifications and Operation
DL350 User Manual, 2nd Edition
Variable memory (called “V-memory”) stores data for the ladder program and for
configuration settings. V-memory locations and V-memory addresses are the same
thing, and are numbered in octal. For example, V2073 is a valid location, while
V1983 is not valid (“9” and “8” are not valid octal digits).
Each V-memory location is one data word wide, meaning 16 bits. For configuration
registers, our manuals will show each bit of a V-memory word. The least significant
bit (LSB) will be on the right, and the most significant bit (MSB) on the left. The word
“significant”, refers to the relative binary weighting of the bits.
0100111000101001
MSB LSB
V-memory data
(binary)
V-memory address
(octal)
V2017
V-memory data is 16-bit binary, but the data registers are rarely programmmed one
bit at a time. Instructions or viewing tools work with binary, decimal, octal, and
hexadecimal numbers. All of these are converted and stored as binary for us.
A frequently-asked question is “How do I tell if a number is binary, octal, BCD, or
hex”? The answer is that we usually cannot tell by looking at the data... but it does not
really matter. What matters is: the source or mechanism which writes data into a
V-memory location and the thing which later reads it must both use the same data
type (i.e., octal, hex, binary, or whatever). The V-memory location is a storage box...
that’s all. It does not convert or move the data on its own.
Since humans naturally count in decimal, we prefer to enter and view PLC data in
decimal as well (via operator interfaces). However, computers are more efficient in
using pure binary numbers. A compromise solution between the two is
Binary-Coded Decimal (BCD) representation. A BCD digit ranges from 0 to 9, and is
stored as four binary bits (a nibble). This permits each V-memory location to store
four BCD digits, with a range of decimal numbers from 0000 to 9999.
0100 1001 0011 0110
49 36
V-memory storage
BCD number
8421 8421 8421 8421
In a pure binary sense, a 16-bit word represents numbers from 0 to 65535. In storing
BCD numbers, the range is reduced to 0 to 9999. Many math instructions use BCD
data, and DirectSOFT and the handheld programmer allow us to enter and view
data in BCD. Special RLL instructions convert from BCD to binary, or visa--versa.
Hexadecimal numbers are similar to BCD numbers, except they utilize all possible
binary values in each 4-bit digit. They are base-16 numbers so we need 16 different
digits. To extend our decimal digits 0 through 9, we use A through F as shown.
8 9 10 11 12 13 14 1501234567
89ABCDEF01234567
Decimal
Hexadecimal
A 4-digit hexadecimal number can represent all 65536 values in a V-memory word.
The range is from 0000 to FFFF (hex). PLCs often need this full range for sensor
data, etc. Hexadecimal is a convenient way for humans to view full binary data.
1010 0111 1111 0100
A7 F4
V-memory storage
Hexadecimal number
V--Memory
Binary-Coded
Decimal Numbers
Hexadecimal
Numbers
CPU Specifications
and Operation
3--23
CPU Specifications and Operation
DL350 User Manual, 2nd Edition
Memory Map
With any PLC system, you generally have many different types of information to
process. This includes input device status, output device status, various timing
elements, parts counts, etc. It is important to understand how the system represents
and stores the various types of data. For example, you need to know how the system
identifies input points, output points, data words, etc. The following paragraphs
discuss the various memory types used in the DL350 CPU. A memory map overview
follows the memory descriptions.
All memory locations or areas are
numbered in Octal (base 8). For
example, the diagram shows how the
octal numbering system works for the
discrete input points. Notice the octal
system does not contain any numbers
with the digits 8 or 9.
X0 X1 X2 X3 X4 X5 X6 X7
X10 X11 X12 X13 X14 X15 X16 X17
X0
X17
X20
X37
Y40
Y57
As you examine the different memory
types, you’ll notice two types of memory
in the DL350, discrete and word memory.
Discrete memory is one bit that can be
either a 1 or a 0. Word memory is referred
to as V--memory (variable) and is a 16-bit
location normally used to manipulate
data/numbers, store data/numbers, etc.
Some information is automatically stored
in V--memory. For example, the timer
current values are stored in V--memory. 0 110100000010010
X0
Discrete -- On or Off, 1 bit
Word Locations -- 16 bits
The discrete memory area is for inputs, outputs, control relays, special relays,
stages, timer status bits and counter status bits. However, you can also access the
bit data types as a V-memory word. Each V-memory location contains 16
consecutive discrete locations. For example, the following diagram shows how the X
input points are mapped into V-memory locations.
X0X1X2X3X4X5X6X7X10X11X12X13X14X15X16X17
0123456789101112131415 V40400
Bit #
16 Discrete (X) Input Points
These discrete memory areas and their corresponding V memory ranges are listed
in the memory area table for the DL350 CPU in this chapter.
Octal Numbering
System
Discrete and Word
Locations
V--Memory
Locations for
Discrete Memory
Areas
CPU Specifications
and Operation
3--24 CPU Specifications and Operation
DL350 User Manual, 2nd Edition
The discrete input points are noted by an
X data type. There are up to 512 discrete
input points available with the DL350
CPU. In this example, the output point Y0
will be turned on when input X0
energizes.
Y0
OUT
X0
The discrete output points are noted by a
Y data type. There are up to 512 discrete
output points available with the DL350
CPU. In this example, output point Y1 will
turn on when input X1 energizes.
Y1
OUT
X1
Control relays are discrete bits normally
used to control the user program. The
control relays do not represent a real
world device, that is, they cannot be
physically tied to switches, output coils,
etc. They are internal to the CPU. Control
relays can be programmed as discrete
inputs or discrete outputs. These
locations are used in programming the
discrete memory locations (C) or the
corresponding word location which has
16 consecutive discrete locations.
In this example, memory location C5 will
energize when input X10 turns on. The
second rung shows a simple example of
how to use a control relay as an input.
C5
OUT
X10
Y10
OUT
C5
Y20
OUT
The amount of timers available depends
on the model of CPU you are using. The
tables at the end of this section provide
the number of timers for the DL350.
Regardless of the number of timers, you
have access to timer status bits that
reflect the relationship between the
current value and the preset value of a
specified timer. The timer status bit will
be on when the current value is equal or
greater than the preset value of a
corresponding timer.
When input X0 turns on, timer T1 will
start. When the timer reaches the preset
of 3 seconds (K of 30) timer status
contact T1 turns on. When T1 turns on,
output Y12 turns on.
Y12
OUT
T1
TMR T1
K30
X0
Input Points
(X Data Type)
Output Points
(Y Data Type)
Control Relays
(C Data Type)
Timers and
Timer Status Bits
(T Data type)
CPU Specifications
and Operation
3--25
CPU Specifications and Operation
DL350 User Manual, 2nd Edition
V1 K100
As mentioned earlier, some information
is automatically stored in V--memory.
This is true for the current values
associated with timers. For example, V0
holds the current value for Timer 0, V1
holds the current value for Timer 1, etc.
The primary reason for this is
programming flexibility. The example
shows how you can use relational
contacts to monitor several time intervals
from a single timer.
TMR T1
K1000
X0
V1 K30 Y12
OUT
V1 K50 Y13
OUT
V1 K75 Y14
OUT
The amount of counters available
depends on the model of CPU you are
using. The tables at the end of this
section provide the number of counters
for the DL350. Regardless of the number
of counters, you have access to counter
status bits that reflect the relationship
between the current value and the preset
value of a specified counter. The counter
status bit will be on when the current
value is equal to or greater than the
preset value of a corresponding counter.
Each time contact X0 transitions from off
to on, the counter increments by one. If
X1 comes on, the counter is reset to zero.
When the counter reaches the preset of
10 counts (K of 10) counter status
contact CT3 turns on. When CT3 turns
on, output Y12 turns on.
Y12
OUT
CT3
X0 CNT CT3
K10
X1
V1003 K8
Like the timers, the counter current
values are also automatically stored in
V--memory. For example, V1000 holds
the current value for Counter CT0,
V1001 holds the current value for
Counter CT1, etc.
The primary reason for this is
programming flexibility. The example
shows how you can use relational
contacts to monitor the counter values.
V1003 K1 Y12
OUT
V1003 K3 Y13
OUT
V1003 K5 Y14
OUT
X0 CNT CT3
K10
X1
Timer Current
Values
(V Data Type)
Counters and
Counter Status
Bits
(CT Data type)
Counter Current
Values
(V Data Type)
CPU Specifications
and Operation
3--26 CPU Specifications and Operation
DL350 User Manual, 2nd Edition
Word memory is referred to as
V--memory (variable) and is a 16-bit
location normally used to manipulate
data/numbers, store data/numbers, etc.
Some information is automatically stored
in V--memory. For example, the timer
current values are stored in V--memory.
The example shows how a four-digit
BCD constant is loaded into the
accumulator and then stored in a
V-memory location.
Word Locations -- 16 bits
X0 LD K1345
OUT V2000
1 3 4 5
Stages are used in RLLPLUS programs to
create a structured program, similar to a
flowchart. Each program Stage denotes
a program segment. When the program
segment, or Stage, is active, the logic
within that segment is executed. If the
Stage is off, or inactive, the logic is not
executed and the CPU skips to the next
active Stage. See Chapter 7 for a more
detailed description of RLLPLUS
programming.
Each Stage also has a discrete status bit
that can be used as an input to indicate
whether the Stage is active or inactive. If
the Stage is active, then the status bit is
on. If the Stage is inactive, then the status
bit is off. This status bit can also be turned
on or off by other instructions, such as the
SET or RESET instructions. This allows
you to easily control stages throughout
the pro
g
ram.
Ladder Representation
ISGS0000
Start S1
JMP
SG S0001
S2
JMP
Part Present
X1
X0
S6
JMP
X1
SG S0002
Clamp
SET
S3
JMP
Part Locked
X2
S400
Wait forStart
Check for a Part
Clamp the part
S500
JMP
Part Present
Special relays are discrete memory
locations with pre-defined functionality.
There are many different types of special
relays. For example, some aid in
program development, others provide
system operating status information, etc.
Appendix D provides a complete listing of
the special relays.
In this example, control relay C10 will
energize for 50 ms and de-energize for
50 ms because SP5 is a pre--defined
relay that will be on for 50 ms and off for
50 ms.
C10
OUT
SP5
SP4: 1 second clock
SP5: 100 ms clock
SP6: 50 ms clock
Word Memory
(V Data Type)
Stages
(S Data type)
Special Relays
(SP Data Type)
CPU Specifications
and Operation
3--27
CPU Specifications and Operation
DL350 User Manual, 2nd Edition
DL350 System V-memory
System
V-memory
Description of Contents Default Values / Ranges
V7620--V7627
V7620
V7621
V7622
V7623
V7624
V7625
V7626
V7627
Locations for DV--1000 operator interface parameters
Sets the V-memory location that contains the value.
Sets the V-memory location that contains the message.
Sets the total number (1 -- 16) of V-memory locations to be displayed.
Sets the V-memory location that contains the numbers to be displayed.
Sets the V-memory location that contains the character code to be displayed.
Contains the function number that can be assigned to each key.
Reserved
Reserved
V0 -- V3777
V0 -- V3777
1--16
V0 -- V3777
V0 -- V3777
V-memory for X, Y, or C
0,1,2,3,12
Default=0000
V7630--V7632 Reserved --
V7633 User defined timer interrupt/operation of battery/Binary instruction sign flag*
Bit 0--7 40H Setting Interrupt
Bit 12 ON with battery sign flag. ON use sign flag --
OFFnosignflag
Bit 15 Binary instruction sign flag. ON use sign flag --
OFFnosignflag
V7634 User defined timer interrupt
V7640 Loop Table Beginning address V1400--V7340
V7641 Number of Loops Enabled 1--4
V7642 Error Code -- V--memory Error Location for Loop Table
V7643--V7647 Reserved
V7650 Port 2 End--code setting Setting (A55A), Nonprocedure communications start.
V7651 Port 2 Data format --Non--procedure communications format setting.
V7652 Port 2 Format Type setting -- Non--procedure communications type code
setting.
V7653 Port 2 Terminate--code setting -- Non--procedure communications Termination
code setting.
V7654 Port 2 Store V--mem address -- Non--procedure communication data store
V--Memory address.
V7655 Port 2 Setup area --0--7 Comm protocol (flag 0) 8--15 Comm time
out/response delay time (flag 1)
V7656 Port 2 setup area -- 0--15 Communication (flag2, flag 3)
V7657 Port 2 setup area -- Bit to select use of parameter
V7660--V7707 Set--up Information
V7710--V7717 Reserved
V7720--V7722 Locations for DV--1000 operator interface parameters.
V7720 Titled Timer preset value pointer
V7721 Title Counter preset value pointer
V7722 HiByte-Titled Timer preset block size, LoByte-Titled Counter preset block size
V7730--V7737 For slot 0 to 7 D3--DCM
V7747 Location contains a 10ms counter. This location increments once every 10ms.
V7750 Reserved
CPU Specifications
and Operation
3--28 CPU Specifications and Operation
DL350 User Manual, 2nd Edition
System
V-memory Description of Contents
V7751 Fault Message Error Code — stores the 4-digit code used with the FAULT instruction when the
instruction is executed.
V7752 Reserved
V7753 Reserved
V7754 Reserved
V7755 Error code — stores the fatal error code.
V7756 Error code — stores the major error code.
V7757 Error code — stores the minor error code.
V7760--V7762 Reserved
V7763--V7764 Location for syntax error information.
V7765 Scan — stores the total number of scan cycles that have occurred since the last Program Mode to Run
Mode transition.
V7766 Contains the number of seconds on the clock. (00 to 59).
V7767 Contains the number of minutes on the clock. (00 to 59).
V7770 Contains the number of hours on the clock. (00 to 23).
V7771 Contains the day of the week. (Mon, Tue, etc.).
V7772 Contains the day of the month (1st, 2nd, etc.).
V7773 Contains the month. (01 to 12)
V7774 Contains the year. (00 to 99)
V7775 Scan — stores the current scan time (milliseconds).
V7776 Scan — stores the minimum scan time that has occurred since the last Program Mode to Run Mode
transition (milliseconds).
V7777 Scan — stores the maximum scan time that has occurred since the last Program Mode to Run Mode
transition (milliseconds).
The following system control relays are valid only for D3--350 CPU remote I/O setup
on Communications Port 2.
System CRs Description of Contents
C740 Completion of setups -- ladder logic must turn this relay on when it has finished writing to
the Remote I/O setup table
C741 Erase received data -- turning on this flag will erase the received data during a communica-
tion error.
C743 Re-start -- Turning on this relay will resume after a communications hang-up on an error.
C750 to C757 Setup Error -- The corresponding relay will be ON if the setup table contains an error (C750
= master, C751 = slave 1... C757=slave 7
C760 to C767 Communications Ready -- The corresponding relay will be ON if the setup table data is valid
(C760 = master, C761 = slave 1... C767=slave 7
CPU Specifications
and Operation
3--29
CPU Specifications and Operation
DL350 User Manual, 2nd Edition
Memory Type Discrete Memory
Reference
(octal)
Word Memory
Reference
(octal)
Qty.
Decimal
Symbol
Input Points X0 -- X777 V40400 -- V40437 512
Output Points Y0 -- Y777 V40500 -- V40537 512
Control Relays C0 -- C1777 V40600 -- V40677 1024
Special Relays SP0 -- SP777 V41200 -- V41237 512
Timer Current
Values None V0 -- V377 256
Timer Status Bits T0 -- T377 V41100 -- V41117 256
Counter
Current Values None V1000 -- V1177 128
Counter Status
Bits CT0 -- CT177 V41140 -- V41147 128
Data Words none V1400 -- V7377
V10000--V17777
3072
4096 None specific, used with many
instructions
Stages S0 -- S1777 V41000 -- V41077 1024
System
parameters None V7400--V7777 256 System specific, used for various
purposes
DL350 Memory
Map
X0
Y0
C0C0
SP0
V0 K100
T0
V1000 K100
CT0
SG S 001
S0
CPU Specifications
and Operation
3--30 CPU Specifications and Operation
DL350 User Manual, 2nd Edition
DL350 Aliases
An alias is an alternate way of referring to certain memory types, such as
timer/counter current values, V--memory locations for I/O points, etc., which
simplifies understanding the memory address. The use of the alias is optional, but
some users may find the alias to be helpful when developing a program. The table
below shows how the aliases can be used to reference memory locations.
Address Start Alias Start Example
V0 TA0 V0 is the timer accumulator value for timer 0, therefore, it’s
alias is TA0. TA1 is the alias for V1, etc..
V1000 CTA0 V1000 is the counter accumulator value for counter 0,
therefore, it’s alias is CTA0. CTA1 is the alias for V1001, etc.
V40000 VGX
V40000 is the word memory reference for discrete bits GX0
through GX17, therefore, it’s alias is VGX0. V40001 is the word
memory reference for discrete bits GX20 through GX 37,
therefore, it’s alias is VGX20.
V40200 VGY
V40200 is the word memory reference for discrete bits GY0
through GY17, therefore, it’s alias is VGY0. V40201 is the word
memory reference for discrete bits GY20 through GY 37,
therefore, it’s alias is VGY20.
V40400 VX0
V40400 is the word memory reference for discrete bits X0
through X17, therefore, it’s alias is VX0. V40401 is the word
memory reference for discrete bits X20 through X37, therefore,
it’s alias is VX20.
V40500 VY0
V40500 is the word memory reference for discrete bits Y0
through Y17, therefore, it’s alias is VY0. V40501 is the word
memory reference for discrete bits Y20 through Y37, therefore,
it’s alias is VY20.
V40600 VC0
V40600 is the word memory reference for discrete bits C0
through C17, therefore, it’s alias is VC0. V40601 is the word
memory reference for discrete bits C20 through C37, therefore,
it’s alias is VC20.
V41000 VS0
V41000 is the word memory reference for discrete bits S0
through S17, therefore, it’s alias is VS0. V41001 is the word
memory reference for discrete bits S20 through S37, therefore,
it’s alias is VS20.
V41100 VT0
V41100 is the word memory reference for discrete bits T0
through T17, therefore, it’s alias is VT0. V41101 is the word
memory reference for discrete bits T20 through T37, therefore,
it’s alias is VT20.
V41140 VCT0
V41140 is the word memory reference for discrete bits CT0
through CT17, therefore, it’s alias is VCT0. V41141 is the word
memory reference for discrete bits CT20 through CT37,
therefore, it’s alias is VCT20.
V41200 VSP0
V41200 is the word memory reference for discrete bits SP0
through SP17, therefore, it’s alias is VSP0. V41201 is the word
memory reference for discrete bits SP20 through SP37,
therefore, it’s alias is VSP20.
CPU Specifications
and Operation
3--31
CPU Specifications and Operation
DL350 User Manual, 2nd Edition
X Input / Y Output Bit Map
This table provides a listing of the individual Input points associated with each V-memory address bit.
MSB DL350 Input (X) and Output (Y) Points LSB XIn
p
ut
Y
Out
p
ut
15 14 13 12 11 10 9876543210
X
I
n
p
u
t
Address
Y
O
u
t
p
u
t
Address
017 016 015 014 013 012 011 010 007 006 005 004 003 002 001 000 V40400 V40500
037 036 035 034 033 032 031 030 027 026 025 024 023 022 021 020 V40401 V40501
057 056 055 054 053 052 051 050 047 046 045 044 043 042 041 040 V40402 V40502
077 076 075 074 073 072 071 070 067 066 065 064 063 062 061 060 V40403 V40503
117 116 115 114 113 112 111 110 107 106 105 104 103 102 101 100 V40404 V40504
137 136 135 134 133 132 131 130 127 126 125 124 123 122 121 120 V40405 V40505
157 156 155 154 153 152 151 150 147 146 145 144 143 142 141 140 V40406 V40506
177 176 175 174 173 172 171 170 167 166 165 164 163 162 161 160 V40407 V40507
217 216 215 214 213 212 211 210 207 206 205 204 203 202 201 200 V40410 V40510
237 236 235 234 233 232 231 230 227 226 225 224 223 222 221 220 V40411 V40511
257 256 255 254 253 252 251 250 247 246 245 244 243 242 241 240 V40412 V40512
277 276 275 274 273 272 271 270 267 266 265 264 263 262 261 260 V40413 V40513
317 316 315 314 313 312 311 310 307 306 305 304 303 302 301 300 V40414 V40514
337 336 335 334 333 332 331 330 327 326 325 324 323 322 321 320 V40415 V40515
357 356 355 354 353 352 351 350 347 346 345 344 343 342 341 340 V40416 V40516
377 376 375 374 373 372 371 370 367 366 365 364 363 362 361 360 V40417 V40517
417 416 415 414 413 412 411 410 407 406 405 404 403 402 401 400 V40420 V40520
437 436 435 434 433 432 431 430 427 426 425 424 423 422 421 420 V40421 V40521
457 456 455 454 453 452 451 450 447 446 445 444 443 442 441 440 V40422 V40522
477 476 475 474 473 472 471 470 467 466 465 464 463 462 461 460 V40423 V40523
517 516 515 514 513 512 511 510 507 506 505 504 503 502 501 500 V40424 V40524
537 536 535 534 533 532 531 530 527 526 525 524 523 522 521 520 V40425 V40525
557 556 555 554 553 552 551 550 547 546 545 544 543 542 541 540 V40426 V40526
577 576 575 574 573 572 571 570 567 566 565 564 563 562 561 560 V40427 V40527
617 616 615 614 613 612 611 610 607 606 605 604 603 602 601 600 V40430 V40530
637 636 635 634 633 632 631 630 627 626 625 624 623 622 621 620 V40431 V40531
657 656 655 654 653 652 651 650 647 646 645 644 643 642 641 640 V40432 V40532
677 676 675 674 673 672 671 670 667 666 665 664 663 662 661 660 V40433 V40533
717 716 715 714 713 712 711 710 707 706 705 704 703 702 701 700 V40434 V40534
737 736 735 734 733 732 731 730 727 726 725 724 723 722 721 720 V40435 V40535
757 756 755 754 753 752 751 750 747 746 745 744 743 742 741 740 V40436 V40536
777 776 775 774 773 772 771 770 767 766 765 764 763 762 761 760 V40437 V40537
CPU Specifications
and Operation
3--32 CPU Specifications and Operation
DL350 User Manual, 2nd Edition
Control Relay Bit Map
This table provides a listing of the individual control relays associated with each V-memory address bit.
MSB DL350 Control Relays (C) LSB
A
d
d
r
e
s
s
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
A
d
d
ress
017 016 015 014 013 012 011 010 007 006 005 004 003 002 001 000 V40600
037 036 035 034 033 032 031 030 027 026 025 024 023 022 021 020 V40601
057 056 055 054 053 052 051 050 047 046 045 044 043 042 041 040 V40602
077 076 075 074 073 072 071 070 067 066 065 064 063 062 061 060 V40603
117 116 115 114 113 112 111 110 107 106 105 104 103 102 101 100 V40604
137 136 135 134 133 132 131 130 127 126 125 124 123 122 121 120 V40605
157 156 155 154 153 152 151 150 147 146 145 144 143 142 141 140 V40606
177 176 175 174 173 172 171 170 167 166 165 164 163 162 161 160 V40607
217 216 215 214 213 212 211 210 207 206 205 204 203 202 201 200 V40610
237 236 235 234 233 232 231 230 227 226 225 224 223 222 221 220 V40611
257 256 255 254 253 252 251 250 247 246 245 244 243 242 241 240 V40612
277 276 275 274 273 272 271 270 267 266 265 264 263 262 261 260 V40613
317 316 315 314 313 312 311 310 307 306 305 304 303 302 301 300 V40614
337 336 335 334 333 332 331 330 327 326 325 324 323 322 321 320 V40615
357 356 355 354 353 352 351 350 347 346 345 344 343 342 341 340 V40616
377 376 375 374 373 372 371 370 367 366 365 364 363 362 361 360 V40617
417 416 415 414 413 412 411 410 407 406 405 404 403 402 401 400 V40620
437 436 435 434 433 432 431 430 427 426 425 424 423 422 421 420 V40621
457 456 455 454 453 452 451 450 447 446 445 444 443 442 441 440 V40622
477 476 475 474 473 472 471 470 467 466 465 464 463 462 461 460 V40623
517 516 515 514 513 512 511 510 507 506 505 504 503 502 501 500 V40624
537 536 535 534 533 532 531 530 527 526 525 524 523 522 521 520 V40625
557 556 555 554 553 552 551 550 547 546 545 544 543 542 541 540 V40626
577 576 575 574 573 572 571 570 567 566 565 564 563 562 561 560 V40627
617 616 615 614 613 612 611 610 607 606 605 604 603 602 601 600 V40630
637 636 635 634 633 632 631 630 627 626 625 624 623 622 621 620 V40631
657 656 655 654 653 652 651 650 647 646 645 644 643 642 641 640 V40632
677 676 675 674 673 672 671 670 667 666 665 664 663 662 661 660 V40633
717 716 715 714 713 712 711 710 707 706 705 704 703 702 701 700 V40634
737 736 735 734 733 732 731 730 727 726 725 724 723 722 721 720 V40635
757 756 755 754 753 752 751 750 747 746 745 744 743 742 741 740 V40636
777 776 775 774 773 772 771 770 767 766 765 764 763 762 761 760 V40637
CPU Specifications
and Operation
3--33
CPU Specifications and Operation
DL350 User Manual, 2nd Edition
MSB Additional DL350 Control Relays (C) LSB
A
d
d
r
e
s
s
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
A
d
d
ress
1017 1016 1015 1014 1013 1012 1011 1010 1007 1006 1005 1004 1003 1002 1001 1000 V40640
1037 1036 1035 1034 1033 1032 1031 1030 1027 1026 1025 1024 1023 1022 1021 1020 V40641
1057 1056 1055 1054 1053 1052 1051 1050 1047 1046 1045 1044 1043 1042 1041 1040 V40642
1077 1076 1075 1074 1073 1072 1071 1070 1067 1066 1065 1064 1063 1062 1061 1060 V40643
1117 1116 1115 1114 1113 1112 1111 1110 1107 1106 1105 1104 1103 1102 1101 1100 V40644
1137 1136 1135 1134 1133 1132 1131 1130 1127 1126 1125 1124 1123 1122 1121 1120 V40645
1157 1156 1155 1154 1153 1152 1151 1150 1147 1146 1145 1144 1143 1142 1141 1140 V40646
1177 1176 1175 1174 1173 1172 1171 1170 1167 1166 1165 1164 1163 1162 1161 1160 V40647
1217 1216 1215 1214 1213 1212 1211 1210 1207 1206 1205 1204 1203 1202 1201 1200 V40650
1237 1236 1235 1234 1233 1232 1231 1230 1227 1226 1225 1224 1223 1222 1221 1220 V40651
1257 1256 1255 1254 1253 1252 1251 1250 1247 1246 1245 1244 1243 1242 1241 1240 V40652
1277 1276 1275 1274 1273 1272 1271 1270 1267 1266 1265 1264 1263 1262 1261 1260 V40653
1317 1316 1315 1314 1313 1312 1311 1310 1307 1306 1305 1304 1303 1302 1301 1300 V40654
1337 1336 1335 1334 1333 1332 1331 1330 1327 1326 1325 1324 1323 1322 1321 1320 V40655
1357 1356 1355 1354 1353 1352 1351 1350 1347 1346 1345 1344 1343 1342 1341 1340 V40656
1377 1376 1375 1374 1373 1372 1371 1370 1367 1366 1365 1364 1363 1362 1361 1360 V40657
1417 1416 1415 1414 1413 1412 1411 1410 1407 1406 1405 1404 1403 1402 1401 1400 V40660
1437 1436 1435 1434 1433 1432 1431 1430 1427 1426 1425 1424 1423 1422 1421 1420 V40661
1457 1456 1455 1454 1453 1452 1451 1450 1447 1446 1445 1444 1443 1442 1441 1440 V40662
1477 1476 1475 1474 1473 1472 1471 1470 1467 1466 1465 1464 1463 1462 1461 1460 V40663
1517 1516 1515 1514 1513 1512 1511 1510 1507 1506 1505 1504 1503 1502 1501 1500 V40664
1537 1536 1535 1534 1533 1532 1531 1530 1527 1526 1525 1524 1523 1522 1521 1520 V40665
1557 1556 1555 1554 1553 1552 1551 1550 1547 1546 1545 1544 1543 1542 1541 1540 V40666
1577 1576 1575 1574 1573 1572 1571 1570 1567 1566 1565 1564 1563 1562 1561 1560 V40667
1617 1616 1615 1614 1613 1612 1611 1610 1607 1606 1605 1604 1603 1602 1601 1600 V40670
1637 1636 1635 1634 1633 1632 1631 1630 1627 1626 1625 1624 1623 1622 1621 1620 V40671
1657 1656 1655 1654 1653 1652 1651 1650 1647 1646 1645 1644 1643 1642 1641 1640 V40672
1677 1676 1675 1674 1673 1672 1671 1670 1667 1666 1665 1664 1663 1662 1661 1660 V40673
1717 1716 1715 1714 1713 1712 1711 1710 1707 1706 1705 1704 1703 1702 1701 1700 V40674
1737 1736 1735 1734 1733 1732 1731 1730 1727 1726 1725 1724 1723 1722 1721 1720 V40675
1757 1756 1755 1754 1753 1752 1751 1750 1747 1746 1745 1744 1743 1742 1741 1740 V40676
1777 1776 1775 1774 1773 1772 1771 1770 1767 1766 1765 1764 1763 1762 1761 1760 V40677
CPU Specifications
and Operation
3--34 CPU Specifications and Operation
DL350 User Manual, 2nd Edition
StagetControl / Status Bit Map
This table provides a listing of the individual Stagetcontrol bits associated with each V-memory address.
MSB DL350 Stage (S) Control Bits LSB
A
d
d
r
e
s
s
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
A
d
d
ress
017 016 015 014 013 012 011 010 007 006 005 004 003 002 001 000 V41000
037 036 035 034 033 032 031 030 027 026 025 024 023 022 021 020 V41001
057 056 055 054 053 052 051 050 047 046 045 044 043 042 041 040 V41002
077 076 075 074 073 072 071 070 067 066 065 064 063 062 061 060 V41003
117 116 115 114 113 112 111 110 107 106 105 104 103 102 101 100 V41004
137 136 135 134 133 132 131 130 127 126 125 124 123 122 121 120 V41005
157 156 155 154 153 152 151 150 147 146 145 144 143 142 141 140 V41006
177 176 175 174 173 172 171 170 167 166 165 164 163 162 161 160 V41007
217 216 215 214 213 212 211 210 207 206 205 204 203 202 201 200 V41010
237 236 235 234 233 232 231 230 227 226 225 224 223 222 221 220 V41011
257 256 255 254 253 252 251 250 247 246 245 244 243 242 241 240 V41012
277 276 275 274 273 272 271 270 267 266 265 264 263 262 261 260 V41013
317 316 315 314 313 312 311 310 307 306 305 304 303 302 301 300 V41014
337 336 335 334 333 332 331 330 327 326 325 324 323 322 321 320 V41015
357 356 355 354 353 352 351 350 347 346 345 344 343 342 341 340 V41016
377 376 375 374 373 372 371 370 367 366 365 364 363 362 361 360 V41017
417 416 415 414 413 412 411 410 407 406 405 404 403 402 401 400 V41020
437 436 435 434 433 432 431 430 427 426 425 424 423 422 421 420 V41021
457 456 455 454 453 452 451 450 447 446 445 444 443 442 441 440 V41022
477 476 475 474 473 472 471 470 467 466 465 464 463 462 461 460 V41023
517 516 515 514 513 512 511 510 507 506 505 504 503 502 501 500 V41024
537 536 535 534 533 532 531 530 527 526 525 524 523 522 521 520 V41025
557 556 555 554 553 552 551 550 547 546 545 544 543 542 541 540 V41026
577 576 575 574 573 572 571 570 567 566 565 564 563 562 561 560 V41027
617 616 615 614 613 612 611 610 607 606 605 604 603 602 601 600 V41030
637 636 635 634 633 632 631 630 627 626 625 624 623 622 621 620 V41031
657 656 655 654 653 652 651 650 647 646 645 644 643 642 641 640 V41032
677 676 675 674 673 672 671 670 667 666 665 664 663 662 661 660 V41033
717 716 715 714 713 712 711 710 707 706 705 704 703 702 701 700 V41034
737 736 735 734 733 732 731 730 727 726 725 724 723 722 721 720 V41035
757 756 755 754 753 752 751 750 747 746 745 744 743 742 741 740 V41036
777 776 775 774 773 772 771 770 767 766 765 764 763 762 761 760 V41037
CPU Specifications
and Operation
3--35
CPU Specifications and Operation
DL350 User Manual, 2nd Edition
MSB DL350 Additional Stage (S) Control Bits (continued) LSB
A
d
d
r
e
s
s
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
A
d
d
ress
1017 1016 1015 1014 1013 1012 1011 1010 1007 1006 1005 1004 1003 1002 1001 1000 V41040
1037 1036 1035 1034 1033 1032 1031 1030 1027 1026 1025 1024 1023 1022 1021 1020 V41041
1057 1056 1055 1054 1053 1052 1051 1050 1047 1046 1045 1044 1043 1042 1041 1040 V41042
1077 1076 1075 1074 1073 1072 1071 1070 1067 1066 1065 1064 1063 1062 1061 1060 V41043
1117 1116 1115 1114 1113 1112 1111 1110 1107 1106 1105 1104 1103 1102 1101 1100 V41044
1137 1136 1135 1134 1133 1132 1131 1130 1127 1126 1125 1124 1123 1122 1121 1120 V41045
1157 1156 1155 1154 1153 1152 1151 1150 1147 1146 1145 1144 1143 1142 1141 1140 V41046
1177 1176 1175 1174 1173 1172 1171 1170 1167 1166 1165 1164 1163 1162 1161 1160 V41047
1217 1216 1215 1214 1213 1212 1211 1210 1207 1206 1205 1204 1203 1202 1201 1200 V41050
1237 1236 1235 1234 1233 1232 1231 1230 1227 1226 1225 1224 1223 1222 1221 1220 V41051
1257 1256 1255 1254 1253 1252 1251 1250 1247 1246 1245 1244 1243 1242 1241 1240 V41052
1277 1276 1275 1274 1273 1272 1271 1270 1267 1266 1265 1264 1263 1262 1261 1260 V41053
1317 1316 1315 1314 1313 1312 1311 1310 1307 1306 1305 1304 1303 1302 1301 1300 V41054
1337 1336 1335 1334 1333 1332 1331 1330 1327 1326 1325 1324 1323 1322 1321 1320 V41055
1357 1356 1355 1354 1353 1352 1351 1350 1347 1346 1345 1344 1343 1342 1341 1340 V41056
1377 1376 1375 1374 1373 1372 1371 1370 1367 1366 1365 1364 1363 1362 1361 1360 V41057
1417 1416 1415 1414 1413 1412 1411 1410 1407 1406 1405 1404 1403 1402 1401 1400 V41060
1437 1436 1435 1434 1433 1432 1431 1430 1427 1426 1425 1424 1423 1422 1421 1420 V41061
1457 1456 1455 1454 1453 1452 1451 1450 1447 1446 1445 1444 1443 1442 1441 1440 V41062
1477 1476 1475 1474 1473 1472 1471 1470 1467 1466 1465 1464 1463 1462 1461 1460 V41063
1517 1516 1515 1514 1513 1512 1511 1510 1507 1506 1505 1504 1503 1502 1501 1500 V41064
1537 1536 1535 1534 1533 1532 1531 1530 1527 1526 1525 1524 1523 1522 1521 1520 V41065
1557 1556 1555 1554 1553 1552 1551 1550 1547 1546 1545 1544 1543 1542 1541 1540 V41066
1577 1576 1575 1574 1573 1572 1571 1570 1567 1566 1565 1564 1563 1562 1561 1560 V41067
1617 1616 1615 1614 1613 1612 1611 1610 1607 1606 1605 1604 1603 1602 1601 1600 V41070
1637 1636 1635 1634 1633 1632 1631 1630 1627 1626 1625 1624 1623 1622 1621 1620 V41071
1657 1656 1655 1654 1653 1652 1651 1650 1647 1646 1645 1644 1643 1642 1641 1640 V41072
1677 1676 1675 1674 1673 1672 1671 1670 1667 1666 1665 1664 1663 1662 1661 1660 V41073
1717 1716 1715 1714 1713 1712 1711 1710 1707 1706 1705 1704 1703 1702 1701 1700 V41074
1737 1736 1735 1734 1733 1732 1731 1730 1727 1726 1725 1724 1723 1722 1721 1720 V41075
1757 1756 1755 1754 1753 1752 1751 1750 1747 1746 1745 1744 1743 1742 1741 1740 V41076
1777 1776 1775 1774 1773 1772 1771 1770 1767 1766 1765 1764 1763 1762 1761 1760 V41077
CPU Specifications
and Operation
3--36 CPU Specifications and Operation
DL350 User Manual, 2nd Edition
Timer and Counter Status Bit Maps
This table provides a listing of the individual timer and counter contacts associated with each V-memory
address bit.
MSB DL350 Timer (T) and Counter (CT) Contacts LSB Timer Counter
15 14 13 12 11 10 9876543210Address
C
o
u
n
t
e
r
Address
017 016 015 014 013 012 011 010 007 006 005 004 003 002 001 000 V41100 V41140
037 036 035 034 033 032 031 030 027 026 025 024 023 022 021 020 V41101 V41141
057 056 055 054 053 052 051 050 047 046 045 044 043 042 041 040 V41102 V41142
077 076 075 074 073 072 071 070 067 066 065 064 063 062 061 060 V41103 V41143
117 116 115 114 113 112 111 110 107 106 105 104 103 102 101 100 V41104 V41144
137 136 135 134 133 132 131 130 127 126 125 124 123 122 121 120 V41105 V41145
157 156 155 154 153 152 151 150 147 146 145 144 143 142 141 140 V41106 V41146
177 176 175 174 173 172 171 170 167 166 165 164 163 162 161 160 V41107 V41147
This portion of the table shows additional Timer contacts available with the DL350.
MSB DL350 Additional Timer (T) Contacts LSB Timer
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Address
217 216 215 214 213 212 211 210 207 206 205 204 203 202 201 200 V41110
237 236 235 234 233 232 231 230 227 226 225 224 223 222 221 220 V41111
257 256 255 254 253 252 251 250 247 246 245 244 243 242 241 240 V41112
277 276 275 274 273 272 271 270 267 266 265 264 263 262 261 260 V41113
317 316 315 314 313 312 311 310 307 306 305 304 303 302 301 300 V41114
337 336 335 334 333 332 331 330 327 326 325 324 323 322 321 320 V41115
357 356 355 354 353 352 351 350 347 346 345 344 343 342 341 340 V41116
377 376 375 374 373 372 371 370 367 366 365 364 363 362 361 360 V41117
14
System Design and
Configuration
In This Chapter....
— DL305 System Design Strategies
— Module Placement
— Calculating the Power Budget
— Expansion I/O
— Remote I/O
— Network Connections to MODBUS and DirectNET
— Network Slave Operation
— Network Master Operation
System Design
and Configuration
4--2 System Design and Configuration
DL350 User Manual, 2nd Edition
DL305 System Design Strategies
The DL350 CPU offers the following ways to add I/O to the system:
SLocal I/O -- consists of I/O modules located in the same base as the CPU.
SRemote I/O -- consists of I/O modules located in bases which are serially
connected to the bottom port on a DL350 CPU.
SExpansion I/O -- consists of I/O modules located in expansion bases
located close to the local base. Expansion cables connect them to the local
CPU base’s serial bus in a daisy--chain fashion.
A DL305 system can be developed using many different arrangements of these
configurations. All I/O configurations use the standard complement of DL305 I/O
modules and bases.
The DL350 CPU offers the following way to add networking to the system:
SDL350 Communications Port -- The DL350 CPU has a 25--Pin
connector on Port 2 that provides a built--in RTU MODBUS connection.
SMODBUS Master Module-- MODBUS master modules can be used in
any slot for connecting as a master to a MODBUS network.
SMODBUS Slave Module-- MODBUS slave modules can be used in any
slot for connecting as a slave to a MODBUS network.
Module/Unit Master Slave
DL350 CPU DirectNET
MODBUS RTU
DirectNET
K--Sequence
MODBUS RTU
The DL305 system currently offers two types of bases. Both types come in 5, 8, or 10
slot configurations. All DL305 CPUs will work in either type of base. The xxxxx--1
bases are designed to compliment the features of the DL350 CPU, however all other
DL305 CPUs will work in these bases. You can also mix the bases in a system. By
mixing the bases or by installing the DL350 in an conventional base, you will loose
some of the features of the CPU. The DL350 will revert back to 8--bit addressing and
will virtually function like a DL340 CPU. This section will focus on the xxxxx--1 bases
using the DL350 CPU. If you will be using the DL350 in a conventional base or if you
are mixing bases in a system, refer to Appendix F for base, I/O, and module
placement information.
The xxxxx--1 bases support a 8 bit parallel bus that allows the use of intelligent
modules when using the DL350 CPU. The addressing scheme is simplified and also
extends the number of I/O points you can use. You will have a bigger power budget to
work with due to the increase in the power supply capacity to 2.0A.
I/O System
Configurations
Networking
Configurations
Base
Configurations
System Design
and Configuration
4--3
System Design and Configuration
DL350 User Manual, 2nd Edition
Module Placement
The DL305 bases each provide different numbers of slots for use with the I/O
modules. You may notice the bases refer to 5-slot, 8-slot, etc. One of the slots is
dedicated to the CPU, so you always have one less I/O slot. For example, you have
four I/O slots with a 5-slot base. The I/O slots are numbered 0 -- 3. The CPU slot
always contains a CPU and is not numbered.
The examples below show the I/O numbering for a 5 slot local CPU base with 8 point
I/Oanda5slotlocalCPUbasewith16pointI/O.
C
P
U
000
to
007
020
to
027
040
to
047
060
to
067 DL305
5 Slot Base Using 8 Point I
/
O Modules
C
P
U
000
to
007
010
to
017
020
to
027
060
to
067
to
037
050
to
057
070
to
077
DL305
5 Slot Base Using 16 Point I
/
O Modules
Slot Number: 32 10
Slot Number: 32 10
030
040
047
to
There are some limitations that determine where you can place certain types of
modules. Some modules require certain locations and may limit the number or
placement of other modules. The table on pages 4-6 and 4-7 should clear up any
gray areas in the explanation and you will probably find the configuration you intend
to use in your installation.
In all of the configurations mentioned the number of slots from the CPU that are to be
used can roll over into an expansion base if necessary. For example if a rule states a
module must reside in one of the six slots adjacent to the CPU, and the system
configuration is comprised of two 5 slot bases, slots 1 and 2 of the expansion base
are valid locations.
The following table provides the general placement rules for the DL305
components.
Module Restriction
CPU The CPU must reside in the first slot of the local CPU
base. The first slot is the closest slot to the power supply.
16 Point I/O
Modules Any slot.
Analog Modules Any slot.
ASCII Basic
Modules Any slot.
High Speed
Counter The D3--350 CPU does not support a high speed counter
module.
I/O addresses use octal numbering, starting in the slot next to the CPU. The
addresses are assigned in groups of 16 for each slot regardless of what module is in
the slot. The discrete input and output modules can be mixed in any order, but there
may be restrictions placed on some specialty modules.
Slot Numbering
I/O Module
Placement Rules
I/O Configuration
System Design
and Configuration
4--4 System Design and Configuration
DL350 User Manual, 2nd Edition
Calculating the Power Budget
When you determine the types and quantity of I/O modules you will be using in the
DL305 system it is important to remember there is a limited amount of power
available from the power supply. We have provided a chart to help you easily see the
amount of power available with each base. The following chart will help you calculate
the amount of power you need with your I/O selections. At the end of this section you
will also find an example of power budgeting and a worksheet for your own
calculations.
WARNING: It is extremely important to calculate the power budget. If you
exceed the power budget, the system may operate in an unpredictable
manner which may result in a risk of personal injury or equipment damage.
This chart shows the amount of current available for the three voltages supplied on
the new xxxxx--1 bases. Use these currents when calculating the power budget for
your system.
Bases 5V Power
Supplied in
Amps
9V Power
Supplied in
Amps
24V Power
Supplied in
Amps
Auxiliary
24 VDC
Output at
Base Terminal
D 3 -- 0 5 B -- 1 1.0A (50_C)
0.7A (60_C) 2.0 0.6 100mA max
D3--05BDC 1.4A (50_C)
0.7A (60_C) 0.8 0.6 None
D 3 -- 0 8 B -- 1 1.0A (50_C)
0.7A (60_C) 2.0 0.6 100mA max
D 3 -- 1 0 B -- 1 1.0A (50_C)
0.7A (60_C) 2.0 0.6 100mA max
D3--10BDC 1.4A (50_C)
0.7A (60_C) 1.7 0.6 None
Managing your
Power Resource
Base Power
Specifications
System Design
and Configuration
4--5
System Design and Configuration
DL350 User Manual, 2nd Edition
Each type of module requires a certain number of I/O points. This is also true for the
specialty modules, such as analog, counter interface, etc. The table on page 4--5
lists the number and type of I/O points required for each module.
The next three pages show the amount of maximum current required for each of the
DL305 modules. The column labeled “External Power Source Required” is for
module operation and is not for field wiring. Use these currents when calculating the
power budget for your system. If 24 VDC is needed for external devices, the 24 VDC
(100mA maximum) output at the base terminal strip may be used as long as the
power budget is not exceeded.
I/O Points
Required
5V Power
Required (mA)
9V Power
Requiredin(A)
24V Power
Required (mA)
External Power
Source Required
CPUs
D3--350 500 20 0None
DC Input Modules
D3--08ND2 8 0 10 112 None
D3--16ND2--1 16 025 224 None
D3--16ND2--2 16 024 209 None
D3--16ND2F 16 025 224 None
F3--16ND3F 16 0148 68 None
AC Input Modules
D3--08NA--1 8 0 10 0None
D3--08NA--2 8 0 10 0None
D3--16NA 16 0100 0None
AC/DC Input Modules
D3--08NE3 8 0 10 0None
D3--16NE3 16 0130 0None
DC Output Modules
D3--08TD1 8 0 20 24 None
D3--08TD2 8 0 30 0None
D3--16TD1--1 16 040 96 None
D3--16TD1--2 16 040 96 None
D3--16TD2 16 0180 0None
AC Output Modules
D3--04TAS 8 0 12 0None
F3--08TAS 8 0 80 0None
F 3 -- 0 8 TA S -- 1 8 0 25 0None
D3--08TA--1 8 0 96 0None
D3--08TA--2 8 0 160 0None
F3--16TA--2 16 0250 0None
D3--16TA--2 16 0400 0None
I/O Points Required
for Each Module
Module Power
Requirements
System Design
and Configuration
4--6 System Design and Configuration
DL350 User Manual, 2nd Edition
I/O Point
Required
5V Power
RequiredinmA
9V Power
RequiredinmA
24V Power
RequiredinmA
External Power
Source Required
Relay Output
Modules
D3--08TR 8 0 360 0None
F 3 -- 0 8 T R S -- 1 8 0 296 0None
F 3 -- 0 8 T R S -- 2 8 0 296 0None
D3--16TR 16 0480 0None
Analog
D3--04AD 16 055 024VDC @ 65mA
max
F3--04ADS 16 0183 50 None
F3--08AD 16 025 37 None
F3--08TEMP 16 025 37 None
F 3 -- 0 8 T H M -- n 16 050 34 None
F3--16AD 16 033 47 None
D3--02DA 16 080 024VDC @ 170mA
max
F3--04DA--1 16 0144 108 None
F3--04DA--2 16 0144 108 None
F3--04DAS 16 0154 145 None
Communications and
Networking
FA--UNICON 0 0 0 0 (24 VDC or
5 VDC) @ 100mA
ASCII BASIC Modules
F 3 -- A B 1 2 8 -- R 16 0205 0None
F 3 -- A B 1 2 8 -- T 16 0205 0None
F3--AB128 16 090 0None
F3--AB64 16 090 0None
Specialty Modules
D3--08SIM 8 0 10 112 None
D3--HSC 16 070 0None
Programming
D2--HPP 200 50 0Optional
System Design
and Configuration
4--7
System Design and Configuration
DL350 User Manual, 2nd Edition
The following example shows how to calculate the power budget for the DL305
system.
Base #
0
Module Type 5 VDC (mA) 9 VDC (mA) Auxiliary
Power Source
24 VDC Output (mA)
Available
Base Power
D3--05B 1000 2000 600
CPU Slot D3--350 +500 + 120
Slot 0 D3--16NE3 +0 + 130 +0
Slot 1 D3--16NE3 +0 + 130 +0
Slot 2 F3--16TA--2 +0 + 250 +0
Slot 3 F3--16TA--2 +0 + 250 +0
Slot 4
Slot 5 +0
Slot 6 +0
Slot 7 +0
Other
Handheld Prog D2--HPP + 200 + 200 +0
Total Power Required 700 1080 0
Remaining Power Available 1000--700=300 2000--1080=920 600 -- 0 = 600
1. Use the power budget table to fill in the power requirements for all the
system components. First, enter the amount of power supplied by the base.
Next, list the requirements for the CPU, any I/O modules, and any other
devices, such as the Handheld Programmer or the DV--1000 operator
interface. Remember, even though the Handheld or the DV--1000 are not
installed in the base, they still obtain their power from the system. Also,
make sure you obtain any external power requirements, such as the
24VDC power required by the analog modules.
2. Add the current columns starting with Slot 0 and put the total in the row
labeled “Total power required.
3. Subtract the row labeled “Total power required from the row labeled
Available Base Power”. Place the difference in the row labeled
“Remaining Power Available”.
4. If “Total Power Required” is greater than the power available from the
base, the power budget will be exceeded. It will be unsafe to used this
configuration and you will need to restructure your I/O configuration.
WARNING: It is extremely important to calculate the power budget. If you
exceed the power budget, the system may operate in an unpredictable
manner which may result in a risk of personal injury or equipment damage.
Power Budget
Calculation
Example
System Design
and Configuration
4--8 System Design and Configuration
DL350 User Manual, 2nd Edition
This blank chart is provided for you to copy and use in your power budget
calculations.
Base #
0
Module Type 5 VDC (mA) 9 VDC (mA) Auxiliary
Power Source
24 VDC Output (mA)
Available
Base Power
CPU Slot
Slot 0
Slot 1
Slot 2
Slot 3
Slot 4
Slot 5
Slot 6
Slot 7
Other
Handheld Prog D2--HPP
Total Power Required
Remaining Power Available
1. Use the power budget table to fill in the power requirements for all the
system components. First, enter the amount of power supplied by the base.
Next, list the requirements for the CPU, any I/O modules, and any other
devices, such as the Handheld Programmer or the DV--1000 operator
interface. Remember, even though the Handheld or the DV--1000 are not
installed in the base, they still obtain their power from the system. Also,
make sure you obtain any external power requirements, such as the
24VDC power required by the analog modules.
2. Add the current columns starting with Slot 0 and put the total in the row
labeled “Total power required.
3. Subtract the row labeled “Total power required from the row labeled
Available Base Power”. Place the difference in the row labeled
“Remaining Power Available”.
4. If “Total Power Required” is greater than the power available from the
base, the power budget will be exceeded. It will be unsafe to used this
configuration and you will need to restructure your I/O configuration.
WARNING: It is extremely important to calculate the power budget. If you
exceed the power budget, the system may operate in an unpredictable
manner which may result in a risk of personal injury or equipment damage.
Power Budget
Calculation
Worksheet
System Design
and Configuration
4--9
System Design and Configuration
DL350 User Manual, 2nd Edition
Local I/O Expansion
It is helpful to understand how you can use the various DL305 bases in your control
system. The following table shows how the bases can be used.
Base Part # Number of Slots
CanBeUsedAs
A Local CPU
Base
CanBeUsedAs
An Expansion
Base
D 3 -- 0 5 B -- 1 5Yes Yes
D3--05BDC--1 5Yes Yes
D 3 -- 0 8 B -- 1 8Yes Yes
D3--08BDC--1 8Yes Yes
D 3 -- 1 0 B -- 1 10 Yes Yes
D3--10BDC--1 10 Yes Yes
The configurations below show the valid combinations of local and expansion bases
using the DL350 CPU.
NOTE: You should use one of the configurations listed below when designing an
expansion system. If you use a configuration not listed below the system will not
function properly.
5 slot local CPU base
with a maximum of two 5
slot expansion bases
8 slot local CPU base with a
5 slot expansion base
1.5 ft (0.5m)1.5 ft (0.5m)
1.5 ft (0.5m)
8 slot local CPU base with a
8 slot expansion base
1.5 ft (0.5m)
1.5 ft (0.5m)
8 slot local CPU base with a
8 slot and 5 slot expansion
base
Base Uses Table
Local/Expansion
Connectivity
System Design
and Configuration
4--10 System Design and Configuration
DL350 User Manual, 2nd Edition
8 slot local CPU base with two 8
slot expansion bases
10 slot local CPU base with a
5 slot expansion base
10 slot local CPU base with a
10 slot expansion base
1.5 ft (0.5m)
1.5 ft (0.5m)
1.5 ft (0.5m)
The local CPU base is connected to the expansion base using a 1.5 ft. cable
(D3--EXCBL). The base must be connected as shown in the diagram below.
The top expansion connector on the base is the input from a previous base. The
bottom expansion connector on the base is the output to an expansion base. The
expansion cable is marked with “CPU Side” and “Expansion Side”. The“ CPU Side”
of the cable is connected to the bottom port of the base and the “Expansion Side” of
the cable is connected to the top port of the next base.
C
P
U
000
toto
017
020
to
040
to
037
100
to
117
120
to
137
140
to
157
160
to
177
200
to
217
DL305
DL305
Expansion Cable
CPU Side
Expansion Side
1.5 ft (0.5 m)
220
to
237
240
to
257
260
to
277
300
to
317
320
to
337
DL305
CPU Side
Expansion Side
1.5 ft (0.5 m)
Note: Avoid placing the expansion cable in the same wiring tray as the I/O and power source wiring.
057
060
077
Connecting
Expansion Bases
System Design
and Configuration
4--11
System Design and Configuration
DL350 User Manual, 2nd Edition
Setting the Base Switches
The 5, and 8 slot bases have a jumper switch between slot 3 and 4 used to set the
base to local CPU base or expansion base. The 10 slot base has two jumpers, one is
located between slots 4 and 5 and the other is located between slot 5 and 6. The
second switch sets I/O addressing ranges for the DL330/340 CPUs. This switch
should always be bridged to the right hand position for the DL350 CPU.
5 and 8 slot bases
10 slot base
Jumper Switch
System Design
and Configuration
4--12 System Design and Configuration
DL350 User Manual, 2nd Edition
I/O Configurations with a 5 Slot Local CPU Base
The 5 slot base has a jumper switch on the inside of the base between slots 3 and 4
whichallowsyoutoselect:
Type of Base Switch Position
Local CPU right side bridged
First Expansion left side bridged
Last Expansion right side bridged
C
P
U
000
to
007
020
to
027
040
to
047
060
to
067
010
to
017
030
to
037
050
to
057
070
to
077
DL305
Total I/O:
8 pt. modules 32
16 pt. modules 64
EXP CPU
Jumper
Switch
C
P
U
000
to
007
020
to
027
040
to
047
060
to
067
100
to
107
120
to
127
140
to
147
160
to
167 DL305
DL305
010
to
017
030
to
037
050
to
057
070
to
077
110
to
117
130
to
137
150
to
157
170
to
177
Total I/O:
1 Expansion base
8 pt. modules -- 72
16 pt. modules -- 144
EXP CPU
EXP CPU
Jumper Switch
200
to
207
210
to
217
2 Expansion Bases
8 pt. modules -- 112
16 pt modules -- 224
EXP CPU
Jumper Switch
220
to
227
240
to
247
260
to
267
300
to
307 DL305
230
to
237
250
to
257
270
to
277
310
to
317
320
to
327
330
to
337
Switch settings
5 Slot Base
5 Slot Base and up
to two 5 Slot
Expansion Bases
System Design
and Configuration
4--13
System Design and Configuration
DL350 User Manual, 2nd Edition
I/O Configurations with an 8 Slot Local CPU Base
C
P
U
000
to
007
020
to
027
040
to
047
060
to
067
100
to
107
120
to
127
140
to
147
010
to
017
030
to
037
050
to
057
070
to
077
110
to
117
130
to
137
150
to
157
DL305
Total I/O:
8 pt. modules -- 56
16 pt. modules -- 112
EXP CPU
Jumper Switch
200
to
207
220
to
227
240
to
247
260
to
267
160
to
167 DL305
Total I/O:
8 pt modules -- 96
16 pt modules -- 192
EXP CPU
Jumper Switch
EXP CPU
210
to
217
230
to
237
250
to
257
270
to
277
170
to
177
C
P
U
000
to
007
020
to
027
040
to
047
060
to
067
100
to
107
120
to
127
140
to
147
010
to
017
030
to
037
050
to
057
070
to
077
110
to
117
130
to
137
150
to
157
DL305
Total I/O:
1 Expansion Base
8 pt modules -- 120
16 pt modules -- 240
2 Expansion Bases
1--8slot 1--5slot
8 pt. modules -- 160
16 pt. modules -- 320
EXP CPU
Jumper Switch
C
P
U
000
to
007
020
to
027
040
to
047
060
to
067
100
to
107
120
to
127
140
to
147
010
to
017
030
to
037
050
to
057
070
to
077
110
to
117
130
to
137
150
to
157
DL305
160
to
167
200
to
207
220
to
227
240
to
247
260
to
267
300
to
307
320
to
327
170
to
177
210
to
217
230
to
237
250
to
257
270
to
277
310
to
317
330
to
337
DL305
EXP CPU
EXP
340
to
347
to
357
350
Jumper Switch
400
to
407
420
to
427
440
to
447
460
to
467
360
to
367 DL305
410
to
417
430
to
437
450
to
457
470
to
477
370
to
377
8 Slot Base
8 Slot Base and
5 Slot Expansion
Base
8 Slot Base and
One 8 slot and one
5 slot Expansion
Bases
System Design
and Configuration
4--14 System Design and Configuration
DL350 User Manual, 2nd Edition
Total I/O:
EXP CPU
Jumper Switch
C
P
U
000
to
007
020
to
027
040
to
047
060
to
067
100
to
107
120
to
127
140
to
147
010
to
017
030
to
037
050
to
057
070
to
077
110
to
117
130
to
137
150
to
157
DL305
160
to
167
200
to
207
220
to
227
240
to
247
260
to
267
300
to
307
320
to
327
170
to
177
210
to
217
230
to
237
250
to
257
270
to
277
310
to
317
330
to
337
DL305
400
to
407
420
to
427
440
to
447
460
to
467
500
to
507
520
to
527
540
to
547
410
to
417
430
to
437
450
to
457
470
to
477
510
to
517
530
to
537
550
to
557
DL305
EXP CPU
EXP
340
to
347
to
357
350
360
to
367
370
377
to
2 Expansion Bases
2--8slot
8 pt. modules -- 184
16 pt. modules -- 368
Jumper Switch
Jumper Switch
8 Slot Base and
two8slot
Expansion Bases
System Design
and Configuration
4--15
System Design and Configuration
DL350 User Manual, 2nd Edition
I/O Configurations with a 10 Slot Local CPU Base
Total I/O:
8 pt. modules -- 72
16 pt. modules -- 144
000
to
007
010
to
017
020
to
027
030
to
037
040
to
047
050
to
057
060
to
067
070
to
077
100
to
107
110
to
117
120
to
127
130
to
137
140
to
147
150
to
157
160
to
167
200
to
207
210
to
217
C
P
U
DL305
170
to
177
EXP CPU
Jumper
SW1
100
700
EXP
Jumper
SW2
240
to
247
260
to
267
300
to
307
320
to
327
220
to
227 DL305
EXP CPU
Jumper
SW1
000
to
007
010
to
017
020
to
027
030
to
037
040
to
047
050
to
057
060
to
067
070
to
077
100
to
107
110
to
117
120
to
127
130
to
137
140
to
147
150
to
157
160
to
167
200
to
207
210
to
217
C
P
U
DL305
170
to
177
250
to
257
270
to
277
310
to
317
330
to
337
230
to
237
Total I/O:
8 pt. modules -- 112
16 pt. modules -- 224
100
700
EXP
Jumper
SW2
EXP1 CPU
/EXP2
100
700
EXP EXP CPU
Jumper
SW2 Jumper
SW1
100
700
EXP EXP CPU
SW2 SW1
000
to
007
010
to
017
020
to
027
030
to
037
040
to
047
050
to
057
060
to
067
070
to
077
100
to
107
110
to
117
120
to
127
130
to
137
140
to
147
150
to
157
160
to
167
200
to
207
210
to
217
C
P
U
DL305
170
to
177
240
to
247
250
to
257
260
to
267
270
to
277
300
to
307
310
to
317
320
to
327
330
to
337
340
to
347
350
to
357
360
to
367
370
to
377
400
to
407
410
to
417
420
to
427
440
to
447
450
to
457
DL305
430
to
437
220
to
227
230
to
237
Total I/O:
8 pt. modules -- 152
16 pt. modules -- 304
10 Slot Base
10 Slot Base and
5 Slot Expansion
Base with
16 Point I/O
10 Slot Base and
10 Slot Expansion
Base with
16 Point I/O
System Design
and Configuration
4--16 System Design and Configuration
DL350 User Manual, 2nd Edition
Remote I/O Expansion
Remote I/O is useful for a system that has a sufficient number of sensors and other
field devices located a relative long distance away (up to 1000 meters, or 3050 feet)
from the more central location of the CPU. The DL350 supports a built--in Remote
master, however the DL305 family does not have any Remote I/O modules.
Therefore, you must use a DL205 or DL405 base for the slave channels. The
methods of adding remote I/O are:
SDL350 CPU: The CPU’s comm port 2 features a built-in Remote I/O
channel.
DL350
Maximum number of Remote Masters supported in
the local CPU base (1 channel per Remote Master) 1
CPU built-in Remote I/O channels 1
Maximum I/O points supported by each channel 512
Maximum Remote I/O points supported 512
Maximum number of remote I/O bases per channel
(RM--NET) 7
Remote I/O points map into different CPU memory locations, therefore it does not
reduce the number of local I/O points. Refer to the DL205 Remote I/O manual for
details on remote I/O configuration and numbering. Configuring the built-in remote
I/O channel is described in the following section.
The following figure shows 1 CPU base with seven remote bases. The remote bases
can be DL205 or DL405 bases.
Remote I/O
-- 7 Bases per channel (RM--Net)
-- 3050 ft. (1000m) Total distance]
-- 512 I/O Points Total
CPU Base
DL350 CPU Only
RM--Net
How to Add
Remote I/O
Channels
System Design
and Configuration
4--17
System Design and Configuration
DL350 User Manual, 2nd Edition
This section describes how to configure the DL350’s built-in remote I/O channel.
Additional information is in the Remote I/O manual, D2--REMIO--M, which you will
need in configuring the Remote slave units on the network.
The DL350 CPU’s built-in remote I/O channel has the same capability as the DL250
and DL450 CPUs. It can communicate with up to seven remote bases containing a
maximum of 512 I/O points, at a maximum distance of 1000 meters.
You may recall from the CPU specifications in Chapter 3 that the DL350’s Port 2 is
capable of several protocols. To configure the port using the Handheld Programmer,
use AUX 56 and follow the prompts, making the same choices as indicated below on
this page. To configure the port in DirectSOFT, choose the PLC menu, then Setup,
then Setup Secondary Comm Port...
SPort: From the port number list box at the top, choose “Port 2”.
SProtocol: Click the check box to the left of “Remote I/O” (called
“M--NET” on the HPP), and then you’ll see the dialog box shown below.
SMemory Address: Choose a V-memory address to use as the starting
location of a Remote I/O configuration table (V37700 is the default). This
table is separate and independent from the table for any Remote
Master(s) in the system.
SStation Number: Choose “0” as the station number, which makes the
DL350 the master. Station numbers 1--7 are reserved for remote slaves.
SBaud Rate: The baud rates 19200 and 38400 baud are available.
Choose 38400 initially as the remote I/O baud rate, and revert to 19200
baud if you experience data errors or noise problems on the link.
Important: You must configure the baud rate on the Remote Slaves (via
DIP switches) to match the baud rate selection for the CPU’s Port 2.
Then click the button indicated to send the Port 2 configuration
to the CPU, and click Close.
Configuring the
CPU’s Remote
I/O Channel
System Design
and Configuration
4--18 System Design and Configuration
DL350 User Manual, 2nd Edition
The next step is to make the connections between all devices on the Remote I/O link.
The location of the Port 2 on the DL350 is
on the 25-pin connector , as pictured to the
right.
SPin 7 Signal GND
SPin 12 TXD+
SPin 13 TXD--
SPin 24 RXD+
SPin 25 RXD--
Port 2
0V
TXD+
TXD--
RXD+
RXD--
114
13 25
Now we are ready to discuss wiring the DL350 to the remote slaves on the remote
base(s). The remote I/O link is a 3-wire, half-duplex type. Since Port 2 of the DL350
CPU is a 5-wire port, we must jumper its transmit and receive lines together as
shown below (converts it to 3-wire, half-duplex).
DL350 CPU Port 2
0V
TXD+
TXD--
RXD+
RXD--
TXD+ / RXD+
TXD-- / RXD--
Internal
330 ohm
resistor
T
1
2
3
G
Remote I/O Master
D2--RSS
Remote I/O Slave
T
1
2
3
(end of chain)
D4--RM
Remote I/O Slave
Termination Resistor
Signal GND
Connect shield to
signal ground
Jumper
7
13 25
The twisted/shielded pair connects to the DL350 Port 2 as shown. Be sure to
connect the cable shield wire to the signal ground connection. A termination resistor
must be added externally to the CPU, as close as possible to the connector pins. Its
purpose is to minimize electrical reflections that occur over long cables. Be sure to
add the jumper at the last slave to connect the required internal termination resistor.
Ideally, the two termination resistors at
the cables opposite ends and the
cable’s rated impedance will all three
match. For cable impedances greater
than 330 ohms, add a series resistor at the
last slave as shown to the right. If less than
330 ohms, parallel a matching resistance
across the slave’s pins 1 and 2 instead.
Remember to size the termination resistor
at Port 2 to match the cables rated
impedance. The resistance values should
be between 100 and 500 ohms.
Internal
resistor
D4--RM -- 330
ohm
D2--RSS -- 150
ohm
T
1
2
3
Add series external resistor
System Design
and Configuration
4--19
System Design and Configuration
DL350 User Manual, 2nd Edition
After configuring the DL350 CPU’s Port 2 and wiring it to the remote slave(s), use the
following checklist to complete the configuration of the remote slaves. Full
instructions for these steps are in the Remote I/O manual.
SSet the baud rate to match CPU’s Port 2 setting.
SSelect a station address for each slave, from 1 to 7. Each device on the
remote link must have a unique station address. There can be only one
master (address 0) on the remote link.
The beginning of the configuration table
for the built-in remote I/O channel is the
memory address we selected in the Port 2
setup.
The table consists of blocks of four words
which correspond to each slave in the
system, as shown to the right. The first
four table locations are reserved.
The CPU reads data from the table after
powerup, interpreting the four data words
in each block with these meanings:
1. Starting address of slave’s input data
2. Number of slave’s input points
3. Starting address of outputs in slave
4. Number of slave’s output points
The table is 32 words long. If your system
has fewer than seven remote slave bases,
then the remainder of the table must be
filled with zeros. For example, a 3--slave
system will have a remote configuration
table containing 4 reserved words,12
words of data and 16 words of “0000”.
A portion of the ladder program must
configure this table (only once) at
powerup. Use the LDA instruction as
shown to the right, to load an address to
place in the table. Use the regular LD
constant to load the number of the slave’s
input or output points.
The following page gives a short program
example for one slave.
Remote I/O data
V37700 xxxx
V37701 xxxx
V37702 xxxx
V37703 xxxx
37700Memory Addr. Pointer
LDA
O40000
OUT
V37704
Reserved
Slave 1
Slave 7
V37704 xxxx
V37705 xxxx
V37706 xxxx
V37707 xxxx
V37734 0000
V37735 0000
V37736 0000
V37737 0000
LD
K16
OUT
V37705
SP0
DirectSOFT
Configure Remote
I/O Slaves
Configuring the
Remote I/O Table
System Design
and Configuration
4--20 System Design and Configuration
DL350 User Manual, 2nd Edition
Consider the simple system featuring Remote I/Oshown below. The DL350’s built-in
Remote I/O channel connects to one slave base, which we will assign a station
address=1. The baud rates on the master and slave will be 38400 kB.
We can map the remote I/O points as any type of I/O point, simply by choosing the
appropriate range of V-memory. Since we have plenty of standard I/O addresses
available (X and Y), we will have the remote I/O points start at the next X and Y
addresses after the main base points (X60 and Y40, respectively).
Slot
Number
Module
Name Input Addr. Output Addr.
INPUT OUTPUT
No. Inputs No.Outputs
Remote Base Address_________(Choose 1--7)
Remote Slave Worksheet
1
2
3
4
5
6
7
0
Input Bit Start Address:________V-Memory Address:V_______
Output Bit Start Address:________V-Memory Address:V_______
Total Input Points_____
Total Output Points_____
08ND3S
08ND3S
08TD1
08TD1
1
X060
X070
8
8
Y040
Y050
8
8
X060
Y040
16
16
40403
40502
Main Base with CPU as Master
DL350
CPU
Remote Slave
X0-X17X20-X37X40-X57Y0-Y17Y20-Y37
V40400V40401V40402V40500V40501
X60-X67
V40403
X70-X77 Y40-Y47 Y50-Y57
V40502
D2
RSSS
Slave
Port 2
16
I
16
I
16
I
16
O
16
O
8
I
8
I
8
O
8
O
V40404 V40503
Using the Remote Slave Worksheet
shown above can help organize our
system data in preparation for writing our
ladder program (a blank full-page copy of
this worksheet is in the Remote I/O
Manual). The four key parameters we
need to place in our Remote I/O
configuration table is in the lower right
corner of the worksheet. You can
determine the address values by using the
memory map given at the end of Chapter
3, CPU Specifications and Operation.
The program segment required to transfer
our worksheet results to the Remote I/O
configuration table is shown to the right.
Remember to use the LDA or LD
instructions appropriately.
The next page covers the remainder of the
required program to get this remote I/O
link up and running.
LDA
O40403
OUT
V37704
LD
K16
OUT
V37705
SP0
DirectSOFT
LDA
O40502
OUT
V37706
LD
K16
OUT
V37707
Slave 1
Input
Slave 1
Output
Remote I/O
Setup Program
System Design
and Configuration
4--21
System Design and Configuration
DL350 User Manual, 2nd Edition
When configuring a Remote I/O channel
for fewer than 7 slaves, we must fill the
remainder of the table with zeros. This is
necessary because the CPU will try to
interpret any non-zero number as slave
information.
We continue our setup program from the
previous page by adding a segment which
fills the remainder of the table with zeros.
The example to the right fills zeros for
slave numbers 2--7, which do not exist in
our example system.
LD
K0
OUTD
V37710
OUTD
V37736
DirectSOFT
SET
C740
On the last rung in the example program above, we set a special relay contact C740.
This particular contact indicates to the CPU the ladder program has finished
specifying a remote I/O system. At that moment the CPU begins remote I/O
communications. Be sure to include this contact after any Remote I/O setup
program.
Now we can verify the remote I/O link and
setup program operation. A simple quick
check can be done with one rung of ladder,
shown to the right. It connects the first
input of the remote base with the first
output. After placing the PLC in RUN
mode, we can go to the remote base and
activate its first input. Then its first output
should turn on.
X60
DirectSOFT
OUT
Y40
Remote I/O
Test Program
System Design
and Configuration
4--22 System Design and Configuration
DL350 User Manual, 2nd Edition
Network Connections to MODBUS and DirectNET
This section describes how to configure the CPU’s built-in networking ports. for
either MODBUS or DirectNET. This will allow you to connect the DL305 PLC system
directly to MODBUS networks using the RTU protocol, or to other devices on a
DirectNET network. MODBUS hosts system on the network must be capable of
issuing the MODBUS commands to read or write the appropriate data. For details on
the MODBUS protocol, please refer to the Gould MODBUS Protocol reference
Guide (P1--MBUS--300 Rev. B). In the event a more recent version is available,
check with your MODBUS supplier before ordering the documentation. For more
details on DirectNET, order our DirectNET manual, part number DA--DNET--M.
You will need to determine whether the network connection is a 3-wire RS--232 type,
or a 5-wire RS--422 type. Normally, the RS--232 signals are used for shorter
distances (15 meters max), for communications between two devices. RS--422
signals are for longer distances (1000 meters max.), and for multi-drop networks
(from 2 to 247 devices). Use termination resistors at both ends of RS--422 network
wiring, matching the impedance rating of the cable, for example, to match the
termination resistance to Belden 9841 use a 120 ohm resistor. Resistors should be
insatlled close to the end of the cable at the master and last slave connections.
14 TXD+
16 TXD--
9RXD+
10 RXD--
19 RTS+
18 RTS--
11 CTS+
23 CTS--
7GND
PC/PLC
Master
14 TXD+
16 TXD--
9RXD+
10 RXD--
19 RTS+
18 RTS--
11 CTS+
23 CTS--
7GND 14 TXD+
16 TXD--
9RXD+
10 RXD--
19 RTS+
18 RTS--
11 CTS+
23 CTS--
7GND
Slave Last Slave
25-pin Female
D Connector
Port 2 Pin Descriptions (DL350 CPU)
1 not used
2 TXD Transmit Data (RS232C)
3 RXD Receive Data (RS232C)
4 RTS Ready to Send (RS--232C)
5 CTS Clear to Send (RS--232C)
6 not used
7 0V Power (--) connection (GND)
8 0V Power (--) connection (GND)
9 RXD + Receive Data + (RS--422)
10 RXD -- Receive Data (RS--422)
11 CTS + Clear to Send + (RS422)
12 TXD + Transmit Data + (REMIO)
13 TXD -- Transmit Data -- (REMIO)
The recommended cable for RS422 is Beldon 8102 or equivalent.
114
13 25
Port 2 Pin Descriptions (Cont’d)
14 TXD + Transmit Data + (RS--422
15 not used
16 TXD -- Transmit Data -- (RS--422)
17 not used
18 RTS -- Request to Send -- (RS--422)
19 RTS + Request to Send -- (RS--422)
20 not used
21 not used
22 not used
23 CTS -- Clear to Send -- (RS--422)
24 RXD + Receive Data + (REMIO)
25 RXD -- Receive Data -- (REMIO)
Configuring
the CPU’s
Comm Port
System Design
and Configuration
4--23
System Design and Configuration
DL350 User Manual, 2nd Edition
In DirectSOFT, choose the PLC menu, then Setup, then “Secondary Comm Port”.
SPort: From the port number list box at the top, choose “Port 2”.
SProtocol: Click the check box to the left of “MODBUS” (use AUX 56 on
the HPP, and select “MBUS”), and then you’ll see the dialog box below.
Setup Commu-
nication Ports
STimeout: amount of time the port will wait after it sends a message to
get a response before logging an error.
SResponse Delay Time: The amount of time between raising the RTS
line and sending the data. This is for devices that do not use RTS/CTS
handshaking. The RTS and CTS lines must be bridged together for the
CPU to send any data.
SStation Number: For making the CPU port a MODBUS master, choose
“1”. The possible range for MODBUS slave numbers is from 1 to 247,
but the DL350 network instructions used in Master mode will access
only slaves 1 to 90. Each slave must have a unique number. At
powerup, the port is automatically a slave, unless and until the DL350
executes ladder logic network instructions which use the port as a
master. Thereafter, the port reverts back to slave mode until ladder logic
uses the port again.
SBaud Rate: The available baud rates include 300, 600, 900, 2400,
4800, 9600, 19200, and 38400 baud. Choose a higher baud rate initially,
reverting to lower baud rates if you experience data errors or noise
problems on the network. Important: You must configure the baud rates
of all devices on the network to the same value. Refer to the appropriate
product manual for details.
SStop Bits: Choose 1 or 2 stop bits for use in the protocol.
SParity: Choose none, even, or odd parity for error checking.
Then click the button indicated to send the Port configuration to
the CPU, and click Close.
MODBUS Port
Configuration
System Design
and Configuration
4--24 System Design and Configuration
DL350 User Manual, 2nd Edition
In DirectSOFT, choose the PLC menu, then Setup, then “Secondary Comm Port”.
SPort: From the port number list box, choose “Port 2 ”.
SProtocol: Click the check box to the left of “DirectNET” (use AUX 56 on
the HPP, then select “DNET”), and then you’ll see the dialog box below.
Setup Communication Ports
STimeout: amount of time the port will wait after it sends a message to
get a response before logging an error.
SResponse Delay Time: The amount of time between raising the RTS
line and sending the data. This is for devices that do not use RTS/CTS
handshaking. The RTS and CTS lines must be bridged together for the
CPU to send any data.
SStation Number: For making the CPU port a DirectNET master,
choose “1”. The allowable range for DIrectNETslavesisfrom1to90
(each slave must have a unique number). At powerup, the port is
automatically a slave, unless and until the DL350 executes ladder logic
instructions which attempt to use the port as a master. Thereafter, the
port reverts back to slave mode until ladder logic uses the port again.
SBaud Rate: The available baud rates include 300, 600, 900, 2400,
4800, 9600, 19200, and 38400 baud. Choose a higher baud rate initially,
reverting to lower baud rates if you experience data errors or noise
problems on the network. Important: You must configure the baud rates
of all devices on the network to the same value.
SStop Bits: Choose 1 or 2 stop bits for use in the protocol.
SParity: Choose none, even, or odd parity for error checking.
SFormat: Choose between hex or ASCII formats.
Then click the button indicated to send the Port configuration
to the CPU, and click Close.
DirectNET Port
Configuration
System Design
and Configuration
4--25
System Design and Configuration
DL350 User Manual, 2nd Edition
Network Slave Operation
This section describes how other devices on a network can communicate with a CPU
port that you have configured as a DirectNET slave or MODBUS slave (DL350). A
MODBUS host must use the MODBUS RTU protocol to communicate with the DL350
as a slave. The host software must send a MODBUS function code and MODBUS
address to specify a PLC memory location the DL350 comprehends. The DirectNET
host uses normal I/O addresses to access the applicable DL305 CPU and system. No
CPU ladder logic is required to support either MODBUS slave or DirectNET slave
operation.
The MODBUS function code determines whether the access is a read or a write, and
whether to access a single data point or a group of them. The DL350 supports the
MODBUS function codes described below.
MODBUS
Function Code
Function DL305 Data Types
Available
01 Read a group of coils Y, CR, T, CT
02 Read a group of inputs X, SP
05 Set / Reset a single coil Y, CR, T, CT
15 Set / Reset a group of coils Y, CR, T, CT
03, 04 Read a value from one or more registers V
06 Write a value into a single register V
16 Write a value into a group of registers V
There are typically two ways that most host software conventions allow you to
specify a PLC memory location. These are:
SBy specifying the MODBUS data type and address
SBy specifying a MODBUS address only.
MODBUS Function
Codes Supported
Determining the
MODBUS Address
System Design
and Configuration
4--26 System Design and Configuration
DL350 User Manual, 2nd Edition
Many host software packages allow you to specify the MODBUS data type and the
MODBUS address that corresponds to the PLC memory location. This is the easiest
method, but not all packages allow you to do it this way.
The actual equation used to calculate the address depends on the type of PLC data
you are using. The PLC memory types are split into two categories for this purpose.
SDiscrete -- X, SP, Y, CR, S, T, C (contacts)
SWord -- V, Timer current value, Counter current value
In either case, you basically convert the PLC octal address to decimal and add the
appropriate MODBUS address (if required). The table below shows the exact
equation used for each group of data.
DL350 Memory Type QTY
(Dec.)
PLC Range
(Octal)
MODBUS
Address Range
(Decimal)
MODBUS
Data Type
For Discrete Data Types .... Convert PLC Addr. to Dec. + Start of Range + Data Type
Inputs (X) 512 X0 -- X777 2048 -- 2560 Input
Special Relays (SP) 512 SP0 -- SP777 3072 -- 3584 Input
Outputs (Y) 512 Y0 -- Y777 2048 -- 2560 Coil
Control Relays (CR) 1024 C0 -- C1777 3072 -- 4095 Coil
Timer Contacts (T) 256 T0 -- T377 6144 -- 6399 Coil
Counter Contacts (CT) 128 CT0 -- CT177 6400 -- 6271 Coil
Stage Status Bits (S) 1024 S0 -- S1777 5120 -- 6143 Coil
For Word Data Types .... Convert PLC Addr. to Dec. + Data Type
Timer Current Values (V) 256 V0 -- V377 0 -- 255 Input Register
Counter Current Values (V) 128 V1000 -- V1177 512 -- 639 Input Register
V--Memory, user data (V) 3072
4096 V1400 -- V7377
V10000 -- V17777 768 -- 3839
4096 -- 8191 Holding Register
V--Memory, system (V) 256 V7400 -- V7777 3480 -- 3735 Holding Register
If Your Host Software
Requires the Data
Type and Address...
System Design
and Configuration
4--27
System Design and Configuration
DL350 User Manual, 2nd Edition
The following examples show how to generate the MODBUS address and data type
for hosts which require this format.
Find the MODBUS address
f
or User
V
location V2100.
1. Find V memory in the table.
2. Convert V2100 into decimal (1088).
3. Use the MODBUS data type from the table.
PLC
A
ddress
(
Dec.
)
+ Data Type
V2100 = 1088 decimal
1088 + Hold. Reg. = Holding Reg. 1088
V Memory, user data (V) 3072
12288 V1400 -- V7377
V10000--V37777 768 -- 3839
4096 -- 16383 Holding Register
Find the MODBUS address
f
or output
Y
20.
1. Find Y outputs in the table.
2. Convert Y20 into decimal (16).
3. Add the starting address for the range
(2048).
4. Use the MODBUS data type from the table.
PLC
A
ddr.
(
Dec
)
+ Start Addr. + Data Type
Y20 = 16 decimal
16 + 2048 + Coil = Coil 2064
Outputs (Y) 1024 Y0 -- Y1777 2048 -- 3071 Coil
Find the MODBUS address to obtain the
current value from Timer T10.
1. Find Timer Current Values in the table.
2. Convert T10 into decimal (8).
3. Use the MODBUS data type from the table.
PLC
A
ddress
(
Dec.
)
+ Data Type
T10 = 8 decimal
8 + Input Reg. = Input Reg. 8
Timer Current Values (V) 256 V0 -- V377 0 -- 255 Input Register
Find the MODBUS address
f
or Control Relay
C54.
1. Find Control Relays in the table.
2. Convert C54 into decimal (44).
3. Add the starting address for the range
(3072).
4. Use the MODBUS data type from the table.
PLC
A
ddr.
(
Dec
)
+ Start Addr. +Data Type
C54 = 44 decimal
44 + 3072 + Coil = Coil 3116
Control Relays (CR) 2048 C0 -- C3777 3072 -- 5119 Coil
Example 1: V2100
Example 2: Y20
Example 3: T10 Current
Value
Example 4: C54
System Design
and Configuration
4--28 System Design and Configuration
DL350 User Manual, 2nd Edition
Some host software does not allow you to specify the MODBUS data type and
address. Instead, you specify an address only. This method requires another step to
determine the address, but it’s still fairly simple. Basically, MODBUS also separates
the data types by address ranges as well. So this means an address alone can
actually describe the type of data and location. This is often referred to as “adding the
offset”. One important thing to remember here is that two different addressing
modes may be available in your host software package. These are:
S484 Mode
S584/984 Mode
We recommend that you use the 584/984 addressing mode if your host
software allows you to choose. This is because the 584/984 mode allows access
to a higher number of memory locations within each data type. If your software only
supports 484 mode, then there may be some PLC memory locations that will be
unavailable. The actual equation used to calculate the address depends on the type
of PLC data you are using. The PLC memory types are split into two categories for
this purpose.
SDiscrete -- X, SP, Y, CR, S, T, C (contacts)
SWord -- V, Timer current value, Counter current value
In either case, you basically convert the PLC octal address to decimal and add the
appropriate MODBUS addresses (as required). The table below shows the exact
equation used for each group of data.
DL350 Memory Type QTY
(Dec.)
PLC Range
(Octal)
MODBUS
Address Range
(Decimal)
484 Mode
Address
584/984
Mode
Address
MODBUS
Data Type
For Discrete Data Types ... Convert PLC Addr. to Dec. + Start of Range + Appropriate Mode Address
Inputs (X) 512 X0 -- X777 2048 -- 2560 1001 10001 Input
Special Relays (SP) 512 SP0 -- SP777 3072 -- 3584 1001 10001 Input
Outputs (Y) 512 Y0 -- Y777 2048 -- 2560 11Coil
Control Relays (CR) 1024 C0 -- C3777 3072 -- 4095 11Coil
Timer Contacts (T) 256 T0 -- T377 6144 -- 6399 11Coil
Counter Contacts (CT) 128 CT0 -- CT177 6400 -- 6527 11Coil
Stage Status Bits (S) 1024 S0 -- S1777 5120 -- 6143 11Coil
For Word Data Types .... Convert PLC Addr. to Dec. + Appropriate Mode Address
Timer Current Values (V) 256 V0 -- V377 0 -- 255 3001 30001 Input Reg.
Counter Current Values (V) 128 V1000 -- V1177 512 -- 639 3001 30001 Input Reg
V Memory, user data (V) 3072
4096 V1400 -- V7377
V10000 -- V17777 768 -- 3839
4096 -- 8192 4001 40001 Hold Reg.
V Memory, system (V) 256 V7400 -- V7777 3840 -- 3735 4001 40001 Hold Reg.
If Your MODBUS
Host Software
Requires an
Address ONLY
System Design
and Configuration
4--29
System Design and Configuration
DL350 User Manual, 2nd Edition
The following examples show how to generate the MODBUS addresses for hosts
which require this format.
Find the MODBUS address
f
or User
V
location V2100.
1. Find V memory in the table.
2. Convert V2100 into decimal (1088).
3. Add the MODBUSstarting address for the
mode (40001).
PLC
A
ddress
(
Dec.
)
+ Mode
A
ddress
V2100 = 1088 decimal
1088 + 40001 = 41089
V Memory, system (V) 320 V700 -- V777
V7400 -- V7777 448 -- 768
3840 -- 3735 4001 40001 Hold Reg.
Find the MODBUS address
f
or output
Y
20.
1. Find Y outputs in the table.
2. Convert Y20 into decimal (16).
3. Add the starting address for the range
(2048).
4. Add the MODBUS address for the mode
(1).
PLC
A
ddr.
(
Dec
)
+ Start Addr. + Mode
Y20 = 16 decimal
16 + 2048 + 1 = 2065
Outputs (Y) 1024 Y0 -- Y1777 2048 -- 3071 1 1 Coil
Find the MODBUS address to obtain the
current value from Timer T10.
1. Find Timer Current Values in the table.
2. Convert T10 into decimal (8).
3. Add the MODBUSstarting address for the
mode (3001).
PLC
A
ddress
(
Dec.
)
+ Mode
A
ddress
T10 = 8 decimal
8 + 3001 = 3009
Timer Current Values (V) 256 V0 -- V377 0 -- 255 3001 30001 Input Reg.
Find the MODBUS address
f
or Control Relay
C54.
1. Find Control Relays in the table.
2. Convert C54 into decimal (44).
3. Add the starting address for the range
(3072).
4. Add the MODBUS address for the mode
(1).
PLC
A
ddr.
(
Dec
)
+ Start Address + Mode
C54 = 44 decimal
44 + 3072 + 1 = 3117
Control Relays (CR) 2048 C0 -- C3777 3072 -- 5119 1 1 Coil
Addressing the memory types for DirectNET slaves is very easy. Use the ordinary
native address of the slave device itself. To access a slave PLC’s memory address
V2000 via DirectNET, for example, the network master will request V2000 from the
slave.
Example 1: V2100
584/984 Mode
Example 2: Y20
584/984 Mode
Example 3: T10 Current
Value
484 Mode
Example 4: C54
584/984 Mode
Determining the
DirectNET Address
System Design
and Configuration
4--30 System Design and Configuration
DL350 User Manual, 2nd Edition
Network Master Operation
This section describes how the DL350 can communicate on a MODBUS or DirectNET
network as a master. For MODBUS networks, it uses the MODBUS RTU protocol,
which must be interpreted by all the slaves on the network. Both MODBUS and
DirectNET are single master/multiple slave networks. The master is the only
member of the network that can initiate requests on the network. This section teaches
you how to design the required ladder logic for network master operation.
Slave #1 Slave #3
Master
MODBUS RTU Protocol, or DirectNET
Slave #2
When using the DL350 CPU as the master
station, you use simple RLL instructions to
initiate the requests. The WX instruction
initiates network write operations, and the
RX instruction initiates network read
operations. Before executing either the
WX or RX commands, we will need to load
data related to the read or write operation
onto the CPU’s accumulator stack. When
the WX or RX instruction executes, it uses
the information on the stack combined
with data in the instruction box to
completely define the task, which goes to
the port.
Slave
Master
WX (write)
RX (read)
Network 1
Network
The following step-by-step procedure will provide you the information necessary to
set up your ladder program to receive data from a network slave.
System Design
and Configuration
4--31
System Design and Configuration
DL350 User Manual, 2nd Edition
The first Load (LD) instruction identifies
the communications port number on the
network master (DL350) and the address
of the slave station. This instruction can
address up to 90 MODBUS slaves, or 90
DirectNET slaves. The format of the word
is shown to the right. The “F” in the upper
nibble tells the CPU the port is internal to
the CPU (and not in a slot in the base). The
second nibble indicates the port number,
1. This is the logical port number (0 for top
port and 1 for the bottom). The lower byte
contains the slave address number in
BCD (01 to 90).
1 0 1F
Internal port (hex)
Port number (BCD)
Slave address (BCD)
LD
KF101
The second Load (LD) instruction
determines the number of bytes which will
be transferred between the master and
slave in the subsequent WX or RX
instruction. The value to be loaded is in
BCD format (decimal), from 1 to 128
bytes.
128 (BCD)
# of bytes to transfer
LD
K128
The number of bytes specified also depends on the type of data you want to obtain.
For example, the DL305 Input points can be accessed by V-memory locations or as
X input locations. However, if you only want X0 -- X27, you’ll have to use the X input
data type because the V-memory locations can only be accessed in 2-byte
increments. The following table shows the byte ranges for the various types of
DirectLOGICproducts.
DL205 / 305 / 405 Memory Bits per unit Bytes
V--memory
T / C current value
16
16
2
2
Inputs (X, SP) 8 1
Outputs
(Y, C, Stage, T/C bits) 8 1
Scratch Pad Memory 8 1
Diagnostic Status 8 1
DL305C (DL330/340 CPUs)
Memory
Bits per unit Bytes
Data registers
T / C accumulator
8
16
1
2
I/O, internal relays, shift register
bits, T/C bits, stage bits 8 1
Scratch Pad Memory 8 2
Diagnostic Status(5 word R/W) 16 10
Step 1:
Identify Master
Port # and Slave #
Step 2:
Load Number of
Bytes to Transfer
System Design
and Configuration
4--32 System Design and Configuration
DL350 User Manual, 2nd Edition
The third instruction in the RX or WX
sequence is a Load Address (LDA)
instruction. Its purpose is to load the
starting address of the memory area to be
transferred. Entered as an octal number,
the LDA instruction converts it to hex and
places the result in the accumulator.
For a WX instruction, the DL350 CPU
sends the number of bytes previously
specified from its memory area beginning
at the LDA address specified.
For an RX instruction, the DL350 CPU
reads the number of bytes previously
specified from the slave, placing the
received data into its memory area
beginning at the LDA address specified.
6 0 00 (octal)
LDA
O40600
4
Starting address of
master transfer area
V40600
MSB LSB
015
V40601
MSB LSB
015
NOTE: Since V memory words are always 16 bits, you may not always use the whole
word. For example, if you only specify 3 bytes and you are reading Y outputs from the
slave, you will only get 24 bits of data. In this case, only the 8 least significant bits of
the last word location will be modified. The remaining 8 bits are not affected.
The last instruction in our sequence is the
WX or RX instruction itself. Use WX to
write to the slave, and RX to read from the
slave. All four of our instructions are
shown to the right. In the last instruction,
you must specify the starting address and
avaliddatatypefortheslave.
LD
KF101
LD
K128
LDA
O40600
RX
Y0
SP116
SDirectNET slaves -- specify the same address in the WX and RX
instruction as the slave’s native I/O address
SMODBUS DL405, DL305 (DL350 CPU), or DL205 slaves -- specify the
same address in the WX and RX instruction as the slave’s native I/O
address
SMODBUS 305C (DL330/340 CPUs) slaves -- use the following table to
convert DL305 addresses to MODBUS addresses
DL305C (DL330/340 CPUs) Series CPU Memory Type--to--MODBUS Cross Reference
PLC Memory type PLC base
address MODBUS
base addr. PLC Memory Type PLC base
address MODBUS
base addr.
TMR/CNT Current Values R600 V0 TMR/CNT Status Bits CT600 GY600
I/O Points IO 000 GY0 Control Relays CR160 GY160
Data Registers R401,
R400 V100 Shift Registers SR400 GY400
Stage Status Bits (D3--330P only) S0 GY200
Step 3:
Specify Master
Memory Area
Step 4:
Specify Slave
Memory Area
System Design
and Configuration
4--33
System Design and Configuration
DL350 User Manual, 2nd Edition
Typically network communications will
last longer than 1 scan. The program must
wait for the communications to finish
before starting the next transaction.
Port Communication Error
LD
KF101
LD
K0003
LDA
O40600
RX
Y0
SP116
Port Busy
SP117
SET
Y1
The port which can be a master has two Special Relay contacts associated with it
(see Appendix D for comm port special relays).One indicates “Port busy”(SP116),
and the other indicates “Port Communication Error” (SP117). The example above
shows the use of these contacts for a network master that only reads a device (RX).
The “Port Busy” bit is on while the PLC communicates with the slave. When the bit is
off the program can initiate the next network request.
The “Port Communication Error” bit turns on when the PLC has detected an error.
Use of this bit is optional. When used, it should be ahead of any network instruction
boxes since the error bit is reset when an RX or WX instruction is executed.
If you are using multiple reads and writes
in the RLL program, you have to interlock
the routines to make sure all the routines
are executed. If you don’t use the
interlocks, then the CPU will only execute
the first routine. This is because each port
can only handle one transaction at a time.
In the example to the right, after the RX
instruction is executed, C0 is set. When
the port has finished the communication
task, the second routine is executed and
C0 is reset.
If you’re using RLLPLUS Stage Programing,
you can put each routine in a separate
program stage to ensure proper execution
and switch from stage to stage allowing only
one of them to be active at a time.
Interlocking Relay
LD
KF101
LD
K0003
LDA
O40600
RX
Y0
SP116
SET
C100
C100
LD
KF101
LD
K0003
LDA
O40400
WX
Y0
SP116
RST
C100
C100
Interlocking
Relay
Communications
from a
Ladder Program
Multiple Read and
Write Interlocks
1
15
Standard RLL
Instructions
In This Chapter....
— Introduction
— Using Boolean Instructions
— Boolean Instructions
— Comparative Boolean Instructions
— Immediate Instructions
— Timer, Counter and Shift Register Instructions
— Accumulator / Stack Load and Output Data Instructions
— Accumulator Logical Instructions
— Math Instructions
— Bit Operation Instructions
— Number Conversion Instructions
— Table Instructions
— Clock / Calendar Instructions
— CPU Control Instructions
— Program Control Instructions
— Intelligent I/O Instructions
— Network Instructions
— Message Instructions
Standard RLL
Instructions
5--2 Standard RLL Instructions
DL350 User Manual, 2nd Edition
Introduction
The DL350 CPU offers a wide variety of instructions to perform many different types
of operations. This chapter shows you how to use these individual instructions.
There are two ways to quickly find the instruction you need.
SIf you know the instruction category (Boolean, Comparative Boolean,
etc.) use the header at the top of the page to find the pages that discuss
the instructions in that category.
SIf you know the individual instruction name, use the following table to
find the page that discusses the instruction.
Instruction Page
ACON ASCII Constant 5--143
ADD Adds BCD 5--77
ADDB Add Binary 5--90
ADDD Add Double 5--78
ADDR Add Real Number 5--79
AND And for contacts or boxes 5--12, 5--29, 5--64
AND STR And Store 5--14
ANDB And Bit--of--Word 5--13
ANDD And Double 5--65
ANDE And if Equal 5--26
ANDF And Formatted 5--66
ANDI And Immediate 5--32
ANDN And Not 5--12, 5--29
ANDNB And Not Bit--of--Word 5--13
ANDNE And if Not Equal 5--26
ANDNI And Not Immediate 5--32
ANDND And Negative Differential 5--21
ANDPD And Positive Differential 5--21
ATH ASCII to Hex 5--109
BCD Binary Coded Decimal 5--104
BCDCPL Tens Compliment 5--106
BIN Binary 5--103
BCALL Block Call (Stage) 7--27
BEND Block End (Stage) 7--27
BLK Block (Stage) 7--27
BTOR Binary to Real 5--107
CMP Compare 5--73
CMPD Compare Double 5--74
CMPF Compare Formatted 5--75
CMPR Compare Real Number 5--76
CNT Counter 5--40
CV Converge Stage 7--25
CVJMP Converge Jump (Stage) 7--25
Instruction Page
DATE Date 5--120
DEC Decrement 5--89
DECB Decrement Binary 5--95
DECO Decode 5--102
DISI Disable Interrupts 5--133
DIV Divide 5--86
DIVB Divide Binary 5--93
DIVD Divide Double 5--87
DIVR Divide Real Number 5--88
DLBL Data Label 5--143
DRUM Timed Drum 6--12
EDRUM Event Drum 6--14
ENCO Encode 5--101
END End 5--122
ENI Enable Interrupts 5--133
FAULT Fault 5--141
FOR For/Next 5--125
GOTO Goto/Label 5--124
GRAY Gray Code 5--113
GTS Goto Subroutine 5--127
HTA HEX to ASCII 5--110
INC Increment 5--89
INCB Increment Binary 5--94
INT Interrupt 5--132
INV Invert 5--105
IRT Interrupt Return 5--133
IRTC Interrupt Return Conditional 5--133
ISG Initial Stage 7--24
JMP Jump 7--24
LBL Label (Goto/Lbl) 5--124
LD Load 5--52
LDA Load Address 5--55
LDD Load Double 5--53
LDF Load Formatted 5--54
LDR Load Real number 5--58
LDX Load Indexed 5--56
LDLBL Load Label 5--117
LDSX Load Indexed from Constant 5--57
Standard RLL
Instructions
5--3
Standard RLL Instructions
DL350 User Manual, 2nd Edition
Instruction Page
MDRUMD Masked Event Drum Discrete 6--18
MDRUMW Masked Event Drum Word 6--20
MLR Master Line Reset 5--130
MLS Master Line Set 5--130
MOV Move 5--116
MOVMC Move Memory Cartridge 5--117
MUL Multiply 5--83
MULB Multiply Binary 5--92
MULD Multiply Double 5--84
MULR Multiply Real Number 5--85
NCON Numeric Constant 5--143
NEXT Next (For/Next) 5--125
NJMP Not Jump (Stage) 7--24
NOP No Operation 5--122
NOT Not 5--17
OR Or 5--10, 5--28, 5--67
OR OUT Or Out 5--17
OR OUTI Or Out Immediate 5--33
OR STR Or Store 5--14
O R B O r B i t -- o f -- w o r d 5--11
ORD Or Double 5--68
ORE Or if Equal 5--25
ORF Or Formatted 5--69
ORI Or Immediate 5--31
ORN Or Not 5--10, 5--28
ORNB Or Not Bit--of--Word 5--11
ORND Or Negative Differential 5--20
ORNE Or if Not Equal 5--25
ORNI Or Not Immediate 5--31
ORPD Or Positve Differential 5--20
OUT Out 5--15, 5--59
OUTB Out Bit--of--Word 5--16
OUTD Out Double 5--60
OUTF Out Formatted 5--61
OUTI Out immediate 5--33
OUTX Indexed 5--62
PD Positve Differential 5--18
POP Pop 5--63
PRINT Print 5--145
RD Read from Intelligent Module 5--135
ROTL Rotate Left 5--99
ROTR Rotate Right 5--100
RST Reset 5--22
RSTB Reset Bit--of--Word 5--23
RSTI Reset Immediate 5--34
RSTWT Reset Watch Dog Timer 5--123
RT Subroutine return 5--127
RTC Subroutine Return Conditional 5--127
RTOB Real to Binary 5--108
Instruction Page
RX Read From Network 5--137
SBR Subroutine (Goto Subroutine) 5--127
SEG Segment 5--112
SET Set 5--22
SETB Set Bit--of--Word 5--23
SETI Set Immediate 5--34
SFLDGT Shuffle Digits 5--114
SG Stage 7--23
SGCNT Stage Counter 5--42
SHFL Shift Left 5--97
SHFR Shift Right 5--98
SR Shift Register 5--46
STOP Stop 5--123
STR Store 5--8, 5--27
STRB Store Bit--of--word 5--9
STRE Store if Equal 5--24
STRI Store Immediate 5--30
STRN Store Not 5--8, 5--27
STRNB Store Not Bit--of--Word 5--9
STRNE Store if not Equal 5--24
STRNI Store Not Immediate 5--30
STRND Store Negative Differential 5--19
STRPD Store Positive Differential 5--19
SUB Subtract 5--80
SUBB Subtract Binary 5--91
SUBD Subtract Double 5--81
SUBR Subtract Real Number 5--82
SUM Sum 5--96
TIME Time of CPU 5--121
TMR Timer 5--36
TMRA Accumualting Timer 5--38
TMRAF Accumualting Fast Timer 5--38
TMRF Fast Timer 5--36
UDC Up Down Couonter 5--44
WT Write to Intelligent Module 5--136
WX WritetoNetwork 5--139
XOR Exclusive Or 5--70
XORD Exclusive Or Double 5--71
XORF Exclusive Or Formatted 5--72
Standard RLL
Instructions
5--4 Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
Using Boolean Instructions
Do you question why many PLC manufacturers quote the scan time for a 1K boolean
program? It is because most all programs utilize many boolean instructions. These
are typically very simple instructions designed to join input and output contacts in
various series and parallel combinations. Since the DirectSOFT package allows the
use of graphic symbols to build the program, you don’t absolutely have to know the
mnemonics of the instructions. However, it may helpful at some point, especially if
you ever have to troubleshoot the program with a Handheld Programmer.
All programs require an END statement as the last instruction. This tells the CPU it is
the end of the program. Normally, any instructions placed after the END statement
will not be executed. There are exceptions to this such as interrupt routines, etc. The
instruction set at the end of this chapter discussed this in detail.
OUT
Y0
X0
END
All programs must have and END statement
You will use a contact to start rungs that contain both contacts andcoils. The boolean
instruction, Store or, STR instruction performs this function. The output point is
represented by the Output or, OUT instruction. The following example shows how to
enter a single contact and a single output coil.
OUT
Y0X0
END
DirectSOFT Example Handheld Mnemonics
STR X0
OUT Y0
END
Normally closed contacts are also very common. This is accomplished with the
Store Not or, STRN instruction. The following example shows a simple rung with a
normally closed contact.
OUT
Y0X0
END
DirectSOFT Example Handheld Mnemonics
STRN X0
OUT Y0
END
Use the AND instruction to join two or more contacts in series. The following
example shows two contacts in series and a single output coil. The instructions used
are STR X0, AND X1, followed by OUT Y0.
OUT
Y0X0
END
X1 DirectSOFT Example Handheld Mnemonics
STR X0
AND X1
OUT Y0
END
END Statement
Simple Rungs
Normally Closed
Contact
Contacts in Series
Standard Standard RLL
Instructions
5--5
Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
Sometimes it is necessary to use midline outputs to get additional outputs that are
conditional on other contacts. The following example shows how you can use the
AND instruction to continue a rung with more conditional outputs.
OUT
Y0X0
END
X1 DirectSOFT Example Handheld Mnemonics
STR X0
AND X1
OUT Y0
AND X2
OUT Y1
END
X2
OUT
Y1
You may also have to join contacts in parallel. The OR instruction allows you to do
this. The following example shows two contacts in parallel and a single output coil.
The instructions would be STR X0, OR X1, followed by OUT Y0.
OUT
Y0X0
END
X1
DirectSOFT Example
Handheld Mnemonics
STR X0
OR X1
OUT Y0
END
Quite often it is necessary to join several groups of series elements in parallel. The
Or Store (ORSTR) instruction allows this operation. The following example shows a
simple network consisting of series elements joined in parallel.
OUT
Y0X0
END
X2
X1
X3
DirectSOFT Example Handheld Mnemonics
STR X0
AND X1
STR X2
AND X3
ORSTR
OUT Y0
END
You can also join one or more parallel branches in series. The And Store (ANDSTR)
instruction allows this operation. The following example shows a simple network
with contact branches in series with parallel contacts.
OUT
Y0X0
END
X1
X2
DirectSOFT Example Handheld Mnemonics
STR X0
STR X1
OR X2
ANDSTR
OUT Y0
END
Midline Outputs
Parallel Elements
Joining Series
Branches in
Parallel
Joining Parallel
Branches in Series
Standard RLL
Instructions
5--6 Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
You can combine the various types of series and parallel branches to solve most any
application problem. The following example shows a simple combination network.
OUT
Y0X0
END
X2
X3
X1 X4
X5
X6
There are limits to how many elements you can include in a rung. This is because the
DL350 CPU uses an 8-level boolean stack to evaluate the various logic elements.
The boolean stack is a temporary storage area that solves the logic for the rung.
Each time you enter a STR instruction, the instruction is placed on the top of the
boolean stack. Any other STR instructions on the boolean stack are pushed down a
level. The ANDSTR, and ORSTR instructions combine levels of the boolean stack
when they are encountered. Since the boolean stack is only eight levels, an error will
occur if the CPU encounters a rung that uses more than the eight levels of stack.
S
SSS
X1 OR (X2 AND X3)
STR X0 STR X1 STR X2
1STRX0
2
3
4
5
6
7
8
1STRX1
2STRX0
3
4
5
6
7
8
1STRX2
2STRX1
3STRX0
4
5
6
7
8
AND X3
1X2ANDX3
2STRX1
3STRX0
4
5
6
7
8
ORSTR
1
2STRX0
3
8
OUT
Y0X0 X1
X2 X3
X4
X5
STR
OR
AND
ORSTR
ANDSTR
Output
STR
STR
AND
X4 AND [X1 OR (X2 AND X3)]
AND X4
1
2STRX0
3
8
NOTX5ORX4AND[X1OR(X2ANDX3)]
ORNOT X5
1
2STR X0
3
8
ANDSTR
X0 AND (NOT X5 OR X4) AND [X1 OR (X2 AND X3)]1
2
3
8
SS S
S
Combination
Networks
Boolean Stack
Standard Standard RLL
Instructions
5--7
Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
The DL350 CPU provides Comparative Boolean instructions that allow you to
quickly and easily compare two numbers. The Comparative Boolean provides
evaluation of two 4-digit values using boolean contacts. The valid evaluations are:
equal to, not equal to, equal to or greater than, and less than.
In the following example when the value
in Vmemory location V1400 is equal to
the constant 1234, Y3 will energize.
Y3
OUT
V1400 K1234
The DL350 CPU usually can complete an operation cycle in milliseconds. However,
in some applications you may not be able to wait a few milliseconds until the next I/O
update occurs. The DL350 CPU offers Immediate input and outputs which are
special boolean instructions that allow reading directly from inputs and writing
directly to outputs during the program execution portion of the CPU cycle. This is
normally performed during the input or output update portion of the CPU cycle. The
immediate instructions take longer to execute because the program execution is
interrupted while the CPU reads or writes the module. This function is not normally
performed until the read inputs or the write outputs portion of the CPU cycle.
NOTE: Even though the immediate input instruction reads the most current status
from the module, it only uses the results to solve that one instruction. It does not use
the new status to update the image register. Therefore, any regular instructions that
follow will still use the image register values. Any immediate instructions that follow
will access the module again to update the status. The immediate output instruction
will write the status to the module and update the image register.
X0
OFF
X1
OFF
CPU Scan
Read Inputs
Diagnostics
Input Image Register
The CPU reads the inputs from
the local base and stores the
status in an input image
register.
X0 Y0
X0X1X2...X128
OFFOFFON...OFF
Solve the Application Program
Read Inputs from Specialty I/O
Write Outputs
Write Outputs to Specialty I/O
X0
ON
X1
OFF
Immediate instruction does
not use the input image
register, but instead reads the
status from the module
immediately. I/O Point X0 Changes
I
Comparative
Boolean
Immediate Boolean
Standard RLL
Instructions
5--8 Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
Boolean Instructions
The Store instruction begins a new rung
or an additional branch in a rung with a
normally open contact. Status of the
contact will be the same state as the
associated image register point or
memory location.
Aaaa
The Store Not instruction begins a new
rung or an additional branch in a rung
with a normally closed contact. Status of
the contact will be opposite the state of
the associated image register point or
memory location.
Aaaa
Operand Data Type DL350 Range
Aaaa
Inputs X0--777
Outputs Y0--777
Control Relays C0--1777
Stage S0--1777
Timer T0--377
Counter CT 0--177
Special Relay SP 0--0777
In the following Store example, when input X1 is on, output Y2 will energize.
STR 1ENT
OUT 2ENT
Handheld Programmer KeystrokesDirectSOFT
Y2
OUT
X1
In the following Store Not example, when input X1 is off output Y2 will energize.
STRN 1ENT
OUT 2ENT
Y2
OUT
X1
Handheld Programmer KeystrokesDirectSOFT
Store
(STR)
Store Not
(STRN)
Standard Standard RLL
Instructions
5--9
Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
The Store Bit-of-Word instruction begins a
new rung or an additional branch in a rung
with a normally open contact. Status of the
contact will be the same state as the bit
referenced in the associated memory
location.
Aaaa.bb
The Store Not instruction begins a new
rung or an additional branch in a rung with
a normally closed contact. Status of the
contact will be opposite the state of the bit
referenced in the associated memory
location.
Aaaa.bb
Operand Data Type DL350 Range
Aaaa bb
V--memory BAll (See p.3--29 ) BCD,0to15
Pointer PB All (See p 3--29) BCD,0to15
In the following Store Bit-of-Word example, when bit 12 of V-memory location V1400
is on, output Y2 will energize.
Handheld Programmer Keystrokes
DirectSOFT
Y2
OUT
B1400.12
STR V 1
OUT 2
SHFT 400
1 2 ENT
ENT
K
B
In the following Store Not Bit-of-Word example, when bit 12 of V-memory location
V1400 is off, output Y2 will energize.
Y2
OUT
B1400.12
DirectSOFT
OUT 2 ENT
Handheld Programmer Keystrokes
STRN V 1SHFT 400
1 2 ENT
K
B
Store Bit-of-Word
(STRB)
Store Not
Bit-of-Word
(STRNB)
Standard RLL
Instructions
5--10 Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
The Or instruction logically ors a normally
open contact in parallel with another
contact in a rung. The status of the
contact will be the same state as the
associated image register point or
memory location.
Aaaa
The Or Not instruction logically ors a
normally closed contact in parallel with
another contact in a rung. The status of
the contact will be opposite the state of
the associated image register point or
memory location.
Aaaa
Operand Data Type DL350 Range
Aaaa
Inputs X0--777
Outputs Y0--777
Control Relays C0--1777
Stage S0--1777
Timer T0--377
Counter CT 0--177
Special Relay SP 0--777
In the following Or example, when input X1 or X2 is on, output Y5 will energize.
STR 1ENT
OR 2ENT
OUT 5ENT
Y5
OUT
X1
X2
Handheld Programmer KeystrokesDirectSOFT
In the following Or Not example, when input X1 is on or X2 is off, output Y5 will
energize.
STR 1ENT
2ENT
OUT 5ENT
ORN
X1 Y5
OUT
X2
Handheld Programmer KeystrokesDirectSOFT
Or
(OR)
Or Not
(ORN)
Standard Standard RLL
Instructions
5--11
Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
The Or Bit-of-Word instruction logically
ors a normally open contact in parallel
with another contact in a rung. Status of
the contact will be the same state as the
bit referenced in the associated memory
location.
Aaaa.bb
The Or Not Bit-of-Word instruction
logically ors a normally closed contact in
parallel with another contact in a rung.
Status of the contact will be opposite the
state of the bit referenced in the
associated memory location.
Aaaa.bb
Operand Data Type DL350 Range
Aaaa bb
V--memory BAll (See p. 3--29) BCD,0to15
Pointer PB All (See p.3--29) BCD
In the following Or Bit-of-Word example, when inputX1 or bit 7 of V1400 is on, output
Y7 will energize.
Y7
OUT
X1
B1400.7
STR 1
Handheld Programmer Keystrokes
DirectSOFT
OR V 1
OUT 7
SHFT 400
7
ENT
ENT
ENT
K
B
In the following Or Bit-of-Word example, when input X1 or bit 7 of V1400is off, output
Y7 will energize.
Y7
OUT
X1
STR 1
Handheld Programmer Keystrokes
DirectSOFT
ORN V 1
OUT 5
4 0 0
7
B1400.7
ENT
ENT
ENT
K
SHFT B
Or Bit-of-Word
(ORB)
Or Not Bit-of-Word
(ORNB)
Standard RLL
Instructions
5--12 Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
The And instruction logically ands a
normally open contact in series with
another contact in a rung. The status of
the contact will be the same state as the
associated image register point or
memory location.
Aaaa
The And Not instruction logically ands a
normally closed contact in series with
another contact in a rung. The status of
the contact will be opposite the state of
the associated image register point or
memory location.
Aaaa
Operand Data Type DL350 Range
Aaaa
Inputs X0--777
Outputs Y0--777
Control Relays C0--1777
Stage S0--1777
Timer T0--377
Counter CT 0--177
Special Relay SP 0--777
In the following And example, when input X1 and X2 are on output Y5 will energize.
STR 1ENT
2ENT
OUT 5 ENT
AND
Y5
OUT
X1 X2
Handheld Programmer KeystrokesDirectSOFT
In the following And Not example, when input X1 is on and X2 is off output Y5 will
energize.
ANDN
STR 1ENT
2ENT
OUT 5ENT
X1 Y5
OUT
X2
Handheld Programmer KeystrokesDirectSOFT
And
(AND)
And Not
(ANDN)
Standard Standard RLL
Instructions
5--13
Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
The And Bit-of-Word instruction logically
ands a normally open contact in series
with another contact in a rung. The status
of the contact will be the same state as the
bit referenced in the associated memory
location.
Aaaa.bb
The And Not Bit-of-Word instruction
logically ands a normally closed contact in
series with another contact in a rung. The
status of the contact will be opposite the
state of the bit referenced in the
associated memory location.
Aaaa.bb
Operand Data Type DL350 Range
Aaaa bb
V--memory BAll (See p. 3--29) BCD,0to15
Pointer PB All (See p. 3--29) BCD
In the following And Bit-of-Word example, when input X1 and bit 4 of V1400 is on
output Y5 will energize.
Y5
OUT
X1 B1400.4
DirectSOFT
OUT 5 ENT
Handheld Programmer Keystrokes
V 1SHFT 400
4ENT
K
B
STR 1ENT
AND
In the following And Not Bit-of-Word example, when input X1 is on and bit 4 of V1400
is off output Y5 will energize.
X1 Y5
OUT
B1400.4
DirectSOFT
STR 1
Handheld Programmer Keystrokes
OUT 5
ANDN V 1SHFT 400
4ENT
K
B
ENT
ENT
And Bit-of-Word
(ANDB)
And Not
Bit-of-Word
(ANDNB)
Standard RLL
Instructions
5--14 Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
The And Store instruction logically ands
two branches of a rung in series. Both
branches must begin with the Store
instruction. OUT
The Or Store instruction logically ors two
branches of a rung in parallel. Both
branches must begin with the Store
instruction. OUT
In the following And Store example, the branch consisting of contacts X2, X3, and X4
have been anded with the branch consisting of contact X1.
STR 1ENT
STR ENT2
AND ENT
3
OR ENT
4
ANDST ENT
OUT 5 ENT
Y5
OUT
X1 X2
X4
X3
Handheld Programmer KeystrokesDirectSOFT
In the following Or Store example, the branch consisting of X1 and X2 have been
ored with the branch consisting of X3 and X4.
STR 1ENT
STR ENT
AND ENT
OUT 5ENT
2
3
AND ENT
4
ORST ENT
Y5
OUT
X1 X2
X3 X4
Handheld Programmer KeystrokesDirectSOFT
And Store
(AND STR)
Or Store
(OR STR)
Standard Standard RLL
Instructions
5--15
Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
The Out instruction reflects the status of
the rung (on/off) and outputs the discrete
(on/off) state to the specified image
register point or memory location.
Multiple Out instructions referencing the
same discrete location should not be
used since only the last Out instruction in
the program will control the physical
output point.
Aaaa
OUT
Operand Data Type DL350 Range
Aaaa
Inputs X0--777
Outputs Y0--777
Control Relays C0--1777
In the following Out example, when input X1 is on, output Y2 and Y5 will energize.
STR 1ENT
OUT 2ENT
OUT ENT
5
Y2
OUT
X1
Y5
OUT
Handheld Programmer KeystrokesDirectSOFT
In the following Out example the program contains two Out instructions using the
same location (Y10). The physical output of Y10 is ultimately controlled by the last
rung of logic referencing Y10. X1 will override the Y10 output being controlled by X0.
To avoid this situation, multiple outputs using the same location should not be used
in programming. If you need to have an output controlled by multiple inputs see the
OROUT instruction on page 5--17.
Y10
OUT
X0
Y10
OUT
X1
Out
(OUT)
Standard RLL
Instructions
5--16 Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
The Out Bit-of-Word instruction reflects
the status of the rung (on/off) and outputs
the discrete (on/off) state to the specified
bit in the referenced memory location.
Multiple Out Bit-of-Word instructions
referencing the same bit of the same word
generally should not be used since only
the last Out instruction in the program will
control the status of the bit.
Aaaa.bb
OUT
Operand Data Type DL350 Range
Aaaa bb
V--memory BAll (See p. 3--29) BCD,0to15
Pointer PB All (See p. 3--29) BCD
In the following Out Bit-of-Word example, when input X1 is on, bit 3 of V1400 and bit
6 of V1401 will turn on.
B1400.3
OUT
X1
B1401.6
OUT
DirectSOFT
STR 1
Handheld Programmer Keystrokes
OUT V 1SHFT 400
3ENT
K
B
ENT
OUT V 1SHFT 400
4ENT
K
B
The following Out Bit-of-Word example contains two Out Bit-of-Word instructions
using the same bit in the same memory word. The final state bit 3 of V1400 is
ultimately controlled by the last rung of logic referencing it. X1 will override the logic
state controlled by X0. To avoid this situation, multiple outputs using the same
location must not be used in programming.
V1400
OUT
X0
V1400
OUT
X1
K3
K3
Out Bit-of-Word
(OUTB)
Standard Standard RLL
Instructions
5--17
Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
The Or Out instruction has been
designed to used more than 1 rung of
discrete logic to control a single output.
Multiple Or Out instructions referencing
the same output coil may be used, since
all contacts controlling the output are
ored together. If the status of any rung is
on, the output will also be on.
A aaa
OR OUT
Operand Data Type DL350 Range
Aaaa
Inputs X0--777
Outputs Y0--777
Control Relays C0--1777
In the following example, when X1 or X4 is on, Y2 will energize.
STR 1ENT
STR ENT
4
Y2
OR OUT
X1
Y2
OR OUT
X4
Handheld Programmer Keystrokes
D
i
r
ec
t
SOFT
INST# 5
3ENT ENT 2ENT
2ENTINST# 5
3ENT ENT
The Not instruction inverts the status of
the rung at the point of the instruction.
In the following example when X1 is off, Y2 will energize. This is because the Not
instruction inverts the status of the rung at the Not instruction.
Y2
OUT
X1 STR 1
OUT 2
SHFT N O T
Handheld Programmer KeystrokesDirectSOFT
ENT
ENT
ENT
NOTE: DirectSOFT Release 1.1i and later supports the use of the NOT instruction.
The above example rung is merely intended to show the visual representation of the
NOT instruction. The rung cannot be created or displayed in DirectSOFT versions
earlier than 1.1i.
Or Out
(OR OUT)
Not
(NOT)
Standard RLL
Instructions
5--18 Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
The Positive Differential instruction is
typically known as a one shot. When the
input logic produces an off to on
transition, the output will energize for one
CPU scan.
A aaa
PD
Operand Data Type DL350 Range
Aaaa
Inputs X0--777
Outputs Y0--777
Control Relays C0--1777
In the following example, every time X1 is makes an off to on transition, C0 will
energize for one scan.
STR 1ENT
SHFT P DSHFT 0ENT
C0
PD
X1
Handheld Programmer Keystrokes
DirectSOFT
C0
LD V2000
OUT
V3000
Positive
Differential
(PD)
Standard Standard RLL
Instructions
5--19
Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
The Store Positive Differential instruction
begins a new rung or an additional branch
in a rung with a normally open contact.
The contact closes for one CPU scan
when the state of the associated image
register point makes an Off-to-On
transition. Thereafter, the contact remains
open until the next Off-to-On transition
(the symbol inside the contact represents
the transition). This function is sometimes
called a “one-shot”.
Aaaa
The Store Negative Differential instruction
begins a new rung or an additional branch
in a rung with a normally closed contact.
The contact closes for one CPU scan
when the state of the associated image
register point makes an On-to-Off
transition. Thereafter, the contact remains
open until the next On-to-Off transition
(the symbol inside the contact represents
the transition).
Aaaa
Operand Data Type DL350 Range
Aaaa
Inputs X0--777
Outputs Y0--777
Control Relays C0--1777
Stage S0--1777
Timer T0--377
Counter CT 0--177
In the following example, each time X1 is makes an Off-to-On transition, Y4 will
energize for one scan.
Y4
OUT STR
X 1
P
4
Handheld Programmer Keystrokes
DirectSOFT
SHFT
Y
D
OUT
X1
ENT
ENT
In the following example, each time X1 is makes an On-to-Off transition, Y4 will
energize for one scan.
Y4
OUT
DirectSOFT
STR
X 1
N
4
Handheld Programmer Keystrokes
SHFT
ENT
Y
D
OUT
X1
ENT
Store Positive
Differential
(STRPD)
Store Negative
Differential
(STRND)
Standard RLL
Instructions
5--20 Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
The Or Positive Differential instruction
logically ors a normally open contact in
parallel with another contact in a rung. The
status of the contact will be open until the
associated image register point makes an
Off-to-On transition, closing it for one CPU
scan. Thereafter, it remains open until
another Off-to-On transition.
Aaaa
The Or Negative Differential instruction
logically ors a normally open contact in
parallel with another contact in a rung. The
status of the contact will be open until the
associated image register point makes an
On-to-Off transition, closing it for one CPU
scan. Thereafter, it remains open until
another On-to-Off transition.
Aaaa
Operand Data Type DL350 Range
Aaaa
Inputs X0--777
Outputs Y0--777
Control Relays C0--1777
Stage S0--1777
Timer T0--377
Counter CT 0--177
In the following example, Y 5 will energize whenever X1 is on, or for one CPU scan
when X2 transitions from Off to On.
Y5
OUT
X1 STR X 1
OR
X 2
OUT Y 5
Handheld Programmer KeystrokesDirectSOFT
X2
SHFT P D
ENT
ENT
ENT
In the following example, Y 5 will energize whenever X1 is on, or for one CPU scan
when X2 transitions from On to Off.
X1 Y5
OUT
DirectSOFT
STR X 1
OR
X 2
OUT Y 5
Handheld Programmer Keystrokes
SHFT N D
X2
ENT
ENT
ENT
Or Positive
Differential
(ORPD)
Or Negative
Differential
(ORND)
Standard Standard RLL
Instructions
5--21
Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
The And Positive Differential instruction
logically ands a normally open contact in
series with another contact in a rung. The
status of the contact will be open until the
associated image register point makes an
Off-to-On transition, closing it for one CPU
scan. Thereafter, it remains open until
another Off-to-On transition.
Aaaa
The And Negative Differential instruction
logically ands a normally open contact in
series with another contact in a rung. The
status of the contact will be open until the
associated image register point makes an
On-to-Off transition, closing it for one CPU
scan. Thereafter, it remains open until
another On-to-Off transition.
Aaaa
Operand Data Type DL350 Range
Aaaa
Inputs X0--777
Outputs Y0--777
Control Relays C0--1777
Stage S0--1777
Timer T0--377
Counter CT 0--177
In the following example, Y5 will energize for one CPU scan whenever X1 is on and
X2 transitions from Off to On.
Y5
OUT
X1
DirectSOFT
X2 STR X 1
AND
X 2
OUT Y 5
Handheld Programmer Keystrokes
SHFT P D
ENT
ENT
ENT
In the following example, Y5 will energize for one CPU scan whenever X1 is on and
X2 transitions from On to Off.
X1 Y5
OUT
DirectSOFT
X2 STR X(IN) 1
AND
X(IN) 2
OUT Y(OUT) 5
Handheld Programmer Keystrokes
SHFT N D
ENT
ENT
ENT
And Positive
Differential
(ANDPD)
And Negative
Differential
(ANDND)
Standard RLL
Instructions
5--22 Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
The Set instruction sets or turns on an
image register point/memory location or
a consecutive range of image register
points/memory locations. Once the
point/location is set it will remain on until it
is reset using the Reset instruction. It is
not necessary for the input controlling the
Set instruction to remain on.
A aaa
SET
aaa
Optional
memory range
The Reset instruction resets or turns off
an image register point/memory location
or a range of image registers
points/memory locations. Once the
point/location is reset it is not necessary
for the input to remain on.
A aaa
RST
aaa
Optional
memory range
Operand Data Type DL350 Range
Aaaa
Inputs X0--777
Outputs Y0--777
Control Relays C0--1777
Stage S0--1777
Timer* T0--377
Counter* CT 0--177
* Timer and counter operand data types are not valid using the Set instruction.
NOTE: You cannot set inputs (X’s) that are assigned to input modules
In the following example when X1 is on, Y5 through Y22 will energize.
SET
X1 Y5 Y22
Handheld Programmer Keystrokes
DirectSOFT
STR 1ENT
SET ENT5 2 2
In the following example when X1 is on, Y5 through Y22 will be reset or
de--energized.
STR 1ENT
RST 5
RST
X1 Y5 Y22
Handheld Programmer Keystrokes
DirectSOFT
ENT2 2
Set
(SET)
Reset
(RST)
Standard Standard RLL
Instructions
5--23
Standard RLL Instructions
Boolean Instructions
DL350 User Manual, 2nd Edition
The Set Bit-of-Word instruction sets or
turns on a bit in a V--memory location.
Once the bit is set it will remain on until it is
reset using the Reset Bit-of-Word
instruction. It is not necessary for the input
controlling the Set Bit-of-Word instruction
to remain on.
Aaaa.bb
SET
The Reset Bit-of-Word instruction resets
or turns off a bit in a V--memory location.
Once the bit is reset it is not necessary for
the input to remain on.
A aaa.bb
RST
Operand Data Type DL350 Range
Aaaa bb
V--memory BAll (See p. 3--29) 0to15
Pointer PB All (See p. 3--29) 0to15
In the following example when X1 turns on, bit 0 in V1400 is set to the on state.
SET
X1 B1400.0
DirectSOFT
STR 1
Handheld Programmer Keystrokes
SET V 1SHFT 400
1ENT
K
B
ENT
In the following example when X1 turns on, bit 15 in V1400 is reset to the off state.
RST
X1 V1400.15
DirectSOFT
Handheld Programmer Keystrokes
STR 1
RST V 1SHFT 400
1ENT
K
B
ENT
5
Set Bit-of-Word
(SETB)
Reset Bit-of-Word
(RSTB)
Standard RLL
Instructions
5--24 Standard RLL Instructions
Comparative Boolean
DL350 User Manual, 2nd Edition
Comparative Boolean
V aaa
The Store If Equal instruction begins a
new rung or additional branch in a rung
with a normally open comparative
contact. The contact will be on when
Vaaa =Bbbb .
B bbb
V aaa
The Store If Not Equal instruction begins
a new rung or additional branch in a rung
with a normally closed comparative
contact. The contact will be on when
Vaaa ¸Bbbb.
B bbb
Operand Data Type DL350 Range
Baaa bbb
V--memory VAll (See page 3--29) All (See page 3--29)
Pointer P-- -- All V mem.
(See page 3--29)
Constant K-- -- 0--FFFF
In the following example, when the value in V--memory location V2000 = 4933 , Y3
will energize.
V2000 K4933 Y3
OUT
DirectSOFT Handheld Programmer Keystrokes
STR
$SHFT 4
E2
C0
A0
A0
A
4
E9
J3
D3
DENT
OUT
GX ENT
3
D
In the following example, when the value in V--memory location V2000 ¸5060, Y3
will energize.
Y3
OUT
V2000 K5060
DirectSOFT Handheld Programmer Keystrokes
SHFT
OUT
GX ENT
3
D
4
E2
C0
A0
A0
A
STRN
SP
5
F0
AENT
6
G0
A
Store If Equal
(STRE)
Store If Not Equal
(STRNE)
Standard RLL
Instructions
5--25
Standard RLL Instructions
Comparative Boolean
DL350 User Manual, 2nd Edition
V aaa
The Or If Equal instruction connects a
normally open comparative contact in
parallel with another contact. The
contact will be on when Vaaa = Bbbb. B bbb
V aaa
The Or If Not Equal instruction connects
a normally closed comparative contact in
parallel with another contact. The
contact will be on when Vaaa ¸Bbbb. B bbb
Operand Data Type DL350 Range
Baaa bbb
V--memory VAll (See page 3--29) All (See page 3--29)
Pointer P-- -- All V mem.
(See page 3--29)
Constant K-- -- 0--FFFF
In the following example, when the value in V--memory location V2000 = 4500 or
V2002 = 2345 , Y3 will energize.
2
C3
D4
E5
FENT
4
E5
FENT
0
A0
A
Y3
OUT
V2002 K2345
V2000 K4500
DirectSOFT Handheld Programmer Keystrokes
SHFT 4
E2
C0
A0
A0
A
STR
$
OR
QSHFT 4
E2
C0
A0
A2
C
OUT
GX ENT
3
D
In the following example, when the value in V--memory location V2000 = 3916 or
V2002 ¸2500, Y3 will energize.
2
C5
FENT
0
A0
A
3
D9
JENT
1
B6
G
4
E
Y3
OUT
V2000 K3916
V2002 K2500
DirectSOFT Handheld Programmer Keystrokes
STR
$SHFT 2
C0
A0
A0
A
ORN
RSHFT 4
E2
C0
A0
A2
C
OUT
GX ENT
3
D
Or If Equal
(ORE)
Or If Not Equal
(ORNE)
Standard RLL
Instructions
5--26 Standard RLL Instructions
Comparative Boolean
DL350 User Manual, 2nd Edition
V aaa
The And If Equal instruction connects a
normally open comparative contact in
series with another contact. The contact
will be on when Vaaa = Bbbb.
B bbb
V aaa
The And If Not Equal instruction connects
a normally closed comparative contact in
series with another contact. The contact
will be on when Vaaa ¸Bbbb
B bbb
Operand Data Type DL350 Range
A/B aaa bbb
V--memory VAll (See page 3--29) All (See page 3--29)
Pointer P-- -- All V mem.
(See page 3--29)
Constant K-- -- 0--FFFF
In the following example, when the value in V--memory location V2000 = 5000 and
V2002 = 2345, Y3 will energize.
2
C3
D4
E5
FENT
5
F0
AENT
0
A0
A
2
C
STR
$SHFT 4
E0
A0
A0
A
AND
VSHFT 4
E2
C0
A0
A2
C
OUT
GX ENT
3
D
Y3
OUT
V2002 K2345V2000 K5000
DirectSOFT Handheld Programmer Keystrokes
In the following example, when the value in V--memory location V2000 = 2550 and
V2002 ¸2500, Y3 will energize.
2
C
2
C
2
C
STR
$SHFT 4
E2
C0
A0
A0
A
5
FENT
5
F0
A
ANDN
WSHFT 4
E2
C0
A0
A
5
FENT
0
A0
A
OUT
GX
Y3
OUT
V2000 K2550 V2002 K2500
DirectSOFT Handheld Programmer Keystrokes
ENT
3
D
And If Equal
(ANDE)
And If Not Equal
(ANDNE)
Standard RLL
Instructions
5--27
Standard RLL Instructions
Comparative Boolean
DL350 User Manual, 2nd Edition
The Comparative Store instruction
begins a new rung or additional branch in
a rung with a normally open comparative
contact. The contact will be on when
Aaaa ²Bbbb.
A aaa B bbb
The Comparative Store Not instruction
begins a new rung or additional branch in
a rung with a normally closed
comparative contact. The contact will be
on when Aaaa < Bbbb.
A aaa B bbb
Operand Data Type DL350 Range
A/B aaa bbb
V--memory VAll (See page 3--29) All (See page 3--29)
Pointer P-- -- All V mem.
(See page 3--29)
Constant K-- -- 0--FFFF
Timer T0--377
Counter CT 0--177
In the following example, when the value in V--memory location V2000 ²1000, Y3
will energize.
ENT
3
D
Y3
OUT
V2000 K1000
DirectSOFT Handheld Programmer Keystrokes
STR
$
ENT
OUT
GX
SHFT AND
V2
C0
A0
A0
A
1
B0
A0
A0
A
In the following example, when the value in V--memory location V2000 < 4050, Y3
will energize.
ENT
3
D
0
AENT
0
A
4
E5
F
Y3
OUT
V2000 K4050
DirectSOFT Handheld Programmer Keystrokes
OUT
GX
STRN
SP SHFT AND
V2
C0
A0
A0
A
Store
(STR)
Store Not
(STRN)
Standard RLL
Instructions
5--28 Standard RLL Instructions
Comparative Boolean
DL350 User Manual, 2nd Edition
The Comparative Or instruction
connects a normally open comparative
contact in parallel with another contact.
The contact will be on when Aaaa ²
Bbbb. A aaa B bbb
The Comparative Or Not instruction
connects a normally open comparative
contact in parallel with another contact.
The contact will be on when Aaaa < Bbbb. A aaa B bbb
Operand Data Type DL350 Range
A/B aaa bbb
V--memory VAll (See page 3--29) All (See page 3--29)
Pointer P-- -- All V mem.
(See page 3--29)
Constant K-- -- 0--FFFF
Timer T0--377
Counter CT 0--177
In the following example, when the value in V--memory location V2000 = 6045 or
V2002 ²2345, Y3 will energize.
2
C3
D4
E5
FENT
6
G0
A
Y3
OUT
V2000 K6045
V2002 K2345
DirectSOFT Handheld Programmer Keystrokes
SHFT 4
E2
C0
A0
A0
A
ENT
STR
$
OR
Q
OUT
GX ENT
3
D
4
E5
F
SHFT AND
V2
C0
A0
A2
C
In the following example when the value in V--memory location V2000 = 1000 or
V2002 < 2500, Y3 will energize.
ENT
3
D
2
C5
FENT
0
A0
A
ENT
1
B0
A0
A0
A
4
E
Y3
OUT
V2000 K1000
V2002 K2500
DirectSOFT Handheld Programmer Keystrokes
STR
$SHFT 2
C0
A0
A0
A
ORN
R
OUT
GX
SHFT AND
V2
C0
A0
A2
C
Or
(OR)
Or Not
(ORN)
Standard RLL
Instructions
5--29
Standard RLL Instructions
Comparative Boolean
DL350 User Manual, 2nd Edition
The Comparative And instruction
connects a normally open comparative
contact in series with another contact.
The contact will be on when Aaaa ²
Bbbb.
A aaa B bbb
The Comparative And Not instruction
connects a normally open comparative
contact in series with another contact.
The contact will be on when Aaaa <
Bbbb.
A aaa B bbb
Operand Data Type DL350 Range
A/B aaa bbb
V--memory VAll (See page 3--29) All (See page 3--29)
Pointer P-- -- All V mem.
(See page 3--29)
Constant K-- -- 0--FFFF
Timer T0--377
Counter CT 0--177
In the following example, when the value in V--memory location V2000 = 5000, and
V2002 ²2345, Y3 will energize.
ENT
3
D
2
C3
D4
E5
FENT
ENT
0
A0
A
5
F0
A
2
C
Y3
OUT
V2000 K5000 V2002 K2345
DirectSOFT Handheld Programmer Keystrokes
STR
$SHFT 4
E0
A0
A0
A
AND
V
OUT
GX
SHFT AND
V2
C0
A0
A2
C
In the following example, when the value in V--memory location V2000 = 7000 and
V2002 < 2500, Y3 will energize.
2
C5
FENT
0
A0
A
7
HENT
0
A0
A0
A
2
C
Y3
OUT
V2000 K7000 V2002 K2500
DirectSOFT Handheld Programmer Keystrokes
STR
$SHFT 4
E2
C0
A0
A0
A
ANDN
W
OUT
GX SHFT AND
YENT
3
D
SHFT AND
V2
C0
A0
A
And
(AND)
And Not
(ANDN)
Standard RLL
Instructions
5--30 Standard RLL Instructions
Immediate Instructions
DL350 User Manual, 2nd Edition
Immediate Instructions
aaaX
The Store Immediate instruction begins a
new rung or additional branch in a rung.
The status of the contact will be the same
as the status of the associated input point
on the module at the time the instruction is
executed. The image register is not
updated.
aaaX
The Store Not Immediate instruction
begins a new rung or additional branch in
a rung. The status of the contact will be
opposite the status of the associated input
point on the module atthetimethe
instruction is executed. The image
register is not updated.
Operand Data Type DL350 Range
aaa
Inputs X0--777
In the following example, when X1 is on, Y2 will energize.
ENT
2
C
1
BENT
X1 Y2
OUT
Handheld Programmer Keystrokes
DirectSOFT
STR
$SHFT 8
I
OUT
GX
In the following example when X1 is off, Y2 will energize.
ENT
2
C
1
BENT
X1 Y2
OUT
Handheld Programmer Keystrokes
DirectSOFT
STRN
SP SHFT 8
I
OUT
GX
Store
Immediate
(STRI)
Store Not
Immediate
(STRNI)
Standard RLL
Instructions
5--31
Standard RLL Instructions
Immediate Instructions
DL350 User Manual, 2nd Edition
aaaX
The Or Immediate connects two contacts
in parallel. The status of the contact will be
the same as the status of the associated
input point on the module at the time the
instruction is executed. The image register
is not updated.
aaaX
The Or Not Immediate connects two
contacts in parallel. The status of the
contact will be opposite the status of the
associated input point on the module at
the time the instruction is executed. The
image register is not updated.
Operand Data Type DL350 Range
aaa
Inputs X0--777
In the following example, when X1 or X2 is on, Y5 will energize.
1
BENT
ENT
2
C
ENT
5
F
X1
X2
Y5
OUT
Handheld Programmer Keystrokes
DirectSOFT
STR
$
OR
QSHFT 8
I
OUT
GX
In the following example, when X1 is on or X2 is off, Y5 will energize.
ENT
5
F
ENT
2
C
1
BENT
X1
X2
Y5
OUT
Handheld Programmer Keystrokes
DirectSOFT
STR
$
SHFT 8
I
ORN
R
OUT
GX
Or Immediate
(ORI)
Or Not Immediate
(ORNI)
Standard RLL
Instructions
5--32 Standard RLL Instructions
Immediate Instructions
DL350 User Manual, 2nd Edition
aaaX
The And Immediate connects two
contacts in series. The status of the
contact will be the same as the status of
the associated input point on the module
at the time the instruction is executed.
The image register is not updated.
aaaX
The And Not Immediate connects two
contacts in series. The status of the
contact will be opposite the status of the
associated input point on the module at
the time the instruction is executed. The
image register is not updated.
Operand Data Type DL350 Range
aaa
Inputs X0--777
In the following example, when X1 and X2 are on, Y5 will energize.
OUT
GX
X1 X2 Y5
OUT
Handheld Programmer Keystrokes
DirectSOFT
STR
$1
BENT
AND
VSHFT 8
IENT
2
C
ENT
5
F
In the following example, when X1 is on and X2 is off, Y5 will energize.
X1 X2 Y5
OUT
Handheld Programmer Keystrokes
DirectSOFT
STR
$
ANDN
WSHFT 8
I
OUT
GX
1
BENT
ENT
2
C
ENT
5
F
And Immediate
(ANDI)
And Not Immediate
(ANDNI)
Standard RLL
Instructions
5--33
Standard RLL Instructions
Immediate Instructions
DL350 User Manual, 2nd Edition
Y aaa
The Out Immediate instruction reflects the
status of the rung (on/off) and outputs the
discrete (on/off) status to the specified
module output point and the image register
at the time the instruction is executed.If
multiple Out Immediate instructions
referencing the same discrete point are
used it is possible for the module output
status to change multiple times in a CPU
scan. See Or Out Immediate.
OUTI
The Or Out Immediate instruction has
been designed to use more than 1 rung of
discrete logic to control a single output.
Multiple Or Out Immediate instructions
referencing the same output coil may be
used, since all contacts controlling the
output are ored together. If the status of
any rung is on at the time the instruction is
executed, the output will also be on.
OROUTI
Y aaa
Operand Data Type DL350 Range
aaa
Outputs Y0--777
In the following example, when X1 or X4 is on, Y2 will energize.
STR
$
X1
X4
Y2
OR OUTI
Y2
OR OUTI
DirectSOFT Handheld Programmer Keystrokes
STR
$1
BENT
ENT
4
E
INST#
O5
F
3
D0
AENT ENT
2
CENT
INST#
O5
F
3
D0
AENT ENT
2
CENT
Out Immediate
(OUTI)
Or Out Immediate
(OROUTI)
Standard RLL
Instructions
5--34 Standard RLL Instructions
Immediate Instructions
DL350 User Manual, 2nd Edition
The Set Immediate instruction
immediately sets, or turns on an output or
a range of outputs in the image register
and the corresponding output module(s)
at the time the instruction is executed.
Once the outputs are set it is not
necessary for the input to remain on. The
Reset Immediate instruction can be used
to reset the outputs.
aaaY aaa
SETI
aaaY aaa
The Reset Immediate instruction
immediately resets, or turns off an output
or a range of outputs in the image register
and the output module(s) at the time the
instruction is executed. Once the outputs
are reset it is not necessary for the input to
remain on.
RSTI
Operand Data Type DL350 Range
aaa
Outputs Y0--777
In the following example, when X1 is on, Y5 through Y22 will be set on in the image
register and on the corresponding output module(s).
1
BENT
X1 Y5
SETI
Y22
DirectSOFT
Handheld Programmer Keystrokes
STR
$
SET
XSHFT 8
I5
F2
C2
CENT
In the following example, when X1 is on, Y5 through Y22 will be reset (off) in the
image register and on the corresponding output module(s).
1
BENT
X1 Y5
RSTI
Y22
DirectSOFT
Handheld Programmer Keystrokes
STR
$
SHFT 8
I5
F2
C2
CENT
RST
S
Set Immediate
(SETI)
Reset
Immediate
(RSTI)
Standard RLL
Instructions
5--35
Standard RLL Instructions
Timer, Counter and Shift Register
DL350 User Manual, 2nd Edition
Timer, Counter and Shift Register Instructions
Timers are used to time an event for a desired length of time. There are those
applications that need an accumulating timer, meaning it has the ability to time, stop,
and then resume from where it previously stopped.
The single input timer will time as long as the input is on. When the input changes
from on to off the timer current value is reset to 0. There is a tenth of a second and a
hundredth of a second timer available with a maximum time of 999.9 and 99.99
seconds respectively. There is discrete bit associated with each timer to indicate the
current value is equal to or greater than the preset value. The timing diagram below
shows the relationship between the timer input, associated discrete bit, current
value, and timer preset.
TMR T1
K30
X1
X1
T1
123456 780
01020304050 600
Current
Value
Timer preset
T1 Y0
OUT
Seconds
1/10 Seconds
The accumulating timer works similarly to the regular timer, but two inputs are
required. The start/stop input starts and stops the timer. When the timer stops, the
elapsed time is maintained. When the timer starts again, the timing continues from
the elapsed time. When the reset input is turned on, the elapsed time is cleared and
the timer will start at 0 when it is restarted. There is a tenth of a second and a
hundredth of a second timer available with a maximum time of 9999999.9 and
999999.99 seconds respectively. The timing diagram below shows the relationship
between the timer input, timer reset, associated discrete bit, current value, and timer
preset.
X1
X1
T0
123456 780
01010203040 500
Current
Value
TMRA T0
K30
X2
X2
Reset Input
Start/Stop
Seconds
1/10 Seconds
Using Timers
Standard RLL
Instructions
5--36 Standard RLL Instructions
Timer, Counter and Shift Register
DL350 User Manual, 2nd Edition
T aaa
aaaT
The Timer instruction is a 0.1 second
single input timer that times to a maximum
of 999.9 seconds. The Timer Fast
instruction is a 0.01 second single input
timer that times up to a maximum of 99.99
seconds. These timers will be enabled if
the input logic is true (on) and will be reset
to 0 if the input logic is false (off).
Instruction Specifications
Timer Reference (Taaa): Specifies the
timer number.
Preset Value (Bbbb): Constant value
(K), V--memory location, or Pointer (P).
Current Value: Timer current values are
accessed by referencing the associated
V or T memory location*. For example,
the timer current value for T3 physically
resides in V-memory location V3.
Discrete Status Bit: The discrete status
bit is accessed by referencing the
associated T memory location. It will be
on if the current value is equal to or
greater than the preset value. For
example the discrete status bit for timer 2
would be T2.
TMR
B bbb
Preset Timer #
TMRF
B bbb
Preset Timer #
The timer discrete status bit and the
current value are not specified in the timer
instruction.
Operand Data Type DL350 Range
A/B aaa bbb
Timers T0--377 -- --
V--memory for preset
values V-- -- All Data Words
(See Page 3--29)
Pointers (preset only) P-- -- All Data Words
(See Page 3--29)
Constants
(preset only) K-- -- 0--9999
Timer discrete status
bits T/V 0--377
Timer current values V/T* 0--377
There are two methods of programming timers. You can perform functions when the
timer reaches the specified preset using the the discrete status bit, or use the
comparative contacts to perform functions at different time intervals based on one
timer. The following examples show each method of using timers.
NOTE: The current value of a timer can be accessed by using the TA data type (i.e.,
TA2). Current values may also be accessed by the V-memory location.
Timer (TMR) and
Timer Fast (TMRF)
Standard RLL
Instructions
5--37
Standard RLL Instructions
Timer, Counter and Shift Register
DL350 User Manual, 2nd Edition
In the following example, a single input timer is used with a preset of 3 seconds. The
timer discrete status bit (T2) will turn on when the timer has timed for 3 seconds. The
timer is reset when X1 turns off, turning the discrete status bit off and resetting the
timer current value to 0.
STR
$
TMR
N2
C
STR
$SHFT MLR
T2
CENT
OUT
GX
Handheld Programmer Keystrokes
X1 TMR T2
K30
T2 Y0
OUT
X1
T2
123 456 780
01020304050 600
Current
Value
Y0
Timing Diagram
DirectSOFT
1/10 Seconds
Seconds
1
BENT
3
D0
AENT
ENT
0
A
In the following example, a single input timer is used with a preset of 4.5 seconds.
Comparative contacts are used to energize Y3, Y4, and Y5 at one second intervals
respectively. When X1 is turned off the timer will be reset to 0 and the comparative
contacts will turn off Y3, Y4, and Y5.
1
BENT
Handheld Programmer Keystrokes
X1 TMR T20
K45
TA20 K10
TA20 K20
TA20 K30
Y4
OUT
Y3
OUT
Y5
OUT
X1
Y3
123 456 780
01020304050 600
Current
Value
Y4
Timing Diagram
Y5
T2
D
i
r
ec
t
SOFT
1/10 Seconds
Seconds
STR
$
TMR
N2
CENT
0
A4
E5
F
STR
$SHFT MLR
T2
C0
A1
BENT
OUT
GX ENT
3
D
STR
$SHFT MLR
T2
C0
AENT
OUT
GX ENT
2
C
4
E
STR
$SHFT MLR
T2
C0
AENT
OUT
GX ENT
3
D
5
F
0
A
0
A
0
A
Timer Example
Using Discrete
Status Bits
Timer Example
Using Comparative
Contacts
Standard RLL
Instructions
5--38 Standard RLL Instructions
Timer, Counter and Shift Register
DL350 User Manual, 2nd Edition
T aaa
T aaa
The Accumulating Timer is a 0.1 second
two input timer that will time to a
maximum of 9999999.9. The
Accumulating Fast Timer is a 0.01
second two input timer that will time to a
maximum of 99999.99. These timers
have two inputs, an enable and a reset.
The timer will start timing when the
enable is on and stop timing when the
enable is off without resetting the current
value to 0. The reset will reset the timer
when on and allow the timer to time when
off.
Instruction Specifications
Timer Reference (Taaa): Specifies the
timer number.
Preset Value (Bbbb): Constant value
(K), V--memory location,or Pointer (P).
Current Value: Timer current values are
accessed by referencing the associated
V or T memory location (See Note). For
example, the timer current value for T3
resides in V-memory location V3.
Discrete Status Bit: The discrete status
bit is accessed by referencing the
associated T memory location. It will be
on if the current value is equal to or
greater than the preset value. For
example the discrete status bit for timer 2
would be T2.
TMRA
B bbb
Enable
Reset
Preset Timer #
TMRAF
B bbb
Enable
Reset
Preset Timer #
The timer discrete status bit and the
current value are not specified in the
timer instruction.
Caution: The TMRA uses two
consecutive timer locations, since
the preset can now be 8 digits, which
requires two V-memory locations. For
example, if TMRA T0 is used in the
program, the next available timer
would be T2. Or if T0 was a normal
timer, and T1 was an accumulating
timer, the next available timer would
be T3.
Operand Data Type DL350 Range
A/B aaa bbb
Timers T0--377 -- --
V--memory for preset
values V-- -- All Data Words
(See Page 3--29)
Pointers (preset only) P-- -- All Data Words
(See Page 3--29)
Constants
(preset only) K-- -- 0--9999
Timer discrete status
bits T/V 0--377 or V41100--41117
Timer current values V/T* 0--377
There are two methods of programming timers. You can perform functions when the
timer reaches the specified preset using the the discrete status bit, or use the
comparative contacts to perform functions at different time intervals based on one
timer. The following examples show each method of using timers.
NOTE: The current value of a timer can be accessed by using the TA data type (i.e.,
TA2). Current values may also be accessed by the V-memory location.
Accumulating
Timer (TMRA)
Accumulating Fast
Timer (TMRAF)
Standard RLL
Instructions
5--39
Standard RLL Instructions
Timer, Counter and Shift Register
DL350 User Manual, 2nd Edition
In the following example, a two input timer (accumulating timer) is used with a preset
of 3 seconds. The timer discrete status bit (T6) will turn on when the timer has timed
for 3 seconds. Notice in this example the timer times for 1 second , stops for one
second, then resumes timing. The timer will reset when C10 turns on, turning the
discrete status bit off and resetting the timer current value to 0.
Handheld Programmer Keystrokes
X1
T6
TMRA T6
K30
C10
Y10
OUT
X1
C10
123 456 780
01010203040 500
Current
Value
T6
Timing Diagram
D
i
r
ec
t
SOFT
1/10 Seconds
Seconds
Handheld Programmer Keystrokes (cont)
STR
$
STR
$SHFT ENT
2
C1
B0
A
TMR
NSHFT 0
A
3
D0
AENT
STR
$SHFT MLR
TENT
OUT
GX ENT
0
A
6
G
1
B
1
BENT
6
G
In the following example, a single input timer is used with a preset of 4.5 seconds.
Comparative contacts are used to energized Y3, Y4, and Y5 at one second intervals
respectively. The comparative contacts will turn off when the timer is reset.
Handheld Programmer Keystrokes
TA20 K10
K20
K30
Y4
OUT
Y3
OUT
Y5
OUT
X1
TMRA T20
K45
C10 X1
C10
123 456 780
01010203040 500
Current
Value
Timing Diagram
Y3
Y4
Y5
T20
DirectSOFT
Handheld Programmer Keystrokes (cont)
1/10 Seconds
Seconds
STR
$SHFT MLR
T2
C0
AENT
OUT
GX ENT
2
C
4
E
STR
$SHFT MLR
T2
C0
A
ENT
OUT
GX ENT
3
D
5
F
STR
$1
BENT
ENT
4
E5
F
STR
$SHFT MLR
T2
C0
A1
BENT
OUT
GX ENT
3
D
STR
$SHFT ENT
2
C1
B0
A
2
C0
A
TMR
NSHFT 0
A
0
A
0
A
0
A
TA20
TA20
Accumulating
Timer Example
using Discrete
Status Bits
Accumulator Timer
Example Using
Comparative
Contacts
Standard RLL
Instructions
5--40 Standard RLL Instructions
Timer, Counter and Shift Register
DL350 User Manual, 2nd Edition
CT aaa
The Counter is a two input counter that
increments when the count input logic
transitions from off to on. When the counter
reset input is on the counter resets to 0.
When the current value equals the preset
value, the counter status bit comes on and
the counter continues to count up to a
maximum count of 9999. The maximum
value will be held until the counter is reset.
Instruction Specifications
Counter Reference (CTaaa): Specifies
the counter number.
Preset Value (Bbbb): Constant value (K),
V--memory location, or Pointer (P).
Current Values: Counter current values
are accessed by referencing the
associated V or CT memory locations*.
The V-memory location is the counter
location + 1000. For example, the counter
current value for CT3 resides in V--memory
location V1003.
Discrete Status Bit: The discrete status
bit is accessed by referencing the
associated CT memory location. It will be
on if the value is equal to or greater thanthe
preset value. For example the discrete
status bit for counter 2 would be CT2.
CNT
B bbb
Count
Reset
Preset
Counter #
The counter discrete status bit and the
current value are not specified in the
counter instruction.
Operand Data Type DL350 Range
A/B aaa bbb
Counters CT 0--177 -- --
V--memory
(preset only) V-- -- All Data Words
(See Page 3--29)
Pointers (preset only) P-- -- All Data Words
(See Page 3--29)
Constants
(preset only) K-- -- 0--9999
Counter discrete
status bits CT/V 0--177 or V41140--41147
Counter current
values V/CT* 1000--1177
NOTE: The current value of a counter can be accessed by using the CTA data type
(i.e., CTA2). Current values may also be accessed by the V-memory location.
Counter
(CNT)
Standard RLL
Instructions
5--41
Standard RLL Instructions
Timer, Counter and Shift Register
DL350 User Manual, 2nd Edition
In the following example, when X1 makes an off to on transition, counter CTA2 will
increment by one. When the current value reaches the preset value of 3, the counter
status bit CTA2 will turn on and energize Y10. When the reset C10 turns on, the
counter status bit will turn off and the current value will be 0. The current value for
counter CTA2 will be held in V--memory location V1002.
2
C
Handheld Programmer Keystrokes
CT2
X1
CNT CT2
K3
C10
Y10
OUT
X1
Y10
12340
Current
Value
C10
Counting diagram
DirectSOFT
STR
$1
BENT
3
DENT
STR
$SHFT ENT
2
C1
B0
A
CNT
GY
STR
$SHFT ENT
OUT
GX ENT
0
A
1
B
2
CMLR
T2
C
Handheld Programmer Keystrokes (cont)
SHFT
In the following example, when X1 makes an off to on transition, counter CTA2 will
increment by one. Comparative contacts are used to energize Y3, Y4, and Y5 at
different counts. When the reset C10 turns on, the counter status bit will turn off and
the counter current value will be 0, and the comparative contacts will turn off.
Handheld Programmer Keystrokes
X1
CNT CT2
K3
C10
X1
Y3
12340
Current
Value
C10
Counting diagram
CTA2 K1
CTA2 K2
CTA2 K3
Y4
OUT
Y3
OUT
Y5
OUT
Y4
Y5
DirectSOFT
Handheld Programmer Keystrokes (cont)
STR
$SHFT
ENT
OUT
GX ENT
2
C
4
E
STR
$SHFT 2
C
ENT
OUT
GX ENT
3
D
5
F
STR
$1
BENT
2
C
STR
$SHFT
1
BENT
OUT
GX ENT
3
D
STR
$SHFT ENT
2
C1
B0
A
CNT
GY ENT
3
D
MLR
T
2
C2
C
MLR
T
2
C2
C
MLR
T2
C
SHFT
SHFT
SHFT
Counter Example
Using Discrete
Status Bits
Counter Example
Using Comparative
Contacts
Standard RLL
Instructions
5--42 Standard RLL Instructions
Timer, Counter and Shift Register
DL350 User Manual, 2nd Edition
CT aaa
The Stage Counter is a single input counter
that increments when the input logic
transitions from off to on. This counter
differs from other counters since it will hold
its current value until reset using the RST
instruction. The Stage Counter is designed
for use in RLLPLUS programs but can be
used in relay ladder logic programs. When
the current value equals the preset value,
the counter status bit turns on and the
counter continues to count up to a
maximum count of 9999. The maximum
value will be held until the counter is reset.
Instruction Specifications
Counter Reference (CTaaa): Specifies
the counter number.
Preset Value (Bbbb): Constant value (K),
V--memory location or Pointer (P).
Current Values: Counter current values
are accessed by referencing the
associated V or CTA memory locations*.
The V-memory location is the counter
location + 1000. For example, the counter
current value for CT3 resides in V--memory
location V1003.
Discrete Status Bit: The discrete status
bit is accessed by referencing the
associated CT memory location. It will be
on if the value is equal to or greater thanthe
preset value. For example the discrete
status bit for counter 2 would be CT2.
SGCNT
B bbb
Preset
Counter #
The counter discrete status bit and the
current value are not specified in the
counter instruction.
Operand Data Type DL350 Range
A/B aaa bbb
Counters CT 0--177 -- --
V--memory
(preset only) V-- -- All Data Words
(See Page 3--29)
Pointers (preset only) P-- -- All Data Words
(See Page 3--29)
Constants
(preset only) K-- -- 0--9999
Counter discrete
status bits CT/V 0--177 or V41140--41147
Counter current
values V/CTA* 1000--1177
NOTE: The current value of a counter can be accessed by using the CTA data type
(i.e., CTA2). Current values may also be accessed by the V-memory location.
Stage Counter
(SGCNT)
Standard RLL
Instructions
5--43
Standard RLL Instructions
Timer, Counter and Shift Register
DL350 User Manual, 2nd Edition
In the following example, when X1 makes an off to on transition, stage counter CTA7
will increment by one. When the current value reaches 3, the counter status bit CTA7
will turn on and energize Y10. The counter status bit CTA7 will remain on until the
counter is reset using the RST instruction. When the counter is reset, the counter
status bit will turn off and the counter current value will be 0. The current value for
counter CTA7 will be held in V--memory location V1007.
3
D
7
H
Handheld Programmer Keystrokes
X1
C5 CT7
SGCNT CT7
K3
RST
X1
Y10
12340
Current
Value
RST
CT7
CT7 Y10
OUT
Counting diagram
DirectSOFT
STR
$1
BENT
CNT
GY
STR
$SHFT ENT
OUT
GX ENT
0
A
1
B
2
CMLR
T7
H
STR
$SHFT ENT
2
C5
F
RST
SSHFT 2
C7
HENT
SHFT RST
S6
GSHFT
ENT
Handheld Programmer Keystrokes (cont)
SHFT
SHFT
SHFT MLR
T
In the following example, when X1 makes an off to on transition, counter CTA2 will
increment by one. Comparative contacts are used to energize Y3, Y4, and Y5 at
different counts. Although this is not shown in the example, when the counter isreset
using the Reset instruction, the counter status bit will turn off and the current value
will be 0. The current value for counter CTA2 will be held in V--memory location
V1007.
Handheld Programmer Keystrokes
X1
X1
Y3
12340
Current
Value
Counting diagram
CTA2 K1
CTA2 K2
CTA2 K3
Y4
OUT
Y3
OUT
Y5
OUT
Y4
Y5
SGCNT CT2
K10
DirectSOFT
Handheld Programmer Keystrokes (cont)
STR
$1
BENT
CNT
GY
SHFT RST
S6
GSHFT
ENT
2
C1
B0
A
STR
$SHFT
1
BENT
OUT
GX ENT
3
D
MLR
T
2
C2
C
STR
$SHFT
ENT
OUT
GX ENT
2
C
4
E
STR
$SHFT 2
C
ENT
OUT
GX ENT
3
D
5
F
MLR
T
2
C2
C
MLR
T2
C
SHFT
SHFT
SHFT
Stage Counter
Example Using
Discrete Status
Bits
Stage Counter
Example Using
Comparative
Contacts
Standard RLL
Instructions
5--44 Standard RLL Instructions
Timer, Counter and Shift Register
DL350 User Manual, 2nd Edition
CT aaa
This Up/Down Counter counts up on each
off to on transition of the Up input and
counts down on each off to on transition of
the Down input. The counter is reset to 0
when the Reset input is on. The count
range is 0--99999999. The count input not
being used must be off in order for the
active count input to function.
Instruction Specification
Counter Reference (CTaaa): Specifies
the counter number.
Preset Value (Bbbb): Constant value (K),
V--memory locations, or Pointer (P).
Current Values: Current count is a double
word value accessed by referencing the
associated V or CT memory locations*.
The V-memory location is the counter
location + 1000. For example, the counter
current value for CT5 resides in V--memory
location V1005 and V1006.
Discrete Status Bit: The discrete status
bit is accessed by referencing the
associated CT memory location. It will be
on if value is equal to or greater than the
preset value. For example the discrete
status bit for counter 2 would be CT2.
UDC
B bbb
Up
Down
Reset
Caution : The UDC uses two
V memory locations for the 8 digit
current value. This means the
UDC uses two consecutive
counter locations. If UDC CT1 is
used in the program, the next
available counter is CT3.
Preset
Counter #
The counter discrete status bit and the
current value are not specified in the
counter instruction.
Operand Data Type DL350 Range
A/B aaa bbb
Counters CT 0--177 -- --
V--memory
(preset only) V-- -- All Data Words
(See Page 3--29)
Pointers (preset only) P-- -- All Data Words
(See Page 3--29)
Constants
(preset only) K-- -- 0--99999999
Counter discrete
status bits CT/V 0--177 or V41140--41147
Counter current
values V/CTA* 1000--1177
NOTE: The current value of a counter can be accessed by using the CTA data type
(i.e., CTA2). Current values may also be accessed by the V-memory location.
Up Down Counter
(UDC)
Standard RLL
Instructions
5--45
Standard RLL Instructions
Timer, Counter and Shift Register
DL350 User Manual, 2nd Edition
In the following example if X2 and X3 are off ,when X1 toggles from off to on the
counter will increment by one. If X1 and X3 are off the counter will decrement by one
when X2 toggles from off to on. When the count value reaches the preset value of 3,
the counter status bit will turn on. When the reset X3 turns on, the counter status bit
will turn off and the current value will be 0.
3
DENT
Handheld Programmer Keystrokes
X1
UDC CT2
K3
X2
X3
CTA2 Y10
OUT
X1
CT2
121230
Current
Value
X2
X3
Counting DiagramDirectSOFT
Handheld Programmer Keystrokes (cont)
STR
$1
BENT
STR
$2
C
STR
$3
D
SHFT ISG
U3
D2
C2
C
ENT
ENT STR
$SHFT ENT
OUT
GX ENT
0
A
1
B
2
CMLR
T2
C
SHFT
In the following example, when X1 makes an off to on transition, counter CTA2 will
increment by one. Comparative contacts are used to energize Y3 and Y4 at different
counts. When the reset (X3) turns on, the counter status bit will turn off, the current
value will be 0, and the comparative contacts will turn off.
AND
V
Handheld Programmer Keystrokes
X1
UDC CT2
V2000
X2
X3
X1
X2
X3
Counting Diagram
CTA2 K1
CTA2 K2 Y4
OUT
Y3
OUT
Y3
12340
Current
Value
Y4
DirectSOFT
Handheld Programmer Keystrokes (cont)
STR
$1
BENT
STR
$2
C
STR
$3
D
SHFT ISG
U3
D2
C2
C
ENT
ENT
SHFT ENT
2
C0
A0
A0
A
STR
$SHFT
1
BENT
OUT
GX ENT
3
D
MLR
T
2
C2
C
STR
$SHFT
ENT
OUT
GX ENT
MLR
T
2
C2
C
2
C
4
E
SHFT
SHFT
Up / Down Counter
Example Using
Discrete Status
Bits
Up / Down Counter
Example Using
Comparative
Contacts
Standard RLL
Instructions
5--46 Standard RLL Instructions
Timer, Counter and Shift Register
DL350 User Manual, 2nd Edition
The Shift Register instruction shifts data
through a predefined number of control
relays. The control ranges in the shift
register block must start at the beginning
of an 8 bit boundary and end at the end of
an 8 bit boundary.
The Shift Register has three contacts.
SData — determines the value (1 or
0) that will enter the register
SClock — shifts the bits one position
on each low to high transition
SReset —resets the Shift Register to
all zeros.
SR
aaaFrom A
bbbTo B
DATA
CLOCK
RESET
With each off to on transition of the clock input, the bits which make up the shift
register block are shifted by one bit position and the status of the data input is placed
into the starting bit position in the shift register. The direction of the shift depends on
the entry in the From and To fields. From C0 to C17 would define a block of sixteen
bits to be shifted from left to right. From C17 to C0 would define a block of sixteen
bits, to be shifted from right to left. The maximum size of the shift register block
depends on the number of available control relays. The minimum block size is 8
control relays.
Operand Data Type DL350 Range
A/B aaa bbb
Control Relay C0--1777 0--1777
Data Input
Clock Input
Reset Input
Shift Register Bits
C0 C17
Data Clock Reset
110
010
010
110
010
001
Inputs on Successive Scans
-- indicates on -- indicates off
X1
X2
SR
C0From
C17
X3 To
Handheld Programmer KeystrokesDirectSOFT
STR
$1
BENT
STR
$2
C
STR
$3
D
SHFT
ENT
ENT
RST
SORN
RSHFT 0
A
1
B7
HENT
SHFT
Shift Register
(SR)
Standard RLL
Instructions
5--47
Standard RLL Instructions
Accumulator/Stack Load
DL350 User Manual, 2nd Edition
Accumulator / Stack Load and Output Data Instructions
The accumulator in the DL350 CPU is a 32 bit register which is used as a temporary
storage location for data that is being copied or manipulated in some manor. For
example, you have to use the accumulator to perform math operations such as add,
subtract, multiply, etc. Since there are 32 bits, you can use up to an 8-digit BCD
number, or a 32-bit 2’s complement number. The accumulator is reset to 0 at the end
of every CPU scan.
The Load and Out instructions and their variations are used to copy data from a
V-memory location to the accumulator, or, to copy data from the accumulator to
V--memory. The following example copies data from V-memory location V1400 to
V--memory location V1410.
LD
V1400
X1
Copy data from V1400 to the
lower 16 bits of the
accumulator
Copy data from the lower 16 bits
of the accumulator to V1410
OUT
V1410
V1410
Acc.
V1400
8935
8935
0000 8935
Unused accumulator bits
are set to zero
Since the accumulator is 32 bits and V--memory locations are 16 bits the Load
Double and Out Double (or variations thereof) use two consecutive V--memory
locations or 8 digit BCD constants to copy data either to the accumulator from a
V--memory address or from a V--memory address to the accumulator. For example if
you wanted to copy data from V--memory location V1400 and V1401 to V--memory
location V1410 and V1411 the most efficient way to perform this function would be as
follows:
LDD
V1400
Copy data from V1400 and
V1401 to the accumulator
Copy data from the accumulator to
V1410 and V1411
OUTD
V1410
V1410
Acc.
V1400
5026
5026
6739 5026
X1 V1401
6739
V1411
6739
Using the
Accumulator
Copying Data to
the Accumulator
Standard RLL
Instructions
5--48 Standard RLL Instructions
Accumulator/Stack Load
DL350 User Manual, 2nd Edition
Instructions that manipulate data also use the accumulator. The result of the
manipulated data resides in the accumulator. The data that was being manipulated
is cleared from the accumulator. The following example loads the constant BCD
value 4935 into the accumulator, shifts the data right 4 bits, and outputs the result to
V1410.
LD
K4935
X1
Load the value 4935 into the
accumulator
Shift the data in the accumulator
4 bits (K4) to the right
Output the lower 16 bits of the
accumulator to V1410
0100100100110101
Constant
V1410
00000100100100110000010000000000
151413121110987654321031 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Shifted out of
accumulator
0493
4935
SHFR
K4
OUT
V1410
S S S S
0000000000000000
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0000000000000000
The upper 16 bits of the accumulator
will be set to 0
1514131211109876543210
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
Acc.
Some of the data manipulation instructions use 32 bits. They use two consecutive
V--memory locations or 8 digit BCD constants to manipulate data in the accumulator.
The following example rotates the value 67053101 two bits to the right and outputs
the value to V1410 and V1411.
LDD
K67053101
X1
Load the value 67053101
into the accumulator
Rotate the data in the
accumulator 2 bits to the right
Output the value in the
accumulator to V1410 and V1411
0011000100000001
V1410
01001100010000000000010000000000
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 031 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
8C40
ROTR
K2
OUTD
V1410
0101100111000001
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0110011100000101
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
Acc.
V1411
59C1
Constant 6705 3101
Changing the
Accumulator Data
Standard RLL
Instructions
5--49
Standard RLL Instructions
Accumulator/Stack Load
DL350 User Manual, 2nd Edition
The accumulator stack is used for instructions that require more than one parameter
to execute a function or for user defined functionality. The accumulator stack is used
when more than one Load type instruction is executed without the use of the Out
type instruction. The first load instruction in the scan places a value into the
accumulator. Every Load instruction thereafter without the use of an Out instruction
places a value into the accumulator and the value that was in the accumulator is
placed onto the accumulator stack. The Out instruction nullifies the previous load
instruction and does not place the value that was in the accumulator onto the
accumulator stack when the next load instruction is executed. Every time a value is
placed onto the accumulator stack the other values in the stack are pushed down
one location. The accumulator is eight levels deep (eight 32 bitregisters). If there is a
value in the eighth location when a new value is placed onto the stack, the value in
the eighth location is pushed off the stack and cannot be recovered.
Acc.
Load the value 3245 into the
accumulator
Load the value 5151 into the
accumulator, pushing the value 1234
onto the stack
Load the value 6363 into the
accumulator, pushing the value 5151
to the 1st stack location and the value
3245 to the 2nd stack location
LD
K3245
X1
LD
K5151
LD
K6363
Constant 3245
0000 3245
Acc. XXXX XXXX
Current Acc. value
Previous Acc. value XXXXXXXX
Level 1
XXXXXXXX
Level 2
XXXXXXXX
Level 3
XXXXXXXX
Level 4
XXXXXXXX
Level 5
XXXXXXXX
Level 6
XXXXXXXX
Level 7
XXXXXXXX
Level 8
Accumulator Stack
00003245
Level 1
XXXXXXXX
Level 2
XXXXXXXX
Level 3
XXXXXXXX
Level 4
XXXXXXXX
Level 5
XXXXXXXX
Level 6
XXXXXXXX
Level 7
XXXXXXXX
Level 8
Accumulator Stack
Acc.
Constant 5151
0000 5151
Acc. 0000 3245
Current Acc. value
Previous Acc. value
00005151
Level 1
00003245
Level 2
XXXXXXXX
Level 3
XXXXXXXX
Level 4
XXXXXXXX
Level 5
XXXXXXXX
Level 6
XXXXXXXX
Level 7
XXXXXXXX
Level 8
Accumulator Stack
Acc.
Constant 6363
0000 6363
Acc. 0000 5151
Current Acc. value
Previous Acc. value
Bucket
Bucket
Bucket
The POP instruction rotates values upward through the stack into the accumulator.
When a POP is executed the value which was in the accumulator is cleared and the
value that was on top of the stack is in the accumulator. The values in the stack are
shifted up one position in the stack.
Using the
Accumulator Stack
Standard RLL
Instructions
5--50 Standard RLL Instructions
Accumulator/Stack Load
DL350 User Manual, 2nd Edition
Acc.
POP the 1st value on the stack into the
accumulator and move stack values
up one location
POP
X1
POP
POP
V1400 4545
XXXX XXXX
Acc. 0000 4545
Previous Acc. value
Current Acc. value
00003792
Level 1
00007930
Level 2
XXXXXXXX
Level 3
XXXXXXXX
Level 4
XXXXXXXX
Level 5
XXXXXXXX
Level 6
XXXXXXXX
Level 7
XXXXXXXX
Level 8
Accumulator Stack
00007930
Level 1
XXXXXXXX
Level 2
XXXXXXXX
Level 3
XXXXXXXX
Level 4
XXXXXXXX
Level 5
XXXXXXXX
Level 6
XXXXXXXX
Level 7
XXXXXXXX
Level 8
Accumulator Stack
XXXXXXXX
Level 1
XXXXXXXX
Level 2
XXXXXXXX
Level 3
XXXXXXXX
Level 4
XXXXXXXX
Level 5
XXXXXXXX
Level 6
XXXXXXXX
Level 7
XXXXXXXX
Level 8
Accumulator Stack
POP the 1st value on the stack into the
accumulator and move stack values
up one location
POP the 1st value on the stack into the
accumulator and move stack values
up one location
OUT
V1400
OUT
V1401
Acc.
V1400 3792
0000 4545
Acc. 0000 3792
Previous Acc. value
Current Acc. value
Acc.
V1400 7930
0000 3792
Acc. XXXX 7930
Previous Acc. value
Current Acc. value
OUT
V1402
Copy data from the accumulator to
V1400
Copy data from the accumulator to
V1401
Copy data from the accumulator to
V1401
Copy data from the accumulator to
V1402
Standard RLL
Instructions
5--51
Standard RLL Instructions
Accumulator/Stack Load
DL350 User Manual, 2nd Edition
Many of the instructions will allow V--memory pointers as a operand. Pointers can be
useful in ladder logic programming, but can be difficult to understand or implement in
your application if you do not have prior experience with pointers (commonly known
as indirect addressing). Pointers allow instructions to obtain data from V--memory
locations referenced by the pointer value.
NOTE: V-memory addressing is in octal. However the value in the pointer location
which will reference a V-memory location is viewed as HEX. Use the Load Address
instruction to move a address into the pointer location. This instruction performs the
Octal to Hexadecimal conversion for you.
The following example uses a pointer operand in a Load instruction. V-memory
location 3000 is the pointer location. V3000 contains the value 400 which is the HEX
equivalent of the Octal address V-memory location V2000. The CPU copies the data
from V2000 into the lower word of the accumulator.
V3000 (P3000) contains the value 400
Hex. 400 Hex. = 2000 Octal which
contains the value 2635.
LD
P3000
X1
OUT
V3100
Copy the data from the lower 16 bits of
the accumulator to V3100.
V3000
0400
2635
XXXX
XXXX
XXXX
XXXX
XXXX
V3100 2635
V3101 XXXX
2635
S
S
Accumulator
V2000
V2001
V2002
V2003
V2004
V2005
The following example is similar to the one above, except for the LDA (load address)
instruction which automatically converts the Octal address to the Hex equivalent.
V3000 (P3000) contains the value 400
HEX 400 HEX. = 2000 Octal which
contains the value 2635
LDA
O 2000
X1
OUT
V 3000
Copy the data from the lower 16 bits of
the accumulator to V3000
V3000
0400
V2000 2635
XXXX
XXXX
XXXX
XXXX
XXXX
S
S
V3100 2635
V3101 XXXX
S
S
LD
P 3000
OUT
V 3100
Copy the data from the lower 16 bits of
the accumulator to V3100
Load the lower 16 bits of the
accumulator with Hexadecimal
equivalent to Octal 2000 (400))
V3000
Acc.
2000
0400
0000 0400
2000 Octal is converted to Hexadecimal
400 and loaded into the accumulator
Accumulator
0000 2635
Unused accumulator bits
are set to zero
V2001
V2002
V2003
V2004
V2005
Using Pointers
Standard RLL
Instructions
5--52 Standard RLL Instructions
Accumulator/Stack Load
DL350 User Manual, 2nd Edition
LD
A aaa
The Load instruction is a 16 bit instruction
that loads the value (Aaaa), which is either
a V--memory location or a 4 digit constant,
into the lower 16 bits of the accumulator.
The upper 16 bits of the accumulator are
set to 0.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Pointer PAll V mem. (See page 3--29)
Constant K0--FFFF
Discrete Bit Flags Description
SP76 on when the value loaded into the accumulator by any instruction is zero.
NOTE: Two consecutive Load instructions will place the value of the first load
instruction onto the accumulator stack.
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator and output to V2010.
1
B
2
C0
A0
A0
AENT
Handheld Programmer Keystrokes
LD
V2000
X1
Load the value in V2000 into
the lower 16 bits of the
accumulator
OUT
V2010
Copy the value in the lower
16 bits of the accumulator to
V2010
V2010
Acc.
V2000
8935
8935
0000 8935
DirectSOFT
The unused accumulator
bits are set to zero
STR
$
SHFT ANDST
L3
D
OUT
GX SHFT AND
V2
C0
A1
B0
AENT
ENT
Load
(LD)
Standard RLL
Instructions
5--53
Standard RLL Instructions
Accumulator/Stack Load
DL350 User Manual, 2nd Edition
LDD
A aaa
The Load Double instruction is a 32 bit
instruction that loads the value (Aaaa),
which is either two consecutive
V--memory locations or an 8 digit constant
value, into the accumulator.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Pointer PAll V mem. (See page 3--29)
Constant K0--FFFF
Discrete Bit Flags Description
SP76 on when the value loaded into the accumulator by any instruction is zero.
NOTE: Two consecutive Load instructions will place the value of the first load
instruction onto the accumulator stack.
In the following example, when X1 is on, the 32 bit value in V2000 and V2001 will be
loaded into the accumulator and output to V2010 and V2011.
1
BENT
2
C0
A0
A0
AENT
2
C0
A1
B0
AENT
Handheld Programmer Keystrokes
DirectSOFT
LDD
V2000
X1
Load the value in V2000 and
V2001 into the 32 bit
accumulator
OUTD
V2010
Copy the value in the 32 bit
accumulator to V2010 and
V2011
V2010
Acc.
V2000
5026
5026
6739 5026
V2001
6739
V2011
6739
STR
$
SHFT ANDST
L3
D3
D
OUT
GX SHFT 3
D
Load Double
(LDD)
Standard RLL
Instructions
5--54 Standard RLL Instructions
Accumulator/Stack Load
DL350 User Manual, 2nd Edition
bbbK
LDF A aaa
The Load Formatted instruction loads
1--32 consecutive bits from discrete
memory locations into the accumulator.
The instruction requires a starting location
(Aaaa) and the number of bits (Kbbb) to be
loaded. Unused accumulator bit locations
are set to zero.
Operand Data Type DL350 Range
Aaaa bbb
Inputs X0--777 -- --
Outputs Y0--777 -- --
Control Relays C0--1777 -- --
Stage Bits S0--1777 -- --
Timer Bits T0--377 -- --
Counter Bits CT 0--177 -- --
Special Relays SP 0--777 -- --
Constant K-- -- 1--32
Discrete Bit Flags Description
SP76 on when the value loaded into the accumulator by any instruction is zero.
NOTE: Two consecutive Load instructions will place the value of the first load
instruction onto the accumulator stack.
In the following example, when C0 is on, the binary pattern of C10--C16 (7 bits) will
be loaded into the accumulator using the Load Formatted instruction. The lower 6
bits of the accumulator are output to Y20--Y26 using the Out Formatted instruction.
0
A7
HENT
2
C
Handheld Programmer Keystrokes
LDF C10
K7
C0
Load the status of 7
consecutive bits (C10--C16)
into the accumulator
OUTF Y20
K7
Copy the value from the
specified number of bits in
the accumulator to Y20--Y26
K7C10
Location Constant
00000000000011100000000000000000
1514131211109876543210
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
K7Y20
Location Constant
C10
C11C12C13C14C15C16
OFFONONONOFFOFFOFF
Y20Y21Y22Y23Y24Y25Y26
OFFONONONOFFOFFOFF
The unused accumulator bits are set to zero
D
i
r
ec
t
SOFT
STR
$SHFT ENT
2
C0
A
SHFT ANDST
L3
D5
F
SHFT 2
C1
B0
A7
HENT
OUT
GX SHFT 5
F
Load
Formatted
(LDF)
Standard RLL
Instructions
5--55
Standard RLL Instructions
Accumulator/Stack Load
DL350 User Manual, 2nd Edition
O aaa
LDA
The Load Address instruction is a 16 bit
instruction. It converts any octal value or
address to the HEX equivalent value and
loads the HEX value into the accumulator.
This instruction is useful when an address
parameter is required since all addresses
for the system are in octal.
Operand Data Type DL350 Range
aaa
Octal Address OAll V mem. (See page 3--29)
Discrete Bit Flags Description
SP76 on when the value loaded into the accumulator by any instruction is zero.
NOTE: Two consecutive Load instructions will place the value of the first load
instruction onto the accumulator stack.
In the following example when X1 is on, the octal number 40400 will be converted to
a HEX 4100 and loaded into the accumulator using the Load Address instruction.
The value in the lower 16 bits of the accumulator is copied to V2000 using the Out
instruction.
1
BENT
4
E0
A4
E0
A0
AENT
Handheld Programmer Keystrokes
DirectSOFT
LDA
O 40400
X1
Load The HEX equivalent to
the octal number into the
lower 16 bits of the
accumulator
OUT
V2000
Copy the value in lower 16
bits of the accumulator to
V2000
V2000
Acc.
Hexadecimal
4100
4100
0000 4100
Octal
4040 0
The unused accumulator
bits are set to zero
STR
$
SHFT ANDST
L3
D0
A
OUT
GX SHFT AND
V2
C0
A0
AENT
0
A
Load Address
(LDA)
Standard RLL
Instructions
5--56 Standard RLL Instructions
Accumulator/Stack Load
DL350 User Manual, 2nd Edition
A aaa
LDX
Load Accumulator Indexed is a 16 bit
instruction that specifies a source address
(V--memory) which will be offset by the value
in the first stack location. This instruction
interprets the value in the first stack location
as HEX. The value in the offset address
(source address + offset) is loaded into the
lower 16 bits of the accumulator. The upper
16 bits of the accumulator are set to 0.
Helpful Hint: — The Load Address instruction can be used to convert an octal
address to a HEX address and load the value into the accumulator.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See p. 3--29)
Pointer PAll (See p. 3--29)
NOTE: Two consecutive Load instructions will place the value of the first load
instruction onto the accumulator stack.
In the following example when X1 is on, the HEX equivalent for octal 25 will be
loaded into the accumulator (this value will be placed on the stack when the Load
Accumulator Indexed instruction is executed). V--memory location V1410 will be
added to the value in the 1st. level of the stack and the value in this location (V1435 =
2345) is loaded into the lower 16 bits of the accumulator using the Load Accumulator
Indexed instruction. The value in the lower 16 bits of the accumulator is output to
V1500 using the Out instruction.
Handheld Programmer Keystrokes
Copy the value in the lower
16 bits of the accumulator
to V1500
LDA
O25
X1
LDX
V1410
OUT
V1500
Acc. 0000 0015
Hexadecimal
0015
Octal
2 5
The unused accumulator
bits are set to zero
V1500
Acc.
Octal
1435
2345
0000 2345
V
Octal
1410
The unused accumulator
bits are set to zero
+15
HEX Value in 1st
stack location
00000015
Level 1
XXXXXXXX
Level 2
XXXXXXXX
Level 3
XXXXXXXX
Level 4
XXXXXXXX
Level 5
XXXXXXXX
Level 6
XXXXXXXX
Level 7
XXXXXXXX
Level 8
Accumulator Stack
V
=
STR X 1
L
OUT V 1 5 0 0
V 1 4 0SHFT XSHFT 1
2 5SHFT A O
Load The HEX equivalent to
octal 25 into the lower 16
bits of the accumulator
Move the offset to the stack.
Load the accumulator with
the address to be offset
The value in V1435
is 2345
D
L D
ENT
ENT
ENT
ENT
Load Accumulator
Indexed
(LDX)
Standard RLL
Instructions
5--57
Standard RLL Instructions
Accumulator/Stack Load
DL350 User Manual, 2nd Edition
aaaK
LDSX
The Load Accumulator Indexed from Data
Constants is a 16 bit instruction. The
instruction specifies a Data Label Area
(DLBL) where numerical or ASCII
constants are stored. This value will be
loaded into the lower 16 bits.
The LDSX instruction uses the value in the first level of the accumulator stack as
an offset to determine which numerical or ASCII constant within the Data Label
Area will be loaded into the accumulator. The LDSX instruction interprets the value
in the first level of the accumulator stack as a HEX value.
Helpful Hint: — The Load Address instruction can be used to convert octal to HEX
and load the value into the accumulator.
Operand Data Type DL350 Range
aaa
Constant K1--FFFF
NOTE: Two consecutive Load instructions will place the value of the first load
instruction onto the accumulator stack.
In the following example when X1 is on, the offset of 1 is loaded into the accumulator.
This value will be placed into the first level of the accumulator stack when the LDSX
instruction is executed. The LDSX instruction specifies the Data Label (DLBL K2)
where the numerical constant(s) are located in the program and loads the constant
value, indicated by the offset in the stack, into the lower 16 bits of the accumulator.
LD
K1
X1
Load the offset value of 1 (K1) into the lower 16
bits of the accumulator.
LDSX
K2
Move the offset to the stack.
Load the accumulator with the data label
number
END
S
S
S
DLBL K2
NCON
K3333
NCON
K2323
NCON
K4549
Acc. 0000 0001
Hexadecimal
0001
The unused accumulator
bits are set to zero
Value in 1st. level of stack is
used as offset. The value is 1
Offset 0
Offset 1
Offset 2
V2000
Acc.
2323
0000 2323
Copy the value in the lower
16 bits of the accumulator
to V2000
OUT
V2000
00000001
Level 1
XXXXXXXX
Level 2
XXXXXXXX
Level 3
XXXXXXXX
Level 4
XXXXXXXX
Level 5
XXXXXXXX
Level 6
XXXXXXXX
Level 7
XXXXXXXX
Level 8
Accumulator Stack
Acc. 0000 0002
K
Constant
0002
The unused accumulator
bits are set to zero
The unused accumulator
bits are set to zero
Load Accumulator
Indexed from
Data Constants
(LDSX)
Standard RLL
Instructions
5--58 Standard RLL Instructions
Accumulator/Stack Load
DL350 User Manual, 2nd Edition
1
BENT
ENT
2
C
Handheld Programmer Keystrokes
STR
$
SHFT ANDST
L3
DSHFT JMP
K1
BENT
SHFT ANDST
L3
DRST
SSET
X
SHFT 4
ETMR
N3
DENT
SHFT 3
DANDST
L1
BANDST
L2
CENT
SHFT TMR
N2
CINST#
OTMR
N3
D3
D3
D3
DENT
SHFT TMR
N2
CINST#
OTMR
N3
D3
DENT
2
C2
C
SHFT TMR
N2
CINST#
OTMR
NENT
4
E5
F4
E9
J
OUT
GX SHFT AND
V2
C0
A0
AENT
0
A
A aaa
LDR
The Load Real Number instruction loads a
real number contained in two consecutive
V-memory locations, or an 8-digit constant
into the accumulator.
Operand Data Type DL350 Range
Aaaa
V--memory VAll V mem (See p. 3--29)
Pointer PAll V mem (See p. 3--29)
Real Constant RFull IEEE 32-bit range
DirectSOFT allows you to enter real numbers
directly, by using the leading “R” to indicate a real
number entry. You can enter a constant such as
Pi, shown in the example to the right. To enter
negative numbers, use a minus (--) after the “R”.
R3.14159
LDR
For very large numbers or very small numbers,
you can use exponential notation. The number to
the right is 5.3 million. The OUTD instruction
stores it in V1400 and V1401.
R5.3E6
LDR
V1400
OUTD
These real numbersare in the IEEE 32-bit floating point format. They occupy two
V-memory locations, regardless of how big or small the number may be! If you view a
stored real number in hex, binary, or even BCD, the number shown will be very
difficult to decipher. Like all other number types, you must keep track of real number
locations in memory, so they can be read with the proper instructions later.
The previous example above stored a real number
in V1400 and V1401. Suppose that now we want to
retreive that number. Just use the Load Real with
the V data type, as shown to the right. Next we
could perform real math on it, or convert it to a
binary number.
V1400
LDR
Load Real Number
(LDR)
Standard RLL
Instructions
5--59
Standard RLL Instructions
Accumulator/Stack Load
DL350 User Manual, 2nd Edition
OUT
A aaa
The Out instruction is a 16 bit instruction
that copies the value in the lower 16 bits of
theaccumulatortoaspecifiedV--memory
location (Aaaa).
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Pointer PAll V mem. (See page 3--29)
In the following example, when X1 is on, the value in V2000 will be loaded into the
lower 16 bits of the accumulator using the Load instruction. The value in the lower 16
bits of the accumulator are copied to V2010 using the Out instruction.
2
C0
A0
A0
AENT
1
BENT
Handheld Programmer Keystrokes
LD
V2000
X1
Load the value in V2000 into
the lower 16 bits of the
accumulator
OUT
V2010
Copy the value in the lower
16 bits of the accumulator to
V2010
V2010
Acc.
V2000
8935
8935
0000 8935
D
i
r
ec
t
SOFT
The unused accumulator
bits are set to zero
STR
$
SHFT ANDST
L3
D
OUT
GX SHFT AND
V2
C0
A1
B0
AENT
Out
(OUT)
Standard RLL
Instructions
5--60 Standard RLL Instructions
Accumulator/Stack Load
DL350 User Manual, 2nd Edition
OUTD
A aaa
The Out Double instruction is a 32 bit
instruction that copies the value in the
accumulator to two consecutive
V--memory locations at a specified starting
location (Aaaa).
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Pointer PAll V mem. (See page 3--29)
In the following example, when X1 is on, the 32 bit value in V2000 and V2001 will be
loaded into the accumulator using the Load Double instruction. The value in the
accumulator is output to V2010 and V2011 using the Out Double instruction.
2
C0
A0
A0
AENT
2
C0
A1
B0
AENT
1
BENT
Handheld Programmer Keystrokes
V2010
Acc.
V2000
5026
5026
6739 5026
V2001
6739
V2011
6739
Load the value in V2000 and
V2001 into the accumulator
LDD
OUTD
Copy the value in the
accumulator to V2010 and
V2011
V2000
X1
V2010
DirectSOFT
STR
$
SHFT ANDST
L3
D3
D
OUT
GX SHFT 3
D
Out DOUBLE
(OUTD)
Standard RLL
Instructions
5--61
Standard RLL Instructions
Accumulator/Stack Load
DL350 User Manual, 2nd Edition
bbbK
OUTF A aaa
The Out Formatted instruction outputs
1--32 bits from the accumulator to the
specified discrete memory locations. The
instruction requires a starting location
(Aaaa) for the destination and the number
of bits (Kbbb) to be output.
Operand Data Type DL350 Range
Aaaa bbb
Inputs X0--777 -- --
Outputs Y0--777 -- --
Control Relays C0--1777 -- --
Constant K-- -- 1--32
In the following example, when C0 is on, the binary pattern of C10--C16 (7 bits) will
be loaded into the accumulator using the Load Formatted instruction. The lower 7
bits of the accumulator are output to Y20--Y26 using the Out Formatted instruction.
0
A7
HENT
2
C
Handheld Programmer Keystrokes
LDF C10
K7
C0
Load the status of 7
consecutive bits (C10--C16)
into the accumulator
OUTF Y20
K7
Copy the value of the
specified number of bits
from the accumulator to
Y20--Y26
K7C10
Location Constant
00000000000011100000000000000000
1514131211109876543210
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
K7Y20
Location Constant
C10C11C12C13C14C15C16
OFFONONONOFFOFFOFF
Y20Y21Y22Y23Y24Y25Y26
OFFONONONOFFOFFOFF
The unused accumulator bits are set to zero
Accumulator
D
i
r
ec
t
SOFT
STR
$SHFT ENT
2
C0
A
SHFT ANDST
L3
D5
F
SHFT 2
C1
B0
A7
HENT
OUT
GX SHFT 5
F
Out
Formatted
(OUTF)
Standard RLL
Instructions
5--62 Standard RLL Instructions
Accumulator/Stack Load
DL350 User Manual, 2nd Edition
aaaA
OUTX
The Out Indexed instruction is a 16 bit
instruction. It copies a 16 bit or 4 digit value
from the first level of the accumulator stack
to a source address offset by the value in
the accumulator(V--memory + offset).This
instruction interprets the offset value as a
HEX number. The upper 16 bits of the
accumulator are set to zero.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See p. 3--29)
Pointer PAll (See p. 3--29)
In the following example, when X1 is on, the constant value 3544 is loaded into the
accumulator. This is the value that will be output to the specified offset V--memory
location (V1525). The value 3544 will be placed onto the stack when the Load
Address instruction is executed. Remember, two consecutive Load instructions
places the value of the first load instruction onto the stack. The Load Address
instruction converts octal 25 to HEX 15 and places the value in the accumulator. The
Out Indexed instruction outputs the value 3544 which resides in the first level of the
accumulator stack to V1525.
Octal
2 5
Handheld Programmer Keystrokes
Copy the value in the first
level of the stack to the
offset address 1525
(V1500 + 25)
LDA
O25
X1 LD
K3544
OUTX
V1500
Acc. 0000 3544
Constant
3544
The unused accumulator
bits are set to zero
V1525
Acc.
3544
0000 0015
The unused accumulator
bits are set to zero
00003544
Level 1
XXXXXXXX
Level 2
XXXXXXXX
Level 3
XXXXXXXX
Level 4
XXXXXXXX
Level 5
XXXXXXXX
Level 6
XXXXXXXX
Level 7
XXXXXXXX
Level 8
Accumulator Stack
STR 1
Load The HEX equivalent to
octal 25 into the lower 16 bits
of the accumulator. This is the
offset for the Out Indexed
instruction, which determines
the final destination address
Load the accumulator with
the value 3544
HEX
0015
Octal
2 5
L
OUT V 1 5 0SHFT X 0
2 5A
L 3544
DirectSOFT
V
Octal
1525
Octal
1500
V+
=
The hex 15 converts
to 25 octal, which is
added to the base
address of V1500 to yield
the final destination.
ENT
ENT
ENT
ENT
SHFT D
DSHFT O
Out Indexed
(OUTX)
Standard RLL
Instructions
5--63
Standard RLL Instructions
Accumulator/Stack Load
DL350 User Manual, 2nd Edition
POP
The Pop instruction moves the value from
the first level of the accumulator stack (32
bits) to the accumulator and shifts each
value in the stack up one level.
In the example, when C0 is on, the value 4545 that was on top of the stack is moved
into the accumulator using the Pop instruction The value is output to V2000 using the
Out instruction. The next Pop moves the value 3792 into the accumulator and
outputs the value to V2001. The last Pop moves the value 7930 into the accumulator
and outputs the value to V2002. Please note if the value in the stack were greater
than 16 bits (4 digits) the Out Double instruction would be used and two V--memory
locations for each Out Double need to be allocated.
Discrete Bit Flags Description
SP63 on when the result of the instruction causes the value in the accumulator to be zero.
Handheld Programmer Keystrokes
Acc.
Pop the 1st. value on the stack into the
accumulator and move stack values
up one location
POP
C0
POP
POP
V2000 4545
XXXX XXXX
Acc. 0000 4545
Previous Acc. value
Current Acc. value
00003792
Level 1
00007930
Level 2
XXXXXXXX
Level 3
XXXXXXXX
Level 4
XXXXXXXX
Level 5
XXXXXXXX
Level 6
XXXXXXXX
Level 7
XXXXXXXX
Level 8
Accumulator Stack
00007930
Level 1
XXXXXXXX
Level 2
XXXXXXXX
Level 3
XXXXXXXX
Level 4
XXXXXXXX
Level 5
XXXXXXXX
Level 6
XXXXXXXX
Level 7
XXXXXXXX
Level 8
Accumulator Stack
XXXXXXXX
Level 1
XXXXXXXX
Level 2
XXXXXXXX
Level 3
XXXXXXXX
Level 4
XXXXXXXX
Level 5
XXXXXXXX
Level 6
XXXXXXXX
Level 7
XXXXXXXX
Level 8
Accumulator Stack
Pop the 1st. value on the stack into the
accumulator and move stack values
up one location
Pop the 1st. value on the stack into the
accumulator and move stack values
up one location
OUT
V2000
OUT
V2001
Acc.
V2001 3792
0000 4545
Acc. 0000 3792
Previous Acc. value
Current Acc. value
Acc.
V2002 7930
0000 3792
Acc. 0000 7930
Previous Acc. value
Current Acc. value
OUT
V2002
Copy the value in the lower 16 bits of
the accumulator to V2000
Copy the value in the lower 16 bits of
the accumulator to V2001
Copy the value in the lower 16 bits of
the accumulator to V2002
STR
$SHFT 2
C0
AENT
SHFT CV
PINST#
OCV
PENT
OUT
GX SHFT AND
V2
C0
A0
AENT
0
A
SHFT CV
PINST#
OCV
PENT
OUT
GX SHFT AND
V2
C0
AENT
0
A1
B
SHFT CV
PINST#
OCV
PENT
OUT
GX SHFT AND
V2
C0
AENT
0
A2
C
SHFT
SHFT
SHFT
Pop
(POP)
Standard RLL
Instructions
5--64 Standard RLL Instructions
Accumualtor Logical Instructions
DL350 User Manual, 2nd Edition
Accumulator Logical Instructions
AND
A aaa
The And instruction is a 16 bit instruction
that logically ands the value in the lower
16 bits of the accumulator with a
specified V--memory location (Aaaa).
The result resides in the accumulator.
The discrete status flag indicates if the
result of the And is zero.
Operand Data Type DL3540 Range
Aaaa
V--memory VAll (See page 3--29)
Pointer PAll V mem. (See page 3--29)
Discrete Bit Flags Description
SP63 Will be on if the result in the accumulator is zero
NOTE: The status flags are only valid until another instruction that uses the same
flags is executed.
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in the accumulator is anded
with the value in V2006 using the And instruction. The value in the lower 16 bits of the
accumulator is output to V2010 using the Out instruction.
AND (V2006)
Handheld Programmer Keystrokes
LD
V2000
X1
Load the value in V2000 into
the lower 16 bits of the
accumulator
AND
V2006
ANDthevalueinthe
accumulator with
the value in V2006
OUT
V2010
Copy the lower 16 bits of the
accumulator to V2010
0010100001111010
00101000001110000000010000000000
V2000
287A
0000000000000000
0000000000000000
The upper 16 bits of the accumulator
will be set to 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
Acc.
00101000011110100000000000000000
Acc.
01101010001110000000000000000000
6A38
V2010
2838
D
i
r
ec
t
SOFT
STR
$
SHFT ANDST
L3
D
SHFT AND
V2
C0
A0
AENT
6
G
OUT
GX SHFT AND
V2
C0
A1
B0
AENT
AND
V
1
BENT
2
C0
A0
A0
AENT
And
(AND)
Standard RLL
Instructions
5--65
Standard RLL Instructions
Accumulator Logical Instructions
DL350 User Manual, 2nd Edition
K aaa
ANDD
The And Double is a 32 bit instruction that
logically ands the value in the
accumulator with an 8 digit (max.)
constant value (Aaaa). The result
resides in the accumulator. Discrete
status flags indicate if the result of the
And Double is zero or a negative number
(the most significant bit is on).
Operand Data Type DL350 Range
aaa
Constant K0--FFFF
Discrete Bit Flags Description
SP63 Will be on if the result in the accumulator is zero
SP70 Will be on is the result in the accumulator is negative
NOTE: The status flags are only valid until another instruction that uses the same
flags is executed.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded
into the accumulator using the Load Double instruction. The value in the
accumulator is anded with 36476A38 using the And double instruction. The value in
the accumulator is output to V2010 and V2011 using the Out Double instruction.
AND 36476A38
Handheld Programmer Keystrokes
LDD
V2000
X1
Load the value in V2000 and
V2001 into the accumulator
ANDD
K36476A38
ANDthevalueinthe
accumulator with
the constant value
36476A38
OUTD
V2010
Copy the value in the
accumulator to V2010 and
V2011
0010100001111010
00101000001110000000010000000000
V2000
287A
0001010001000110
0101010001111110
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
Acc.
Acc.
V2010
2838
V2001
547E
V2011
1446
0101010001111110 0010100001111010
01101010001110000011011001000111
D
i
r
ec
t
SOFT
STR
$
SHFT ANDST
L3
D
SHFT
OUT
GX
3
D
SHFT 3
D
AND
VSHFT 3
D8
I
3
D
SHFT
SHFT
JMP
K0
A
3
D6
G4
E7
H6
GENT
1
BENT
2
C0
A1
B0
AENT
2
C0
A0
AENT
0
A
And Double
(ANDD)
Standard RLL
Instructions
5--66 Standard RLL Instructions
Accumualtor Logical Instructions
DL350 User Manual, 2nd Edition
bbbK
ANDF A aaa
The And Formatted instruction logically
ANDs the binary value in the accumulator
and a specified range of discrete memory
bits (1--32). The instruction requires a
starting location (Aaaa) and number of bits
(Kbbb) to be ANDed. Discrete status flags
indicate if the result is zero or a negative
number (the most significant bit =1).
Operand Data Type DL350 Range
A/B aaa bbb
Inputs X0--777 -- --
Outputs Y0--777 -- --
Control Relays C0--1777 -- --
Stage Bits S0--1777 -- --
Timer Bits T0--377 -- --
Counter Bits CT 0--177 -- --
Special Relays SP 0--777 -- --
Constant K-- -- 1--32
Discrete Bit Flags Description
SP63 Will be on if the result in the accumulator is zero
SP70 Will be on is the result in the accumulator is negative
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on the Load Formatted instruction loads
C10--C13 (4 binary bits) into the accumulator. The accumulator contents is logically
ANDed with the bit pattern from Y20--Y23 using the And Formatted instruction. The
Out Formatted instruction outputs the accumulator’s lower four bits to C20--C23.
Handheld Programmer Keystrokes
LDF C10
K4
X1
Load the status of 4
consecutive bits (C10--C13)
into the accumulator
OUTF C20
K4
Copy the value in the lower
4bitsinaccumulatorto
C20--C23
K4C10
Location Constant
00000000000011100000000000000000
1514131211109876543210
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C10C11C12C13
OFFONONON
Y20Y21Y22Y23
OFFOFFOFFON
The unused accumulator bits are set to zero
Accumulator
STR 1
DSHFT F C 1 0 K 4
AND (Y20--Y23)
0000000000001000
Acc.
Acc. 0000000000000000 0000000000001110
1000
C20C21C22C23
OFFOFFOFFON
K4C20
Location Constant
ANDF Y20
K4
And the binary bit pattern
(Y20--Y23) with the value in
the accumulator
OUT SHFT F
AND SHFT F Y 2 0 K 4
C 2 0 K 4
D
i
r
ec
t
SOFT
ENT
ENT
ENT
ENT
L
And
Formatted
(ANDF)
Standard RLL
Instructions
5--67
Standard RLL Instructions
Accumulator Logical Instructions
DL350 User Manual, 2nd Edition
OR
A aaa
The Or instruction is a 16 bit instruction
that logically ors the value in the lower 16
bits of the accumulator with a specified
V--memory location (Aaaa). The result
resides in the accumulator. The discrete
status flag indicates if the result of the Or
is zero.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Pointer PAll V mem. (See page 3--29)
Discrete Bit Flags Description
SP63 Will be on if the result in the accumulator is zero
NOTE: The status flags are only valid until another instruction that uses the same
flags is executed.
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in the accumulator is ored with
V2006 using the Or instruction. The value in the lower 16 bits of the accumulator are
output to V2010 using the Out instruction.
3
D
OR (V2006)
Handheld Programmer Keystrokes
LD
V2000
X1
Load the value in V2000 into
the lower 16 bits of the
accumulator
OR
V2006
Or the value in the
accumulator with
the value in V2006
OUT
V2010
Copy the value in the lower
16 bits of the accumulator to
V2010
0010100001111010
01101010011110100000010000000000
V2000
287A
0000000000000000
0000000000000000
The upper 16 bits of the accumulator
will be set to 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
Acc.
00101000011110100000000000000000
Acc.
01101010001110000000000000000000
6A38
V2010
6A7A
D
i
r
ec
t
SOFT
STR
$1
BENT
SHFT ANDST
L2
C0
A0
A0
AENT
SHFT AND
V2
C0
A0
AENT
6
G
OUT
GX SHFT AND
V2
C0
A1
B0
AENT
OR
Q
Or
(OR)
Standard RLL
Instructions
5--68 Standard RLL Instructions
Accumualtor Logical Instructions
DL350 User Manual, 2nd Edition
K aaa
ORD
The Or Double is a 32 bit instruction that
ors the value in the accumulator with an 8
digit (max.) constant value. The result
resides in the accumulator. Discrete
status flags indicate if the result of the Or
Double is zero or a negative number (the
most significant bit is on).
Operand Data Type DL350 Range
Aaaa
Constant K0--FFFF
Discrete Bit Flags Description
SP63 Will be on if the result in the accumulator is zero
SP70 Will be on is the result in the accumulator is negative
NOTE: The status flags are only valid until another instruction that uses the same
flags is executed.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded
into the accumulator using the Load Double instruction. The value in the
accumulator is ored with 36476A38 using the Or Double instruction. The value in the
accumulator is output to V2010 and V2011 using the Out Double instruction.
JMP
K
OR 36476A38
Handheld Programmer Keystrokes
LDD
V2000
X1
Load the value in V2000 and
V2001 into accumulator
ORD
K36476A38
OR the value in the
accumulator with
the constant value
36476A38
OUTD
V2010
Copy the value in the
accumulator to V2010 and
V2011
0010100001111010
01101010011110100000010000000000
V2000
287A
0111011001111111
0101010001111110
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
Acc.
Acc.
V2010
6A7A
V2001
547E
V2011
767F
0101010001111110 0010100001111010
D
i
r
ec
t
SOFT
01101010001110000011011001000111
STR
$
SHFT ANDST
L3
D
SHFT
OUT
GX
3
D
SHFT 3
D
SHFT 3
D
OR
Q8
I
3
D
SHFT
SHFT 0
A
3
D6
G4
E7
H6
GENT
1
BENT
2
C0
A0
A0
AENT
2
C0
A1
B0
AENT
Or Double
(ORD)
Standard RLL
Instructions
5--69
Standard RLL Instructions
Accumulator Logical Instructions
DL350 User Manual, 2nd Edition
bbbK
ORF A aaa
The Or Formatted instruction logically
ORs the binary value in the accumulator
and a specified range of discrete bits
(1--32). The instruction requires a starting
location (Aaaa) and the number of bits
(Kbbb) to be ORed. Discrete status flags
indicate if the result is zero or negative (the
most significant bit =1).
Operand Data Type DL350 Range
A/B aaa bbb
Inputs X0--777 -- --
Outputs Y0--777 -- --
Control Relays C0--1777 -- --
Stage Bits S0--1777 -- --
Timer Bits T0--377 -- --
Counter Bits CT 0--177 -- --
Special Relays SP 0--777 -- --
Constant K-- -- 1--32
Discrete Bit Flags Description
SP63 Will be on if the result in the accumulator is zero
SP70 Will be on is the result in the accumulator is negative
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on the Load Formatted instruction loads
C10--C13 (4 binary bits) into the accumulator. The Or Formatted instruction logically
ORs the accumulator contents with Y20--Y23 bit pattern. The Out Formatted
instruction outputs the accumulator’s lower four bits to C20--C23.
Handheld Programmer Keystrokes
LDF C10
K4
X1
Load the status of 4
consecutive bits (C10--C13)
into the accumulator
OUTF C20
K4
Copy the specified number
of bits from the accumulator
to C20--C23
K4C10
Location Constant
00000000000001100000000000000000
1514131211109876543210
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
C10
C11C12C13
OFFONONOFF
Y20Y21Y22Y23
OFFOFFOFFON
The unused accumulator bits are set to zero
OR (Y20--Y23)
0000000000001110
1000
C20C21C22C23
OFFONONON
K4C20
Location Constant
ORF Y20
K4
Or the binary bit pattern
(Y20--Y23) with the value in
the accumulator
D
i
r
ec
t
SOFT
0000000000000000
Acc.
STR 1
DSHFT F C 1 0 K 4
OUT SHFT F
OR SHFT F Y 2 0 K 4
C 2 0 K 4
ENT
ENT
ENT
ENT
L
Or
Formatted
(ORF)
Standard RLL
Instructions
5--70 Standard RLL Instructions
Accumualtor Logical Instructions
DL350 User Manual, 2nd Edition
XOR
A aaa
The Exclusive Or instruction is a 16 bit
instruction that performs an exclusive or
of the value in the lower 16 bits of the
accumulator and a specified V--memory
location (Aaaa). The result resides in the
in the accumulator. The discrete status
flag indicates if the result of the XOR is
zero.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Pointer PAll V mem. (See page 3--29)
Discrete Bit Flags Description
SP63 Will be on if the result in the accumulator is zero
NOTE: The status flags are only valid until another instruction that uses the same
flags is executed.
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in the accumulator is exclusive
ored with V2006 using the Exclusive Or instruction. The value in the lower 16 bits of
the accumulator are output to V2010 using the Out instruction.
XOR (V2006)
Handheld Programmer Keystrokes
LD
V2000
X1
Load the value in V2000 into
the lower 16 bits of the
accumulator
XOR
V2006
XORthevalueinthe
accumulator with
the value in V2006
OUT
V2010
Copy the lower 16 bits of the
accumulator to V2010
0010100001111010
01001110010000100000010000000000
V2000
287A
0000000000000000
0000000000000000
The upper 16 bits of the accumulator
will be set to 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
Acc.
00100100011110100000000000000000
Acc.
6A38
V2010
4E42
D
i
r
ec
t
SOFT
01101010001110000000000000000000
STR
$SHFT SET
X1
BENT
SHFT ANDST
L3
DSHFT AND
V2
C0
A0
A0
AENT
SHFT AND
V2
C0
A0
AENT
6
G
OUT
GX SHFT AND
V2
C0
A1
B0
AENT
OR
Q
SHFT SHFT
SET
X
Exclusive Or
(XOR)
Standard RLL
Instructions
5--71
Standard RLL Instructions
Accumulator Logical Instructions
DL350 User Manual, 2nd Edition
K aaa
XORD
The Exclusive OR Double is a 32 bit
instruction that performs an exclusive or
of the value in the accumulator and the
value (Aaaa), which is a 8 digit (max.)
constant. The result resides in the
accumulator. Discrete status flags
indicate if the result of the Exclusive Or
Double is zero or a negative number (the
most significant bit is on).
Operand Data Type DL350 Range
Aaaa
Constant K0--FFFF
Discrete Bit Flags Description
SP63 Will be on if the result in the accumulator is zero
SP70 Will be on is the result in the accumulator is negative
NOTE: The status flags are only valid until another instruction that uses the same
flags is executed.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded
into the accumulator using the Load Double instruction. The value in the
accumulator is exclusively ored with 36476A38 using the Exclusive Or Double
instruction. The value in the accumulator is output to V2010 and V2011 using the Out
Double instruction.
JMP
K
SHFTSHFT 3
D
OR
Q
XORD 36476A38
Handheld Programmer Keystrokes
LDD
V2000
X1
Load the value in V2000 and
V2001 into the accumulator
XORD
K36476A38
XORD the value in the
accumulator with
the constant value
36476A38
OUTD
V2010
Copy the value in the
accumulator to V2010
and V2011
0010100001111010
01000010010000100000010000000000
V2000
287A
0110001000111001
0101010001111110
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
Acc.
Acc.
V2010
4242
V2001
547E
V2011
6239
0101010001111110 0010100001111010
D
i
r
ec
t
SOFT
01101010001110000011011001000111
STR
$
SHFT ANDST
L3
D3
D
SHFT SET
X
OUT
GX SHFT 3
D
3
D6
G4
E8
I
3
D
SHFT
SHFT 0
A
7
H6
GENT
1
BENT
2
C0
A0
A0
AENT
2
C0
A1
B0
AENT
Exclusive Or
Double
(XORD)
Standard RLL
Instructions
5--72 Standard RLL Instructions
Accumualtor Logical Instructions
DL350 User Manual, 2nd Edition
XORF A aaa
The Exclusive Or Formatted instruction
performs an exclusive OR of the binary
value in the accumulator and a specified
range of discrete memory bits (1--32).
bbbK
The instruction requires a starting location (Aaaa) and the number of bits (Bbbb) to
be exclusive ORed. Discrete status flags indicate if the result of the Exclusive Or
Formatted is zero or negative (the most significant bit =1).
Operand Data Type DL350 Range
A/B aaa bbb
Inputs X0--777 -- --
Outputs Y0--777 -- --
Control Relays C0--1777 -- --
Stage Bits S0--1777 -- --
Timer Bits T0--377 -- --
Counter Bits CT 0--177 -- --
Special Relays SP 0--777 -- --
Constant K-- -- 1--32
Discrete Bit Flags Description
SP63 Will be on if the result in the accumulator is zero
SP70 Will be on is the result in the accumulator is negative
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the binary pattern of C10--C13 (4 bits) will be
loaded into the accumulator using the Load Formatted instruction. The value in the
accumulator will be logically Exclusive Ored with the bit pattern from Y20--Y23 using
the Exclusive Or Formatted instruction. The value in the lower 4 bits of the
accumulator are output to C20--C23 using the Out Formatted instruction.
Handheld Programmer Keystrokes
LDF C10
K4
X1
Load the status of 4
consecutive bits (C10--C13)
into the accumulator
OUTF C20
K4
Copy the specified number
of bits from the accumulator
to C20--C23
K4C10
Location Constant
00000000000001100000000000000000
1514131211109876543210
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C10C11C12C13
OFFONONOFF
Y20Y21Y22Y23
OFFOFFOFFON
The unused accumulator bits are set to zero
Accumulator
XORF (Y20--Y23)
0000000000001110
Acc.
Acc. 0000000000000000 0000000000000110
1000
C20C21C22C23
OFFONONON
K4C20
Location Constant
XORF Y20
K4
Exclusive Or the binary bit
pattern (Y20--Y23) with the
value in the accumulator.
D
i
r
ec
t
SOFT
STR 1
DSHFT F C 1 0 K 4
OUT SHFT F
OR SHFT F Y 2 0 K 4
C 2 0 K 4
ENT
ENT
ENT
ENT
L
SHFT X
Exclusive Or
Formatted
(XORF)
Standard RLL
Instructions
5--73
Standard RLL Instructions
Accumulator Logical Instructions
DL350 User Manual, 2nd Edition
CMP
A aaa
The compare instruction is a 16 bit
instruction that compares the value in the
lower 16 bits of the accumulator with the
value in a specified V--memory location
(Aaaa). The corresponding status flag
will be turned on indicating the result of
the comparison.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Pointer PAll V mem. (See page 3--29)
Discrete Bit Flags Description
SP60 On when the value in the accumulator is less than the instruction value.
SP61 On when the value in the accumulator is equal to the instruction value.
SP62 On when the value in the accumulator is greater than the instruction
value.
NOTE: The status flags are updated immediately after the instruction is carried out
during the scan of the CPU, therefore, it is only valid until another instruction that
uses the same flags is executed.
In the following example when X1 is on, the constant 4526 will be loaded into the
lower 16 bits of the accumulator using the Load instruction. The value in the
accumulator is compared with the value in V2000 using the Compare instruction.
The corresponding discrete status flag will be turned on indicating the result of the
comparison. In this example, if the value in the accumulator is less than the value
specified in the Compare instruction, SP60 will turn on energizing C30.
Handheld Programmer Keystrokes
V2000
Acc.
Constant
4526
8945
0000 4526
LD
Compare the value in the
accumulator with the value
in V2000
Load the constant value
4526 into the lower 16 bits of
the accumulator
K4526
CMP
X1
V2000
Compared
with
SP60 C30
OUT
DirectSOFT
The unused accumulator
bits are set to zero
STR
$
SHFT ANDST
L3
DSHFT JMP
K4
E5
F2
C6
GENT
SHFT 2
CORST
MCV
P
STR
$SHFT ENT
STRN
SP 6
G0
A
OUT
GX SHFT 2
C3
D0
AENT
1
BENT
2
C0
A0
A0
AENTSHFT
Compare
(CMP)
Standard RLL
Instructions
5--74 Standard RLL Instructions
Accumualtor Logical Instructions
DL350 User Manual, 2nd Edition
CMPD
A aaa
The Compare Double instruction is a
32--bit instruction that compares the
value in the accumulator with the value
(Aaaa), which is either two consecutive
V--memory locations or an 8--digit (max.)
constant. The corresponding status flag
will be turned on indicating the result of
the comparison.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page3--29)
Pointer PAll V mem. (See page 3--29)
Constant K1--FFFFFFFF
Discrete Bit Flags Description
SP60 On when the value in the accumulator is less than the instruction value.
SP61 On when the value in the accumulator is equal to the instruction value.
SP62 On when the value in the accumulator is greater than the instruction
value.
NOTE: The status flags are updated immediately after the instruction is carried out
during the scan of the CPU, therefore, it is only valid until another instruction that
uses the same flags is executed.
In the following example when X1 is on, the value in V2000 and V2001 will be loaded
into the accumulator using the Load Double instruction. The value in the
accumulator is compared with the value in V2010 and V2011 using the CMPD
instruction. The corresponding discrete status flag will be turned on indicating the
result of the comparison. In this example, if the value in the accumulator is less than
the value specified in the Compare instruction, SP60 will turn on energizing C30.
Handheld Programmer Keystrokes
LDD
Compare the value in the
accumulator with the value
in V2010 and V2011
Load the value in V2000 and
V2001 into the accumulator
V2000
CMPD
X1
V2010
Compared
with
SP60 C30
OUT
V2010
Acc.
V2000
7299
5026
4526 7299
V2001
4526
V2011
6739
STR
$
SHFT ANDST
L3
D
SHFT 2
CORST
MCV
P
STR
$SHFT ENT
STRN
SP 6
G0
A
OUT
GX SHFT 2
C3
D0
AENT
3
D
3
D
1
BENT
ENT
2
C0
A0
AENT
2
C0
A0
A0
A
1
B
SHFT
Compare Double
(CMPD)
Standard RLL
Instructions
5--75
Standard RLL Instructions
Accumulator Logical Instructions
DL350 User Manual, 2nd Edition
bbbK
The Compare Formatted compares the
value in the accumulator with a specified
number of discrete locations (1--32). The
instruction requires a starting location
(Aaaa) and the number of bits (Kbbb) to be
compared. The corresponding status flag
will be turned on indicating the result of the
comparison.
CMPF A aaa
Operand Data Type DL350 Range
A/B aaa bbb
Inputs X0--777 -- --
Outputs Y0--777 -- --
Control Relays C0--1777 -- --
Stage Bits S0--1777 -- --
Timer Bits T0--377 -- --
Counter Bits CT 0--177 -- --
Special Relays SP 0--777 -- --
Constant K-- -- 1--32
Discrete Bit Flags Description
SP60 On when the value in the accumulator is less than the instruction value.
SP61 On when the value in the accumulator is equal to the instruction value.
SP62 On when the value in the accumulator is greater than the instruction
value.
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on the Load Formatted instruction loads the
binary value (6) from C10--C13 into the accumulator. The CMPF instruction
compares the value in the accumulator to the value in Y20--Y23 (E hex). The
corresponding discrete status flag will be turned on indicating the result of the
comparison. In this example, if the value in the accumulator is less than the value
specified in the Compare instruction, SP60 will turn on energizing C30.
K4C10
Location Constant C10C11C12C13
OFFONONOFF
The unused accumulator
bits are set to zero
Y20Y21Y22Y23
OFFONONON
Compared
with
Acc. 0000 0006
E
LDF
Compare the value in the
accumulator with the value
of the specified discrete
location (Y20--Y23)
Load the value of the
specified discrete locations
(C10--C13) into the
accumulator
C10
K4
CMPF
X1
Y20
K4
SP60 C30
OUT
DirectSOFT
Compare
Formatted
(CMPF)
Standard RLL
Instructions
5--76 Standard RLL Instructions
Accumualtor Logical Instructions
DL350 User Manual, 2nd Edition
CMPR
A aaa
The Compare Real Number instruction
compares a real number value in the
accumulator with two consecutive
V--memory locations containing a real
number. The corresponding status flag will
be turned on indicating the result of the
comparison. Both numbers being
compared are 32 bits long.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See p. 3--29)
Pointer PAll (See p. 3--29)
Constant R--3.402823E+038 to
+ --3.402823E+038
Discrete Bit Flags Description
SP60 On when the value in the accumulator is less than the instruction value.
SP61 On when the value in the accumulator is equal to the instruction value.
SP62 On when the value in the accumulator is greater than the instruction
value.
SP71 On anytime the V-memory specified by a pointer (P) is not valid.
SP75 On when a real number instruction is executed and a non--real number
was encountered.
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example when X1 is on, the LDR instruction loads the real number
representation for 7 decimal into the accumulator. The CMPR instruction compares
the accumulator contents with the real representation for decimal 6. Since 7 > 6, the
corresponding discrete status flag is turned on (special relay SP60).
LDR
Compare the value with the
real number representation
for decimal 6.
Load the real number
representation for decimal 7
into the accumulator.
R7.0
CMPR
X1
R6.0
SP60 C1
OUT
CMPR
0000
40D0 0000
40E0
DirectSOFT
Acc.
Compare Real
Number
(CMPR)
Standard RLL
Instructions
5--77
Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
Math Instructions
ADD
A aaa
Add is a 16 bit instruction that adds a
BCD value in the accumulator with a
BCD value in a V--memory location
(Aaaa). The result resides in the
accumulator. You cannot use a constant
as the parameter in the box.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Pointer PAll V mem. (See page 3--29)
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP66 On when the 16 bit addition instruction results in a carry.
SP67 On when the 32 bit addition instruction results in a carry.
SP70 On anytime the value in the accumulator is negative.
SP75 On when a BCD instruction is executed and a NON--BCD number was encountered.
NOTE: The status flags are only valid until another instruction that uses the same
flags is executed.
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in the lower 16 bits of the
accumulator are added to the value in V2006 using the Add instruction. The value in
the accumulator is copied to V2010 using the Out instruction.
DirectSOFT
Handheld Programmer Keystrokes
LD
V2000
X1
Load the value in V2000 into
the lower 16 bits of the
accumulator
ADD
V2006
Addthevalueinthelower
16 bits of the accumulator
withthevalueinV2006
OUT
V2010
Copy the value in the lower
16 bits of the accumulator to
V2010
V2010
V2000
4935
7435
0000 4935
+2500
Acc. 7435
(V2006)
(Accumulator)
The unused accumulator
bits are set to zero
SHFT ANDST
L3
D
STR
$
SHFT 0
A3
D3
D
OUT
GX SHFT AND
V2
C0
A1
B0
AENT
1
BENT
2
C0
A0
A0
AENT
2
C0
A0
AENT
6
G
Add
(ADD)
Standard RLL
Instructions
5--78 Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
ADDD
A aaa
Add Double is a 32 bit instruction that
adds the BCD value in the accumulator
with a BCD value (Aaaa), which is either
two consecutive V--memory locations or
an 8--digit (max.) BCD constant. The
result resides in the accumulator.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Pointer PAll V mem. (See page 3--29)
Constant K0--99999999
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP66 On when the 16 bit addition instruction results in a carry.
SP67 On when the 32 bit addition instruction results in a carry.
SP70 On anytime the value in the accumulator is negative.
SP75 On when a BCD instruction is executed and a NON--BCD number was encountered.
NOTE: The status flags are only valid until another instruction that uses the same
flags is executed.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded
into the accumulator using the Load Double instruction. The value in the
accumulator is added with the value in V2006 and V2007 using the Add Double
instruction. The value in the accumulator is copied to V2010 and V2011 using the
Out Double instruction.
6739 5026
DirectSOFT
Handheld Programmer Keystrokes
LDD
V2000
X1
Load the value in V2000 and
V2001 into the accumulator
ADDD
V2006
Addthevalueinthe
accumulator with the value
in V2006 and V2007
OUTD
V2010
Copy the value in the
accumulator to V2010 and
V2011
V2010
V2000
5026
9072
V2001
6739
V2011
8739
(V2006 and V2007)
(Accumulator)
2000 4046
+
90728739
Acc.
STR
$1
B
SHFT 0
A3
D3
D
SHFT ANDST
L3
D3
D
3
D
OUT
GX SHFT 3
DAND
V2
C0
A1
B0
AENTSHFT
ENT
2
C0
A0
AENT
6
G
2
C0
A0
A0
AENT
Add Double
(ADDD)
Standard RLL
Instructions
5--79
Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
ADDR
A aaa
Add Real is a 32--bit instruction that adds a
real number, which is either two
consecutive V--memory locations or a
32--bit constant, to a real number in the
accumulator. Both numbers must conform
to the IEEE floating point format. The
result is a 32--bit real number that resides
in the accumulator.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See p. 3--29)
Pointer PAll V mem (See p. 3--29)
Constant R--3.402823E+038 to
+3.402823E+038
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative.
SP71 On anytime the V-memory specified by a pointer (P) is not valid.
SP72 On anytime the value in the accumulator is an invalid floating point number.
SP73 on when a signed addition or subtraction results in a incorrect sign bit.
SP74 On anytime a floating point math operation results in an underflow error.
SP75 On when a real number instruction is executed and a non-real number was
encountered.
NOTE: Status flags are valid only until another instruction uses the same flag.
LDR
R7.0
X1
Load the real number 7.0
into the accumulator
ADDR
R15.0
Add the real number 15.0 to
the accumulator contents,
which is in real number
format.
00000000000000000100000110110000
8421842184218421
8421842184218421
Acc.
41B0 0000
V1400V1401
Real Value
Copy the result in the accumulator
to V1400 and V1401.
OUTD
V1400
Implies 2 (exp 4)
131 -- 127 = 4
(Hex number)
Mantissa (23 bits)Sign Bit
40E0 0000
000040E0
(ADDR)
(Accumulator)
4170 0000+
000041B0
Acc.
7(decimal)
+15
22
1.011 x 2 (exp 4) = 10110. binary= 22 decimal128 + 2 + 1 = 131
Exponent (8 bits)
NOTE: The current HPP does not support real number entry with automatic
conversion to the 32-bit IEEE format. You must use DirectSOFT for this feature.
Add Real
(ADDR)
Standard RLL
Instructions
5--80 Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
SUB
A aaa
Subtract is a 16 bit instruction that
subtracts the BCD value (Aaaa) in a
V--memory location from the BCD value
in the lower 16 bits of the accumulator
The result resides in the accumulator.
You cannot use a constant as the
parameter in the box.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Pointer PAll V mem. (See page 3--29)
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP64 On when the 16 bit subtraction instruction results in a borrow.
SP65 On when the 32 bit subtraction instruction results in a borrow.
SP70 On anytime the value in the accumulator is negative.
SP75 On when a BCD instruction is executed and a NON--BCD number was encountered.
NOTE: The status flags are only valid until another instruction that uses the same
flags is executed.
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in V2006 is subtracted from the
value in the accumulator using the Subtract instruction. The value in the accumulator
is copied to V2010 using the Out instruction.
DirectSOFT
Handheld Programmer Keystrokes
LD
V2000
X1
Load the value in V2000 into
the lower 16 bits of the
accumulator
SUB
V2006
Subtract the value in V2006
from the value in the lower
16 bits of the accumulator
OUT
V2010
Copy the value in the lower
16 bits of the accumulator to
V2010
V2010
02
1(V2006)
(Accumulator)
2
0
0
y
V2000
475
883
000 475
592
Acc. 883
The unused accumulator
bits are set to zero
SHFT ANDST
L3
D
STR
$
SHFT SHFT AND
V2
C0
A0
AENT
6
G
OUT
GX SHFT AND
V2
C0
A1
B0
AENT
RST
SISG
U1
B
1
BENT
2
C0
A0
A0
AENT
Subtract
(SUB)
Standard RLL
Instructions
5--81
Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
SUBD
A aaa
Subtract Double is a 32 bit instruction that
subtracts the BCD value (Aaaa), which is
either two consecutive V--memory
locations or an 8-digit (max.) constant,
from the BCD value in the accumulator.
The result resides in the accumulator.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Pointer PAll V mem. (See page 3--29)
Constant K0--99999999
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP64 On when the 16 bit subtraction instruction results in a borrow.
SP65 On when the 32 bit subtraction instruction results in a borrow.
SP70 On anytime the value in the accumulator is negative.
SP75 On when a BCD instruction is executed and a NON--BCD number was encountered.
NOTE: The status flags are only valid until another instruction that uses the same
flags is executed.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded
into the accumulator using the Load Double instruction. The value in V2006 and
V2007 is subtracted from the value in the accumulator. The value in the accumulator
is copied to V2010 and V2011 using the Out Double instruction.
DirectSOFT
Handheld Programmer Keystrokes
LDD
V2000
X1
Load the value in V2000 and
V2001 into the accumulator
SUBD
V2006
The in V2006 and V2007 is
subtracted from the value in
the accumulator
OUTD
V2010
Copy the value in the
accumulator to V2010 and
V2011
8990039
2740106
(Accumulator)
y
0 1 0 6 3 2 7 4
0
(V2006 and V2007)
V2010
0
3
V2000
899
V2001
V2011
0039
67 2375
ACC.
STR
$
SHFT
SHFT ANDST
L3
D3
D
3
D
OUT
GX SHFT 3
D
RST
SISG
U1
B
1
BENT
2
C0
A0
AENT
6
G
2
C0
A0
A0
AENT
2
C0
A1
B0
AENT
SHFT
Subtract Double
(SUBD)
Standard RLL
Instructions
5--82 Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
SUBR
A aaa
Subtract Real is a 32--bit instruction that
subtracts a real number, which is either
two consecutive V--memory locations or a
32--bit constant, from a real number in the
accumulator. Both numbers must conform
to the IEEE floating point format. The
result is a 32--bit real number that resides
in the accumulator.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See p. 3--29)
Pointer PAll V mem (See p. 3--29)
Constant R--3.402823E+038 to
+3.402823E+038
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative.
SP71 On anytime the V-memory specified by a pointer (P) is not valid.
SP72 On anytime the value in the accumulator is a valid floating point number.
SP73 on when a signed addition or subtraction results in a incorrect sign bit.
SP74 On anytime a floating point math operation results in an underflow error.
SP75 On when a real number instruction is executed and a non-real number was
encountered.
NOTE: Status flags are valid only until another instruction uses the same flag.
LDR
R22.0
X1
Load the real number 22.0
into the accumulator.
SUBR
R15.0
Subtract the real number
15.0 from the accululator
contents, which is in real
number format.
00000000000000000100000011100000
8421842184218421
8421842184218421
Acc.
40E0 0000
V1400V1401
Real Value
Copy the result in the accumulator
to V1400 and V1401.
OUTD
V1400
Implies 2 (exp 2)
129 -- 127 = 2
(Hex number)
Mantissa (23 bits)Sign Bit
41B0 0000
000041B0
(SUBR)
(Accumulator)
4170 0000+
000040E0
Acc.
22 (decimal)
-- 1 5
7
1.11 x 2 (exp 2) = 111. binary= 7 decimal128 + 1 = 129
Exponent (8 bits)
DirectSOFT Display
NOTE: The current HPP does not support real number entry with automatic
conversion to the 32-bit IEEE format. You must use DirectSOFT for this feature.
Subtract Real
(SUBR)
Standard RLL
Instructions
5--83
Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
MUL
A aaa
Multiply is a 16 bit instruction that
multiplies the BCD value (Aaaa), which is
either a V--memory location or a 4--digit
(max.) constant, by the BCD value in the
lower 16 bits of the accumulator The
result can be up to 8 digits and resides in
the accumulator.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Pointer PAll V mem. (See page 3--29)
Constant K0--9999
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative.
SP75 On when a BCD instruction is executed and a NON--BCD number was encountered.
NOTE: The status flags are only valid until another instruction that uses the same
flags is executed.
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in V2006 is multiplied by the value
in the accumulator. The value in the accumulator is copied to V2010 and V2011
using the Out Double instruction.
DirectSOFT
Handheld Programmer Keystrokes
LD
V2000
X1
Load the value in V2000 into
the lower 16 bits of the
accumulator
MUL
V2006
The value in V2006 is
multiplied by the value in the
accumulator
OUTD
V2010
Copy the value in the
accumulator to V2010 and
V2011
0000002
000
(Accumulator)
¢
0 0 0 0 1 0 0 0
5
(V2006)
V2010
5
1
V2000
000
V2011
0002
25
The unused accumulator
bits are set to zero
Acc.
STR
$
SHFT ANDST
L3
D
SHFT ORST
MISG
UANDST
L
OUT
GX SHFT 3
D
1
BENT
2
C0
A0
A0
AENT
2
C0
A0
AENT
6
G
2
C0
A1
B0
AENT
Multiply
(MUL)
Standard RLL
Instructions
5--84 Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
MULD
A aaa
Multiply Double is a 32 bit instruction that
multiplies the 8-digit BCD value in the
accumulator by the 8-digit BCD value in
the two consecutive V-memory locations
specified in the instruction. You cannot
use a constant as the parameter in the
box. The lower 8 digits of the results reside
in the accumulator. Upper digits of the
result reside in the accumulator stack.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See p. 3--29)
Pointer P-- --
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative.
SP75 On when a BCD instruction is executed and a NON--BCD number was encountered.
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the constant Kbc614e hex will be loaded
into the accumulator. When converted to BCD the number is ”12345678”. That
numberis stored in V1400 and V1401. After loading the constant K2 into the
accumulator, we multiply it times 12345678, which is 24691356.
DirectSOFT Display
Handheld Programmer Keystrokes
LDD
Kbc614e
X1 Load the hex equivalent
of 12345678 decimal into
the accumulator.
BCD Convert the value to
BCD format. It will
occupy eight BCD digits
(32 bits).
OUTD
V1400
Output the number to
V1400 and V1401 using
the OUTD instruction. 3562469
678
(Accumulator)
¢
1 2 3 4 5 6 7 8
1
(Accumulator)
V1500
1
5
V1400
356
V1403
2469
2
14
B(H) 6
Acc.
SHFT C(H)
BSHFT
2341
V1401
STR 1 L
ENT
ENT SHFT D D
KSHFT
C D ENT
OUT V 1 4 0SHFT D 0 ENT
Multiply Double
(MULD)
Standard RLL
Instructions
5--85
Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
MULR
A aaa
The Multiply Real instruction multiplies a
real number in the accumulator with either
a real constant or a real numberoccupying
two consecutive V-memory locations. The
result resides in the accumulator. Both
numbers must conform to the IEEE
floating point format.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See p. 3--29)
Pointer PAll (See p. 3--29)
Constant R--3.402823E+038 to
+3.402823E+038
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative.
SP71 On anytime the V-memory specified by a pointer (P) is not valid.
SP72 On anytime the value in the accumulator is a valid floating point number.
SP73 on when a signed addition or subtraction results in a incorrect sign bit.
SP74 On anytime a floating point math operation results in an underflow error.
SP75 On when a real number instruction is executed and a non-real number was
encountered.
NOTE: Status flags are valid only until another instruction uses the same flag.
DirectSOFT Display
LDR
R7.0
X1
Load the real number 7.0
into the accumulator.
MULR
R 15.0
Multiply the accumulator
contents by the real number
15.0
00000000000000000100001011010010
8421842184218421
8421842184218421
Acc.
42D2 0000
V1400V1401
Real Value
Copy the result in the accumulator
to V1400 and V1401.
OUTD
V1400
Implies 2 (exp 6)
133 -- 127 = 6
(Hex number)
Mantissa (23 bits)Sign Bit
40E0 0000
000040E0
(MULR)
(Accumulator)
4170 0000+
000042D2
Acc.
7(decimal)
x15
105
1.101001 x 2 (exp 6) = 1101001. binary= 105 decimal128 + 4 + 1 = 133
Exponent (8 bits)
NOTE: The current HPP does not support real number entry with automatic
conversion to the 32-bit IEEE format. You must use DirectSOFT for this feature.
Multiply Real
(MULR)
Standard RLL
Instructions
5--86 Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
DIV
A aaa
Divide is a 16 bit instruction that divides
the BCD value in the accumulator by a
BCD value (Aaaa), which is either a
V--memory location or a 4-digit (max.)
constant. The first part of the quotient
resides in the accumulator and the
remainder resides in the first stack
location.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Pointer PAll V mem. (See page 3--29)
Constant K0--9999
Discrete Bit Flags Description
SP53 On when the value of the operand is larger than the accumulator can work with.
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative.
SP75 On when a BCD instruction is executed and a NON--BCD number was encountered.
NOTE: The status flags are only valid until another instruction that uses the same
flags is executed.
In the following example, when X1 is on, the value in V2000 will be loaded into the
accumulator using the Load instruction. The value in the accumulator will be divided
by the value in V2006 using the Divide instruction. The value in the accumulator is
copied to V2010 using the Out instruction.
DirectSOFT
Handheld Programmer Keystrokes
LD
V2000
X1
Load the value in V2000 into
the lower 16 bits of the
accumulator
DIV
V2006
The value in the
accumulator is divided by
the value in V2006
OUT
V2010
Copy the value in the lower
16 bits of the accumulator to
V2010
V2010
5
(V2006)
(Accumulator)
0
5
V2000
000
100
000 000
50
Acc. 100
The unused accumulator
bits are set to zero
0000000 0
First stack location contains
the remainder
STR
$
SHFT ANDST
L3
D
SHFT 3
D8
IAND
V
OUT
GX SHFT AND
V2
C0
A1
B0
AENT
1
BENT
2
C0
A0
A0
AENT
2
C0
A0
AENT
6
G
Divide
(DIV)
Standard RLL
Instructions
5--87
Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
DIVD
A aaa
Divide Double is a 32 bit instruction that
divides the BCD value in the accumulator
by a BCD value (Aaaa), which must be
obtained from two consecutive V--memory
locations. You cannot use a constant as
the parameter in the box. The first part of
the quotient resides in the accumulator
and the remainder resides in the first stack
location.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See p. 3--29)
Pointer PAll (See p. 3--29)
Discrete Bit Flags Description
SP53 On when the value of the operand is larger than the accumulator can work with.
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative.
SP75 On when a BCD instruction is executed and a NON--BCD number was encountered.
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded
into the accumulator using the Load Double instruction. The value in the
accumulator is divided by the value in V1420 and V1421 using the Divide Double
instruction. The first part of the quotient resides in the accumulator an the remainder
resides in the first stack location. The value in the accumulator is copied to V1500
and V1501 using the Out Double instruction.
DirectSOFT Display
Handheld Programmer Keystrokes
LDD
V1400
X1
Load the value in V1400 and
V1401 into the accumulator
DIVD
V1420
The value in the accumulator
is divided by the value in
V1420 and V1421
OUTD
V1500
Copy the value in the
accumulator to V1500
and V1501
00
OUT V 5 0 0
V 01 4 2
1
SHFT D
SHFT
0000003
0000150
0(Accumulator)
(V1421 and V1420)
0
0
150 0000
0
V1500
V1400
0
000
V1401
V1501
0003
000 0050
0000000 0
First stack location contains
the remainder
The unused accumulator
bits are set to zero
Acc.
1 4
STR 1 L
ENT
ENT SHFT D D
V
I V
D
ENT
ENT
Divide Double
(DIVD)
Standard RLL
Instructions
5--88 Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
DIVR
A aaa
The Divide Real instruction divides a real
number in the accumulator by either a real
constant or a real number occupying two
consecutive V-memory locations. The
result resides in the accumulator. Both
numbers must conform to the IEEE
floating point format.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See p. 3--29)
Pointer PAll (See p. 3--29)
Constant R--3.402823E+038 to
+3.402823E+038
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative.
SP71 On anytime the V-memory specified by a pointer (P) is not valid.
SP72 On anytime the value in the accumulator is a valid floating point number.
SP73 on when a signed addition or subtraction results in a incorrect sign bit.
SP74 On anytime a floating point math operation results in an underflow error.
SP75 On when a real number instruction is executed and a non-real number was
encountered.
NOTE: Status flags are valid only until another instruction uses the same flag.
DirectSOFT Display
LDR
R15.0
X1
Load the real number 15.0
into the accumulator.
DIVR
R10.0
Divide the accumulator contents
by the real number 10.0.
00000000000000000011111111000000
8421842184218421
8421842184218421
Acc.
3FC0 0000
V1400V1401
Real Value
Copy the result in the accumulator
to V1400 and V1401.
OUTD
V1400
Implies 2 (exp 0)
127 -- 127 = 0
(Hex number)
Mantissa (23 bits)Sign Bit
4170 0000
00004170
(DIVR)
(Accumulator)
4120 0000÷
00003FC0
Acc.
15 (decimal)
10
1
1.1 x 2 (exp 0) = 1.1 binary= 1.5 decimal64+32+16+8+4+2+1=127
Exponent (8 bits)
÷
5
.
NOTE: The current HPP does not support real number entry with automatic
conversion to the 32-bit IEEE format. You must use DirectSOFT for this feature.
Divide Real
(DIVR)
Standard RLL
Instructions
5--89
Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
A aaa
INC
The Increment instruction increments a
BCD value in a specified V--memory
location by “1” each time the instruction is
executed.
A aaa
DEC
The Decrement instruction decrements a
BCD value in a specified V--memory
location by “1” each time the instruction is
executed.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See p. 3--29)
Pointer PAll (See p. 3--29)
Discrete Bit Flags Description
SP63 on when the result of the instruction causes the value in the accumulator to be zero.
SP75 on when a BCD instruction is executed and a NON--BCD number was encountered.
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following increment example, when C5 is on the value in V1400 increases by
one.
Handheld Programmer Keystrokes
C5 INC
V1400
Increment the value in
V1400 by “1”.
STR C 5
41SHFT I N VC 0 0
V1400
8935
V1400
8936
ENT
ENT
X1
(PD )
C5
In the following decrement example, when C5 is on the value in V1400 is decreased
by one.
Handheld Programmer Keystrokes
C5 DEC
V1400
Decrement the value in
V1400 by “1”.
STR C 5
41SHFT D E VC 0 0
V1400
8935
V1400
8934
ENT
ENT
X1
(PD )
C5
Increment
(INC)
Decrement
(DEC)
Standard RLL
Instructions
5--90 Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
ADDB
A aaa
Add Binary is a 16 bit instruction that adds
the binary value in the lower 16 bits of the
accumulator with a binary value (Aaaa),
which is either a V--memory location or a
16-bit constant. The result can be up to 32
bits and resides in the accumulator.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See p. 3--29)
Pointer PAll V mem (See p. 3--29)
Constant K0--FFFF
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP66 On when the 16 bit addition instruction results in a carry.
SP67 On when the 32 bit addition instruction results in a carry.
SP70 On anytime the value in the accumulator is negative.
SP73 On when a signed addition or subtraction results in a incorrect sign bit.
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The binary value in the accumulator will be
added to the binary value in V1420 using the Add Binary instruction. The value in the
accumulator is copied to V1500 and V1501 using the Out instruction.
DirectSOFT Display
Handheld Programmer Keystrokes
LD
V1400
X1
Load the value in V1400 into the
lower 16 bits of the accumulator
ADDB
V1420
The binary value in the
accumulator is added to the
binary value in V1420
OUTD
V1500
Copy the value in the lower
16 bits of the accumulator to
V1500 and V1501
V1500
(V1420)+1
1
(Accumulator)
00
1
0
V1400
A05
CC9
000 A05
2C4
Acc. CC9
STR X(IN) 1
D V 1 4 0 0
OUT V 1 5 0 0
V 1 4 0
A2
SHFT B
The unused accumulator
bits are set to zero
SHFT D
ENT
SHFT LENT
D D ENT
ENT
Add Binary
(ADDB)
Standard RLL
Instructions
5--91
Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
SUBB
A aaa
Subtract Binary is a 16 bit instruction that
subtracts the binary value (Aaaa), which is
either a V--memory location or a 4--digit
(max.) binary constant, from the binary
value in the accumulator. The result
resides in the accumulator.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See p. 3--29)
Pointer PAll (See p. 3--29)
Constant K0--FFFF
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP64 On when the 16 bit subtraction instruction results in a borrow.
SP65 On when the 32 bit subtraction instruction results in a borrow.
SP70 On anytime the value in the accumulator is negative.
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The binary value in V1420 is subtracted
from the binary value in the accumulator using the Subtract Binary instruction. The
value in the accumulator is copied to V1500 using the Out instruction.
DirectSOFT Display
Handheld Programmer Keystrokes
LD
V1400
X1
Load the value in V1400 into the
lower 16 bits of the accumulator
SUBB
V1420
The binary value in V1420 is
subtracted from the value in
the accumulator
OUT
V1500
Copy the value in the lower 16
bits of the accumulator to V1500
V1500
(V1420)
0
y
1(Accumulator)
0
1
0
0
V1400
024
619
000 024
A0B
Acc. 619
The unused accumulator
bits are set to zero
STR X(IN) 1
D V 1 4 0 0
OUT V 1 5 0 0
V 1 4 0
S
2
SHFT B
SHFT D
ENT
SHFT LENT
U B
ENT
ENT
SHFT
Subtract Binary
(SUBB)
Standard RLL
Instructions
5--92 Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
MULB
A aaa
Multiply Binary is a 16 bit instruction that
multiplies the binary value (Aaaa), which
is either a V--memory location or a 4--digit
(max.) binary constant, by the binary value
in the accumulator. The result can be up to
32 bits and resides in the accumulator.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See p. 3--29)
Pointer PAll (See p. 3--29)
Constant K0--FFFF
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative.
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The binary value in V1420 is multiplied by
the binary value in the accumulator using the Multiply Binary instruction. The value in
the accumulator is copied to V1500 using the Out instruction.
DirectSOFT Display
Handheld Programmer Keystrokes
LD
V1400
X1
Load the value in V1400 into the
lower 16 bits of the accumulator
MULB
V1420
The binary value in V1420 is
multiplied by the binary
value in the accumulator
OUTD
V1500
Copy the value in the lower
16 bits of the accumulator to
V1500 and V1501
¢
0(Accumulator)
0
0
0
(V1420)
V1400
A01
000 A01
02E
The unused accumulator
bits are set to zero
2E0001 C
C
C
V1500
C2E
V1501
0001
Acc.
STR X 1
D V 1 4 0 0
OUT V 1 5 0 0
V 1 4 0
M2
SHFT B
SHFT D
ENT
SHFT LENT
U L ENT
ENT
Multiply Binary
(MULB)
Standard RLL
Instructions
5--93
Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
DIVB
A aaa
Divide Binary is a 16 bit instruction that
divides the binary value in the
accumulator by a binary value (Aaaa),
which is either a V--memory location or a
16--bit (max.) binary constant. The first
part of the quotient resides in the
accumulator and the remainder resides in
the first stack location.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See p. 3--29)
Pointer PAll (See p. 3--29)
Constant K0--FFFF
Discrete Bit Flags Description
SP53 On when the value of the operand is larger than the accumulator can work with.
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative.
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The binary value in the accumulator is
divided by the binary value in V1420 using the Divide Binary instruction. The value in
the accumulator is copied to V1500 using the Out instruction.
DirectSOFT Display
Handheld Programmer Keystrokes
LD
V1400
X1
Load the value in V1400 into the
lower 16 bits of the accumulator
DIVB
V1420
The binary value in the
accumulator is divided by
the binary value in V1420
OUT
V1500
Copy the value in the lower 16
bits of the accumulator to V1500
V1500
0(Accumulator)
F
0
0
F
(V1420)
0
V1400
A01
320
000 A01
050
Acc. 320
The unused accumulator
bits are set to zero
0000000 0
First stack location contains
the remainder
STR X 1
D V 1 4 0 0
OUT V 1 5 0 0
V 1 4 0
D2
SHFT B
SHFT D
ENT
SHFT LENT
I V ENT
ENT
Divide Binary
(DIVB)
Standard RLL
Instructions
5--94 Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
A aaa
INCB
The Increment Binary instruction
increments a binary value in a specified
V--memory location by “1” each time the
instruction is executed.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Pointer PAll V mem. (See page 3--29)
Discrete Bit Flags Description
SP63 on when the result of the instruction causes the value in the accumulator to be zero.
NOTE: The status flags are only valid until another instruction that uses the same
flags is executed.
In the following example when C5 is on, the binary value in V2000 is increased by 1.
Handheld Programmer Keystrokes
DirectSOFT
C5 INCB
V2000
Increment the binary value
in the accumulator by“1”
V2000
4A3C
V2000
4A3D
STR
$2
C5
F
SHFT ENT
SHFT 8
ITMR
N2
C1
B2
C0
A0
A0
AENT
Increment Binary
(INCB)
Standard RLL
Instructions
5--95
Standard RLL Instructions
Math Instructions
DL350 User Manual, 2nd Edition
A aaa
DECB
The Decrement Binary instruction
decrements a binary value in a specified
V--memory location by “1” each time the
instruction is executed.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Pointer PAll V mem. (See page 3--29)
Discrete Bit Flags Description
SP63 on when the result of the instruction causes the value in the accumulator to be zero.
NOTE: The status flags are only valid until another instruction that uses the same
flags is executed.
In the following example when C5 is on, the value in V2000 is decreased by 1.
Handheld Programmer Keystrokes
DirectSOFT
C5 DECB
V2000
Decrement the binary value
in the accumulator by“1”
V2000
4A3C
V2000
4A3B
STR
$2
C5
F
SHFT ENT
SHFT 2
C
3
D4
E1
B2
C0
A0
A0
AENT
Decrement Binary
(DECB)
Standard RLL
Instructions
5--96 Standard RLL Instructions
Bit Operation Instructions
DL350 User Manual, 2nd Edition
Bit Operation Instructions
SUM
The Sum instruction counts number of bits
that are set to “1” in the accumulator. The
HEX result resides in the accumulator.
In the following example, when X1 is on, the value formed by discrete locations
X10--X17 is loaded into the accumulator using the Load Formatted instruction. The
number of bits in the accumulator set to “1” is counted using the Sum instruction. The
value in the accumulator is copied to V1500 using the Out instruction.
K
Handheld Programmer Keystrokes
DirectSOFT Display
LDF X10
K8
X1
Load the value represented by
discrete locations X10--X17
into the accumulator
SUM
Sum the number of bits in
the accumulator set to “1”
OUT
V1500
Copy the value in the lower
16 bits of the accumulator
to V1500
X10X11X12X13
ONONOFFON
X14X15X16X17
OFFOFFONON
00000000110010110000000000000000
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
V1500
Acc.
0005
0000 0005
STR 1
LSHFT F X 1 0
S U MSHFT
V 1 5 0OUT 0
The unused accumulator
bits are set to zero
8
ENT
DENT
ENT
SHFT
X
Sum
(SUM)
Standard RLL
Instructions
5--97
Standard RLL Instructions
Bit Operation Instructions
DL350 User Manual, 2nd Edition
SHFL
A aaa
Shift Left is a 32 bit instruction that shifts
the bits in the accumulator a specified
number (Aaaa) of places to the left. The
vacant positions are filled with zeros and
the bits shifted out of the accumulator are
lost.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Constant K1--32
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded
into the accumulator using the Load Double instruction. The bit pattern in the
accumulator is shifted 2 bits to the left using the Shift Left instruction. The value in the
accumulator is copied to V2010 and V2011 using the Out Double instruction.
2
CENT
Handheld Programmer Keystrokes
DirectSOFT
LDD
V2000
X1
Load the value in V2000 and
V2001 into the accumulator
SHFL
K2
The bit pattern in the
accumulator is shifted 2 bit
positions to the left
OUTD
V2010
Copy the value in the
accumulator to V2010 and
V2011
0011000100000001
V2010
11000100000001000000010000000000
151413121110987654321031 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C404
S S S S
1001110000010100
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0110011100000101
1514131211109876543210
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
Acc.
V2011
9C14
6705 3101
Shifted out of the
accumulator
V2000V2001
STR
$
SHFT ANDST
L3
D3
D
SHFT RST
S7
H5
FANDST
L
OUT
GX SHFT 3
D
1
BENT
2
C0
A0
A0
AENT
2
C0
A1
B0
AENT
SHFT
Shift Left
(SHFL)
Standard RLL
Instructions
5--98 Standard RLL Instructions
Bit Operation Instructions
DL350 User Manual, 2nd Edition
SHFR
A aaa
Shift Right is a 32 bit instruction that shifts
the bits in the accumulator a specified
number (Aaaa) of places to the right. The
vacant positions are filled with zeros and
the bits shifted out of the accumulator are
lost.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Constant K1--32
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded
into the accumulator using the Load Double instruction. The bit pattern in the
accumulator is shifted 2 bits to the right using the Shift Right instruction. The value in
the accumulator is copied to V2010 and V2011 using the Out Double instruction.
Handheld Programmer Keystrokes
D
i
r
ec
t
SOFT
LDD
V2000
X1
Load the value in V2000 and
V2001 into the accumulator
SHFR
K2
The bit pattern in the
accumulator is shifted 2 bit
positions to the right
OUTD
V2010
Copy the value in the
accumulator to V2010 and
V2011
0011000100000001
V2010
01001100010000000000010000000000
151413121110987654321031 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
4C40
S S S S
0001100111000001
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0110011100000101
1514131211109876543210
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
Acc.
V2011
19C1
Constant 6705 3101
Shifted out of the
accumulator
V2001 V2000
STR
$
SHFT ANDST
L3
D3
D
SHFT RST
S7
H5
F2
CENT
OUT
GX SHFT 3
D
ORN
R
SHFT
1
BENT
2
C0
A0
A0
AENT
2
C0
A1
B0
AENT
Shift Right
(SHFR)
Standard RLL
Instructions
5--99
Standard RLL Instructions
Bit Operation Instructions
DL350 User Manual, 2nd Edition
ROTL
A aaa
Rotate Left is a 32 bit instruction that rotates
the bits in the accumulator a specified
number (Aaaa) of places to the left.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See p. 3--29)
Constant K1--32
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded
into the accumulator using the Load Double instruction. The bit pattern in the
accumulator is rotated 2 bit positions to the left using the Rotate Left instruction. The
value in the accumulator is copied to V1500 and V1501 using the Out Double
instruction.
Handheld Programmer Keystrokes
DirectSOFT Display
LDD
V1400
X1
Load the value in V1400 and
V1401 into the accumulator
ROTL
K2
The bit pattern in the
accumulator is rotated 2
bit positions to the left
OUTD
V1500
Copy the value in the
accumulator to V1500
and V1501
0011000100000001
V1500
11000100000001010000010000000000
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 031 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C405
SSSS
1001110000010100
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0110011100000101
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
Acc.
V1501
9C14
6705 3101
V1400
V 1 0
D
SHFT L K
SHFT D 5 0
R O T 2
V1400V1401
STR 1
LSHFT
OUT
ENT
D
ENT
ENT
X
Rotate Left
(ROTL)
Standard RLL
Instructions
5--100 Standard RLL Instructions
Bit Operation Instructions
DL350 User Manual, 2nd Edition
ROTR
A aaa
Rotate Right is a 32 bit instruction that
rotates the bits in the accumulator a
specified number (Aaaa) of places to the
right.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See p. 3--29)
Constant K1--32
In the following example, when X1 is on, the value in V1400 and V1401 will be loaded
into the accumulator using the Load Double instruction. The bit pattern in the
accumulator is rotated 2 bit positions to the right using the Rotate Right instruction.
The value in the accumulator is copied to V1500 and V1501 using the Out Double
instruction.
Handheld Programmer Keystrokes
DirectSOFT Display
LDD
V1400
X1
Load the value in V1400 and
V1401 into the accumulator
ROTR
K2
The bit pattern in the
accumulator is rotated 2
bit positions to the right
OUTD
V1500
Copy the value in the
accumulator to V1500
and V1501
0011000100000001
V1500
01001100010000000000010000000000
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 031 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
4C40
S S S S
0101100111000001
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0110011100000101
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
Acc.
V1501
59C1
6705 3101
V1400V1401
V1400
V 1 0
D
SHFT R K
SHFT D 5 0
R O T 2
STR 1
LSHFT
OUT
ENT
D
ENT
ENT
X
Rotate Right
(ROTR)
Standard RLL
Instructions
5--101
Standard RLL Instructions
Bit Operation Instructions
DL350 User Manual, 2nd Edition
ENCO
The Encode instruction encodes the bit
position in the accumulator having a value
of 1, and returns the appropriate binary
representation. If the most significant bit is
set to 1 (Bit 31), the Encode instruction
would place the value HEX 1F (decimal
31) in the accumulator. If the value to be
encoded is 0000 or 0001, the instruction
will place a zero in the accumulator. If the
value to be encoded has more than one bit
position set to a “1”, the least significant “1”
will be encoded and SP53 will be set on.
Discrete Bit Flags Description
SP53 On when the value of the operand is larger than the accumulator can work
with.
NOTE: The status flags are only valid until another instruction that uses the same
flags is executed.
In the following example, when X1 is on, The value in V2000 is loaded into the
accumulator using the Load instruction. The bit position set to a “1” in the
accumulator is encoded to the corresponding 5 bit binary value using the Encode
instruction. The value in the lower 16 bits of the accumulator is copied to V2010
using the Out instruction.
Handheld Programmer Keystrokes
D
i
r
ec
t
SOFT
LD
V2000
X1
Load the value in V2000 into
the lower 16 bits of the
accumulator
ENCO
Encode the bit position set
to “1” in the accumulator to a
5 bit binary value
00010000000000000000000000000000
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
00000000000011000000000000000000
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
V2000
1000
Bit postion 12 is
converted
to binary
Copy the value in the lower 16 bits
of the accumulator to V2010
OUT
V2010
V2010
000C
Binary value
for 12.
STR
$1
BENT
SHFT
OUT
GX SHFT AND
V2
C0
A1
B0
AENT
4
ETMR
N2
CINST#
OENT
SHFT ANDST
L3
D2
C0
A0
A0
AENT
Encode
(ENCO)
Standard RLL
Instructions
5--102 Standard RLL Instructions
Bit Operation Instructions
DL350 User Manual, 2nd Edition
DECO
The Decode instruction decodes a 5 bit
binary value of 0--31 (0--1F HEX) in the
accumulator by setting the appropriate bit
position to a 1. If the accumulator contains
the value F (HEX), bit 15 will be set in the
accumulator. If the value to be decoded is
greater than 31, the number is divided by
32 until the value is less than 32 and then
the value is decoded.
In the following example when X1 is on, the value formed by discrete locations
X10--X14 is loaded into the accumulator using the Load Formatted instruction. The
five bit binary pattern in the accumulator is decoded by setting the corresponding bit
position to a “1” using the Decode instruction.
Handheld Programmer Keystrokes
D
i
r
ec
t
SOFT
LDF X10
K5
X1
Load the value in
represented by discrete
locations X10--X14 into the
accumulator
DECO
Decode the five bit binary
pattern in the accumulator
and set the corresponding
bit position to a “1”
X10X11X12X13
ONONOFFON
X14
OFF
00000000000010110000000000000000
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
00001000000000000000000000000000
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
The binary vlaue
is converted to
bit position 11.
STR
$ENT
SHFT ANDST
L3
D5
F
1
B
1
B0
AENT
5
F
SHFT 2
CINST#
OENT
3
D4
E
Decode
(DECO)
Standard RLL
Instructions
5--103
Standard RLL Instructions
Number Conversion Instructions
DL350 User Manual, 2nd Edition
Number Conversion Instructions (Accumulator)
BIN
The Binary instruction converts a BCD
value in the accumulator to the equivalent
binary value. The result resides in the
accumulator.
In the following example, when X1 is on, the value in V2000 and V2001 is loaded into
the accumulator using the Load Double instruction. The BCD value in the
accumulator is converted to the binary (HEX) equivalent using the BIN instruction.
The binary value in the accumulator is copied to V2010 and V2011 using the Out
Double instruction. (The handheld programmer will display the binary value in
V2010 and V2011 as a HEX value.)
STR
$
0
A
OUT
GX SHFT 3
D2
C0
A1
BENT
0000 6F71
V2010V2011
Handheld Programmer Keystrokes
D
i
r
ec
t
SOFT
LDD
V2000
X1
Load the value in V2000 and
V2001 into the accumulator
BIN
Convert the BCD value in
the accumulator to the
binary equivalent value
10000101001010010000000000000010
8421842184218421
8421842184218421
Acc.
0002 8529
V2000V2001
BCD Value
Binary Equivalent Value
01101111011100010000000000000000
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
12481
6
3
2
6
4
1
2
8
2
5
6
5
1
2
1
0
2
4
2
0
4
8
4
0
9
6
8
1
9
2
1
6
3
8
4
3
2
7
6
8
6
5
5
3
6
1
3
1
0
7
2
2
6
2
1
4
4
5
2
4
2
8
8
1
0
4
8
5
7
6
2
0
9
7
1
5
2
4
1
9
4
3
0
4
8
3
8
8
6
0
8
1
6
7
7
7
2
1
6
3
3
5
5
4
4
3
2
6
7
1
0
8
8
6
4
1
3
4
2
1
7
7
2
8
2
6
8
4
3
5
4
5
6
5
3
6
8
7
0
9
1
2
1
0
7
3
7
4
1
8
2
4
2
1
4
7
4
4
8
3
6
4
8
Copy the binary value in the
accumulator to V2010 and V2011
OUTD
V2010 The binary (HEX) value
copied to V2010
28529 = 16384 + 8192 + 2048 + 1024 + 512 + 256 + 64 + 32 + 16 + 1
1
BENT
SHFT ANDST
L3
D3
D2
C0
A0
A0
AENT
SHFT 1
B8
ITMR
NENT
Binary
(BIN)
Standard RLL
Instructions
5--104 Standard RLL Instructions
Number Conversion Instructions
DL350 User Manual, 2nd Edition
BCD
The Binary Coded Decimal instruction
converts a binary value in the accumulator
to the equivalent BCD value. The result
resides in the accumulator.
In the following example, when X1 is on, the binary (HEX) value in V2000 and V2001
is loaded into the accumulator using the Load Double instruction. The binary value in
the accumulator is converted to the BCD equivalent value using the BCD instruction.
The BCD value in the accumulator is copied to V2010 and V2011 using the Out
Double instruction.
3
D
Handheld Programmer Keystrokes
DirectSOFT
LDD
V2000
X1
Load the value in V2000 and
V2001 into the accumulator
BCD
Convert the binary value in
the accumulator to the BCD
equivalent value
01101111011100010000000000000000
1514131211109876543210
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
0000 6F71
V2000V2001
BCD Equivalent Value
Binary Value
10000101001010010000000000000010
Acc.
12481
6
3
2
6
4
1
2
8
2
5
6
5
1
2
1
0
2
4
2
0
4
8
4
0
9
6
8
1
9
2
1
6
3
8
4
3
2
7
6
8
6
5
5
3
6
1
3
1
0
7
2
2
6
2
1
4
4
5
2
4
2
8
8
1
0
4
8
5
7
6
2
0
9
7
1
5
2
4
1
9
4
3
0
4
8
3
8
8
6
0
8
1
6
7
7
7
2
1
6
3
3
5
5
4
4
3
2
6
7
1
0
8
8
6
4
1
3
4
2
1
7
7
2
8
2
6
8
4
3
5
4
5
6
5
3
6
8
7
0
9
1
2
1
0
7
3
7
4
1
8
2
4
2
1
4
7
4
4
8
3
6
4
8
CopytheBCDvalueinthe
accumulator to V2010 and V2011
OUTD
V2010
The BCD value
copied to
V2010 and V2011
0002 8529
V2010V2011
8421842184218421
8421842184218421
16384 + 8192 + 2048 + 1024 + 512 + 256 + 64 + 32 + 16 + 1 = 28529
STR
$1
BENT
SHFT ANDST
L3
D3
D2
C0
A0
A0
AENT
SHFT 1
BENT
OUT
GX SHFT 2
C0
A1
B0
AENT
2
C3
D
Binary Coded
Decimal
(BCD)
Standard RLL
Instructions
5--105
Standard RLL Instructions
Number Conversion Instructions
DL350 User Manual, 2nd Edition
INV
The Invert instruction inverts or takes the
one’s complement of the 32 bit value in the
accumulator. The result resides in the
accumulator.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded
into the accumulator using the Load Double instruction. The value in the
accumulator is inverted using the Invert instruction. The value in the accumulator is
copied to V2010 and V2011 using the Out Double instruction.
Handheld Programmer Keystrokes
DirectSOFT
LDD
V2000
X1
Load the value in V2000 and
V2001 into the accumulator
INV
Invert the binary bit pattern
in the accumulator
OUTD
V2010
Copy the value in the
accumulator to V2010 and
V2011
00000010010100000000010000000101
1514131211109876543210
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
0405 0250
V2000V2001
V2010V2011
11111101101011111111101111111010
1514131211109876543210
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
FBFA FDAF
STR
$
SHFT ANDST
L3
D3
D
SHFT ENT
OUT
GX SHFT 3
D
8
ITMR
NAND
V
1
BENT
2
C0
A0
A0
AENT
2
C0
A1
B0
AENT
Invert
(INV)
Standard RLL
Instructions
5--106 Standard RLL Instructions
Number Conversion Instructions
DL350 User Manual, 2nd Edition
BCDCPL
The Ten’s Complement instruction takes
the 10’s complement (BCD) of the 8 digit
accumulator. The result resides in the
accumulator. The calculation for this
instruction is : 100000000
-- accumulator value
10’s complement value
In the following example when X1 is on, the value in V2000 and V2001 is loaded into
the accumulator. The 10’s complement is taken for the 8 digit accumulator using the
Ten’s Complement instruction. The value in the accumulator is copied to V2010 and
V2011 using the Out Double instruction.
3
D
Handheld Programmer Keystrokes
DirectSOFT
LDD
V2000
X1
Load the value in V2000 and
V2001 into the accumulator
BCDCPL
Takes a 10’s complement of
the value in the accumulator
OUTD
V2010
Copy the value in the
accumulator to V2010 and
V2011
Acc.
V2000
0087
0000 0087
V2001
0000
V2010
Acc.
9913
9999 9913
V2011
9999
STR
$1
BENT
SHFT ANDST
L3
D3
D2
C0
A0
A0
AENT
SHFT ENT
OUT
GX SHFT 2
C0
A1
B0
AENT
1
B2
C3
D2
CCV
PANDST
L
Ten’s Complement
(BCDCPL)
Standard RLL
Instructions
5--107
Standard RLL Instructions
Number Conversion Instructions
DL350 User Manual, 2nd Edition
BTOR
The Binary-to-Real instruction converts a
binary value in the accumulator to its
equivalent real number (floating point)
format. The result resides in the
accumulator. Both the binary and the real
number may use all 32 bits of the
accumulator.
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative.
In the following example, when X1 is on, the value in V1400 and V1401 is loaded into
the accumulator using the Load Double instruction. The BTOR instruction converts
the binary value in the accumulator the equivalent real number format. The binary
weight of the MSB is converted to the real number exponent by adding it to 127
(decimal). Then the remaining bits are copied to the mantissa as shown. The value in
the accumulator is copied to V1500 and V1501 using the Out Double instruction. The
handheld programmer would display the binary value in V1500 and V1501 as a HEX
value.
48AE 4820
V1500V1501
Handheld Programmer Keystrokes
DirectSOFT Display
LDD
V1400
X1
Load the value in V1400 and
V1401 into the accumulator
BTOR
Convert the binary value in
the accumulator to the real
number equivalent format
01110010001000010000000000000101
8421842184218421
8421842184218421
Acc.
0005 7241
V1400V1401
Binary Value
Copy the real value in the
accumulator to V1500 and V1501
OUTD
V1500
The real number (HEX) value
copied to V1500
STR X 1
D V 0 0
OUT V 1 5 0 0
1 4
SHFT
DSHFT
SHFT D
00101000001000000100100010101110
Acc.
Real Number Format
Mantissa (23 bits)Exponent (8 bits)Sign Bit
2 (exp 18)
B T O R SHFT
127 + 18 = 145
145 = 128 + 16 + 1
ENT
LENT
ENT
ENT
Binary to Real
Conversion
(BTOR)
Standard RLL
Instructions
5--108 Standard RLL Instructions
Number Conversion Instructions
DL350 User Manual, 2nd Edition
RTOB
The Real-to-Binary instruction converts the
real number in the accumulator to a binary
value. The result resides in the
accumulator. Both the binary and the real
number may use all 32 bits of the
accumulator.
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP70 On anytime the value in the accumulator is negative.
SP72 On anytime the value in the accumulator is a valid floating point number.
SP73 on when a signed addition or subtraction results in a incorrect sign bit.
SP75 On when a number cannot be converted to binary.
In the following example, when X1 is on, the value in V1400 and V1401 is loaded into
the accumulator using the Load Double instruction. The RTOB instruction converts
the real value in the accumulator the equivalent binary number format. The value in
the accumulator is copied to V1500 and V1501 using the Out Double instruction. The
handheld programmer would display the binary value in V1500 and V1501 as a HEX
value.
48AE 4820
V1400V1401
Handheld Programmer Keystrokes
DirectSOFT Display
LDD
V1400
X1
Load the value in V1400 and
V1401 into the accumulator
RTOB
Convert the real number in
the accumulator to binary
format.
01110010001000010000000000000101
8421842184218421
8421842184218421
Acc.
0005 7241
V1500V1501
Binary Value
Copy the real value in the
accumulator to V1500 and V1501
OUTD
V1500
The binary number copied to
V1400.
00101000001000000100100010101110
Acc.
Real Number Format
Mantissa (23 bits)Exponent (8 bits)Sign Bit
2 (exp 18)
127 + 18 = 145
128 + 16 + 1 = 145
STR X 1
D V 0 0
OUT V 1 5 0 0
1 4
SHFT
DSHFT
SHFT D
BT OR SHFT
ENT
LENT
ENT
ENT
Real to Binary
Conversion
(RTOB)
Standard RLL
Instructions
5--109
Standard RLL Instructions
Number Conversion Instructions
DL350 User Manual, 2nd Edition
aaa
ATH
V
The ASCII TO HEX instruction converts a
table of ASCII values to a specified table of
HEX values. ASCII values are two digits
and their HEX equivalents are one digit.
This means an ASCII table of four V--memory locations would only require two
V--memory locations for the equivalent HEX table. The function parameters are
loaded into the accumulator stack and the accumulator by two additional
instructions. Listed below are the steps necessary to program an ASCII to HEX table
function. The example on the following page shows a program for the ASCII to HEX
table function.
Step 1: — Load the number of V--memory locations for the ASCII table into the first
level of the accumulator stack.
Step 2: — Load the starting V--memory location for the ASCII table into the
accumulator. This parameter must be a HEX value.
Step 3: — Specify the starting V--memory location (Vaaa) for the HEX table in the
ATH instruction.
Helpful Hint: — For parameters that require HEX values when referencing memory
locations, the LDA instruction can be used to convert an octal address to the HEX
equivalent and load the value into the accumulator.
Operand Data Type DL350 Range
aaa
V--memory VAll (See p. 3--29)
In the example on the following page, when X1 is ON the constant (K4) is loaded into
the accumulator using the Load instruction and will be placed in the first level of the
accumulator stack when the next Load instruction is executed. The starting location
for the ASCII table (V1400) is loaded into the accumulator using the Load Address
instruction. The starting location for the HEX table (V1600) is specified in the ASCII
to HEX instruction. The table below lists valid ASCII values for ATH conversion.
ASCII Values Valid for ATH Conversion
ASCII Value Hex Value ASCII Value Hex Value
30 038 8
31 139 9
32 241 A
33 342 B
34 443 C
35 544 D
36 645 E
37 746 F
ASCII to HEX
(ATH)
Standard RLL
Instructions
5--110 Standard RLL Instructions
Number Conversion Instructions
DL350 User Manual, 2nd Edition
D
i
r
ec
t
SOFT Display
Handheld Programmer Keystrokes
LD
K4
X1 Load the constant value
into the lower 16 bits of the
accumulator. This value
defines the number of V
memory location in the
ASCII table
LDA
O 1400
Convert octal 1400 to HEX
300 and load the value into
the accumulator
ATH
V1600
V1600 is the starting
location for the HEX table
ASCII TABLE Hexadecimal
Equivalents
STR X 1
4
A O 1 4 0 0
SHFT A T H V 1 6 0 0
1234
33 34
V1400
5678
31 32
V1401
37 38
V1402
35 36
V1403
V1600
V1601
KDSHFT
ENT
LENT
ENTSHFT D
L
ENT
aaaV
HTA
The HEX to ASCII instruction converts a
table of HEX values to a specified table of
ASCII values. HEX values are one digit and
their ASCII equivalents are two digits.
This means a HEX table of two V--memory locations would require four V--memory
locations for the equivalent ASCII table. The function parameters are loaded into the
accumulator stack and the accumulator by two additional instructions. Listed below
are the steps necessary to program a HEX to ASCII table function. The example on
the following page shows a program for the HEX to ASCII table function.
Step 1: — Load the number of V--memory locations in the HEX table into the first
level of the accumulator stack.
Step 2: — Load the starting V--memory location for the HEX table into the
accumulator. This parameter must be a HEX value.
Step 3: — Specify the starting V--memory location (Vaaa) for the ASCII table in the
HTA instruction.
Helpful Hint: — For parameters that require HEX values when referencing memory
locations, the LDA instruction can be used to convert an octal address to the HEX
equivalent and load the value into the accumulator.
Operand Data Type DL350 Range
aaa
V--memory VAll (See p. 3--29)
HEX to ASCII
(HTA)
Standard RLL
Instructions
5--111
Standard RLL Instructions
Number Conversion Instructions
DL350 User Manual, 2nd Edition
In the following example, when X1 is ON the constant (K2) is loaded into the
accumulator using the Load instruction. The starting location for the HEX table
(V1500) is loaded into the accumulator using the Load Address instruction. The
starting location for the ASCII table (V1400) is specified in the HEX to ASCII
instruction.
DirectSOFT Display
Handheld Programmer Keystrokes
LD
K2
X1
Load the constant value into
the lower 16 bits of the
accumulator. This value
defines the number of V
locations in the HEX table.
LDA
O 1500
Convert octal 1500 to HEX
340 and load the value into
the accumulator
HTA
V1400
V1400 is the starting
location for the ASCII table.
The conversion is executed
by this instruction.
ASCII TABLE
Hexadecimal
Equivalents
1234
33 34 V1400
5678
31 32 V1401
37 38 V1402
35 36 V1403
V1500
V1501
STR X 1
4
A O 1 5 0 0
SHFT H T A V 1 4 0 0
KDSHFT
ENT
LENT
ENTSHFT D
L
ENT
The table below lists valid ASCII values for HTA conversion.
ASCII Values Valid for HTA Conversion
Hex Value ASCII Value Hex Value ASCII Value
030 838
131 939
232 A41
333 B42
434 C43
535 D44
636 E45
737 F46
Standard RLL
Instructions
5--112 Standard RLL Instructions
Number Conversion Instructions
DL350 User Manual, 2nd Edition
SEG
The BCD / Segment instruction converts a
four digit HEX value in the accumulator to
seven segment display format. The result
resides in the accumulator.
In the following example, when X1 is on, the value in V1400 is loaded into the lower
16 bits of the accumulator using the Load instruction. The binary (HEX) value in the
accumulator is converted to seven segment format using the Segment instruction.
The bit pattern in the accumulator is copied to Y20--Y57 using the Out Formatted
instruction.
V1400
2
Handheld Programmer Keystrokes
STR
SHFT GS E
OUT SHFT F Y 0 K 3 2
--gf edcba--gf edcba --gf edcba
DirectSOFT Display
SEG
X1
Convert the binary (HEX)
value in the accumulator to
seven segment display
format
OUTF Y20
K32
Copy the value in the
accumulator to Y20--Y57
LD
V1400
Load the value in V1400 nto the
lower 16 bits of the accumulator
01101111011100010000000000000000
1514131211109876543210
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
6F71
V1400
00000111000001100111110101110001
1514131211109876543210
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
Y20Y21Y22Y23
OFFONONOFF
Y24
OFF
S S S S
Y53Y54Y55Y56
ONONONON
Y57
OFF S S S S
--gf edcbaSegment
Labels
a
g
f
e
d
c
b
Segment
Labels
X1
D
SHFT
ENT
L
ENT
ENT
Segment
(SEG)
Standard RLL
Instructions
5--113
Standard RLL Instructions
Number Conversion Instructions
DL350 User Manual, 2nd Edition
GRAY
The Gray code instruction converts a 16 bit
gray code value to a BCD value. The BCD
conversion requires 10 bits of the
accumulator. The upper 22 bits are set to
“0”. This instruction is designed for use
with devices (typically encoders) that use
the grey code numbering scheme. The
Gray Code instruction will directly convert
a gray code number to a BCD number for
devices having a resolution of 512 or 1024
counts per revolution. If a device having a
resolution of 360 counts per revolution is to
be used you must subtract a BCD value of
76 from the converted value to obtain the
proper result. For a device having a
resolution of 720 counts per revolution you
must subtract a BCD value of 152.
In the following example, when X1 is ON the binary value represented by X10--X27 is
loaded into the accumulator using the Load Formatted instruction. The gray code
value in the accumulator is converted to BCD using the Gray Code instruction. The
value in the lower 16 bits of the accumulator is copied to V2010.
Handheld Programmer Keystrokes
DirectSOFT
LDF K16
X10
X1
Load the value represented
by X10--X27 into the lower
16 bits of the accumulator
GRAY
Convert the 16 bit grey code
valueintheaccumulatortoa
BCD value
OUT
V2010
Copy the value in the lower
16 bits of the accumulator to
V2010
0000000000
Gray Code BCD
0000000001
0000000011
0000000010
0000000110
0000000111
0000000101
0000000100
1000000001
1000000000
0000
0001
0002
0003
0004
0005
0006
0007
1022
1023
S
S
S
S
S
S
X10X11X12
ONOFFON
00000000000001010000000000000000
1514131211109876543210
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
00000000000001100000000000000000
1514131211109876543210
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1631 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
X25X26X27
OFFOFFOFF S S S S
V2010
0006
STR
$
SHFT ANDST
L3
D5
F
SHFT 6
GORN
R0
AMLS
YENT
OUT
GX SHFT AND
V2
C0
A1
B0
AENT
ENT
1
B
1
B0
AENT
1
B6
G
Gray Code
(GRAY)
Standard RLL
Instructions
5--114 Standard RLL Instructions
Number Conversion Instructions
DL350 User Manual, 2nd Edition
SFLDGT
The Shuffle Digits instruction shuffles a
maximum of 8 digits rearranging them in a
specified order. This function requires
parameters to be loaded into the first level
of the accumulator stack and the
accumulator with two additional
instructions. Listed below are the steps
necessary to use the shuffle digit function.
The example on the following page shows
a program for the Shuffle Digits function.
Step 1:— Load the value (digits) to be shuffled into the first level of the accumulator
stack.
Step 2:— Load the order that the digits will be shuffled to into the accumulator.
Note:— If the number used to specify the order contains a 0 or 9--F, the
corresponding position will be set to 0.
See example on the next page.
Note:—If the number used to specify the order contains duplicate numbers, the
most significant duplicate number is valid. The result resides in the accumulator.
See example on the next page.
Step 3:— Insert the SFLDGT instruction.
There are a maximum of 8 digits that can
be shuffled. The bit positions in the first
level of the accumulator stack defines the
digits to be shuffled. They correspond to
the bit positions in the accumulator that
define the order the digits will be shuffled.
The digits are shuffled and the result
resides in the accumulator.
Digits to be
shuffled (first stack location)
Specified order (accumulator)
DEF 09ABC
36541287
Result (accumulator)
0DA9BCEF
43218765Bit Positions
Shuffle Digits
(SFLDGT)
Shuffle Digits
Block Diagram
Standard RLL
Instructions
5--115
Standard RLL Instructions
Number Conversion Instructions
DL350 User Manual, 2nd Edition
In the following example when X1 is on, The value in the first level of the accumulator
stack will be reorganized in the order specified by the value in the accumulator.
Example A shows how the shuffle digits works when 0 or 9 --F is not used when
specifying the order the digits are to be shuffled. Also, there are no duplicate
numbers in the specified order.
Example B shows how the shuffle digits works when a 0 or 9--F is used when
specifying the order the digits are to be shuffled. Notice when the Shuffle Digits
instruction is executed, the bit positions in the first stack location that had a
corresponding 0 or 9--F in the accumulator (order specified) are set to “0”.
Example C shows how the shuffle digits works when duplicate numbers are used
specifying the order the digits are to be shuffled. Notice when the Shuffle Digits
instruction is executed, the most significant duplicate number in the order specified
is used in the result.
DEF 09ABC
Handheld Programmer Keystrokes
DirectSOFT
LDD
V2000
X1
Load the value in V2000 and
V2001 into the accumulator
LDD
V2006
Load the value in V2006 and
V2007 into the accumulator
OUTD
V2010
Copy the value in the
accumulator to V2010 and
V2011
SFLDGT
Shuffle the digits in the first
level of the accumulator
stack based on the pattern
in the accumulator. The
result is in the accumulator.
V2010
Acc.
0DA9
9ABC DEF0
V2011
BCEF
Acc.
3654
1287 3654
1287
Acc.
BCEF 0DA9
V2000V2001
V2006V2007
CBA90FED
V2010
Acc.
EDA9
0FED CBA9
V2011
0000
Acc.
0021
0043 0021
0043
Acc.
0000 EDA9
V2000V2001
V2006V2007
DEF 09ABC
V2010
Acc.
9ABC
9ABC DEF0
V2011
0000
Acc.
4321
4321 4321
4321
Acc.
0000 9ABC
V2000V2001
V2006V2007
ABC
Original
bit
Positions
43218765 43218765 43218765
Specified
order 43218765 43218765 43218765
New bit
Positions 43218765 43218765 43218765
STR
$
SHFT ANDST
L3
D3
D
SHFT ANDST
L3
D3
D
SHFT RST
S5
FANDST
L3
D6
GMLR
TENT
OUT
GX SHFT 3
D
1
BENT
2
C0
A0
A0
AENT
2
C0
A0
AENT
6
G
2
C0
A1
B0
AENT
SHFT
Standard RLL
Instructions
5--116 Standard RLL Instructions
Table Instructions
DL350 User Manual, 2nd Edition
Table Instructions
The Move instruction moves the values
from a V--memory table to another
V--memory table the same length. The
function parameters are loaded into the
first level of the accumulator stack and the
accumulator by two additional
instructions. Listed below are the steps
necessary to program the Move function.
V aaa
MOV
Step 1:— Load the number of V--memory locations to be moved into the first level
of the accumulator stack. This parameter must be a HEX value.
Step 2:— Load the starting V--memory location for the locations to be moved into
the accumulator. This parameter must be a HEX value.
Step 3:— Insert the MOVE instruction which specifies starting V--memory location
(Vaaa) for the destination table.
Helpful Hint: — For parameters that require HEX values when referencing memory
locations, the LDA instruction can be used to convert an octal address to the HEX
equivalent and load the value into the accumulator.
Operand Data Type DL350 Range
aaa
V--memory VAll (See page 3--29)
In the following example, when X1 is on, the constant value (K6) is loaded into the
accumulator using the Load instruction. This value specifies the length of the table
and is placed in the first stack location after the Load Address instruction is
executed. The octal address 2000 (V2000), the starting location for the source table
is loaded into the accumulator. The destination table location (V2030) is specified in
the Move instruction.
Handheld Programmer Keystrokes
LD
K6
X1 Load the constant value 6
(HEX) into the lower 16 bits
of the accumulator
LDA
O 2000
Convert octal 2000 to HEX
400 and load the value into
the accumulator
MOV
V2030
Copy the specified table
locations to a table
beginning at location V2030
V2030
0123
V2031
0500
V2032
9999
V2033
3074
V2034
8989
V2035
1010
V2036
XXXX
V2037
XXXX
S
S
S
S
V2026
XXXX
V2027
XXXX
V2000
0123
V2001
0500
V2002
9999
V2003
3074
V2004
8989
V2005
1010
V2006
XXXX
V2007
XXXX
S
S
S
S
V1776
XXXX
V1777
XXXX
STR
$
SHFT ANDST
L3
DSHFT JMP
K6
GENT
SHFT ANDST
L3
D0
A2
C0
A0
A0
AENT
SHFT ORST
MINST#
O
1
BENT
2
C0
A0
AENT
3
D
AND
V
Move
(MOV)
Standard RLL
Instructions
5--117
Standard RLL Instructions
Table Instructions
DL350 User Manual, 2nd Edition
V aaa
MOVMC
The Move Memory Cartridge instruction is
used to copy data between V--memory
and program ladder memory. The Load
Label instruction is only used with the
MOVMC instruction when copying data
from program ladder memory to
V--memory.
To copy data between V--memory and
program ladder memory, the function
parameters are loaded into the first two
levels of the accumulator stack and the
accumulator by two additional
instructions. Listed below are the steps
necessary to program the Move Memory
Cartridge and Load Label functions.
Step 1:— Load the number of words to be copied into the second level of the
accumulator stack.
Step 2:— Load the offset for the data label area in the program ladder memory and
the beginning of the V--memory block into the first level of the accumulator stack.
Step 3:— Load the source data label (LDLBL Kaaa) into the accumulator when
copying data from ladder memory to V--memory. Load the source address into the
accumulator when copying data from V--memory to ladder memory. This is where
the value will be copied from. If the source address is a V--memory location, the
value must be entered in HEX.
Step 4:— Insert the MOVMC instruction which specifies destination (Aaaa). This is
where the value will be copied to.
LDLBL
aaaK
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Move Memory
Cartridge /
Load Label
(MOVMC)
(LDLBL)
Standard RLL
Instructions
5--118 Standard RLL Instructions
Table Instructions
DL350 User Manual, 2nd Edition
In the following example, data is copied from a Data Label Area to V--memory. When
X1 is on, the constant value (K4) is loaded into the accumulator using the Load
instruction. This value specifies the length of the table and is placed in the second
stack location after the next Load and Load Label (LDLBL) instructions are
executed. The constant value (K0) is loaded into the accumulator using the Load
instruction. This value specifies the offset for the source and destination data, and is
placed in the first stack location after the LDLBL instruction is executed. The source
address where data is being copied from is loaded into the accumulator using the
LDLBL instruction. The MOVMC instruction specifies the destination starting
location and executes the copying of data from the Data Label Area to V--memory.
1234
CON
4532
CON
6151
CON
8845
CON
K
N
K
N
K
N
K
N
D
i
r
ec
t
SOFT
Handheld Programmer Keystrokes
LD
K4
X1
Load the value 4 into the
accumulator specifying the
number of locations to be
copied.
LD
K0
Load the value 0 into the
accumulator specifying the
offset for source and
destination locations
LDLBL
K1
Load the value 1 into the
accumulator specifying the
Data Label Area K1 as the
starting address of the data
to be copied.
V2001
4532
V2002
6151
V2003
8845
V2004
XXXX
S
S
S
S
V1777
XXXX
V2000
1234
Data Label Area
Programmed
After the END
Instruction
MOVMC
V2000
V2000 is the destination
starting address for the data
to be copied.
DLBL K1
STR
$
SHFT ANDST
L3
DSHFT JMP
KENT
SHFT ANDST
L3
DANDST
L1
BANDST
L
SHFT ORST
MAND
V
INST#
OORST
M2
C
1
BENT
ENT
1
B
2
C0
A0
A0
AENT
SHFT ANDST
L3
DSHFT JMP
K0
AENT
4
E
Copy Data From a
Data Label Area to
V--Memory
Standard RLL
Instructions
5--119
Standard RLL Instructions
Table Instructions
DL350 User Manual, 2nd Edition
In the following example, data is copied from V--memory to a data label area. When
X1 is on, the constant value (K4) is loaded into the accumulator using the Load
instruction. This value specifies the length of the table and is placed in the second
stack location after the next Load and Load Address instructions are executed. The
constant value (K2) is loaded into the accumulator using the Load instruction. This
value specifies the offset for the source and destination data, and is placed in the first
stack location after the Load Address instruction is executed. The source address
where data is being copied from is loaded into the accumulator using the Load
Address instruction. The MOVMC instruction specifies the destination starting
location and executes the copying of data from V--memory to the data label area.
6151
CON
8845
CON
2500
CON
6835
CON
K
N
K
N
K
N
K
N
DirectSOFT
Handheld Programmer Keystrokes
LD
K4
X1
Load the value 4 into the
accumulator specifying the
number of locations to be
copied.
LD
K2
Load the value 2 into the
accumulator specifying the
offset for source and
destination locations.
LDA
O 2000
V2001
4532
V2002
6151
V2003
8845
V2004
2500
S
S
V1777
XXXX
V2000
1234
Data Label Area
Programmed
After the END
Instruction
MOVMC
K1
K1 is the data label
destination area where the
data will be copied to
V2005
6835
V2006
XXXX
DLBL K1
Offset 7041
CON
4648
CON
K
N
K
NOffset
S
S
Convert octal 2000 to HEX
400 and load the value into
the accumulator. This
specifies the source location
where the data will be
copied from
STR
$
SHFT ANDST
L3
DSHFT JMP
KENT
4
E
SHFT ANDST
L3
D
SHFT ORST
MAND
V
INST#
OORST
M2
CSHFT ENT
0
A2
C0
A0
A0
AENT
JMP
K1
B
SHFT ANDST
L3
DSHFT JMP
KENT
2
C
1
BENT
Copy Data From
V--Memory to a
Data Label Area
Standard
RLL Instructions
5--120 Standard RLL Instructions
Clock / Calendar Instructions
DL350 User Manual, 2nd Edition
Clock / Calendar Instructions
V aaa
DATE
The Date instruction can be used to set the
date in the CPU. The instruction requires
two consecutive V--memory locations
(Vaaa) to set the date. If the values in the
specified locations are not valid, the date will
not be set. The current date can be read
from 4 consecutive V--memory locations
(V7771--V7774).
Date Range V Memory Location (BCD)
(READ Only)
Year 0--99 V7774
Month 1--12 V7773
Day 1--31 V7772
Day of Week 0--06 V7771
The values entered for the day of week are:
0=Sunday, 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See p. 3--29)
In the following example, when C0 is on, the constant value (K94010301) is loaded
into the accumulator using the Load Double instruction (C0 should be a contact from
a one shot (PD) instruction). The value in the accumulator is output to V2000 using
the Out Double instruction. The Date instruction uses the value in V2000 to set the
date in the CPU.
In this example, the Date
instruction uses the value set in
V2000 and V2001 to set the date
in the appropriate V memory
locations (V7771--V7774)
D
i
r
ec
t
SOFT Display
Handheld Programmer Keystrokes
LDD
K94010301
C0
Load the constant
value (K94010301)
into the accumulator
DATE
V2000
Set the date in the CPU
using the value in V2000
and V2001
OUTD
V2000
Copy the value in
the accumulator to
V2000 and V2001
STR C 0
L D K 9 4 0 1
OUT SHFT D V 2 0 0 0
SHFT D A T E V 2 0 0 0
0301
V2000
Acc.
0301
0301
9401 0301
9401
V2001
9401
Constant (K)
Acc. 9401 0301
Day Day of WeekYear Month
03019401
V2001 V2000
Format
ENT
SHFT D
ENT
ENT
ENT
Date
(DATE)
Standard
RLL Instructions
5--121
Standard RLLInstructions
Clock / Calendar Instructions
DL350 User Manual, 2nd Edition
V aaa
TIME
The Time instruction can be used to set the
time (24 hour clock) in the CPU. The
instruction requires two consecutive
V--memory locations (Vaaa) which are used
to set the time. If the values in the specified
locations are not valid, the time will not be
set. The current time can be read from
memory locations V7747 and
V7766--V7770.
Date Range V Memory Location (BCD)
(READ Only)
1/100 seconds (10ms) 0--99 V7747
Seconds 0--59 V7766
Minutes 0--59 V7767
Hour 0--23 V7770
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See p. 3--29)
In the following example, when C0 is on, the constant value (K73000) is loaded into
the accumulator using the Load Double instruction (C0 should be a contact from a
one shot (PD) instruction). The value in the accumulator is output to V2000 using the
Out Double instruction. The Time instruction uses the value in V2000 to set the time
in the CPU.
D
i
r
ec
t
SOFT Display
Handheld Programmer Keystrokes
LDD
K73000
C0
Load the constant
value (K73000) into
the accumulator
TIME
V2000
Set the time in the CPU
using the value in V2000
and V2001
OUTD
V2000
Copy the value in the
accumulator to V2000
and V2001 V2000
Acc.
3000
3000
0007 3000
0007
V2001
0007
Constant (K)
Acc. 0007 3000
The Time instruction uses the
value set in V2000 and V2001 to
set the time in the appropriate V
memory locations (V7766--V7770)
Minutes SecondsNot
Used Hour
30000007
V2001 V2000
Format
STR C 0
L D K 7 3 0 0
OUT SHFT D V 2 0 0 0
SHFT T I M E V 2 0 0 0
ENT
SHFT DENT
ENT
ENT
Time
(TIME)
Standard RLL
Instructions
5--122 Standard RLL Instructions
CPU Control Instructions
DL350 User Manual, 2nd Edition
CPU Control Instructions
The No Operation is an empty (not
programmed) memory location.
NOP
DirectSOFT
Handheld Programmer Keystrokes
NOP
SHFT TMR
NINST#
OCV
PENT
The End instruction marks the termination
point of the normal program scan. An End
instruction is required at the end of the
main program body. If the End instruction
is omitted an error will occur and the CPU
will not enter the Run Mode. Data labels,
subroutines and interrupt routines are
placed after the End instruction. The End
instruction is not conditional; therefore, no
input contact is allowed.
END
DirectSOFT
Handheld Programmer Keystrokes
END
SHFT 4
ETMR
N3
DENT
No Operation
(NOP)
End
(END)
Standard RLL
Instructions
5--123
Standard RLL Insturctions
CPU Control Instructions
DL350 User Manual, 2nd Edition
The Stop instruction changes the
operational mode of the CPU from Run to
Program (Stop) mode. This instruction is
typically used to stop PLC operation in a
shutdown condition such as a I/O module
failure.
STOP
In the following example, when SP45 comes on indicating a I/O module failure, the
CPU will stop operation and switch to the program mode.
Handheld Programmer Keystrokes
STOP
SP45
SP45 will turn on
if there is an I/O
module falure
STR
$SHFT ENT
STRN
SP 4
E5
F
SHFT RST
SMLR
TINST#
OCV
PENTSHFT
The Reset Watch Dog Timer instruction
resets the CPU scan timer. The default
setting for the watch dog timer is 200ms.
Scan times very seldom exceed 200ms,
but it is possible. For/next loops,
subroutines, interrupt routines, and table
instructions can be programmed such that
the scan becomes longer than 200ms.
When instructions are used in a manner
that could exceed the watch dog timer
setting, this instruction can be used to
reset the timer.
RSTWT
A software timeout error (E003) will occur and the CPU will enter the program
mode if the scan time exceeds the watch dog timer setting. Placement of the
RSTWT instruction in the program is very important. The instruction has to be
executed before the scan time exceeds the watch dog timer’s setting.
If the scan time is consistently longer than the watch dog timer’s setting, the
timeout value may be permanently increased from the default value of 200ms by
AUX 55 on the HPP or the appropriate auxiliary function in your programming
package. This eliminates the need for the RSTWT instruction.
In the following example the CPU scan timer will be reset to 0 when the RSTWT
instruction is executed. See the For/Next instruction for a detailed example.
DirectSOFT Handheld Programmer Keystrokes
RSTWT
SHFT ORN
RRST
SMLR
TANDN
WMLR
TENT
Stop
(STOP)
Reset Watch Dog
Timer
(RSTWT)
Standard RLL
Instructions
5--124 Instruction Set
Program Control Instructions
DL350 User Manual, 2nd Edition
Program Control Instructions
K aaa
K aaa
The GOTO / Label skips all instructions
between the GOTO and the
corresponding LBL instruction. The
operand value for the GOTO and the
corresponding LBL instruction are the
same. The logic between GOTO and LBL
instruction is not executed when the
GOTO instruction is enabled. Up to 128
GOTO instructions and 64 LBL
instructions can be used in the program.
GOTO
LBL
Operand Data Type DL350 Range
aaa
Constant K1--FFFF
In the following example, when C7 is on, all the program logic between the GOTO
and the corresponding LBL instruction (designated with the same constant Kaaa
value) will be skipped. The instructions being skipped will not be executed by the
CPU.
D
i
r
ec
t
SOFT Handheld Programmer Keystrokes
LBL K5
C7 K5
GOTO
X1 C2
OUT
X5 Y2
OUT
S
S
S
STR
$SHFT 2
CENT
7
H
SHFT 6
GINST#
OMLR
TINST#
O5
FENT
STR
$
OUT
GX SHFT 2
C2
CENT
SHFT ANDST
L1
BANDST
L5
FENT
STR
$
OUT
GX
S
S
1
BENT
ENT
5
F
2
CENT
Goto Label
(GOTO)
(LBL)
Standard RLL
Instructions
5--125
Instruction Set
Program Control Instructions
DL350 User Manual, 2nd Edition
The For and Next instructions are used to
execute a section of ladder logic between
the For and Next instruction a specified
numbers of times. When the For
instruction is enabled, the program will
loop the specified number of times. If the
For instruction is not energized the section
of ladder logic between the For and Next
instructions is not executed.
For / Next instructions cannot be nested.
Up to 64 For / Next loops may be used in a
program. If the maximum number of For /
Next loops is exceeded, error E413 will
occur. The normal I/O update and CPU
housekeeping is suspended while
executing the For / Next loop. The program
scan can increase significantly, depending
on the amount of times the logic between
the For and Next instruction is executed.
With the exception of immediate I/O
instructions, I/O will not be updated until
the program execution is completed for
that scan. Depending on the length of time
required to complete the program
execution, it may be necessary to reset the
watch dog timer inside of the For / Next
loop using the RSTWT instruction.
A aaa
FOR
NEXT
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Constant K1--9999
For / Next
(FOR)
(NEXT)
Standard RLL
Instructions
5--126 Instruction Set
Program Control Instructions
DL350 User Manual, 2nd Edition
In the following example, when X1 is on, the application program inside the For /
Next loop will be executed three times. If X1 is off the program inside the loop will not
be executed. The immediate instructions may or may not be necessary depending
on your application. Also, The RSTWT instruction is not necessary if the For / Next
loop does not extend the scan time larger the Watch Dog Timer setting. For more
information on the Watch Dog Timer, refer to the RSTWT instruction.
X1
DirectSOFT
Handheld Programmer Keystrokes
K3
FOR
RSTWT
X20 Y5
OUT
NEXT
123
STR
$
SHFT 5
FINST#
OORN
R
SHFT ORN
RRST
SMLR
TANDN
WMLR
TENT
STR
$SHFT 8
I2
C0
AENT
OUT
GX
SHFT TMR
N4
ESET
XMLR
TENT
1
BENT
3
DENT
5
FENT
Standard RLL
Instructions
5--127
Instruction Set
Program Control Instructions
DL350 User Manual, 2nd Edition
K aaa
The Goto Subroutine instruction allows a
section of ladder logic to be placed outside
the main body of the program execute only
when needed. There can be a maximum
of 128 GTS instructions and 64 SBR
instructions used in a program. The GTS
instructions can be nested up to 8 levels.
An error E412 will occur if the maximum
limits are exceeded. Typically this will be
used in an application where a block of
program logic may be slow to execute and
is not required to execute every scan. The
subroutine label and all associated logic is
placed after the End statement in the
program. When the subroutine is called
from the main program, the CPU will
execute the subroutine (SBR) with the
same constant number (K) as the GTS
instruction which called the subroutine.
By placing code in a subroutine it is only
scanned and executed when needed
since it resides after the End instruction.
Code which is not scanned does not
impact the overall scan time of the
program.
GTS
K aaa
SBR
Operand Data Type DL350 Range
aaa
Constant K1--FFFF
When a Subroutine Return is executed in
the subroutine the CPU will return to the
point in the main body of the program from
which it was called. The Subroutine Return
is used as termination of the subroutine
which must be the last instruction in the
subroutine and is a stand alone instruction
(no input contact on the rung).
RT
The Subroutine Return Conditional
instruction is a optional instruction used
with a input contact to implement a
conditional return from the subroutine. The
Subroutine Return (RT) is still required for
termination of the Subroutine.
RTC
Goto Subroutine
(GTS)
(SBR)
Subroutine Return
(RT)
Subroutine Return
Conditional
(RTC)
Standard RLL
Instructions
5--128 Instruction Set
Program Control Instructions
DL350 User Manual, 2nd Edition
In the following example, when X1 is on, Subroutine K3 will be called. The CPU will
jump to the Subroutine Label K3 and the ladder logic in the subroutine will be
executed. If X35 is on the CPU will return to the main program atthe RTC instruction.
If X35 is not on Y0--Y17 will be reset to off and then the CPU will return to the main
body of the program.
DirectSOFT Display
Handheld Programmer Keystrokes
SBR K3
X1 K3
GTS
END
Y5
OUTI
S
S
S
X20
Y10
OUTI
X21
X35
RTC
X35
RSTI
Y0 Y17
STR X 1
SHFT G T S
E
SHFT S B R 1
STR SHFT I X 2 0
YOUT SHFT I 5
STR SHFT I X 2 1
YOUT SHFT I 1 0
STR SHFT I X 3 5
SHFT R T C
STRN SHFT I X 3 5
RST SHFT I Y 0 Y 1 7
SHFT R T
K 3
K 3
RT
S
S
K10
LD
C0
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
SHFT N D
SHFT
Standard RLL
Instructions
5--129
Instruction Set
Program Control Instructions
DL350 User Manual, 2nd Edition
In the following example, when X1 is on, Subroutine K3 will be called. The CPU will
jump to the Subroutine Label K3 and the ladder logic in the subroutine will be
executed. The CPU will return to the main body of the program after the RT
instruction is executed.
DirectSOFT
Handheld Programmer Keystrokes
SBR K3
X1 K3
GTS
END
Y5
OUT
S
S
S
X20
Y10
OUT
X21
RT
S
S
STR
$
SHFT 6
GMLR
TRST
S
SHFT RST
S1
BORN
R
STR
$SHFT 8
I2
C0
AENT
OUT
GX
STR
$SHFT 8
I2
CENT
1
B
OUT
GX
SHFT ORN
RMLR
TENT
SHFT 4
ETMR
N3
DENT
1
BENT
3
DENT
3
DENT
5
FENT
ENT
1
B0
A
SHFT
Standard RLL
Instructions
5--130 Instruction Set
Program Control Instructions
DL350 User Manual, 2nd Edition
K aaa
The Master Line Set instruction allows the
program to control sections of ladder logic
by forming a new power rail controlled by
the main left power rail. The main left rail is
always master line 0. When a MLS K1
instruction is used, a new power rail is
created at level 1. Master Line Sets and
Master Line Resets can be used to nest
power rails up to seven levels deep. Note
that unlike stages in RLLPLUS,the logic
within the master control relays is still
scanned and updated even though it will
not function if the MLS is off.
MLS
Operand Data Type DL350 Range
aaa
Constant K1--7
K aaa
The Master Line Reset instruction marks
the end of control for the corresponding
MLS instruction. The MLR reference is one
less than the corresponding MLS. MLR
Operand Data Type DL350 Range
aaa
Constant K0--7
The Master Line Set (MLS) and Master Line Reset (MLR) instructions allow you to
quickly enable (or disable) sections of the RLL program. This provides program
control flexibility. The following example shows how the MLS and MLR instructions
operate by creating a sub power rail for control logic.
X0
X1
X2
OUT
Y10
X3
MLS
MLR
MLS
MLR
When contact X0 is on, logic under the first MLS
will be executed.
When contact X2 and X0 is on, logic
under the second MLS will be
executed.
The MLR instructions note the end of the Master Control area. (They will be entered in
adjacent addresses.)
X10
Master Line Set
(MLS)
Master Line Reset
(MLR)
Understanding
Master Control
Relays
Standard RLL
Instructions
5--131
Instruction Set
Program Control Instructions
DL350 User Manual, 2nd Edition
In the following MLS/MLR example logic between the first MLS K1 (A) and MLR K0
(B) will function only if input X0 is on. The logic between the MLS K2 (C) and MLR K1
(D) will function only if input X10 and X0 is on. The last rung is not controlled byeither
of the MLS coils.
K1
MLS
X0
C0
OUT
X1
C1
OUT
X2
Y0
OUT
X3
K2
MLS
X10
Y1
OUT
X5
Y2
OUT
X4
K1
MLR
C2
OUT
X5
Y3
OUT
X6
K0
MLR
Y22
OUT
X7
A
C
D
B
DirectSOFT Handheld Programmer Keystrokes
STR
$ENT
0
A
MLS
Y1
BENT
STR
$1
BENT
OUT
GX SHFT ENT
2
C0
A
STR
$ENT
2
C
OUT
GX SHFT ENT
2
C1
B
STR
$ENT
3
D
OUT
GX ENT
0
A
STR
$ENT
0
A
1
B
MLS
YENT
2
C
STR
$ENT
5
F
OUT
GX ENT
1
B
STR
$ENT
OUT
GX ENT
4
E
2
C
MLR
T1
BENT
STR
$ENT
5
F
OUT
GX SHFT ENT
2
C2
C
STR
$ENT
OUT
GX ENT
6
G
3
D
MLR
TENT
0
A
STR
$ENT
OUT
GX 2
C
7
H
ENT
2
C
MLS/MLR Example
Standard RLL
Instructions
5--132 Standard RLL Instructions
Interrupt Instructions
DL350 User Manual, 2nd Edition
Interrupt Instructions
O aaa
The Interrupt instruction allows a section
of ladder logic to be placed outside the
main body of the program and executed
when needed. Interrupts can be called
from the program or by external interrupts
via the counter interface module which
provides 4 interrupts.
INT
Typically, interrupts will be used in an application where a fast response to an input
is needed or a program section needs to execute faster than the normal CPU scan.
The interrupt label and all associated logic must be placed after the End statement
in the program. When the interrupt routine is called from the interrupt module or
software interrupt, the CPU will complete execution of the instruction it is currently
processing in ladder logic then execute the designated interrupt routine. Interrupt
module interrupts are labeled in octal to correspond with the hardware input signal
(X1 will initiate interrupt INT1). There is only one software interrupt and it is labeled
INT 0. The program execution will continue from where it was before the interrupt
occurred once the interrupt is serviced.
The software interrupt is setup by programming the interrupt time in V7634. The
valid range is 3--999 ms. The value must be a BCD value. The interrupt will not
execute if the value is out of range.
NOTE: See the example program of a software interrupt.
Operand Data Type DL350 Range
aaa
Constant O0--3
Interrupt
(INT)
Standard RLL
Instructions
5--133
Standard RLL Instructions
Interrupt Instructions
DL350 User Manual, 2nd Edition
When an Interrupt Return is executed in
the interrupt routine the CPU will return to
the point in the main body of the program
from which it was called. The Interrupt
Return is programmed as the last
instruction in an interrupt routine and is a
stand alone instruction (no input contact
on the rung).
IRT
The Interrupt Return Conditional
instruction is a optional instruction used
with an input contact to implement a
condtional return from the interrupt
routine. The Interrupt Return is required to
terminate the interrupt routine.
IRTC
The Enable Interrupt instruction is
programmed in the main body of the
application program (before the End
instruction) to enable hardware or
software interrupts. Once the coil has
been energized interrupts will be enabled
until the interrupt is disabled by the
Disable Interrupt instruction.
ENI
The Disable Interrupt instruction is
programmed in the main body of the
application program (before the End
instruction) to disable both hardware or
software interrupts. Once the coil has
been energized interrupts will be
disabled until the interrupt is enabled by
the Enable Interrupt instruction.
DISI
Interrupt Return
(IRT)
Interrupt Return
Conditional
(IRTC)
Enable Interrupts
(ENI)
Disable Interrupts
(DISI)
Standard RLL
Instructions
5--134 Standard RLL Instructions
Interrupt Instructions
DL350 User Manual, 2nd Edition
In the following example, when X1 is on, the value 10 is copied to V7634. This value
sets the software interrupt to 10 ms. When X20 turns on, the interrupt will be
enabled. When X20 turns off, the interrupt will be disabled. Every 10 ms the CPU will
jump to the interrupt label INT O 0. The application ladder logic in the interrupt
routine will be performed. If X35 is not on Y0--Y17 will be reset to off and then the
CPU will return to the main body of the program.
DirectSOFT
INT O0
X20
ENI
DISI
S
S
S
X20
END
Y5
SETI
X20
X35
RSTI
Y0 Y17
IRT
S
S
Handheld Programmer Keystrokes
LD
K104 *
X1
Load the constant value
(K10) into the lower 16 bits
of the accumulator
OUT
V7634
Copy the value in the lower
16 bits of the accumulator to
V7634
STR
$
SHFT ANDST
L3
DSHFT 0
A
OUT
GX SHFT AND
VENT
JMP
K4
BENT
7
H6
G3
D4
E
STR
$
SHFT 4
ETMR
N8
IENT
STRN
SP
SHFT ENT
3
D8
IRST
S8
I
8
IORN
RMLR
T
STR
$SHFT 8
I2
C0
AENT
SHFT 8
I5
FENT
SHFT 8
IENT
SHFT 8
IENT
1
B0
A
SHFT 4
ETMR
N3
DENT
SHFT 8
ITMR
NMLR
TENT
SHFT ENT
0
A
1
BENT
ENT
0
A
ENT
0
A
2
C
2
C
1
B7
H
3
D5
F
SET
X
SET
X
STRN
SP
LD
K40
SP0
OUT
V7633
* The value entered, 0--999 must be followed by the
digit 4 to complete the instruction.
Interrupt Example
for Software
Interrupt
Standard
RLL Instructions
5--135
Standard RLL Instructions
Intelligent I/O Instructions
DL350 User Manual, 2nd Edition
Intelligent I/O Instructions
V aaa
The Read from Intelligent Module
instruction reads a block of data (1--128
bytes maximum) from an intelligent I/O
module into the CPU’s V--memory. It loads
the function parameters into the first and
second level of the accumulator stack, and
the accumulator by three additional
instructions.
RD
Listed below are the steps to program the Read from Intelligent module function.
Step 1: — Load the base number (0--3) into the first byte and the slot number (0--7)
into the second byte of the second level of the accumulator stack.
Step 2: — Load the number of bytes to be transferred into the first level of the
accumulator stack. (maximum of 128 bytes)
Step 3: — Load the address from which the data will be read into the accumulator.
This parameter must be a HEX value.
Step 4: — Insert the RD instruction which specifies the starting V--memory location
(Vaaa) where the data will be read into.
Helpful Hint: —Use the LDA instruction to convert an octal address to its HEX
equivalent and load it into the accumulator when the hex format is required.
Operand Data Type DL350 Range
aaa
V--memory VAll (See p. 3--29)
Discrete Bit Flags Description
SP54 on when RX, WX, RD, WT instructions are executed with the wrong parameters.
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example when X1 is on, the RD instruction will read six bytes of data
from a intelligent module in base 1, slot 2 starting at address 0 in the intelligent
module and copy the information into V-memory locations V1400--V1402.
DirectSOFT Display
Handheld Programmer Keystrokes
LD
K0102
X1 The constant value K1020
specifies the base number
(01) and the base slot
number (02)
LD
K6
The constant value K6
specifies the number of
bytes to be read
LD
K0
The constant value K0
specifies the starting address
in the intelligent module
RD
V1400
V1400 is the starting location
intheCPUwherethe
specified data will be stored
STR X 1
L K 0
K6
0
102
SHFT R D V 1 4 0 0
V1401 7856
V1402 0190
V1403 XXXX
V1404 XXXX
V1400 3412
Data
12
34
56
78
90
01
Address 0
Address 1
Address 2
Address 3
Address 4
Address 5
CPU Intelligent Module
ENT
SHFT DENT
LSHFT D
LSHFT DK
ENT
ENT
ENT
Read from
Intelligent Module
(RD)
Standard
RLL Instructions
5--136 Standard RLL Instructions
Intelligent I/O Instructions
DL350 User Manual, 2nd Edition
V aaa
The Write to Intelligent Module instruction
writes a block of data (1--128 bytes
maximum) to an intelligent I/O module from
a block of V--memory in the CPU. The
function parameters are loaded into the first
and second level of the accumulator stack,
and the accumulator by three additional
instructions. Listed below are the steps
necessary to program the Read from
Intelligent module function.
WT
Step 1: — Load the base number (0--3) into the first byte and the slot number (0--7)
into the second byte of the second level of the accumulator stack.
Step 2: — Load the number of bytes to be transferred into the first level of the
accumulator stack. (maximum of 128 bytes)
Step 3: — Load the intelligent module address which will receive the data into the
accumulator. This parameter must be a HEX value.
Step 4: — Insert the WT instruction which specifies the starting V--memory location
(Vaaa) where the data will be written from in the CPU.
Helpful Hint: —Use the LDA instruction to convert an octal address to its HEX
equivalent and load it into the accumulator when the hex format is required.
Operand Data Type DL350 Range
aaa
V--memory VAll (See p. 3--29)
Discrete Bit Flags Description
SP54 on when RX, WX, RD, WT instructions are executed with the wrong parameters.
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the WT instruction will write six bytes of data
to an intelligent module in base 1, slot 2 starting at address 0 in the intelligent module
and copy the information from V--memory locations V1400--V1402.
DirectSOFT Display
Handheld Programmer Keystrokes
LD
K0102
X1 The constant value K0102
specifies the base number
(01) and the base slot
number (02)
LD
K6
TheconstantvalueK6
specifies the number of
bytes to be written
LD
K0
TheconstantvalueK0
specifies the starting address
in the intelligent module
WT
V1400
V1400 is the starting
location in the CPU where
the specified data will be
written from
V1401 7856
V1402 0190
V1403 XXXX
V1404 XXXX
V1377 XXXX
V1400 3412
Data
12
34
56
78
90
01
Address 0
Address 1
Address 2
Address 3
Address 4
Address 5
CPU Intelligent Module
STR X 1
L K 0
K6
0
1 0 2
SHFT W T V 1 4 0 0
ENT
SHFT DENT
LSHFT D
LSHFT DK
ENT
ENT
ENT
Write to Intelligent
Module
(WT)
Standard RLL
Instructions
5--137
Standard RLL Instructions
Network Instructions
DL350 User Manual, 2nd Edition
Network Instructions
A aaa
The Read from Network instruction is used
by the master device on a network to read
a block of data from another CPU. The
function parameters are loaded into the
first and second level of the accumulator
stack and the accumulator by three
additional instructions. Listed below are
the steps necessary to program the Read
from Intelligent module function.
RX
Step 1: — Load the slave address (0--90 BCD) into the first byte and the slot
number of the master DCM (0--7) into the second byte of the second level of the
accumulator stack.
Step 2: — Load the number of bytes to be transferred into the first level of the
accumulator stack.
Step 3: — Load the address of the data to be read into the accumulator. This
parameter requires a HEX value.
Step 4: — Insert the RX instruction which specifies the starting V memory location
(Aaaa) where the data will be read from in the slave.
Helpful Hint: — For parameters that require HEX values, the LDA instruction can
be used to convert an octal address to the HEX equivalent and load the value into
the accumulator.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Pointer PAll V mem. (See page 3--29)
Inputs X0--777
Outputs Y0--777
Control Relays C0--1777
Stage S0--1777
Timer T0--377
Counter CT 0--177
Special Relay SP 0--777
Program Memory $0--7679 (7.5K program mem.)
0--15873 (15.5K program mem.)
Read from Network
(RX)
Standard RLL
Instructions
5--138 Standard RLL Instructions
Network Instructions
DL350 User Manual, 2nd Edition
In the following example, when X1 is on and the module busy relay SP124 (see
special relays) is not on, the RX instruction will access a DCM operating as a master
in slot 2. Ten consecutive bytes of data (V2000 -- V2004) will be read from a CPU at
station address 5 and copied into V--memory locations V2300--V2304 in the CPU
with the master DCM.
DirectSOFT
Handheld Programmer Keystrokes
LD
K0205
X1
The constant value K0205
specifies the slot number (2)
and the slave address (5)
LD
K10
The constant value K10
specifies the number of
bytes to be read
LDA
O 2300
Octal address 2300 is
converted to 4C0 HEX and
loaded into the accumulator.
V2300 is the starting
location for the Master CPU
where the specified data will
be read into
RX
V2000
V2000 is the starting
location in the for the Slave
CPU where the specified
data will be read from
V2001
8534
V2002
1936
V2003
9571
V2004
1423
S
S
S
S
V1777
XXXX
V2000
3457
Master
CPU
SP124
V2005
XXXX
V2301 8534
V2302 1936
V2303 9571
V2304 1423
S
S
S
S
V2277 XXXX
V2300 3457
V2305 XXXX
Slave
CPU
STR
$
SHFT ANDST
L3
DSHFT JMP
K
SHFT ANDST
L3
D
ANDN
WSHFT STRN
SP 1
B2
C4
EENT
1
B0
AENT
0
A
SHFT ORN
RSET
X
1
BENT
2
C3
D0
A0
AENT
2
C0
A0
A0
AENT
SHFT ANDST
L3
DSHFT JMP
K0
AENT
2
C5
F
Standard RLL
Instructions
5--139
Standard RLL Instructions
Network Instructions
DL350 User Manual, 2nd Edition
A aaa
WX
TheWritetoNetworkinstructionisusedto
write a block of data from the master
devicetoaslavedeviceonthesame
network. The function parameters are
loaded into the first and second level of the
accumulator stack and the accumulator by
three additional instructions. Listed below
are the steps necessary to program the
Write to Network function.
Step 1: — Load the slave address (0--90 BCD) into the first byte and the slot
number of the master DCM (0--7) into the second byte of the second level of the
accumulator stack.
Step 2: — Load the number of bytes to be transferred into the first level of the
accumulator stack.
Step 3: — Load the address of the data in the master that is to be written to the
network into the accumulator. This parameter requires a HEX value.
Step 4: — Insert the WX instruction which specifies the starting V--memory location
(Aaaa) where the data will be written to the slave.
Helpful Hint: — For parameters that require HEX values, the LDA instruction can
be used to convert an octal address to the HEX equivalent and load the value into
the accumulator.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Pointer PAll V mem. (See page 3--29)
Inputs X0--777
Outputs Y0--777
Control Relays C0--1777
Stage S0--1777
Timer T0--377
Counter CT 0--177
Special Relay SP 0--777
Program Memory $0--7679 (7.5K program mem.)
0--15873 (15.5K program mem.)
WritetoNetwork
(WX)
Standard RLL
Instructions
5--140 Standard RLL Instructions
Network Instructions
DL350 User Manual, 2nd Edition
In the following example when X1 is on and the module busy relay SP124 (see
special relays) is not on, the RX instruction will access a DCM operating as a master
in slot 2. 10 consecutive bytes of data is read from the CPU at station address 5 and
copied to V--memory locations V2000--V2004 in the slave CPU.
D
i
r
ec
t
SOFT
Handheld Programmer Keystrokes
LD
K0205
X1
The constant value K0205
specifies the slot number (2)
and the slave address (5)
LD
K10
The constant value K10
specifies the number of
bytes to be read
LDA
O 2300
WX
V2000
V2000 is the starting
location in the for the Slave
CPU where the specified
data will be written to
V2001
8534
V2002
1936
V2003
9571
V2004
1423
S
S
S
S
V1777
XXXX
V2000
3457
Master
CPU
SP124
V2005
XXXX
V2301 8534
V2302 1936
V2303 9571
V2304 1423
S
S
S
S
V2277 XXXX
V2300 3457
V2305 XXXX
Slave
CPU
Octal address 2300 is
converted to 4C0 HEX and
loaded into the accumulator.
V2300 is the starting
location for the Master CPU
where the specified data will
be read from.
STR
$
SHFT ANDST
L3
DSHFT JMP
K
SHFT ANDST
L3
D
ANDN
WSHFT STRN
SP 1
B2
C4
EENT
1
B0
AENT
SHFT
0
AINST#
O2
C3
D0
A0
AENT
SHFT SHFT AND
V2
C0
A0
A0
AENT
SET
X
ANDN
W
SHFT ANDST
L3
DSHFT JMP
K0
AENT
2
C5
F
1
BENT
Standard RLL
Instructions
5--141
Standard RLL Instructions
Message Instructions
DL350 User Manual, 2nd Edition
Message Instructions
FAULT
A aaa
The Fault instruction is used to display a
message on the handheld programmer or
DirectSOFT. The message has a
maximum of 23 characters and can be
either V--memory data, numerical
constant data or ASCII text.
To display the value in a V--memory
location, specify the V--memory location in
the instruction. To display the data in
ACON (ASCII constant) or NCON
(Numerical constant) instructions, specify
the constant (K) value for the
corresponding data label area.
Operand Data Type DL350 Range
Aaaa
V--memory VAll (See page 3--29)
Constant K1--FFFF
NOTE: The FAULT instruction takes a considerable amount of time to execute. This
is because the FAULT parameters are stored in EEPROM. Make sure you consider
the instructions execution times (shown in Appendix C) if you are attempting to use
the FAULT instructions in applications that require faster than normal execution
cycles.
Fault
(FAULT)
Standard RLL
Instructions
5--142 Standard RLL Instructions
Message Instructions
DL350 User Manual, 2nd Edition
In the following example when X1 is on, the message SW 146 will display on the
handheld programmer. The NCONs use the HEX ASCII equivalent of the text to be
displayed. (The HEX ASCII for a blank is 20, a 1 is 31, 4 is 34 ...)
DirectSOFT
Handheld Programmer Keystrokes
DLBL
K1
S
S
END
FAULT
K1
X1
S
S
ACON
ASW
NCON
K 2031
NCON
K 3436
S
S
STR
$
SHFT 4
ETMR
N3
DENT
SHFT 3
DANDST
L1
BANDST
L1
BENT
SHFT 0
A2
CINST#
OTMR
N
SHFT TMR
N2
CINST#
OTMR
N
SHFT TMR
N2
CINST#
OTMR
N
SW 146
1
BENT
ENT
ENT
3
D
3
D4
E6
G
ENT
3
D
2
C0
A1
B
RST
SANDN
W
SHFT ISG
UMLR
T
ANDST
L
5
F0
A1
BENT
Fault Example
Standard RLL
Instructions
5--143
Standard RLL Instructions
Message Instructions
DL350 User Manual, 2nd Edition
K aaa
DLBL
The Data Label instruction marks the
beginning of an ASCII / numeric data area.
DLBLs are programmed after the End
statement. A maximum of 64 DLBL
instructions can be used in a DL350
program. Multiple NCONs and ACONs can
be used in a DLBL area.
Operand Data Type DL350 Range
aaa
Constant K1--FFFF
A aaa
ACON
The ASCII Constant instruction is used
with the DLBL instruction to store ASCII
text for use with other instructions. Two
ASCII characters can be stored in an
ACON instruction. If only one character is
stored in a ACON a leading space will be
printed in the Fault message.
Operand Data Type DL350 Range
aaa
ASCII A0--9 A--Z
K aaa
NCON
The Numerical Constant instruction is
used with the DLBL instruction to store the
HEX ASCII equivalent of numerical data
for use with other instructions. Two digits
canbestoredinanNCONinstruction.
Operand Data Type DL350 Range
aaa
Constant K0--FFFF
Data Label
(DLBL)
ASCII Constant
(ACON)
Numerical
Constant
(NCON)
Standard RLL
Instructions
5--144 Standard RLL Instructions
Message Instructions
DL350 User Manual, 2nd Edition
In the following example, an ACON and two NCON instructions are used within a
DLBL instruction to build a text message. See the FAULT instruction for information
on displaying messages.
DirectSOFT
Handheld Programmer Keystrokes
DLBL
K1
S
S
END
S
ACON
ASW
NCON
K 2031
NCON
K 3436
S
S
SHFT 4
ETMR
N3
DENT
SHFT 3
DANDST
L1
BANDST
L1
BENT
SHFT 0
A2
CINST#
OTMR
N
SHFT TMR
N2
CINST#
OTMR
N
SHFT TMR
N2
CINST#
OTMR
N
ENT
3
D
3
D4
E6
G
ENT
3
D
2
C0
A1
B
ENT
RST
SANDN
W
Data Label
E
x
ample
Standard RLL
Instructions
5--145
Standard RLL Instructions
Message Instructions
DL350 User Manual, 2nd Edition
PRINT
The Print Message instruction prints the
embedded text or text/data variable
message to Port 2 on the DL350 CPU, which
must have the communications port
configured.
A aaa
“Hello, this is a PLC message”
Data Type DL350 Range
Aaaa
Constant K 1
You may recall from the CPU specifications in Chapter 3 that the DL350’s ports are
capable of several protocols. To configure a port using the Handheld Programmer,
use AUX 56 and follow the prompts, making the same choices as indicated below on
this page. To configure a port in DirectSOFT, choose the PLC menu, then Setup,
then Setup Secondary Comm Port.
SPort: From the port number list box at the top, choose “Port 2”.
SProtocol: Click the check box to the left of “Non-sequence”, and then
you’ll see the dialog box shown below.
SMemory Address: Choose a V-memory address for DirectSOFT to use
to store the port setup information. You will need to reserve 9 words in
V-memory for this purpose. Select “Use for printing” if you are only using
the port for print instructions output.
SBaud Rate: Choose the baud rate that matches your printer.
SStop Bits, Parity: Choose number of stop bits and parity setting to
match your printer.
Then click the button indicated to send the Port 2 configuration
to the CPU, and click Close. Then see Chapter 3 for port wiring
information, in order to connect your printer to the DL350.
Print Message
(PRINT)
Standard RLL
Instructions
5--146 Standard RLL Instructions
Message Instructions
DL350 User Manual, 2nd Edition
Port 2 on the DL350 has standard RS232 levels, and should work with most printer
serial input connections.
Text element -- this is used for printing character strings. The character strings are
defined as the character (more than 0) ranged by the double quotation marks. Two
hex numbers preceded by the dollar sign means an 8-bit ASCII character code. Also,
two characters preceded by the dollar sign is interpreted according to the following
table:
#Character code Description
1$$ Dollar sign ($)
2$” Double quotation (”)
3$L or $l Line feed (LF)
4$N or $n Carriage return line feed (CRLF)
5$P or $p Form feed
6$R or $r Carriage return (CR)
7$T or $t Tab
The following examples show various syntax conventions and the length of the
output to the printer.
Example:
” ” Length 0 without character
”A” Length 1 with character A
Length 1 with blank
” $” ” Length 1 with double quotation mark
” $ R $ L ” Length 2 with one CR and one LF
” $ 0 D $ 0 A ” Length 2 with one CR and one LF
” $ $ ” Length 1 with one $ mark
In printing an ordinary line of text, you will need to include double quotation marks
before and after the text string. Error code 499 will occur in the CPU when the print
instruction contains invalid text or no quotations. It is important to test your PRINT
instruction data during the application development.
The following example prints the message to port 2. We use a PD contact, which
causes the message instruction to be active for just one scan. Note the $N at the end
of the message, which produces a carriage return / line feed on the printer. This
prepares the printer to print the next line, starting from the left margin.
X1 Print the message to Port 2 when
X1 makes an off-to-on transition.
PRINT K2
“Hello, this is a PLC message.$N”
Standard RLL
Instructions
5--147
Standard RLL Instructions
Message Instructions
DL350 User Manual, 2nd Edition
V-memory element -- this is used for printing V-memory contents in the integer
format or real format. Use V-memory number or V-memory number with “:” and data
type. The data types are shown in the table below. The Character code must be all
capital letters.
NOTE: There must be a space entered before and after the V-memory address to
separate it from the text string. Failure to do this will result in an error code 499.
#Character code Description
1none 16-bit binary (decimal number)
2:B 4 digit BCD
3:D 32-bit binary (decimal number)
4:DB 8 digit BCD
5:R Floating point number (real number)
6:E Floating point number (real number
with exponent)
Example:
V2000 Print binary data in V2000 for decimal number
V2000 : B Print BCD data in V2000
V2000 : D Print binary number in V2000 and V2001 for decimal number
V2000 : D B Print BCD data in V2000 and V2001
V2000 : R Print floating point number in V2000/V2001 as real number
V2000 : E Print floating point number in V2000/V2001 as real number
with exponent
Example: The following example prints a message containing text and a variable.
The “reactor temperature” labels the data, which is at V2000. You can use the : B
qualifier after the V2000 if the data is in BCD format, for example. The final string
adds the units of degrees to the line of text, and the $N adds a carriage return / line
feed.
X1 Print the message to Port 2
when X1 makes an off-to-on
transition.
PRINT K2
“Reactor temperature = ” V2000 “deg. $N”
Message will read:
Reactor temperature = 0156 deg
represents a space
V-memory text element -- this is used for printing text stored in V-memory. Use the
% followed by the number of characters after V-memory number for representing the
text. If you assign “0” as the number of characters, the print function will read the
character count from the first location. Then it will start at the next V-memory location
and read that number of ASCII codes for the text from memory.
Example:
V2000 % 16 16 characters in V2000 to V2007 are printed.
V2000 % 0 The characters in V2001 to Vxxxx (determined by the number
in V2000) will be printed.
Standard RLL
Instructions
5--148 Standard RLL Instructions
Message Instructions
DL350 User Manual, 2nd Edition
Bit element -- this is used for printing the state of the designated bit in V-memory ora
relay bit. The bit element can be assigned by the designating point (.) and bit number
preceded by the V-memory number or relay number. The output type is described as
shown in the table below.
#Data format Description
1none Print 1 for an ON state, and 0 for an
OFF state
2: BOOL Print “TRUE” for an ON state, and
“FALSE” for an OFF state
3:ONOFF Print “ON” for an ON state, and “OFF”
for an OFF state
Example:
V2000 . 15 Prints the status of bit 15 in V2000, in 1/0 format
C100 Prints the status of C100 in 1/0 format
C100 : BOOL Prints the status of C100 in TRUE/FALSE format
C100 : ON/OFF Prints the status of C00 in ON/OFF format
V2000.15 : BOOL Prints the status of bit 15 in V2000 in TRUE/FALSE format
The maximum numbers of characters you can print is 128. The number of characters
for each element is listed in the table below:
Element type Maximum
Characters
Text, 1 character 1
16 bit binary 6
32 bit binary 11
4 digit BCD 4
8 digit BCD 8
Floating point (real number) 12
Floating point (real with exponent) 12
V-memory/text 2
Bit (1/0 format) 1
Bit (TRUE/FALSE format) 5
Bit (ON/OFF format) 3
The handheld programmer’s mnemonic is “PRINT”, followed by the DEF field.
Special relay flags SP116 and SP117 indicate the status of the DL350 CPU ports
(busy, or communications error). See the appendix on special relays for a
description.
NOTE: You must use the appropriate special relay in conjunction with the PRINT
command to ensure the ladder program does not try to PRINT to a port that is still
busy from a previous PRINT or WX or RX instruction.
16
Drum Instruction
Programming
In This Chapter....
— Introduction
— Step Transitions
— Overview of Drum Operation
— Drum Control Techniques
— Drum Instructions
Drum Instruction
Programming
6--2 Drum Instruction Programming
DL350 User Manual, 2nd Edition
Introduction
The four drum instructions available in the DL350 CPU electronically simulate an
electro-mechanical drum sequencer. The instructions offer slight variations on the
basic principle.
Drum instructions are best suited for repetitive processes consisting of a finite
number of steps. They can do the work of many rungs of ladder logic with simplicity.
Therefore, drums can save a programming and debugging time.
We introduce some terminology associated with drum instructions by describing the
original electro-mechanical drum pictured below. The mechanical drum generally
has pegs on its curved surface. The pegs are populated in a particular pattern,
representing a set of desired actions for machine control. A motor or solenoid rotates
the drum a precise amount at specific times. During rotation, stationary wipers sense
the presence of pegs (present = on, absent = off). This interaction makes or breaks
electrical contact with the wipers, creating electrical outputs from the drum. The
outputs are wired to devices on a machine for On/Off control.
Drums usually have a finite number of positions within one rotation, called steps.
Each step represents some process step. At powerup, the drum resets to a
particular step. The drum rotates from one step to the next based on a timer,oron
some external event. During special conditions, a machine operator can manually
increment the drum step using a jog control on the drum’s drive mechanism. The
contact closure of each wiper generates a unique on/off pattern called a sequence,
designed for controlling a specific machine. Because the drum is circular, it
automatically repeats the sequence once per rotation. Applications vary greatly, and
a particular drum may rotate once per second, or as slowly as once per week.
Drum
Outputs
Wipers
Pegs
Electronic drums provide the benefits of mechanical drums and more. For example,
they have a preset feature that is impossible for mechanical drums: The preset
function lets you move from the present step directly to any other step on command!
Purpose
Drum Terminology
Drum Instruction
Programming
6--3
Drum Instruction Programming
DL350 User Manual, 2nd Edition
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. Now you can view the drum as a chart as
shown below. Each row represents a step, numbered 1 through 16. Each column
represents an output, numbered 0 through 15 (to match word bit numbering). The
solid circles in the chart represent pegs (On state) in the mechanical drum, and the
open circles are empty peg sites (Off state).
1
STEP
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
fFfFffFfffFffFff
fFfFFfFffffFffFf
fFFFFfFFffffffff
FFfFFfFfFffffffF
FffFffFFFFfFFFfF
FfFffFfFFfffFffF
fffFffFfFfFfFffF
fffFffFfFfFfFFfF
fffffffFFfffFfff
fffffffFFFffffff
FfffFffffFffffFf
fFffFFffFfFFfFFf
ffFffffffffFFfFf
fffffffFfffFFfFF
FffffFfFfFfFffFF
ffFffffFfFfFFffF
123456789101112131415 0
OUTPUTS
The mechanical drum sequencer derives its name from sequences of control
changes on its electrical outputs. The following figure shows the sequence of On/Off
controls generated by the drum pattern above. Compare the two, and you will find
they are equivalent! If you can see their equivalence, you are on your way to
understanding drum instruction operation.
00
1
10
1
20
1
30
1
40
1
50
1
60
1
70
1
80
1
90
1
10 0
1
11 0
1
12 0
1
13 0
1
14 0
1
15 0
1
Output 12345678910111213141516
Step
Drum Chart
Representation
Output Sequences
Drum Instruction
Programming
6--4 Drum Instruction Programming
DL350 User Manual, 2nd Edition
Step Transitions
There are four types of Drum instructions in the DL350 CPU:
STimed Drum with Discrete Outputs (DRUM)
STime and Event Drum with Discrete Outputs (EDRUM)
SMasked Event Drum with Discrete Outputs (MDRUMD)
SMasked Event Drum with Word Output (MDRUMW)
The four drum instructions all include time-based step transitions, and three include
event-based transitions as well. Other options include outputs defined as a single
word or as individual bits, and an output mask (individual output disable/enable).
Each drum has 16 steps, and each step has 16 outputs. Refer to the figure below.
Each output can be either an X, Y, or C coil, offering programming flexibility. We
assign Step 1 an arbitrary unique output pattern (f=Off,F= On) as shown. When
programming a drum instruction, you also determine both the output assignment
and the On/Off state (pattern) atthat time. All steps use the same outputassignment,
but each step may have its own unique output pattern.
Drums move from step to step based on time and/or an external event (input). All
four drum types offer timer step transitions, and three types also offer events. The
figure below shows how timer-only transitions work.
FfffFfFffffFFfff
Step 1 Outputs:
fffFffffFFfFffFF
Step 2 Outputs:
Has counts per
step expired?
No
Yes
Increment
count timer
Use next transition criteria
The drum stays in each step for a specific duration (user-programmable). The
timebase of the timer is programmable, from 0.01 seconds to 99.99 seconds. This
establishes the resolution, or the duration of each “tick of the clock”. Each step uses
the same timebase, but has its own unique counts per step, which you program. The
drum spends a specific amount of time in each step, given by the formula:
Time in step = 0.01 seconds X Timebase x Counts per step
Drum Instruction
Types
Timer-Only
Transitions
Drum Instruction
Programming
6--5
Drum Instruction Programming
DL350 User Manual, 2nd Edition
For example, if you program a 5 second time base and 12 counts for Step 1, 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 is to make it
approximately 1/10 the duration of the shortest step in your drum. You will be able to
optimize the duration of that step in 10% increments. Other steps with longer
durations allow optimizing by even smaller increments (percentage-wise). Also,
note the drum instruction executes once per CPU scan. Therefore, it is pointless to
specify a drum timebase faster than the CPU scan time.
Time and Event Drums move from step to step based on time and/or external events.
The figure below shows how step transitions work for these drums.
Is Step event
true?
FfffFfFffffFFfff
Step 1 Outputs:
fffFffffFFfFffFF
Step 2 Outputs:
No
Yes
Increment
count timer
Has step
counts expired?
No
Yes
Use next transition criteria
When the drum enters Step 1, the output pattern shown is set. It begins polling the
external input programmed for that step. You can define event inputs as X, Y, or C
discrete point types. Suppose we select X0 for the Step 1 event input. If X0 is off, then
the drum remains in Step 1. When X0 is On, the event criteria is met and the timer
increments. The timer increments as long as the event remains true. When the
counts for Step 1 have expired, the drum moves to Step 2. The outputs change
immediately to match the new pattern for Step 2.
Timer and Event
Transitions
Drum Instruction
Programming
6--6 Drum Instruction Programming
DL350 User Manual, 2nd Edition
Time and Event drums do not have to possess both the event and the timer criteria
programmed for each step. You have the option of programming 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. Furthermore, you may elect to use only part of
the 16 steps, and only part of the 16 outputs.
Is Step event
true?
FfffFfFffffFFfff
Step 1 Outputs:
fffFffffFFfFffFF
Step 2 Outputs:
No
Yes
Use next transition criteria
Each drum instruction uses the resources of four counters in the CPU. When
programming the drum instruction, you select the first counter number. The drum
also uses the next three counters automatically. The counter bit associated with the
first counter turns on when the drum has completed its cycle, going off when the
drum is reset. These counter values and counter bit precisely indicate the progress
of the drum instruction, and can be monitored by your ladder program.
Suppose you program a timer drum to
have 8 steps, and we select CT10 for the
counter number (remember, counter
numbering is in octal). Counter usage is
shown to the right. The right column holds
typical values, interpreted below.
CT10 Counts in step V1010 1528
CT11 Timer Value V1011 0200
CT12 Preset Step V1012 0001
CT13 Current Step V1013 0004
Counter Assignments
CT10 shows you are at the 1528th count in the current step, which is step 4 (shown in
CT13). If we have programmed step 4 to have 3000 counts, the step is over half
completed. CT11 is the count timer, shown in units of 0.01 seconds. So, each
least-significant-digit change represents 0.01 seconds. The value of 200 means you
have been in the current count (1528) for 2 seconds (0.01 x 100). Finally, CT12 holds
the preset step value which was programmed into the drum instruction. When the
drum’s Reset input is active, it presets to step 1 in this case. The value of CT12 does
not change without a program edit. Counter bit CT10 turns on when the drum cycleis
complete, and turns off when the drum is reset.
Event-Only
Transitions
Counter
Assignments
Drum Instruction
Programming
6--7
Drum Instruction Programming
DL350 User Manual, 2nd Edition
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
satisfied, the drum sets the counter bit corresponding to the counter named in the
drum instruction box (such as CT0). Then it moves to a final “drum complete” state.
The drum outputs remain in the pattern defined for the last step (including any output
mask logic). Having finished a drum cycle, the Start and Jog inputs have no effect at
this point.
The drum leaves the “drum complete” state when the Reset input becomes active (or
on a program-to-run mode transition). It resets the drum complete bit (such as CT0),
and then goes directly to the appropriate step number defined as the preset step.
Are transition
conditions met?
FFFfffFffFfFFFfF
Last step Outputs:
FFFfffFffFfFFFfF
Complete Outputs:
No
Yes
Go to Preset Step
Set
CT0 = 1
Reset Input
Active?
No
Yes
Reset
CT0 = 0
(Timer and/or Event criteria)
Set Drum Complete bit
Reset Drum Complete bit
Last Step
Completion
Drum Instruction
Programming
6--8 Drum Instruction Programming
DL350 User Manual, 2nd Edition
Overview of Drum Operation
The drum instruction utilizes various inputs and outputs in addition to the drum
pattern itself. Refer to the figure below.
Reset
Preset Step
Jog *
Timebase
Counts/Step
ffFfff
ffffff
ffffFf
FFfFFf
fFFfFf
fFFfFF
fFffFF
fFFffF
Outputs Output
Mask *
Step
Control
Step
Pointer
Drum
DRUM INSTRUCTION
Block Diagram
Inputs Outputs
Final Drum
Outputs
CT0 Counts in step V1000 xxxx
CT1 Timer Value V1001 xxxx
CT2 Preset Step V1002 xxxx
CT3 Current Step V1003 xxxx
Counter #
Output Mask *
Pattern
Counter Assignments
* Asterisked inputs
are applicable only
to particular drum
instructions.
Events *
Realtime
Inputs
(from ladder)
Programming
Selections
Start
The drum instruction accepts several inputs for step control, the main control of the
drum. The inputs and their functions are:
SStart -- The Start input is effective only when Reset is off. When Start is
on, the drum timer runs if it is in a timed transition, and the drum looks
for the input event during event transitions. When Start is off, the drum
freezes in its current state (Reset must remain off), and the drum
outputs maintain their current on/off pattern.
SJog -- The jog input is only effective when Reset is off (Start may be
either on or off). The jog input increments the drum to the next step on
each off-to-on transition. Note that only the basic timer drum does not
have a jog input.
SReset -- The Reset input has priority over the Start input. When Reset is
on, the drum moves to its preset step. When Reset is off, then the Start
input operates normally.
SPreset Step -- A step number from 1 to 16 that you define (typically is
step 1). The drum moves to this step whenever Reset is on, and
whenever the CPU first enters run mode.
Drum Instruction
Block Diagram
Drum Instruction
Programming
6--9
Drum Instruction Programming
DL350 User Manual, 2nd Edition
SCounts/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 on Timer/Event drums.
STimer Value -- the current value of the counts/step timer.
SCounter # -- The counter number specifies the first of four consecutive
counters which the drum uses for step control. You can monitor these to
determine the drum’s progress through its control cycle.
SEvents -- Either an X, Y, C, S, C, CT, or SP type discrete point serves
as step transition inputs. Each step has its own event. However,
programming the event is optional on Timer/Event drums.
WARNING: The outputs of a drum are enabled any time the CPU is in Run
Mode. The Start Input does not have to be on, and the Reset input does not
disable the outputs. Upon entering Run Mode, drum outputs automatically
turn on or off according to the pattern of the preset step. This includes any
effect of the output mask when applicable.
The choice of the starting step on powerup and program-to-run mode transitions are
important to consider for your application. Please refer to the following chart. If the
counter memory is configured as non-retentive, the drum is initialized the same way
on every powerup or program-to-run mode transition. However, if the counter
memory is configured to be retentive, the drum will stay in its previous state.
Counter Num-
F
u
n
c
t
i
o
n
Initialization on Powerup
C
o
u
n
t
e
r
N
u
m
ber
F
unc
t
i
on Non-Retentive Case Retentive Case
CT(n) Current Step
Count Initialize = 0 Use Previous (no
change)
CT(n + 1) Counter Timer
Value Initialize = 0 Use Previous (no
change)
CT(n + 2) Preset Step Initialize = Preset Step # Use Previous (no
change)
CT(n + 3) Current Step # Initialize = Preset Step # Use Previous (no
change)
Applications with relatively fast drum cycle times typically will need to be reset on
powerup, using the non-retentive option. Applications with relatively long drumcycle
times may need to resume at the previous point where operations stopped, using the
retentive case. The default option is the retentive case. This means that if you
initialize scratchpad V-memory, the memory will be retentive.
Powerup State of
Drum Registers
Drum Instruction
Programming
6--10 Drum Instruction Programming
DL350 User Manual, 2nd Edition
Drum Control Techniques
Now we are ready to put together the
concepts on the previous pages and
demonstrate general control of the drum
instruction box. The drawing to the right
shows a simplified generic drum
instruction. Inputs from ladder logic
control the Start, Jog, and Reset Inputs.
The first counter bit of the drum (CT0, for
example) indicates the drum cycle is
done.
ffFfff
ffffff
ffffFf
FFfFFf
fFFfFf
fFFfFF
fFffFF
fFFffF
Outputs
Steps
Setup
Info.
X0
X1
Mask
Start
Jog
X2 Reset
The timing diagram below shows an arbitrary timer drum input sequence and how
the drum responds. As the CPU enters run mode it initializes the step number to the
preset step number (typically is Step 1). When the Start input goes high the drum
begins running, looking for an event and/or running the count timer (depending on
the drum type and setup).
After the drum enters Step 2, Reset turns On while Start is still On. Since Reset has
priority over Start, the drum goes to the preset step (Step 1). Note the drum is held in
the preset step during Reset, and that step does not run (respond to events or run the
timer) until Reset turns off.
After the drum has entered step 3, the Start input goes off momentarily, halting the
drum’s timer until Start turns on again.
Start 0
1
Jog 0
1
Step #
Drum
Complete (CT0) 0
1
Inputs
112112334...1516161611
Drum Status
Start
drum Reset
drum Hold
drum Resume
drum Drum
Complete Reset
drum
0
1
Outputs (x 16)
Reset 0
1
When the drum completes the last step (Step 16 in this example), the Drum
Complete bit (CT0) turns on, and the step number remains at 16. When the Reset
input turns on, it turns off the Drum Complete bit (CT0), and forces the drum to enter
the preset step.
NOTE: The timing diagram shows all steps using equal time durations. Step times
can vary greatly, depending on the counts/step programmed.
Drum
Control Inputs
Drum Instruction
Programming
6--11
Drum Instruction Programming
DL350 User Manual, 2nd Edition
In the figure below, we focus on how the Jog input works on event drums. To the left
of the diagram, note the off-to-on transitions of the Jog input increments the step.
Start may be either on or off (however, Reset must be off). Two jogs takes the drum to
step three. Next, the Start input turns on, and the drum begins running normally.
During step 6 another Jog input signal occurs. This increments the drum to step 7,
setting the timer to 0. The drum begins running immediately in step 7, because Start
is already on. The drum advances to step 8 normally.
As the drum enters step 14, the Start input turns off. Two more Jog signals moves the
drum to step 16. However, note that a third Jog signal is required to move the drum
through step 16 to “drum complete”. Finally, a Reset input signal arrives which forces
the drum into the preset step and turns off the drum complete bit.
Start 0
1
Reset 0
1
Step #
Drum
Complete (CT0) 0
1
Inputs
12333456,78...14151616161
Drum Status
Jog
drum Reset
drum Jog
drum Drum
Complete
0
1
Outputs (x 16)
Jog 0
1
Jog
drum
Applications often require drums that
automatically start over once they
complete a cycle. This is easily
accomplished, using the drum complete
bit. In the figure to the right, the drum
instruction setup is for CT0, so we logically
OR the drum complete bit (CT0) with the
Reset input. When the last step is done,
the drum turns on CT0 which resets itself
to the preset step, also resetting CT0.
Contact X1 still works as a manual reset.
ffFfff
ffffff
ffffFf
FFfFFf
fFFfFf
fFFfFF
fFffFF
fFFffF
Outputs
Steps
Setup
Info.
X0
X1 Mask
Start
Reset
CT0
The outputs of a drum are enabled any time the CPU is in run mode. On
program-to-run mode transitions, the drum goes to the preset step, and the outputs
energize according to the pattern of that step. If your application requires all outputs
to be off at powerup, there are two approaches:
SMake the preset step in the drum a “reset step”, with all outputs off.
SOr, use a drum with an output mask. Initialize the mask to “0000” on the
first scan using contact SP0, and LD K000 and OUT Vxxx instructions,
where Vxxxx is the location of the mask register.
Self-Resetting
Drum
Initializing Drum
Outputs
Drum Instruction
Programming
6--12 Drum Instruction Programming
DL350 User Manual, 2nd Edition
Drum Instructions
The DL350 drum instructions may be programmed using DirectSOFT or for the
EDRUM instruction only you can use a handheld programmer (firmware version
v1.8 or later. This section covers entry using DirectSOFT for all instructions plus the
handheld mnemonics for the EDRUM instruction.
The Timed Drum with Discrete Outputs is the most basic of the DL350’s drum
instructions. It operates according to the principles covered on the previous pages.
Below is the instruction in chart form as displayed by DirectSOFT.
Start
Reset
Discrete Output Assignment
Counter Number
Control
Inputs
Step Number
Counts per Step
Output Pattern
f=Off,F=On
Step Preset
Timebase
The Timed Drum features 16 steps and 16 outputs. Step transitions occur only on a
timed basis, specified in counts per step. Unused steps must be programmed with
“counts per step” = 0 (this is the default entry). The discrete output points may be
individually assigned as X, Y, or C types, or may be left unused. The output pattern
may be edited graphically with DirectSOFT.
Whenever the Start input is energized, the drum’s timer is enabled. It stops when the
last step is complete, or when the Reset input is energized. The drum enters the
preset step chosen upon a CPU program-to-run mode transition, and whenever the
Reset input is energized.
Drum Parameters Field Data Types Ranges
Counter Number aaa -- 0 -- 177
Preset Step bb K1--16
Timer base cccc K 0 -- 99.99 seconds
Counts per step dddd K0 -- 9999
Discrete Outputs Fffff X, Y, C see page 3--29
Timed Drum with
Discrete Outputs
(DRUM)
Drum Instruction
Programming
6--13
Drum Instruction Programming
DL350 User Manual, 2nd Edition
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 CT(n+2) at any time. However, the other counters are for monitoring
purposes only.
Counter Number Ranges of (n) Function Counter Bit Function
CT(n) 0 -- 124 Counts in step CTn = Drum Complete
CT( n+1) 1 -- 125 Timer value CT(n+1) = (not used)
CT( n+2) 2 --126 Preset Step CT(n+2) = (not used)
CT( n+3) 3 --127 Current Step CT(n+1) = (not used)
The following ladder program shows the DRUM instruction in a typical ladder
program, as shown by DirectSOFT. Steps 1 through 10 are used, and twelve of the
sixteen output points are used. The preset step is step 1. The timebase runs at 100
mS per count. Therefore, the duration of step 1 is (25 x 0.1) = 2.5 seconds. In the last
rung, the Drum Complete bit (CT0) turns on output Y0 upon completion of the last
step (step 10). A drum reset also resets CT0.
Drum Instruction
Programming
6--14 Drum Instruction Programming
DL350 User Manual, 2nd Edition
The Event Drum with Discrete Outputs has all the features of the Timed Drum, plus
event-based step transitions. It operates according to the general principles of drum
operation covered in the beginning of this section. Below is the instruction in chart
form as displayed by DirectSOFT.
Discrete Output Assignment
Counter Number
Step Preset
Control
Inputs
Step Number
Counts per Step
Output Pattern
f=Off,F=On
Start
Reset
Jog
Event per step
EDRUM1
Timebase
The Event Drum with Discrete Outputs features 16 steps and 16 outputs. Step
transitions occur on timed and/or event basis. The jog input also advances the step
on each off-to-on transition. Time is specified in counts per step, and events are
specified as discrete contacts. Unused steps must be programmed with “counts per
step” = 0, and event = “0000”. The discrete output points may be individually
assigned. The output pattern may be edited graphically with DirectSOFT.
Whenever the Start input is energized, the drum’s timer is enabled. As long as the
event is true for the current step, the timer runs during that step. When the step count
equals the counts per step, the drum transitions to the next step. This process stops
when the last step is complete, or when the Reset input is energized. The drum
enters the preset step chosen upon a CPU program-to-run mode transition, and
whenever the Reset input is energized.
Drum Parameters Field Data Types Ranges
Counter Number aaa -- 0 -- 177
Preset Step bb K1--16
Timer base cccc K 0 -- 99.99 seconds
Counts per step dddd K0 -- 9999
Event eeee X, Y, C, S, T, ST
Discrete Outputs Fffff X, Y, C ,
Event Drum with
Discrete Outputs
(EDRUM)
Drum Instruction
Programming
6--15
Drum Instruction Programming
DL350 User Manual, 2nd Edition
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 CT(n+2) at any time. However, the other counters are for monitoring
purposes only.
Counter Number Ranges of (n) Function Counter Bit Function
CT(n) 0 -- 124 Counts in step CTn = Drum Complete
CT( n+1) 1 -- 125 Timer value CT(n+1) = (not used)
CT( n+2) 2 --126 Preset Step CT(n+2) = (not used)
CT( n+3) 3 --127 Current Step CT(n+1) = (not used)
The following ladder program shows the EDRUM instruction in a typical ladder
program, as shown by DirectSOFT. Steps 1 through 11 are used, and all sixteen
output points are used. The preset step is step 1. The timebase runs at 100 mS per
count. Therefore, the duration of step 1 is (5 x 0.1) = 0.5 seconds. Note that step 1 is
time-based only (event = “K0000”). And, the output pattern for step 1 programs all
outputs off, which is a typically desirable powerup condition. In the last rung, the
Drum Complete bit (CT4) turns on output Y0 upon completion of the last step (step
10). A drum reset also resets CT4.
Drum Instruction
Programming
6--16 Drum Instruction Programming
DL350 User Manual, 2nd Edition
The handheld programmer can also enter or edit drum instructions. The diagram
below lists the keystrokes for entering the drum example on the previous page.
NOTE: Drum editing requires Handheld Programmer firmware version 1.8 or later.
Handheld Programmer Keystrokes
Start
( DEF K0001)
Reset
Drum Inst.
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF K0000 )
Preset Step
Time Base
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
Outputs
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
Counts/
Step
skip over
unused steps
NOTE: You may use the NXT and PREV keys
to skip past entries for unused outputs or steps.
(Continued on next page)
Jog
STR
$0
A
STR
$1
B
STR
$2
C
SHFT 4
E3
DORN
RISG
UORST
M0
AENT
4
E
6
G
NEXT
NEXT
ENT
ENT
ENT
SHFT 2
C7
HNEXT
SHFT 2
C0
ANEXT
1
B
SHFT MLS
Y1
BNEXT
SHFT MLS
YNEXT
4
E
SHFT MLS
Y5
FNEXT
SHFT MLS
Y6
GNEXT
SHFT 2
C4
ENEXT
SHFT 2
C2
CNEXT
SHFT MLS
YNEXT
0
A
SHFT MLS
YNEXT
2
C
SHFT 2
C1
B4
ENEXT
SHFT 2
CNEXT
3
D0
A
SHFT MLS
YNEXT
6
G
SHFT MLS
YNEXT
7
H
SHFT 2
C3
D4
ENEXT
SHFT MLS
Y1
BNEXT
1
16
1
16
5
FNEXT
2
C0
ANEXT
1
B5
F0
ANEXT
4
E5
FNEXT
1
B8
I0
ANEXT
9
J2
C3
DNEXT
1
B0
ANEXT
2
C
8
I6
G4
ENEXT
1
B2
C0
A0
ANEXT
4
E0
A0
ANEXT
NEXT
NEXT
NEXT
NEXT
NEXT
NEXT
Handheld Programmer Keystrokes cont’d
Drum Instruction
Programming
6--17
Drum Instruction Programming
DL350 User Manual, 2nd Edition
Handheld Programmer Keystrokes cont’d
Output
Pattern
unused steps
NOTE: You may use the NXT and PREV keys
to skip past entries for unused outputs or steps.
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
skip over unused event ( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
( DEF K0000 )
step 1 pattern = 0000
Last rung
Events
6
G
1
16
NEXT
SHFT MLS
Y4
ENEXT
SHFT SET
X1
BNEXT
SHFT SET
X2
CNEXT
SHFT 2
C0
ANEXT
SHFT 2
CNEXT
1
B
SHFT SET
XNEXT
0
A
SHFT SET
XNEXT
5
F
SHFT SET
X3
DNEXT
SHFT MLS
Y7
HNEXT
SHFT 2
C2
C0
ANEXT
NEXT
NEXT
NEXT
NEXT
NEXT
NEXT
9
J8
I1
BNEXT
2
C
2
C8
I9
J4
ENEXT
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
( DEF 0000 )
4
E4
E7
HNEXT
5
F1
B6
G9
JNEXT
9
J3
D4
E3
DNEXT
4
E4
E8
I6
GNEXT
9
J4
E5
FNEXT
9
J
3
D8
ISHFT 0
ANEXT
5
F8
I6
G4
ENEXT
8
I4
E4
E7
HNEXT
NEXT
NEXT
NEXT
NEXT
NEXT
1
16
Handheld Programmer Keystrokes cont’d
STR
$CNT
GY 0
ANEXT
SHFT MLS
Y0
ANEXT
Drum Instruction
Programming
6--18 Drum Instruction Programming
DL350 User Manual, 2nd Edition
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. Below
is the instruction in chart form as displayed by DirectSOFT.
Discrete Output Assignment
Counter Number Step Preset
Timebase
Control
Inputs
Step Number
Counts per Step
Start
Reset
Jog
Event per step
Output Mask Word
Output Pattern
f=Off,F=On
MDRUMD1
The Masked Event Drum with Discrete Outputs features sixteen steps and sixteen
outputs. Drum outputs are logically ANDed bit-by-bit with an output mask word for
each step. The Ggggg field specifies the beginning location of the 16 mask words.
Step transitions occur on timed and/or event basis. The jog input also advances the
step on each off-to-on transition. Time is specified in counts per step, and events are
specified as discrete contacts. Unused steps must be programmed with “counts per
step” = 0, and event = “0000”.
Whenever the Start input is energized, the drum’s timer is enabled. As long as the
event is true for the current step, the timer runs during that step. When the step count
equals the counts per step, the drum transitions to the next step. This process stops
when the last step is complete, or when the Reset input is energized. The drum
enters the preset step chosen upon a CPU program-to-run mode transition, and
whenever the Reset input is energized.
Drum Parameters Field Data Types Ranges
Counter Number aaa -- 0 -- 177
Preset Step bb K1--16
Timer base cccc K 0 -- 99.99 seconds
Counts per step dddd K0 -- 9999
Event eeee X, Y, C, S, T, ST
Discrete Outputs Fffff X, Y, C
Output Mask Ggggg V
Masked
Event Drum with
Discrete Outputs
(MDRUMD)
Drum Instruction
Programming
6--19
Drum Instruction Programming
DL350 User Manual, 2nd Edition
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 CT(n+2) at any time. However, the other counters are for monitoring
purposes only.
Counter Number Ranges of (n) Function Counter Bit Function
CT(n) 0 -- 124 Counts in step CTn = Drum Complete
CT( n+1) 1 -- 125 Timer value CT(n+1) = (not used)
CT( n+2) 2 --126 Preset Step CT(n+2) = (not used)
CT( n+3) 3 --127 Current Step CT(n+1) = (not used)
The following ladder program shows the MDRUMD instruction in a typical ladder
program, as shown by DirectSOFT. Steps 1 through 11 are used, and all 16 output
points are used. The output mask word is at V2000. The final drum outputs are
shown above the mask word as individual bits. The data bits in V2000 are logically
ANDed with the output pattern of the current step in the drum. If you want all drum
outputs to be off after powerup, write zeros to V2000 on the first scan. Ladder logic
may update the output mask at any time to enable or disable the drum outputs. The
preset step is step 1. The timebase runs at 100 mS per count. Therefore, the
duration of step 1 is (5 x 0.1) = 0.5 seconds. Note that step 1 is time-based only
(event -- “K0000”). In the last rung, the Drum Complete bit (CT10) turns on output Y0
upon completion of the last step (step 10). A drum reset also resets CT10.
DirectSOFT Display
NOTE: The ladder program must load constants in V2000 through
V2012 to cover all mask registers for the eleven steps used in this drum.
Drum Instruction
Programming
6--20 Drum Instruction Programming
DL350 User Manual, 2nd Edition
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. Below is the
instruction in chart form as displayed by DirectSOFT.
Word Output Assignment
Counter Number Step Preset
Timebase
Control
Inputs
Step Number
Counts per Step
Start
Reset
Jog
Event per step
Output Mask Word
Output Pattern
f=Off,F=On
MDRUMW1
The Masked Event Drum with Word Output features sixteen steps and sixteen
outputs. Drum outputs are logically ANDed bit-by-bit with an output mask word for
each step. The Ggggg field specifies the beginning location of the 16 mask words,
creating the final output (Fffff field). Step transitions occur on timed and/or event
basis. The jog input also advances the step on each off-to-on transition. Time is
specified in counts per step, and events are specified as discrete contacts. Unused
steps must be programmed with “counts per step” = 0, and event = “0000”.
Whenever the Start input is energized, the drum’s timer is enabled. As long as the
event is true for the current step, the timer runs during that step. When the step count
equals the counts per step, the drum transitions to the next step. This process stops
when the last step is complete, or when the Reset input is energized. The drum
enters the preset step chosen upon a CPU program-to-run mode transition, and
whenever the Reset input is energized.
Drum Parameters Field Data Types Ranges
Counter Number aaa -- 0 -- 177
Preset Step bb K1--16
Timer base cccc K 0 -- 99.99 seconds
Counts per step dddd K0 -- 9999
Event eeee X, Y, C, S, T, ST see page 3--29
Word Output Fffff Vsee page 3--29
Output Mask Ggggg Vsee page 3--29
Masked
Event Drum with
Word Output
(MDRUMW)
Drum Instruction
Programming
6--21
Drum Instruction Programming
DL350 User Manual, 2nd Edition
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 CT(n+2) at any time. However, the other counters are for monitoring
purposes only.
Counter Number Ranges of (n) Function Counter Bit Function
CT(n) 0 -- 124 Counts in step CTn = Drum Complete
CT( n+1) 1 -- 125 Timer value CT(n+1) = (not used)
CT( n+2) 2 --126 Preset Step CT(n+2) = (not used)
CT( n+3) 3 --127 Current Step CT(n+1) = (not used)
The following ladder program shows the MDRUMD instruction in a typical ladder
program, as shown by DirectSOFT. Steps 1 through 11 are used, and all sixteen
output points are used. The output mask word is at V2000. The final drum outputs
are shown above the mask word as a word at V2001. The data bits in V2000 are
logically ANDed with the output pattern of the current step in the drum, generating
the contents of V2001. If you want all drum outputs to be off after powerup, write
zeros to V2000 on the first scan. Ladder logic may update the output mask at any
time to enable or disable the drum outputs. The preset step is step 1. The timebase
runs at 50 mS per count. Therefore, the duration of step 1 is (5 x 0.1) = 0.5 seconds.
Note that step 1 is time-based only (event -- “K0000”). In the last rung, the Drum
Complete bit (CT14) turns on output Y0 upon completion of the last step (step 10). A
drum reset also resets CT14.
DirectSOFT Display
NOTE: The ladder program must load constants in V2000 through
V2012 to cover all mask registers for the eleven steps used in this drum.
1
17
RLLPLUS
Stage Programming
In This Chapter....
— Introduction to Stage Programming
— Learning to Draw State Transition Diagrams
— Using the Stage Jump Instruction for State Transitions
— Stage Program Example: Toggle On/Off Lamp Controller
— Four Steps to Writing a Stage Program
— Stage Program Example: A Garage Door Opener
— Stage Program Design Considerations
— Parallel Processing Concepts
— Managing Large Programs
—RLL
PLUS Instructions
— Questions and Answers About Stage Programming
RLL
Stage Programming
PLUS
7--2 RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
Introduction to Stage Programming
Stage Programming 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
programming. This is why Stage Programming is also called RLLPLUS. You will not
have to discard any training or experience you already have. Stage programming
simply allows you to divide and organize a RLL program into groups of ladder
instructions called stages. This allows quicker and more intuitive ladder program
development than traditional RLL alone provides.
Many PLC programmers in the industry
have become comfortable using RLL for
every PLC program they write... but often
remain skeptical or even fearful of learning
new techniques such as stage
programming. While RLL is great at
solving boolean logic relationships, it has
disadvantages as well:
SLarge programs can become almost
unmanageable, because of a lack of
structure.
SIn RLL, latches must be tediously
created from self-latching relays.
SWhen a process gets stuck, it is
difficult to find the rung where the
error occurred.
SPrograms become difficult to modify
later, because they do not intuitively
resemble the application problem
they are solving.
STAGE!
Y2
X3
OUT
X0
RST
C0
X4
SET
Y0
C1
It’s easy to see that these inefficiencies consume a lot of additional time, and time is
money. Stage programming overcomes these obstacles! We believe a few
moments of studying the stage concept is one of the greatest investments in
programming speed and efficiency a PLC programmer can make!
So, we encourage you to study stage programming and add it to your “toolbox” of
programming techniques. This chapter is designed as a self-paced tutorial on stage
programming. For best results:
SStart at the beginning and do not skip over any sections.
SStudy each stage programing concept by working through each
example. The examples build progressively on each other.
SRead the Stage Questions and Answers at the end of the chapter for a
quick review.
Overcoming
“Stage Fright”
RLL
Stage Programming
PLUS
7--3
RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
Learning to Draw State Transition Diagrams
Those familiar with ladder program
execution know the CPU must scan the
ladder program repeatedly, over and over.
Its three basic steps are:
1. Read the inputs
2. Execute the ladder program
3. Write the outputs
The benefit is that a change at the inputs
can affect the outputs in a few
milliseconds.
Ladder
Program
Inputs Outputs
1) Read Execute Write
PLC Scan
Execute Write
(etc....)
2) Read
3) Read
Most manufacturing processes consist of a series of activities or conditions , each
lasting for several seconds. minutes, or even hours. We might call these “process
states”, which are either active or inactive at any particular time. A challenge for RLL
programs is that a particular input event may last for a brief instant. We typically
create latching relays in RLL to preserve the input event in order to maintain a
process state for the required duration.
We can organize and divide ladder logic into sections called “stages”, representing
process states. But before we describe stages in detail, we will reveal the secret to
understanding stage programming: state transition diagrams.
Sometimes we need to forget about the scan nature of PLCs, and focus our thinking
toward the states of the process we need to identify. Clear thinking and concise
analysis of an application gives us the best chance at writing efficient, bug-free
programs. State diagrams are tools to help us draw a picture of our process! You will
discover that if we can get the picture right, our program will also be right!
Consider the simple process shown to the
right, which controls an industrial motor.
We will use a green momentary SPST
pushbutton to turn the motor on, and a red
one to turn it off. The machine operator will
press the appropriate pushbutton for a
second or so. The two states of our
process are ON and OFF.
The next step is to draw a state transition
diagram, as shown to the right. It shows
the two states OFF and ON, with two
transition lines in-between. When the
event X0 is true, we transition from OFF to
ON. When X1 is true, we transition from
ON to OFF.
Ladder
Program
Inputs Outputs
On
Off
Motor
X0
X1
Y0
OFF ON
X0
X1
Output equation: Y0 = ON
State
Transition condition
If you’re following along, you are very close to grasping the concept and the
problem-solving power of state transition diagrams. The output of our controller is
Y0, which is true any time we are in the ON state. In a boolean sense, Y0=ON state.
Next, we will implement the state diagram first as RLL, then as a stage program. This
will help you see the relationship between the two methods in problem solving.
Introduction to
Process States
The Need for State
Diagrams
A 2--State Process
RLL
Stage Programming
PLUS
7--4 RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
The state transition diagram to the right is
a picture of the solution we need to create.
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!
OFF ON
X0
X1
Output equation: Y0 = ON
First, we will translate the state diagram to traditional RLL. Then we will show how
easy it is to translate the diagram into a stage programming solution.
The RLL solution is shown to the right. It
consists of a self-latching control relay,
C0. When the On momentary pushbutton
(X0) is pressed, output coil C0 turns on
and the C0 contact on the second row
latches itself on. So, X0 sets the latch C0
on, and it remains on after the X0 contact
opens. The motor output Y0 also has
power flow, so the motor is now on.
When the Off pushbutton (X1) is pressed,
it opens the normally-closed X1 contact,
which resets the latch. Motor output Y0
turns off when the latch coil C0 goes off.
X1X0
OUT
C0
OUT
Y0
C0
Set Reset Latch
Output
Latch
The stage program solution is shown to
the right. The two inline stage boxes S0
and S1 correspond to the two states OFF
and ON. The ladder rung(s) below each
stage box belong to each respective
stage. This means the PLC only has to
scan those rungs when the corresponding
stage is active!
For now, let’s assume we begin in the OFF
State, so stage S0 is active. When the On
pushbutton (X0) is pressed, a stage
transition occurs. The JMP S1 instruction
executes, which simply turns off the Stage
bit S0 and turns on Stage bit S1. So on the
next PLC scan, the CPU will not execute
Stage S0, but will execute stage S1!
In the On State (Stage S1), we want the
motor to always be on. The special relay
contact SP1 is defined as always on, so Y0
turns the motor on.
S1
X0
JMP
SG
S0
S0
X1
JMP
SG
S1
OUT
Y0
OFF State
ON State
Output
Transition
Transition
SP1 Always on
When the Off pushbutton (X1) is pressed, a transition back to the Off State occurs.
The JMP S0 instruction executes, which simply turns off the Stage bit S1 and turns
on Stage bit S0. On the next PLC scan, the CPU will not execute Stage S1, so the
motor output Y0 will turn off. The Off state (Stage 0) will be ready for the next cycle.
RLL Equivalent
Stage Equivalent
RLL
Stage Programming
PLUS
7--5
RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
You may be thinking “I don’t see the big advantage to Stage Programming... in fact,
the stage program is longer than the standard RLL program”. As control problems
grow in complexity, stage programming quickly out-performs RLL in simplicity,
program size, etc.
For example, consider the diagram below.
Notice how easy it is to correlate the OFF
and ON states of the state transition
diagram below to the stage program at the
right. Now, we challenge anyone to
easily identify the same states in the
RLL program on the previous page!
S1
X0
JMP
SG
S0
S0
X1
JMP
SG
S1
OUT
Y0
OFF State
ON State
SP1
OFF ON
X0
X1
At powerup and Program--to--Run Mode
transitions, the PLC always begins with all
normal stages (SG) off. So, the stage
programs shown so far have actually had no
way to get started (because rungs are not
scanned unless their stage is active).
Assume that we want to always begin in the
Off state (motor off), which is how the RLL
program works. The Initial Stage (ISG) is
defined to be active at powerup. In the
modified program to the right, we have
changed stage S0 to the ISG type. This
ensures the PLC will scan contact X0 after
powerup, because Stage S0 is active. After
powerup, an Initial Stage (ISG) works like
any other stage!
We can change both programs so the motor is
ON at powerup. In the RLL below, we must add
a first scan relay SP0, latching C0 on. In the
stage example to the right, we simply make
Stage S1 an initial stage (ISG) instead of S0.
S1
X0
JMP
ISG
S0
S0
X1
JMP
SG
S1
OUT
Y0
Initial Stage
SP1
S1
X0
JMP
SG
S0
S0
X1
JMP
ISG
S1
OUT
Y0
Initial Stage
SP1
X1X0
OUT
C0
OUT
Y0
C0
First Scan
SP0
PowerupinOFFState
PowerupinONState
PowerupinONState
NOTE: If the ISG is within the retentive range for stages, the ISG will remain in the
state it was in before power down and will NOT turn itself on during the first scan.
Let’s Compare
Initial Stages
7--6 RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
Mark the 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.
OFF ON
X0
X1
Powerup
You may recall that a stage is a section of ladder program which is either active or
inactive at a given moment. All stage bits (S0 -- Sxxx) reside in the PLCs image
register as individual status bits. Each stage bit is either a boolean 0 or 1 at any time.
Program execution always reads ladder rungs from top to bottom, and from left to
right. The drawing below shows the effect of stage bit status. The ladder rungs below
the stage instruction continuing until the next stage instruction or the end of program
belong to stage 0. Its equivalent operation is shown on the right. When S0 is true, the
two rungs have power flow.
SIf Stage bit S0 = 0, its ladder rungs are not scanned (executed).
SIf Stage bit S0 = 1, its ladder rungs are scanned (executed).
SG
S0
Actual Program Appearance Functionally Equivalent Ladder
S0
(includes all rungs in stage)
The inline stage boxes on the left power
rail divide the ladder program rungs into
stages. Some stage rules are:
SExecution -- Only logic in active
stages are executed on any scan.
STransitions -- Stage transition
instructions take effect on the next
occurrence of the stages involved.
SOctal numbering -- Stages are
numbered in octal, like I/O points,
etc. So “S8” is not valid.
STotal Stages -- The maximum
number of stages is CPU-dependent.
SNo duplicates -- Each stage number
is unique and can be used once.
SAny order -- You can skip numbers
and sequence the stage numbers in
any order.
SLast Stage -- the last stage in the
ladder program includes all rungs
from its stage box until the end coil.
SG
S0
SG
S1
SG
S2
END
What Stage Bits Do
Stage Instruction
Characteristics
RLL
Stage Programming
PLUS
7--7
RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
Using the Stage Jump Instruction for State Transitions
The Stage JMP instruction 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. The
two stage examples shown below are equivalent. The Stage Jump instruction is
equal to a Stage Reset of the current stage, plus a Stage Set instruction for the stage
you want to transition.
S1
X0
JMP
SG
S0
Equivalent S0
X0
RST
SG
S0
S1
SET
S0 S1
X0
Please Read Carefully -- The jump instruction is easily misunderstood. The “jump”
does not occur immediately like a GOTO or GOSUB program control instruction
when executed. Here’s how it works:
SThe jump instruction resets the stage bit of the stage in which it occurs.
All rungs in the stage still finish executing during the current scan, even
if there are other rungs in the stage below the jump instruction!
SThe reset will be in effect on the following scan, so the stage that
executed the jump instruction previously will be inactive and bypassed.
SThe stage bit of the stage named in the Jump instruction will be set
immediately, so the stage will be executed on its next occurrence. In the
left program shown below, stage S1 executes during the same scan as
the JMP S1 occurs in S0. In the example on the right, Stage S1
executes on the next scan after the JMP S1 executes, because stage
S1 is located above stage S0.
S1
X0
JMP
SG
S0
Y0
S1
OUT
SG
S1
S1
X0
JMP
SG
S0
Y0
S1
OUT
SG
S1
Executes on same
scan as Jmp
Executes on next
scan after Jmp
NOTE: Assume we start with Stage 0 active and Stage 1 inactive for both examples.
Stage Jump, Set,
and Reset
Instructions
RLL
Stage Programming
PLUS
7--8 RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
Stage Program Example: Toggle On/Off Lamp Controller
In the process shown to the right, an
ordinary momentary pushbutton is used to
control a light bulb. The ladder program
will latch the switch input. Push and
release to turn on the light, push and
release again to turn it off (sometimes
called toggle function). You could buy a
mechanical switch with the alternate
on/off action built in... However, this
example is educational and also fun!
Next draw the state transition diagram.A
typical first approach is to use X0 for both
transitions (like the example shown to the
right). However, this is incorrect (please
keep reading).
Ladder
Program
Inputs Outputs
Toggle X0 Y0
OFF ON
X0
X0
Output equation: Y0 = ON
Powerup
This example differs from the motor example, because there is only one pushbutton.
When the pushbutton is pressed, both transition conditions are met. If implemented
in Stage, this solution would flash the light on or off each scan (obviously
undesirable)!
The solution is to make the the push and the release of the pushbutton separate
events. Refer to the new state transition diagram below. At powerup enter the OFF
state. When switch X0 is pressed, enter the Press-ON state. When it is released,
enter the ON state. Note that X0 with the bar above it denotes X0 NOT.
When in the ON state, another push and
release cycle similarly takes us back to the
OFF state. Now there are two unique states
(OFF and ON) used when the pushbutton is
released, which is what was required to solve
the control problem.
The equivalent stage program is shown to the
right. The desired powerup state is OFF,
therefore, make S0 an initial stage (ISG). In
the ON state, add special relay contact SP1,
which is always on.
Note that even as the programs grow more
complex, it is still easy to correlate the state
transition diagram with the stage program!
S1
X0
JMP
ISG
S0
S2
JMP
SG
S1
OUT
Y0
OFF State
SP1
S3
X0
JMP
SG
S2
SG
S3
X0
S0
JMP
X0
Push--On State
ON State
Push--Off State
X0 Push--ON
ON
Push--OFF
OFF
Powerup X0
X0
X0
Output equation: Y0 = ON
Output
A 4--State Process
RLL
Stage Programming
PLUS
7--9
RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
Four Steps to Writing a Stage Program
By now, you’ve probably noticed that the same steps are followed to solve each
example problem. The steps will probably come to you automatically if you work
through all the examples in this chapter. It’s helpful to have a checklist to guide
through the problem solving. The following steps summarize the stage program
design procedure:
1. Write a Word Description of the application.
Describe all functions of the process in your own words. Start by listing what
happens first, then next, etc. If you find there are too many things happening at once,
try dividing the problem into more than one process. Remember, you can still have
the processes communicate with each other to coordinate their overall activity.
2. Draw the Block Diagram.
Inputs represent all the information the process needs for decisions, and outputs
connect to all devices controlled by the process.
SMake lists of inputs and outputs for the process.
SAssign I/O point numbers (X and Y) to physical inputs and outputs.
3. Draw the State Transition Diagram.
The state transition diagram describes the central function of the block diagram,
reading inputs and generating outputs.
SIdentify and name the states of the process.
SIdentify the event(s) required for each transition between states.
SEnsure the process has a way to re-start itself, or is cyclical.
SChoose the powerup state for your process.
SWrite the output equations.
4. Write the Stage Program.
Translate the state transition diagram into a stage program.
SMake each state a stage. Remember to number stages in octal. Up to
1024 total stages are available in the DL350 CPUs.
SPut transition logic inside the stage which originates each transition (the
stage each arrow points away from).
SUse an initial stage (ISG) for any states that must be active at powerup.
SPlace the outputs or actions in the appropriate stages.
You will notice that Steps 1 through 3 prepare us to write the stage program in Step 4.
However, the program virtually writes itself because of the preparation beforehand.
Soon you will be able to start with a word description of an application and create a
stage program in one easy session!
RLL
Stage Programming
PLUS
7--10 RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
Stage Program Example: A Garage Door Opener
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. We will start
by achieving the basic operation, waiting
to add extra features later (stage
programs are very easy to modify).
Our garage door controller has a motor
which raises or lowers the door on
command. The garage owner pushes and
releases a momentary pushbutton once to
raise the door. After the door is up, another
push-release cycle will lower the door.
In order to identify the inputs and outputs
of the system, it’s sometimes helpful to
sketch its main components, as shown in
the door side view to the right. The door
has an up limit and a down limit switch.
Each limit switch closes only when the
door has reached the end of travel in the
corresponding direction. In the middle of
travel, neither limit switch is closed.
The motor has two command inputs: raise
and lower. When neither input is active,
the motor is stopped.
The door command is a simple
pushbutton. Whether wall-mounted as
shown, or a radio-remote control, all door
control commands logically OR together
as one pair of switch contacts.
Down limit switch
Up limit switch
Motor Raise
Lower
Door
Command
The block diagram of the controller is
shown to the right. Input X0 is from the
pushbutton door control. Input X1
energizes when the door reaches the full
up position. Input X2 energizes when the
door reaches the full down position. When
the door is positioned between fully up or
down, both limit switches are open.
The controller has two outputs to drive the
motor. Y1 is the up (raise the door)
command, and Y2 is the down (lower the
door) command.
Ladder
Program
Inputs Outputs
Toggle X0
Y1
To motor:
Raise
Y2 Lower
Up limit X1
Down limit
X2
Garage Door
Opener Example
Draw the Block
Diagram
RLL
Stage Programming
PLUS
7--11
RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
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.
SWhen the door is down (DOWN state), nothing happens until X0
energizes. Its push and release brings us to the RAISE state, where
output Y1 turns on and causes the motor to raise the door.
SWe transition to the UP state when the up limit switch (X1) energizes,
and turns off the motor.
SThen nothing happens until another X0 press-release cycle occurs. That
takes us to the LOWER state, turning on output Y2 to command the
motor to lower the door. We transition back to the DOWN state when the
down limit switch (X2) energizes.
The equivalent stage program is shown to the
right. For now, we will assume the door is
down at powerup, so the desired powerup
state is DOWN. We make S0 an initial stage
(ISG). Stage S0 remains active until the door
control pushbutton activates. Then we
transition (JMP) to Push-UP stage, S1.
A push-release cycle of the pushbutton takes
us through stage S1 to the RAISE stage, S2.
We use the always-on contact SP1 to
energize the motor’s raise command, Y1.
When the door reaches the fully-raised
position, the up limit switch X1 activates. This
takes us to the UP Stage S3, where we wait
until another door control command occurs.
In the UP Stage S3, a push-release cycle of
the pushbutton will take us to the LOWER
Stage S5, where we activate Y2 to command
the motor to lower the door. This continues
until the door reaches the down limit switch,
X2. When X2 closes, we transition from Stage
S5 to the DOWN stage S0, where we began.
NOTE: The only special thing about an initial
stage (ISG) is that it is automatically active at
powerup. Afterwards, it is like any other.
S1
X0
JMP
ISG
S0
S2
JMP
SG
S1
OUT
Y1
DOWN State
SP1
S3
X1
JMP
SG
S2
SG
S3
X0
S4
JMP
X0
Push--UP State
RAISE State
UP State
X0 Push--UP
UP
Push--
DOWN
DOWN
X0
LOWER
RAISE
X0 X1
X0
X2
Output equations: Y2 = LOWERY1 = RAISE
S5
JMP
SG
S4
X0
Push--DOWN State
OUT
Y2
SP1
S0
X2
JMP
SG
S5 LOWER State
Powerup
Draw the State
Diagram
RLL
Stage Programming
PLUS
7--12 RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
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.
The safety light is standard on many
commercially-available garage door
openers. It is shown to the right, mounted
on the motor housing. The light turns on
upon any door activity, remaining on for
approximately 3 minutes afterwards.
This part of the exercise will demonstrate
the use of parallel states in our state
diagram. Instead of using the JMP
instruction, we will use the set and reset
commands.
Safety light
To control the light bulb, we add an output
to our controller block diagram, shown to
the right, Y3 is the light control output.
In the diagram below, we add an additional
state called “LIGHT”. Whenever the
garage owner presses the door control
switch and releases, the RAISE or
LOWER state is active and the LIGHT
state is simultaneously active. The line to
the Light state is dashed, because it is not
the primary path.
Ladder
Program
Inputs Outputs
Toggle X0 Y1 Raise
Y2 Lower
Up limit X1
Down limit
X2 Y3 Light
We can think of the Light state as a parallel process to the raise and lower state. The
paths to the Light state are not a transition (Stage JMP), but a State Set command. In
the logic of the Light stage, we will place a three-minute timer. When it expires, timer
bit T0 turns on and resets the Light stage. The path out of the Light stage goes
nowhere, indicating the Light stage becomes inactive, and the light goes out!
X0 Push--UP
UP
Push--DOWN
DOWN
X0
LOWER
RAISE
X0
X1
X0
X2
Output equations: Y2 = LOWER
Y1 = RAISE
LIGHT
Y3 = LIGHT
X0
X0
T0
Add Safety
Light Feature
Modify the
Block Diagram and
State Diagram
RLL
Stage Programming
PLUS
7--13
RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
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. When contact X0
opens, we transition from S1 and go to two
new active states: S2 and S6. In the
Push-DOWN state S4, we make the same
additions. So, any time someone presses
the door control pushbutton, the light turns
on.
Most new stage programmers would be
concerned about where to place the Light
Stage in the ladder, and how to number it.
The good news is that it doesn’t matter!
SChoose an unused Stage number,
and use it for the new stage and as
the reference from other stages.
SPlacement in the program is not
critical, so we place it at the end.
You might think that each stage has to be
directly under the stage that transitions to
it. While it is good practice, it is not
required (that’s good, because our two
locations for the Set S6 instruction make
that impossible). Stage numbers and how
they are used determines the transition
paths.
In stage S6, we turn on the safety light by
energizing Y3. Special relay contact SP1
is always on. Timer T0 times at 0.1 second
per count. To achieve 3 minutes time
period, we calculate:
The timer has power flow whenever stage
S6 is active. The corresponding timer bit
T0 is set when the timer expires. So three
minutes later, T0=1 and the instruction
Reset S6 causes the stage to be inactive.
While Stage S6 is active and the light is on,
stage transitions in the primary path
continue normally and independently of
Stage 6. That is, the door can go up, down,
or whatever, but the light will be on for
precisely 3 minutes.
S1
X0
JMP
ISG
S0
S2
JMP
SG
S1
OUT
Y1
DOWN State
SP1
S3
X1
JMP
SG
S2
SG
S3
X0
S4
JMP
X0
Push--UP State
RAISE State
UP State
S5
JMP
SG
S4
X0
Push--DOWN State
OUT
Y2
SP1
S0
X2
JMP
SG
S5 LOWER State
OUT
Y3
SP1
S6
T0
RST
SG
S6 LIGHT State
TMR
K1800
T0
S6
SET
S6
SET
3 min. x 60 sec/min
0.1 sec/count
K= 1800 counts
K=
Using a Timer
Inside a Stage
RLL
Stage Programming
PLUS
7--14 RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
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.
We will define our safety feature to work in
this way, adding the input from the
photocell to the block diagram as shown to
the right. X3 will be on if an object is in the
path of the door.
Next, we make a simple addition to the
state transition diagram, shown in shaded
areas in the figure below. Note the new
transition path at the top of the LOWER
state. If we are lowering the door and
detect an obstruction (X3), we then jump
to the Push-UP State. We do this instead
of jumping directly to the RAISE state, to
give the Lower output Y2 one scan to turn
off, before the Raise output Y1 energizes.
Ladder
Program
Inputs Outputs
Toggle X0 Y1 Raise
Y2 Lower
Up limit X1
Down limit
X2 Y3 Light
Obstruction
X3
X0 Push--UP
UP
Push--DOWN
DOWN
X0
LOWER
RAISE
X0
X1
X0
X2 and
LIGHT
X0
X0
T0
X3
X3
It is theoretically possible the down limit (X2) and the obstruction input (X3) could
energize at the same moment. In that case, we would “jump” to the Push-UP and
DOWN states simultaneously, which does not make sense.
Instead, we give priority to the obstruction
by changing the transition condition to the
DOWN state to [X2 AND NOT X3]. This
ensures the obstruction event has the
priority. The modifications we must make
to the LOWER Stage (S5) logic are shown
to the right. The first rung remains
unchanged. The second and third rungs
implement the transitions we need. Note
the opposite relay contact usage for X3,
which ensures the stage will execute only
one of the JMP instructions.
OUT
Y2
SP1
S0
X2
JMP
SG
S5 LOWER State
X3
S2
X3
JMP
to Push-UP
to DOWN
Add Emergency
Stop Feature
Exclusive
Transitions
RLL
Stage Programming
PLUS
7--15
RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
Stage Program Design Considerations
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. New stage programmers
sometimes try to turn a stage on and off each scan, based on the false assumption
that only one stage can be on at a time. For ladder rungs that you want to execute
each scan, put them in a stage that is always on.
The following figure shows a typical application. During operation, the primary
manufacturing activity Main Process, Powerup Initialization, E-Stop and Alarm
Monitoring, and Operator Interface are all running. At powerup, four initial stages
shown begin operation.
Agitate
Monitor
Idle Fill Rinse Spin
E-Stop and Alarm Monitoring
Main Process
Operator Interface
Control Recipe
Status
XXX =ISG
Powerup
Powerup Initialization
In a typical application, the separate stage sequences above operate as follows:
SPowerup Initialization -- This stage contains ladder rung tasks
performed once at powerup. Its last rung resets the stage, so this stage
is only active for one scan (or only as many scans that are required).
SMain Process -- This stage sequence controls the heart of the process
or machine. One pass through the sequence represents one part cycle
of the machine, or one batch in the process.
SE-Stop and Alarm Monitoring -- This stage is always active because it
is watching for errors that could indicate an alarm condition or require an
emergency stop. It is common for this stage to reset stages in the main
process or elsewhere, in order to initialize them after an error condition.
SOperator Interface -- This is another task that must always be active
and ready to respond to an operator. It allows an operator interface to
change modes, etc. independently of the current main process step.
Although we have separate processes,
there can be coordination among them.
For example, in an error condition, the
Status Stage may want to automatically
switch the operator interface to the status
mode to show error information as shown
to the right. The monitor stage could set
the stage bit for Status and Reset the
stages Control and Recipe.
Monitor
E-Stop and
Alarm Monitoring
Operator Interface
Control Recipe
Status
Set
Stage Program
Organization
RLL
Stage Programming
PLUS
7--16 RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
We can think of states or stages as simply dividing up 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. The logic for transitioning out of a
stage is contained within that stage. It’s easy to choose which ladderrungs are active
at powerup by using an “initial” stage type (ISG).
Stage 0 Stage 1
Stage 2
Most instructions work like they do in standard RLL. You can think of a stage like a
miniature RLL program which is either active or inactive.
Output Coils -- As expected, output coils in active stages will turn on or off outputs
according to power flow into the coil. However, note the following:
SOutputs work as usual, provided each output reference (such as “Y3”) is
used in only one stage.
SOutput coils automatically turn off when leaving a stage. However, Set
and Reset instructions are not “undone” when leaving a stage.
SAn output can be referenced from more than one stage, as long as only
one of the stages is active at a time.
SIf an output coil is controlled by more than one stage simultaneously, the
active stage nearest the bottom of the program determines the final
output status during each scan. So, use the OROUT instruction instead
when you want multiple stages to have a logical OR control of an output.
One-Shot or PD coils -- Use care if you must use a Positive Differential coil in a
stage. Remember the input to the coil must make a 0--1 transition. If the coil is
already energized on the first scan when the stage becomes active, the PD coil will
not work. This is because the 0--1 transition did not occur.
PD coil alternative: If there is a task which you want to do only once (on 1 scan), it can
be placed in a stage which transitions to the next stage on the same scan.
Counter -- When using a counter inside a stage, the stage must be active for one
scan before the input to the counter makes a 0--1 transition. Otherwise, there is no
real transition and the counter will not count. The ordinary Counter instruction does
have a restriction inside stages: it may not be reset from other stages using the RST
instruction for the counter bit. However, the special Stage Counter provides a
solution (see next paragraph).
Stage Counter -- The Stage Counter has the benefit that its count may be globally
reset from other stages by using the RST instruction. It has a count input, but no reset
input. This is the only difference from a standard counter instruction.
Drum -- Realize the drum sequencer is its own process, and is a different
programming method than stage programming. If you need to use a drum and
stages, be sure to place the drum instruction in an ISG stage that is always active.
How Instructions
Work Inside Stages
RLL
Stage Programming
PLUS
7--17
RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
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
“productivity” of the lamp process, by
counting the number of on-off cycles
which occurs. This application will require
the addition of a simple counter, but the
key decision is in where to put the counter.
Ladder
Program
Toggle X0 Y0
New stage programming students will
typically try to place the counter inside one the
the stages of the process they are trying to
monitor. The problem with this approach is
that the stage is active only part of the time. In
order for the counter to count, the count input
must transition from off to on at least one scan
after its stage activates. Ensuring this
requires extra logic that can be tricky.
In this case, we only need to add another
supervisory stage as shown above, to “watch”
the main process. The counter inside the
supervisor stage uses the stage bit S1 of the
main process as its count input. Stage bits
used as a contact let us monitor a process!
S1
X0
JMP
ISG
S0
S2
JMP
SG
S1
OUT
Y0
OFF State
SP1
S3
X0
JMP
SG
S2
SG
S3
X0
S0
JMP
X0
Push--On State
ON State
Push--Off State
X0 Push--ON
ON
Push--OFF
OFF
Powerup X0
X0
X0
Supervisor
Powerup
SGCNT
K5000
CT0
ISG
S4
S1
Main Process
Supervisor Process
Supervisor State
NOTE: Both the Supervisor stage and the OFF stage are initial stages. The
supervisor stage remains active indefinitely
The counter in the above example is a special Stage Counter. Note that it does not
have a reset input. The count is reset by executing a Reset instruction, naming the
counter bit (CT0 in this case). The Stage Counter has the benefit that its count may
be globally reset from other stages. The standard Counter instruction does not have
this global reset capability. You may still use a regular Counter instruction inside a
stage... however, the reset input to the counter is the only way to reset it.
Using a Stage as a
Supervisory
Process
Stage Counter
RLL
Stage Programming
PLUS
7--18 RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
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.
It’s possible to omit the contact, as long as
you place any unconditional outputs first
(at the top) of a stage section of ladder.
The first rung of Stage 1 does this.
WARNING: Unconditional outputs placed
elsewhere in a stage do not necessarily
remain on when the stage is active. In
Stage 2 to the right, Y0 is shown as an
unconditional output, but its powerflow
comes from the rung above. So, Y0 status
will be the same as Y1 (is not correct).
OUT
Y0
SP1
SG
S0
OUT
Y0
SG
S1
OUT
Y1
X0
OUT
Y0
SG
S2
OUT
Y1
X0
Unconditional
Output
Our discussion of state transitions has shown how the Stage JMP instruction makes
the current stage inactive and the next stage (named in the JMP) active. As an
alternative way to enter this in DirectSOFT, you may use the power flow method for
stage transitions. The main requirement is the current stage be located directly
above the next (jump-to) stage in the ladder program. This arrangement is shown in
the diagram below, by stages S0 and S1, respectively.
S1
X0
JMP
SG
S0
Equivalent
X0
SG
S0
S0 S1
X0
SG
S1
SG
S1
All other rungs in stage...
Power flow
transition
Recall the Stage JMP instruction may occur anywhere in the current stage, and the
result is the same. However, power flow transitions (shown above) must occur as the
last rung in a stage. All other rungs in the stage will precede it. The power flow
transition method is also achievable on the handheld programmer, by simply
following the transition condition with the Stage instruction for the next stage.
The power flow transition method does eliminate one Stage JMP instruction, its only
advantage. However, it is not as easy to make program changes as using the Stage
JMP. Therefore, we advise using Stage JMP transitions for most programs.
Unconditional
Outputs
Power Flow
Transition
Technique
RLL
Stage Programming
PLUS
7--19
RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
Parallel Processing Concepts
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. It is acceptable
to use all JMP instructions as shown, or we could use one JMP and a Set Stage bit
instruction(s) (at least one must be a JMP, in order to leave S1). Remember that all
instructions in a stage execute, even when it transitions (the JMP is not a GOTO).
S1S0
S2
S4
S3
S5
S2
JMP
SG
S1
X0
Push--On State
S4
JMP
X0
Process A
Process B
Note that if we want Stages S2 and S4 to energize exactly on the same scan, both
stages must be located below or above Stage S1 in the ladder program (see the
explanation at the bottom of page 7--7). Overall, parallel branching is easy!
Now we consider the opposite case of parallel branching, which is converging
processes. This simply means we stop doing multiple things and continue doing one
thing at a time. In the figure below, processes A and B converge when stages S2 and
S4 transition to S5 at some point in time. So, S2 and S4 are Convergence Stages.
S5
S1
S3
S2
S4
S6
= Convergence Stage
Process A
Process B
While the converging principle is simple enough, it brings a new complication. As
parallel processing completes, the multiple processes almost never finish at the
same time. In other words, how can we know whether Stage S2 or S4 will finish last?
This is an important point, because we have to decide how to transition to Stage S5.
The solution is to coordinate the transition
condition out of convergence stages. We
accomplish this with a stage type
designed for this purpose: the
Convergence Stage (type CV). In the
example to the right, convergence stages
S2 and S4 are required to be grouped
together as shown. No logic is permitted
between CV stages! The transition
condition (X3 in this case) must be located
in the last convergence stage. The
transition condition only has power flow
when all convergence stages in the group
are active.
CVJMP
S5
X3
CV
S2
CV
S4
Convergence
Stages
SG
S5
Parallel Processes
Converging
Processes
Convergence
Stages
(CV)
RLL
Stage Programming
PLUS
7--20 RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
Recall the last convergence stage only
has power flow when all CV stages in the
group are active. To complement the
convergence stage, we need a new jump
instruction. The Convergence Jump
(CVJMP) shown to the right will transition
to Stage S5 when X3 is active (as one
might expect), but it also automatically
resets all convergence stages in the
group. This makes the CVJMP jump a
very powerful instruction. Note that this
instruction may only be used with
convergence stages.
CVJMP
S5
X3
CV
S2
CV
S4
Convergence
Jump
SG
S5
The following summarizes the requirements in the use of convergence stages,
including some tips for their effective application:
SA convergence stage is to be used as the last stage of a process which
is running in parallel to another process or processes. A transition to the
convergence stage means that a particular process is through, and
represents a waiting point until all other parallel processes also finish.
SThe maximum number of convergence stages which make up one
group is 17. In other words, a maximum of 17 stages can converge into
one stage.
SConvergence stages of the same group must be placed together in the
program, connected on the power rail without any other logic in
between.
SWithin a convergence group, the stages may occur in any order, top to
bottom. It does not matter which stage is last in the group, because all
convergence stages have to be active before the last stage has power
flow.
SThe last convergence stage of a group may have ladder logic within the
stage. However, this logic will not execute until all convergence stages
of the group are active.
SThe convergence jump (CVJMP) is the intended method to be used to
transition from the convergence group of stages to the next stage. The
CVJMP resets all convergence stages of the group, and energizes the
stage named in the jump.
SThe CVJMP instruction must only be used in a convergence stage, as it
is invalid in regular or initial stages.
SConvergence Stages or CVJMP instructions may not be used in
subroutines or interrupt routines.
Convergence Jump
(CVJMP)
Convergence
Stage Guidelines
RLL
Stage Programming
PLUS
7--21
RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
Managing Large Programs
A stage may contain a lot of ladder rungs, or only one or two programrungs. For most
applications, good program design will ensure the average number of rungs per
stage will be small. However, large application programs will still create a large
number of stages. We introduce a new construct which will help us organize related
stages into groups called blocks. So, program organization is the main benefit of the
use of stage blocks.
A block is a section of ladder program which contains stages. In the figure below,
each block has its own reference number. Like stages, a stage block may be active
or inactive. Stages inside a block are not limited in how they may transition from one
to another. Note the use of stage blocks does not require each stage in a program to
reside inside a block, shown below by the “stages outside blocks”.
Block 0 Block 1 Block 2
Stages outside blocks:
A program with 20 or more stages may be considered large enough to use block
grouping (however, their use is not mandatory). When used, the number of stage
blocks should probably be two or higher, because the use of one block provides a
negligible advantage.
A block of stages is separated from other
ladder logic with special beginning and
ending instructions. In the figure to the
right, the BLK instruction at the top marks
the start of the stage block. At the bottom,
the Block End (BEND) marks the end of
the block. The stages in between these
boundary markers (S0 and S1 in this case)
and their associated rungs make up the
block.
Note the block instruction has a reference
value field (set to “C0” in the example).
The block instruction borrows or uses a
control relay contact number, so that other
parts of the program can control the block.
Any control relay number (such as C0)
used in a BLK instruction is not available
for use as a control relay.
BEND
BLK
C0 Block Instruction
SG
S0
All other rungs in stage...
SG
S1
All other rungs in stage...
Block End
Instruction
Note the stages within a block must be regular stages (SG) or convergence stages
(CV). So, they cannot be initial stages. The numbering of stages inside stage blocks
can be in any order, and is completely independent from the numbering of the
blocks.
Stage Blocks
(BLK, BEND)
RLL
Stage Programming
PLUS
7--22 RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
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 become active. When the BCALL is turned off, the
corresponding stage block and the stages within it become inactive.
We must avoid confusing block call operation with how a “subroutine call” works.
After a BCALL coil executes, program execution continues with the next program
rung. Whenever program execution arrives at the ladder location of the stage block
named in the BCALL, then logic within the block executes because the block is now
active. Similarly, do not classify the BCALL as type of state transition (is not a JMP).
Block C0
Activate
BCALL
C0
X0
(next rung)
When a stage block becomes active, the first stage in the block automatically
becomes active on the same scan. The “first” stage in a block is the one located
immediately under the block (BLK) instruction in the ladder program. So, that stage
plays a similar role to the initial type stage we discussed earlier.
The Block Call instruction may be used in several contexts. Obviously, the first
execution of a BCALL must occur outside a stage block, since stage blocks are
initially inactive. Still, the BCALL may occur on an ordinary ladder rung, or it may
occur within an active stage as shown below. Note that either turning off the BCALL
or turning off the stage containing the BCALL will deactivate the corresponding
stage block. You may also control a stage block with a BCALL in another stageblock.
BEND
BLK
C0
Stage Block
SG
S10
All rungs in stage...
SG
S11
All other rungs in stage...
BCALL
C0
X0
SG
S0
All other rungs in stage...
SG
S11
NOTE: Stage Block may come before or
after the location of the BCALL instruction
in the program.
The BCALL may be used in many ways or contexts, so it can be difficult to find the
best usage. Remember the purpose of stage blocks is to help you organize the
application problem by grouping related stages together. Remember that initial
stages must exist outside stage blocks.
Block Call
(BCALL)
RLL
Stage Programming
PLUS
7--23
RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
RLLPLUS Instructions
aaaS
SG
The Stage instructions are used to create
structured RLLPLUS programs. Stages are
program segments which can be activated
by transitional logic, a jump or a set stage
that is executed from an active stage.
Stages are deactivated one scan after
transitional logic, a jump, or a reset stage
instruction is executed.
Operand Data Type DL350 Range
aaa
Stage S0--1777
The following example is a simple RLLPLUS program. This program utilizes the initial
stage, stage, and jump instruction to create a structured program.
X0
ISG S0
Y10
OUT
X1 S2
SET
SG S1
X5
X2 Y11
OUT
SG S2
X6 Y12
OUT
X7 S0
JMP
S1
JMP
S1
DirectSOFT Display Handheld Programmer Keystrokes
ISG S(SG) 0
STR X(IN) 0
OUT Y(OUT) 1
STR X(IN) 1
SET S(SG) 2
0
STR X(IN) 5
JMP S(SG) 1
SG S(SG) 1
STR X(IN) 2
OUT Y(OUT) 1 1
SG S(SG) 2
STR X(IN) 6
OUT Y(OUT) 1 2
STR X(IN) 7
AND S(SG) 1
JMP S(SG) 0
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
Stage
(SG)
RLL
Stage Programming
PLUS
7--24 RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
aaaS
ISG
The Initial Stage instruction is normally used
as the first segment of an RLLPLUS program.
Initial stages will be active when the CPU
enters the run mode allowing for a starting
point in the program. Initial Stages are also
activated by transitional logic, a jump or a
set stage executed from an active stage.
Initial Stages are deactivated one scan after
transitional logic, a jump, or a reset stage
instruction is executed. Multiple Initial
Stages are allowed in a program.
Operand Data Type DL350 Range
aaa
Stage S0--1777
NOTE: If the ISG is within the retentive range for stages, the ISG will remain in the
state it was before power down and will NOT turn itself on during the first scan.
aaa
S
The Jump instruction allows the program to
transition from an active stage which
contains the jump instruction to another
which stage is specified in the instruction.
The jump will occur when the input logic is
true. The active stage that contains the
Jump will be deactivated 1 scan after the
Jump instruction is executed.
JMP
Operand Data Type DL350 Range
aaa
Stage S0--1777
aaa
S
The Not Jump instruction allows the
program to transition from an active stage
which contains the jump instruction to
another which is specified in the instruction.
The jump will occur when the input logic is
off. The active stage that contains the Not
Jump will be deactivated 1 scan after the
Not Jump instruction is executed.
NJMP
Operand Data Type DL350 Range
aaa
Stage S0--1777
Initial Stage
(ISG)
Jump
(JMP)
Not Jump
(NJMP)
RLL
Stage Programming
PLUS
7--25
RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
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. If X7 is on, program execution will jump
from Stage 1 to Stage 2. If X7 is off, program execution will jump from Stage 1 to Stage 3.
DirectSOFT Display Handheld Programmer Keystrokes
ISG S0
X1 S1
JMP
SG S1
X2 Y5
OUT
X7 S2
JMP
S3
NJMP
ISG S(SG) 0
STR X(IN) 1
JMP S(SG) 1
SG S(SG) 1
STR X(IN) 2
OUT Y(OUT) 5
STR X(IN) 7
JMP S(SG) 2
JMP
S(SG) 3
N
SHFT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
S aaa
CV
The Converge Stage instruction is used to
group certain stages together by defining
them as Converge Stages.
When all of the Converge Stages within a
group become active, the CVJMP
instruction (and any additional logic in the
final CV stage) will be executed. All
preceding CV stages must be active before
the final CV stage logic can be executed. All
Converge Stages are deactivated one scan
after the CVJMP instruction is executed.
Additional logic instructions are only
allowed following the last Converge Stage
instruction and before the CVJMP
instruction. Multiple CVJUMP instructions
are allowed.
Converge Stages must be programmed in
the main body of the application program.
This means they cannot be programmed in
Subroutines or Interrupt Routines.
S aaa
CVJMP
Operand Data Type DL350 Range
aaa
Stage S0--1777
Converge Stage
(CV) and Converge
Jump (CVJMP)
RLL
Stage Programming
PLUS
7--26 RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
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.
JMP 1
DirectSOFT Display
ISG S0
CV S11
X3 Y3
OUT
X4 S20
CVJMP
SG S20
X0 Y0
OUT
X1 S1
JMP
S10
JMP
SG S1
X2 S11
JMP
Handheld Programmer Keystrokes
ISG S(SG) 0
STR
OUT 0
STR 1
CV S10
X5 S0
JMP
X(IN) 0
Y(OUT)
X(IN)
SHFT C V SHFT JMP S(SG) 2 0
S(SG)
JMP 1S(SG) 0
S(SG) 1
JMP 1
STR 2X(IN)
S(SG) 1
SG
SHFT C V S(SG) 1 0
SHFT C V S(SG) 1 1
STR 3X(IN)
OUT 3Y(OUT)
STR 4X(IN)
S(SG) 2SG 0
JMP 0
STR 5X(IN)
S(SG)
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
RLL
Stage Programming
PLUS
7--27
RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
The stage block instructions are used to activate a block of stages. The Block Call,
Block, and Block End instructions must be used together.
The BCALL instruction is used to activate
a stage block. There are several things
you need to know about the BCALL
instruction.
Uses CR Numbers — The BCALLappears
as an output coil, but does not actually
refer to a Stage number as you might think.
Instead, the block is identified with a
Control Relay (Caaa). This control relay
cannot be used as an output anywhere
else in the program.
C aaa
BCALL
Must Remain Active — The BCALL instruction actually controls all the stages
between the BLK and the BEND instructions even after the stages inside the block
have started executing. The BCALL must remain active or all the stages in the block
will automatically be turned off. If either the BCALL instruction, or the stage that
contains the BCALL instruction goes off, then the stages in the defined block will be
turned off automatically.
Activates First Block Stage — When the BCALL is executed it automatically
activates the first stage following the BLK instructions.
Operand Data Type DL350 Range
aaa
Control Relay C0--1777
The Block instruction is a label which
marks the beginning of a block of stages
that can be activated as a group. A Stage
instruction must immediately follow the
Start Block instruction. Initial Stage
instructions are not allowed in a block.
The control relay (Caaa) specified in
Block instruction must not be used as an
output any where else in the program.
C aaa
BLK
Operand Data Type DL350 Range
aaa
Control Relay C0--1777
The Block End instruction is a label used
with the Block instruction. It marks the
end of a block of stages. There is no
operand with this instruction. Only one
Block End is allowed per Block Call.
BEND
Block Call
(BCALL)
Block (BLK)
Block End (BEND)
RLL
Stage Programming
PLUS
7--28 RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
DirectSOFT Display
SG S1
BLK C0
X3 Y6
OUT
X7 S1
RST
SG S15
X2 Y5
OUT
X6 C0
BCALL
SG S10
BEND
In this example, the Block Call is executed
when 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. If the BCALL instruction is
turned off, or if the stage containing the
BCALL instruction is turned off, then all
stages between the BLK and BEND
instructions are automatically turned off.
If you examine S15, you will notice that
X7 could reset Stage S1, which would
disable the BCALL, thus resetting all
stages within the block.
1
Handheld Programmer Keystrokes
SG S(SG)
STR X(IN) 2
OUT Y(OUT) 5
STR X(IN) 6
STR X(IN) 3
SHFT B C A L L C(CR)
SHFT B L K
SG S(SG) 1 0
0
C(CR) 0
OUT Y(OUT) 6
SHFT
RST
STR X(IN) 7
B E N D
S(SG) 1
SG 1S(SG) 5
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
ENT
The Stage View option in DirectSOFT will let you view the ladder program as a flow
chart. The figure below shows the symbol convention used in the diagrams. You may
find the stage view useful as a tool to verify that your stage program has faithfully
reproduced the logic of the state transition diagram you intend to realize.
SG Stage Reference to
a Stage JJump SSet Stage
RReset Stage
Transition
Logic
Output
The following diagram is a typical stage view of a ladder program containing stages.
Note the left-to-right direction of the flow chart.
ISG
S0 SG
S1 SG
S2
SG
S3
SG
S4
SG
S5
J J
J
S
J
Stage View in
DirectSOFT
RLL
Stage Programming
PLUS
7--29
RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
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 cannot do with regular RLL programs?
A. Stages allow you to identify all the states of your process before you begin
programming. This approach is more organized, because you divide up a ladder
program into sections. As stages, these program sections are active only when they
are actually needed by the process. Most processes can be organized into a
sequence of stages, connected by event-based transitions.
Q. Isn’t a stage really like a software subroutine?
A. No, it is very different. A subroutineis called by a main programwhen needed, and
executes only once before returning to the point from which it was called. A stage,
however, is part of the main program. It represents a state of the process, so an
active stage executes on every scan of the CPU until it becomes inactive.
Q. What are Stage Bits?
A. A stage bit is a single bit in the CPU’s image register, representing the
active/inactive status of the stage in real time. For example, the bit for Stage 0 is
referenced as “S0”. If S0 = 0, then the ladder rungs in Stage 0 are bypassed (not
executed) on each CPU scan. If S0 = 1, then the ladder rungs in Stage 0 are
executed on each CPU scan. Stage bits, when used as contacts, allow one part of
your program to monitor another part by detecting stage active/inactive status.
Q. How does a stage become active?
A. There are three ways:
SIf the Stage is an initial stage (ISG), it is automatically active at powerup.
SAnother stage can execute a Stage JMP instruction naming this stage,
which makes it active upon its next occurrence in the program.
SA program rung can execute a Set Stage Bit instruction (such as SET
S0).
Q. How does a stage become inactive?
A. There are three ways:
SStandard Stages (SG) are automatically inactive at powerup.
SA stage can execute a Stage JMP instruction, resetting its Stage Bit to
0.
SAny rung in the program can execute a Reset Stage Bit instruction (such
as RST S0).
Q. What about the power flow technique of stage transitions?
A. The power flow method of connecting adjacent stages (directly above or below in
the program) actually is the same as the Stage Jump instruction executed in the
stage above, naming the stage below. Power flow transitions are more difficult to edit
in DirectSOFT, we list them separately from two preceding questions.
RLL
Stage Programming
PLUS
7--30 RLLPLUS Stage Programming
DL350 User Manual, 2nd Edition
Q. Can I have a stage which 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 1 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.
Q. Isn’t a Stage JMP like a regular GOTO instruction used in software?
A. No, it is very different. A GOTO instruction sends the program execution
immediately to the code location named by the GOTO. A Stage JMP simply resets
the Stage Bit of the current stage, while setting the Stage Bit of the stage named in
the JMP instruction. Stage bits are 0 or 1, determining the inactive/active status of
the corresponding stages. A stage JMP has the following results:
SWhen the JMP is executed, the remainder of the current stage’s rungs
are executed, even if they reside past(under) the JMP instruction. On
the following scan, that stage is not executed, because it is inactive.
SThe Stage named in the Stage JMP instruction will be executed upon its
next occurrence. If located past (under) the current stage, it will be
executed on the same scan. If located before (above) the current stage,
it will be executed on the following scan.
Q. How can I know when to use stage JMP, versus a Set Stage Bit or Reset Stage Bit?
A. These instructions are used according to the state diagram topology you have
derived:
SUse a Stage JMP instruction for a state transition... moving from one
state to another.
SUse a Set Stage Bit instruction when the current state is spawning a
new parallel state or stage sequence, or when a supervisory state is
starting a state sequence under its command.
SUse a Reset Stage Bit instruction when the current state is the last state
in a sequence and its task is complete, or when a supervisory state is
ending a state sequence under its command.
Q. What is an initial stage, and when do I use it?
A. An initial stage (ISG) is automatically active at powerup. Afterwards, it works like
any other stage. You can have multiple initial stages, if required. Use an initial stage
for ladder that must always be active, or as a starting point.
Q. Can I place program ladder rungs outside of the stages, so they are always on?
A. It is possible, but it’s not good software design practice. Place ladder that must
always be active in an initial stage, and do not reset that stage or use a Stage JMP
instruction inside it. It can start other stage sequences at the proper time by setting
the appropriate Stage Bit(s).
Q. Can I have more than one active stage at a time?
A. Yes, and this is a normal occurrence for many programs. However, it is important
to organize your application into separate processes, each made up of stages. And a
good process design will be mostly sequential, with only one stage on at a time.
However, all the processes in the program may be active simultaneously.
1
8
PID Loop Operation
In This Chapter....
— DL350 PID Loop Features
— Introduction to PID Control
— Introducing DL350 PID Control
— PID Loop Operation
— Ten Steps to Successful Process Control
— PID Loop Setup
— PID Loop Tuning
— Using Other PID Features
— Ramp/Soak Generator
DirectSOFT Ramp/Soak Example
— Cascade Control
— Time Proportioning Control
— Feedforward Control
— PID Example Program
— Troubleshooting Tips
— Glossary of PID Loop Terminology
— Bibliography
PID Loop OperationMaintenance
and Troubleshooting
8--2 PID Loop Operation
DL350 User Manual, 2nd Edition
DL350 PID Loop Features
The DL350 process loop control offers a sophisticated set of features to address
many application needs. The main features are:
SUp to 4 loops, individual programmable sample rates
SManual/Automatic/Cascaded loop capability available
STwo types of bumpless transfer available
SFull-featured alarms
SRamp/soak generator with up to 16 segments
SAuto Tuning
The DL350 CPU has process control loop capability in addition to ladder program
execution. You can select and configure up to four loops. All sensor and actuator
wiring connects to standard DL305 I/O modules, as shown below. All process
variables, gain values, alarm levels, etc., associated with each loop reside in a Loop
Variable Table in the CPU. The DL350 CPU reads process variable (PV) inputs
during each scan. Then it makes PID loop calculations during a dedicated time slice
on each PLC scan, updating the control output value. The control loops use the
Proportional-Integral-Derivative (PID) algorithm to generate the control output
command. This chapter describes how the loops operate,and what you must do to
configure and tune the loops.
Analog Input
Analog or Digital Output
DL350 CPU
Manufacturing Process
PID Loop Calculations
0
1
2
3
4
5
6
7
0
2
4
6
C
1
1
3
5
7
C
2
0
2
4
6
C
1
1
3
5
7
C
2
The best tool for configuring loops in the DL350 is the DirectSOFT programming
software, Release 2.2 or later. DirectSOFT uses dialog boxes to create a forms-like
editor to let you individually set up the loops. After completing the setup, you can use
DirectSOFT’s PID Trend View to tune each loop. The configuration and tuning
selections made are stored in the CPUs V--memory, which can be set as retentive.
The loop parameters also may be saved to disk for recall later.
Main Features
PID Loop Operation Maintenance
8--3
PID Loop Operation
DL350 User Manual, 2nd Edition
PID Loop Feature Specifications
Number of loops Selectable, 4 maximum
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
Error term curves Selectable as linear, square root of error, and error squared
Loop update rate (time
between PID calculation) 0.05 to 99.99 seconds, user programmable
Minimum loop update rate 0.05 seconds for 1 to 4 loops,
Loop modes Automatic, Manual (operator control), or Cascade control
Ramp/Soak Generator Up to 8 ramp/soak steps (16 segments) per loop with indication of
ramp/soak step number
PV curves Select standard linear, or square-root extract (for flow meter input)
Set Point Limits Specify minimum and maximum setpoint values
Process Variable Limits Specify minimum and maximum Process Variable values
Proportional Gain Specify gains of 0.01 to 99.99
Integrator (Reset) Specify reset time of 0.1 to 999.8 in units of seconds or minutes
Derivative (Rate) Specify the derivative time from 0.01 to 99.99 seconds
Rate Limits Specify derivative gain limiting from 1 to 20
Bumpless Transfer I Automatically sets the bias equal to the control output and the
setpointequal to the process variable when control switches from manual to
automatic
Bumpless Transfer II Automatically sets the bias equal to the control output when control
switches from manual to automatic
Step Bias Provides proportional bias adjustment for large setpoint changes
Anti-windup For position form of PID, this inhibits integrator action when the control
output reaches 0% or 100% (speeds up loop recovery when output
recovers from saturation)
Error Deadband Specify a tolerance (plus and minus) for the error term (SP--PV), so that no
change in control output value is made
Alarm Feature Specifications
PV Alarm Hysteresis Specify 1 to 200 (word/binary) does not affect all alarms, such as PV
Rate--of--Change Alarm
PV Alarm Points Select PV alarm settings for Low--low, Low, High, and High-high conditions
PV Deviation Specify alarms for two ranges of PV deviation from the setpoint value
Rate of Change Detect when PV exceeds a rate of change limit you specify
PID Loop OperationMaintenance
and Troubleshooting
8--4 PID Loop Operation
DL350 User Manual, 2nd Edition
Introduction to 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. There are two types of analog controllers
that are used throughout industry:
S1. The ON--OFF controller, sometimes referred to as an open loop
controller.
S2. The PID controller, sometimes called a closed loop controller.
Regardless of type, analog controllers require input signals from electronic sensors
such as pressure, differential pressure, level, flow meter or thermocouples. As an
example, one of the most common analog control applications is located in your
house for controlling either heat or air conditioning, the thermostat.
You wish for your house to be at a comfortable temperature so you set a thermostat
to a desired temperature (setpoint). You then select the “comfort“ mode, either heat
or A/C. A temperature sensing device, normally a thermistor, is located within the
thermostat. If the thermostat is set for heat and the setpoint is set for 69_, the furnace
will be turned on to provide heat at, normally, 2_below the setpoint. In this case, it
wouldturnonat67_. When the temperature reaches 71_,2_above setpoint, the
furnace will turn off. In the opposite example, if the thermostat is set for A/C (cooling),
the thermostat will turn the A/C unit on/off opposite the heat setting. For instance, if
the thermostat is set to cool at 76_, the A/C unit will turn on when the sensed
temperature reaches 2_above the setpoint or 78_, and turn off when the
temperature reaches 74_. This would be considered to be an ON--OFF controller.
The waveform below shows the action of the heating cycle. Note that there is a slight
overshoot at the turn--off point, also a slight undershoot at the turn--on point.
SETPOINT
TIME
OFF
ON ONON
OFF
71_
69_
67_
The ON--OFF controller is used in some industial control applications, but is not
practical in the majority of industrial control processes.
The most common process controller that is used in industry is the PID controller.
What is PID
Control?
PID Loop Operation Maintenance
8--5
PID Loop Operation
DL350 User Manual, 2nd Edition
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. An “error“ occurs when an operator manually
changes the setpoint or when an event (valve opened, closed, etc.) or a disturbance
(cold water, wind, etc.) changes the load, thus causing a change in the process
variable.
The PID controller receives signals from sensors and computes corrective action to
the actuator from a computation based on the error (Proportional), the sum of all
previous errors (Integral) and the rate of change of the error (Derivative).
We can look at the PID controller in more simple terms. Take the cruise control on an
automobile as an example. Let’s say that we are cruising on an interstate highway in
a car equipped with cruise control. The driver decides to engage the cruise control by
turning it ON, then he manually brings the car to the desired cruising speed, say 70
miles per hour. Once the cruise speed is reached, the SET button is pushed fixing
the speed at 70 mph, the setpoint. Now, the car is cruising at a steady 70 mph until it
comes to a hill to go up. As the car goes up the hill, it tends to slow down. The speed
sensor senses this and causes the throttle to increase the fuel to the engine. The
vehicle speeds up to maintain 70 mph without jerking the car and it reaches the top at
the set speed. When the car levels out after reaching the top of the hill it will speed up.
The speed sensor senses this and signals the throttle to provide less fuel to the
engine, thus, the engine slows down allowing the car to maintain the 70 mph speed.
How does this application apply to PID control? Lets look at the function of P, I and D
terms:
SProportional -- is commonly referred to as Proportional Gain. The
proportional term is the corrective action which is proportional to the
error, that is, the change of the manipulated variable is equal to the
proportional gain multiplied by the error (the activating signal). In
mathematical terms:
Proportional action = proportional gain X error
Error = Setpoint (SP) -- Process Variable (PV)
Applying this to the cruise control, the speed was set at 70 mph which is
the Setpoint. The speed sensor senses the actual speed of the car and
sends this signal to the cruise controller as the Process Variable (PV).
When the car is on a level highway, the speed is maintained at 70 mph,
thus, no error since the error would be SP -- PV = 0. When the car goes
up the hill, the speed sensor detected a slow down of the car, SP--PV =
error. The proportional gain would cause the output of the speed
controller to bring the car back to the setpoint of 70 mph. This would be
the Controlled Output.
SIntegral -- this term is often referred to as Reset action. It provides
additional compensation to the control output, which causes a change in
proportion to the value of the error over a period of time. In other words,
the reset term is the integral sum of the error values over a period of
time.
SDerivative -- this term is referred to as rate. The Rate action adds
compensation to the control output, which causes a change in
proportion to the rate of change of error. Its job is to anticipate the
probable growth of the error and generate a contribution to the output in
advance.
PID Loop OperationMaintenance
and Troubleshooting
8--6 PID Loop Operation
DL350 User Manual, 2nd Edition
Introducing DL350 PID Control
The DL350 is capable of controlling a process variable such as those already
mentioned. As previously mentioned, the control of a variable, such as temperature,
at a given level (setpoint) as long as there are no disturbances (cold water) in the
process.
The DL350 CPU 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.
In addition, the DL350 has built--in PID control algorithms that can be implemented.
The basic function of PID closed loop process control is to maintain certain process
characteristics at desired setpoints. As a rule, the process deviates from the desired
setpoint reference as a result of load material changes and interaction with other
processes. During this control, the actual condition of the process characteristics
(liquid level, temperature, motor control, etc.) is measured as a process variable
(PV) and compared with the target setpoint (SP). When deviations occur, an error is
generated by the difference between the process variable (actual value) and the
setpoint (desired value). Once an error is detected, the function of the control loop is
to modify the control output in order to force the error to zero.
The DL350 PID control provides feedback loops using the PID algorithm. The
control output is computed from the measured process variable as follows:
Let:
Kc = proportional gain
Ti = Reset or integral time
Td = Derivative time or rate
SP = Setpoint
PV(t) = Process Variable at time “t”
e(t) = SP--PV(t) = PV deviation from setpoint at time “t” or PV error.
Then:
M(t) = Control output at time “t”
M(t) = Kc [ e(t) + 1/Ti e(x) dx + Td d/dt e(t) ] + M0
t
0
The analog input module receives the process variable in analog form along with an
operator entered setpoint; the CPU computes the error. The error is used in the
algorithm computation to provide corrective action at the control output. The function
of the control action is based on an output control, which is proportional to the
instantaneous error value. The integral control action (reset action) provides
additional compensation to the control output, which causes a change in proportion
to the value of the change of error over a period of time. The derivative control action
(rate change) adds compensation to the control output, which causes a change in
proportion to the rate of change of error. These three modes are used to provide the
desired control action in Proportional (P), Proportional--Integral (PI), or
Proportional--Integral--Derivative (PID) control fashion.
PID Loop Operation MaintenancePID Loop Operation Maintenance
8--7
PID Loop Operation
DL350 User Manual, 2nd Edition
Standard DL405 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. The PID control algorithm, residing in the CPU memory,
receives information from the user program, primarily control parameters and
setpoints. Once the CPU makes the PID calculation, the result may be used to
directly control an actuator connected to a 4--20mA current output module to control
avalve.
With DirectSOFT, additional ladder logic programming, both time proportioning (eg.
heaters for temperature control) and position actuator (eg. reversible motor on a
valve) type of control schemes can be easily implemented. This chapter will explain
how to set up the PID control loop, how to implement the software and how to tune
the loop.
The following block diagram shows the key parts of a PID control loop. The path from
the PLC to the manufacturing process and back to the PLC is the closed loop control.
Process Variable
Loop
Calculation
Manufacturing
Process
Setpoint Value
Loop Configuring
and Monitoring
Control Output
External
Disturbances
ΣError Term
+--
PLC System
PID Loop OperationMaintenance
and Troubleshooting
8--8 PID Loop Operation
DL350 User Manual, 2nd Edition
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 -- a measurement of some physical property of the raw materials.
Measurements are made using some type of sensor. For example, if the
manufacturing process uses an oven, we will have a strong interest in controlling
temperature. Therefore, temperature is a process variable.
Setpoint Value -- the theoretically perfect quantity of the process variable, or the
desired amount which yields the best product. The machine operator knows this
value, and either sets it manually or programs it into the PLC for later automated use.
External Disturbances -- the unpredictable sources of error which the control
system attempts to cancel by offsetting their effects. For example, if the fuel input is
constant an oven will run hotter during warm weather than it does during cold
weather. An oven control system must counter-act this effect to maintain a constant
oven temperature during any season. Thus, the weather (which is not very
predictable), is one source of disturbance to this process.
Error Term -- the algebraic difference between the process variable and the
setpoint. This is the control loop error, and is equal to zero when the process variable
is equal to the setpoint (desired) value. A well-behaved control loop is able to
maintain a small error term magnitude.
Loop Calculation -- the real-time application of a mathematical algorithm to the
error term, generating a control output command appropriate for minimizing the
error magnitude. Various control algorithms are available, and the DL350 uses the
Proportional-Derivative-Integral (PID) algorithm (more on this later).
Control Output -- the result of the loop calculation, which becomes a command for
the process (such as the heater level in an oven).
Loop Configuring -- operator-initiated selections which set up and optimize the
performance of a control loop. The loop calculation function uses the configuration
parameters in real time to adjust gains, offsets, etc.
Loop Monitoring -- the function which allows an operator to observe the status and
performance of a control loop. This is used in conjunction with the loop configuring to
optimize the performance of a loop (minimize the error term).
Process Control
Definitions
PID Loop Operation Maintenance
8--9
PID Loop Operation
DL350 User Manual, 2nd Edition
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 DL350 CPU implements
the PID equations digitally by solving the basic equations in software. I/O modules
serve only to convert electronic signals into digital form (or vice versa).
The DL350 uses two types of PID controls: “position“ and “velocity“. These terms
usually refer to motion control situations, but here we use them in a different sense:
SPID Position Algorithm -- The control output is calculated so it responds
to the displacement (position) of the PV from the SP (error term).
SPID Velocity Algorithm -- The control output is calculated to represent
the rate of change (velocity) for the PV to become equal to the SP.
Referring to the control output equation on page 8--6, the DL350 CPU approximates
the output M(t) using a discrete position form of the PID equation.
Let:
Ts = Sample rate
Kc = Proportional gain
Ki = Kc * (Ts/Ti) = Coefficient of integral term
Kr = Kc * (Td/Ts) = Coefficient of derivative term
Ti = Reset or integral time
Td = Derivative time or rate
SP = Setpoint
PVn= Process variable at nth sample
en = SP -- PVn= Error at nth sample
Mo = Value to which the controller output has been initialized
Then:
Mn= Control output at nth sample
Σ
Mn=Kc£en+Kiei+Kr(en-- e n--1)+Mo
i=1
n
This form of the PID equation is referred to as the position form since the actual
actuator position is computed. The velocity form of the PID equation computes the
change in actuator position. The CPU modifies the standard equation slightly to use
the derivative of the process variable instead of the error as follows:
Σ
Mn=Kc£en+Kiei+Kr(PVn-- P V n--1)+Mo
i=1
n
These two forms are equivalent unless the setpoint is changed. In the original
equation, a large step change in the setpoint will cause a correspondingly large
change in the error resulting in a bump to the process due to derivative action. This
bump is not present in the second form of the equation.
PID Position
Algorithm
PID Loop OperationMaintenance
and Troubleshooting
8--10 PID Loop Operation
DL350 User Manual, 2nd Edition
The DL350 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:
Mxo=M
o
Mx = Ki * en+Mx
n--1
Mn=Kc*e
n-- Kr(PVn-- P V n--1)+Mx
n
The DL350 by default will keep the normalized output M in the range of 0.0 to 1.0.
This is done by clamping M to the nearer of 0.0 or 1.0 whenever the calculated output
falls outside this range. The DL350 also allows you to specify the minimum and
maximum output limit values (within the range 0 to 4095 in binary if using 12 bit
unipolar).
NOTE: The equations and algorithms, or parts of, in this chapter are only for
references. Analysis of these equations can be found in most good text books about
process control.
Reset windup can occur if reset action (integral term) is specified and the
computation of the bias term Mx is:
Mx = Ki * en+Mx
n--1
For example, assume the output is controlling a valve and the PV remains at some
value greater than the setpoint. The negative error (en) will cause the bias term (Mx)
to constantly decrease until the output M goes to 0 closing the valve. However, since
the error term is still negative, the bias will continue to decrease becoming ever more
negative. When the PV finally does come back down below the SP, the valve will stay
closed until the error is positive for long enough to cause the bias to become positive
again. This will cause the process variable to undershoot.
One way to solve the problem is to simply clamp the normalized bias between 0.0
and 1.0. The DL350 CPU does this. However, if this is the only thing that is done, then
the output will not move off 0.0 (thus opening the valve) untilthe PV has become less
than the SP. This will also cause the process variable to undershoot.
The DL350 CPU is programmed to solve the overshoot problem by either freezing
the bias term, or by adjusting the bias term.
Reset Windup
Protection
PID Loop Operation Maintenance
8--11
PID Loop Operation
DL350 User Manual, 2nd Edition
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 * en+Mx
n--1
M=Kc*e
n-- Kr(PVn-- P V n--1)+Mx
Mn=0 “ifM<0
Mn=M “if0<M>1
Mn=1 “ifM>1
Mxn=Mx “if0<M>1
Mxn=Mx
n--1 “otherwise”
Thus in this example, the bias will probably not go all the way to zero so that, when
the PV does begin to come down, the loop will begin to open the valve sooner than it
would have if the bias had been allowed to go all the way to zero. This action has the
effect of reducing the amount of overshoot.
The normal action of the CPU is to adjust the bias term when the output goes out of
range as shown below.
Mx = Ki * en+Mx
n--1
M=Kc*e
n-- Kr(PVn-- P V n--1)+Mx
Mn=0 “ifM<0
Mn=M “if0<M>1
Mn=1 “ifM>1
Mxn=Mx “if0<M>1
Mxn=M
n-- K c * e n-- Kr(PVn-- P V n--1) “otherwise”
By adjusting the bias, the valve will begin to open as soon as the PV begins to come
down. If the loop is properly tuned, overshoot can be eliminated entirely. If the output
went out of range due to a setpoint change, then the loop probably will oscillate
because we must wait for the bias term to stabilize again.
The choice of whether to use the default loop action or to freeze the bias is
dependent on the application. If large step changes to the setpoint are
anticipated, then it is probably better to select the freeze bias option (see page
8--34).
Freeze Bias
Adjusting the Bias
PID Loop OperationMaintenance
and Troubleshooting
8--12 PID Loop Operation
DL350 User Manual, 2nd Edition
This feature reduces oscillation caused by a step change in setpoint when the
adjusting bias feature is used.
Mx = Mx *SPn/SP
n--1 if the loop is direct acting
Mx = Mx *SPn--1 /SP
nif the loop is reverse acting
Mxn=0 “ifMx<0
Mxn=Mx “if0<Mx>1
Mxn=1 “ifM>1
It is not always necessary to run a full three mode PID control loop. Most loops
require only the PI terms or just the P term. Parts of the PID equation may be
eliminated by choosing appropriate values for the gain (Kc), reset (Ti) and rate (Td)
yielding a P, PI, PD, I and even an ID and a D loop.
Eliminating Integral Action The effect of integral action on the output may be
eliminated by setting Ti = 9999 or 0000. When
this is done, the user may then manually control
the bias term (Mx) to eliminate any steady--state
offset.
Eliminating Derivative Action The effect of derivative action on the output may
be eliminated by setting Td = 0 (most loops do
not require a D parameter; it may make the loop
unstable).
Eliminating Proportional Action Although rarely done, the effect of proportional
term on the output may be eliminated by setting
Kc = 0. Since Kc is also normally a multiplier of
the integral coefficient (Ki) and the derivative
coefficient (Kr), the CPU makes the computation
of these values conditional on the value of \Kc as
follows:
Ki=Kc*(Ts/Ti) “ifKc¸0”
Ki=Ts/Ti “ifKc=0(IorIDonly)
Kr = Kc * (Td / Ts) “if Kc ¸0”
Kr = Td / Ts “if Kc = 0 (ID or D only)”
The standard position form of the PID equation computes the actual actuator
position. An alternative form of the PID equation computes the change in actuator
position. This form of the equation is referred to as the velocity PID equation and is
obtained by subtracting the equation at time “n“ from the equation at time “n--1“.
The velocity equation is given by:
nMn=M--M
n--1
Step Bias
Proportional to
Step Change SP
Eliminating
Proportional,
Integral or
Derivative Action
Velocity Form of
the PID Equation
PID Loop Operation Maintenance
8--13
PID Loop Operation
DL350 User Manual, 2nd Edition
The DL350 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
SP = PV SP = PV
Mx = M
The bumpless transfer feature of the DL350 is available in two types: Bumpless I and
Bumpless II (see page 8--27). The transfer type is selected when the loop is set up.
The DL350 allows the user to specify alarm conditions that are to be monitored for
each loop. Alarm conditions are reported to the CPU by setting up the alarms in
DirectSOFT using the PID setup alarm dialog when the loop is setup. The alarm
features for each loop are:
SPV Limit ySpecify up to four PV alarm points.
High--High PV rises above the programmed High--High
Alarm Limit.
High PV rises above the programmed High Alarm
Limit.
Low PV fails below the Low Alarm Limit.
Low--Low PV fails below the Low--Low Limit.
SPV Deviation Alarm ySpecify an alarm for High and Low PV deviation
from the setpoint (Yellow Deviation). An alarm for High High and Low
Low PV deviation from the setpoint (Orange Deviation) may also be
specified. When the PV is further from the setpoint than the
programmed Yellow or Orange Deviation Limit the corresponding alarm
bit is activated.
SRate--of--Change yThis alarm is set when the PV changes faster than
a specified rate--of--change limit.
SPV Alarm Hysteresis yThe PV Limit Alarms and PV Deviation Alarms
are programmed using threshold values. When the absolute value or
deviation exceeds the threshold, the alarm status becomes true.
Real--world PV signals have some noise on them, which can cause
some fluctuation in the PV value in the CPU. As the PV value crosses
an alarm threshold, its fluctuations will cause the alarm to be intermittent
and annoy process operators. The solution is to use the PV Alarm
Hysteresis feature.
Bumpless Transfer
Loop Alarms
PID Loop OperationMaintenance
and Troubleshooting
8--14 PID Loop Operation
DL350 User Manual, 2nd Edition
The DL350 loop controller operates in one of two modes, either Manual or
Automatic.
Manual
In manual mode, the control output is determined by the operator, not the loop
controller. While in manual mode, the loop controller will still monitor all of the alarms
including High--High, High, Low, Low--Low, Yellow deviation, Orange deviation and
Rate--of--Change.
Automatic
In automatic mode, the loop controller computes the control output based on the
programmed parameters stored in V--memory. All alarms are monitored while in
automatic.
Cascade
Cascade mode is an option with the DL350 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.
Reverse Acting Loop
Although the PID algorithm is used in a direct, or forward, acting loop controller, there
are times when a reverse acting control output is needed. The DL350 loop controller
allows a loop to operate as reverse acting. With a reverse acting loop, the output is
driven in the opposite direction of the error. For example, if SP > PV, then a reverse
acting controller will decrease the output to increase the PV.
Mx = --Ki * en+Mx
n--1
M=--Kc*e
n+ Kr(PVn-- P V n--1)+Mx
n
Square Root of the Process Variable
Square root is selected whenever the PV is from a device such as an orifice meter
which requires this calculation.
Error Squared Control
Whenever error squared control is selected, the error is calculated as:
en= (SP -- PVn) * ABS(SP -- PVn)
A loop using the error squared is less responsive than a loop using just the error,
however, it will respond faster with a large error. The smaller the error, the less
responsive the loop. Error squared control would typically be used in a pH control
application.
Loop Operating
Modes
Special Loop
Calculations
PID Loop Operation Maintenance
8--15
PID Loop Operation
DL350 User Manual, 2nd Edition
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.
en= 0 “SP -- Deadband__Below_SP < PV < SP -- Deadband_Above_SP”
en=P--PV
n“otherwise”
The error will be squared first if both Error Squared and Error Deadband is selected.
Derivative Gain Limiting
When the coefficient of the derivative term, Kr, is a large value, noise introduced into
the PV can result in erratic loop output. This problem is corrected by specifying a
derivative gain limiting coefficient, Kd. Derivative gain limiting is a first order filter
applied to the derivative term computation, Yn, as shown below.
Yn=Y
n--1 +Ts + ( Td )
Kd
*(PVn=Y
n--1 )
Ts__________
Position Algorithm
Mx = Ki *en+Mx
n--1
M=Kc
*en-- K r *(Yn-- Y n--1)+Mx
Velocity Algorithm
nM=Kc*(e
n-- e n--1)+Ki*e
n-- K r * ( Y n-- 2 * Y n--1 +Y
n--2)
PID Loop OperationMaintenance
and Troubleshooting
8--16 PID Loop Operation
DL350 User Manual, 2nd Edition
Ten Steps to Successful Process Control
Modern electronic controllers such as the DL350 CPU provide sophisticated
process control features. Automated control systems can be very 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:
The most important knowledge is -- how to produce your product. This knowledge is
the foundation for designing an effective control system. A good process recipe will
do the following:
SIdentify all relevant Process Variables, such as temperature, pressure,
or flow rates, etc. which need precise control.
SPlot the desired Setpoint values for each of the process variables for the
duration of one process cycle.
This simply means choosing the method the machine will use to maintain control
over the Process Variables to follow their Setpoints. This involves many issues and
trade-offs, such as, energy efficiency, equipment costs, ability to service the
machine during production, and more. You must also determine how to generate the
Setpoint value during the process, and whether a machine operator can change the
SP.
Assuming the control strategy is sound, it is still crucial to properly size the actuators
and properly scale the sensors.
SChoose an actuator (heater, pump. etc.) which matches the size of the
load. An oversized actuator will have an overwhelming effect on your
process after a SP change. However, an undersized actuator will allow
the PV to lag or drift away from the SP after a SP change or process
disturbance.
SChoose a PV sensor which matches the range of interest (and control)
for our process. Decide the resolution of control you need for the PV
(such as within 2°C), and make sure the sensor input value provides the
loop with at least 5 times that resolution (at LSB level). However, an
over-sensitive sensor can cause control oscillations, etc. The DL350
provides 12-bit and 15-bit, unipolar and bipolar data format options, and
a 16--bit unipolar option. This selection affects SP, PV, Control Output,
and Integrator sum.
After deciding the number of loops, PV variables to measure, and SP values, you
can choose the appropriate I/O modules. Refer to the figure on the next page. In
many cases, you will be able to share input or output modules among several control
loops. The example shown sends the PV and Control Output signals for two loops
through the same set of modules. Up to four loops could be handled by the modules
shown.
AutomationDirect offers DL305 analog modules with 2, 4, 8, and 16 channels per
module in various signal types and ranges. Also available are thermocouple and
RTD modules which can be used to maintain temperatures to within a 10th of a
degree. Refer to our sales catalog for further information on these modules, or find
the modules on our website, www.automationdirect.com.
Step 1:
K
now the Recipe
Step 2:
Plan Loop
Control Strategy
Step 3:
Size and Scale
Loop Components
Step 4:
Select I
/
O Modules
PID Loop Operation Maintenance
8--17
PID Loop Operation
DL350 User Manual, 2nd Edition
Loop 1 Data
V-memory Output
Module
DL350 CPU
Input
Module
Channel 1 Process 1
Process 2
PV SP OUT
Channel 2 Loop 2 Data
Channel 3
Channel 4
Channel 1
Channel 2
Channel 3
Channel 4
PV SP OUT
After selection and procurement of all loop components and I/O modules, we can
perform the wiring and installation. Refer to the wiring guidelines in Chapter 2 of this
Manual, and to the DL205 Analog I/O Module manual as needed. The most
commonly overlooked wiring details when installing PID loop controls are:
SReversing the polarity of sensor or actuator wiring connections.
SIncorrect signal ground connections between loop components.
After wiring and installation, choose the loop setup parameters. The easiest method
for programming the loop tables is by using DirectSOFT. This software provides PID
Setup using dialog boxes to simplify the task. Note: It is important to understand
the meaning of all loop parameters mentioned in this chapter before choosing
values to enter.
With the sensor and actuator wiring completed, and loop parameters entered, the
Manual mode must be used to manually and carefully check out the new control
system.
SVerify that the PV value from the sensor is correct.
SIf it is safe to do so, gradually increase the control output up above 0%,
and see if the PV responds (and moves in the correct direction!).
If the open loop test (page 8--40) shows the PV reading is good and the control output
has the proper effect on the process; follow the closed--loop auto tuning procedure
(see page 8--45). In this step, the loop is tuned so the PV automatically follows the
SP.
If the closed loop test shows PV will follow small changes in the SP, consider running
an actual process cycle. The programming which will generate the desired SP in real
time must be completed. In this step, it may desirable to run a small test batch of
product through the machine, while watching the SP change according to the recipe.
WARNING: Be sure the Emergency Stop and power-down provision is readily
accessible, in case the process goes out of control. Damage to equipment
and/or serious injury to personnel can result from loss of control of some
processes.
When the loop tests and tuning sessions are complete, be sure to save all loop setup
parameters to disk.
Step 5:
Wiring and
Installation
Step 6:
Loop Parameters
Step 7:
Check Open Loop
Performance
Step 8:
Loop Tuning
Step 9:
Run Process Cycle
Step 10:
Save Loop
Parameters
PID Loop OperationMaintenance
and Troubleshooting
8--18 PID Loop Operation
DL350 User Manual, 2nd Edition
PID Loop Setup
Have your analog module installed and operational before beginning the loop setup
(refer to the DL305 Analog I/O Modules Manual, D3--ANLG--M). The DL350 CPU
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 setup the PID loop control.
Instead, the CPU reads the setup parameters from system V--memory locations.
These locations are shown in the table below for reference only; they can be used in
a RLL program if needed.
Address Setup Parameter Data type Ranges Read/Write
V7640 Loop Parameter
Table Pointer
Octal V1400 -- V7340,
V10000 -- V17740
write
V7641 Number of Loops BCD 0--4 write
V7642 Loop Error Flags Binary 0or1 read
If the number of loops is “0”, the loop controller task is turned off during the ladder
program scan. The loop controller will allow use of loops in ascending order,
beginning with 1. For example, you cannot use loop 1 and 4 while skipping 2 and 3.
The loop controller attempts to control the full number of loops specified in V7641.
NOTE: NOTE: The V--memory data is stored in RAM memory. If power is removed
from the CPU for an extended period of time, the PID Setup Parameters will be lost. It
is recommended to use the optional D2--BAT--1 for memory backup.
The CPU reports any programming errors of
the setup parameters in V7640 and V7641. It
does this by setting the appropriate bits in
V7642 on program-to-run mode transitions.
PID Error Flags, V7642
013456789101112131415 2Bit
If you use the DirectSOFT loop setup dialog box, its automatic range checking
prohibits possible setup errors. However, the setup parameters may be written using
other methods such as RLL, so the error flag register may be helpful in those cases.
The following table lists the errors reported in V7642.
Bit Error Description (0 = no error, 1 = error)
0The starting address (in V7640) is out of the lower V-memory range.
1The starting address (in V7640) is out of the upper V-memory range.
2The number of loops selected (in V7641) is greater than 4.
3The loop table extends past (straddles) the boundary at V7377. Use an
address closer to V1400.
4The loop table extends past (straddles) the boundary at V17777. Use
an address closer to V10000.
As a quick check, if the CPU is in Run mode and V7642=0000, then we know there
are no programming errors.
Some Things to Do
and Know Before
Starting
PID Error Flags
PID Loop Operation Maintenance
8--19
PID Loop Operation
DL350 User Manual, 2nd Edition
On a PROGRAM-to-RUN mode transition, the CPU reads the loop setup
parameters as pictured below. At that moment, the CPU learns the location of the
loop table and the number of loops it configures. Then during the ladder program
scan, the PID Loop task uses the loop data to perform calculations, generate alarms,
and so on. There are some loop table parameters the CPU will read or write on every
loop calculation.
READ
(at powerup)
CONFIGURE/
MONITOR
V--Memory Space
User Data
Setup Parameters
LOOP
DATA
CPU Tasks
READ/
WRITE
Ladder
Program
PID Loop
Tas k
DirectSOFT 5 Programming Software
V7640, V7641
NOTE: The DL350 CPU’s PID algorithm requires at least DirectSOFT, version 3.0c,
Build 58 (or later), or DirectSOFT 5, version 5.0 (or later). See our website for more
information: www.automationdirect.com.
The Loop Table contains data for only the
number of loops selected. The address for
the table is stored in V7641. Each loop
configuration occupies 32 words (0 to 37
octal) in the loop table.
For example, consider an application with
4 loops, and V2000 has been chosen as
the starting location. The Loop Parameter
will occupy V2000 -- V2037 for loop 1,
V2040 -- V2077 for loop 2 and so on. Loop
4 occupies V2140 -- V2177.
V--Memory Space
User Data
LOOP #1
V2000 32 words
LOOP #2
32 words
LOOP #3
32 words
LOOP #4
32 words
V2037
V2040
V2077
Determine the block of V--memory to be used for each PID loop. Besides being the
beginning of the PID parameter memory block, the first address will be the start of
loop 1 parameters. Remember, there are 32 words (0 to 37 octal) needed for each
loop. Once you have determined the beginning V--memory address to be used, you
can setup and store the PID parameters either directly in your RLL program or by the
using PID Setup in DirectSOFT.
NOTE: Whether one or more loops are being setup, this block of V--memory will only
be used for the PID loop parameters, do not use this block of memory for
anything else in your program.
Establishing the
Loop Table Size
and Location
PID Loop OperationMaintenance
and Troubleshooting
8--20 PID Loop Operation
DL350 User Manual, 2nd Edition
Using DirectSOFT is the simplest way to setup the parameters. The DL350 PID
parameters can be setup either offline or online while developing the user program.
The parameters wil be loaded to V--memory as the program is loaded into the PLC. If
the PID parameters are setup or changed while the PLC is connected to the
programming computer, this can only be don in Program Mode.
To begin the PID setup, open an edited program with DirectSOFT, then click on PLC
> Setup > PID to access the Setup PID dialog which is pictured below.
First type the beginning address in the PID Table Address dialog. After the address
has been entered, the memory range will appear.i Also, entering the number of PID
loops (1 to 4) will set the total V--memory range for the number of loops entered. After
the V--memory address has been entered, the necessary PID parameters for a basic
loop operation for each loop can be setup with the dialogs made available.
PID Loop Operation Maintenance
8--21
PID Loop Operation
DL350 User Manual, 2nd Edition
The parameters associated with each loop are listed in the following table. The
address offset is in octal, to help you locate specific parameters in a loop table. For
example, if a table begins at V2000, then the location of the reset (integral) term is
Addr+11, or V2011. Do not use the word# to calculate addresses.
Word # Address+Offset Description Format Read on-
the-fly***
1 Addr + 0 PID Loop Mode Setting 1 bits Yes
2 Addr + 1 PID Loop Mode Setting 2 bits Yes
3 Addr + 2 Setpoint Value (SP) word/binary Yes
4 Addr + 3 Process Variable (PV) word/binary Yes
5 Addr + 4 Bias (Integrator) Value word/binary Yes
6 Addr + 5 Control Output Value word/binary Yes
7 Addr + 6 Loop Mode and Alarm Status bits --
8 Addr + 7 Sample Rate Setting word/BCD Yes
9 Addr + 10 Gain (Proportional) Setting word/BCD Yes
10 Addr + 11 Reset (Integral) Time Setting word/BCD Yes
11 Addr + 12 Rate (Derivative) Time Setting word/BCD Yes
12 Addr + 13 PV Value, Low-low Alarm word/binary No*
13 Addr + 14 PV Value, Low Alarm word/binary No*
14 Addr + 15 PV Value, High Alarm word/binary No*
15 Addr + 16 PV Value, High-high Alarm word/binary No*
16 Addr + 17 PV Value, deviation alarm (YELLOW) word/binary No*
17 Addr + 20 PV Value, deviation alarm (RED) word/binary No*
18 Addr + 21 PV Value, rate-of-change alarm word/binary No*
19 Addr + 22 PV Value, alarm hysteresis setting word/binary No*
20 Addr + 23 PV Value, error deadband setting wordbinary Yes
21 Addr + 24 reserved for future use -- --
22 Addr + 25 Loop derivative gain limiting factor setting word/BCD No**
23 Addr + 26 SP value lower limit setting word/binary Yes
24 Addr + 27 SP value upper limit setting word/binary Yes
25 Addr + 30 Control output value lower limit setting word/binary No**
26 Addr + 31 Control output value upper limit setting word/binary No**
27 Addr + 32 Remote SP Value V-Memory Address Pointer word/hex Yes
28 Addr + 33 Ramp/Soak Setting Flag bit Yes
29 Addr + 34 Ramp/Soak Programming Table Starting Address word/hex No**
30 Addr + 35 Ramp/Soak Programming Table Error Flags bits No**
31 Addr + 36 reserved for future use -- --
32 Addr + 37 reserved for future use -- --
*Read data only when alarm enable bit transitions 0 to1, ** Read data only on PLC Mode change,
*** Read on--the--fly means that the content of V--memory can be changed while the PID loop is in operation.
Loop Table
Word Definitions
PID Loop OperationMaintenance
and Troubleshooting
8--22 PID Loop Operation
DL350 User Manual, 2nd Edition
The individual bit definitions of PID Mode Setting 1 word (Addr+00) are listed in the
following table.
Bit PID Mode Setting 1 Description Read/Write Bit=0 Bit=1
0Manual Mode Loop Operation request write -- 0¤1
request
1Automatic Mode Loop Operation request write -- 0¤1
request
2Cascade Mode Loop Operation request write -- 0¤1
request
3Bumpless Transfer select write Mode I Mode II
4Direct or Reverse-Acting Loop select write Direct Reverse
5Position/Velocity Algorithm select write Position Velocity
6PV Linear/Square Root Extract select write Linear Sq. root
7Error Term Linear/Squared select write Linear Squared
8Error Deadband enable write Disable Enable
9Derivative Gain Limit select write Off On
10 Bias (Integrator) Freeze select write Off On
11 Ramp/Soak Operation select write Off On
12 PV Alarm Monitor select write Off On
13 PV Deviation alarm select write Off On
14 PV rate-of-change alarm select write Off On
15 reserved for future use -- -- --
PID Mode Setting 1
Bit Descriptions
(Addr + 00)
PID Loop Operation Maintenance
8--23
PID Loop Operation
DL350 User Manual, 2nd Edition
The bit definitions for PID Mode Setting 2 word (Addr+01) are listed in the following
table. More information about the use of this word is available later in this chapter.
Bit PID Mode Setting 2 Description Read/Write Bit=0 Bit=1
0Input (PV) and Control Output Range
Unipolar/Bipolar select
(See Notes 1 and 2) write unipolar bipolar
1Input/Output Data Format select
(See Notes 1 and 2) write 12 bit 15 bit
2reserved for future use -- -- --
3SP Input limit enable write disable enable
4Integral Gain (Reset) units select write seconds minutes
5Select Autotune PID algorithm write closed loop open loop
6Autotune selection write PID PI only
(rate = 0)
7Autotune start read/write autotune
done force start
8PID Scan Clock (internal use) read -- --
9Input/Output Data Format 16-bit select
(See Notes 1 and 2) write not
16 bit select
16 bit
10 Select separate data format for input and
output (See Notes 2 and 3) write same
format separate
formats
11 Control Output Range
Unipolar/Bipolar select
(See Notes 2 and 3) write unipolar bipolar
12 Output Data Format select
(See Notes 2 and 3) write 12 bit 15 bit
13 Output data format 16-bit select
(See Notes 2 and 3) write not
16 bit select
16 bit
14--15 Reserved for future use -- -- --
NOTE 1: If the value in bit 9 is 0, then the values in bits 0 and1 are read. If the value in
bit 9 is 1, then the values in bits 0 and 1 are not read, and bit 9 defines the data format
(the range is automatically unipolar).
NOTE 2: If the value in bit 10 is 0, then the values in bits 0, 1, and 9 define the input
and output ranges and data formats (the values in bits 11, 12, and 13 are not read). If
the value in bit 10 is 1, then the values in bits 0, 1, and 9 define only the input range
and data format, and bits 11, 12, and 13 are read and define the output range and
data format..
NOTE 3: If bit 10 has a value of 1 and bit 13 has a value of 0, then bits 11 and 12 are
read and define the output range and data format. If bit 10 and bit 13 each have a
value of 1, then bits 11 and 12 are not read, and bit 13 defines the data format (the
output range is automatically unipolar).
PID Mode Setting 2
Descriptions
(Addr + 01)
PID Loop OperationMaintenance
and Troubleshooting
8--24 PID Loop Operation
DL350 User Manual, 2nd Edition
The individual bit definitions of the Mode/Alarm monitoring word (Addr+06) are listed
in the following table.
Bit Mode / Alarm Bit Description Read/Write Bit=0 Bit=1
0Manual Mode Indication read -- Manual
1Automatic Mode Indication read -- Auto
2Cascade Mode Indication read -- Cascade
3PV Input LOW--LOW Alarm read Off On
4PV Input LOW Alarm read Off On
5 PV Input HIGH Alarm read Off On
6PV Input HIGH--HIGH Alarm read Off On
7 PV Input YELLOW Deviation Alarm read Off On
8PV Input RED Deviation Alarm read Off On
9 PV Input Rate-of-Change Alarm read Off On
10 Alarm Value Programming Error read -- Error
11 Loop Calculation Overflow/Underflow read -- Error
12 Loop Auto--Tune indication read Off On
13 Auto--Tune error indication read -- Error
14--15 Reserved for Future Use -- -- --
The individual bit definitions of the Ramp/Soak Table Flag word (Addr+33) are listed
in the following table.
Bit Ramp/Soak Flag Bit Description Read/Write Bit=0 Bit=1
0Start Ramp/Soak Profile write -- 0¤1Start
1Hold Ramp/Soak Profile write -- 0¤1Hold
2Resume Ramp/soak Profile write -- 0¤1
Resume
3Jog Ramp/Soak Profile write -- 0¤1Jog
4Ramp/Soak Profile Complete read -- Complete
5PV Input Ramp/Soak Deviation read Off On
6Ramp/Soak Profile in Hold read Off On
7Reserved read -- --
8--15 Current Step in R/S Profile read decode as byte (hex)
Bits 8--15 must be read as a byte to indicate the current segment number of the
Ramp/Soak generator in the profile. This byte will have the values 1, 2, 3, 4, 5, 6, 7,8,
9, A, B, C, D, E, F, and 10. which represent segments 1 to 16 respectively. If the
byte=0. then the Ramp/Soak table is not active.
Mode/Alarm
Monitoring Word
(Addr + 06)
Ramp/Soak Table
Flags
(Addr + 33)
PID Loop Operation Maintenance
8--25
PID Loop Operation
DL350 User Manual, 2nd Edition
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 in a continuous stream,
called a profile. To use the Ramp/Soak feature, you must program a separate table
of 32 words with appropriate values. A DirectSOFT dialog box makes this easy to
do.
In the basic loop table, the Ramp/Soak Table Pointer at Addr + 34 must point to the
start of the ramp/soak data for that loop. This may be anywhere in user memory, and
does not have to be adjoining to the Loop Parameter table, as shown to the left.Each
R/S table requires 32 words, regardless of the number of segments programmed.
The ramp/soak table parameters are defined in the table below. Further details are in
the section on Ramp/Soak Generator section in this chapter.
Addr
Offset Step Description Addr
Offset Step Description
+00 1Ramp End SP Value +20 9Ramp End SP Value
+01 1Ramp Slope +21 9Ramp Slope
+02 2Soak Duration +22 10 Soak Duration
+03 2Soak PV Deviation +23 10 Soak PV Deviation
+04 3Ramp End SP Value +24 11 Ramp End SP Value
+05 3Ramp Slope +25 11 Ramp Slope
+06 4Soak Duration +26 12 Soak Duration
+07 4Soak PV Deviation +27 12 Soak PV Deviation
+10 5Ramp End SP Value +30 13 Ramp End SP Value
+11 5Ramp Slope +31 13 Ramp Slope
+12 6Soak Duration +32 14 Soak Duration
+13 6Soak PV Deviation +33 14 Soak PV Deviation
+14 7Ramp End SP Value +34 15 Ramp End SP Value
+15 7Ramp Slope +35 15 Ramp Slope
+16 8Soak Duration +36 16 Soak Duration
+17 8Soak PV Deviation +37 16 Soak PV Deviation
The individual bit definitions of the Ramp/Soak Table Programming Error Flags
(Addr + 35) word are listed in the following table.
Bit R/S Error Flag Bit Description Read/
Write Bit=0 Bit=1
0Starting Addr out of lower V-memory range read -- Error
1Starting Addr out of upper V-memory range read -- Error
2--3 Reserved for future Use -- -- --
4Starting Addr out of System Parameter
V-memory Range read -- Error
5--15 Reserved for future Use -- -- --
Ramp/Soak
Table Location
(Addr + 34)
V--Memory Space
User Data
LOOP #1
V2000
32 words
LOOP #2
32 words
V2037
Ramp/Soak #1
32 words
V3000
V2034 = 3000 octal
Pointer to R/S table
Ramp/Soak Table
Programming Error
Flags
(Addr + 35)
PID Loop OperationMaintenance
and Troubleshooting
8--26 PID Loop Operation
DL350 User Manual, 2nd Edition
Once the PID table is established in V--memory, configuring the PID loop continues
with the DirectSOFT PID setup configuration dialog. You will need to check and fill in
the data required to control the PID loop. Select Configure and the following dialog
will appear for this process.
Select the Algorithm Type
Chose either Position or Velocity. The default algorithm is Position. This is the choice
for most applications which include heating and cooling loops as well as most
position and level control loops. A typical velocity control will consist of a process
variable such as a flow totalizer in a flow control loop.
Enter the Sample Rate
The main tasks of the CPU fall into
categories as shown to the right. The list
represents the tasks done when the CPU
is in Run Mode, on each PLC scan. Note
that PID loop calculations occur after the
ladder logic task.
The sample rate of a control loop is simply
the frequency of the PID calculation. Each
calculation generates a new control output
value. With the DL350 CPU, you can set
the sample rate of a loop from 50 mS to
99.99 seconds. Most loops do not require
a fresh PID calculation on every PLC
scan. Some loops may need calculating
only once in 1000 scans.
Enter 0.05 sec., or the sample rate of your
choice, for each loop, and the CPU
automatically schedules and executes
PID calculations on the appropriate scans.
Read
Inputs
Service
Peripherals
Ladder
Program
Calculate
PID Loops
Internal
Diagnostics
Write
Outputs
PLC
Scan
Configure the PID
Loop
PID Loop Operation Maintenance
8--27
PID Loop Operation
DL350 User Manual, 2nd Edition
Select Forward/Reverse
It is important to know 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 output of most PID loops are forward acting, such as a heating control loop.
An increase in heat applied will increase the PV (temperature).
A reverse acting control loop is one where an increase in the control output results in
a decrease in the PV. A common example of this would be a refrigeration system,
where an increase in the cooling input causes a decrease in the PV (temperature).
The Transfer Mode
Choose either Bumpless I or Bumpless II to provide a smooth transition of the control
output from Manual Mode to Auto Mode. Choosing Bumpless I will set the SP equal
to the PV when the control output is switched from Manual to Auto. If this is not
desired, choose Bumpless II.
The characteristics of Bumpless I and II transfer types are listed in the chart below.
Note that their operation also depends on which PID algorithm you are using, the
position or velocity form of the PID equation. Note that you must use Bumpless
Transfer type I when using the velocity form of the PID algorithm.
Transfer
Type
Transfer
Select Bit PID Algorithm Manual-to-Auto
Transfer Action
Auto-to-Cascade
Transfer Action
Bumpless
0
Position Forces Bias = Control Output
Forces SP = PV Forces Major Loop Output =
Minor Loop PV
B
u
m
p
l
e
s
s
Transfer I
0
Velocity Forces SP = PV Forces Major Loop Output =
Minor Loop PV
Bumpless
1
Position Forces Bias = Control Output none
B
u
m
p
l
e
s
s
Transfer II
1
Velocity none none
The transfer type can also be selected in a RLL program by setting bit 3 of PID Mode
1, V+00 setting as shown.
PID Mode 1 Setting V+00
013456789101112131415 2Bit
Bumpless Transfer I / II select
SP/PV & Output Format
This block allows you to select either Common format or Independent format.
Common format is the default and is most commonly used. With this format both
SP/PV and Output will have the same data structure. Both will have the same
number of bits and either bipolar or unipolar. If Independent format is selected, the
data structure selections will be grayed out. The reason for this is that they become
independently selectable in the SP/PV and the Output dialogs.
Common Data Format
Select either Unipolar data format (which is positive data only) in 12 bit (0 to 4095),
15 bit (0 to 32767), or 16 bit (0 to 65535) format, or Bipolar data format, which ranges
from negative to positive (--4095 to 4095 or --32767 to 32767) and requires a sign bit.
Bipolar selection displays input/output as magnitude plus sign, not two’s
complement. The bipolar selection is not available when 16--bit data format is
selected.
PID Loop OperationMaintenance
and Troubleshooting
8--28 PID Loop Operation
DL350 User Manual, 2nd Edition
Process Variable V+03
Loop
Calculation
Σ
+--
Control Output V+05Setpoint V+02
013456789101112131415 2Bit 12 bit unipolar
12 bit bipolar
15 bit bipolar
15 bit unipolar
0 to 0FFF (0 to 4095)
0 to 0FFF, 8FFF to 8001
(0 to 4095, --4095 to --1)
0 to 32767
0 to 7FFF, FFF to 8001
(0 to 32767, --32767 to --1)
Data formats
013456789101112131415 2Bit
PID Mode 2 Setting V+01
00
01
10
11
Select data
format using
bits 0 and 1.
= sign bit
LSB
The data format determines the numerical interface between the PID loop and the
PV sensor and the control output device. This selects the data format for both the SP
and the PV.
Loop Mode
The feature called Independent of CPU mode in the dialog is not available in the
DL350. However, the DL350 does provide the three standard control modes:
Manual, Automatic, and Cascade. The sources of the three basic variables SP, PV
and control output are different for each mode.
In Manual Mode, the loop is not executing PID calculations (however, loop alarms
are still active). With regard to the loop table, the CPU stops writing values to location
V+05 (control output) for that loop. It is expected that an operator or other intelligent
source is manually controlling the output by observing the PV and writing data to the
control output as necessary to keep the process under control. The drawing below
shows the equivalent schematic diagram of manual mode operation.
Loop
Calculation
Control Output V+05
Input from Operator Manual
Auto
In Automatic Mode, the loop operates normally and generates new control output
values. It calculates the PID equation and writes the result in location V+05 every
sample period of that loop. The equivalent schematic diagram is shown below.
Loop
Calculation
Control Output V+05
Input from Operator Manual
Auto
PID Loop Operation Maintenance
8--29
PID Loop Operation
DL350 User Manual, 2nd Edition
In Cascade Mode, the loop operates just as in Automatic Mode, with one important
change. The data source for the SP changes from its normal location at V+02, using
the control output value from another loop (the purpose of cascading loops is
covered later in this chapter). So in Auto or Manual modes, the loop calculation uses
the data at V+02. In Cascade Mode, the loop calculation reads the control output
from another loop’s parameter table.
Process Variable
Σ
+
--
Setpoint
Cascade
Auto/Manual
Control Output V+05
Normal SP V+02
Loop
Calculation
Control Output
Loop
Calculation
Cascaded loopAnother loop
As pictured below, a loop change from one mode to another, but cannot go from
Manual Mode to Cascade. This mode change is prohibited because a loop would be
changing two data sources at the same time, and could cause a loss of control.
Manual Automatic Cascade
When the CPU is operating in the Run Mode, the normal operation of the PID loop
controller is to read the loop data and perform calculations on each scan of the RLL
program. When the CPU is placed in the Program Mode, the RLL program halts
operation and all PID loops are automatically put into the Manual Mode. The PID
parameters can then be changed if desired. Similarly, by placing the CPU in the Run
mode, the PID loops are returned to the operational mode which they were
previously in, i.e., Manual, Automatic and Cascade. With this selection you
automatically affect the modes by changing the CPU mode.
PID Loop OperationMaintenance
and Troubleshooting
8--30 PID Loop Operation
DL350 User Manual, 2nd Edition
SP/PV Addresses
An SP/PV dialog will be made available to setup how the setpoint (SP) and the
process variable (PV) will be used in the loop. If this loop is the minor loop of a
cascaded pair, enter that control output address in the Remote SP from Cascaded
Loop Output area. It is sometimes desirable to limit the range of setpoint values
allowed to be entered. To activate this feature, check the box next to Enable Limiting.
This will activate the Upper and Lower fields for the values to be entered. 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 used for certain PID loops, such
as a flow control loop. The Auto transfer from I/O module will be grayed out and not
available for use by the DL350.
NOTE: The SP/PV dialog can be left as it first appears for basic PID operations.
PID Loop Operation Maintenance
8--31
PID Loop Operation
DL350 User Manual, 2nd Edition
Set Control Output Limits
Another dialog that will be available in the PID setup will be the Output dialog. The
control output address, V+05, (determined by the PID loop table beginning address)
will be in view. Enter the output range limits, Upper Limit and Lower Limit, that will
meet the requirement of the process and which will agree with the data format that
has been selected. For a basic PID operation using a 12 bit output module, set the
Upper Limit to 4095 and leave the Lower Limit set to 0. The Auto transfer to I/O
module is not available for use by the DL350. The Output Data format area is not
available and is grayed out if Common format has been chosen (see page 8--26).
WARNING: If the Upper Limit is set to zero, the output will never get above
zero. In effect, there will be not control output.
PID Loop OperationMaintenance
and Troubleshooting
8--32 PID Loop Operation
DL350 User Manual, 2nd Edition
Enter PID Parameters
Another PID setup dialog, Tuning, is for entering the PIDparameters 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). The
following diagram shows a form of the PID calculation in which the control output is
the sum of the proportional gain, integral gain and derivative gain. With each
calculation of the loop, each term receives the same error signal value.
Process Variable
ΣError Term
+
--
Control OutputSetpoint Σ
+
P
I
D
Loop Calculation
+
+
The P, I and D gains are 4--digit BCD numbers with values from 0000 to 9999. They
contain an implied decimal point in the middle, so the values are actually 00.00 to
99.99. Some gain values have units yProportional gain has no unit, Integral gain
may be selected in seconds or in minutes, and Derivative gain is in seconds.
Gain (Proportional Gain) yThis is the most basic gain of the three. Values range
from 0000 to 9999, but they are used internally as xx.xx. An entry of “0000“
effectively removes the proportional term from the PID equation. This
accommodates applications which need integral--only loops.
Reset (Integral Gain) yValues range from 0001 to 9998, but they are used
internally as xx.xx. An entry of “0000“ or “9999“causes the integral gain to be “”,
effectively removing the integrator term from the PID equation. This accommodates
applications which need proportional--only loops. The units of integral gain may be
either seconds or minutes, as shown in the above dialog.
Rate (Derivative Gain) yValues which can be entered range from 0001 to 9999,
but they are used internally as xx.xx. An entry of “0000“ allows removal of the
derivative term from the PID equation (a common practice). This accommodates
applications which require only proportional and/or integral loops. Most control
loops will operate as a PI loop.
PID Loop Operation Maintenance
8--33
PID Loop Operation
DL350 User Manual, 2nd Edition
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. The function of the gain--limiting is shown in the diagram
below.
Process Variable
ΣError Term
+
--
Control
Output
Setpoint
PID Mode 1 Setting V+00
013456789101112131415 2Bit
Derivative gain limit select
Σ
+
P
I
D
Loop Calculation
+
+
Derivative
Derivative,
gain-limited
0
1
Integral
Proportional
Loop Table
V+25 Derivative Gain Limit00XX
The gain limit can be particularly useful during loop tuning. Most loops can tolerate
only a little derivative gain without going into uncontrolled oscillations.
If this option is checked, a Limit from 0 to 20 must also be entered for Limit.
NOTE: When first configuring a loop, it’s best to use the standard error term until
after the loop is tuned. Once the loop is tuned, you will be able to tell if these functions
will enhance control. The Error Squared and/or Enable Deadband can be selected
later in the PID setup. Also, values are not required to be entered in the Tuning
dialog, but they can set later in the DirectSOFT PID View.
Error Term Selection
The error term is internal to the CPUs PID loop controller, and is generated again in
each PID calculation. Although its data is not directly accessible, you can easily
calculate it by subtracting: Error = (SP -- PV). The PID calculation operates on this
value linearly to give the result. However, a few applications can benefit from
non--linear control. The Error--squared method of non--linear control exaggerates
large errors and diminisihes small error.
Error Squared yWhen selected, the squared error function simply squares the
error term (but preserves the original algebraic sign), which is used in the
calculation. This affects the Control Output by diminishing its response to smaller
error values, but maintaining its response to larger errors. Some situations in which
the error squared term might be useful:
SNoisy PV signal -- using a squared error term can reduce the effect of
low--frequency electrical noise on the PV, which will make the control
system jittery. A squared error maintains the response to larger errors.
SNon--linear process -- some processes (such as chemical pH control)
require non--linear controllers for best results. Another application is
surge tank control, where the Control Output signal must be smooth.
PID Loop OperationMaintenance
and Troubleshooting
8--34 PID Loop Operation
DL350 User Manual, 2nd Edition
Enable Deadband yWhen 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. Refer to the figure below. Suppose
the PV signal becomes disconnected, and the PV value goes to zero. While this is a
serious loop fault, it is made worse by reset windup. Notice the bias (reset) term
keeps integrating normally during the PV disconnect, until its upper limit is reached.
When the PV signal returns, the bias value is saturated (windup) and takes a long
time to return to normal. The loop output consequently has an extended recovery
time. Until recovery, the output level is wrong and causes further problems.
PV
Output
0
Bias
Reset windup Freeze bias enabled
Recovery time Recovery time
PV loss PV loss
In the second PV signal loss episode in the figure, the freeze bias feature is enabled.
It causes the bias value to freeze when the control output goes to its range limits.
Much of the reset windup is thus avoided, and the output recovery time is much less.
For most applications, the freeze bias feature will work with the loop as described
above. It is suggested to enable this feature by selecting it in the dialog. Bit 10 of PID
Mode 1 Setting (V+00) word can also be set in RLL.
NOTE: The freeze bias feature stops the bias term from changing when the control
output reaches the end of the data range. If you have set limits on the control output
other than the range (i.e, 0--4095 for a unipolar/12 bit loop), the bias term still uses
the end of range for the stopping point and bias freeze will not work.
PID Loop Operation Maintenance
8--35
PID Loop Operation
DL350 User Manual, 2nd Edition
Setup 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. Most process control loops in industry operate continuously, and will
eventually lose control of the PV due to an error condition. Process alarms are vital in
early discovery of a loop error condition and can alert plant personnel to manually
control a loop or take other measures until the error condition has been repaired.
The alarm thresholds are fully programmable, and each type of alarm may be
independently enabled and monitored. The following diagram shows the Alarm
dialog in the PID setup which simplifies the alarm setup.
Monitor Limit Alarms
Checking this box will allow all of the PV limit alarms to be monitored once the limits
are entered.The PV absolute value alarms are organized as two upper and two
lower alarms. The alarm status is false as long as the PV value remains in the region
between the upper and lower alarms, as shown below. The alarms nearest the safe
zone are named High Alarm and Low Alarm. If the loop loses control, the PV will
cross one of these thresholds first. Therefore, you can program the appropriate
alarm threshold values in the loop table locations shown below to the right. The data
format is the same as the PV and SP (12--bit or 15--bit). The threshold values for
these alarms should be set to give an operator an early warning if the process loses
control.
PV
High--high Alarm
High Alarm
Low Alarm
Low--low Alarm
Loop Table
V+16 High-high AlarmXXXX
V+15 High AlarmXXXX
V+14 Low AlarmXXXX
V+13 Low-low AlarmXXXX
NOTE: The Alarm dialog can be left as it first appears, without alarm entries. The
alarms can then be setup in the DirectSOFT PID View.
PID Loop OperationMaintenance
and Troubleshooting
8--36 PID Loop Operation
DL350 User Manual, 2nd Edition
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.
The PV Absolute Value Alarms are
reported in the four bits in the PID Mode
and Alarm Status word in the loop table, as
shown to the right. We highly recommend
using ladder logic to monitor these bits.
The bit-of-word instructions make this
easy to do. Additionally, you can monitor
PID alarms using DirectSOFT.
PID Mode and Alarm Status V+06
013456789101112131415 2Bit
High-high Alarm
High Alarm
Low Alarm
Low-low Alarm
SP
Red Deviation Alarm
Yellow Deviation Alarm Loop Table
V+17 Yellow Deviation AlarmXXXX
V+20 Red Deviation AlarmXXXX
Yellow Deviation Alarm
Red Deviation Alarm
Green
Yellow
Red
Yellow
Red
The thresholds define zones, which fluctuate with the SP value. The green zone
which surrounds the SP value represents a safe (no alarm) condition. The yellow
zones lie just outside the green zone, and the red zones are just beyond those.
The PV Deviation Alarms are reported in
the two bits in the PID Mode and Alarm
Status word in the loop table, as shown to
the right. We highly recommend using
ladder logic to monitor these bits. The
bit-of-word instructions make this easy to
do. Additionally, you can monitor PID
alarms using DirectSOFT.
PID Mode and Alarm Status V+06
013456789101112131415 2Bit
Red Deviation
Yellow Deviation
The PV Deviation Alarm can be independently enabled and disabled from the other
PV alarms, using bit 13 of the PID Mode 1 Setting V+00 word.
Remember, the alarm hysteresis feature works in conjunction with both the deviation
and absolute value alarms, and is discussed at the end of this section.
PID Loop Operation Maintenance
8--37
PID Loop Operation
DL350 User Manual, 2nd Edition
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, a SP value error, or other causes. If the
operator responds to a PV Rate-of-Change Alarm quickly and effectively, the PV
absolute value will not reach the point where the material in process would be ruined.
The DL350 loop controller provides a programmable PV Rate-of-Change Alarm, as
shown below. The rate-of-change is specified in PV units change per loop sample
time. This value is programmed into the loop table location V+21.
Loop Table
V+21 PV Rate-of-Change AlarmXXXX
PV
PV slope OK
Sample time
PV slope excessive
rate-of-change alarm
Sample time
PID Mode and Alarm Status V+06
013456789101112131415 2Bit
PV Rate of
Change Alarm
As an example, suppose the PV is temperature for our process, and we want an
alarm when the temperature changes faster than 15 degrees/minute.We must know
PV counts per degree and the loop sample rate. Then, suppose the PV value (in
V+03 location) represents 10 counts per degree, and the loop sample rate is 2
seconds. We will use the formula below to convert our engineering units to
counts/sample period:
15 degrees
Alarm Rate-of-Change = 1 minute X10 counts
/
degree
30 loop samples / min. =150
30 = 5 counts / sample period
From the calculation result, we would program the value “5” in the loop table for the
rate-of-change. The PV Rate-of-Change Alarm can be independently enabled and
disabled from the otherPV alarms, using bit 14 of the PIDMode 1 Setting V+00 word.
The alarm hysteresis feature (discussed next) does not affect the Rate-of-Change
Alarm.
PID Loop OperationMaintenance
and Troubleshooting
8--38 PID Loop Operation
DL350 User Manual, 2nd Edition
PV Alarm Hysteresis
The PV Absolute Value Alarm and PV Deviation Alarm are programmed using
threshold values. When the absolute value or deviation exceeds the threshold, the
alarm status becomes true. Real-world PV signals have some noise on them, which
can cause some fluctuation in the PV value in the CPU. As the PV value crosses an
alarm threshold, its fluctuations cause the alarm to be intermittent and annoy
process operators. The solution is to use the PV Alarm Hysteresis feature.
The PV Alarm Hysteresis amount is programmable from 1 to 200 (binary/decimal).
When using the PV Deviation Alarm, the programmed hysteresis amount must be
less than the programmed deviation amount. The figure below shows how the
hysteresis is applied when the PV value goes past a threshold and descends back
through it.
Loop Table
V+22 PV Alarm HysteresisXXXX
PV
Alarm threshold
Alarm 0
1
Hysteresis
The hysteresis amount is applied after the threshold is crossed, and toward the safe
zone. In this way, the alarm activates immediately above the programmed threshold
value. It delays turning off until the PV value has returned through the threshold by
the hysteresis amount.
Alarm Programming Error
The PV Alarm threshold values must have
certain mathematical relationships to be
valid. The requirements are listed below. If
not met, the Alarm Programming Error bit
will be set, as indicated to the right.
PID Mode and Alarm Status V+06
013456789101112131415 2Bit
Alarm Programming Error
SPV Absolute Alarm value requirements:
Low-low < Low < High < High-high
SPV Deviation Alarm requirements:
Yellow < Red
Loop Calculation Overflow/Underflow Error
This error occurs whenever the output
reaches it’s upper or lower limit and the PV
does not reach the setpoint. A typical
example might be when a valve is stuck,
the output is at it’s limit, but the PV has not
reached setpoint.
PID Mode and Alarm Status V+06
013456789101112131415 2Bit
Loop Calculation
Overflow/Underflow Error
NOTE: Overflow/Underflow can be alarmed in PID View. The optional C--more
operator interface panel (see the automationdirect.com website) can also be setup
to read these error bits using the PID Faceplate templates.
PID Loop Operation Maintenance
8--39
PID Loop Operation
DL350 User Manual, 2nd Edition
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 in this chapter.
Complete the PID Setup
Once you have filled in the necessary information for the basic PID setup, the
configuration should be saved. The icons on the Setup PID dialog will allow you to
save the configuration to the PLC and to disk. The save to icons have the arrow
pointing to the PLC and disk. The read from icons have the arrows pointing away
from the PLC and disk.
An optional feature is available with the Doc tab in the Setup PID window. You enter a
name and description for the loop. This is useful if there are more than one PID loop
in your application.
NOTE: It is good practice to save your project after setting up the PID loop by
selecting File from the menu toolbar, then Save project > to disk. In addition to
saving your entire project, all the PID parameters are also saved.
PID Loop OperationMaintenance
and Troubleshooting
8--40 PID Loop Operation
DL350 User Manual, 2nd Edition
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 a SP step change. It is important to keep in mind
that understanding the process is fundamental to getting a well designed control
loop. Sensors must be in appropriate locations and valves must be sized correctly
with appropriate trim. PID control does not have typical values. There isn’t one
control process that is identical to another.
Manual Tuning vs. Auto Tuning
You may enter the PID gain values to tune your loops (manual tuning), or you can
rely on the PID processing “engine“ in the CPU to automatically calculate the gain
values (auto tuning). Most experienced process engineers will have a favorite
method; the DL350 will accommodate either preference. The use of auto tuning can
eliminate much of the trial--and--error of the manual tuning approach, especially if
you do not have a lot of loop tuning experience. However, performing the auto tuning
procedure will get the gains close to optimal values, but additional manual tuning can
get the gain values to their optimal values.
WARNING: Only authorized personnel fully familiar with all aspects of the
process should make changes that affect the loop tuning constants. Using the
loop auto tune procedures will affect the process, including inducing large
changes in the control output value. Make sure you thoroughly consider the
impact of any changes to minimize the risk of injury to personnel or damage to
equipment. The auto tune in the DL350 is not intended to be used as a
replacement for your process knowledge.
Whether you use manual or auto tuning, it is very important to verify basic
characteristics of a newly--installed process before attempting to tune it. With the
loop in Manual Mode, verify the following items for each new loop.
SSetpoint yverify that the SP source can generate a setpoint. Put the
PLC in Run Mode and leave the loop in Manual Mode, then monitor the
loop table location V+02 to see the SP value(s). (If you are using the
ramp/soak generator, test it now).
SProcess Variable yverify that the PV value is an accurate
measurement, and the PV data arriving in the loop table location V+03
is correct. If the PV signal is very noisy, consider filtering the input either
through hardware (RC low--pass filter), or using the filter in this chapter.
SControl Output yif it is safe to do so, manually change the output a
small amount (perhaps 10%) and observe its affect on the process
variable. Verify the process is direct--acting or reverse acting, and check
the setting for the control output (inverted or non--inverted). Make sure
the control output upper and lower limits are not equal to each other.
SSample Rate ywhile operating open--loop, this is a good time to find
the ideal sample rate (see Configure the PID Loop beginning on page
8--25). However, if you are going to use auto tuning, the auto tuning
procedure will automatically calculate the sample rate in addition to the
PID gains.
Open--Loop Test
PID Loop Operation Maintenance
8--41
PID Loop Operation
DL350 User Manual, 2nd Edition
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.
Monitor the values of SP, PV and CV with a loop trending instrument or use the PID
View feature in DirectSOFT (see page 8--49).
NOTE: We recommend using the PID View to select manual for the vertical scale
feature, for both SP/PV area and Bias/Control Output areas. The auto scaling
feature would otherwise change the vertical scale on the process parameters and
add confusion to the loop tuning process.
SAdjust the gains so the Proportional Gain = 0.5 or 1.0 (1.0 is a good
value based on experience), Integral Gain = 9999 (this basically
eliminates reset) and Derivative Gain = 0000. This disables the
integrator and derivative terms, and provides some proportional gain.
SCheck the bias value in the PID View and set it to zero.
SSet the SP to a value equal to 50% of the full range.
SNow, select Auto Mode. If the loop will not stay in Auto Mode, check the
troubleshooting tips at the end of this chapter. Allow the PV to stabilize
around the 50% point of the range.
SChange the SP to the 60% point of the range.
The response may take awhile, but you will see that there isn’t any oscillation. This
response is not desirable since it takes a long time to correct the error; also, there is a
difference between the SP and the PV.
SIncrease 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.
SIncrease the Proportional gain in small increments, such as 4, 6, 7, etc.
until the control output response begins to oscillate. This is the
Proportional gain that should be recorded.
Manual Tuning
Procedure
PID Loop OperationMaintenance
and Troubleshooting
8--42 PID Loop Operation
DL350 User Manual, 2nd Edition
SNow, return the Proportional gain to the stable response, for example,
9.7. The error, SP--PV, should be small, but not at zero.
SNext, add a small amount of Integral gain (reset) in order for the error to
reach zero. Begin by using 80 seconds (adjust in minutes if necessary).
The error should get smaller.
SSet the Integral gain to a lower value, such as 50 for a different
response. If there is no response, continue to decrease the reset value
until the response becomes unstable. See the figure below.
SFor discussion, let us say that a reset value of 35 made the control
output unstable. Return the reset value to the stable value, such as 38.
Be careful with this adjustment since the oscillation can destroy the
process.
SThe control output response should be optimal now, without a Derivative
gain. The example recorded values are: Proportional gain = 9.7 and
Integral gain = 38 seconds. Note that the error has been minimized.
PID Loop Operation Maintenance
8--43
PID Loop Operation
DL350 User Manual, 2nd Edition
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. Small adjustments of the parameters can make the control
output more precise or more unstable. It is sometimes acceptable to have a small
overshoot to make the control output react quicker.
The derivative gain can be helpful for those control loops which are not controlling
temperature. For these loops, try adding a value of 0.5 for the derivative gain and see
if this improves the control output. If there is little or no response, increase the
derivative by increments of 0.5 until there is an improvement to the output trend.
Recall that the derivative gain reacts with a rate of change of the error.
PID Loop OperationMaintenance
and Troubleshooting
8--44 PID Loop Operation
DL350 User Manual, 2nd Edition
The auto tuning feature for the DL350 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.
WARNING: Only authorized personnel fully familiar with all aspects of the
process should make changes that affect the loop tuning constants. Using the
loop auto tuning procedures will affect the process, including inducing large
changes in the control output value. Make sure you thoroughly consider the
impact of any changes to minimize the risk of injury to personnel or damage to
equipment. The auto tune in the DL350 is not intended to be used as a
replacement for your process knowledge.
Once the physical loop components are connected to the PLC, auto tuning can be
initiated within DirectSOFT (see the DirectSOFT Programming Software Manual),
and it can be used to establish initial PID parameter values. Auto tuning is the best
“guess“ the CPU can do after some trial tests.
The loop controller offers both closed--loop and open--loop methods. The following
sections describe how to use the auto tuning feature, and what occurs in open and
closed--loop auto tuning.
The controls for the auto tuning function use three bits in the PID Mode 2 word V+01,
as shown below. DirectSOFT will manipulate these bits automatically when you use
the auto tune feature within DirectSOFT. Or, you may have your ladder logic access
these bits directly for allowing control from another source such as a dedicated
operator interface. The individual control bits allow you to start the auto tune
procedure, select PID or PI tuning and select closed--loop or open--loop tuning. If
you select PI tuning, the auto tune procedure leaves the derivative gain at 0. The
Loop Mode and Alarm Status word V+06 reports the auto tune status as shown. Bit
12 will be on (1) during the auto tune cycle, automatically returning to off (0) when
done.
Auto Tuning
Procedure
PID Loop Operation Maintenance
8--45
PID Loop Operation
DL350 User Manual, 2nd Edition
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).
NOTE: In theory, the SP value does not matter in this case, because the loop is not
closed. However, the requirement of the firmware is that the SP value must be more
than 5% of the PV range from the actual PV before starting the auto tune cycle (for
the DL350, 12 bit PV should be 205 counts or more below the SP for forward--acting
loops, or 205 counts or more above the SP for reverse--acting loops).
When auto tuning, the loop controller induces a step change on the output and
simply observes the response of the PV. From the PV response, the auto tune
function calculates the gains and the sample time. It automatically places the results
in the corresponding registers in the loop table.
The following timing diagram shows the events which occur in the open--loop auto
tuning cycle. The auto tune function takes control of the control output and induces a
10%--of--span step change. If the PV change which the loop controller observes is
less than 2%, then the step change on the output is increased to 20%--of--span.
SWhen Auto Tune starts, step change output m = 10%
SDuring Auto Tune, the controller output reached the full scale positive
limit. Auto Tune stopped and the Auto Tune Error bit in the Alarm word
bit turned on.
SWhen PV change is under 2%, output is changed at 20%. Open Loop
Auto Tune Cycle Wave: Step Response Method.
PID Loop OperationMaintenance
and Troubleshooting
8--46 PID Loop Operation
DL350 User Manual, 2nd Edition
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 SP Range
P = 1.2* nm/LrRr P = 0.9* nm/LrRr
I = 2.0* Lr I = 3.33* Lr
D = 0.5* Lr D=0
Sample Rate = 0.056* Lr Sample Rate = 0.12* Lr
nm = Output step change (10% = 0.1, 20% = 0.2)
We highly recommend using DirectSOFT for the auto tuning interface. The duration
of each auto tuning cycle will depend on the mass of the process. A slowly--changing
PV will result in a longer auto tune cycle time. When the auto tuning is complete, the
proportional, integral, and derivative gain values are automatically updated in loop
table locations V+10, V+11, and V+12 respectively. The sample time in V+07 is also
updated automatically. You can test the validity of the values the auto tuning
procedure yields by measuring the closed--loop response of the PV to a step change
in the output. The instructions on how to do this are in the section on the manual
tuning procedure (located prior to this auto tuning section).
Closed--Loop Auto Tuning
During a closed--loop auto tuning cycle the loop controller operates as shown in the
diagram below.
When auto tuning, the loop controller imposes a square wave on the output. Each
transition of the output occurs when the PV value crosses over/under the SP value.
Therefore, the frequency of the limit cycle is roughly proportional to the mass of the
process. From the PV response, the auto tune function calculates the gains and the
sample time. It automatically places the results in the corresponding registers in the
loop table.
PID Loop Operation Maintenance
8--47
PID Loop Operation
DL350 User Manual, 2nd Edition
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. Each time the sign of the
error (SP yPV) changes, the output changes full--span in the opposite direction.
This proceeds through three full cycles.
*Mmax = Output Value upper limit setting. Mmin = Output Value lower limit setting.
* This example is direct--acting.
When set to reverse--acting, the output will be inverted. When the loop tuning
observations are complete, the loop controller computes To(bump period) and Xo
(amplitude of the PV). Then it uses these values to compute Kpc (sensitive limit) and
Tpc (period limit). From these values, the loop controller auto tune function
computes the PID gains and the sample rate according to the Zeigler--Nichols
equations shown below:
Kpc = 4M / (π£X0) Tpc = 0
M = Amplitude of output
PID Tuning PI Tuning
P = 0.45 £Kpc P = 0.30 £Kpc
I = 0.60 £Tpc I = 1.00 £Tpc
D = 0.10 £Tpc D=0
Sample Rate = 0.014 £Tpc Sample Rate = 0.03 £Tpc
Auto Tuning Error
In open--loop tuning, if the auto tune error bit (bit 13 of loop Mode/Alarm status word
V+06) is on, please verify the PV and SP values are at least 5% of full scale
difference, as required by the auto tune function.
NOTE: If your PV fluctuates rapidly, you probably need to create a filter in ladder
logic (see example on page 8--54).
PID Loop OperationMaintenance
and Troubleshooting
8--48 PID Loop Operation
DL350 User Manual, 2nd Edition
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.
A new Data View window can be opened in any one of three ways; the menu bar
Debug > Data View > New, the keyboard shortcut Ctrl+Shift+F3or the Data
button on the Status toolbar. By default, the Data View window is assigned Data1 as
the default name. This name can be changed for the current view using the Options
dialog. The following diagram is an example of a newly opened Data View. The
window will open next to the Ladder View by default.
The Data View window can be used just as it is shown above for troubleshootingyour
PID logic, and it can be most useful when tuning the PID loop.
The PID View can only be opened aftera loop has been setup in your ladderprogram
and the programming computer is connected to the PLC (online). 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.
Use DirectSOFT 5
Data View with PID
View
Open a New Data
View Window
Open PID View
PID Loop Operation Maintenance
8--49
PID Loop Operation
DL350 User Manual, 2nd Edition
The PID View will open and appear over the Ladder View which can be brought into
view by clicking on it’s tab. When using the Data View and the PID View together,
each view can be sized for better use as shown in the below diagram.
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 on the following page illustrates how the to use the views to see the
current SP, PV and Output values, along with the other PID addresses. Refer to the
Loop Table Definitions page 8--21 for details of each word in the table. This is also a
good data type reference for each word in the table.
PID Loop OperationMaintenance
and Troubleshooting
8--50 PID Loop Operation
DL350 User Manual, 2nd Edition
P
I
D
Scale the time axis of the viewing
window by using this input box.
The trend can be cleared and
restarted from the left at anytime.
Process Variable and
Setpoint trends are
color coded.
The loop name area
turns red whenever there is an
overflow error.
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.
PID Loop Operation Maintenance
8--51
PID Loop Operation
DL350 User Manual, 2nd Edition
Using Other PID Features
Thefirstthreebitso
f
the PID Mode 1 word
V
+00
requests the operating mode of the corresponding
loop. Note: these bits are mode change requests,
not commands (certain conditions can prohibit a
particular mode change -- see next page).
PID Mode 1 Setting V+00
013456789101112131415 2Bit
Automatic
Cascade Manual
The normal state of these mode request bits is “000”. To request a mode change, you
must SET the corresponding bit to a “1”, for one scan. The PID loop controller
automatically resets the bits back to “000” after it reads the mode change request.
Methods of requesting mode changes are:
SDirectSOFT’s PID View -- this is the easiest method. Use the drop--down
menu, or click on one of the radio buttons if using older DirectSOFT version,
and the appropriate bit will be set.
SHPP -- Use Word Status (WD ST) to monitor the contents of V+00, which will be
a 4-digit BCD/hex value. You must calculate and enter a new value for V+00
that ORs the correct mode bit with its current value.
SLadder program-- ladder logic can request any loop mode when the PLC is in
Run Mode. This will be necessary after application startup.
Use the rung shown to the right to SET the
mode bit on (do not use an out coil). On a 0--1
transition of X0, the rung sets the Auto bit = 1.
The loop controller resets it.
X0
SET
B2000.1
Go to Auto Mode
SOperator panel -- interface the operator’s panel to ladder logic using standard
methods, then use the technique above to set the mode bit.
Since we can only request mode changes, the PID loop controller decides when to
permit mode changes andprovides the loop mode status. It reports the currentmode
on bits 0, 1, and 2 of the Loop Mode and Alarm Status word, location V+06 in the loop
table. The parallel request / monitoring functions are shown in the figure below. The
figure also shows the mode-dependent two possible SP sources, and the two
possible Control Output sources.
Process Variable
ΣError
Term
+--
Input from Operator
Control Output
Setpoint
Manual
Auto/Cascade
Cascade
Auto/Manual
PID Mode 1 Setting V+00
013456789101112131415 2Bit
Automatic
Cascade Manual
Control Output
from another loop
Normal Source
Loop
Calculation
PID Mode
Control
Mode Select
Loop Mode and Alarm Status V+06
013456789101112131415 2Bit
Automatic
Cascade Manual
Mode Request Mode Monitoring
How to Change
Loop Modes
PID Loop OperationMaintenance
and Troubleshooting
8--52 PID Loop Operation
DL350 User Manual, 2nd Edition
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 a few advanced applications). Remember that mode controls
are really mode request bits, and the actual loop mode is indicated elsewhere.
The following figure shows an operator’s panel using momentary push-buttons to
request PID mode changes. The panel’s mode indicators do not connect to the
switches, but interface to the corresponding data locations.
PID Mode 1 Setting V+00
013456789101112131415 2Bit
Operators Panel
Loop Mode and Alarm Status V+06
013456789101112131415 2Bit
Mode Request Mode Monitoring
Auto
Cascade
Manual
The modes of the PLC (Program, Run) interact with the loops as a group. The
following summarizes this interaction:
SWhen the PLC is in Program Mode, all loops are placed in Manual Mode
and no loop calculations occur. However, note that output modules
(including analog outputs) turn off in PLC Program Mode. So, actual
manual control is not possible when the PLC is in Program Mode.
SThe only time the CPU will allow a loop mode change is during PLC run
Mode operation. As such, the CPU records the modes of all 16 loops as
the desired mode of operation. If power failure and restoration occurs
during PLC run Mode, the CPU returns all loops to their prior mode
(which could be Manual, Auto, or Cascade).
SOn a Program-to-Run mode transition, the CPU forces each loop to
return to its prior mode recorded during the last PLC Run Mode.
SYou can add and configure new loops only when the PLC is in Program
Mode. New loops automatically begin in Manual Mode.
In normal conditions and during PLC Run Mode operation, the mode of a loop is
determined by the request to V+00, bits 0, 1, and 2. However, a condition exists
which will prevent a requested mode change from occurring:
SA major loop of a cascaded pair of loops cannot go from Manual to Auto
until its minor loop is in Cascade mode.
In other situations, the PID loop controller will automatically change the mode of the
loop to ensure safe operation:
SA loop which develops an error condition automatically goes to Manual.
SIf the minor loop of a cascaded pair of loops leaves Cascade Mode for
any reason, its major loop automatically goes to Manual Mode.
Operator Panel
Control of
PID Modes
PLC Modes’ Effect
on Loop Modes
Loop Mode
Override
PID Loop Operation Maintenance
8--53
PID Loop Operation
DL350 User Manual, 2nd Edition
A similar algorithm can be built in your ladder program. Your analog inputs can be
filtered effectively using either method. The following programming example
describes the ladder logic you will need. Be sure to change the example memory
locations to those that fit your application.
Filtering can induce a 1 part in 1000 error in your output because of “rounding”.
Because of the rounding error, you should not use zero or full scale as alarm points.
Additionally, the smaller the filter constant the greater the smoothing effect, but the
slower the response time. Be certain that a slower response is acceptable in
controlling your process.
LD
V2000
SUBR
V1400
BTOR
SP1
BIN
Loads the analog signal, which is a BCD value
and has been loaded from V-memory location
V2000, into the accumulator. Contact SP1 is
always on.
Converts the BCD value in the accumulator
to binary. This instruction is not needed if the
analog value is originally brought in as a
binary number.
Converts the binary value in the accumulator
to a real number.
Subtracts the real number stored in location
V1400 from the real number in the
accumulator, and stores the result in the
accumulator. V1400 is the designated
workspace in this example.
Multiplies the real number in the
accumulator by 0.2 (the filter factor),
and stores the result in the
accumulator. This is the filtered value.
OUTD
V1400
ADDR
V1400
MULR
R0.2
OUT
V1402
BCD
RTOB
Adds the real number stored in
location V1400 to the real number
filtered value in the accumulator, and
stores the result in the accumulator.
Copies the value in the accumulator
to location V1400.
Converts the real number in the
accumulator to a binary value, and
stores the result in the accumulator.
Converts the binary value in the accumulator
to a BCD number. Note: the BCD instruction
is not needed for PID loop PV (loop PV is a
binary number).
Loads the BCD number filtered value from
the accumulator into location V1402 to use
in your application or PID loop.
Creating an Analog
Filter in Ladder
Logic
PID Loop OperationMaintenance
and Troubleshooting
8--54 PID Loop Operation
DL350 User Manual, 2nd Edition
For those who are using DirectSOFT 5, you have the opportunity to use the Analog
Helper Intelligent Boxes (IBox) instructions. Following is one example which is
available. IBox instruction IB--402, Filter Over Time in Binary (decimal) will perform a
first--order filter on the Raw Data on a defined time interval. The equation is,
New = Old + [(Raw -- Old)
/
FDC
]
where,
New = New Filtered Value
Old = Old Filered Value
FDC = Filter Divisor Constant
Raw = Raw Data
The Filter Divisor Constant is an inte-
ger in the range K1 to K100, such that
if it equaled K1, then no filtering is per-
formed.
The rate at which the calculation is performed is specified by time in hundreths of a
second (0.01 seconds) as the Filter Freq Time parameter. Note that this Timer
instruction is embedded in the IBox and must NOT be used any other place in your
program. Power flow controls whether the calculation is enabled. If it is disabled, the
Filter Value is not updated. On the first scan from Program to Run mode, the Filter
Value is initialized to 0 to give the calculation a consistent starting point.
Since the following binary filter example does not write directly to the PID PV
location, the BCD filter could be used with BCD values and then converted to BIN.
Following is an example of how the FilterB IBox is used in a ladder program. The
instruction is used to filter a binary value that is in V2000. Timer (T1) is set to 0.5
seconds, the rate at which the filter calculation will be performed. The filter constant
is set to 3.0. A larger value will increase the smoothing effect of the filter. A value of 1
results with no filtering. The filtered value will be placed in V2100.
See DL350 IBox Instructions PLC User Manual Supplement for more detailed
information.
Use the
DirectSOFT5Filter
Intelligent Box
Instruction
FilterB Example
PID Loop Operation Maintenance
8--55
PID Loop Operation
DL350 User Manual, 2nd Edition
Ramp/Soak Generator
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.
If the SP for your process rarely changes or can tolerate step changes, you probably
will not need to use the ramp/soak generator. However, some processes require
precisely--controlled SP value changes. The ramp/soak generator can greatly
reduce the amount of programming required for these applications.
The terms “ramp” and “soak” have special
meanings in the process control industry,
and refer to desired setpoint (SP) values in
temperature control applications. In the fig-
ure to the right, the setpoint increases during
the ramp segment. It remains steady at one
value during the soak segment.
Complex SP profiles can be generated by specifying a series of ramp/soak
segments. The ramp segments are specified in SP units per second. The soak time
is also programmable in minutes.
It is instructive to view the ramp/soak generator as a dedicated function to generate
SP values, as shown below. It has two categories of inputs which determine the SP
values generated. The ramp/soak table must be programmed in advance,
containing the values that will define the ramp/soak profile. The loop reads from the
table during each PID calculation as necessary. The ramp/soak controls are bits in a
special loop table word that control the real--time start/stop functionality of the
ramp/soak generator. The ladder program can monitor the status of the ramp soak
profile (current ramp/segment number).
Introduction
PID Loop OperationMaintenance
and Troubleshooting
8--56 PID Loop Operation
DL350 User Manual, 2nd Edition
Now that we have described the general ramp/soak generator operation, we list its
specific features:
SEach loop has its own ramp/soak generator (use is optional).
SYou may specify up to eight ramp/soak steps (16 segments).
SThe ramp soak generator can run anytime the PLC is in Run mode. Its
operation is independent of the loop mode (Manual or Auto).
SRamp/soak real--time controls include Start, Hold, Resume, and Jog.
SRamp/soak monitoring includes Profile Complete, Soak Deviation (SP
minus PV), and current ramp/soak step number.
The following figure shows a SP profile consisting of ramp/soak segment pairs. The
segments are individually numbered as steps from 1 to 16. The slope of each of the
ramp may be either increasing or decreasing. The ramp/soak generator
automatically knows whether to increase or decrease the SP based on the relative
values of a ramp’s end points. These values come from the ramp/soak table.
The parameters which define the ramp/soak
profile for a loop are in a ramp/soak table.
Each loop may have its own ramp/soak table,
but it is optional. Recall the Loop Parameter
table consists a 32--word block of memory for
each loop, and together they occupy one con-
tiguous memory area. However, the ramp/soak
table for a loop is individually located, because
it is optional for each loop. An address pointer
in location V+34 in loop table specifies the
starting location of the ramp/soak table.
In the example to the right, the loop parameter
tables for Loop #1 and #2 occupy contiguous
32--word blocks as shown. Each has a pointer
to its ramp/soak table, independently located
elsewhere in user V--memory. Of course, you
may locate all the tables in one group, as long
as they do not overlap.
Ramp/Soak Table
PID Loop Operation Maintenance
8--57
PID Loop Operation
DL350 User Manual, 2nd Edition
The parameters in the ramp/soak table must be user--defined. the most convenient
wayistouseDirectSOFT, which features a special editor for this table. Four
parameters are required to define a ramp and soak segment pair, as pictured below.
SRamp End Value yspecifies the destination SP value for the end of
the ramp. Use the same data format for this number as you use for the
SP. It may be above or below the beginning SP value, so the slope
could be up or down (we don’t have to know the starting SP value for
ramp #1).
SRamp Slope yspecifies the SP increase in counts (units) per second.
It is a BCD number from 00.00 to 99.99 (uses implied decimal point).
SSoak Duration yspecifies the time for the soak segment in minutes,
ranging from 000.1 to 999.9 minutes in BCD (implied decimal point).
SSoak PV Deviation y(optional) specifies an allowable PV deviation
above and below the SP value during the soak period. A PV deviation
alarm status bit is generated by the ramp/soak generator.
Ramp/Soak Table
V+00 Ramp End SP ValueXXXX
SP
Soak PV
deviation
V+01 Ramp SlopeXXXX
V+02 Soak DurationXXXX
V+03 Soak PV DeviationXXXX
Ramp End
SP Value
Soak
duration
segment becomes active
Slope
The ramp segment becomes active when the previous soak segment ends. If the
ramp is the first segment, it becomes active when the ramp/soak generator is
started, and automatically assumes the present SP as the starting SP.
Addr
Offset Step Description Addr
Offset Step Description
+00 1Ramp End SP Value +20 9Ramp End SP Value
+01 1Ramp Slope +21 9Ramp Slope
+02 2Soak Duration +22 10 Soak Duration
+03 2Soak PV Deviation +23 10 Soak PV Deviation
+04 3Ramp End SP Value +24 11 Ramp End SP Value
+05 3Ramp Slope +25 11 Ramp Slope
+06 4Soak Duration +26 12 Soak Duration
+07 4Soak PV Deviation +27 12 Soak PV Deviation
+10 5Ramp End SP Value +30 13 Ramp End SP Value
+11 5Ramp Slope +31 13 Ramp Slope
+12 6Soak Duration +32 14 Soak Duration
+13 6Soak PV Deviation +33 14 Soak PV Deviation
+14 7Ramp End SP Value +34 15 Ramp End SP Value
+15 7Ramp Slope +35 15 Ramp Slope
+16 8Soak Duration +36 16 Soak Duration
+17 8Soak PV Deviation +37 16 Soak PV Deviation
PID Loop OperationMaintenance
and Troubleshooting
8--58 PID Loop Operation
DL350 User Manual, 2nd Edition
Many applications do not require all 16 R/S steps. Use all zeros in the table for
unused steps. The R/S generator ends the profile when it finds ramp slope = 0.
The individual bit definitions of the Ramp/Soak Table Flag (Addr+33) word is listed in
the following table.
Bit Ramp/Soak Flag Bit Description Read/Write Bit=0 Bit=1
0Start Ramp/Soak Profile write -- 0¤1Start
1Hold Ramp/Soak Profile write -- 0¤1Hold
2Resume Ramp/soak Profile write -- 0¤1
Resume
3Jog Ramp/Soak Profile write -- 0¤1Jog
4Ramp/Soak Profile Complete read -- Complete
5PV Input Ramp/Soak Deviation read Off On
6Ramp/Soak Profile in Hold read Off On
7Reserved read Off On
8--15 Current Step in R/S Profile read decode as byte (hex)
The main enable control to permit ramp/soak
generation of the SP value is accomplished with
bits 11 in the PID Mode 1 Setting V+00 word, as
shown to the right. The other ramp/soak controls
in V+33 shown in the table above will not oper-
ate unless this bit=1 during the entire ramp/soak
process.
The four main controls for the ramp/soak generator
are in bits 0 to 3 of the ramp/soak settings word in
the loop parameter table. DirectSOFT controls
these bits directly from the ramp/soak settings dia-
log. However, you must use ladder logic to control
these bits during program execution. We recom-
mend using the bit--of--word instructions.
Ladder logic must set a control bit to a “1“ to command the corresponding function.
When the loop controller reads the ramp/soak value, it automatically turns off the bit
for you. Therefore, a reset of the bit is not required when the CPU is in Run Mode.
The example program rung to the right shows
how an external switch X0 can turn on and the
PD contact uses the leading edge to set the
proper control bit to start the ramp soak profile.
This uses the Set Bit--of--Word instruction.
Ramp/Soak Table
Flags
Ramp/Soak
Generator Enable
Ramp/Soak
Controls
PID Loop Operation Maintenance
8--59
PID Loop Operation
DL350 User Manual, 2nd Edition
The normal state for the ramp/soak control bits is all zeros. Ladder logic must set
only one control bit at a time.
SStart ya 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. If
the profile is not interrupted by a Hold or Jog command, it finishes
normally.
SHold ya 0 to 1 transition will stop the ramp/soak profile in its current
state, and the SP value will be frozen.
SResume ya 0 to 1 transition cause the ramp/soak generator to resume
operation if it is in the hold state. The SP values will resume from their
previous value.
SJog ya 0 to 1 transition will cause the ramp/soak generator to truncate
the current segment (step), and go to the next segment.
You can monitor the Ramp/Soak profile status
using other bits in the Ramp/Soak Settings
V+33 word, shown to the right.
SR/S Profile Complete y=1 when the
last programmed step is done.
SSoak PV Deviation y=1 when the error
(SP--PV) exceeds the specified deviation
in the R/S table.
SR/S Profile in Hold y=1 when the pro
file was active but is now in hold. Ramp/
Soak Settings V+33.
The number of the current step is available in
the upper 8 bits of the Ramp/Soak Settings
V+33 word. The bits represent a 2--digit hex
number, ranging from 1 to 10. Ladder logic
can monitor these to synchronize other parts
of the program with the ramp/soak profile.
Load this word to the accumulator and shift
right 8 bits, and you have the step number.
The starting address for the ramp/soak table
must be a valid location. If the address points
outside the range of user V--memory, one of
the bits to the right will turn on when the
ramp/soak generator is started. We recom-
mend using DirectSOFT to configure the
ramp/soak table. It automatically range
checks the addresses for you.
It’s a good idea to test your ramp/soak profile before using it to control the process.
This is easy to do, because the ramp/soak generator will run even when the loop is in
Manual Mode. Using DirectSOFT’s PID View will be a real time--saver, because it
will draw the profile on--screen for you. Be sure to set the trending timebase slow
enough to display completed ramp--soak segment pairs in the waveform window.
Ramp/Soak Profile
Monitoring
Ramp/Soak
Programming
Errors
Testing Your
Ramp/Soak Profile
PID Loop OperationMaintenance
and Troubleshooting
8--60 PID Loop Operation
DL350 User Manual, 2nd Edition
DirectSOFT Ramp/Soak Example
The following following example will step you through the Ramp/Soak setup.
The first step is to use Setup in DirectSOFT PID to set the profile of your process.
Open the Setup PID window and select the R/S tab, and then enter the Ramp/Soak
data. Note the V--memory location for the beginning of this profile is V5000, and
V5037 is the end of the range of the profile.
Setup the Profile in
PID Setup
PID Loop Operation Maintenance
8--61
PID Loop Operation
DL350 User Manual, 2nd Edition
Refer to the Ramp/Soak Flag Bit Description table on page 8--58 when adding the
control rungs to your program similar to the ladder rungs below. For the example
below, the PID parameters begin at V7000. The Ramp/Soak bit flags are located at
V7033.
Program the
Ramp/Soak Control
in Relay Ladder
PID Loop OperationMaintenance
and Troubleshooting
8--62 PID Loop Operation
DL350 User Manual, 2nd Edition
Refer to the Ramp/Soak Flag Bit Description table on page 8--58 when adding the
control rungs to your program similar to the ladder rungs below. For the example
below, the PID parameters begin at V7000. The Ramp/Soak bit flags are located at
V7033.
Program the
Ramp/Soak Control
in Relay Ladder
PID Loop Operation Maintenance
8--63
PID Loop Operation
DL350 User Manual, 2nd Edition
Cascade Control
Cascaded loops are an advanced control technique that is superiorto 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 DL350 also provides a Cascade Mode.
NOTE: Cascaded loops are an advanced process control technique. Therefore we
recommend their use only for experienced process control engineers.
When a manufacturing process is complex and contains a lag time from control input
to process variable output, even the most perfectly tuned single loop around the
process may yield slow and inaccurate control. It may be that the actuator operates
on one physical property, which eventually affects the process variable, measured
by a different physical property. Identifying the intermediate variable allows us to
divide the process into two parts as shown in the following figure.
Intermediate
Variable
Process A Process B
Control input Process
Variable (PV)
PROCESS
The principle of cascaded loops is simply that we add another process loop to more
precisely control the intermediate variable! This separates the source of the control
lag into two parts, as well.
The diagram below shows a cascade control system, showing that it is simply one
loop nested inside another. The inside loop is called the minor loop, and the outside
loop is called the major loop. For overall stability, the minor loop must be the fastest
responding loop of the two. We do have to add the additional sensor to measure the
intermediate variable (PV for process A). Notice that the setpoint for the minor loop is
automatically generated for us, by using the output of the major loop. Once the
cascaded control is programmed and debugged, we only need to deal with the
original setpoint and process variable at the system level. The cascaded loops
behave as one loop, but with improved performance over the previous single-loop
solution.
Σ
+--
Setpoint Loop B
Calculation Σ
+--
Loop A
Calculation
Process A
(secondary)
Process B
(primary)
PV, Process A
PV, Process B
Output B/
Setpoint A
Major
Loop
Minor
Loop
External
Disturbances External
Disturbances
Output A
One of the benefits to cascade control can be seen by examining its response to
external disturbances. Remember that the minor loop is faster acting than the major
loop. Therefore, if a disturbance affects process A in the minor loop, the Loop A PID
calculation can correct the resulting error before the major loop sees the effect.
Introduction
PID Loop OperationMaintenance
and Troubleshooting
8--64 PID Loop Operation
DL350 User Manual, 2nd Edition
In the use 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. If you have more than two loops cascaded together, the
outer-most (major) loop must be in Auto Mode during normal operation, and all inner
loops in Cascade Mode.
NOTE: Technically, both major and minor loops are “cascaded” in strict process
control terminology. Unfortunately, we are unable to retain this convention when
controlling loop modes. Just remember that all minor loops will be in Cascade Mode,
and only the outer-most (major) loop will be in Auto Mode.
You can cascade together as many loops as necessary on the DL350, and you may
have multiple groups of cascaded loops. For proper operation on cascaded loops
you must use the same data range (12/15 bit) and polar/bipolar settings on the major
and minor loop.
To prepare a loop for Cascade Mode operation as a minor loop, you must program its
remote Setpoint Pointer in its loop parameter table location V+32, as shown below.
The pointer must be the address of the V+05 location (control output) of the major
loop. In Cascade Mode, the minor loop will ignore the its local SP register (V+02),
and read the major loop’s control output as its SP instead.
Loop Table
V+02 SPXXXX
V+03 PVXXXX
V+32 Remote SP PointerXXXX
V+02 SPXXXX
V+03 PVXXXX
V+05 Control OutputXXXXV+05 Control OutputXXXX
Loop Table
Major Loop
(
A
uto mode
)
Minor Loop
(
Cascade Mode
)
When using DirectSOFT’s PID View to watch the SP value of the minor loop,
DirectSOFT automatically reads the major loop’s control output and displays it for
the minor loop’s SP. The minor loop’s normal SP location, V+02, remains
unchanged.
Now, we use the loop parameter arrangement above and draw its equivalent loop
schematic, shown below.
Process Variable
Σ
+
--
Setpoint
Cascade
Auto/Manual
Control Output V+05
Local SP
Loop
Calculation
Control
Output
Loop
Calculation
Minor Cascaded loopMajor loop
Remote SP
V+02
Remember that a major loop goes to Manual Mode automatically if its minor loop is
taken out of Cascade Mode.
Cascaded Loops in
the DL350 CPU
PID Loop Operation Maintenance
8--65
PID Loop Operation
DL350 User Manual, 2nd Edition
When tuning cascaded loops, you will need to de--couple the cascade relationship
and tune the minor loop, using one of the loop tuning procedures previously covered.
Once this has been done, have the minor loop in cascade mode and auto tune the
major loop (see Step 4).
1. 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. Then set the sample
rate of the major loop slower than the minor loop by a factor of 10. Use this as a
starting point.
2. Tune the minor loop first. Leave the major loop in Manual Mode, and you will
need to generate SP changes for the minor loop manually as described in the
loop tuning procedure.
3. Verify the minor loop gives a critically--damped response to a 10% SP change
while in Auto Mode. Then we are finished tuning the minor loop.
4. In this step, you will need to get the minor loop in Cascade Mode, and then the
Major loop in Auto Mode. We will be tuning the major loop with the minor loop
treated as a series component its overall process. Therefore, do not go back and
tune the minor loop again while tuning the major loop.
5. Tune the major loop, following the standard loop tuning procedure in this
section. The response of the major loop PV is actually the overall response of the
cascaded loops together.
Tuning Cascaded
Loops
PID Loop OperationMaintenance
and Troubleshooting
8--66 PID Loop Operation
DL350 User Manual, 2nd Edition
Time-Proportioning Control
The PID loop controller in the DL350 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.
While continuous control can be smooth and robust, the cost of the loop components
(such as actuators, heater amplifiers) can be expensive. A simpler form of control is
called time-proportioning control. This method uses actuators which are either on or
off (no in-between). Loop components for on/off-based control systems are lower
cost than their continuous control counterparts.
In this section, we will show you how to convert the control output of a loop to
time-proportioning control for the applications that need it. Let’s take a moment to
review how alternately turning a load on and off can control a process. The diagram
below shows a hot-air balloon following a path across some mountains. The desired
path is the setpoint. The balloon pilot turns the burner on and off alternately, which is
his control output. The large mass of air in the balloon effectively averages the effect
of the burner, converting the bursts of heat into a continuous effect: slowly changing
balloon temperature and ultimately the altitude, which is the process variable.
Time-proportioning control approximates continuous control by virtue of its
duty-cycle -- the ratio of ON time to OFF time. The following figure shows an example
of how duty cycle approximates a continuous level when it is averaged by a large
process mass.
Desired
Effect
On/Off
Control Off
On
period
If we were to plot the on/off times of the burner in the hot-air balloon, we would
probably see a very similar relationship to its effect on balloon temperature and
altitude.
PID Loop Operation Maintenance
8--67
PID Loop Operation
DL350 User Manual, 2nd Edition
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 ouptut coil, Y0.
PV
Loop
Calculation
Σ
+--
V2005SP Time
Proportioning Process
Y0 P
V
continuous on/off
The example program uses two timers to generate on/off control. It makes the
following assumptions, which you can alter to fit your application:
SThe loop table starts at V2000, so the control output is at V2005.
SThe data format of the control output is 12-bit, unipolar (0 -- FFF or
0 -- 4095).
SThe on/off control output is Y0.
The control program must “match” the resolution of the PID output to the resolution
of the time interval. The time interval for one full cycle of the on/off waveform is 10
seconds.
NOTE: Some processes change too fast for time proportioning control. Consider the
speed of your process when you choose this control method. Use continuous control
for processes that change too fast for time proportioning control.
T0 LD
V2005
At the end of the 10 second period, T0 turns on, and
loads the control output value (binary) from the loop table
V+05 location (V2005).
BTOR The BTOR instruction changes the number in the
accumulator to a real number.
BCD Convert the number in the accumulator to BCD format.
This satisfies the timer preset format requirement.
OUT
V1400
Output the result to V1400. In our example, this is the
location of the timer preset for the second timer, T1.
END END coil marks the end of the main program.
T1
OUT
Y0 The N.C. T1 contact, inverts the T1 timer output. The
control output is on at the beginning of the 10-second time
interval. Y0 turns off when T1 times out. The STRNE
contact prevents Y0 from energizing during the one scan
when T0 resets T1. Y0 is the actual control output.
DIVR
R4.095
Dividing the control output by 4.095, converts the
0 -- 4095 range to 0 -- 1000, which “matchs” the preset
time for TMRF T0.
RTOB This instruction converts the real number back to
binary. This step prepares the number for conversion
to BCD. There is no real-to-BCD instruction.
T0 TMRF
V1400
The second fast timer also counts in increments of .01
seconds, so its range is variable from 0 to a maximum
of 1000 ticks, or 10 seconds. This timer’s output, T1,
turns off the output coil, Y0, when the preset is reached.
T1
T0 TMRF
K1000
A fast timer (0.01 sec. timebase) establishes the primary
time interval. The constant, K1000, sets the preset at 10
seconds (1,000 ticks). The N.C. enabling contact, T0,
makes the timer self-resetting. T0 is on for one scan
each 10 seconds, when it resets itself and T1.
T0
K0TA1
On/Off Control
Program Example
PID Loop OperationMaintenance
and Troubleshooting
8--68 PID Loop Operation
DL350 User Manual, 2nd Edition
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
DL350. However, it’s best to implement and tune a loop without feedforward, and
adding it only if better loop performance is still needed. The term “feed-forward”
refers to the control technique involved, shown in the diagram below. The incoming
setpoint value is fed forward around the PID equation, and summed with the output.
Process Variable
Loop
Calculation
Σ
+
--
Control OutputSetpoint Σ
+
kf
Feedforward path
+
In the previous section on the bias term, we said that “the bias term value establishes
a “working region” or operating point for the control output. When the error fluctuates
around its zero point, the output fluctuates around the bias value.” Now, when there
is a change in setpoint, an error is generated and the output must change to a new
operating point. This also happens if a disturbance introduces a new offset in the
loop. The loop does not really “know its way” to the new operating point... the
integrator (bias) must increment/decrement until the error disappears, and then the
bias has found the new operating point.
Suppose that we are able to know a sudden setpoint change is about to occur
(common in some applications). We can avoid much of the resulting error in the first
place, if we can quickly change the output to the new operating point. If we know
(from previous testing) what the operating point (bias value) will be after the setpoint
change, we can artificially change the output directly (which is feedforward). The
benefits from using feedforward are:
SThe SP--PV error is reduced during predictable setpoint changes or loop
offset disturbances.
SProper use of feedforward will allow us to reduce the integrator gain.
Reducing integrator gain gives us an even more stable control system.
Feedforward is very easy to use in the DL350 loop controller, as shown below. The
bias term has been made available to the user in a special read/write location, at PID
Parameter Table location V+04.
Process Variable
ΣError Term
+
--
Control OutputSetpoint Σ
+
P
I
D
Loop Calculation
+
+
kp
ki
kd
V+04
Bias TermXXXX
PID Loop Operation Maintenance
8--69
PID Loop Operation
DL350 User Manual, 2nd Edition
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. All you
have to do to implement feed forward control is write the correct value to the bias
term at the right time (the example below shows you how).
NOTE: When writing the bias term, one must be careful to design ladder logic to
write the value just once, at the moment when the new bias operating point is to
occur. If ladder logic writes the bias value on every scan, the loop’s integrator is
effectively disabled.
How do we know when to write to the bias term, and what value to write? Suppose we
have an oven temperature control loop, and we have already tuned the loop for
optimal performance. Refer to the figure below. We notice that when the operator
opens the oven door, the temperature sags a bit while the loop bias adjusts to the
heat loss. Then when the door closes, the temperature rises above the SP until the
loop adjusts again. Feedforward control can help diminish this effect.
PV
Bias
Oven
door
PV sags PV excess
Closed Open Closed
First, we record the amount of bias change the loop controller generates when the
door opens or closes. Then, we write a ladder program to monitor the position of an
oven door limit switch. When the door opens, our ladder program reads the current
bias value from V+04, adds the desired change amount, and writes it back to V+04.
When the door closes, we duplicate the procedure, but subtracting desired change
amount instead. The following figure shows the results.
PV
Bias
Oven
door Closed Open Closed
Feed-forward Feed-forward
The step changes in the bias are the result of our two feed-forward writes to the bias
term. We can see that the PV variations are greatly reduced. The same technique
may be applied for changes in setpoint.
Feedforward
Example
PID Loop OperationMaintenance
and Troubleshooting
8--70 PID Loop Operation
DL350 User Manual, 2nd Edition
PID Example Program
After the PID loop(s) has been setup with DirectSOFT, you will need to edit your RLL
program to include the rungs needed to setup the analog I/O module to be used by
the PID loop(s).
Program Setup for
the PID Loop
PID Loop Operation Maintenance
8--71
PID Loop Operation
DL350 User Manual, 2nd Edition
The example program shows how an analog input module, F3--08AD is used to
setup a PID loop. This example assumes that the PID table for loop 1 has a
beginning address of V3000.
All of the analog I/O modules used with the DL350 is setup in a similar manner. Refer
to the DL305 Analog I/O Manual for the setup information for the particular module
that you will be using.
Note that the modules used in the PID loop example program were set up for binary
format. They could have been set up for BCD format. In the later case, the BCD data
would have to be converted to binary format before being stored to the setpoint and
process variable, and the control output would have to be converted from binary to
BCD before being stored to the analog output.
By following the steps outlined in this chapter, you should be able to setup workable
PID control loops. The DirectSOFT Programming Software Manual provides more
information for the use of PID View.
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. An Animated Tutorial page will
open. Under Available Tutorials,findPID Trainer and select View the
Powerpoint slide show and begin viewing the tutorial. The Powerpoint Viewer can
be downloaded if your computer does not have Powerpoint installed.
PID Loop OperationMaintenance
and Troubleshooting
8--72 PID Loop Operation
DL350 User Manual, 2nd Edition
Troubleshooting Tips
Q. The loop will not go into Automatic Mode.
A. Check the following for possible causes:
SThe PLC is in Program Mode. It must be in Run Mode for loops to run.
SA PV alarm exists, or a PV alarm programming error exists.
SThe loop is the major loop of a cascaded pair, and the minor loop is not
in Cascade Mode.
Q. The Control Output just stays at zero constantly when the loop is in Automatic Mode.
A. Check the following for possible causes:
SThe Control Output upper limit in loop table location V+31 is zero.
SThe loop is driven into saturation, because the error never goes to zero
value and changes (algebraic) sign.
Q. The Control Output value is not zero, but it is incorrect.
A. Check the following for possible cause:
SThe gain values are entered improperly. Remember, gains are entered
in the loop table in BCD, while the SP and PV are in binary. If you are
using DirectSOFT 5, it displays the SP, PV, Bias and Control output in
decimal, converting it to binary before updating the loop table.
Q. The Ramp/Soak Generator does not operate when I activate the Start bit.
A. Check the following for possible causes:
SThe Ramp/Soak enable bit is off. Check the status of bit 11 of loop
parameter table location V+00. It must be set =1.
SThe hold bit or other bits in the Ramp/Soak control are on.
SThe beginning SP value and the first ramp ending SP value are the
same, so first ramp segment has no slope and consequently has no
duration. The ramp/soak generator moves quickly to the soak segment,
giving the illusion that the first ramp is not working.
SThe loop is in Cascade Mode, and is trying to get the SP remotely.
SThe SP upper limit value in the loop table location V+27 is too low.
SCheck your ladder program to verify it is not writing to the SP location
(V+02 in the loop table). A quick way to do this is to temporarily place an
end coil at the beginning of your program, then go to PLC Run Mode,
and manually start the ramp/soak generator.
Q. The PV value in the table is constant, even though the analog module receives the PV signal.
A. Your ladder program must read the analog value from the module successfully
and write it into the loop table V+03 location. Verify that the analog module is
generating the value, and that the ladder is working.
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).
PID Loop Operation Maintenance
8--73
PID Loop Operation
DL350 User Manual, 2nd Edition
Q. The loop Setpoint appears to be changing by itself.
A. Check the following for possible causes:
SThe Ramp/Soak generator is enabled, and is generating setpoints.
SIf this symptom occurs on loop Manual-to-Auto Mode changes, the loop
automatically sets the SP=PV if set to Bumpless Transfer Mode 1.
SCheck your ladder program to verify it is not writing to the SP location
(V+02 in the loop table). A quick way to do this is to temporarily place an
end coil at the beginning of your program, then go to PLC Run Mode.
Q. The SP and PV values I enter with DirectSOFT work okay, but these values do not work
properly when the ladder program writes the data.
A. The PID View in DirectSOFT lets you enter SP, PV, and Bias values in decimal,
and displays them in decimal for your convenience. For example, when the data
format is 12 bit unipolar, the values range from 0 to 4095. However, the loop table
actually requires these in hex, so DirectSOFT converts them for you. The values in
the table range from 0 to FFF, for 12-bit unipolar format. Your ladder program must
convert constant values from the BCD format (when entered as Kxxxx) to binary with
the BIN instruction or you must enter them in the constant field (Kxxxx) as the hex
equivalent of the decimal value.
Q. The loop seems unstable and impossible to tune, no matter what gains I use.
A. Check the following for possible causes:
SThe loop sample time is set too long. Refer to the section near the front
of this chapter on selecting the loop update time.
SThe gains are too high. Start out by reducing the derivative gain to zero.
Then reduce the integral gain by increasing the integral time value, and
the proportional gain if necessary.
SThere is too much transfer lag in your process. This means the PV
reacts sluggishly to control output changes. There may be too much
“distance” between actuator and PV sensor, or the actuator may be
weak in its ability to transfer energy into the process.
SThere may be a process disturbance that is over-powering the loop.
Make sure the PV is relatively steady when the SP is not changing.
PID Loop OperationMaintenance
and Troubleshooting
8--74 PID Loop Operation
DL350 User Manual, 2nd Edition
Glossary of PID Loop Terminology
Automatic Mode An operational mode of a loop, in which it makes PID calculations and update 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. The benefit is a faster loop recovery.
Bias Term In the position form of the PID equation, it is the sum of the integrator and the initial
control output value.
Bumpless Transfer A method of changing the operation mode of a loop while avoiding the usual sudden
change in control output level. This consequence is avoided by artificially making the SP
and PV equal, or the bias term and control output equal at the moment of mode change.
Cascaded Loops A cascaded loop receives its setpoint from the output of another loop. Cascaded loops
have a major/minor relationship, and work together to ultimately control one PV.
Cascade Mode An operational mode of a loop, in which it receives its SP from another loop’s output.
Continuous Control Control of a process done by delivering a smooth (analog) signal as the control output.
Direct-Acting Loop A loop in which the PV increases in response to a control output increase. In other
words, the process has a positive gain.
Error The difference in value between the SP and PV, Error=SP -- PV
Error Deadband An optional feature which makes the loop insensitive to errors when they are small. You
can specify the size of the deadband.
Error Squared An optional feature which multiplies the error by itself, but retains the original algebraic
sign. It reduces the effect of small errors, while magnifying the effect of large errors.
Feedforward A method of optimizing the control response of a loop when a change in setpoint or
disturbance offset is known and has a quantifiable effect on the bias term.
Control Output The numerical result of a PID equation which is sent by the loop with the intention of
nulling out the current error.
Derivative Gain A constant that determines the magnitude of the PID derivative term in response to the
current error.
Integral Gain A constant that determines the magnitude of the PID integral term in response to the
current error.
Major Loop In cascade control, it is the loop that generates a setpoint for the cascaded loop.
Manual Mode An operational mode of a loop, in which the PID calculations are stopped. The operator
must manually control the loop by writing to the control output value directly.
Minor Loop In cascade control, the minor loop is the subordinate loop that receives its SP from the
major loop.
On / Off Control A simple method of controlling a process, through on/off application of energy into the
system. The mass of the process averages the on/off effect for a relatively smooth PV. A
simple ladder program can convert the DL350’s continuous loop output to on/off control.
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. Process control
particularly refers to inducing chemical changes to the material in process.
Process Variable (PV) A quantitative measurement of a physical property of the material in process, which
affects final product quality and is important to monitor and control.
PID Loop Operation Maintenance
8--75
PID Loop Operation
DL350 User Manual, 2nd Edition
Proportional Gain A constant that determines the magnitude of the PID proportional term in response to
the current error.
PV Absolute Alarm A programmable alarm that compares the PV value to alarm threshold values.
PV Deviation Alarm A programmable alarm that compares the difference between the SP and PV values to
a deviation threshold value.
Ramp / Soak Profile A set of SP values called a profile, which is generated in real time upon each loop
calculation. The profile consists of a series of ramp and soak segment pairs, greatly
simplifying the task of programming the PLC to generate such SP sequences.
Rate Also called differentiator, the rate term responds to the changes in the error term.
Remote Setpoint The location where a loop reads its setpoint when it is configured as the minor loop in a
cascaded loop topology.
Reset Also called integrator, the reset term adds each sampled error to the previous,
maintaining a running total called the bias.
Reset Windup A condition created when the loop is unable to find equilibrium, and the persistent error
causes the integrator (reset) sum to grow excessively (windup). Reset windup causes
an extra recovery delay when the original loop fault is remedied.
Reverse-Acting Loop A loop in which the PV increases in response to a control output decrease. In other
words, the process has a negative gain.
Sampling time The time between PID calculations. The CPU method of process control is called a
sampling controller, because it samples the SP and PV only periodically.
Setpoint (SP) The desired value for the process variable. The setpoint (SP) is the input command to
the loop controller during closed loop operation.
Soak Deviation The soak deviation is a measure of the difference between the SP and PV during a soak
segment of the Ramp/Soak profile, when the Ramp / Soak generator is active.
Step Response The behavior of the process variable in response to a step change in the SP (in closed
loop operation), or a step change in the control output (in open loop operation)
Transfer To change from one loop operational mode to another ( between Manual, Auto, or
Cascade). The word “transfer” probably refers to the transfer of control of the control
output or the SP, depending on the particular mode change.
Velocity Algorithm The control output is calculated to represent the rate of change (velocity) for the PV to
become equal to the SP.
PID Loop OperationMaintenance
and Troubleshooting
8--76 PID Loop Operation
DL350 User Manual, 2nd Edition
Bibliography
Fundamentals of Process Control Theory, Second Edition
Author: Paul W. Murrill
Publisher: Instrument Society of America
ISBN 1--55617--297--4
Application Concepts of Process Control
Author: Paul W. Murrill
Publisher: Instrument Society of America
ISBN 1--55617--080--7
PID Controllers: Theory, Design, and Tuning, 2nd Edition
Author: K. Astrom and T Hagglund
Publisher: Instrument Society of America
ISBN 1--55617--516--7
Fundamentals of Temperature, Pressure, and Flow
Measurements, Third edition
Author: Robert P. Benedict
Publisher: John Wiley and Sons
ISBN 0--471--89383--8
Process / Industrial Instruments & Controls Handbook,
Fourth Edition
Author (Editor-in-Chief): Douglas M. Considine
Publisher: McGraw-Hill, Inc.
ISBN 0--07--012445--0
pH Measurement and Control, Second Edition
Author: Gregory K. McMillan
Publisher: Instrument Society of America
ISBN 1--55617--483--7
Programmable Controllers Concepts and Applications,
First Edition,
Authors: C.T. Jones and L.A. Bryant
Publisher: International Programmable Controls
ISBN 0--915425--00--9
Fundamentals of Programmable Logic Controllers, Sen-
sors, and Communications
Author: Jon Stenerson
Publisher: Prentice Hall
ISBN 0--13--726860--2
Process Control, Third Edition
Instrument Engineer’s Handbook
Author (Editor-in-Chief): Bela G. Liptak
Publisher: Chilton
ISBN 0--8019--8242--1
Process Measurement and Analysis, Third Edition
Instrument Engineer’s Handbook
Author (Editor-in-Chief): Bela G. Liptak
Publisher: Chilton
ISBN 0--8019--8197--2
19
Maintenance and
Troubleshooting
In This Chapter....
— Hardware Maintenance
— Diagnostics
— CPU Indicators
— PWR Indicator
— RUN Indicator
— CPU Indicator
— BATT Indicator
— Communications Problems
— I/O Module Troubleshooting
— Noise Troubleshooting
— Machine Startup and Program Troubleshooting
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
9--2 Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
Hardware Maintenance
The DL305 is a low maintenance system requiring only a few periodic checks to help
reduce the risks of problems. Routine maintenance checks should be made
regarding two key items.
SAir quality (cabinet temperature, airflow, etc.)
SCPU battery
The quality of the air your system is exposed to can affect system performance. If
you have placed your system in an enclosure, check to see the ambient temperature
is not exceeding the operating specifications. If there are filters in the enclosure,
clean or replace them as necessary to ensure adequate airflow. A good rule of thumb
is to check your system environment every one to two months. Make sure the DL305
is operating within the system operating specifications.
The CPU has a battery LED that indicates the battery voltage is low. You should
check this indicator periodically to determine if the battery needs replacing. You can
also detect low battery voltage from within the CPU program. SP43 is a special relay
that comes on when the battery needs to be replaced.
The CPU battery is used to retain program V--memory and the system parameters.
The life expectancy of this battery is five years.
NOTE: Before installing or replacing your CPU battery, back-up your V-memory and
system parameters. You can do this by using DirectSOFT to save the program,
V-memory, and system parameters to hard/floppy disk on a personal computer.
To install the D3--BAT--1 CPU battery in the
DL350 CPU:
1. Press the retaining clip on the battery door
down and swing the battery door open.
2. Place the battery into the coin--type slot.
3. Close the battery door making sure that it
locks securely in place.
4. Make a note of the date the battery was
installed.
WARNING: Do not attempt to recharge the battery or dispose of an old battery
by fire. The battery may explode or release hazardous materials.
Standard
Maintenance
Air Quality
Maintenance
Low Battery
Indicator
CPU Battery
Replacement
Maintenance
and Troubleshooting Maintenance
and Troubleshooting Maintenance
and Troubleshooting
9--3
Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
Diagnostics
Your DL305 system performs many pre-defined diagnostic routines with every CPU
scan. The diagnostics have been designed to detect various types of failures for the
CPU and I/O modules. There are two primary error classes, fatal and non-fatal.
Fatal errors are errors the CPU has detected that offer a risk of the system not
functioning safely or properly. If the CPU is in Run Mode when the fatal error occurs,
the CPU will switch to Program Mode. (Remember, in Program Mode all outputs are
turned off.) If the fatal error is detected while the CPU is in Program Mode, the CPU
will not enter Run Mode until the error has been corrected.
Here are some examples of fatal errors.
SBase power supply failure
SParity error or CPU malfunction
SI/O configuration errors
SCertain programming errors
Non-fatal errors are errors that are flagged by the CPU as requiring attention. They
can neither cause the CPU to change from Run Mode to Program Mode, nor do they
prevent the CPU from entering Run Mode. There are special relays the application
program can use to detect if a non-fatal error has occurred. The application program
can then be used to take the system to an orderly shutdown or to switch the CPU to
Program Mode if necessary.
Some examples of non-fatal errors are:
SBackup battery voltage low
SAll I/O module errors
SCertain programming errors
Diagnostic information can be found in several places with varying levels of
message detail.
SThe CPU automatically logs error codes and any FAULT messages into
two separate tables which can be viewed with the Handheld or
DirectSOFT.
SThe handheld programmer displays error numbers and short
descriptions of the error.
SDirectSOFT provides the error number and an error message.
SAppendix B in this manual has a complete list of error messages sorted
by error number.
Many of these messages point to supplemental memory locations which can be
referenced for additional related information. These memory references are in the
form of V-memory and SPs (special relays).
The following two tables name the specific memory locations that correspond to
certain types of error messages. The special relay table also includes status
indicators which can be used in programming. For a more detailed description of
each of these special relays refer to Appendix D.
Diagnostics
Fatal Errors
Non-fatal Errors
Finding Diagnostic
Information
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
9--4 Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
Error Class Error Category Diagnostic Vmemory
User-Defined Error code used with FAULT instruction V7751
System Error Fatal Error code V7755
MajorErrorcode V7756
Minor Error code V7757
Grammatical Address where syntax error occurs V7763
Error Code found during syntax check V7764
CPU Scan Number of scans since last Program to Run
Mode transition V7765
Currentscantime(ms) V7775
Minimum scan time (ms) V7776
Maximum scan time (ms) V7777
V-memory
Locations
Corresponding to
Error Codes
Maintenance
and Troubleshooting Maintenance
and Troubleshooting Maintenance
and Troubleshooting
9--5
Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
Startup and Real-time Relays
SP0 On first scan only
SP1 Always ON
SP3 1minuteclock
SP4 1 second clock
SP5 100 millisecond clock
SP6 50 millisecond clock
SP7 On alternate scans
CPU Status Relays
SP11 Forced run mode
SP12 Terminal run mode
SP13 Test run mode
SP14 Test hold mode
SP15 Test program mode
SP16 Terminal program mode
SP20 STOP instruction was executed
SP21 BREAK instruction was executed
SP22 Interrupt enabled
System Monitoring Relays
SP40 Critical error
SP41 Non-critical error
SP43 Battery low
SP46 Communications error
SP47 I/O configuration error
SP50 Fault instruction was executed
SP51 Watchdog timeout
SP52 Syntax error
SP53 Cannot solve the logic
SP54 Intelligent module communication error
Accumulator Status Relays
SP60 Acc. is less than value
SP61 Acc. is equal to value
SP62 Acc. is greater than value
SP63 Acc. result is zero
SP64 Half borrow occurred
SP65 Borrow occurred
SP66 Half carry occurred
SP67 Carry occurred
SP70 Result is negative (sign)
SP71 Pointer reference error
SP73 Overflow
SP75 Data is not in BCD
SP76 Load zero
Communication Monitoring Relays
SP116 Port 2 is communicating with another
device
SP117 Communication error on Port 2
SP120 Module busy, Slot 0
SP121 Communication error Slot 0
SP122 Module busy, Slot 1
SP123 Communication error Slot 1
SP124 Module busy, Slot 2
SP125 Communication error Slot 2
SP126 Module busy, Slot 3
SP127 Communication error Slot 3
SP130 Module busy, Slot 4
SP131 Communication error Slot 4
SP132 Module busy, Slot 5
SP133 Communication error Slot 5
SP134 Module busy, Slot 6
SP135 Communication error Slot 6
SP136 Module busy, Slot 7
SP137 Communication error Slot 7
Special Relays (SP)
Corresponding to
Error Codes
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
9--6 Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
The DL350 CPU 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.
There are two separate tables that store this information.
SError Code Table -- the system logs up to 32 errors in the table. When
an error occurs, the errors already on the table are pushed down and
the most recent error is loaded into the top slot. If the table is full when
an error occurs, the oldest error is pushed (erased) from the table.
SMessage Table -- the system logs up to 16 messages in this table. When
a message is triggered, the messages already stored in the table are
pushed down and the most recent message is loaded into the top slot. If
the table is full when an error occurs, the oldest message is pushed
(erased) from the table.
The following diagram shows an example of an error table for messages.
Date Time Message
1993--05--26 08:41:51:11 *Conveyor--2 stopped
1993--04--30 17:01:11:56 * Conveyor--1 stopped
1993--04--30 17:01:11:12 * Limit SW1 failed
1993--04--28 03:25:14:31 * Saw Jam Detect
You can access the error code table and the message table through DirectSOFT’s
PLC Diagnostic sub-menus or from the Handheld Programmer. Details on how to
access these logs are provided in the DirectSOFT and D2--HPP manual.
The following examples show you how to use the Handheld and AUX Function 5C to
show the error codes. The most recent error or message is always displayed. You
can use the PREV and NXT keys to scroll through the messages.
ERROR/MESAGE
AUX 5C HISTORY D
ERROR/MESAGE
AUX 5C HISTORY D
Use
A
U
X
5C to view the tables
Example of an error display
93/09/21 10:11:15
E252NEW I/O CFG
Use the arrow key to select Errors or Messages
CLR SHFT ENT
5
F2
C
ENT
Year Month Day Time
AUX
Error Message
Tables
Maintenance
and Troubleshooting Maintenance
and Troubleshooting Maintenance
and Troubleshooting
9--7
Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
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 DL305 systems generate. These errors can be generated by the CPU or
by the Handheld Programmer, depending on the actual error. Appendix B provides a
more complete description of the error codes.
The errors can be detected at various times. However, most of them are detected at
power-up, on entry to Run Mode, or when a Handheld Programmer key sequence
results in an error or an illegal request.
Error
Code
Description
E003 Software time-out
E004 Invalid instruction (RAM parity error)
E041 CPU battery low
E043 Memory cartridge battery low
E099 Program memory exceeded
E101 CPU memory cartridge missing
E104 Write fail
E151 Invalid command
E155 RAM failure
E201 Terminal block missing
E202 Missing I/O module
E203 Blown fuse
E206 User 24V power supply failure
E210 Power fault
E250 Communication failure in the I/O chain
E251 I/O parity error
E252 New I/O configuration
E262 I/O out of range
E312 Communications error 2
E313 Communications error 3
E316 Communications error 6
E320 Time out
E321 Communications error
E499 Invalid Text entry for Print Instruction
E501 Bad entry
E502 Bad address
E503 Bad command
E504 Bad reference / value
E505 Invalid instruction
E506 Invalid operation
Error
Code
Description
E520 Bad operation -- CPU in Run
E521 Bad operation -- CPU in Test Run
E523 Bad operation -- CPU in Test Program
E524 Bad operation -- CPU in Program
E525 Mode switch not in TERM
E526 Unit is offline
E527 Unit is online
E528 CPU mode
E540 CPU locked
E541 Wrong password
E542 Password reset
E601 Memory full
E602 Instruction missing
E604 Reference missing
E610 Bad I/O type
E611 Bad Communications ID
E620 Outofmemory
E621 EEPROM Memory not blank
E622 No Handheld Programmer EEPROM
E624 V memory only
E625 Program only
E627 Bad write operation
E628 Memory type error (should be EEPROM)
E640 Miscompare
E650 Handheld Programmer system error
E651 Handheld Programmer ROM error
E652 Handheld Programmer RAM error
System Error
Codes
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
9--8 Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
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 -- Check Program. The CPU will also turn on SP52
and store the error code in V7755. Appendix B provides a more complete description
of the error codes.
Error Code Description
E4** No Program in CPU
E401 Missing END statement
E402 Missing LBL
E403 Missing RET
E404 Missing FOR
E405 Missing NEXT
E406 Missing IRT
E412 SBR/LBL >64
E413 FOR/NEXT >64
E421 Duplicate stage reference
E422 Duplicate SBR/LBL reference
E423 Nested loops
E431 Invalid ISG/SG address
E432 Invalid jump (GOTO) address
E433 Invalid SBR address
E434 Invalid RTC address
E435 Invalid RT address
E436 Invalid INT address
E437 Invalid IRTC address
E438 Invalid IRT address
E440 Invalid Data Address
E441 ACON/NCON
E451 Bad MLS/MLR
E452 X input used as output coil
E453 Missing T/C
E454 Bad TMRA
E455 Bad CNT
E456 Bad SR
Error Code Description
E461 Stack Overflow
E462 Stack Underflow
E463 Logic Error
E464 Missing Circuit
E471 Duplicate coil reference
E472 Duplicate TMR reference
E473 Duplicate CNT reference
E480 CV position error
E481 CV not connected
E482 CV exceeded
E483 CVJMP placement error
E484 No CV
E485 No CVJMP
E486 BCALL placement error
E487 No Block defined
E488 Block position error
E489 Block CR identifier error
E490 No Block stage
E491 ISG position error
E492 BEND position error
E493 BEND I error
E494 No BEND
Program Error
Codes
Maintenance
and Troubleshooting Maintenance
and Troubleshooting Maintenance
and Troubleshooting
9--9
Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
CPU Indicators
The DL350 CPU has 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
PWR (off) 1. System voltage incorrect.
2. Power supply/CPU is faulty
3. Other component such an I/O module has power
supply shorted
4. Power budget exceeded for the base being used
RUN
(will not come on) 1. CPU programming error
2. Switch in TERM position
3. Switch in STOP position
RUN (flashing) 1. CPU in firmware upgrade mode.
CPU (on) 1. Electrical noise interference
2. CPU defective
BATT (on) 1. CPU battery low
2. CPU battery missing, or disconnected
TX1 1. Transmitting data from Port 1
RX1 1. Receiving data at Port 1
TX2 1. Transmitting data from Port 2
RX2 1. Receiving data at Port 2
Port 1
Port 2
Status Indicators
Mode Switch
Battery Slot
DL350
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
9--10 Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
PWR Indicator
There are four general reasons for the CPU power status LED (PWR) to be OFF:
1. Power to the base is incorrect or is not applied.
2. Base power supply is faulty.
3. Other component(s) have the power supply shut down.
4. Power budget for the base has been exceeded.
If the voltage to the power supply is not correct, the CPU and/or base may not
operate properly or may not operate at all. Use the following guidelines to correct the
problem.
WARNING: To minimize the risk of electrical shock, always disconnect the
system power before inspecting the physical wiring.
1. First, disconnect the system power and check all incoming wiring for loose
connections.
2. If you are using a separate termination panel, check those connections to
make sure the wiring is connected to the proper location.
3. If the connections are acceptable, reconnect the system power and
measure the voltage at the base terminal strip to insure it is within
specification. If the voltage is not correct shut down the system and correct
the problem.
4. If all wiring is connected correctly and the incoming power is within the
specifications required, the base power supply should be returned for
repair.
There is not a good check to test for a faulty CPU other than substituting a known
good one to see if this corrects the problem. If you have experienced major power
surges, it is possible the CPU and power supply have been damaged. If you suspect
this is the cause of the power supply damage, a line conditioner which removes
damaging voltage spikes should be used in the future.
Incorrect Base
Power
Faulty CPU
Maintenance
and Troubleshooting Maintenance
and Troubleshooting Maintenance
and Troubleshooting
9--11
Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
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. Turn off power to the CPU.
2. Disconnect all external devices (i.e., communication cables) from the CPU.
3. Reapply power to the system.
If the power supply operates normally you may have either a shorted device or a
shorted cable. If the power supply does not operate normally then test for a module
causing the problem by following the steps below:
If the PWR LED operates normally the problem could be in one of the modules. To
isolate which module is causing the problem, disconnect the system power and
remove one module at a time until the PWR LED operates normally.
Follow the procedure below:
STurn off power to the base.
SRemove a module from the base.
SReapply power to the base.
Bent base connector pins on the module can cause this problem. Check to see the
connector is not the problem.
If the machine had been operating correctly for a considerable amount of time prior
to the indicator going off, the power budget is not likely to be the problem. Power
budgeting problems usually occur during system start-up when the PLC is under
operation and the inputs/outputs are requiring more current than the base power
supply can provide.
WARNING: The PLC may reset if the power budget is exceeded. If there is any
doubt about the system power budget please check it at this time. Exceeding
the power budget can cause unpredictable results which can cause damage
and injury. Verify the modules in the base operate within the power budget for
the chosen base. You can find these tables in Chapter 4, System Design and
Configuration.
Device or Module
causing the Power
Supply to
Shutdown
Power Budget
Exceeded
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
9--12 Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
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. You can use a programming device to
determine the cause of the error.
If you are using a DL350 and you are trying to changethe modes with a programming
device, make sure the mode switch is in the TERM position.
Both of the programming devices, Handheld Programmer and DirectSOFT, will
return a error message describing the problem. Depending on the error, there may
also be an AUX function you can use to help diagnose the problem. The most
common programming error is “Missing END Statement”. All application programs
require an END statement for proper termination. A complete list of error codes can
be found in Appendix B.
CPU Indicator
If the CPU indicator is on, a fatal error has occurred in the CPU. Generally, this is not
a programming problem but an actual hardware failure. You can power cycle the
system to clear the error. If the error clears, you should monitor the system and
determine what caused the problem. You will find this problem is sometimes caused
by high frequency electrical noise introduced into the CPU from an outside source.
Check your system grounding and install electrical noise filters if the grounding is
suspected. If power cycling the system does not reset the error, or if the problem
returns, you should replace the CPU.
BATT Indicator
If the BATT indicator is on, the CPU battery is either disconnected or needs
replacing. The battery voltage is continuously monitored while the system voltage is
being supplied.
Communications Problems
If you cannot establish communications with the CPU, check these items.
SThe cable is disconnected.
SThe cable has a broken wire or has been wired incorrectly.
SThe cable is improperly terminated or grounded.
SThe device connected is not operating at the correct baud rate (9600
baud for the top port. Use AUX 56 to select the baud rate for the bottom
port on a DL350).
SThe device connected to the port is sending data incorrectly.
SA grounding difference exists between the two devices.
SElectrical noise is causing intermittent errors
SThe CPU has a bad comm port and the CPU should be replaced.
SIf you are using DirectSOFT, refer to the troubleshooting section of the
Quick Start Manual.
If an error occurs the indicator will come on and stay on until a successful
communication has been completed.
Maintenance
and Troubleshooting Maintenance
and Troubleshooting Maintenance
and Troubleshooting
9--13
Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
I/O Module Troubleshooting
If you suspect an I/O error, there are several things that could be causing the
problem.
SAblownfuse
SA loose terminal block
SThe 24 VDC supply has failed
SThe module has failed
SThe I/O configuration check detects a change in the I/O configuration
If the modules are not providing any clues to the problem, run AUX 42 from the
handheld programmer or I/O diagnostics in DirectSOFT. Both options will provide
the base number, the slot number and the problem with the module. Once the
problem is corrected the indicators will reset.
An I/O error will not cause the CPU to switch from the run to program mode, however
there are special relays (SPs) available in the CPU which will allow this error to be
read in ladder logic. The application program can then take the required action such
as entering the program mode or initiating an orderly shutdown. The following figure
shows an example of the failure indicators.
Program Control Information
V7752
V7753
V7754
SP47
0020
0021
0002
Desired module ID code
Current module ID code
Location of conflict
I/O Configuration Error
V7755 0252 Fatal error code
E252
NEW I/O CFG
Things to Check
I/O Diagnostics
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
9--14 Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
When troubleshooting the DL305 series I/O modules there are a few facts you
should be aware of. These facts may assist you in quickly correcting an I/O problem.
SThe output modules cannot detect shorted or open output points. If you
suspect one or more points on a output module to be faulty, you should
measure the voltage drop from the common to the suspect point.
Remember when using a Digital Volt Meter, leakage current from an
output device such as a triac or a transistor must be considered. A point
which is off may appear to be on if no load is connected the the point.
SThe I/O point status indicators on the modules are logic side indicators.
This means the LED which indicates the on or off status reflects the
status of the point in respect to the CPU. On an output module the
status indicators could be operating normally while the actual output
device (transistor, triac etc.) could be damaged. With an input module if
the indicator LED is on, the input circuitry should be operating properly.
To verify proper functionality check to see the LED goes off when the
input signal is removed.
SLeakage current can be a problem when connecting field devices to I/O
modules. False input signals can be generated when the leakage
current of an output device is great enough to turn on the connected
input device. To correct this, install a resistor in parallel with the input or
output of the circuit. The value of this resistor will depend on the amount
of leakage current and the voltage applied but usually a 10K to 20KΩ
resistor will work. Insure the wattage rating of the resistor is correct for
your application.
SThe easiest method to determine if a module has failed is to replace it if
you have a spare. However, if you suspect another device to have
caused the failure in the module, that device may cause the same
failure in the replacement module as well. As a point of caution, you
may want to check devices or power supplies connected to the failed
module before replacing it with a spare module.
Some Quick Steps
Maintenance
and Troubleshooting Maintenance
and Troubleshooting Maintenance
and Troubleshooting
9--15
Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
If you want to do an I/O check out independent of the application program, for the
DL350 follow the procedure below:
Step Action
1Use a handheld programmer or DirectSOFT to communicate online to
the PLC.
2Change to Program Mode.
3Go to address 0.
4Insert an “END” statement at address 0. (This will cause program
execution to occur only at address 0 and prevent the application pro-
gram from turning the I/O points on or off).
5Change to Run Mode.
6Use the programming device to set (turn) on or off the points you wish
to test.
7When you finish testing I/O points delete the “END” statement at
address 0.
WARNING: Depending on your application, forcing I/O points may cause
unpredictable machine operation that can result in a risk of personal injury or
equipment damage. Make sure you have taken all appropriate safety
precautions prior to testing any I/O points.
BIT REF X
16P STATUS
From a clear display, use the following keystrokes
Y10Y0
Use the PREV or NEXT keys to select the Y data type
Y2X0
END
X2
X3X1 X4
X5 X7
END
Insert an END statement
at the beginning of the
program. This disables
the remainder of the
program.
STAT ENT
NEXT 0
AENT
Y10Y0
Use arrow keys to select point, then use
ON and OFF to change the status
Y2 is now on
SHFT ON
INS
Testing Output
Points
Handheld
Programmer
Keystrokes Used
to Test an Output
Point
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
9--16 Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
Noise Troubleshooting
Noise is one of the most difficult problems to diagnose. Electrical noise can enter a
system in many different ways and fall 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 of the types of noise problems are similar.
SConducted noise is when the electrical interference is introduced into
the system by way of a attached wire, panel connection ,etc. It may
enter through an I/O module, a power supply connection, the
communication ground connection, or the chassis ground connection.
SRadiated noise is when the electrical interference is introduced into the
system without a direct electrical connection, much in the same manner
as radio waves.
While electrical noise cannot be eliminated it can be reduced to a level that will not
affect the system.
SMost noise problems result from improper grounding of the system. A
good earth ground can be the single most effective way to correct noise
problems. If a ground is not available, install a ground rod as close to
the system as possible. Insure all ground wires are single point grounds
and are not daisy chained from one device to another. Ground metal
enclosures around the system. A loose wire is no more than a large
antenna waiting to introduce noise into the system; therefore, you
should tighten all connections in your system. Loose ground wires are
more susceptible to noise than the other wires in your system. Review
Chapter 2 Installation, Wiring, and Specifications if you have questions
regarding how to ground your system.
SElectrical noise can enter the system through the power source for the
CPU and I/O. Installing a isolation transformer for all AC sources can
correct this problem. DC sources should be well grounded good quality
supplies. Switching DC power supplies commonly generate more noise
than linear supplies.
SSeparate input wiring from output wiring. Never run I/O wiring close to
high voltage wiring.
Electrical Noise
Problems
Reducing
Electrical Noise
Maintenance
and Troubleshooting Maintenance
and Troubleshooting Maintenance
and Troubleshooting
9--17
Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
Machine Startup and Program Troubleshooting
The DL350 CPU provides several features to help you debug your program before
and during machine startup. This section discusses the following topics which can
be very helpful.
SProgram Syntax Check
SDuplicate Reference Check
STest Modes
SSpecial Instructions
SRunTimeEdits
SForcing I/O Points
Even though the Handheld Programmer and DirectSOFT provide error checking
during program entry, you may want to check a modified program. Both
programming devices offer a way to check the program syntax. For example, you
can use AUX 21, CHECK PROGRAM to check the program syntax from a Handheld
Programmer, or you can use the PLC Diagnostics menu option within DirectSOFT.
This check will find a wide variety of programming errors. The following example
shows how to use the syntax check with a Handheld Programmer.
1:SYN 2:DUP REF
AUX 21 CHECK PRO
Use
A
U
X
21 to perform synta
x
check
BUSY
Select syntax check (default selection)
MISSING END
$00050 E401
One of two displays will appear
?
NO SYNTAX ERROR
Error Display (example)
(You may not get the busy display
if the program is not very long.)
Syntax OK display
(shows location in question)
CLR 1
B
2
CAUX ENT
ENT
See Appendix B for a complete listing of programming error codes. If you get an
error, press CLR and the Handheld will display the instruction where the error
occurred. Correct the problem and continue running the Syntax check until the NO
SYNTAX ERROR message appears.
Syntax Check
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
9--18 Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
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.
The following example shows how to perform the duplicate reference check with a
Handheld Programmer.
DUP COIL REF
$00024 E471
One of two displays will appear
?
NO DUP REFS
Error Display (example)
Syntax OK display
(shows location in question)
1:SYN 2:DUP REF
AUX 21 CHECK PRO
Use
A
U
X
21 to perform synta
x
check
BUSY
Select duplicate reference check
(You may not get the busy
display if the program is not
very long.)
CLR 1
B
2
CAUX ENT
ENT
If you get an error, press CLR and the Handheld will display the instruction where the
duplicate reference occurred. Correct the problem and continue running the
Duplicate Reference check until no duplicate references are found.
NOTE: You can use the same coil in more than one location, especially in programs
using the Stage instructions and/or the OROUT instructions. The Duplicate
Reference check will find these outputs even though they may be used in an
acceptable fashion.
Duplicate
Reference Check
Maintenance
and Troubleshooting Maintenance
and Troubleshooting Maintenance
and Troubleshooting
9--19
Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
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. You can select Test Modes from either
the Handheld Programmer (by using the MODE key) or from DirectSOFT via a PLC
Modes menu option.
The primary benefit of using the TEST mode is to maintain certain outputs and other
parameters when the CPU transitions back to Test-program mode. Also, the CPU
will maintain timer and counter current values when it switches to TEST-PGM mode.
NOTE: You can only use DirectSOFT to specify the number of scans. This feature is
not supported on the Handheld Programmer. However, you can use the Handheld to
switch between Test Program and Test Run Modes.
With the Handheld, the actual mode entered when you first select Test Mode
depends on the mode of operation at the time you make the request. If the CPU is in
Run Mode mode, then TEST-RUN is available. If the mode is Program, then
TEST-PGM is available. Once you’ve selected TEST Mode, you can easily switch
between TEST-RUN and TEST-PGM. DirectSOFT provides more flexibility in
selecting the various modes with different menu options. The following example
shows how you can use the Handheld to select the Test Modes.
GO TO T-RUN MODE
*MODE CHANGE*
Use the MODE key to select TEST Modes (example assumes Run Mode)
CPU T-RUN
*MODE CHANGE*
Press ENT to confirm TEST-RUN Mode
MODE ENT
ENT
NEXT
GO TO T-PGM MODE
*MODE CHANGE*
You can return to Run Mode, enter Program Mode, or enter TEST-PGM
Mode by using the Mode Key
CLR
(Note, the TEST LED on the DL205
Handheld indicates the CPU is in
TEST Mode.)
MODE NEXT
CPU T-PGM
*MODE CHANGE*
Press ENT to confirm TEST-PGM Mode
ENT
ENTNEXT
(Note, the TEST LED on the DL205
Handheld indicates the CPU is in
TEST Mode.)
TEST-PGM and
TEST-RUN Modes
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
9--20 Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
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.
TMR T0 K1000
S
TMR T0 K1000
1425 S
Current Value
RUN Mode TEST-RUN Mode
Input to Timer
T0 Contact (S is off)
(is on)
T0 Contact (S is off)
(is on)
Holding Output States: The ability to hold output states is very useful, because it
allows you to maintain key system I/Opoints. In some cases you may need to modify
the program, but you do not want certain operations to stop.In normal Run Mode, the
outputs are turned off when you return to Program Mode. In TEST-RUN mode you
can set each individual output to either turn off, or, to hold its last output state on the
transition to TEST-PGM mode. This feature is available via a menu option within
DirectSOFT. The following diagram shows the differences between RUN and
TEST-RUN modes.
RUN Mode to PGM Mode
TEST-RUN to TEST-PGM
Y0X0
END
X2
X3X1 X4
Y1
X10
Hold Y0 ON
Let Y1 turn
OFF
Status on final scan
Y0X0
END
X2
X3X1 X4
Y1
X10
Outputs are
OFF
Y0X0
END
X2
X3X1 X4
Y1
X10
Before you decide that Test Mode is the perfect choice, remember the DL350 CPU
also allows you to edit the program during Run Mode. The primary difference
between the Test Modes and the Run Time Edit feature is you do not have to
configure each individual I/O point to hold the output status. When you use Run Time
Edits, the CPU automatically maintains all outputs in their current states while the
program is being updated.
Maintenance
and Troubleshooting Maintenance
and Troubleshooting Maintenance
and Troubleshooting
9--21
Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
There are several instructions that can be used to help you debug your program
during machine startup operations.
SEND
SPAUSE
SSTOP
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. When the CPU
encounters the END statement, it assumes it is the end of the program. The following
diagram shows an example.
New END disables X10 and Y1
Y0X0
END
X2
X3X1 X4
Y1
X10
Normal Program
Y0X0
END
X2
X3X1 X4
Y1
X10
END
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, you can also use the STOPinstruction. When this instruction is executed the
CPU automatically exits Run Mode and enters Program Mode. Remember, all
outputs are turned off during Program Mode. The following diagram shows an
example of a condition that returns the CPU to Program Mode.
STOP puts CPU in Program Mode
Y0X0
END
X2
X3X1 X4
Y1
X10
Normal Program
Y0X0
END
X2
X3X1 X4
Y1
X10
X20
STOP
In the example shown above, you could trigger X20 which would execute the STOP
instruction. The CPU would enter Program Mode and all outputs would be turned off.
Special
Instructions
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
9--22 Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
The DL350 CPU allows 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. If the output is on, it will remain on.
WARNING: Only authorized personnel fully familiar with all aspects of the
application should make changes to the program. Changes during Run Mode
become effective immediately. Make sure you thoroughly consider the impact
of any changes to minimize the risk of personal injury or damage to
equipment. There are some important operations sequence changes during
RunTimeEdits.
1. If there is a syntax error in the new instruction, the CPU will not enter the
Run Mode.
2. If you delete an output coil reference and the output was on at the time, the
output will remain on until it is forced off with a programming device.
3. Input point changes are not acknowledged during Run Time Edits. So, if
you’re using a high-speed operation and a critical input comes on, the CPU
may not see the change.
Not all instructions can be edited during a Run Time Edit session. The following list
shows the instructions that can be edited.
Mnemonic Description
TMR Timer
TMRF Fast timer
TMRA Accumulating timer
TMRAF Accumulating fast timer
CNT Counter
UDC Up / Down counter
SGCNT Stage counter
STR, STRN Store, Store not
AND, ANDN And, And not
OR, ORN Or, Or not
STRE, STRNE Store equal, Store not equal
ANDE, ANDNE And equal, And not equal
ORE, ORNE Or equal, Or not equal
STR, STRN Store greater than or equal
Store less than
AND, ANDN And greater than or equal
And less than
Mnemonic Description
OR, ORN Or greater than or equal
Or less than
LD Load data (constant)
LDD Load data double (constant)
ADDD Add data double (constant)
SUBD Subtract data double (constant)
MUL Multiply (constant)
DIV Divide (constant)
CMPD Compare accumulator (constant)
ANDD And accumulator (constant)
ORD Or accumulator (constant)
XORD Exclusive or accumulator (constant)
LDF Load discrete points to accumulator
OUTF Output accumulator to discrete points
SHFR Shift accumulator right
SHFL Shift accumulator left
NCON Numeric constant
RunTimeEdits
Maintenance
and Troubleshooting Maintenance
and Troubleshooting Maintenance
and Troubleshooting
9--23
Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
Use the program logic shown to describe
how this process works. In the example,
change X0 to C10. Note, the example as-
sumes you have already placed the CPU
in Run Mode.
X0 X1 Y0
OUT
C0
RUN TIME EDIT?
*MODE CHANGE*
Use the MODE key to select Run Time Edits
RUNTIME EDITS
*MODE CHANGE*
Press ENT to confirm the Run Time Edits
MODE ENT
ENT
NEXT
$00000 STR X0
Find the instruction you want to change (X0)
Press the arrow key to move to the X. Then enter the new contact (C10).
SHFT SET
X0
ASHFT FD REF
FIND
(Note, the RUN LED on the DL205
Handheld starts flashing to indicate
Run Time Edits are enabled.)
STR C10
RUNTIME EDIT?
SHFT 1
B
2
C0
AENT
OR C0
Press ENT to confirm the change
ENT (Note, once you press ENT, the next
address is displayed.
NEXT
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
Maintenance
and Troubleshooting
9--24 Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
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 DL350 CPU processes the forcing requests.
WARNING: Only authorized personnel fully familiar with all aspects of the
application should make changes to the program. Make sure you thoroughly
consider the impact of any changes to minimize the risk of personal injury or
damage to equipment.
SRegular Forcing — This type of forcing can temporarily change the
status of a discrete bit. For example, you may want to force an input on,
even though it is really off. This allows you to change the point status
that was stored in the image register. This value will be valid until the
image register location is written to during the next scan. This is
primarily useful during testing situations when you need to force a bit on
to trigger another event.
The following diagrams show a brief
example of how you could use the
Handheld Programmer to force an I/O
point. The image register will not be
updated with the status from the input
module. Also, the solution from the
application program will not be used to
update the output image register. The
example assumes you have already
placed the CPU into Run Mode.
X0 Y0
OUT
C0
Use arrow keys to select point, then use
ON and OFF to change the status
SHFT ON
INS
00Y1 Y
BIT REF X
16P STATUS
From a clear display, use the following keystrokes
Use the PREV or NEXT keys to select the Y data type. (Once the Y
appears, press 0 to start at Y0.)
STAT ENT
NEXT 0
AENT
Y2 is now on
00Y1 Y
Forcing I/O Points
Maintenance
and Troubleshooting Maintenance
and Troubleshooting Maintenance
and Troubleshooting
9--25
Maintenance and Troubleshooting
DL350 User Manual, 2nd Edition
Y10
BIT FORCE
From a clear display, use the following
keystrokes to force Y10 ON Solid fill indicates point is on.
MLS
Y1
B0
A
SHFT SHFT ON
INS
Y10
BIT FORCE
From a clear display, use the following
keystrokes to force Y10 OFF No fill indicates point is off.
MLS
Y1
B0
A
SHFT SHFT OFF
DEL
Regular Forcing
with Direct Access
1
1A
Auxiliary Functions
In This Appendix....
— Introduction
— AUX 2* — RLL Operations
— AUX 3* — V-memory Operations
— AUX 4* — I/O Configuration
— AUX 5* — CPU Configuration
— AUX 6* — Handheld Programmer Configuration
— AUX 7* — EEPROM Operations
— AUX 8* — Password Operations
Appendix A
Auxiliary Functions
Auxiliary Functions
A--2
DL350 User Manual, 2nd Edition
Introduction
Many CPU setup 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. You can access the AUX Functions from DirectSOFT or from the
DL205 Handheld Programmer. The manuals for those products provide
step-by-step procedures for accessing the AUX Functions. Some of these AUX
Functions are designed specifically for the Handheld Programmer setup, so they will
not be needed (or available) with the DirectSOFT package. Even though this
Appendix provides many examples of how the AUX functions operate, you should
supplement this information with the documentation for your choice of programming
device. Note, the Handheld Programmer may have additional AUX functions that
are not supported with the DL350 CPU.
AUX Function and Description 350 HPP
AUX 2* — RLL Operations
21 Check Program --
22 Change Reference --
23 Clear Ladder Range --
24 Clear All Ladders --
AUX 3* — V-Memory Operations
31 Clear V Memory --
AUX 4* — I/O Configuration
41 Show I/O Configuration --
42 I/O Diagnostics --
44 Power-up I/O Configura-
tion Check
--
45 Select Configuration --
AUX 5* — CPU Configuration
51 Modify Program Name --
52 Display / Change Calen-
dar
--
53 Display Scan Time --
54 Initialize Scratchpad --
55 Set Watchdog Timer --
56 Set CPU Network Address --
57 Set Retentive Ranges --
58 Test Operations --
59 Bit Override --
5B Counter Interface Config. --
5C Display Error History --
AUX Function and Description 350 HPP
AUX 6* — Handheld Programmer Configura-
tion
61 Show Revision Numbers  
62 Beeper On / Off  
65 Run Self Diagnostics  
AUX 7* — EEPROM Operations
71 Copy CPU memory to
HPP EEPROM
 
72 Write HPP EEPROM to CPU  
73 Compare CPU to
HPP EEPROM
 
74 Blank Check (HPP EEPROM)  
75 Erase HPP EEPROM  
76 Show EEPROM Type
(CPU and HPP)
 
AUX 8* — Password Operations
81 Modify Password --
82 Unlock CPU --
83 Lock CPU --
supported
not supported
-- not applicable
What are Auxiliary
Functions?
Appendix A
Auxiliary Functions
A--3
Auxiliary Functions
DL350 User Manual, 2nd Edition
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 and example of the PLC
operations menu available within DirectSOFT.
Menu Options
You can also access the AUX functions by using a Handheld Programmer. Plus,
remember some of the AUX functions are only available from the Handheld.
Sometimes the AUX name or description cannot fit on one display. If you want to see
the complete description, press the arrow keys to scroll left and right. Also,
depending on the current display, you may have to press CLR more than once.
AUX 2* RLL OPERATIONS
AUX FUNCTION SELECTION
Use NXT or PREV to cycle through the menus
AUX 3* V OPERATIONS
AUX FUNCTION SELECTION
Press ENT to select sub-menus
AUX 31 CLR V MEMORY
AUX 3* V OPERATIONS
CLR AUX
NEXT
ENT
You can also enter the exact AUX number to go straight to the sub-menu.
AUX 31 CLR V MEMORY
AUX 3* V OPERATIONS
Enter the AUX number directly
CLR 3
D1
BAUX
Accessing AUX
Functions via
DirectSOFT
Accessing AUX
Functions via the
Handheld
Programmer
Appendix A
Auxiliary Functions
Auxiliary Functions
A--4
DL350 User Manual, 2nd Edition
AUX 2* — RLL Operations
There are four AUX functions available that you can use to perform various
operations on the control program.
SAUX 21 — Check Program
SAUX 22 — Change Reference
SAUX 23 — Clear Ladder Range
SAUX 24 — Clear Ladders
Both the Handheld and DirectSOFT automatically check for errors during program
entry. However, there may be occasions when you want to check a program that has
already been in the CPU. There are two types of checks available:
SSyntax
SDuplicate References
The Syntax check will find a wide variety of programming errors, such as missing
END statements, incomplete FOR/NEXT loops, etc. If you perform this check and
get an error, see Appendix B for a complete listing of programming error codes.
Correct the problem and then continue running the Syntax check until the message
“NO SYNTAX ERROR” appears.
Use the Duplicate Reference check to verify you have not used the same output coil
reference more than once. Note, this AUX function will also find the same outputs
even if they have been used with the OROUT instruction, which is perfectly
acceptable.
This AUX function is available on the PLC Diagnostics sub-menu from within
DirectSOFT.
There will be times when you need to change an I/O address reference or control
relay reference. AUX 22 allows you to quickly and easily change all occurrences,
(within an address range), of a specific instruction. For example, you can replace
every instance of X5 with X10.
There have been many times when you take existing programs and add or remove
certain portions to solve new application problems. By using AUX 23 you can select
and delete a portion of the program. DirectSOFT does not have a menu option for
this AUX function, but you can select the appropriate portion of the program and cut it
with the editing tools.
AUX 24 clears the entire program from CPU memory. Before you enter a new
program, you should always clear ladder memory. This AUX function is available on
the PLC/Clear PLC sub-menu within DirectSOFT.
AUX 3* — V-memory Operations
SAUX 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 21, 22, 23
and 24
AUX 21
Check Program
AUX 22
Change Reference
AUX 23
Clear Ladder
Range
AUX 24
Clear Ladders
AUX 31
Clear V--Memory
Appendix A
Auxiliary Functions
A--5
Auxiliary Functions
DL350 User Manual, 2nd Edition
AUX 4* — I/O Configuration
This AUX function allows you to display the current I/O configuration. With the
Handheld Programmer, you can scroll through each base and I/O slot to view the
complete configuration. The configuration shows the type of module installed in
each slot. DirectSOFT provides the same information, but it is much easier to view
because you can view a complete base on one screen.
AUX 5* — CPU Configuration
There are several AUX functions available that you can use to setup, view, or change
the CPU configuration.
SAUX 51 — Modify Program Name
SAUX 52 — Display / Change Calendar
SAUX 53 — Display Scan Time
SAUX 54 — Initialize Scratchpad
SAUX 55 — Set Watchdog Timer
SAUX 56 — Configure Comm Port
SAUX 57 — Set Retentive Ranges
SAUX 5C — Display Error / Message History
The DL305 products can use a program name for the CPU program or a program
stored on EEPROM in the Handheld Programmer. Note, you cannot have multiple
programs stored on the EEPROM. The program name can be up to eight characters
in length and can use any of the available characters (A--Z, 0--9). AUX 51 allows you
to enter a program name. You can also perform this operation from within
DirectSOFT by using the PLC/Setup sub-menu. Once you’ve entered a program
name, you can only clear the name by using AUX 54 to reset the system memory.
Make sure you understand the possible ramifications of AUX 54 before you use it!
The DL350 CPU has a clock and calendar feature. If you are using this, you can use
the Handheld and AUX 52 to set the time and date. The following format is used.
SDate — Year, Month, Date, Day of week (0 -- 6, Sunday thru Saturday)
STime — 24 hour format, Hours, Minutes, Seconds
You can use the AUX function to change any component of the date or time.
However, the CPU will not automatically correct any discrepancy between the date
and the day of the week. For example, if you change the date to the 15thof the month
and the 15th is on a Thursday, you will also have to change the day of the week
(unless the CPU already shows the date as Thursday).
You can also perform this operation from within DirectSOFT by using the PLC/Setup
sub-menu.
AUX 41
Show I/O
Configuration
AUX 51 -- 58
AUX 51
Modify Program
Name
AUX 52
Display /Change
Calendar
Appendix A
Auxiliary Functions
Auxiliary Functions
A--6
DL350 User Manual, 2nd Edition
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 Modeto
Run Mode transition. You can also perform this operation from within DirectSOFT
by using the PLC/Diagnostics sub-menu.
The DL350 CPU maintains system parameters in a memory area often referred to as
the “scratchpad”. In some cases, you may make changes to the system setup that
will be stored in system memory. For example, if you specify a range of Control
Relays (CRs) as retentive, these changes are stored.
NOTE: You may never have to use this feature unless you have made changes that
affect system memory. Usually, you’ll only need to initialize the system memory if you
are changing programs and the old program required a special system setup. You
can usually change from program to program without ever initializing system
memory.
AUX 54 resets the system memory to the default values. You can also perform this
operation from within DirectSOFT by using the PLC/Setup sub-menu.
The DL350 CPU has a “watchdog” timer that is used to monitor the scan time. The
default value set from the factory is 200 ms. If the scan time exceeds the watchdog
time limit, the CPU automatically leaves RUN mode and enters PGM mode. The
Handheld displays the following message E003 S/W TIMEOUT when the scan
overrun occurs.
Use AUX 55 to increase or decrease the watchdog timer value. You can also perform
this operation from within DirectSOFT by using the PLC/Setup sub-menu.
Since the DL350 CPU has an additional communication port, you can use the
Handheld to set the network address for the port and the port communication
parameters. The default settings are:
SStation address 1
SHEX mode
SOdd parity
You can use this port with either the Handheld Programmer, DirectSOFT, or, as a
DirectNET communication port. The DirectNET Manual provides additional
information about communication settings required for network operation.
NOTE: You will only need to use this procedure if you have the bottom port
connected to a network. Otherwise, the default settings will work fine.
Use AUX 56 to set the network address and communication parameters. You can
also perform this operation from within DirectSOFT by using the PLC/Setup
sub-menu.
AUX 53
Display Scan Time
AUX 54
Initialize
Scratchpad
AUX 55
Set Watchdog
Timer
AUX 56
CPU Network
Address
Appendix A
Auxiliary Functions
A--7
Auxiliary Functions
DL350 User Manual, 2nd Edition
The DL350 CPU provides 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:
M
e
m
o
r
y
A
r
e
a
DL350
M
emory
A
rea Default Range Avail. Range
Control Relays C1000 -- C1777 C0 -- C1777
V--Memory V1400 -- V37777 V0 -- V37777
Timers None by default T0 -- T377
Counters CT0 -- CT177 CT0 -- CT177
Stages None by default S0 -- S1777
Use AUX 57 to change the retentive ranges. You can also perform this operation
from within DirectSOFTby using the PLC/Setup sub-menu.
WARNING: The DL350 CPUs do not come with a battery. The super capacitor
will retain the values in the event of a power loss, but only up to 1 week. The
retention time may be less in some conditions. If the retentive ranges are
important for your application, make sure you obtain the optional battery.
The DL350 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.
SError Code Table -- the system logs up to 32 errors in the table. When
an error occurs, the errors already on the table are pushed down and
the most recent error is loaded into the top slot. If the table is full when
an error occurs, the oldest error is pushed out (erased) of the table.
SMessage Table -- the system logs up to 16 messages in this table. When
a message is triggered, the messages already stored in the table are
pushed down and the most recent message is loaded into the top slot. If
the table is full when an error occurs, the oldest message is pushed out
(erased) of the table.
The following diagram shows an example of an error table for messages.
Date Time Message
1997--05--26 08:41:51:11 * Conveyor--2 stopped
1997--04--30 17:01:11:56 * Conveyor--1 stopped
1997--04--30 17:01:11:12 * Limit SW1 failed
1997--04--28 03:25:14:31 * Saw Jam Detect
You can use AUX Function 5C to show the error codes or messages. You can also
view the errors and messages from within DirectSOFT by using the
PLC/Diagnostics sub-menu.
AUX 57
Set Retentive
Ranges
AUX 5C
Display Error
History
Appendix A
Auxiliary Functions
Auxiliary Functions
A--8
DL350 User Manual, 2nd Edition
AUX 6* — Handheld Programmer Configuration
As with most industrial control products, there are cases when additional features
and enhancements are made. Sometimes these new features only work with certain
releases of firmware. By using AUX 61 you can quickly view the CPU and Handheld
Programmer firmware revision numbers. This information (for the CPU) is also
available from within DirectSOFT from the PLC/Diagnostics sub-menu.
AUX 7* — EEPROM Operations
There are several AUX functions available you can use to move programs between
the CPU memory and an optional EEPROM installed in the Handheld Programmer.
SAUX 71 — Read from CPU memory to HPP EEPROM
SAUX 72 — Write HPP EEPROM to CPU
SAUX 73 — Compare CPU to HPP EEPROM
SAUX 74 — Blank Check (HPP EEPROM)
SAUX 75 — Erase HPP EEPROM
SAUX 76 — Show EEPROM Type (CPU and HPP)
AUX 71 copies information from the CPU memory to an EEPROM installed in the
Handheld Programmer.
You can copy different portions of EEPROM (HP) memory to the CPU memory as
shown in the previous table. The amount of data you can copy depends on the CPU.
AUX 72 copies information from an EEPROMinstalled in the Handheld Programmer
to the CPU. You can copy different types of information from CPU memory as shown
in the previous table.
AUX 73 compares the program in the Handheld programmer (EEPROM) with the
CPU program. You can compare different types of information as shown previously.
There is also an option called “etc.” that allows you to check all of the areas
sequentially without re-executing the AUX function every time.
AUX 74 allows you to check the EEPROMin the handheld programmer to make sure
it is blank. It’s a good idea to use this function anytime you start to copy an entire
program to an EEPROM in the handheld programmer.
AUX 75 allows you to clear all data in the EEPROM in the handheld programmer.
You should use this AUX function before you copy a program from the CPU.
You can use AUX 76 to quickly determine what size EEPROM is installed in the
Handheld Programmer.
AUX 61
Show Revision
Numbers
AUX 71 -- 76
AUX 71
CPU to HPP
EEPROM
AUX 72
HPP EEPROM to
CPU
AUX 73
Compare HPP
EEPROM to CPU
AUX 74
HPP EEPROM
Blank Check
AUX 75
Erase HPP
EEPROM
AUX 76
Show EEPROM
Type
Appendix A
Auxiliary Functions
A--9
Auxiliary Functions
DL350 User Manual, 2nd Edition
AUX 8* — Password Operations
There are several AUX functions available that you can use 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. This will allow you to develop a program inthe
Handheld Programmer and include password protection.
SAUX 81 — Modify Password
SAUX 82 — Unlock CPU
SAUX 83 — Lock CPU
You can use AUX 81 to provide an extra measure of protection by entering a
password that prevents unauthorized machine operations. If you are using the
standard level password, it must be an eight-character numeric (0--9) code. Once
you’ve entered a password, you can remove it by entering all zeros (00000000). This
is the default from the factory.
The DL350 also features a multi--level password that you select by entering the
character “A” and seven numeric characters. This level of protection differs from the
standard in that it allows an operator interface device to access and change
V--memory data (i.e., presets). However, it also does not allow a ladder program edit.
Once you’ve entered a password, you can lock the CPU against access. There are
two ways to lock the CPU with the Handheld Programmer.
SThe CPU is always locked after a power cycle (if a password is present).
SYou can use AUX 83 and AUX 84 to lock and unlock the CPU.
You can also enter or modify a password from within DirectSOFT by using the
PLC/Password sub-menu. This feature works slightly differently in DirectSOFT.
Once you’ve entered a password, the CPU is automatically locked when you exit the
software package. It will also be locked if the CPU is power cycled.
WARNING: Make sure you remember the password before you lock the CPU.
Once the CPU is locked you cannot view, change, or erase the password. If
you do not remember the password, you must return the CPU to the factory to
have the password removed. This will also erase ALL memory in the CPU
which is the policy of AutomationDirect.
NOTE: The D3--350 CPU supports multi-level password protection of the ladder
program. This allows password protection while not locking the communication port
to an operator interface. The multi-level password can be invoked by creating a
password with an upper case “A” followed by seven numeric characters (e.g.
A1234567).
AUX 81 can be used to unlock a CPU that has been password protected.
DirectSOFT will automatically ask you to enter the password if you attempt to
communicate with a CPU that contains a password.
AUX 83 can be used to lock a CPU that contains a password. Once the CPU is
locked, you will have to enter a password to gain access. Remember, this is not
necessary with DirectSOFT since the CPU is automatically locked whenever you
exit the software package.
AUX 81 -- 83
AUX 81
Modify Password
AUX 82
Unlock CPU
AUX 83
Lock CPU
1
1B
Error Codes
In This Appendix....
— Error Code Table
Appendix A
DL405 Error Codes
Appendix B
Error Codes
Appendix C
Error Codes
B--2 Error Codes
DL350 User Manual, 2nd Edition
DL305 Error Code Description
E003
SOFTWARE
TIME-OUT
If the program scan time exceeds the time allotted to the watchdog timer, this
error will occur. SP51 will be on and the error code will be stored in V7755. To
correct this problem add RSTWT instructions in FOR NEXT loops and
subroutines or use AUX 55 to extend the time allotted to the watchdog timer.
E041
CPU BATTERY LOW The CPU battery is low and should be replaced. SP43 will be on and the error
code will be stored in V7757.
E099
PROGRAM
MEMORY
EXCEEDED
If the compiled program length exceeds the amount of available CPU RAM
this error will occur. SP52 will be on and the error code will be stored in
V7755. Reduce the size of the application program.
E104
WRITE FAILED A write to the CPU was not successful. Disconnect the power, remove the
CPU, and make sure the EEPROM is not write protected. If the EEPROM is
not write protected, make sure the EEPROM is installed correctly. If both
conditions are OK, replace the CPU.
E151
BAD COMMAND A parity error has occurred in the application program. SP44 will be on and
the error code will be stored in V7755 .This problem may possibly be due to
electrical noise .Clear the memory and download the program again. Correct
any grounding problems .If the error returns replace the EEPROM or the
CPU.
E155
RAM FAILURE A checksum error has occurred in the system RAM. SP44 will be on and the
error code will be stored in V7755. This problem may possibly be due to a low
battery, electrical noise or a CPU RAM failure. Clear the memory and
download the program again. Correct any grounding problems. If the error
returns replace the CPU.
E202
MISSING I/O
MODULE
An I/O module has failed to communicate with the CPU or is missing from the
base. SP45 will be on and the error code will be stored in V7756. Run AUX42
to determine the slot and base location of the module reporting the error.
E210
POWER FAULT A short duration power drop-out occurred on the main power line supplying
power to the base.
E250
COMMUNICATION
FAILURE IN THE I/O
CHAIN
A failure has occurred in the local I/O system. The problem could be in the
base I/O bus or the base power supply. SP45 will be on and the error code
will be stored in V7755. Run AUX42 to determine the base location reporting
the error.
E252
NEW I/O CFG This error occurs when the auto configuration check is turned on in the CPU
and the actual I/O configuration has changed either by moving modules in a
base or changing types of modules in a base. You can return the modules to
the original position/types or run AUX45 to accept the new configuration.
SP47 will be on and the error code will be stored in V7755.
E262
I/OOUTOFRANGE An out of range I/O address has been encountered in the application
program. Correct the invalid address in the program. SP45 will be on and the
error code will be stored in V7755.
Appendix A
DL405 Error Codes Appendix B
Error Codes Appendix C
Error Codes
B--3
Error Codes
DL350 User Manual, 2nd Edition
DL305 Error Code Description
E312
HP COMM
ERROR 2
A data 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 the handheld programmer, then if
necessary replace the CPU. SP46 will be on and the error code will be stored
in V7756.
E313
HP COMM
ERROR 3
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 the handheld programmer, then if
necessary replace the CPU. SP46 will be on and the error code will be stored
in V7756.
E316
HP COMM
ERROR 6
A mode error was encountered during communications with the CPU. Clear
the error and retry the request. If the error continues replace the handheld
programmer, then if necessary replace the CPU. SP46 will be on and the
error code will be stored in V7756.
E320
HP COMM
TIME-OUT
The CPU did not respond to the handheld programmer communication
request. Check to insure cabling is correct and not defective. Power cycle the
system if the error continues replace the CPU first and then the handheld
programmer if necessary.
E321
COMM ERROR A data error was encountered during communication with the CPU. Check to
insure cabling is correct and not defective. Power cycle the system and if the
error continues replace the CPU first and then the handheld programmer if
necessary.
E4**
NO PROGRAM A syntax error exists in the application program. The most common is a
missing END statement. Run AUX21 to determine which one of the E4**
series of errors is being flagged. SP52 will be on and the error code will be
stored in V7755.
E401
MISSING END
STATEMENT
All application programs must terminate with an END statement. Enter the
END statement in appropriate location in your program. SP52 will be on and
the error code will be stored in V7755.
E402
MISSING LBL A GOTO, GTS, MOVMC or LDLBL instruction was used without the
appropriate label. Refer to the programming manual for details on these
instructions. SP52 will be on and the error code will be stored in V7755.
E403
MISSING RET A subroutine in the program does not end with the RET instruction. SP52 will
be on and the error code will be stored in V7755.
E404
MISSING FOR A NEXT instruction does not have the corresponding FOR instruction. SP52
will be on and the error code will be stored in V7755.
Appendix A
DL405 Error Codes
Appendix B
Error Codes
Appendix C
Error Codes
B--4 Error Codes
DL350 User Manual, 2nd Edition
DL305 Error Code Description
E405
MISSING NEXT A FOR instruction does not have the corresponding NEXT instruction. SP52
will be on and the error code will be stored in V7755.
E406
MISSING IRT An interrupt routine in the program does not end with the IRT instruction.
SP52 will be on and the error code will be stored in V7755.
E412
SBR/LBL>64 There is greater than 64 SBR, LBL or DLBL instructions in the program. This
error is also returned if there is greater than 128 GTS or GOTO instructions
used in the program. SP52 will be on and the error code will be stored in
V7755.
E413
FOR/NEXT>64 There is greater than 64 FOR/NEXT loops in the application program. SP52
will be on and the error code will be stored in V7755.
E421
DUPLICATE STAGE
REFERENCE
Two or more SG or ISG labels exist in the application program with the same
number. A unique number must be allowed for each Stage and Initial Stage.
SP52 will be on and the error code will be stored in V7755.
E422
DUPLICATE
SBR/LBL
REFERENCE
Two or more SBR or LBL instructions exist in the application program with the
same number. A unique number must be allowed for each Subroutine and
Label. SP52 will be on and the error code will be stored in V7755.
E423
NESTED LOOPS Nested loops (programming one FOR/NEXT loop inside of another) is not
allowed in the DL350 series. SP52 will be on and the error code will be stored
in V7755.
E431
INVALID ISG/SG
ADDRESS
An ISG or SG must not be programmed after the end statement such as in a
subroutine. SP52 will be on and the error code will be stored in V7755.
E432
INVALID JUMP
(GOTO) ADDRESS
A LBL that corresponds to a GOTO instruction must not be programmed after
the end statement such as in a subroutine. SP52 will be on and the error
code will be stored in V7755.
E433
INVALID SBR
ADDRESS
A SBR must be programmed after the end statement, not in the main body of
the program or in an interrupt routine. SP52 will be on and the error code will
be stored in V7755.
E435
INVALID RT
ADDRESS
A RT must be programmed after the end statement, not in the main body of
the program or in an interrupt routine. SP52 will be on and the error code will
be stored in V7755.
Appendix A
DL405 Error Codes Appendix B
Error Codes Appendix C
Error Codes
B--5
Error Codes
DL350 User Manual, 2nd Edition
DL305 Error Code Description
E436
INVALID INT
ADDRESS
An INT must be programmed after the end statement, not in the main body of
the program. SP52 will be on and the error code will be stored in V7755.
E438
INVALID IRT
ADDRESS
An IRT must be programmed after the end statement, not in the main body of
the program. SP52 will be on and the error code will be stored in V7755.
E440
INVALID DATA
ADDRESS
Either the DLBL instruction has been programmed in the main program area
(not after the END statement), or the DLBL instruction is on a rung containing
input contact(s).
E441
ACON/NCON An ACON or NCON must be programmed after the end statement, not in the
main body of the program. SP52 will be on and the error code will be stored
in V7755.
E451
BAD MLS/MLR MLS instructions must be numbered in ascending order from top to bottom.
E452
XASCOIL An X data type is being used as a coil output.
E453
MISSING T/C A timer or counter contact is being used where the associated timer or
counter does not exist.
E454
BAD TMRA One of the contacts is missing from a TMRA instruction.
E455
BAD CNT One of the contacts is missing from a CNT or UDC instruction.
E456
BAD SR One of the contacts is missing from the SR instruction.
E461
STACK OVERFLOW More than nine levels of logic have been stored on the stack. Check the use
of OR STR and AND STR instructions.
E462
STACK
UNDERFLOW
An unmatched number of logic levels have been stored on the stack. Insure
the number of AND STR and OR STR instructions match the number of STR
instructions.
E463
LOGIC ERROR A STR instruction was not used to begin a rung of ladder logic.
E464
MISSING CKT A rung of ladder logic is not terminated properly.
E471
DUPLICATE COIL
REFERENCE
Two or more OUT instructions reference the same I/O point.
E472
DUPLICATE TMR
REFERENCE
Two or more TMR instructions reference the same number.
Appendix A
DL405 Error Codes
Appendix B
Error Codes
Appendix C
Error Codes
B--6 Error Codes
DL350 User Manual, 2nd Edition
DL305 Error Code Description
E473
DUPLICATE CNT
REFERENCE
Two or more CNT instructions reference the same number.
E480
INVALID CV
ADDRESS
The CV instruction is used in a subroutine or program interrupt routine. The
CV instruction may only be used in the main program area (before the END
statement).
E481
CONFLICTING
INSTRUCTIONS
An instruction exists between convergence stages.
E482
MAX. CV
INSTRUCTIONS
EXCEEDED
Number of CV instructions exceeds 17.
E483
INVALID CVJMP
ADDRESS
CVJMP has been used in a subroutine or a program interrupt routine.
E484
MISSING CV
INSTRUCTION
CVJMP is not preceded by the CV instruction. A CVJMP must immediately
follow the CV instruction.
E485
NO CVJMP A CVJMP instruction is not placed between the CV and the SG, ISG, BLK,
BEND, END instruction.
E486
INVALID BCALL
ADDRESS
A BCALL is used in a subroutine or a program interrupt routine. The
BCALL instruction may only be used in the main program area (before the
END statement).
E487
MISSING BLK
INSTRUCTION
The BCALL instruction is not followed by a BLK instruction.
E488
INVALID BLK
ADDRESS
The BLK instruction is used in a subroutine or a program interrupt. Another
BLK instruction is used between the BCALL and the BEND instructions.
E489
DUPLICATED CR
REFERENCE
The control relay used for the BLK instruction is being used as an output
elsewhere.
Appendix A
DL405 Error Codes Appendix B
Error Codes Appendix C
Error Codes
B--7
Error Codes
DL350 User Manual, 2nd Edition
DL305 Error Code Description
E490
MISSING SG
INSTRUCTION
The BLK instruction is not immediately followed by the SG instruction.
E491
INVALID ISG
INSTRUCTION
ADDRESS
There is an ISG instruction between the BLK and BEND instructions.
E492
INVALID BEND
ADDRESS
The BEND instruction is used in a subroutine or a program interrupt routine.
The BEND instruction is not followed by a BLK instruction.
E493
MISSING REQUIRED
INSTRUCTION
A [CV, SG, ISG, BLK, BEND] instruction must immediately follow the BEND
instruction.
E494
MISSING BEND
INSTRUCTION
The BLK instruction is not followed by a BEND instruction.
E499
PRINT
INSTRUCTION
Invalid PRINT instruct usage. Quotations and/or spaces were not entered or
entered incorrectly.
E501
BAD ENTRY An invalid keystroke or series of keystrokes was entered into the handheld
programmer.
E502
BAD ADDRESS An invalid or out of range address was entered into the handheld
programmer.
E503
BAD COMMAND An invalid instruction was entered into the handheld programmer.
E504
BAD REF/VAL An invalid value or reference number was entered with an instruction.
E505
INVALID
INSTRUCTION
An invalid instruction was entered into the handheld programmer.
E506
INVALID
OPERATION
An invalid operation was attempted by the handheld programmer.
E520
BAD OP--RUN An operation which is invalid in the RUN mode was attempted by the
handheld programmer.
E521
BAD OP--TRUN An operation which is invalid in the TEST RUN mode was attempted by the
handheld programmer.
E523
BAD OP--TPGM An operation which is invalid in the TEST PROGRAM mode was attempted
by the handheld programmer.
E524
BAD OP--PGM An operation which is invalid in the PROGRAM mode was attempted by the
handheld programmer.
Appendix A
DL405 Error Codes
Appendix B
Error Codes
Appendix C
Error Codes
B--8 Error Codes
DL350 User Manual, 2nd Edition
DL305 Error Code Description
E525
MODE SWITCH An operation was attempted by the handheld programmer while the CPU
mode switch was in a position other than the TERM position.
E526
OFF LINE The handheld programmer is in the OFFLINE mode. To change to the
ONLINE mode use the MODE key.
E527
ON LINE The handheld programmer is in the ON LINE mode. To change to the OFF
LINE mode use the MODE the key.
E528
CPU MODE The operation attempted is not allowed during a Run Time Edit.
E540
CPU LOCKED The CPU has been password locked. To unlock the CPU use AUX82 with the
password.
E541
WRONG
PASSWORD
The password used to unlock the CPU with AUX82 was incorrect.
E542
PASSWORD RESET The CPU powered up with an invalid password and reset the password to
00000000. A password may be re-entered using AUX81.
E601
MEMORY FULL Attempted to enter an instruction which required more memory than is
available in the CPU.
E602
INSTRUCTION
MISSING
A search function was performed and the instruction was not found.
E604
REFERENCE
MISSING
A search function was performed and the reference was not found.
E610
BAD I/O TYPE The application program has referenced an I/O module as the incorrect type
of module.
E620
OUTOFMEMORY Incorrect structure of LDLBL, MOV, or MOVMC command. An attempt to
transfer more data between the CPU and handheld programmer than the
receiving device can hold.
E621
EEPROM NOT
BLANK
An attempt to write to a non-blank EEPROM was made. Erase the EEPROM
and then retry the write.
E622
NO HPP EEPROM A data transfer was attempted with no EEPROM (or possibly a faulty
EEPROM) installed in the handheld programmer.
E623
SYSTEM EEPROM A function was requested with an EEPROM which contains system
information only.
E624
V-MEMORY ONLY A function was requested with an EEPROM which contains V-memory data
only.
E625
PROGRAM ONLY A function was requested with an EEPROM which contains program data
only.
Appendix A
DL405 Error Codes Appendix B
Error Codes Appendix C
Error Codes
B--9
Error Codes
DL350 User Manual, 2nd Edition
DL305 Error Code Description
E627
BAD WRITE An attempt to write to a write protected or faulty EEPROM was made. Check
the write protect jumper and replace the EEPROM if necessary.
E640
COMPARE ERROR A compare between the EEPROM and the CPU was found to be in error.
E650
HPP SYSTEM
ERROR
A system error has occurred in the handheld programmer. Power cycle the
handheld programmer. If the error returns replace the handheld programmer.
E651
HPP ROM ERROR A ROM error has occurred in the handheld programmer. Power cycle the
handheld programmer. If the error returns replace the handheld programmer.
E652
HPP RAM ERROR A RAM error has occurred in the handheld programmer. Power cycle the
handheld programmer. If the error returns replace the handheld programmer.
1
1C
Instruction
Execution Times
In This Appendix....
— Introduction
— Boolean Instructions
— Comparative Boolean
— Immediate Instructions
— Timer, Counter, Shift Register Instructions
— Accumulator Data Instructions
— Logical Instructions
— Math Instructions
— Bit Instructions
— Number Conversion Instructions
— Table Instructions
— CPU Control Instructions
— Program Control Instructions
— Interrupt Instructions
— Network Instructions
— Message Instructions
—RLL
PLUS Instructions
Appendix A
DL405 Error Codes
Appendix B
DL405 Error Codes
Appendix C
Inst. Execution Times
C--2 Instruction Execution Times
DL350 User Manual, 2nd Edition
Introduction
This appendix contains several tables that provide the instruction execution times
for the DL350 CPU. You will notice is that many of the execution times depend on the
type of data being used with the instruction. For example, a few of the instructions
that use V-memory locations are further defined by the following items.
SData Registers
SBit Registers
Some V-memory locations are considered data registers. For example, the
V-memory locations that store the timer or counter current values, or just regular
user V--memory would be considered as a V-memory data register. Don’t think that
you cannot load a bit pattern into these types of registers, you can. It’s just that their
primary use is as a data register. The following locations are considered as data
registers.
Data Registers DL350
Timer Current Values V0 -- V377
Counter Current Values V1000 -- V1177
User Data Words V1400 -- V7377
V10000 -- V17777
You may recall that some of the discrete points such as X, Y, C, etc. are automatically
mapped into V--memory. The following locations that contain this data are
considered bit registers.
Bit Registers DL350
Input Points (X) V40400 -- V 40437
Output Points (Y) V40500 -- V40537
Control Relays (C) V40600 -- V40677
Timer Status Bits V41100 -- V41117
Counter Status Bits V41040 -- V41147
Stages V41000 -- V41077
V-Memory Data
Registers
V-Memory Bit
Registers
Appendix A
DL405 Error Codes Appendix B
DL405 Error Codes Appendix C
Inst. Execution Times Appendix C
Inst. Execution Times
C--3
Instruction Execution Times
DL350 User Manual, 2nd Edition
Some of the instructions can have more than one parameter so the table shows
execution times that depend on the amount and type of parameters. For example,
the SET instruction can be used to set a single point or a range of points. If you
examine the execution table you’ll notice the available data types and execution
times for both situations. The following diagram shows an example.
X0 X1 Y0 -- Y7
SET
C0
Two Locations Available
SET 1st#: X,Y,C,S
2nd #: X, Y, C, S, (N pt)
17.4 μs
12.0μs+5.4μsxN
RST 1st#: X,Y,C,S
2nd #: X, Y, C, S, (N pt)
19.5 μs
10.5μs+5.2μsxN
How to Read the
Tables
Execution depends
on numbers of
locations and types
of data used
Appendix A
DL405 Error Codes
Appendix B
DL405 Error Codes
Appendix C
Inst. Execution Times
C--4 Instruction Execution Times
DL350 User Manual, 2nd Edition
Boolean Instructions
Boolean Instructions DL350
Instruction Legal Data Types Execute Not Exec
STR X, Y, C, T, CT,S, SP .74 μs.74 μs
STRN X, Y, C, T, CT,S, SP 0.68 μs0.74 μs
OR X, Y, C, T, CT, S, SP 0.56 μs0.56 μs
ORN X, Y, C, T, CT,S, SP 0.6 μs0.6 μs
AND X, Y, C, T, CT, S, SP 0.46 μs0.46 μs
ANDN X, Y, C, T, CT, S, SP 0.56 μs0.56 μs
ANDSTR None 0.4 μs0.4 μs
ORSTR None 0.4 μs0.4 μs
OUT X, Y, C 2.0 μs2.0 μs
OUTH X, Y, C 1.1 μs1.1 μs
OROUT X, Y, C 2.4 μs2.4 μs
PD X, Y, C 16.6 μs16.6 μs
SET 1st#: X,Y,C,S
2nd #: X, Y, C, S (N pt)
10.6 μs
11.4μs+ 0.9μsxN
1.1 μs
1.1 μs
RST 1st#: X,Y,C,S
2nd #: X, Y, C, S (N pt)
10.6 μs
11.4μs+ 0.9μsxN
1.1 μs
1.1 μs
1st#: T,CT
2nd #: T, CT (N pt)
10.6 μs
11.4μs+ 0.9μsxN
1.1 μs
1.1 μs
Appendix A
DL405 Error Codes Appendix B
DL405 Error Codes Appendix C
Inst. Execution Times Appendix C
Inst. Execution Times
C--5
Instruction Execution Times
DL350 User Manual, 2nd Edition
Comparative Boolean
Comparative Boolean Instructions DL350
Instruction Legal Data Types Execute Not Exec
STRE 1st 2nd
V: Data Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
V: Bit Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Data) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Bit) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
STRNE 1st 2nd
V: Data Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
V: Bit Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Data) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Bit) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
Appendix A
DL405 Error Codes
Appendix B
DL405 Error Codes
Appendix C
Inst. Execution Times
C--6 Instruction Execution Times
DL350 User Manual, 2nd Edition
Comparative Boolean (cont.) DL350
Instruct Legal Data Types Execute Not Exec
ORE 1st 2nd
V: Data Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
V: Bit Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Data) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Bit) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
ORNE 1st 2nd
V: Data Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
V: Bit Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Data) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Bit) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
Appendix A
DL405 Error Codes Appendix B
DL405 Error Codes Appendix C
Inst. Execution Times Appendix C
Inst. Execution Times
C--7
Instruction Execution Times
DL350 User Manual, 2nd Edition
Comparative Boolean (cont.) DL350
Instruct Legal Data Types Execute Not Exec
ANDE 1st 2nd
V: Data Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
V: Bit Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Data) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Bit) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
ANDNE 1st 2nd
V: Data Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
V: Bit Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Data) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Bit) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
Appendix A
DL405 Error Codes
Appendix B
DL405 Error Codes
Appendix C
Inst. Execution Times
C--8 Instruction Execution Times
DL350 User Manual, 2nd Edition
Comparative Boolean (cont.) DL350
Instruc Legal Data Types Execute Not Exec
STR 1st 2nd
T, CT V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
1st 2nd
V: Data Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
V: Bit Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Data) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Bit) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
STRN 1st 2nd
T, CT V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
1st 2nd
V: Data Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
V: Bit Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Data) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Bit) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
Appendix A
DL405 Error Codes Appendix B
DL405 Error Codes Appendix C
Inst. Execution Times Appendix C
Inst. Execution Times
C--9
Instruction Execution Times
DL350 User Manual, 2nd Edition
Comparative Boolean (cont.) DL350
Instruc Legal Data Types Execute Not Exec
OR 1st 2nd
T, CT V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
1st 2nd
V: Data Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
V: Bit Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Data) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Bit) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
ORN 1st 2nd
T, CT V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
1st 2nd
V: Data Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
V: Bit Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Data) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Bit) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
Appendix A
DL405 Error Codes
Appendix B
DL405 Error Codes
Appendix C
Inst. Execution Times
C--10 Instruction Execution Times
DL350 User Manual, 2nd Edition
Comparative Boolean (cont.) DL350
Instruc Legal Data Types Execute Not Exec
AND 1st 2nd
T, CT V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
1st 2nd
V: Data Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
V: Bit Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Data) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Bit) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
ANDN 1st 2nd
T, CT V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
1st 2nd
V: Data Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
V: Bit Reg. V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Data) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
P:Indir. (Bit) V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
8.7μs
5.5μs
35.9μs
8.7μs
5.5μs
35.9μs
35.6μs
32.6μs
60.7μs
35.6μs
32.6μs
60.7μs
Appendix A
DL405 Error Codes Appendix B
DL405 Error Codes Appendix C
Inst. Execution Times Appendix C
Inst. Execution Times
C--11
Instruction Execution Times
DL350 User Manual, 2nd Edition
Immediate Instructions
Immediate Instructions DL350
Instruc Legal Data Types Execute Not Exec
STRI X78.6 μs78.6 μs
STRNI X78.6 μs78.6 μs
ORI X 78.6 μs78.6 μs
ORNI X78.6 μs78.6 μs
ANDI X78.6 μs78.6 μs
ANDNI X78.6 μs78.6 μs
OUTI Y91.0 μs91.0 μs
OROUTI Y94.0 μs94.0 μs
SETI 1st #: Y
2nd #: Y (N pt)
87.6 μs
97.5μs+ 16.25xN
1.1 μs
1.1 μs
RSTI 1st #: Y
2nd #: Y (N pt)
87.6 μs
97.5μs+ 16.25xN
1.1 μs
Appendix A
DL405 Error Codes
Appendix B
DL405 Error Codes
Appendix C
Inst. Execution Times
C--12 Instruction Execution Times
DL350 User Manual, 2nd Edition
Timer, Counter, Shift Register Instructions
Timer, Counter, Shift Register
Instructions
DL350
Instruc Legal Data Types Execute Not Exec
TMR 1st 2nd
T V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
38.6μs
23.0μs
54.3μs
24.6μs
24.6μs
52.0μs
TMRF 1st 2nd
T V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
61.2μs
57.6μs
90.4μs
23.0μs
19.4μs
37.5μs
TMRA 1st 2nd
T V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
58.2μs
53.6μs
90.4μs
27.1μs
22.4μs
59.2μs
TMRAF 1st 2nd
T V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
64.5μs
59.9μs
96.7μs
27.6μs
22.4μs
59.2μs
CNT 1st 2nd
CT V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
36.1μs
32.5μs
97.1μs
24.6μs
21.0μs
56.8μs
SGCNT 1st 2nd
CT V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
35.2μs
33.7μs
67.4μs
27.7μs
27.1μs
57.9μs
UDC 1st 2nd
CT V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
47.4μs
42.7μs
81.7μs
40.0μs
35.3μs
72.1μs
SR C (N points to shift) 17.8μs+
1.0μsxN 12.6 μs
Appendix A
DL405 Error Codes Appendix B
DL405 Error Codes Appendix C
Inst. Execution Times Appendix C
Inst. Execution Times
C--13
Instruction Execution Times
DL350 User Manual, 2nd Edition
Accumulator Data Instructions
Accumulator / Stack Load
and Output Data Instructions
DL350
Instruc Legal Data Types Execute Not Exec
LD V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
13.6μs
10.4μs
40.4μs
1.1μs
1.1μs
1.1μs
LDD V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
14.0μs
10.4μs
45.0μs
1.1μs
1.1μs
1.3μs
LDF 1st 2nd
X, Y, C, S K:Constant
T, CT, SP 10.5μs+
3.45μsxN 1.4μs
LDA O: (Octal constant for address) 10.4 μs1.1μs
LDSX K: Constant 14.6 μs1.5μs
OUT V:Data Reg.
V:Bit Reg.
P:Indir. (Data)
P:Indir. (Bit)
10.7 μs
41.9 μs1.1μs
OUTD V:Data Reg.
V:Bit Reg.
P:Indir. (Data)
P:Indir. (Bit)
11.7 μs
42.6 μs1.1μs
OUTF 1st 2nd
X, Y, C K:Constant 43.8μs+
6.2μsxN 1.1μs
POP None 7.8 μs1.0μs
Appendix A
DL405 Error Codes
Appendix B
DL405 Error Codes
Appendix C
Inst. Execution Times
C--14 Instruction Execution Times
DL350 User Manual, 2nd Edition
Logical Instructions
Logical (Accumulator)
Instructions
DL350
Instruc Legal Data Types Execute Not Exec
AND V:Data Reg.
V:Bit Reg.
P:Indir. (Data)
P:Indir. (Bit)
9.1μs
39.8μs
1.1μs
1.1μs
ANDD V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
10.2μs
6.5μs
40.9μs
1.1μs
1.1μs
1.1μs
OR V:Data Reg.
V:Bit Reg.
P:Indir. (Data)
P:Indir. (Bit)
9.3μs
40.2μs
1.1μs
1.1μs
ORD V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
10.4μs
6.7μs
41.1μs
1.1μs
1.1μs
1.1μs
XOR V:Data Reg.
V:Bit Reg.
P:Indir. (Data)
P:Indir. (Bit)
9.2μs
40.0μs
1.1μs
1.1μs
XORD V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
10.3μs
6.2μs
41.0μs
1.1μs
1.1μs
1.1μs
CMP V:Data Reg.
V:Bit Reg.
P:Indir. (Data)
P:Indir. (Bit)
10.8μs
41.5μs
1.1μs
1.1μs
CMPD V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
11.4μs
7.7μs
42.1μs
1.2μs
1.2μs
1.2μs
CMPS None — —
Appendix A
DL405 Error Codes Appendix B
DL405 Error Codes Appendix C
Inst. Execution Times Appendix C
Inst. Execution Times
C--15
Instruction Execution Times
DL350 User Manual, 2nd Edition
Math Instructions
Math Instructions (Accumulator) DL350
Instruc Legal Data Types Execute Not Exec
ADD V:Data Reg.
V:Bit Reg.
P:Indir. (Data)
P:Indir. (Bit)
93.3μs
129.8μs
1.2μs
1.1μs
ADDD V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
99.2μs
80.6μs
129.8μs
1.2μs
1.2μs
1.2μs
SUB V:Data Reg.
V:Bit Reg.
P:Indir. (Data)
P:Indir. (Bit)
92.1μs
121.9μs
1.1μs
1.1μs
SUBD V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
98.2μs
78.6μs
127.8μs
1.1μs
1.1μs
1.1μs
MUL V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
341.1μs
367.8
371.8μs
1.1μs
1.1μs
1.1μs
MULD V:Data Reg.
V:Bit Reg.
P:Indir. (Data)
P:Indir. (Bit)
1075.8μs
1106.5μs
1.1μs
1.1μs
DIV V:Data Reg.
V:Bit Reg.
K:Constant
P:Indir. (Data)
P:Indir. (Bit)
466.6μs
492.8μs
538.2μs
1.1μs
1.1μs
1.1μs
DIVD V:Data Reg.
V:Bit Reg.
P:Indir. (Data)
P:Indir. (Bit)
510.6μs
501.1μs
1.1μs
1.1μs
INCB V:Data Reg.
V:Bit Reg.
P:Indir. (Data)
P:Indir. (Bit)
15.2μs
45.9μs
1.1μs
1.1μs
DECB V:Data Reg.
V:Bit Reg.
P:Indir. (Data)
P:Indir. (Bit)
15.2μs
45.2μs
1.1μs
1.1μs
Appendix A
DL405 Error Codes
Appendix B
DL405 Error Codes
Appendix C
Inst. Execution Times
C--16 Instruction Execution Times
DL350 User Manual, 2nd Edition
Bit Instructions
Bit Instructions (Accumulator) DL350
Instruc Legal Data Types Execute Not Exec
SHFR V:Data Reg. (N bits)
V:Bit Reg. (N bits)
K:Constant (N bits)
9.8μs+ 0.2 x N
7.9μs+0.2 x N
1.2 μs
SHFL V:Data Reg. (N bits)
V:Bit Reg. (N bits)
K:Constant (N bits)
9.8μs+ 0.2 x N
7.9μs+ 0.2 x N
1.2 μs
ROTR V:Data Reg. (N bits)
V:Bit Reg. (N bits)
K:Constant (N bits)
15.7
12.3
1.2 μs
ROTL V:Data Reg. (N bits)
V:Bit Reg. (N bits)
K:Constant (N bits)
15.7μs
12.3μs
1.2 μs
ENCO None 40.3 μs1.0 μs
DECO None 6.5 μs1.0 μs
Number Conversion Instructions
Number Conversion Instructions
(Accumulator)
DL350
Instruc Legal Data Types Execute Not Exec
BIN None 128.4 μs1.0 μs
BCD None 122.0 μs1.0 μs
INV None 2.9 μs1.0 μs
BCDCPL None 74.5 μs1.0 μs
ATH None 29.2 μs1.0 μs
HTA None 29.2 μs1.0 μs
SEG None 12.6 μs1.0 μs
GRAY None 142.0 μs1.0 μs
SFLDGT None 26.6 μs1.0 μs
Appendix A
DL405 Error Codes Appendix B
DL405 Error Codes Appendix C
Inst. Execution Times Appendix C
Inst. Execution Times
C--17
Instruction Execution Times
DL350 User Manual, 2nd Edition
Table Instructions
Table Instructions DL350
Instruc Legal Data Types Execute Not Exec
MOV Move V:data reg. to V:data reg
.
Move V:bit reg. to V:data reg.
Move V:data reg to V:bit reg.
Move V:bit reg. to V:bit reg.
N= #of words
63μs+ 16xN 1.20 μs
MOVMC Move V:Data Reg. to E2
Move V:Bit Reg. to E2
Move from E2to V:Data Reg.
Move from E2to V:Bit Reg.
N= #of words
50μs+ 15xN 1.2 μs
LDLBL K7.4μs1.5 μs
CPU Control Instructions
CPU Control Instructions DL350
Instruct Legal Data Types Execute Not Exec
NOP None 0.6 μs0.6 μs
END None 14.7 μs14.7 μs
STOP None 4.1 μs1.0 μs
RSTWT None 5.4 μs1.0 μs
NOT None 1.0 μs1.0 μs
Program Control Instructions
Program Control Instructions DL350
Instruct Legal Data Types Execute Not Exec
GOTO K5.0 μs4.9 μs
LBL K0.6 μs0.6 μs
FOR V, K 110 μs7.9 μs
NEXT None 48.4 μs 0 μs
GTS K12.5 μs6.3 μs
SBR K0.5 μs 0 μs
RT None 11.4 μs11.4 μs
MLS K(1--7) 4.2 μs4.2 μs
MLR K(0--7) 4.0 μs4.0 μs
Appendix A
DL405 Error Codes
Appendix B
DL405 Error Codes
Appendix C
Inst. Execution Times
C--18 Instruction Execution Times
DL350 User Manual, 2nd Edition
Interrupt Instructions
Interrupt Instructions DL350
Instruc Legal Data Types Execute Not Exec
ENI None 45.8 μs1.1 μs
DISI None 5.7 μs1.1 μs
INT 0(0--7) 0μs 0 μs
IRT None 1.5 μs
IRTC None 0.5 μs0.5
Network Instructions
Network Instructions DL350
Instruc Legal Data Types Execute Not Exec
RX X, Y, C, T, CT, SP, S
V:Data Reg.
V:Bit Reg.
2024.1 μs1.4 μs
WX X, Y, C, T, CT, SP, S
V:Data Reg.
V:Bit Reg.
2024.1 μs1.4 μs
Message Instructions
Message Instructions DL350
Instruc Legal Data Types Execute Not Exec
FAULT V:Data Reg.
V:Bit Reg.
K:Constant
108.9 μs
108.9 μs
96.2 μs
1.4 μs
1.4 μs
1.4 μs
DLBL K0μs 0 μs
NCON K0μsμs
ACON K0μs 0 μs
PRINT 104.0 μs1.4 μs
RLLPLUS Instructions
RLLPLUS Instructions DL350
Instruc Legal Data Types Execute Not Exec
ISG S24.3 μs21.5 μs
SG S24.3 μs21.5 μs
JMP S24.4 μs4.3 μs
NJMP S24.4 μs4.6 μs
CV S13.9 μs13.9 μs
CVJMP S (N stages, 1 to 16) 12.6μs12.6 μs
BCALL C17.1 μs17.1 μs
BLK C22.1 μs22.6 μs
BEND None 8.7 μs 0 μs
Appendix A
DL405 Error Codes Appendix B
DL405 Error Codes Appendix C
Inst. Execution Times Appendix C
Inst. Execution Times
C--19
Instruction Execution Times
DL350 User Manual, 2nd Edition
Clock / Calendar Instructions
Clock / Calendar Instructions DL350
Instruction Legal Data Types Execute Not Exec
DATE V:Data Reg.
V:Bit Reg. 21.3 μs
21.3 μs1.9 μs
1.9 μs
TIME V:Data Reg.
V:Bit Reg. 13.2 μs
13.2 μs1.9 μs
1.9 μs
Drum Instructions
Drum Instructions DL350
Instruction Legal Data Types Execute Not Exe.
DRUM CT 340.0 μs62.6 μs
EDRUM CT 243.0 μs100.0 μs
MDRMD CT 206.0 μs142.00 μs
MDRMW CT 150.0 μs94.00 μs
1
1D
Special Relays
In This Appendix....
— DL350 CPU Special Relays
Appendix A
DL405 Error Codes
Appendix B
DL405 Error Codes
Appendix C
Special Relays
Appendix D
Special Relays
Appendix E
Special Relays
D--2 Special Relays
DL350 User Manual, 2nd Edition
DL350 CPU Special Relays
SP0 First scan on for the first scan after a power cycle or program to run transition
only. The relay is reset to off on the second scan. It is useful where a
function needs to be performed only on program startup.
SP1 Always ON provides a contact to insure an instruction is executed every scan.
SP2 Always OFF provides a contact that is always off.
SP3 1minuteclock on for 30 seconds and off for 30 seconds.
SP4 1 second clock on for 0.5 second and off for 0.5 second.
SP5 100 ms clock on for 50 ms. and off for 50 ms.
SP6 50 ms clock on for 25 ms. and off for 25 ms.
SP7 Alternate scan on every other scan.
SP11 Forced run mode on anytime the CPU switch is in the RUN position.
SP12 Terminal
run mode on when the CPU switch is in the TERM position and the CPU is in
the RUN mode.
SP13 Test run mode on when the CPU switch is in the TERM position and the CPU is in
the test RUN mode.
SP14 Test hold mode on when theCPU switch is in the TERM position and the CPU is in the
TEST HOLD mode
SP15 Test program
mode on when the CPU is in the TERM position and the CPU is in the TEST
PROGRAM MODE.
SP16 Terminal
program mode on when the CPU switch is in the TERM position and the CPU is in
the PROGRAM MODE.
SP17 Forced stop
mode relay on anytime the CPU mode switch is in the STOP position.
SP20 Forced
stop mode on when the STOP instruction is executed.
SP21 Break Relay 2 on when the BREAK instructions is executed. It is OFF when the CPU
mode is changed to RUN.
SP22 Interrupt enabled on when interrupts have been enabled using the ENI instruction.
SP25 CPU battery dis-
abled relay on when the CPU battery is disabled by special V--memory.
Startup and
Real-Time Relays
CPU Status Relays
Appendix A
DL405 Error Codes Appendix B
DL405 Error Codes Appendix C
Special Relays Appendix D
Special Relays Appendix E
Special Relays
D--3
Special Relays
DL350 User Manual, 2nd Edition
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.
SP43 Battery low on when the CPU battery voltage is low.
SP44 Reserved
SP45 Reserved
SP46 Communications
error on when a communications error has occurred on any of the CPU
ports.
SP47 I/O configuration
error on if an I/O configuration error has occurred. The CPU power-up I/O
configuration check must be enabled before this relay will be
functional.
SP50 Fault instruction on when a Fault Instruction is executed.
SP51 Watch Dog
timeout on if the CPU Watch Dog timer times out.
SP52 Grammatical
error on if a grammatical error has occurred either while the CPU is
running or if the syntax check is run. V7755 contains the exact error
code.
SP53 Solve logic error on if CPU cannot solve the logic.
SP54 Intelligent I/O
error on when communications with an intelligent module has occurred.
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.)
SP64 Half borrow on when the 16 bit subtraction instruction results in a borrow.
SP65 Borrow on when the 32 bit subtraction instruction results in a borrow.
SP66 Half carry on when the 16 bit addition instruction results in a carry.
SP67 Carry when the 32 bit addition instruction results in a carry.
SP70 Sign on anytime the value in the accumulator is negative.
SP71 Invalid octal
number on when an Invalid octal number was entered. This also occurs when
the V-memory specified by a pointer (P) is not valid.
SP72 Invalid Real
Number On when an invalid real number is in the accumulator
SP73 Overflow on if overflow occurs in the accumulator when a signed addition or
subtraction results in a incorrect sign bit.
SP74 Underflow On if real number underflow occurs in the accumulator
(numbers are too close to 0.0)
SP75 Data error on if a BCD number is expected and a non--BCD number is
encountered.
SP76 Load zero on when any instruction loads a value of zero into the accumulator.
System Monitoring
Relays
Accumulator
Status Relays
Appendix A
DL405 Error Codes
Appendix B
DL405 Error Codes
Appendix C
Special Relays
Appendix D
Special Relays
Appendix E
Special Relays
D--4 Special Relays
DL350 User Manual, 2nd Edition
SP116 DL350 CPU
communication on when port 2 is communicating with another device
SP117 Comm error port
2on when Port 2 has encountered a communication error.
SP120 Module busy
Slot 0 on when the communication module in slot 0 is busy transmitting or
receiving. You must use this relay with the RX or WX instructions to
prevent attempting to execute a RX or WX while the module is busy .
SP121 Com. error
Slot 0 on when the communication module in slot 0 of the local base has
encountered a communication error.
SP122 Module busy
Slot 1 on when the communication module in slot 1 of the local base is busy
transmitting or receiving. You must use this relay with the RX or WX
instructions to prevent attempting to execute a RX or WX while the
module is busy.
SP123 Com. error
Slot 1 on when the communication module in slot 1 of the local base has
encountered a communication error.
SP124 Module busy
Slot 2 on when the communication module in slot 2 of the local base is busy
transmitting or receiving. You must use this relay with the RX or WX
instructions to prevent attempting to execute a RX or WX while the
module is busy.
SP125 Com. error
Slot 2 on when the communication module in slot 2 of the local base has
encountered a communication error.
SP126 Module busy
Slot 3 on when the communication module in slot 3 of the local base is busy
transmitting or receiving. You must use this relay with the RX or WX
instructions to prevent attempting to execute a RX or WX while the
module is busy.
SP127 Com. error
Slot 3 on when the communication module in slot 3 of the local base has
encountered a communication error.
SP130 Module busy
Slot 4 on when the communication module in slot 4 of the local base is busy
transmitting or receiving. You must use this relay with the RX or WX
instructions to prevent attempting to execute a RX or WX while the
module is busy.
SP131 Com. error
Slot 4 on when the communication module in slot 4 of the local base has
encountered a communication error.
SP132 Module busy
Slot 5 on when the communication module in slot 5 of the local base is busy
transmitting or receiving. You must use this relay with the RX or WX
instructions to prevent attempting to execute a RX or WX while the
module is busy.
SP133 Com. error
Slot 5 on when the communication module in slot 5 of the local base has
encountered a communication error.
SP134 Module busy
Slot 6 on when the communication module in slot 6 of the local base is busy
transmitting or receiving. You must use this relay with the RX or WX
instructions to prevent attempting to execute a RX or WX while the
module is busy.
SP135 Com. error
Slot 6 on when the communication module in slot 6 of the local base has
encountered a communication error.
SP136 Module busy
Slot 7 on when the communication module in slot 7 of the local base is busy
transmitting or receiving. You must use this relay with the RX or WX
instructions to prevent attempting to execute a RX or WX while the
module is busy.
SP137 Com. error
Slot 7 on when the communication module in slot 7 of the local base has
encountered a communication error.
Communications
Monitoring Relays
1E
DL305
Product Weights
In This Appendix....
— Product Weight Table
Appendix C
DL405 Product Weights
Appendix D
DL405 Product Weights
Appendix E
Product Weights
E--2 DL305 Product Weights
DL350 User Manual, 2nd Edition
Product Weight Table
CPUs Weight
D3--330 6.3 oz. (178g)
D3--330P 6.3 oz. (178g)
D3--340 5.2 oz. (146g)
D3--350 4.9 oz. (140g)
Specialty
CPUs
F 3 -- O M U X -- 1 6.4 oz. (182g)
F 3 -- O M U X -- 2 6.4 oz. (182g)
F3--PMUX 3.7 oz. (104g)
F3--RTU 6.7 oz. (190g)
Bases
D 3 -- 0 5 B -- 1 37.0 oz. (1050g)
D3--05BDC--1 37.0 oz.(1050g)
D 3 -- 0 8 B -- 1 44.1 oz.(1250g)
D 3 -- 1 0 B -- 1 51.1 oz.(1450g)
D3--05B 34.0 oz. (964g)
D3--05BDC 34.0 oz.(964g)
D3--08B 44.2 oz.(1253g)
D3--10B 50.5 oz.(1432g)
DC Input
Modules
D3--08ND2 4.2 oz. (120g)
D3--16ND2--1 6.3 oz. (180g)
D3--16ND2--2 5.3 oz. (150g)
D3--16ND2F 6.3 oz. (180g)
F3--16ND3F 5.4 oz. (153g)
AC Input
Modules
D3--08NA--1 5 oz. (140g)
D3--08NA--2 5 oz. (140g)
D3--16NA 6.4 oz. (180g)
AC/DC Input
Modules
D3--08NE3 4.2 oz. (120g)
D3--16NE3 6 oz. (170g)
DC Output
Modules
Weight
D3--08TD1 4.2 oz. (120g)
D3--08TD2 4.2 oz. (120g)
D3--16TD1--1 5.6 oz. (160g)
D3--16TD1--2 5.6 oz. (160g)
D3--16TD2 7.1 oz. (210g)
AC Output
Modules
D3--04TAS 6.4 oz. (180g)
F3--08TAS 6.3 oz. (178g)
F 3 -- 0 8 TA S -- 1 6.3 oz. (178g)
D3--08TA--1 7.4 oz. (210g)
D3--08TA--2 6.4 oz. (180g)
F3--16TA--2 7.7 oz. (218g)
D3--16TA--2 7.2 oz. (210g)
Relay Output
Modules
D3--08TR 7 oz. (200g)
F 3 -- 0 8 T R S -- 1 8.9 oz. (252g)
F 3 -- 0 8 T R S -- 2 9 oz. (255g)
D3--16TR 8.5 oz. (248g)
Analog Modules
D3--04AD 7 oz. (200g)
F3--04ADS 6.9 oz. (195g)
F3--08AD 5.5 oz. (154g)
F3--08TEMP 5.2 oz. (147g)
F 3 -- 0 8 T H M -- n 6 oz. (170g)
F3--16AD 5.4 oz. (152g)
D3--02DA 7 oz. (200g)
F3--04DA--1 6.3 oz. (180g)
F3--04DA--2 6.3 oz. (180g)
F3--04DAS 7 oz. (200g)
Communications
and Networking
Weight
D3--232--DCU 15.0 oz. (427g)
D3--422--DCU 14.8 oz. (419g)
ASCII BASIC
Modules
F 3 -- A B 1 2 8 -- R 5.1 oz. (146g)
F 3 -- A B 1 2 8 -- T 6.2 oz. (175g)
F3--AB128 5.4 oz. (154g)
Specialty
Modules
D3--08SIM 3.0 oz. (85g)
D3--HSC 5.2 oz. (147g)
D3--PWU 13.0 oz. (368g)
D3--FILL 1oz. (30g)
Programming
D3--HP 7.1 oz. (202g)
D3--HPP 7.2 oz. (204g)
D2--HPP 7.7 oz. (220g)
1F
I/O Addressing
Conventional Method
In This Appendix....
— Understanding Conventional I/O Numbering
— Conventional Base Specifications
— Local and Expansion I/O Systems
— Setting the Base Switches
— Example I/O Configurations
Appendix C
DL405 Product Weights
Appendix D
DL405 Product Weights
Appendix F
Bases and I/O (alt) Appendix F
Bases and I/O
F--2 Bases and I/O Configuration
(Conventional Method)
DL350 User Manual, 2nd Edition
Understanding Conventional I/O Numbering
This Appendix covers the information needed when installing a DL350 CPU in an
conventional base or when the DL350 is in a new base in a mixed system. Since the
DL350 can be used in either scenario, both 16 bit and 8 bit addressing needs to be
addressed. Chapter 4 provides the information on the xxxx--1 bases and the 16 bit
addressing scheme. The DL350 CPU will revert to the DL340 CPUI/O scheme when
it is configured for either of these scenarios.
The conventional DL305 product family has had several enhancements over the
years. Each time the product family has grown or has been enhanced, compatibility
with the earlier products has been of the utmost concern. Some of these
enhancements such as increasing the I/O count and supporting 16 point modules
have impacted the numbering system. To help you understand the numbering
scheme, the following account of how the numbering system has been affected is
provided.
SWhen the 16 point I/O modules were introduced to the standard line of 8
point modules, the I/O numbering system was not modified to count in
16 consecutive units. This was done to maintain compatibility with the 8
point systems. This means each 16 point module uses two groups of
eight consecutive numbers such as 000 through 007 and 100 through
107.
SWhen the I/O count was increased from the original 112 maximum to
176 maximum (DL330/DL330P CPU) to 184 maximum (DL340/DL350
CPU), most of the new I/O addresses were not set up to be consecutive
with the the original 112 I/O. This means you will see a large jump in the
I/O number ranges.
The conventional DL305 I/O points are numbered in octal (base 8.) The octal
numbering system does not include the numbers 8 and 9. The following table lists
the first few octal numbers with the equivalent decimal numbers so you can see the
numbering pattern.
Octal
Numbers
0123456710 11 12 13 14 15 16 17 20 21 22 23 24 ...
Decimal
Numbers
012345678 9 10 11 12 13 14 15 16 17 18 19 20 ...
The DL305 base I/O numbering is fixed, you cannot choose the I/O address of
specific points since the system allocates the addresses for each slot. The I/O
number ranges are 0--177 and 700--767. The I/O numbering for each slot in the base
depends on two things:
1. The base configuration, which is determined by the size of the base and
whether you are using an expansion base.
2. The number of I/O points per module and the location of the I/O modules in
the base.
DL305 I/O
Configuration
History
Octal Numbering
System
Fixed
I/O Numbering
Appendix F
Bases and I/O Appendix C
DL405 Product Weights Appendix D
DL405 Product Weights Appendix E
DL405 Product Weights
F--3
Bases and I/O Configuration
(Conventional Method)
DL350 User Manual, 2nd Edition
I/O numbering begins with address “000” which is the slot adjacent to the CPU. Each
module uses increments of eight I/O points. For 8 point modules the I/O addresses
are made up of eight contiguous points for each module. For 16 point modules the
I/O addresses are made up of two groups of eight contiguous points, the first group
follows the same scheme as the 8 point module and the second group adds 100 to
the values of the first group.
The examples below show the I/O numbering for a 5 slot local CPU base with 8 point
I/Oanda5slotlocalCPUbasewith16pointI/O.
C
P
U
000
to
007
010
to
017
020
to
027
030
to
037 DL305
5 Slot Base Using 8 Point I
/
O Modules
C
P
U
000
to
007
010
to
017
020
to
027
030
to
037
100
to
107
110
to
117
120
to
127
130
to
137
DL305
5 Slot Base Using 16 Point I
/
O Modules
Slot Number: 3 2 1 0
Slot Number: 3 2 1 0
DC Input Modules DC Output Modules Relay Output Modules Analog Modules (cont.)
D3--08ND2 8D3--08TD1 8D3--08TR 8F3--04DA--1 16
D3--16ND2--1 16 D3--08TD2 8F 3 -- 0 8 T R S -- 1 8F3--04DA--2 16
D3--16ND2--2 16 D3--16TD1--1 16 F 3 -- 0 8 T R S -- 2 8F3--04DAS 16
D3--16ND2F 16 D3--16TD1--2 16 D3--16TR 16 ASCII BASIC Modules
F3--16ND3 16 D3--16TD2 16 Analog Modules F 3 -- A B 1 2 8 -- R 16
AC Input Modules AC Output Modules D3--04AD 16 F 3 -- A B 1 2 8 -- T 16
D3--08NA--1 8D3--04TAS 8* F3--04ADS 16 F3--AB128 16
D3--08NA--2 8F3--08TAS 8F3--08AD 16 F3--AB64 16
D3--16NA 16 D3--08TA--1 8F3--08TEMP 16 Specialty Modules
AC/DC Input Modules D3--08TA--2 8F 3 -- 0 8 T H M -- n 16 D3--08SIM 8
D3--08NE3 8F3--16TA--2 16 F3--16AD 16 D3--HSC 16
D3--16NE3 16 D3--16TA--2 16 D3--02DA 16
* This is a 4-point module, but each slot is assigned a minimum of 8 I/O points.
I/O Numbering
Guidelines
Number of I/O
Points Required fo
r
Each Module
Appendix C
DL405 Product Weights
Appendix D
DL405 Product Weights
Appendix F
Bases and I/O (alt) Appendix F
Bases and I/O
F--4 Bases and I/O Configuration
(Conventional Method)
DL350 User Manual, 2nd Edition
There are some limitations that determine where you can place certain types of
modules. Some modules require certain locations and may limit the number or
placement of other modules. We have tried to give clearly written explanations of the
rules governing module placement, but we realize a picture can sometimes be worth
a thousand words. If you have difficulty with some of our explanations, please look
ahead to the illustrations in this chapter. They should clear up any gray areas in the
explanation and you will probably find the configuration you intend to use in your
installation.
In all of the configurations mentioned the number of slots from the CPU that are to be
used can roll over into an expansion base if necessary. For example if a rule states a
module must reside in one of the six slots adjacent to the CPU, and the system
configuration is comprised of two 5 slot bases, slots 1 and 2 of the expansion base
are valid locations.
The following table provides the general placement rules for the DL305
components.
Module Restriction
CPU The CPU must reside in the first slot of the local CPU
base. The first slot is the closest slot to the power supply.
16 Point I/O
Modules There can be a maximum of eight 16 point modules
installed in a system depending on the CPU type and I/O
modules used. The 16 point modules must be in the first 8
slots adjacent to the CPU rolling over into an expansion
base if necessary. If any of the eight slots adjacent to the
CPU are not used for 16 point modules, they can be used
for 8 point modules.
Analog Modules Analog modules must reside in any valid 16 point I/O slot.
ASCII Basic
Modules ASCII Basic modules must reside in any valid 16 point I/O
slot.
High Speed
Counter High Speed Counters may be used in one of the first 4
slots in the local CPU base.
I/O Module
Placement Rules
Appendix F
Bases and I/O Appendix C
DL405 Product Weights Appendix D
DL405 Product Weights Appendix E
DL405 Product Weights
F--5
Bases and I/O Configuration
(Conventional Method)
DL350 User Manual, 2nd Edition
Conventional Base Specifications
The table below provides the specifications for the conventional DL305 bases. The
xxxx--1 bases are covered in Chapter 2, Installation, Wiring, and Specifications.
D3--05B D3--05BDC D3--08B D3--10B
Number of Slots 55810
Local CPU Base Yes Yes Yes Yes
Expansion Base Yes Yes No Yes
Input Voltage Range 97--132 VAC
194--264 VAC
47--63Hz
20.5--30 VDC <10%
ripple 97--132 VAC
194--264 VAC
47--63Hz
97--132 VAC
194--264 VAC
47--63Hz
Base Power
Consumption
70 VA max (46W) 48 Watts 70 VA max (57W) 70 VA max (57W)
Inrush Current max. 30A 30A 30A 30A
Dielectric Strength 1500VAC for 1 minute
between terminals of
AC P/S, Run output,
Common, 24VDC
1500VAC for 1 minute
between 24VDC input
terminals and Run
output
1500VAC for 1 minute
between terminals of
AC P/S, Run output,
Common, 24VDC
2000VAC for 1 minute
between terminals of
AC P/S, Run output,
Common, 24VDC
Insulation Resistance >10MΩat 500VDC >10MΩat 500VDC >10MΩat 500VDC >10MΩat 500VDC
Power Supply Output
(Voltage Ranges and
Ripple)
(5VDC) 4.75--5.25V
less than 0.1V p--p
(9VDC) 8.5--13.5V
less than 0.2V p--p
(24VDC) 20--28V
less than 1.2V p--p
(5VDC) 4.75--5.25V
less than 0.1V p--p
(9VDC) 8.5--13.5V
less than 0.2V p--p
(24VDC) 20--28V
less than 1.2V p--p
(5VDC) 4.75--5.25V
less than 0.1V p--p
(9VDC) 8.0--12.0V
less than 0.2V p--p
(24VDC) 20--28V
less than 1.2V p--p
(5VDC) 4.75--5.25V
less than 0.1V p--p
(9VDC) 8.0--12.0V
less than 0.2V p--p
(24VDC) 20--28V
less than 1.2V p--p
5 VDC current
available
1.4A * 1.4A 1.4A @ 122°F(50°C)
1.0A @ 140°F(60°C) 1.4A @ 122°F(50°C)
1.0A @ 140°F(60°C)
9 VDC current
available
0.8A * 0.8A 1.7A @ 122°F(50°C)
1.4A @ 140°F(60°C) 1.7A @ 122°F(50°C)
1.4A @ 140°F(60°C)
24 VDC current
available
0.5A * 0.5A 0.6A 0.6A
Auxiliary 24 VDC
Output
100mA max None 100mA max 100mA max
Run Relay 250 VAC,
4A (resistive load) 250 VAC,
4A (resistive load) 250 VAC,
4A (resistive load) 250 VAC,
4A (resistive load)
Fuses 2A (250V)
User replaceable
4A (250V)
User replaceable
2A (250V)
User replaceable
2A (250V)
User replaceable
Dimensions
WxHxD
11.42x4.85x4.41 in.
(290x123x112 mm) 11.42x4.85x4.41 in
(290x123x112 mm) 15.55x4.85x4.41 in
(395x123x112 mm) 18.3x4.85x4.41 in.
(465x123x112 mm)
Weight 34 oz. (964g) 34 oz. (964g) 44.2 oz. (1253g) 50.5 oz. (1432g)
* The total current for the D3--05B must not exceed 2.3A.
There is 24 VDC available from the 24 VDC output terminals on all bases except the
5 slot DC version (D3--05BDC). The 24 VDC supply can be used to power external
devices or DL305 modules that require external 24 VDC. The power used from the
this 24 VDC output reduces the internal system 24 VDC available to the modules by
an equal amount.
Auxiliary 24VDC
Output at Base
Terminal
Appendix C
DL405 Product Weights
Appendix D
DL405 Product Weights
Appendix F
Bases and I/O (alt) Appendix F
Bases and I/O
F--6 Bases and I/O Configuration
(Conventional Method)
DL350 User Manual, 2nd Edition
The following diagram shows the details of how the DL305 base provides many of
the specifications listed on the previous page.
+24V
0V
+9V
+5V
24V/9V
Voltage
Abnormality
Detection
CPU
Normal
RUN
Inside
of CPU
0V
+
--
+
+
Switching
Power
Source
Circuit
2A
115VAC
230VAC
RUN
Output
24VDC Output
Coil
G
+
--
+24V
0V
+9V
+5V
24V/9V
Voltage
Abnormality
Detection
CPU
Normal
RUN
Inside
of CPU
0V
Switching
Power
Source
Circuit
4A
24VDC
RUN
Output
Coil
G
+
--
--
Schematic for D3--05B, D3--08B, D3--10B
Schematic for D3--05BDC
+
--
+
+--
L
N
Power Supply
Schematics
Appendix F
Bases and I/O Appendix C
DL405 Product Weights Appendix D
DL405 Product Weights Appendix E
DL405 Product Weights
F--7
Bases and I/O Configuration
(Conventional Method)
DL350 User Manual, 2nd Edition
The RUN relay output, located on the DL305 base power supply, can be used to
detect an undesired failure on the local CPU base or an expansion base. The
following table shows the operating characteristics of the RUN relay for a local CPU
base or an expansion base.
Event Local CPU Base
RUN Relay Would:
Expansion Base
RUN Relay Would:
PROGRAM to RUN mode
Transition Energize Not change
The CPU detects a fatal error De--energize Not change
CPU Local Base is Removed
Form the RUN Mode De--energize Not change
Power Source to the Power
Supply is Turned OFF De--energize De--energize
9 VDC or 24 VDC Failure on the
Power Supply De--energize De--energize
The following example demonstrates possible uses for the RUN relay on the DL305
bases.
Relay
Power
Supply
Relay
Field
Power
Supply
Critical
Field
Device
Panel
Lamp
Power
PLC
OK
Lamp
Use of the RUN relay to
shutdown critical field
devices upon error detection
Use of the RUN relay to
monitor system operation
Using the Run
Relay on the Base
Power Supply
Appendix C
DL405 Product Weights
Appendix D
DL405 Product Weights
Appendix F
Bases and I/O (alt) Appendix F
Bases and I/O
F--8 Bases and I/O Configuration
(Conventional Method)
DL350 User Manual, 2nd Edition
Local or Expansion I/O Systems
It is helpful to understand how you can use the various DL305 bases in your control
system. The following table shows how the bases can be used.
Base Part # Number of Slots CanBeUsedAs
A Local CPU
Base
CanBeUsedAs
An Expansion
Base
D3--05B 5Yes Yes
D3--05BDC 5Yes Yes
D3--08B 8Yes No
D3--10B 10 Yes Yes
The configurations below show the valid combinations of local CPU bases and
expansion bases.
NOTE: You should use one of the configurations listed below when designing an
expansion system. If you use a configuration not listed below the system will not
function properly.
5 slot local CPU base
with a maximum of two
5 slot expansion bases
8 slot local CPU base with
a 5 slot expansion base
10 slot local CPU base with
a 5 slot expansion base
10 slot local CPU base
with a
10 slot expansion base
1.5 ft (0.5m)
1.5 ft (0.5m)1.5 ft (0.5m)
1.5 ft (0.5m)
1.5 ft (0.5m)
Base Uses Table
Local/Expansion
Connectivity
Appendix F
Bases and I/O Appendix C
DL405 Product Weights Appendix D
DL405 Product Weights Appendix E
DL405 Product Weights
F--9
Bases and I/O Configuration
(Conventional Method)
DL350 User Manual, 2nd Edition
The local CPU base is connected to the expansion base using a 1.5 ft. cable
(D3--EXCBL). The base must be connected as shown in the diagram below.
The top expansion connector on the base is the input from a previous base. The
bottom expansion connector on the base is the output to an expansion base. The
expansion cable is marked with “CPU Side” and “Expansion Side”. The“ CPU Side”
of the cable is connected to the bottom port of the base and the “Expansion Side” of
the cable is connected to the top port of the next base.
C
P
U
000
to
007
010
to
017
020
to
027
030
to
037
040
to
047
050
to
057
060
to
067
070
to
077
100
to
107 DL305
DL305
Expansion
Cable
CPU Side
Expansion Side
1.5 ft (0.5 m)
110
to
117
120
to
127
130
to
137
140
to
147
150
to
157 DL305
CPU Side
Expansion Side
1.5 ft (0.5 m)
Note: Avoid placing the expansion cable in the same wiring
tray as the I/O and power source wiring.
Connecting
Expansion Bases
Appendix C
DL405 Product Weights
Appendix D
DL405 Product Weights
Appendix F
Bases and I/O (alt) Appendix F
Bases and I/O
F--10 Bases and I/O Configuration
(Conventional Method)
DL350 User Manual, 2nd Edition
Setting the Base Switches
The conventional 5 slot and 10 slot bases have jumper switches that need to be set
depending on which system configuration is used. The 8 slot base does not have any
switches. All of the xxxxx--1 bases have a jumper switch and the 10 slot has two.
The conventional 5 slot bases have a two position toggle switch which is used to set
the base as the CPU local base, the first expansion base, or the second (last)
expansion base. The xxxxx--1 bases have a jumper switch between slots 3 and 4.
The switch is set to the “1,3” position if the base is the local CPU base or the third
base in the system. The switch is set to the “2” position if the base is the 2nd base in
the system. If the 5 slot base is used as an expansion base for a 10 slot local CPU
base the switch is set in the “1,3” position.
BASE
1,3 2
conventional
Bases
xxxxx--1 Bases
The 10 slot base has a jumper switch between slot 3 and 4 used to set the base to
local CPU base or expansion base. There is also a jumper switch between slot 9 and
10 (4 and 5 on the xxxxx--1 bases) that sets slot 10 to the 100--107 I/O address range
or to the 700--707 I/O address range.
conventional
Bases xxxxx--1 Bases
5 Slot Bases
10 Slot Base
Appendix F
Bases and I/O Appendix C
DL405 Product Weights Appendix D
DL405 Product Weights Appendix E
DL405 Product Weights
F--11
Bases and I/O Configuration
(Conventional Method)
DL350 User Manual, 2nd Edition
Example I/O Configurations
The following system configurations will allow you to quickly configure your system
by using examples. These system configurations show the I/O numbering and the
base switch settings for every valid base configuration for a DL305 system.
When a 16 point I/O module is used the last 8 I/O addresses of each 16 point module
could have been used in another base slot. In the illustration below Example A
shows a 16 point module in the slot next to the CPU using address 000--007 and
100--107. The expansion I/O cannot use the last slot of the expansion base since it is
assigned addresses 100--107 and the 16 point module next to the CPU has already
used these addresses. Example B shows an 8 point module in the slot next to the
CPU and an 8 point module in the last slot of the expansion base. Both examples are
valid configurations .
C
P
U
000
to
007
010
to
017
020
to
027
030
to
037
040
to
047
050
to
057
060
to
067
070
to
077 DL305
DL305
100
to
107
110
to
117
120
to
127
130
to
137
140
to
147
150
to
157
160
to
167
170
to
177
C
P
U
000
to
007
010
to
017
020
to
027
030
to
037
040
to
047
050
to
057
060
to
067
070
to
077 DL305
DL305
100
to
107
110
to
117
120
to
127
130
to
137
140
to
147
150
to
157
160
to
167
170
to
177
Example B
Example A
Local CPU Base
Expansion Base
Local CPU Base
Expansion Base
BASE
1,3 2
BASE
BASE
1,3 2
BASE
BASE
1,3 2
BASE
BASE
1,3 2
BASE
or
or
or
or
For the following examples the configurations using 16 point I/O modules are shown
with the maximum I/O points supported so you can always reduce the I/O count in
one of our examples and the configuration will still be valid. Substitution of 8 point I/O
modules can be made in place of any of the 16 point modules without affecting the
I/O numbering for any of the other I/O modules. When a 16 point module is replaced
with a 8 point I/O module the last 8 I/O addresses of that 16 point module may or may
not be useable in another slot location, depending on the system configuration used
16 Point I/O
Allocation Example
Examples Show
Maximum I/O
Points Available
Appendix C
DL405 Product Weights
Appendix D
DL405 Product Weights
Appendix F
Bases and I/O (alt) Appendix F
Bases and I/O
F--12 Bases and I/O Configuration
(Conventional Method)
DL350 User Manual, 2nd Edition
I/O Configurations with a 5 Slot Local CPU Base
The configurations below and on the next few pages show a 5 slot base with 8 point
I/O modules, 16 point modules, one expansion base and two expansion bases.
The 5 slot base has a toggle switch or jumper on the inside of the base which allows
youtoselect:
Type of Base Switch Position
convent. bases Jumper Position
xxxxx--1 bases
Local CPU Base 1,3 right pins bridged
First Expansion Base 2* left pins bridged
Last Expansion Base 1,3 right pins bridged
*usedonlywitha5slotlocalCPUbase
C
P
U
000
to
007
010
to
017
020
to
027
030
to
037 DL305
Total I/O: 32
BASE
1,3 2
BASE
or
C
P
U
000
to
007
010
to
017
020
to
027
030
to
037
100
to
107
110
to
117
120
to
127
130
to
137
DL305
Total I/O: 64
BASE
1,3 2
BASE
or
Switch settings
5 Slot Base
with 8 Point I/O
5 Slot Base
with 16 Point I/O
Appendix F
Bases and I/O Appendix C
DL405 Product Weights Appendix D
DL405 Product Weights Appendix E
DL405 Product Weights
F--13
Bases and I/O Configuration
(Conventional Method)
DL350 User Manual, 2nd Edition
C
P
U
000
to
007
010
to
017
020
to
027
030
to
037
040
to
047
050
to
057
060
to
067
070
to
077
100
to
107 DL305
DL305
Total I/O: 72
BASE
1,3 2
BASE
BASE
1,3 2
BASE
or
or
C
P
U
000
to
007
010
to
017
020
to
027
030
to
037
040
to
047
050
to
057
060
to
067
070
to
077 DL305
DL305
100
to
107
110
to
117
120
to
127
130
to
137
140
to
147
150
to
157
160
to
167
170
to
177
Total I/O: 128
BASE
1,3 2
BASE
BASE
1,3 2
BASE
DL340 and DL350
or
or
NOTE: If a 16pt module is used in the last two available slots of the expansion base,
160 through 177 will not be available for control relay assignments. Also, even
though you are using these points as I/O, you still enter them as C160--C177 in
DirectSOFT.
5 Slot Base and
5 Slot Expansion
Base with 8 Point
I/O
5 Slot Base and 5
Slot Expansion
Base with 16 Point
I/O
Appendix C
DL405 Product Weights
Appendix D
DL405 Product Weights
Appendix F
Bases and I/O (alt) Appendix F
Bases and I/O
F--14 Bases and I/O Configuration
(Conventional Method)
DL350 User Manual, 2nd Edition
C
P
U
000
to
007
010
to
017
020
to
027
030
to
037
040
to
047
050
to
057
060
to
067
070
to
077
140
to
147
110
to
117
120
to
127
130
to
137
150
to
157
100
to
107
DL305
DL305
DL305
Total I/O: 112
BASE
1,3 2
BASE
BASE
1,3 2
BASE
BASE
1,3 2
BASE
or
or
or
C
P
U
000
to
007
010
to
017
020
to
027
030
to
037
040
to
047
050
to
057
060
to
067
070
to
077
110
to
117
120
to
127
100
to
107
DL305
DL305
DL305
130
to
137
140
to
147
150
to
157
Total I
/
O: 128
160
to
167
170
to
177
BASE
1,3 2
BASE
BASE
1,3 2
BASE
BASE
1,3 2
BASE
DL340 DL350
or
or
or
NOTE: If a 16pt module is used in the last two available slots of the expansion base,
160 through 177 will not be available for control relay assignments. Also, even
though you are using these points as I/O, you still enter them as C160--C177 in
DirectSOFT.
5 Slot Base and
Two5Slot
Expansion Bases
with 8 Point I/O
5 Slot Base and
Two5Slot
Expansion Bases
with 16 and 8 Point
I/O
Appendix F
Bases and I/O Appendix C
DL405 Product Weights Appendix D
DL405 Product Weights Appendix E
DL405 Product Weights
F--15
Bases and I/O Configuration
(Conventional Method)
DL350 User Manual, 2nd Edition
I/O Configurations with an 8 Slot Local CPU Base
The configurations below show an 8 slot base with 8 point I/O modules, 16 point
modules, one 5 slot expansion base and two 5 slot expansion bases. Postion of the
jumper for xxxx--1 bases is shown to the right of the base.
C
P
U
000
to
007
010
to
017
020
to
027
030
to
037
040
to
047
050
to
057
060
to
067 DL305
Total I/O: 56
C
P
U
000
to
007
010
to
017
020
to
027
030
to
037
040
to
047
050
to
057
060
to
067
100
to
107
110
to
117
120
to
127
130
to
137
140
to
147
150
to
157
160
to
167
DL305
Total I/O: 112
*See note below
regarding points
160--167
0123456
C
P
U
000
to
007
010
to
017
020
to
027
030
to
037
040
to
047
050
to
057
060
to
067
710
to
717
720
to
727
730
to
737
740
to
747
700
to
707 DL305
DL305
Total I/O: 96
BASE
1,3 2
BASE
C
P
U
000
to
007
010
to
017
020
to
027
030
to
037
040
to
047
050
to
057
060
to
067
100
to
107
110
to
117
120
to
127
130
to
137
140
to
147
150
to
157
160
to
167
710
to
717
720
to
727
730
to
737
740
to
747
700
to
707 DL305
DL305
Total I/O: 152
BASE
1,3 2
BASE
*See note below
regarding points
160--167
0123456
NOTE: If a 16pt module is used in the last two available slots of the expansion base,
160 through 177 will not be available for control relay assignments. Also, even
though you are using these points as I/O, you still enter them as C160--C177 in
DirectSOFT.
8 Slot Base
with 8 Point I/O
8 Slot Base
with 16 Point I/O
8 Slot Base and
5 Slot Expansion
Base with
8 Point I/O
8 Slot Base and
5 Slot Expansion
Base with
16 Point I/O
Appendix C
DL405 Product Weights
Appendix D
DL405 Product Weights
Appendix F
Bases and I/O (alt) Appendix F
Bases and I/O
F--16 Bases and I/O Configuration
(Conventional Method)
DL350 User Manual, 2nd Edition
I/O Configurations with a 10 Slot Local CPU Base
The configurations below and on the next few pages show a 10 slot base with 8 point
I/O modules, with 16 point modules, with a 5 slot expansion base and with a 10 slot
expansion base.
The 10 slot base has two jumper switches to select the base type and the address
ranges to use. These switches can be found on the base between slots 3 and 4
(SW1) and slots 9 and 10 (SW2). Jumper switch SW1 is used to select if the base is a
local CPU base or an expansion base. Jumper switch SW2 determines the I/O
address range (100 -- 107 or 700 -- 707) for the 10th slot on the local CPU base. By
selecting the address range of 700 to 707 for slot 10, it is possible to use a 16 point
module next to the CPU (which uses the ranges of 000 to 007 and 100 to 107),
however; the position of this switch will affect the I/Onumbering for the expansion I/O
if used.
NOTE: Jumper switch SW2 must be set to “100 EXP” on the expansion base.
000
to
007
010
to
017
020
to
027
030
to
037
040
to
047
050
to
057
060
to
067
070
to
077
100
to
107 C
P
U
DL305
700 100
EXP EXP CPU
Total I/O: 72
Jumper
SW2 Jumper
SW1
000
to
007
010
to
017
020
to
027
030
to
037
040
to
047
050
to
057
060
to
067
070
to
077
700
to
707 C
P
U
DL305
Total I/O: 72
700 100
EXP EXP CPU
Jumper
SW2 Jumper
SW1
Switch settings
Last Slot Address
Range 100 to 107
Last Slot Address
Range 700 to 707
Appendix F
Bases and I/O Appendix C
DL405 Product Weights Appendix D
DL405 Product Weights Appendix E
DL405 Product Weights
F--17
Bases and I/O Configuration
(Conventional Method)
DL350 User Manual, 2nd Edition
The next two configurations show a local CPU base using 16 point I/O modules and
the two possibilities for how to configure the base to use the maximum number of I/O
points.
Configuration 1 shows an 8 point I/O module the slot next to the CPU and the
address range of 100--107 for the last slot. When jumper switch SW2 is set to the
“100 EXP” position, the address range for the last slot is set to 100--107, thereby
limiting the address range for the first module to 000--007. This means if you use this
configuration, the first module must be an 8 point I/O module. You will have more
available addresses for an expansion base as you will see in the example using a 10
slot expansion base.
000
to
007
010
to
017
110
to
117
020
to
027
120
to
127
030
to
037
130
to
137
040
to
047
140
to
147
050
to
057
150
to
157
060
to
067
160
to
167
070
to
077
170
to
177
100
to
107 C
P
U
DL305
Total I/O:128 Configuration 1
700 100
EXP EXP CPU
Jumper
SW2 Jumper
SW1
DL340 and DL350
*See note below regarding
points 160--167 and
170--177. 012345678
Configuration 2 shows a 16 point I/O module in the slot next to the CPU and the
address range of 700--707 for the last slot. This is the maximum I/O configuration for
a 10 slot local CPU base. When jumper switch SW2 is set to the “700” position the
address range for the last slot is set to 700--707 making addresses 000--007 and
100--107 available for use in the first slot. The position of jumper switch SW2 canlimit
the amount of I/O addresses available to the larger expansion bases since
expansion I/O numbering would normally start with address 700.
000
to
007
100
to
107
010
to
017
110
to
117
020
to
027
120
to
127
030
to
037
130
to
137
040
to
047
140
to
147
050
to
057
150
to
157
060
to
067
160
to
167
070
to
077
700
to
707 C
P
U
DL305
170
to
177
Total I/O: 136 Configuration 2
700 100
EXP EXP CPU
Jumper
SW2 Jumper
SW1
DL340 and DL350
*See note below regarding
points 160--167 and
170--177.
012345678
NOTE: If a 16pt module is used in Slot 6 for the DL330 or DL330P CPU, 160 through
167 will not be available for control relay assignments. If a 16pt module is used inSlot
6 and/or Slot 7 for a DL340 or DL350 CPU, 160--167 and/or 170--177 are not
available for control relay assignments. Also, even though you are using these
points as I/O, you still enter them as C160--C167/C170--C177 in DirectSOFT.
10 Slot Expansion
Base with
16 Point I/O
Configuration 1
Configuration 2
Appendix C
DL405 Product Weights
Appendix D
DL405 Product Weights
Appendix F
Bases and I/O (alt) Appendix F
Bases and I/O
F--18 Bases and I/O Configuration
(Conventional Method)
DL350 User Manual, 2nd Edition
000
to
007
100
to
107
010
to
017
110
to
117
020
to
027
120
to
127
030
to
037
130
to
137
040
to
047
140
to
147
050
to
057
150
to
157
060
to
067
160
to
167
070
to
077
700
to
707 C
P
U
DL305
720
to
727
730
to
737
740
to
747
750
to
757
710
to
717 DL305
Total I/O: 176
700 100
EXP EXP CPU
Jumper
SW2 Jumper
SW1
BASE
1,3 2
BASE
170
to
177
DL340 and DL350
012345678
NOTE: If a 16pt module is used in Slot 6 for the DL330 or DL330P CPU, 160 through
167 will not be available for control relay assignments. If a 16pt module is used inSlot
6 and/or Slot 7 for a DL340 or DL350 CPU, 160--167 and/or 170--177 are not
available for control relay assignments. Also, even though you are using these
points as I/O, you still enter them as C160--C167/C170--C177 in DirectSOFT.
10 Slot Base and
5 Slot Expansion
Base with
16 Point I/O
Appendix F
Bases and I/O Appendix C
DL405 Product Weights Appendix D
DL405 Product Weights Appendix E
DL405 Product Weights
F--19
Bases and I/O Configuration
(Conventional Method)
DL350 User Manual, 2nd Edition
I/O addresses change depending on the point configuration in the local CPU base.
Notice, when the local CPU base contains only 8 point I/O modules, addresses
110--117, 120--127 and 130--137 are available for use in the expansion base. When
the local CPU base has 16 point I/O modules, which use the I/O addresses 110--117,
120--127 and 130--137, these addresses are taken up and are not available for use
in the expansion base.
000
to
007
010
to
017
020
to
027
030
to
037
040
to
047
050
to
057
060
to
067
070
to
077
100
to
107 C
P
U
120
to
127
130
to
137
700
to
707
710
to
717
720
to
727
730
to
737
740
to
747
750
to
757
760
to
767
110
to
117
DL305
DL305
Total I
/
O: 152
700 100
EXP EXP CPU
Jumper
SW2 Jumper
SW1
700 100
EXP EXP CPU
SW2 SW1
000
to
007
010
to
017
020
to
027
030
to
037
040
to
047
050
to
057
060
to
067
070
to
077 C
P
U
700
to
707
710
to
717
720
to
727
730
to
737
740
to
747
750
to
757
760
to
767
100
to
107
110
to
117
120
to
127
130
to
137
140
to
147
150
to
157
160
to
167
DL305
DL305
Total I/O: 184
700 100
EXP EXP CPU
Jumper
SW2 Jumper
SW1
700 100
EXP EXP CPU
SW2 SW1
170
to
177
DL340 or DL350
012345678
NOTE: If a 16pt module is used in Slot 6 for the DL330 or DL330P CPU, 160 through
167 will not be available for control relay assignments. If a 16pt module is used inSlot
6 and/or Slot 7 for a DL340 or DL350 CPU, 160--167 and/or 170--177 are not
available for control relay assignments. Also, even though you are using these
points as I/O, you still enter them as C160--C167/C170--C177 in DirectSOFT.
Expansion
Addresses Depend
on Local CPU Base
Configuration.
10 Slot Base and
10 Slot Expansion
Base with
8 Point I/O
10 Slot Base and
10 Slot Expansion
Base with
16 Point I/O
1
1G
PLC Memory
InThisAppendix....
— DL350 PLC Memory
Appendix G
PLC Memeory
G--2 PLC Memory
DL350 User Manual, 2nd Edition
DL350 PLC Memory
When designing a PLC application, it is important for the PLC user to understand the
different types of memory in the PLC. Two types of memory are used by the DL350
CPU: RAM and EEPROM. RAM is Random Access Memory and EEPROM is
Electrically erasable Programmable Read Only Memory. The PLC program is stored
in EEPROM, and the PLC V--memory data is stored in RAM. There is also a small
range of V--memory that can be copied to EEPROM which will be explained later.
The V--memory in RAM can be configured as either retentive or non--retentive
memory.
Retentive memory is memory that is configured by the user to maintain values
through a power cycle or a PROGRAM to RUN transition. Non--retentive memory is
memory that is configured by the PLC user to clear data after a power cycle or a
PROGRAM to RUN transition. The retentive ranges can be configured with the
handheld programmer using AUX 57 or DirectSOFT (PLC Setup).
The contents of RAM memory can be written to and read from for an infinite number
of times, but RAM requires a power source to maintain the contents of memory.The
contents of RAM are maintained by the internal power supply (5VDC) only while the
PLC is powered by an external source, normally 120VAC. When power to the PLC is
turned off, the contents of RAM are maintained by a “Super--Capacitor”. If the
Super--Capacitor ever discharges, the contents of RAM will be lost. The data
retention time of the super--Capacitor backed RAM is 3 weeks maximum, and 4 1/2
days minimum (at 60°F). An optional batery, D2--BAT--1, can be added to maintain RAM
retentive memory if the DL350 is ever without external power (see page 3--6 for a detailed
explanation).
The contents of EEPROM memory can be read from for an infinite number of times
but there is a limit to the number of times it can be written to (typical specification is
100,000 writes). EEPROM does not require a power source to maintain the memory
contents. It will retain the contents of memory indefinately.
PLC user V--memory is stored in both volatile RAM and non--volatile EEPROM
memory. Data being stored in RAM uses V1400 -- V7377 and V10000 -- V17777.
Data stored in EEPROM uses V7400 -- V7777
Data values that must be retained for long periods of time, when the PLC is powered
off, should be stored in EEPROM based V--memory. Since EEPROM is limited to the
number of times it can be written to, it is suggested that transitional logic, such as a
one--shot, be used to write the data one time instead of on each CPU scan.
Data values that are continually changing or which can be initialized with program
logic should be stored in RAM based V--memory.
Appendix G
PLC Memory
G--3
PLC Memory
DL350 User Manual, 2nd Edition
There are two types of memory assigned for the non--volatile V--memory area. They
are 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. If you use other instructions, you can only write
data to RAM. When you read data from the nonvolatile V--memory area, the data is
always read from RAM.
Writing Data
RAM Flash RAM
V4000--V4377 V4000--V4377
Reading Data
RAM Flash RAM
V4000--V4377 V4000--V4377
Other instructions
(OUT, OUTD...)
MOV
D2--HPP
DirectSOFT
MOV
D2--HPP
DirectSOFT
There is no way to read data
from the Flash ROM directly.
After a power cycle, the PLC always copies the data in the flash ROM to the RAM.
If you use the instructions except for the MOV instruction to write data into the
non--volatile V--memory area, you only update the data in RAM. After a power cycle,
the PLC copies the previous data from the flash memory to the RAM, so you may
think the data you changed has disappeared. To avoid trouble such as this, we
recommend that you use the MOV instruction.
Copy
Cycle power
LD K2222
OUT V4000
Not changed
RAM Flash RAM
V4000 = 1111 V4000 = 1111
V4000 = 2222 V4000 = 1111
V4000 = 1111 V4000 = 1111
This appears to be previous data returning.
Non--volatile
V--memory in the
DL350
1
1H
ASCII Table
InThisAppendix....
— ASCII Conversion Table
Appendix H
ASCII Table
H--2 ASCII Table
DL350 User Manual, 2nd Edition
DECIMAL TO HEX TO ASCII CONVERTER
DEC HEX ASCII DEC HEX ASCII DEC HEX ASCII DEC HEX ASCII
000 NUL 32 20 space 64 40 @96 60
101 SOH 33 21 !65 41 A97 61 a
202 STX 34 22 66 42 B98 62 b
303 ETX 35 23 #67 43 C99 63 c
404 EOT 36 24 $68 44 D100 64 d
505 ENQ 37 25 %69 45 E101 65 e
606 ACK 38 26 &70 46 F102 66 f
707 BEL 39 27 71 47 G103 67 g
808 BS 40 28 (72 48 H104 68 h
909 TAB 41 29 )73 49 I105 69 i
10 0A LF 42 2A *74 4A J106 6A j
11 0B VT 43 2B +75 4B K107 6B k
12 0C FF 44 2C ,76 4C L108 6C l
13 0D CR 45 2D -- 77 4D M109 6D m
14 0E SO 46 2E .78 4E N110 6E n
15 0F SI 47 2F /79 4F O111 6F o
16 10 DLE 48 30 080 50 P112 70 p
17 11 DC1 49 31 181 51 Q113 71 q
18 12 DC2 50 32 282 52 R114 72 r
19 13 DC3 51 33 383 53 S115 73 s
20 14 DC4 52 34 484 54 T116 74 t
21 15 NAK 53 35 585 55 U117 75 u
22 16 SYN 54 36 686 56 V118 76 v
23 17 ETB 55 37 787 57 W119 77 w
24 18 CAN 56 38 888 58 X120 78 x
25 19 EM 57 39 989 59 Y121 79 y
26 1A SUB 58 3A :90 5A Z122 7A z
27 1B ESC 59 3B ;91 5B [123 7B {
28 1C FS 60 3C <92 5C \124 7C |
29 1D GS 61 3D =93 5D ]125 7D }
30 1E RS 62 3E >94 5E ^126 7E ~
31 1F US 63 3F ?95 5F _127 7F DEL
1I
Numbering Systems
InThisAppendix....
— Introduction
— Binary Numbering System
— Hexadecimal Numbering System
— Octal Numbering System
— Binary Coded Decimal (BCD) Numbering System
— Real (Floating Point) Numbering System
— BCD/Binary/Decimal/Hex/Octal -- What is the Difference?
—DataTypeMismatch
— Signed vs. Unsigned Integers
— AutomationDirect.com Products and Data Types
Appendix I
Numbering Systems
I--2 Numbering Systems
DL350 User Manual, 2nd Edition
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 for ”zero” (0) and ”one” (1)
although ”off” and ”on” or sometimes ”no” and yes” are closer to what is actually
involved. Most of the time a typical PC user has no need to think about this aspect of
computers, but every now and then one gets confronted with the underlying nature
of the binary system.
A PLC user should be more aware of the binary system specifically the PLC
programmer. This appendix will provide an explaination of the numbering systems
most commonly used by a PLC.
Binary Numbering System
Computers, including PLCs, use the Base 2 numbering system, which is called
Binary and often called Decimal. Like in a computer there are only two valid digits a
PLC relys on, zero and one, or off and on respectively. You would think that it would
be hard to have a numbering system built on Base 2 with only two possible values,
but the secret is by encoding using several digits.
Each digit in the base 2 system when referenced by a computer is called a bit. When
four bits are grouped together, they form what is known as a nibble. Eight bits or two
nibbles would be a byte. Sixteen bits or two bytes would be a word (Table 1).
Thirty--two bits or two words is a double word.
Word
Byte Byte
Nibble Nibble Nibble Nibble
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Table 1
Binary is not “natural“ for us to use since we have grown up using the base 10
system. Base 10 uses the numbers 0--9, as we are all well aware. From now on, the
different bases will be shown as a subscripted number following the number.
Example; 10 decimal would be 1010.
Table 2 shows how base 2 numbers relate to their decimal equivalents.
A nibble of 10012 would be equal to a decimal number 9 (1*23+1*2
0or 810 +1
10). A
byte of 110101012would be equal to 213 (1*27+1*2
6+1*24+1*2
2+1*20or 12810 +
6410 +16
10 +4
10 +1
10).
Table 2
Appendix I
Numbering Systems
I--3
Numbering Systems
DL350 User Manual, 2nd Edition
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 uderstands pure binary.
The hexadecimal system is useful because it can represent every byte (8 bits) as two
consecutive hexadecimal digits. It is easier for us to read hexadecimal numbers than
binary numbers.
The hexadecimal numbering system uses 16 characters (base 16) to represent
values. The first ten characters are the same as our decimal system, 0--9, and the
first six letters of the alphabet, A--F. Table 3 lists the first eighteen decimal numbers;
0--17 in the left column and the equivalent hexadecimal numbers are shown in the
right column.
Decimal Hex Decimal Hex
0 0 9 9
1 1 10 A
2 2 11 B
3 3 12 C
4 4 13 D
5 5 14 E
6 6 15 F
7 7 16 10
8 8 17 11
Table 3
Note that “10” and “11“ in hex are not the same as “10“ and “11“ in decimal. Only the
first ten numbers 0--9 are the same in the two representations. For example,
consider the hex number “D8AF“. To evaluate this hex number use the same method
used to write decimal numbers. Each digit in a decimal number represents a multiple
of a power of ten (base 10). Powers of ten increase from right to left. For example, the
decimal number 365 means 3x102+ 6x10 + 5. In hex each digit represents a multiple
of a power of sixteen (base 16). Therefore, the hex number D8AF translated to
decimal means 13x163+8x16
2+ 10x16 + 15 = 55471. However, going through the
arithmetic for hex numbers in order to evaluate them is not really necessay. The
easier way is to use the calculator that comes as an accessory in Windows. It can
convert between decimal and hex when in “Scientific“ view.
Note that a hex number such as “365“ is not the same as the decimal number “365“.
Its actual value in decimal terms is 3x1626x16 + 5 = 869. To avoid confusion, hex
numbers are often labeled or tagged so that their meaning is clear. One method of
tagging hex numbers is to append a lower case “h“ at the end. Another method of
labeling is to precede the number with 0x. Thus, the hex number “D8AF“ can also be
written “D8AFh“, where the lower case “h” at the end is just a label to make sure we
know that it is a hex number. Also, D8AF can be written with a labeling prefix as
“0xD8AF”.
Appendix I
Numbering Systems
I--4 Numbering Systems
DL350 User Manual, 2nd Edition
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 8 values to represent numbers. The
values are 0--7 being Base 8. Table 4 shows the first 31 decimal digits in octal. Note
that the octal values are 0--7, 10--17, 20--27, and 30--37.
Decimal Hex Decimal Hex
0 0 20 16
1 1 21 17
2 2 22 18
3 3 23 19
4 4 24 20
5 5 25 21
6 6 26 22
7 7 27 23
10 830 24
11 931 25
12 10 32 26
13 11 33 27
14 12 34 28
15 13 35 29
16 14 36 30
17 15 37 31
Table 4
This follows the DirectLOGIC PLCs. Refer to the bit maps in Chapter 3 and notice
that the memory addresses are numbered in octal, as well as each bit. The octal
system is much like counting in the decimal system without the digits 8 and 9 being
available.
The general format for four digits of the octal number is:
(dx8
0)+(dx8
1)+(dx8
2)+(dx8
3)
where “d“ means digit. This is the same format used in the binary, decimal, or
hexadecimal systems except that the base number for octal is 8.
Appendix I
Numbering Systems
I--5
Numbering Systems
DL350 User Manual, 2nd Edition
Using the powers of expansion, the example below shows octal 4730 converted to
decimal.
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. For example, a bytecan represent a maximum of 256different numbers(i.e.
0--255) using normal binary, whereas only 100 distinct numbers (i.e. 0--99) could be
coded using BCD. Also, note that BCD is a subset of hexadecimal and neither one
does negative numbers.
BCD Bit Pattern
Bit # 15 14 13 12 11 10 9876543210
Power 103102101100
Bit Value 8421842184218421
Max Value 9999
Table 5
One plus for BCD is that it reads like a decimal number, whereas 867 in BCD would
mean 867 decimal. No conversion is needed; however, within the PLC, BCD
calculations can be performed if numbers are adjusted to BCD after normal binary
arithmetic.
Appendix I
Numbering Systems
I--6 Numbering Systems
DL350 User Manual, 2nd Edition
Real (Floating Point) Numbering System
The terms Real and floating--point both describe IEEE--754 floating point arithmetic.
This standard specifies how single precision (32 bit) and double precision (64 bit)
floating point numbers are to be represented as well as how arithmetic should be
carried out on them. Most PLCs use the 32--bit format for floating point (or Real)
numbers which will be discussed here.
Real (Floating Point 32) Bit Pattern
Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Sign Exponent Mantissa
Bit # 15 14 13 12 11 10 9876543210
Mantissa (continues from above)
Table 6
Floating point numbers which DirectLOGIC PLCs use have three basic
components: sign, exponent and mantissa. The 32 bit word required for the IEEE
standard floating point numbers is shown in Table 6. It is represented as a number
from 0 to 31, left to right. The first bit (31) is the sign bit, the next eightbits (30--23) are
the exponent bits and the final 23 bits (22--0) are the fraction bits. In summary:
The sign bit is either “0” for positive or “1“ for negative;
The exponent uses base 2;
The first bit of the mantissa is typically assumed to be “1.fff“, where “f“ is the field of
fraction bits.
The Internet can provide a more indepth explaination of the floating point numbering
system. One website to look at is:
http://www.psc.edu/general/software/packages/ieee/ieee.html
Appendix I
Numbering Systems
I--7
Numbering Systems
DL350 User Manual, 2nd Edition
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. Although data is stored in
the same manner (0’s and 1’s), there are differences in the way that the PLC
interprets it.
While all of the formats rely on the base 2 numbering system and bit--coded data, the
format of the data is dissimilar. Table 7 below shows the bit patterns and values for
various formats.
Table 7
As seen in Table 7, the BCD and hexadecimal formats are similar, although the
maximum number for each grouping is different (9 for BCD and F for hexadecimal).
This allows both formats to use the same display method. The unfortunate side
effect is that unless the data type is documented, it’s difficult to know what the data
type is unless it contains the letters A--F.
Appendix I
Numbering Systems
I--8 Numbering Systems
DL350 User Manual, 2nd Edition
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.
Table 8 shows how BCD and binary numbers differ.
Data Type Mismatch
Decimal 0123456789 10 11
BCD 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 0001 0000 0001 0001
Binary 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 0000 1010 0000 1011
Table 8
As the table shows, BCD and binary share the same bit pattern up until you get to the
decimal number 10. Once you get past 10, the bit pattern changes. The BCD bit
pattern for the decimal 10 is actually equal to a value of 16 in binary, causing the
number to jump six digits by when viewing it as the BCD. With larger numbers, the
error multiplies. Binary values from 10 to 15 Decimal are actually invalid for the BCD
data type.
Looking at a larger number, such as the value shown in Table 9, both the BCD bit
pattern and the decimal bit pattern correspond to a base 10 value of 409510. If bit
patterns are read, or interpreted, in a different format than what is used to write them,
the data will not be correct. For instance, if the BCD bit pattern is interpreted as a
decimal (binary) bit pattern, the result is a base 10 value of 1653310. Similarly, if you
try to view the decimal (binary) bit pattern as a BCD value, it is not a valid BCD value
at all, but could be represented in hexadecimal as 0xFFF.
Base 10 Value BCD Bit Pattern Binary Bit Pattern
4095 0100 0000 1001 0101 1111 1111 1111
Table 9
Look at the following example and note the same value represented by the different
numbering systems.
Appendix I
Numbering Systems
I--9
Numbering Systems
DL350 User Manual, 2nd Edition
Signed vs. Unsigned Intergers
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.
Usually, this is the Most Significant Bit (MSB) as shown in Table 10. For a 16--bit
number, this is bit 15. This means that for 16--bit numbers we have a range of --32767
to 32767.
Bit #15 14 13 12 11 10 9876543210
Table 10
There are two ways to encode a negative number: two’s complement and Magnitude
Plus sign. The two methods are not compatible.
The simplest method to represent a negative number is to use one bit of the PLC
word as the sign of a number while the remainder of the word gives its magnitude. It
is general convention to use the most significant bit (MSD) as the sign bit: a 1 will
indicate a negative, anda0apositivenumber.Thus, a 16 bit word allows numbers in
the range ¦32767. The following tables show a representation of 100 and a
representation of --100 in this format.
Magnitude Plus Sign
Decimal Binary
100 0000 0000 0110 0100
--100 1000 0000 0110 0100
Table 11
Two’s complement is a bit more complicated. Without getting involved with a full
explanation, a simple formula for two’s complement is to invert the binary and add
one (see Table 12). Basically, 1’s are being changed to 0’s and all 0’s are being
changed to 1.
Two’s Compliment
Decimal Binary
100 0000 0000 0110 0100
--100 1111 1111 1010 1100
Table 12
More information about 2’s complement can be found on the Internet at the following
websites:
http://www.evergreen.edu/biophysics/technotes/program/2s_comp.htm
Appendix I
Numbering Systems
I--10 Numbering Systems
DL350 User Manual, 2nd Edition
AutomationDirect.com Products and Data Types
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. User data in V--memory loacations may
be stored in other data types if it is changed by the programmer, or comes from some
external source, such as an operator interface. Any manipulation of data must use
instructions appropriate for that data type which includes: Load instructions, Math
instructions, Out box instructions, comparison instructions, etc. In many cases, the
data can be changed from one data type to another, but be aware of the limitations of
the various data types when doing so. For example, to change a value from BCD to
decimal (binary), use a BIN instruction box. To change from BCD to a real number,
use a BIN and a BTOR instruction box. When using Math instructions, the data
types must match. For example, a BCD or decimal (binary) number cannot be
added to a real number, and a BCD number cannot be added to a decimal (binary)
number. If the data types are mismatched, the results of any math operation will be
meaningless.
To simplify making, number conversions Intelligent Box (IBox) Instructions are
avaialable with DirectSOFT. These instruction descriptions are located in Volume 1,
page 5--230, in the Math IBox group.
Most DirectLOGIC analog modules can be setup to give the raw data in decimal
(binary) format or in BCD format, so it is necessary to know how the module is being
used. DirectLOGIC PID is another area where not all values are in BCD. In fact,
nearly all of the PID parameters are stored in the PLC memory as decimal (binary)
numbers.
NOTE: The PID algorithm uses magnitude plus sign for negative decimal (binary)
numbers, whereas the standard math functions use two’s complement. This can
cause confusion while debugging a PID loop.
When using the Data View in DirectSOFT, be certain that the proper format is
selected for the element to be viewed. The data type and length is selected using the
drop--down boxes at the top of the Data View window. Also notice that BCD is called
BCD/Hex. Remember that BCD is a subset of hexadecimal so they share a display
format even though the values may be different. This is where good documentation
of the data type stored in memory is crucial.
In the C--more and C--more Micro--Graphic HMI operator panels, the 16--bit BCD
format is listed as “BCD int 16“. Binary format is either “Unsigned int 16“ or “Signed
int 16“ depending on whether or not the value can be negative. Real number format
is “Floating PT 32”.
More available formats are, “BCD int 32“, “Unsigned int 32“ and “Signed int 32“.
DirectLOGIC PLCs
C--more/C--more
Micro--Graphic
Panels
1J
European Union
Directives (CE)
InThisAppendix....
— European Union (EU) Directives
— Basic EMC Installation Guidelines
Appendix J
EU Directives
J--2 European Union Directives
DL350 User Manual, 2nd Edition
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.
Changes or additions to the standards can possibly invalidate any part of the
information provided in this section.
This area of certification and approval is absolutely vital to anyone who wants to do
business in Europe. One of the key tasks that faced the EU member countries and
the European Economic Area (EEA) was the requirement to harmonize several
similar yet distinct standards together into one common standard for all members.
The primary purpose of a harmonized standard was to make it easier to sell and
transport goods between the various countries and to maintain a safe working and
living environment. The Directives that resulted from this merging of standards are
now legal requirements for doing business in Europe. Products that meet these
Directives are required to have a CE mark to signify compliance.
As of January 1, 2007, the members of the EU are Austria, Belgium, Cyprus, Czech
Republic, Denmark, Estonia, Finland, France, Germany, Greece, Ireland, Italy,
Latvia, Lithonia, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania,
Slovakia, Slovenia, Spain, Sweden, and the United Kingdom. Iceland,
Liechtenstein, and Norway together with the EU members make up the European
Economic Area (EEA) and all are covered by the Directives.
There are several Directives that apply to our products. Directives may be amended,
or added, as required.
Electromagnetic Compatibility Directive (EMC) — this Directive attempts
to ensure that devices, equipment, and systems have the ability to
function satisfactorily in its electromagnetic environment without
introducing intolerable electromagnetic disturbance to anything in that
environment.
Machinery Safety Directive — this Directive covers the safety aspects of
the equipment, installation, etc. There are several areas involved,
including testing standards covering both electrical noise immunity and
noise generation.
Low Voltage Directive — this Directive is also safety related and covers
electrical equipment that has voltage ranges of 50--1000VAC and/or
75--1500VDC.
Battery Directive — this Directive covers the production, recycling, and
disposal of batteries.
Certain standards within each Directive already require mandatory compliance. The
EMC Directive, which has gained the most attention, became mandatory as of
January 1, 1996. The Low Voltage Directive became mandatory as of January 1,
1997.
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
Member Countries
Applicable
Directives
Compliance
Appendix J
EU Directives
J--3
European Union Directives
DL350 User Manual, 2nd Edition
installation procedures that are necessary to comply with the Directives. As a
machine builder, you are responsible for installing the products in a manner which
will ensure compliance is maintained. You are also responsible for testing any
combinations of products that may (or may not) comply with the Directives when
used together. The end user of the products must comply with any Directives that
may cover maintenance, disposal, etc. of equipment or various components.
Although we strive to provide the best assistance available, it is impossible for us to
test all possible configurations of our products with respect to any specific Directive.
Because of this, it is ultimately your responsibility to ensure that your machinery (as
a whole) complies with these Directives and to keep up with applicable Directives
and/or practices that are required for compliance.
As of January 1, 1999, the DL05, DL06 DL205, DL305, and DL405 PLC systems
manufactured by either Koyo Electronics Industries, FACTS Engineering or Host
Engineering, when properly installed and used, conform to the Electromagnetic
Compatibility (EMC) and Low Voltage Directive requirements of the following
standards.
EMC Directive Standards Revelant to PLCs
EN50081--1 Generic immunity standard for residential, commercial,
and light industry
EN50081--2 Generic emission standard for industrial environment.
EN50082--1 Generic immunity standard for residential, commercial,
and light industry
EN50082--2 Generic immunity standard for industrial environment.
Low Voltage Directive Standards Applicable to PLCs
EN61010--1 Safety requirements for electrical equipment for
measurement, control, and laboratory use.
Product Specific Standard for PLCs
EN61131--2 Programmable controllers, equipment requirements and
tests. This standard replaces the above generic standards for immunity
and safety. However, the generic emissions standards must still be used
in conjunction with the following standards:
EN 61000-3-2 Harmonics
EN 61000-3-2 Fluctuations
Warning on Electrostatic Discharge (ESD)
We recommend that all personnel take necessary precautions to avoid
the risk of transferring static charges to the inside of the control cabinet,
and clear warnings and instructions should be provided on the cabinet
exterior. Such precautions may include the use of earth straps, similar
devices or the powering down of the equipment inside the enclosure
before the door is opened.
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 measures.
Appendix J
EU Directives
J--4 European Union Directives
DL350 User Manual, 2nd Edition
External switches, circuit breakers or external fusing, are required for these
devices.
The switch or circuit breaker should be mounted near the PLC equipment.
AutomationDirect is currently in the process of changing their testing procedures
from the generic standards to the product specific standards.
The installation requirements to comply with the requirements of the Machinery
Directive, EMC Directive and Low Voltage Directive are slightly more complex than
the normal installation requirements found in the United States. To help with this, we
have published a special manual which you can order:
D A -- E U -- M -- This is an EU Installation Manual that covers special
installation requirements to meet the EU Directive requirements. Order
this manual to obtain the most up-to-date information.
Although the EMC Directive gets the most attention, other basic Directives, such as
the Machinery Directive and the Low Voltage Directive, also place restrictions on the
control panel builder. Because of these additional requirements it is recommended
that the following publications be purchased and used as guidelines:
BSI publication TH 42073: February 1996 -- covers the safety and electrical
aspects of the Machinery Directive
EN 60204--1:1992 -- General electrical requirements for machinery, including
Low Voltage and EMC considerations
IEC 1000--5--2: EMC earthing and cabling requirements
IEC 1000--5--1: EMC general considerations
It may be possible for you to obtain this information locally; however, the official
source of applicable Directives and related standards is:
The Office for Official Publications of the European Communities L--2985
Luxembourg; quickest contact is via the World Wide Web at
http://euro--op.eu.int/indexn.htm
Another source is:
British Standards Institution -- Sales Department
Linford Wood
Milton Keynes
MK14 6LE
United Kingdom: the quickest contact is via the internet at
http://www.bsi.org.uk
General Safety
Special Installation
Manual
Other Sources of
Information
Appendix J
EU Directives
J--5
European Union Directives
DL350 User Manual, 2nd Edition
Basic EMC Installation Guidelines
The simplest way to meet the safety requirements of the Machinery and Low Voltage
Directives is to house all control equipment in an industry standard lockable steel
enclosure. This normally has an added benefit because it will also help ensure that
the EMC characteristics are well within the requirements of the EMC Directive.
Although the RF emissions from the PLC equipment, when measured in the open
air, are below the EMC Directive limits, certain configurations can increase emission
levels. Holes in the enclosure, for the passage of cables or to mount operator
interfaces, will often increase emissions.
The DL205 and DL305
A
C
powered base power supplies
require extra mains filtering to
comply with the EMC Directive
on conducted RF emissions.
All PLC equipment has been
tested with filters from
Schaffner, which reduce
emissions levels if the filters
are properly grounded (earth
ground). A filter with a current
rating suitable to supply all
PLC power supplies and AC
input modules should be
selected. We suggest the
FN2010 for the DL205
systems and the FN2080 for
DL305 systems. The DL05,
DL06 and DL405 systems do
not require extra filtering.
Earth
Terminal
Fused
Terminals
Filter
Transient
Suppressor
To AC
Input
Circuitry
Schaffner
FN2010
LN
NOTE: Very few mains filters can reduce problem emissions to negligible levels. In
some cases, filters may increase conducted emissions if not properly matched to the
problem emissions.
In order to comply with the fire risk requirements of the Low Voltage and Machinery
Directive electrical standards EN 61010--1, and EN 60204--1, by limiting the power
into “unlimited” mains circuits with power leads reversed, it is necessary to fuse both
AC and DC supply inputs. You should also install a transient voltage suppressor
across the power input connections of the PLC. Choose a suppressor such as a metal
oxide varistor, with a rating of 275VAC working voltage for 230V nominal supplies
(150VAC working voltage for 115V supplies) and high energy capacity (eg. 140
joules).
Transient suppressors must be protected by fuses and the capacity of the transient
suppressor must be greater than the blow characteristics of the fuses or circuit
breakers to avoid a fire risk. A recommended AC supply input arrangement for Koyo
PLCs is to use twin 3 amp TT fused terminals with fuse blown indication, such as
DINnectors DN--F10L terminals, or twin circuit breakers, wired to a Schaffner FN2010
filter or equivalent, with high energy transient suppressor soldered directly across the
Enclosures
AC Mains Filters
Suppression and
Fusing
Appendix J
EU Directives
J--6 European Union Directives
DL350 User Manual, 2nd Edition
output terminals of the filter. PLC system inputs should also be protected from voltage
impulses by deriving their power from the same fused, filtered, and surge-suppressed
supply.
A heavy-duty star earth terminal block should be provided in every cubicle for the
connection of all earth ground straps, protective earth ground connections, mains
filter earth ground wires, and mechanical assembly earth ground connections. This
should be installed to comply with safety and EMC requirements, local standards, and
the requirements found in IEC 1000--5--2.The Machinery Directive also requires that
the common terminals of PLC input modules, and common supply side of loads driven
from PLC output modules should be connected to the protective earth ground
terminal.
Key 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 equi-potential 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. An equi-potential bond wire must be provided
alongside all serial communications cables, and to any separate items of the plant
which contain I/O devices connected to the PLC. The diagram shows an example
of four physical locations connected by a communications cable.
Screened
Cable
Equi-potential
Bond
Control Cubicle
To Earth
Block
Conductive
Adapter
Serial
I/O
Internal Enclosure
Grounding
Equi--potential
Grounding
Communications
and Shielded
Cables
Appendix J
EU Directives
J--7
European Union Directives
DL350 User Manual, 2nd Edition
Good quality 24 AWG minimum twisted-pair shielded cables, with overall foil and
braid shields are recommended for analog cabling and communications cabling
outside of the PLC enclosure.
To date, it has been a common practice to only provide an earth ground for one end of
the cable shield in order to minimize the risk of noise caused by earth ground loop
currents between apparatus. The procedure of only grounding one end, which
primarily originated as a result of trying to reduce hum in audio systems, is no longer
applicable to the complex industrial environment. Shielded cables are also efficient
emitters of RF noise from the PLC system, and can interact in a parasitic manner in
networks and between multiple sources of interference.
The recommendation is to use shielded cables as electrostatic “pipes” between
apparatus and systems, and to run heavy gauge equi-potential 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. Shields must be
connected to every enclosure wall or machine cover that they pass through.
Providing an earth ground for both ends of the shield for analog circuits provides the
perfect electrical environment for the twisted pair cable as the loop consists of signal
and return, in a perfectly balanced circuit arrangement, with connection to the
common of the input circuitry made at the module terminals. RS232 cables are
handled in the same way.
RS422 twin twisted pair, and RS485 single twisted pair cables also require a 0V link,
which has often been provided in the past by the cable shield. It is now
recommended that you use triple twisted pair cabling for RS422 links, and twin
twisted pair cable for RS485 links. This is because the extra pair can be used as the
0V inter-system link. With loop DC power supplies earth grounded in both systems,
earth loops are created in this manner via the inter-system 0v link. The installation
guides encourage earth loops, which are maintained at a low impedance by using
heavy equi-potential bond wires. To account for non--European installations
using single-end earth grounds, and sites with far from ideal earth ground
characteristics, we recommend the addition of 100 ohm resistors at each 0V
link connection in network and communications cables.
RXD Master
RXDTXD 0V
+-- +--
Slave n
TXD 0V
+-- +--
Last Slave
RXD TXD0V
+-- +--
Termination
100Ω100Ω
Termination
100Ω
Analog and RS232
Cables
Multidrop Cables
Appendix J
EU Directives
J--8 European Union Directives
DL350 User Manual, 2nd Edition
When you run cables between PLC items within an enclosure which also contains
susceptible electronic equipment from other manufacturers, remember that these cables
may be a source of RF emissions. There are ways to minimize this risk. Standard data
cables connecting PLCs and/or operator interfaces should be routed well away from
other equipment and their associated cabling. You can make special serial cables where
the cable shield is connected to the enclosure’s earth ground at both ends, the same way
as external cables are connected.
The readings from all analog modules can be affected by the use of devices that
exhibit high field strengths such as mobile phones and motor drives.
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.
When assembling a control system using analog modules, these issues must be
adhered to and should be integrated into the system design. This is the responsibility
of the system builder/commissioner.
Again, for further information on EU directives we recommend that you get a copy of
our EU Installation Manual (DA--EU--M). The EU Commision’s official website is:
http://eur--op.eu.int/
For safety reasons, it is a specific requirement of the Machinery Directive that a
keyswitch must be provided that isolates any network input signal during
maintenance, so that remote commands cannot be received that could result in the
operation of the machinery. The FA--ISONET does not have a keyswitch! Use a
keylock and switch on your enclosure which when open removes power from the
FA--ISONET. To avoid the introduction of noise into the system, any keyswitch
assembly should be housed in its own earth grounded steel box and the integrity of
the shielded cable must be maintained.
Again, for further information on EU directives we recommend that you get a copy of
our EU Installation Manual (DA--EU--M). Also, if you are connected to the World
Wide Web, you can check the EU Commission’s official site at:
http://ec.europa.eu/index_en.htm. DC Powered Versions Due to slightly higher
emissions radiated by the DC powered versions of the DL350, and the differing
emissions performance for different DC supply voltages, the following stipulations
must be met:
The PLC must be housed within a metallic enclosure with a minimum
amount of orifices.
I/O and communications cabling exiting the cabinet must be contained
within metallic
conduit/trunking.
Shielded Cables
within Enclosures
Caution Regarding
RF Interference
near Analog
Modules
Network Isolation
Appendix J
EU Directives
J--9
European Union Directives
DL350 User Manual, 2nd Edition
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.
It is the responsibility of the system designer to earth ground one side of all
control and power circuits, and to earth the braid of screened cables.
This equipment must be properly installed while adhering to the guidelines
of the PLC installation manual DA--EU--M, and the installation standards
IEC 1000--5--1, IEC 1000--5--2 and IEC 1131--4.
It is a requirement that all PLC equipment must be housed in a protective
steel enclosure, which limits access to operators by a lock and power
breaker. If access is required by operators or untrained personnel, the
equipment must be installed inside an internal cover or secondary
enclosure. A warning label must be used on the front door of the
installation cabinet as follows:
Warning: Exposed terminals and hazardous voltages inside.
It should be noted that the safety requirements of the machinery directive
standard EN60204--1 state that all equipment power circuits must be
wired through isolation transformers or isolating power supplies, and
that one side of all AC or DC control circuits must have a earth ground.
Both power input connections to the PLC must be separately fused using 3
amp T type anti--surge fuses, and a transient suppressor fitted to limit
supply overvoltages.
If the user is made aware by notice in the documentation that if the
equipment is used in a manner not specified by the manufacturer the
protection provided by the equipment may be impaired.
Input power cables must be externally fused and have an externally
mounted switch or circuit breaker, preferably mounted near the PLC.
NOTE: The AC powered DL350 internal base supply has a 2A@250V slow blow
fuse which is not replaceble, so external fusing is required.
For hardware maintenance instructions, see the Maintenance and
Troubleshooting section in this manual. This section also includes
battery replacement information. Also, only replacement parts supplied
by Automationdirect.com or its agents should be used.
Items Specific to
the DL350
1
1
DL350 User Manual, 2nd Edition
Index
A
ASCII Table, H--2
Auxiliary Functions, 3--8, A--2
accessing
with DirectSOFT, A--3
with the Handheld, A--3
B
Bases
conventional specifications, F--5
expansion, 4--9, F--8
installing modules, 2--9, 2--11
local, 4--9, F--8
mounting dimensions, 2--10
power wiring, 2--13
setting base jumpers, F--10
setting switches, 4--11, F--10
Slot Numbering, 2--25
Specifications, 4--5
Battery
CPU indicator, 9--2
replacement, 9--2
I/O Modules, Troubleshooting, 9--13
C
Clock and Calendar, 3--9
Communication
ports, 3--5
setting addresses, 3--10
Communications, Problems, 9--12
Configuration
I/O
automatic check, A--5
selecting a new configuration, A--5
viewing, A--5
I/O examples, F--11–F--19
Convergence Stages, 7--19, 7--25
Conventional I/O Numbering, F--2
CPU
battery, 9--2
Battery Backup, 3--6
clearing memory, 3--9, A--4
Diagnostics, 3--15
features, 3--2, 3--4
Indicators, 9--9
Mode Operation, 3--12
Mode Switch, 3--4
Port 1 Specifications, 3--5
Port 2 Specifications, 3--5
Scan Time, 3--18
setup, 3--7
clearing memory, 3--9
initializing system memory, 3--9
Specifications, 3--3
Status Indicators, 3--4
D
Diagnostics, 9--3
Dimensions, 2--10
DirectNET, 4--22
DirectNET Port Configuration, 4--24
Network Master Operation, 4--30
Network Slave Operation, 4--25
Discrete Input, specifications, 2--28–2--39
Discrete Output, specifications, 2--40–2--54
DL405 Aliases, 3--30
Drum instructions, 6--12
Drum sequencers, 6--2
Drum step transitions, 6--4
Duplicate Reference Check, A--4
E
Emergency Stop Switch, 2--3
Error Codes
fatal, 9--3
Index--2
DL350 User Manual, 2nd Edition
listing, B--2–B--9
non--fatal, 9--3
Program, 9--8
special relays assigned to, 9--5
System, 9--7
V--memory locations for, 9--4
European Directives, J--2
Expansion Bases, 4--9, 4--10, & F--8 to F--9
F
Fatal Errors, 9--3, 9--7
Forcing I/O, 3--13, 9--24
G
Grounding, 2--6 to 2--7 & 2--8 to 2--9
I
I/O Modules
address switch (base), 4--11, F--10
configuration, A--5
power up check, A--5
viewing, A--5
configuration history, F--2
diagnostics, A--5
discrete input specifications, 2--28–2--39
discrete output specifications, 2--40–2--54
example configurations, F--11–F--19
numbering, F--2, F--3
placement, 4--3–4--7, F--4–F--6
point requirements, F--3
I/O Modules Wiring, 2--24, 2--26
I/O Response Time, 3--16
I/O Wiring Strategies, 2--14
Initial Stages, 7--5, 7--23
Input Modules
specifications, 2--28–2--39
wiring diagrams, 2--28–2--39
Installation
base, mounting dimensions, 2--10
component dimensions, 2--10
grounding, 2--4–2--5
installing modules, 2--9, 2--11
local and expansion bases, 4--9, F--8
panel design specifications, 2--4
Instruction Set, index table, 5--3
Instructions, 5--2
execution times, C--2–C--23
stage, 7--23
stage programming, 7--2
J
Jump Instruction, 7--7 & 7--24
Jumpers, on bases, F--10
Jumpers, on bases, 4--11
L
Local Bases, 4--9, F--8
M
Masked drums, 6--18
Math Instructions, 5--77
Memory, G--2
clearing, 3--9
program memory, A--4
V--memory, A--4
Control Relay Bit Map, 3--31, 3--33
DL350 Memory Map, 3--29
initializing system memory, 3--9
map, 3--23
Scratch Pad Memory, 3--9
Stage Bit Map, 3--35
X input/Y output map, 3--30, 3--32
MODBUS, 4--22
MODBUS Port Configuration, 4--23
Network Master Operation, 4--30
Network Slave Operation, 4--25
Mode Switch, 3--4
Module Placement, 4--3
Module Power Requirement, 4--5
Mounting
Guidelines, 2--4
Panel, 2--5, 2--7
N
Netork Address, A--6
Network Address, 3--10
Non--fatal Errors, 9--3
Number Conversions, 5--103
Numbering Systems
BCD, I--5
Binary, I--2
Floating Point, I--6
Hexadecimal, I--3
Octal, I--4
O
Output Modules
power disconnect, 2--3
specifications, 2--40–2--54
wiring diagrams, 2--40–2--54
Index--3
DL350 User Manual, 2nd Edition
P
Part Numbering Scheme, 1--8
Password Protection, 3--10
PID
Analog Filter, 8--54
Bumpless Transfer, 8--13, 8--27
Cascade Control, 8--63
Tuning, 8--65
Control Introduction, 8--4
DirectSOFT 5 Filter, 8--55
DL450 Control, 8--6
Error Flags, 8--18
Error Term Selection, 8--33
Example Program, 8--70
Loop Modes, 8--28, 8--53
On/Off Control, 8--66
Operation, 8--9
Parameters, 8--32
PID View, 8--49–8--51
Ramp/Soak, 8--39
Reset Windup, 8--10, 8--34
Special Features, 8--52
Time Proportioning, 8--66
PID Alarms
Alarm Features, 8--3
Auto Tuning Error, 8--48
Hysteresis, 8--13, 8--36, 8--38
Monitor Limit, 8--35
Overflow/Underflow Error, 8--38
Programming Error, 8--38
PV Deviation, 8--36
Rate--of--Change, 8--13, 8--37
Setup Alarms, 8--35
PID Loop
Alarms, 8--13
Configure, 8--26
Features, 8--2, 8--3
Feedforward Control, 8--68
Freeze Bias, 8--11, 8--34
Loop Definitions, 8--21
Mode, 8--28
Operating Modes, 8--14
Special Loop Calculations, 8--14
Setup, 8--18
Terminology, 8--74
Time--Proportioning Control, On/Off Control
Example, 8--67
Transfer Mode, 8--27
Troubleshooting Tips, 8--72
Tuning, 8--40
Auto , 8--45
Manual, 8--41–8--44
PID Mode 2 Word Description, 8--23
PID Mode Setting 1 Description, 8--22
PID Position Algorithm, 8--9, 8--15
Position Form, 8--9
PID Velocity Algorithm, 8--9
Algorithm Form, 8--12
Velocity Algorithm, 8--15
PLC Numbering System, 3--21
Power Budget, 4--5
Example, 4--7
Power Indicator, 9--10
Programming
changing I/O references, A--4
checking for duplicate references, A--4
checking the program syntax, A--4
clearing memory, A--4
instruction execution times, C--2–C--23
instruction set index, 5--3
R
Ramp/Soak Generator, 8--56
Controls, 8--59
DirectSOFT Example, 8--61
Flag Bit Description Table, 8--24
Profile Monitoring, 8--60
Table, 8--57
Table Flags, 8--59
Table Location, 8--25
Test the Profile, 8--62
Testing, 8--60
Remote I/O
Port Connections, 4--18
Remote I/O Expansion, 4--16
Retentive Memory, 3--10
RLLPLUS, instructions, 7--23–7--29
Run Relay, F--7
RunTimeEdits,9--22
S
Safety
emergency switch, 2--3
guidelines, 2--2–2--3
levels of protection, 2--2
output module power disconnect, 2--3
panel design specifications, 2--4
planning for, 2--2
sources of assistance, 2--2
Scan Time, 3--18
Sinking/Sourcing, 2--17
Special Relays, 9--5
Specifications
component weights, E--2
Index--4
DL350 User Manual, 2nd Edition
discrete input modules, 2--28–2--39
discrete output modules, 2--40–2--54
panel design, 2--4
Stage Counter instruction, 7--16
Stage programming, 7--2
convergence, 7--19
four steps to writing a stage program, 7--9
garage door opener example, 7--10
initial stages, 7--5
instructions, 7--23–7--29
introduction, 7--2
jump instruction, 7--7
managing large programs, 7--21
mutually exclusive transitions, 7--14
parallel processes, 7--12
parallel processing concepts, 7--19
power flow transition, 7--18
program organization, 7--15
questions and answers, 7--29
stage view, 7--28
state transition diagrams, 7--3
supervisor process, 7--17
timer inside stage, 7--13
unconditional outputs, 7--18
Stages, blocks, 7--27
System
component dimensions, 2--10
memory initialization, 3--9
panel design specifications, 2--4
V--Memory, 3--27
System design strategies, 4--2
T
Timed drum, 6--12
Troubleshooting, 9--16
cabinet air environment, 9--2
error codes, B--2
special relays for, 9--5
V--memory locations for, 9--4
fatal errors, 9--3
finding diagnostic information, 9--3
I/O modules, A--5
selecting a new configuration, A--5
low battery, 9--2
machine startup and program, 9--17
non--fatal errors, 9--3
W
Watchdog Timer, A--6
Wiring, base power supply, 2--13
V
Velocity algorithm, 8--30
W
Watchdog Timer, A--6
Wiring, base power supply, 2--11

Navigation menu