The text of a manual · part 21 of 42
DL305 User Manual: Chapter 8: System Operation, pages 152 to 161
Pages 152 to 161 of 359, from DL305 User Manual
The original document is the PDF (4.9 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 D3-08TD2, AutomationDirect D3-16TD2, Konnect-It D3-08TD2, Koyo D3-08TD2, Konnect-It D3-16TD2 and Koyo D3-16TD2
Page 152
System Operation
18
In This Chapter. . . ., Introduction, CPU Operating System, Initial Mode Setting and Memory Initialization, Program Mode Operation, Run Mode Operation, I/O Response Time, CPU Scan Time Considerations, Memory Map, I/O Point Bit Map, Control Relay Bit Map, Special Relays, Timer / Counter Registers and Contacts, Data Registers, Stage Control / Status Bit Map, Shift Register Bit Map, Special Registers
Page 153
8--2
System Operation
System Operation
Introduction Achieving the proper control for your equipment or process requires a good understanding of how the DL305 CPUs control all aspects of the system operation. This includes many things, such as I/O updates, program execution, etc. Take a few minutes to understand how the CPU stores and processes information. For more complex applications, this knowledge will make it easier to program and debug your application program to meet your system performance requirements. There are four primary things you need to understand before you create your application program S CPU Operating System, the CPU is the heart of the system. It manages all aspects of system control. A quick overview of all the steps is provided in the next section. S CPU Operating Modes, the CPU has different operating modes that allow different types of operations. There are two primary modes of operation, Program Mode and Run Mode. S CPU Timing, it is important you understand how the CPU timing can affect the system operation. The two most important areas are the I/O response time and the CPU scan time. S CPU Memory Map, The DL305 CPUs offer a wide variety of memory types, such as timers, counters, inputs, etc. It is important to understand what memory types are available and how the memory areas are organized. The remainder of this chapter discusses these items in detail.
DL305 User Manual, Rev. D
Page 154
System Operation
8--3
CPU Operating System After the initial power-up sequence, the DL305 CPUs process data cyclically. There are several tasks the CPU must perform during each cycle, such as updating the I/O status, servicing external communications, executing the application program, etc. There are many different segments of execution, but the overwhelming majority of your concerns will be with the portion of the execution cycle that occurs during Run Mode. These operations will be discussed throughout the remainder of this chapter. DL305 CPU Operational Flow Chart
Power up #1 Initial Mode Setting
Initialize memory
Is program memory OK?
NO
YES
YES What mode is the programmer in? RUN
System Operation
Is programmer connected?
Display error code NO User changes programmer to program mode
PGM/ Cassette What is the last mode?
PGM/ Cassette
RUN I/O update Service peripherals Service peripherals Service for force operation or monitoring
Operation of program or cassette mode PGM What is the mode?
Executes user program
RUN
DL305 User Manual, Rev. D
Page 155
8--4
System Operation
Initial Mode Setting and Memory Initialization Flow Chart for The previous flowchart contained a step called Initial Mode Setting. Once power has Initial Mode Setting been connected to the system, the CPU executes the following procedure to determine which mode of operation should be entered. (#1) NO
Is programmer or Data Communication Unit connected? YES What is connected?
Data Communication Unit
Programmer ONLINE or OFFLINE?
ONLINE
OFFLINE Is programmer connected?
NO
PROM
YES
System Operation
What is the current mode? RUN
Service peripherals
Initialize Memory
DL305 User Manual, Rev. D
PGM
PGM
Select PGM/ Cassette mode
What is the last mode? RUN
What is the program memory RAM
Page 156
System Operation Memory Initialization
8--5
Before the CPU can begin normal operation, all memory areas are initialized. The CPU completes the following operations to initialize the memory areas. Item
Procedure
I/O Points
Input Points: activated, CPU will monitor status. Output Points: turned off
Control Relays
Non-Retentive: turned off Retentive: retains the condition prior to the system power interruption.
Shift Registers
Retains the condition prior to the system power interruption.
Timer / Counter Current Values
Timers: reset to zero Counters: retains the current count prior to the system power interruption.
Stages
Non-Retentive: turned off Retentive: retains the condition prior to the system power interruption.
Data Registers
Retains the condition prior to the system power interruption.
DL305 User Manual, Rev. D
System Operation
NOTE: Not all memory areas are retentive by default. See Chapter 3 for details on how to set the CPU to have retentive memory. Also, the memory map section provided later in this chapter shows the exact ranges that can be selected as retentive.
Page 157
8--6
System Operation
Program Mode Operation
System Operation
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 can also use the program mode to set up CPU parameters, such as the network address for the communication port on the DL340, retentive memory areas, etc. You can use the Handheld Programmer key switch to select Program Mode operation, or you can use a DirectSOFT menu option to change the CPU mode.
DL305 User Manual, Rev. D
Download Program
Page 158
System Operation
8--7
Run Mode Operation 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: S Monitor and change I/O point status S Update timer/counter preset values S Update Register memory locations Even though there are many steps in the overall flowchart of operation, the Run Mode operation can be divided into a few key areas. It is very important you understand how each of these areas of execution can affect the results of your application program solutions.
Update I/O Points Service Peripherals Service Monitoring & Forcing Solve Application Program
System Operation
DL305 User Manual, Rev. D
Page 159
8--8
System Operation
Update I/O Points
The CPU reads the status of all input modules present in the local CPU base and local expansion bases. The status of each input is stored in the input image register area. The input image register data is used by the CPU when it solves the application program. You may be thinking, “What if an input changes after the CPU has read the inputs?” Good question! Generally, the CPU program execution time is measured in milliseconds, so in most cases this is not a problem. If you need to know more, I/O response timing is explained in more detail later in this chapter. The CPU also uses the output image register to update the output modules present in the local CPU base and local expansion bases.
8pt
8pt
8pt
16pt
4ch.
16pt
Relay
Output
Input
Input
Output
Input
050 -057
040 -047
030 -037
020 027 -120 127
010 017 -110 117
000 007 -100 107
System Operation
CPU Scan
Field Device OFF
030
OFF
031
ON
032
ON
033
OFF
034
ON
035
OFF
036
OFF
037
OFF
040
OFF
041
ON
042
ON
043
OFF
044
ON
045
OFF
046
OFF
047
DL305 User Manual, Rev. D
Update I/O Points
I/O Modules
... ... The CPU reads the inputs from the local and expansion bases and stores the status in an input image register.
032 031 030 ON OFF OFF Input Image Register
... ...
... 042 041 040 ... ON OFF OFF Output Image Register
... ...
Service Peripherals Service Monitoring & Forcing Solve Application Program
The CPU also writes the status of the output image register to the output modules.
Page 160
System Operation
8--9
Service Peripherals After the CPU updates the I/O points, it reads any attached peripheral devices. This is primarily a communications service for any attached devices. For example, if you were using an operator interface to read or write data, the CPU would service these requests during this portion of the scan. 8pt
8pt
8pt
16pt
4ch.
16pt
Relay
Output
Input
Input
Output
Input
050 -057
040 -047
030 -037
020 027 -120 127
010 017 -110 117
000 007 -100 107
CPU Scan Update I/O Points ... ...
... ...
... 042 041 040 ... ON OFF OFF Output Image Register
... ...
Service Peripherals Service Monitoring & Forcing Solve Application Program
DL305 User Manual, Rev. D
System Operation
CPU services peripherals through communication ports.
032 031 030 ON OFF OFF Input Image Register
Page 161
8--10
System Operation
After the CPU updates any communications requests from peripheral devices, it Service for determines if any forcing operations have been requested. The CPU also services Monitoring and Forcing Operations any monitoring requests during this portion. For example, if you are using the Handheld Programmer to monitor the current value of a timer or counter, the CPU will provide this information during this portion of the scan. Here’s an example of one of the more popular requests. 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 Update I/O Points segment of the next scan. 8pt
8pt
8pt
16pt
4ch.
16pt
Relay
Output
Input
Input
Output
Input
050 -057
040 -047
030 -037
020 027 -120 127
010 017 -110 117
000 007 -100 107
System Operation
CPU Scan
Field Device
Update I/O Points
I/O Modules
OFF
030
OFF
031
ON
032
ON
033
The CPU reads the inputs from the local and expansion bases and stores the status in an input image register.
... ...
... 042 041 040 ... ON OFF OFF Output Image Register
... ...
Service Peripherals
Force input 030 ON
The application program uses the forced value to solve the application program. In this example, output 040 will be turned on because the force changed the status of input 030 in the image register.
DL305 User Manual, Rev. D
032 031 030 ON OFF OFF Input Image Register
... ...
Service Monitoring & Forcing ... ...
032 031 030 ON OFF ON Input Image Register
... ...
Solve Application Program 030
040