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

The text of a manual · part 17 of 36

DL305 User Manual, pages 157 to 166

Pages 157 to 166 of 356

The original document is the PDF (3.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 GE DL330 / D3-330, Fanuc DL330 / D3-330 and GE Fanuc DL330 / D3-330

Page 157

8–9 System Operation

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 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

System Operation

CPU services peripherals through communication ports.

Page 158

8–10 System Operation

Service for After the CPU updates any communications requests from peripheral devices, it 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 Update I/O Points

I/O Modules Field Device 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.

032 031 030 ON OFF OFF Input Image Register

... ...

... 042 041 040 ... ON OFF OFF Output Image Register

... ...

Service Peripherals

Service Monitoring & Forcing 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.

... ...

032 031 030 ON OFF ON Input Image Register

... ...

Solve Application Program 030

040

Page 159

8–11 System Operation

It is important to note the DL305 CPUs only retain the forced value for one scan if the input point used corresponds to a module that is installed in the base. The following example shows how the forcing actually works on the next CPU scan. Result of previous scan Force input 030 ON

030

040

On due to 030 forced ON

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.

032 031 030 ON OFF OFF Input Image Register

... ...

... 042 041 040 ... ON OFF OFF Output Image Register

... ...

Service Peripherals

The application program uses the image register to solve the program. In this case, output 040 is turned off since the force of input 030 is no longer valid.

Service Monitoring & Forcing ... ...

032 031 030 ON OFF OFF Input Image Register

... ...

Solve Application Program 030 040

As you can see from the example, the input forcing will not be valid when the CPU reads the input status on the next scan. Output point forcing works in a similar manner. That is, if you force an output on and the application program results dictate the output should be turned on, then the output image register will show the results of the application program instead of the forcing request. This is discussed in more detail in the next section.

System Operation

Since the programming device did not issue another request for a force, the image register maintains the status obtained during the reading of the inputs.

Page 160

8–12 System Operation

Solve Application Program

The CPU evaluates each instruction in the application program during this segment of the cycle. The 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 the desired action for the outputs. The actual outputs are updated during the Update I/O Points segment of the cycle. The internal control relays (C), stages (S), and data registers (R) are also updated in this segment. You may recall the CPU may have obtained and stored forcing information when it serviced any peripheral devices. If any output points or register locations have been forced, the output image register also contains this information.

System Operation

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 output 030 was forced on by the programming device, and a rung containing 030 was evaluated such that 030 should be turned off, then the output image register will show that 030 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.

Page 161

8–13 System Operation

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

I/O Modules Field Device 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.

032 031 030 ON OFF OFF Input Image Register

... ...

... 042 041 040 ... ON OFF OFF Output Image Register

... ...

Service Peripherals

Service Monitoring & forcing Force input 030 ON Force output 041 ON

The application program uses the forced value to solve the application program. In this example, 040 will be turned on because the force changed the status of 030 in the image register.

Notice output 041 is also on. This output was forced on by the programming device and since it was not used in the application program, the forced status is maintained.

032 031 030 ON OFF ON Input Image Register

... ...

042 041 040 ... ... ON ON OFF Output Image Register

... ...

... ...

Solve Application Program 030

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

042 ON 222 ON

040

041 ON 221 ON

040 ON 220 OFF

Output Image Register Contains I/O, CRs, etc.

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

System Operation

OFF

... ...

Page 162

8–14 System Operation

I/O Response Time Is Timing Important 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 for Your applications, the CPU performs this task in such a short period of time you may never Application? 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 to determine the amount of time spent during the various segments of operation. There are four things that can affect the I/O response time. S The point in the cycle when the field input changes states S Input module Off to On delay time S CPU scan time S Output module Off to On delay time The next paragraphs show how these items interact to affect the response time.

System Operation

Normal Minimum I/O Response

The I/O response time is shortest when the module senses the input change just before the I/O Update portion of the execution cycle. In this case the input status is read, the application program is solved, and the output point gets updated on the following scan. The following diagram shows an example of the timing for this situation. Scan

Scan

Solve Program

Solve Program

Solve Program

Update I/O

Update I/O

CPU Reads Inputs

CPU Writes Outputs

Solve Program

Field Input

Input Module Off/On Delay

Output Module 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

Page 163

8–15 System Operation

Normal Maximum I/O Response

The I/O response time is longest when the module senses the input change just after the Update I/O 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. Scan

Scan

Solve Program

Solve Program

Solve Program

Solve Program

Update I/O

Field Input CPU Reads InĆ put change

CPU Writes Output change

Input Module Off/On Delay

Output Module Off/On Delay

I/O Response Time

Improving Response Time

There are a few things you can do the help improve throughput. S You can try to choose instructions with faster execution times S You can choose modules that have faster response times

System Operation

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

Page 164

8–16 System Operation

CPU Scan Time Considerations The scan time covers all the cyclical tasks that are performed by the operating system. This information can be very important when evaluating the performance of a system. As we’ve shown previously there are several segments that make up the overall execution cycle. Each of these segments requires a certain amount of time to complete. Of all the segments, the only ones you really need to understand are those that occur during Run Mode. Even within this portion, your primary concern should be to understand the instruction execution times.

Update I/O Points Service Peripherals Service Monitoring & Forcing

System Operation

Solve Application Program

DL330 / DL330P Scan Calculation

The following table provides execution timing guidelines for the execution cycle.

A Input / Output Update B

Service Peripherals, Monitoring, and Forcing

C Application Program Solution

D A timer interrupt occurs every 2.5ms during the scan. The interrupt requires approximately 266ms to service. So, the larger the program, the more timer interrupts.

A = 3.3 ms typical I/O update B = 0 - 5.2 ms maximum to service peripherals, monitoring, and forcing C = Total of instruction execution time D = 266ms x A ) B ) C ) D 2.5ms

Actual Scan = A + B + C + D NOTE: There are other events that occur during the execution cycle, but the areas shown are the most important. This information is provided so you will understand the basic scan calculations. Scan time can vary from scan-to-scan.

Page 165

8–17 System Operation

DL340 Scan Calculation

Typical scan overhead is from 2.5 – 3.5ms. However, the following table provides more precise execution timing guidelines for the execution cycle.

A Input / Output Update B

Service Peripherals, Monitoring, and Forcing

C Application Program Solution

D A timer interrupt occurs every 2.5ms during the scan. The interrupt requires approximately 200ms to service. So, the larger the program, the more timer interrupts.

A = 2 ms typical I/O update B = 0 – 1.2 ms maximum to service peripherals, monitoring, and forcing C = Total of instruction execution time 2.5ms

Actual Scan = A + B + C + D NOTE: There are other events that occur during the execution cycle, but the areas shown are the most important. This information is provided so you will understand the basic scan calculations. Scan time can vary from scan-to-scan.

System Operation

D = 200 ms x A ) B ) C ) D

Page 166

8–18 System Operation

System Operation

Application Program Execution

The CPU processes the program from 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 You can add the execution times for all the instructions in your program to determine how much time is required to execute the instructions. For example, the execution time for a DL330 running the program shown would be calculated as follows. Instruction

Time

STR 000 OR 160 ANDN 001 OUT 020 STRN 161 DSTR K10 STRN 162 DOUT R400 STRN 163 DSTR K50 STRN 164 DOUT R402 STR 005 ANDN 010 OUT 021 END

6.6ms 6.6ms 8.4ms 7.5ms 9.1ms 14.3ms 9.1ms 52.6ms 9.1ms 14.3ms 9.1ms 52.6ms 6.6ms 8.4ms 7.5ms

TOTAL

221.8ms

000

001

020 OUT

160

161

DSTR F50 K10

162

DOUT F60 R400

163

DSTR F50 K50

164

005

DOUT F60 R402 010

021 OUT

END

NOTE: Appendix C provides the instruction execution times for the DL305 CPUs.