The text of a manual · part 12 of 60
DL205 PLC User Manual, Volume 1 of 2, pages 111 to 120
Pages 111 to 120 of 598
The original document is the PDF (12 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 D2-04TD1, AutomationDirect D2-08TD2, AutomationDirect D2-16ND3-2, AutomationDirect D2-32ND3, Konnect-It D2-04TD1, Koyo D2-04TD1, Konnect-It D2-08TD2, Koyo D2-08TD2, and 5 more models
Page 111
Chapter 3: CPU Specifications and Operations
Auxiliary Functions
1 2 3 4 5 NOTE: The Handheld Programmer may have additional AUX functions that are not supported with the DL205 6 CPUs. 7 AUX Function and AUX Function and 230 240 250–1 260 230 240 250–1 260 HPP Description Description 8 AUX 2*, RLL Operations AUX 6*, Handheld Programmer Configuration 9 AUX 7*, EEPROM Operations 10 AUX 3*, V-Memory Operations 11 AUX 4*, I/O Configuration 12 13 AUX 8*, Password Operations 14 AUX 5*, CPU Configuration A Supported B X Not Supported - Not Applicable C D Many CPU set-up tasks involve the use of Auxiliary (AUX) Functions. The AUX Functions perform many different operations, including 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 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. The following table shows a list of the Auxiliary functions for the different CPUs and the Handheld Programmer.
21 Check Program 22 Change Reference 23 Clear Ladder Range 24 Clear All Ladders
ü ü ü ü
ü ü ü ü
ü ü ü ü
ü ü ü ü
31 Clear V Memory
ü
ü
ü
ü
41 Show I/O Configuration 42 I/O Diagnostics Power-up I/O 44 Configuration Check 45 Select Configuration 46 Configure I/O
ü ü
ü ü
ü ü
ü ü
ü
ü
ü
ü
ü X
ü X
ü ü
ü ü
ü 51 Modify Program Name 52 Display / Change Calendar X ü 53 Display Scan Time ü 54 Initialize Scratchpad ü 55 Set Watchdog Timer 56 Set CPU Network Address X ü 57 Set Retentive Ranges ü 58 Test Operations 59 Bit Override X 5B Counter Interface Config. ü 5C Display Error History X
ü ü ü ü ü ü ü ü ü ü ü
ü ü ü ü ü ü ü ü ü ü ü
ü ü ü ü ü ü ü ü ü ü ü
61 Show Revision Numbers 62 Beeper On / Off 65 Run Self Diagnostics
Copy CPU memory to HPP EEPROM 72 Write HPP EEPROM to CPU Compare CPU to 73 HPP EEPROM 74 Blank Check (HPP EEPROM) 75 Erase HPP EEPROM Show EEPROM Type 76 (CPU and HPP) 71
81 Modify Password 82 Unlock CPU 83 Lock CPU
ü X X
ü X X
ü X X
ü X X
– ü ü
X
X
X
X
ü
X
X
X
X
ü
X
X
X
X
ü
X X
X X
X X
X X
ü ü
X
X
X
X
ü
ü ü ü
ü ü ü
ü ü ü
ü ü ü
– – –
ü
DL205 User Manual, 4th Edition, Rev. D
3-15
Page 112
Chapter 3: CPU Specifications and Operations
Clearing an Existing Program
Before you enter a new program, you should always clear ladder memory. You can use AUX 1 Function 24 to clear the complete program. You can also use other AUX functions to clear other memory areas. 2 AUX 23, Clear Ladder Range AUX 24, Clear all Ladders 3 AUX 31, Clear V-Memory Initializing System Memory 4 The DL205 CPUs maintain 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 5 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. 6 WARNING: You may never have to use this feature unless you want to clear any set-up information that is stored in system memory. Usually, you will 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 7 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 8 be erased when AUX 54 is used. Make sure that you have considered all ramifications of this operation before you select it. 9 Setting the Clock and Calendar The DL240, DL250–1 and DL260 also have a Clock/Calendar that can be used for many 10 purposes. If you need to use this feature, AUX functions are available that allow you to set the date and time. For example, you would use AUX 52, Display/Change Calendar to set the time 11 and date with the Handheld Programmer. With DirectSOFT you would use the PLC set-up menu options using K–Sequence protocol only. 12 The CPU uses the following format to display the date and time. •, Month, Date, Day of week (0 – 6, Sunday through Saturday) 13 23:08:17 08/02/20 • Time format, Hours, Minutes, Seconds You can use the AUX function to change any component of the date or time. However, the 14 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 15th of the month and the 15th is on a Thursday, A 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. B C D 230 240
250-1 260
Handheld Programmer Display
3-16
DL205 User Manual, 4th Edition, Rev. D
Page 113
Chapter 3: CPU Specifications and Operations
Setting the CPU Network Address
1 2 3 • Odd Parity • 9600 Baud The DirectNet Manual provides additional information about choosing the communication 4 settings for network operation. 5 Setting Retentive Memory Ranges The DL205 CPUs provide certain ranges of retentive memory by default. The default ranges are suitable for many applications, but you can change them if your application requires 6 additional retentive ranges or no retentive ranges at all. The default settings are: 7 DL230 DL240 DL250–1 DL260 Memory Area 8 Control Relays V-Memory 9 Timers Counters Stages 10 11 You can use AUX 57 to set the retentive ranges. You can also use DirectSOFT menus to select the retentive ranges. 12 WARNING: The DL205 CPUs do 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 13 ranges are important for your application, make sure you obtain the optional battery. 14 A B C D The DL240, DL250–1 and DL260 CPUs have built in DirectNet ports. You can use the
Handheld Programmer to set the network address for the port and the port communication 240 parameters. The default settings are: 250-1 • Station Address 1 • Hex Mode 260 230
Default Range Avail. Range Default Range
Avail. Range Default Range
Avail. Range Default Range
Avail. Range
C300 – C377 C0 – C377 C300 – C377 C0 – C377 C1000 – C1777 C0 – C1777 C1000 – C3777 C0 – C3777 V2000 – V7777 V0 – V7777 V2000 – V7777 V0 – V7777 V1400 – V3777 V0 – V17777 V400 – V37777 V0 – V37777 None by default T0 – T77 None by default T0 – T177 None by default T0 – T377 None by default T0 – T377 CT0 – CT77 CT0 – CT77 CT0 – CT177 CT0 – CT177 CT0 – CT177 CT0 – CT177 CT0 – CT377 CT0 – CT377 None by default S0 – S377 None by default S0 – S777 None by default S0 – S1777 None by default S0 – S1777
DL205 User Manual, 4th Edition, Rev. D
3-17
Page 114
Chapter 3: CPU Specifications and Operations
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 3-18
Using a Password The DL205 CPUs 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 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 the appropriate appendix on auxiliary functions. 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 the factory to have the password (along with the ladder project) removed. 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 to enter a password. The following diagram shows how you can enter a password with the Handheld Programmer. Direct SOFT
Select AUX 81 CLR
CLR
I
8
B
1
AUX
ENT
D2–HPP
PASSWORD 00000000
Enter the new 8-digit password X
X
X
ENT
PASSWORD XXXXXXXX
Press CLR to clear the display
The CPU can be locked three ways once the password has been entered. the CPU power is disconnected, the CPU will be automatically locked against access. you enter the password with DirectSOFT, the CPU will be automatically locked against access when you exit DirectSOFT. •Use AUX 83 to lock the CPU.
When you use DirectSOFT, 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. NOTE: The DL240, DL250–1 and DL260 CPUs offer multi–level passwords for even more 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).
DL205 User Manual, 4th Edition, Rev. D
Page 115
Chapter 3: CPU Specifications and Operations
Setting the Analog Potentiometer Ranges
230 240 250-1 260
Four analog potentiometers (pots) are on the face plate of the DL240 CPU. These pots can be used to change timer constants, frequency of pulse train output, value for an analog output module, etc. Each analog channel has corresponding V-memory locations for setting lower and upper limits for each analog channel. To increase the value associated with the analog pot, turn the pot clockwise. To decrease the value, turn the pot counter clockwise
PWR BATT
RUN CPU
DL240 CPU
RUN TERM CH1 CH2
Analog Pots
CH3 CH4
PORT1 ?
PORT2
0
Turn clockwise to increase value.
Max
CH1
The table below shows the V-memory locations used for each analog channel. These are the default locations for the analog pots. CH1 Analog Data Analog Data Lower Limit Analog Data Upper Limit
V3774 V7640 V7641
CH2
CH2 V3775 V7642 V7643
You can use the program logic to load the limits into these locations, or, you can use a programming device to load the values. The range for each limit is 0 – 9999. These analog pots have a resolution of 256 pieces. Therefore, if the span between the upper and lower limits is less than or equal to 256, then you have better resolution or, more precise control. Use the formula shown to determine the smallest amount of change that can be detected. For example, a range of 100 – 600 would result in a resolution of 1.95. Therefore, the smallest increment would be 1.95 units. (The actual result depends on exactly how you are using the values in the control program).
CH3 V3776 V7644 V7645
CH4 V3777 V7646 V7647
Resolution = H – L 256 H = high limit of the range L = low limit of the range
Example Calculations: H = 600 L = 100
Resolution = 600–100 256 Resolution = 500 256 Resolution = 1.95
DL205 User Manual, 4th Edition, Rev. D
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 3-19
Page 116
Chapter 3: CPU Specifications and Operations
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
The following example shows how you could use these analog potentiometers to change the preset value for a timer. See Chapter 5 for details on how these instructions operate.
Program loads ranges into V-memory DirectSOFT SP0
LD K100
Load the lower limit (100) for the analog range on Ch1 into V7640.
OUT V7640 LD K600
X1
OUT V7641
Load the upper limit (600) for the analog range on Ch1 into V7641.
TMR T20 V3774
Use V3774 as the preset for the timer. This will allow you to quickly adjust the preset from 100 to 600 with the CH1 analog pot.
Y0
T20
OUT
Turn all the way counter-clockwise to use lowest value 100
Timing Diagram preset = 100
600
CH1
X1
CH2 T2 Y0 Current Value
0
100
200
300 400 1/10 Seconds
500
600
0
500
600
0
Turn clockwise to increase the timer preset.
3-20
100
CH1
Timing Diagram preset =
600
X1
CH2 T2 Y0 Current Value
DL205 User Manual, 4th Edition, Rev. D
0
100
200
300 400 1/10 Seconds
Page 117
Chapter 3: CPU Specifications and Operations
CPU Operation Achieving the proper control for your equipment or process requires a good understanding of how DL205 CPUs control all aspects of system operation. The flowchart below shows the main tasks of the CPU operating system. In this section, we will investigate four aspects of CPU operation: Power up • Operating System, The CPU manages all aspects of system control.
Initialize hardware
• Operating Modes, The three primary modes of operation are Program Mode, Run Mode, and Test Mode.
Check I/O module config. and verify
• Timing, The two important areas we discuss are the I/O response time and the CPU scan time.
Initialize various memory based on retentive configuration
• Memory Map, The CPU’s memory map shows the CPU addresses of various system resources, such as timers, counters, inputs, and outputs.
Update input Read input data from Specialty and Remote I/O
CPU Operating System At power up, the CPU initializes the internal electronic hardware. Memory initialization starts with examining the retentive memory settings. In general, the contents of retentive memory are preserved, and non-retentive memory is initialized to zero (unless otherwise specified). After the one-time power-up 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 (DL250-1 and DL260). Then the CPU writes the output results of these two tasks to the appropriate output points. Error detection has two levels: Non-fatal and fatal. Nonfatal 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.
Service peripheral
CPU Bus Communication
Update Clock / Calendar
PGM
Mode? RUN Execute ladder program
PID Operations (DL250-1/DL260)
Update output Write output data to Specialty and Remote I/O
Do diagnostics
OK OK?
YES
NO Report the error, set flag, register, turn on LED
Fatal error YES Force CPU into PGM mode
DL205 User Manual, 4th Edition, Rev. D
NO
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
3-21
Page 118
Chapter 3: CPU Specifications and Operations
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 3-22
Program Mode Operation In Program Mode the CPU does not execute X0 Y0 _ X10 _ _ the application program or update the output X7 X17 Y7 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 DL250–1 and DL260 CPUs 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.
Run Mode Operation In Run Mode, the CPU executes the application program, does PID calculations for configured PID loops (DL250-1/DL260), 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
Read Inputs Read Inputs from Specialty I/O Service Peripherals, Force I/O CPU Bus Communication
Run Mode operation can be divided into several Update Clock, Special Relays key areas. It is very important you understand how each of these areas of execution can affect Solve the Application Program the results of your application program solutions. Solve PID Equations (DL250-1/DL260) You can use the mode switch to select Run Mode operation (DL240, DL250–1 and DL260). Or, with the mode switch in TERM position, Write Outputs you can use a programming device, such as the Handheld Programmer, to place the CPU in Write Outputs to Specialty I/O Run Mode. You can also edit the program during Run Mode. Diagnostics 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.
DL205 User Manual, 4th Edition, Rev. D
Page 119
Chapter 3: CPU Specifications and Operations
Read Inputs
1 2 3 4 Read Inputs from Specialty and Remote I/O 5 After the CPU reads the inputs from the input modules, it reads any input point data from any 6 Specialty modules that are installed, such as Counter Interface modules, etc. This is also the portion of the scan that reads the input status from Remote I/O 7 bases. 8 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 9 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. 10 Service Peripherals and Force I/O After the CPU reads the inputs from the input modules, it reads any attached peripheral 11 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 12 needs to be modified. Two basic types of forcing are available with the DL205 CPUs. 13 NOTE: DirectNet protocol does not support bit operations. • Forcing from a peripheral – not a permanent force, good only for one scan 14 • Override (DL240, DL250–1 and DL260) – 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. A 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 B 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 C testing situations when you need to force a bit on to trigger another event. 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 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. _
_
_
DL250–1/260
RSSS
_
_
_
DL205 User Manual, 4th Edition, Rev. D
3-23
Page 120
Chapter 3: CPU Specifications and Operations Bit Override, (DL240, DL250–1 and DL260) Bit override can be enabled on a point-bypoint basis by using AUX 59 from the Handheld Programmer or, by a menu option from within DirectSOFT. Bit override basically disables any changes to the discrete point by the CPU. For example, if you enable bit override for X1, and X1 is off at the time, then the CPU will not change the state of X1. This means that even if X1 comes on, the CPU will not acknowledge the change. So, if 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.” 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 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 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. Notice the CPU does not update the Image Register when bit override is enabled
1 2 3 4 5 6 7 8 Bit Override OFF Bit Override ON 9 10 CPU Bus Communication 11 Specialty Modules, such as the Data Communications Module, can transfer data to and from the CPU over the CPU bus on the backplane. This data is more than standard I/O point 12 status. This type of communications can only occur on the CPU (local) base. A portion of the execution cycle is used to communicate with these modules. The CPU performs both read and write requests during this segment. 13 14 A B Update Clock, Special Relays and Special Registers The DL240 , DL250–1 and DL260 CPUs have an internal real-time clock and calendar C timer which are 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 D every scan. Several different Special Relays, such as diagnostic relays, etc., are also updated Input Update
X128 OFF Y128 OFF C377 OFF
Force from Programmer
Result of Program Solution
... ... ... ... ... ...
X2 ON Y2 ON C2 ON
X1 ON Y1 ON C1 OFF
Input Update
X0 OFF Y0 OFF C0 OFF
Force from Programmer
Result of Program Solution
Image Register (example)
DCM
_
_
DATA
_ during this segment.
3-24
DL205 User Manual, 4th Edition, Rev. D
DCM
_
_
_