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

The text of a manual · part 10 of 40

DL05 Micro PLC User Manual, Volume 1 of 2: Chapter 3: CPU Specifications and Operation, pages 81 to 89

Pages 81 to 89 of 379, from DL05 Micro PLC User Manual, Volume 1 of 2

The original document is the PDF (5.8 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 D0-05AA

Page 81

Chapter 3: CPU Specifications and Operation

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 3–10

Using a Password The DL05 PLCs allow you to use a password to help minimize the risk of unauthorized program and/or data changes. Once you enter a password you can “lock” the PLC 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 Micro PLCs 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 just 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. WARNING: Make sure you remember your password. If you forget your password you will not be able to access the CPU. The Micro PLC must be returned to the factory to have the password (along with the ladder project) cleared from memory. It is the policy of AutomationDirect to require the memory of the PLC to be cleared along with the password.

You can use the D2–HPP Handheld Programmer or DirectSOFT 5. to enter a password. The following diagram shows how you can enter a password with the Handheld Programmer. DirectSOFT

D2–HPP

Select AUX 81 CLR

CLR

I

B 8

1

AUX

ENT

PASSWORD

00000000 Enter the new 8-digit password X

X

X

ENT

PASSWORD xxxxxxxx Press CLR to clear the display

There are three ways to lock the CPU once the password has been entered. 1. If the CPU power is disconnected, the CPU will be automatically locked against access. 2. If you enter the password with DirectSOFT 5, the CPU will be automatically locked against access when you exit DirectSOFT 5. 3. Use AUX 83 to lock the CPU.

When you use DirectSOFT 5, you will be prompted for a password if the CPU has been locked. If you use the Handheld Programmer, you have to use AUX 82 to unlock the CPU. Once you enter AUX 82, you will be prompted to enter the password.

DL05 Micro PLC User Manual, 6th Edition, Rev. A

Page 82

Chapter 3: CPU Specifications and Operation

CPU Operation

1 2 • CPU Operating System, the CPU manages all aspects of system control. A quick overview of all 3 the steps is provided in the next section. • CPU Operating Modes, The two primary modes of operation are Program Mode and Run Mode. 4 • CPU Timing, The two important areas we discuss are the I/O response time and the CPU scan time. 5 • CPU Memory Map, DL05 CPUs offer a wide variety of resources, such as timers, counters, inputs, etc. The memory map section shows the organization and availability of these data types. 6 CPU Operating System At powerup, the CPU initializes the internal electronic 7 hardware. Memory initialization starts with examining the retentive memory settings. In general, the content of 8 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 9 cyclical scan activity. The flowchart to the right shows how the tasks differ, based on the CPU mode and the 10 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. 11 This allows programming tools to monitor input status at any time. 12 The outputs are only updated in Run mode. In program mode, they are in the off state. 13 Error detection has two levels. Non-fatal errors are reported, but the CPU remains in its current mode. If a 14 fatal error occurs, the CPU is forced into program mode and the outputs go off. A B C D Achieving the proper control for your equipment or process requires a good understanding of how DL05 CPUs control all aspects of system operation. There are four main areas to understand before you create your application program:

Power up

Initialize hardware

Initialize various memory based on retentive configuration

Update input

Service peripheral

Update Special Relays

PGM

Mode?

RUN

Execute program Update output

Do diagnostics

OK?

YES

NO Report error, set flag register, turn on LED

Fatal error

NO

YES Force CPU into PGM mode

DL05 Micro PLC User Manual, 6th Edition, Rev. A

3–11

Page 83

Chapter 3: CPU Specifications and Operation

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 3–12

Program Mode In Program Mode, the CPU does not execute the application program or update the output points. The primary use for Program Mode is to enter or change an application program. You also use program mode to set up the CPU parameters, such as HSIO features, retentive memory areas, etc. You can use a programming device, such as a PC with DirectSOFT 5 Programming Software or the D2–HPP Handheld programmer to place the CPU in Program Mode.

Download

Run Mode In Run Mode, the CPU executes the application program and updates the I/O system. You can perform many operations during Run Mode. Some of these include: • Monitor and change I/O point status • Update timer/counter preset values • Update Variable memory locations

Run Mode operation can be divided into several key areas. For the vast majority of applications, some of these execution segments are more important than others. For example, you need to understand how the CPU updates the I/O points, handles forcing operations, and solves the application program. The remaining segments are not that important for most applications. You can use DirectSOFT 5 or the D2–HPP Handheld Programmer to place the CPU in Run Mode. You can also edit the program during Run Mode. The Run Mode Edits are not “bumpless” to the outputs. 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. This feature is discussed in more detail in Chapter 9.

Normal Run mode scan Read Inputs Service Peripherals Update Special Relays Solve the Application Program Write Outputs Diagnostics

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.

DL05 Micro PLC User Manual, 6th Edition, Rev. A

Page 84

Chapter 3: CPU Specifications and Operation

Read Inputs

1 2 3 4 5 Service Peripherals and Force I/O 6 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 7 needs to be modified. There are two basic types of forcing available with the DL05 CPUs. • Forcing from a peripheral – not a permanent force, good only for one scan 8 • Bit Override – holds the I/O point (or other bit) in the current state. Valid bits are X, Y, C, T, CT, and S. (These memory types are discussed in more detail later in this chapter). 9 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 10 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. 11 Bit Override, Bit override can be enabled on a point-by-point basis by using AUX 59 from the Handheld Programmer or, by using the Data View option within DirectSOFT 5. Bit override basically disables any changes to the discrete point by the CPU. For example, if you 12 enable bit override for X1, and X1 is off at the time, then the CPU will not change the state of X1. This means that even if X1 comes on, the CPU will not acknowledge the change. So, if 13 you used X1 in the program, it would always be evaluated as “off ” in this case. Of course, if X1 was on when the bit override was enabled, then X1 would always be evaluated as “on”. 14 There is an advantage available when you use the bit override feature. The regular forcing is not disabled because the bit override is enabled. For example, if you enabled the Bit Override A for Y0 and it was off at the time, then the CPU would not change the state of Y0. However, you can still use a programming device to change the status. Now, if you use the programming device to force Y0 on, it will remain on and the CPU will not change the state B of Y0. If you then force Y0 off, the CPU will maintain Y0 as off. The CPU will never update the point with the results from the application program or from the I/O update until the bit override is removed. The following diagram shows a brief overview of the bit override feature. C Notice the CPU does not update the Image Register when bit override is enabled. D 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 just 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 the 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.

DL05 Micro PLC User Manual, 6th Edition, Rev. A

3–13

Page 85

Chapter 3: CPU Specifications and Operation

1 2 Bit Override OFF Bit Override ON 3 4 WARNING: Only authorized personnel fully familiar with all aspects of the application should 5 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. 6 Update Special Relays and Special Registers There are dedicated V-memory locations that contain Special Relays and other dedicated 7 register 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 8 relays, etc., that are also updated during this segment. Solve Application Program 9 The CPU evaluates each instruction in the application program during this segment of the scan cycle. The 10 instructions define the relationship between the input conditions and the desired output response. The CPU uses the output image register area to store the status of 11 the desired action for the outputs. Output image register locations are designated with a Y followed by a memory Normal Run mode scan 12 location. The actual outputs are updated during the write outputs segment of the scan cycle. There are immediate output instructions available that will update the output 13 points immediately instead of waiting until the write output segment. A complete list of the Immediate 14 instructions is provided in Chapter 5. The internal control relays (C), the stages (S), and the A variable memory (V) are also updated in this segment. You may recall that you can force various types of points B in the system. (This was discussed earlier in this chapter.) If any I/O points or memory data have been forced, the output image register also contains this information. C D Input Update

Force from Programmer

Result of Program Solution

Input Update

X128 OFF Y128 OFF C377 OFF

... ... ... ... ... ...

X2 ON Y2 ON C2 ON

X1 ON Y1 ON C1 OFF

X0 OFF Y0 OFF C0 OFF

Image Register (example)

Force from Programmer

Result of Program Solution

Read Inputs

Service Peripherals

Update Special Relays

Solve the Application Program Write Outputs Diagnostics

3–14

DL05 Micro PLC User Manual, 6th Edition, Rev. A

Page 86

Chapter 3: CPU Specifications and Operation

Write Outputs

1 2 3 Diagnostics During this part of the scan, the CPU performs all system diagnostics and other tasks such as 4 calculating the scan time and resetting the watchdog timer. There are many different error conditions that are automatically detected and reported by the DL05 PLCs. Appendix B 5 contains a listing of the various error codes. Probably one of the more important things that occurs during this segment is the scan time 6 calculation and watchdog timer control. The DL05 CPU has a “watchdog” timer that stores the maximum time allowed for the CPU to complete the solve application segment of the scan cycle. If this time is exceeded the CPU will enter the Program Mode and turn off all 7 outputs. The default value set from the factory is 200 ms. An error is automatically reported. For example, the Handheld Programmer would display the following message “E003 S/W 8 TIMEOUT” when the scan overrun occurs. You can use AUX 53 to view the minimum, maximum, and current scan time. Use AUX 55 9 to increase or decrease the watchdog timer value. I/O Response Time 10 Is Timing Important for Your Application? 11 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 12 CPU performs this task in such a short period of time that you may never have to concern yourself with the aspects of system timing. However, some applications do require extremely fast update times. In these cases, you may need to know how to determine the amount of 13 time spent during the various segments of operation. There are four things that can affect the I/O response time. 14 • The point in the scan cycle when the field input changes states • Input Off to On delay time A • CPU scan time • Output Off to On delay time B The next paragraphs show how these items interact to affect the response time. C Normal Minimum I/O Response The I/O response time is shortest when the input changes just before the Read Inputs portion of the execution cycle. In this case the input status is read, the application program is solved, D and the output point gets updated. The following diagram shows an example of the timing 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. Remember, the CPU also made sure that any forcing operation changes were stored in the output image register, so the forced points get updated with the status specified earlier.

for this situation.

DL05 Micro PLC User Manual, 6th Edition, Rev. A

3–15

Page 87

Chapter 3: CPU Specifications and Operation

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 3–16

Scan Scan

Solve Program

Solve Program Read Inputs

Solve Program

Solve Program

Write Outputs

Field Input CPU Reads Inputs

CPU Writes Outputs

Input Off/On Delay

Output Off/On Delay I/O Response Time

In this case, you can calculate the response time by simply adding the following items: Input Delay + Scan Time + Output Delay = Response Time

Normal Maximum I/O Response The I/O response time is longest when the input changes just after the Read Inputs portion of the execution cycle. In this case the new input status is not read until the following scan. Scan Scan

Solve Program

Solve Program Read Inputs

Solve Program

Solve Program

Write Outputs

Field Input CPU Reads Inputs

CPU Writes Outputs

Input Off/On Delay

Output Off/On Delay I/O Response Time

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

DL05 Micro PLC User Manual, 6th Edition, Rev. A

Page 88

Chapter 3: CPU Specifications and Operation

Improving Response Time

1 • You can choose instructions with faster execution times 2 • You can use immediate I/O instructions (which update the I/O points during the program execution) 3 • You can use the HSIO Mode 50 Pulse Catch features designed to operate in high-speed environments. See Appendix E for details on using this feature. 4 • Change Mode 60 filter to 0 msec for X0, X1, X2 and X3. Of these four things the Immediate I/O instructions are probably the most important and most useful. The following example shows how an immediate input instruction and 5 immediate output instruction would affect the response time. 6 7 8 9 10 11 12 In this case, you can calculate the response time by simply adding the following items. 13 14 The instruction execution time would be calculated by adding the time for the immediate input instruction, the immediate output instruction, and any other instructions in between A the two. NOTE: Even though the immediate instruction reads the most current status from I/O, it only uses the results B 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 C will access the I/O again to update the status. D There are a few things you can do the help improve throughput.

Scan

Solve Program

Scan

Normal Read Input

Solve Program

Read Input Immediate

Solve Program

Write Output Immediate

Solve Program

Normal Write Outputs

Field Input

Input Off/On Delay

Output Off/On Delay

I/O Response Time

Input Delay + Instruction Execution Time + Output Delay = Response Time

DL05 Micro PLC User Manual, 6th Edition, Rev. A

3–17

Page 89

Chapter 3: CPU Specifications and Operation

Time Considerations 1 CPU Scan The scan time covers all the cyclical tasks that are performed by the operating system. You can use 2 DirectSOFT 5 or the Handheld Programmer to display the minimum, maximum, and current scan times that have occurred since the previous Program Mode to Run 3 Mode transition. This information can be very important when evaluating the performance of a system. As we’ve 4 shown previously there are several segments that make up the scan cycle. Each of these segments requires a certain 5 amount of time to complete. Of all the segments, the following are the most important. • Input Update 6 • Peripheral Service • Program Execution 7 • Output Update • Timed Interrupt Execution 8 The only one you really have the most control over is the amount of time it takes to execute the application 9 program. This is because different instructions take different amounts of time to execute. So, if you think you 10 need a faster scan, then you can try to choose faster instructions. 11 Your choice of I/O type and peripheral devices can also affect the scan time. However, these things are usually dictated by the application. 12 The following paragraphs provide some general information on how much time some of the segments 13 can require. Inputs 14 Reading The time required during each scan to read the input status is 40 µs. Don’t confuse this with the I/O response time that was discussed earlier. A Writing Outputs The time required to write the output status is 629 µs. Don’t confuse this with the I/O B response time that was discussed earlier. C D Power up

Initialize hardware

Initialize various memory based on retentive configuration

Update input

Service peripheral

Update Special Relays

PGM

Mode?

RUN

Execute program Update output

Do diagnostics

OK?

YES

NO Report error, set flag register, turn on LED

Fatal error

YES Force CPU into PGM mode

3–18

DL05 Micro PLC User Manual, 6th Edition, Rev. A

NO