Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 15 of 68

DL405 User Manual: Chapter 3: CPU Specifications and Operation, pages 115 to 124

Pages 115 to 124 of 608, from DL405 User Manual

The original document is the PDF (8.2 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the AutomationDirect D4-08B-1, AutomationDirect D4-08ND3S, AutomationDirect D4-16TA, PLC Direct D4-16TD2, AutomationDirect D4-32ND3-1, Konnect-It D4-08B-1, Koyo D4-08B-1, Konnect-It D4-08ND3S, and 6 more models

Page 115

CPU Specifications and Operation

The CPU processes the program from the Application Program Execution 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 DL430 running the program shown would be calculated as follows. Time

STR X0 OR C0 ANDN X1 OUT Y0 STRN C100 LD K10 STRN C101 OUT V2002 STRN C102 LD K50 STRN C103 OUT V0006 STR X5 ANDN X10 OUT Y3 END

4.7μs 3.1μs 3.4μs 8.3μs

TOTAL

5.7μs 8.3μs 26.0μs 8.3μs 8.3μs 26.0μs

X1

Y0 OUT

C0

C100

LD

C101

OUT V2002

C102

LD

C103

X5

K10

K50

OUT V006 X10

Y3 OUT

END

112.0μs

112.0μs 4.7μs 3.4μs 8.3μs 15.5μs 358μs

Appendix C provides a complete list of instruction execution times for DL405 CPUs. Program Control Instructions, the DL440 and DL450 CPUs offer 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.

DL405 User Manual, 4th Edition

CPU Specifications and Operation

Instruction

X0

3--31

Page 116

3--32

CPU Specifications and Operation

CPU Specifications and Operation

PLC Numbering Systems

PLC Resources

If you are a new PLC user or are using octal 49.832 binary AutomationDirect PLCs for the first time, ? 1482 BCD please take a moment to study how our ? 0402 ? ? 3 PLCs use numbers. You’ll find that each 3A9 ASCII PLC manufacturer has their own --961428 7 conventions on the use of numbers in their hexadecimal PLCs. We want to take just a moment to 1001011011 1011 familiarize you with how numbers are 177 ? decimal used in AutomationDirect PLCs. The A 72B information you learn here applies to all ? --300124 our PLCs. As any good computer does, PLCs store and manipulate numbers in binary form: just ones and zeros. So why do we have to deal with 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 H for numbering system details). PLCs offer a fixed amount of resources, depending on the model and configuration. We use the word “resources” to include 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 of 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).

Decimal 1 2 3 4 5 6 7 8 Octal

1 2 3 4 5 6 7 10

In the figure below, we have two groups of eight circles. Counting in octal we have “20” items, meaning 2 groups of eight, plus 0 individuals Don’t say “twenty”, say “two--zero octal”. This makes a clear distinction between number systems. Decimal 1 2 3 4

5

6

7 8

9 10 11 12 13 14 15 16

Octal

5

6

7 10

11 12 13 14 15 16 17 20

1

2 3 4

After counting PLC resources, it’s time to access PLC resources (there’s 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. Our circles are in an array of square containers to the right. To access a resource, our PLC instruction will address its location using the octal references shown. If these were counters, “CT14” would access the black circle location.

DL405 User Manual, 4th Edition

X= 0 X 1X 2X

1

2 3

4

5

6

7

Page 117

3--33

CPU Specifications and Operation V--Memory

Variable memory (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. We use the word “significant”, referring to the relative binary weighting of the bits. V-memory address (octal)

MSB

LSB

0 1 0 0 1 1 1 0 0 0 1 0 1 0 0 1

V2017

V-memory data is 16-bit binary, but we rarely program the data registers one bit at a time. We use instructions or viewing tools that let us work with binary, decimal, octal, and hexadecimal numbers. All 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 just 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 just a storage box... that’s all. It does not convert or move the data on its own. Since humans naturally count in decimal (10 fingers, 10 toes), 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.

4

BCD number 8

V--memory storage

4

9 2

1

0 1 0 0

8

4

3 2

1

1 0 0 1

8

4

6 2

1

0 0 1 1

8

4

2

1

0 1 1 0

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

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. Decimal Hexadecimal

0 1 2 3 0 1 2 3

4 5 4 5

6 6

7 7

8 9 10 11 12 13 14 15 8 9 A B C D E F

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 just a convenient way for humans to view full binary data. Hexadecimal number

A

7

F

4

V--memory storage

1 0 1 0

0 1 1 1

1 1 1 1

0 1 0 0

DL405 User Manual, 4th Edition

CPU Specifications and Operation

Binary-Coded Decimal Numbers

V-memory data (binary)

Page 118

3--34

CPU Specifications and Operation

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 DL405 CPUs. Memory maps for all DL405 CPUs follow the memory descriptions.

CPU Specifications and Operation

Octal Numbering System

All memory locations or areas are numbered in Octal (base 8). 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. Refer to the previous section on PLC Numbering Systems for more on octal numbering.

X0

X1

X2

8pt Input

16pt Input

8pt Input

8pt Output

8pt Output

16pt Output

X0 -X07

X10 -X27

X30 -X37

Y0 -Y07

Y10 -Y17

Y20 -Y37

X3

X4

X5

X6

X7

X10 X11 X12 X13 X14 X15 X16 X17

Discrete and Word Locations

V--Memory Locations for Discrete Memory Areas

As you examine the different memory types, you’ll notice two types of memory in the DL405, 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.

Discrete -- On or Off, 1 bit X0

Word Locations -- 16 bits 0 1 0 1 00 0 0 0 0 1 0 0 1 0 1

The discrete memory area is for inputs, outputs, control relays, special relays, stages, global relays, 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. 16 Discrete (X) Input Points X17 X16 X15 X14 X13 X12 X11 X10

Bit # 15

14

13

12

11

10

9

8

X7

X6

X5

X4

X3

X2

X1

X0

7

6

5

4

3

2

1

0

V40400

These discrete memory areas and the corresponding V--memory locations are listed in the Memory Map tables for the DL430, DL440, and DL450 CPUs in this chapter.

DL405 User Manual, 4th Edition

Page 119

3--35

CPU Specifications and Operation Input Points (X Data Type)

Output Points (Y Data Type)

Control Relays (C Data Type)

The discrete input points are noted by an X data type. Refer to the memory maps for the number of discrete input points for your CPU type. In this example, the output point Y0 will energize when input X0 turns on. The discrete output points are noted by a Y data type. Refer to the memory maps for the number of discrete input points for your CPU type. In this example, output point Y1 will energize when input X1 turns on.

Y0 OUT

X1

Y1 OUT

X10

C5 OUT

C5

Y10 OUT Y20 OUT

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. Timers and Timer Status Bits (T Data type)

The amount of timers available depends on the model of CPU you are using. The tables at the end of this section provide the amount of timers in each DL405 CPU type. 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.

X0

T1

TMR

K30

T1

Y12 OUT

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 energizes. NOTE: Some timers and counters use one V-memory register, and other types require two V-memory registers. See the instruction descriptions in Chapter 5.

DL405 User Manual, 4th Edition

CPU Specifications and Operation

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. Because of this, 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 contains 16 consecutive discrete locations.

X0

Page 120

3--36

CPU Specifications and Operation

Timer Current Values (V Data Type)

CPU Specifications and Operation

Counters and Counter Status Bits (CT Data type)

Some information is automatically stored in V--memory, such as 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. These are 4-digit BCD values. 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. 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 or greater than the preset value of a corresponding counter.

X0

TMR T1 K1000

V1

K30

Y12 OUT

V1

K50

Y13 OUT

V1

K75

V1

X0

K100

Y14 OUT

CNT

CT3

K10

X1 CT3

Y12 OUT

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. Counter Current Values (V Data Type)

Word Memory (V Data Type)

Just 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. These are 4-digit BCD values. The primary reason for this is programming flexibility. The example shows how you can use relational contacts to monitor the counter values.

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.

DL405 User Manual, 4th Edition

X0

CNT

CT3

K10

X1

V1003

K1

Y12 OUT

V1003

K3

Y13 OUT

V1003

K5

V1003

X0

K8

LD

Y14 OUT

K1345

OUT V1400

Word Locations -- 16 bits 0 0 0 1 00 1 1 0 1 0 0 0 1 0 1 1

3

4

5

Page 121

3--37

CPU Specifications and Operation

Stages (S Data type)

Remote I/O Points (GX Data Type)

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. Remote I/O points are represented by global relays. They are generally used only to control remote I/O, but they can be used as normal control relays when remote I/O is not used in the system. You should notice the same data type, GX, is used for both the remote input and remote output points. There are setup routines that must be placed in your application program to designate which locations are inputs and which are outputs. (The DL405 Remote and Slice I/O Modules manual provides the details.) In this example, memory location GX0 represents an output point and memory location GX10 represents an input point.

Ladder Representation ISG S0000

Wait forStart Start

S1 JMP

X0 SG

S500 JMP

Check for a Part

S0001

Part Present

S2 JMP

X1 Part Present

S6 JMP

X1 SG

Clamp the part

S0002

Clamp SET S400 S3 JMP

Part Locked X2

SP5

C10 OUT

SP4: 1 second clock SP5: 100 ms clock SP6: 50 ms clock

X3

GX0 OUT

GX10

Y12 OUT

DL405 User Manual, 4th Edition

CPU Specifications and Operation

Special Relays (SP Data Type)

Stages are used in RLL PLUS 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 RLL PLUS 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 program.

Page 122

3--38

CPU Specifications and Operation

System Parameters Many system parameters, such as error codes, are automatically stored in pre--defined V-memory locations. These memory locations store clock / calendar (V Data Type) information, error codes and other types of system setup information.

CPU Specifications and Operation

430 440 450

430 440 450

X X 430 440 450

System V-memory

Description of Contents

V700, V701

Contains a copy of the contents of the accumulator. V700 is the lower 16 bit word, V701 is the upper 16 bit word.

V702, V703

Contains a copy of the contents of the 1st data stack location. V702 is the lower 16 bit word, V703 is the upper 16 bit word.

V704, V705

Contains a copy of the contents of the 2nd data stack location. V704 is the lower 16 bit word, V705 is the upper 16 bit word.

V706, V707

Contains a copy of the contents of the 3rd data stack location. V705 is the lower 16 bit word, V706 is the upper 16 bit word.

V710, V711

Contains a copy of the contents of the 4th data stack location. V710 is the lower 16 bit word, V711 is the upper 16 bit word.

V712, V713

Contains a copy of the contents of the 5th data stack location. V712 is the lower 16 bit word, V713 is the upper 16 bit word.

V714, V715

Contains a copy of the contents of the 6th data stack location. V714 is the lower 16 bit word, V715 is the upper 16 bit word.

V716, V717

Contains a copy of the contents of the 7th data stack location. V716 is the lower 16 bit word, V717 is the upper 16 bit word.

V720, V721

Contains a copy of the contents of the 8th data stack location. V720 is the lower 16 bit word, V721 is the upper 16 bit word.

System V-memory

Description of Contents

V737

Contains a BCD value (from 3 to 999) for Timed-interrupt 17 feature.

V7633

Bit 12 enables the low battery warning indicator.

V7747

Contains a 10 mS calendar timer used with the Clock / Calendar.

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. (0=Sun., 1=Mon, 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)

System V-memory

Description of Contents

V736

Contains a BCD value (from 3 to 999) for Timed-interrupt 16 feature.

V7746

450: Battery voltage in tenths of a volt, (e.g., V7746 = 0031 is 3.1 Volts).

DL405 User Manual, 4th Edition

Page 123

CPU Specifications and Operation

430 440 450

System V-memory (continued)

3--39

Description of Contents Fault Message Error Code, stores the 4-digit BCD code used with the FAULT instruction when the instruction is executed. If you’ve used ASCII messages (DL440/DL450 only) then the data label (DLBL) reference number for that message is stored here.

V7752

I/O configuration Error, stores the module ID code for the module that does not match the current configuration.

V7753

I/O Configuration Error, stores the correct module ID code.

V7754

I/O Configuration Error, identifies the base and slot number.

V7755

Error code, stores the fatal error code.

V7756

Error code, stores the major error code.

V7757

Communications Error Code -- stores the minor error code.

V7760

Module Error, identifies the base and slot number.

V7762

Module Error, identifies the type of error.

V7763

Program Grammatical Error, identifies the location of a syntax error in a program.

V7764

Program Grammatical Error, identifies the type of error.

V7765

Scan, stores the total number of scan cycles that have occurred since the last Program Mode to Run Mode transition.

V7775

Scan, stores the current scan time.

V7776

Scan, stores the minimum scan time that has occurred since the last Program-to-Run Mode transition.

V7777

Scan, stores the maximum scan time that has occurred since the last Program-to-Run Mode transition.

The following system control relays are valid only for DL450 CPU remote I/O setup on Communications Port 3.

430 440 450

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

ON -- the last state of inputs will be maintained. OFF -- inputs will turn off when communication is lost.

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

DL405 User Manual, 4th Edition

CPU Specifications and Operation

V7751

Page 124

3--40

CPU Specifications and Operation

CPU Specifications and Operation

DL430 Memory Map Memory Type

Discrete Memory Reference (octal)

Word Memory Reference (octal)

Qty. Decimal

Symbol

Input Points

X0 -- X477

V40400 -- V40423

320

X0

Output Points

Y0 -- Y477

V40500 -- V40523

320

Y0

Control Relays

C0 -- C737

V40600 -- V40635

512

Special Relays

SP0 -- SP137 SP320 -- SP617

V41200 -- V41205 V41215 -- V41230

288

Timers

T0 -- T177

None

128

Timer Current Values

None

V00000 -- V00177

128

Timer Status Bits T0 -- T177

V41100 -- V41107

128

Counters

None

128

CT0 -- CT177

C0

C0

SP0

TMR K100

V0

T0

K100

T0

CNT CT0 K10

Counter Current Values

None

V01000 -- V01177

128

Counter Status Bits

CT0 -- CT177

V41140 -- V41147

128

User Data Words None

V1400 -- V7377

3072

Stages

V41000 -- V41027

384

S0 -- S577

Remote In / Out

GX0 -- GX777

V40000 -- V40037

512

System parameters

None

V7400 -- V7777

256

DL405 User Manual, 4th Edition

V1000

K100

CT0

None specific, used with many instructions SG

S0 S 001

GX0

GX0

None specific, used with many instructions