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

The text of a manual · part 46 of 60

SYSMAC CQM1/CPM1/CPM1A/SRM1 Programmable Controllers Programming Manual: SECTION 7 PC Operations and Processing Time, pages 416 to 424

Pages 416 to 424 of 520, from SYSMAC CQM1/CPM1/CPM1A/SRM1 Programmable Controllers Programming Manual

The original document is the PDF (2.1 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 Omron CQM1-CPU21

Page 416

Section

CQM1 Cycle Time and I/O Response Time Code

Mnemonic DBS

ON execution time (µs) 28.3 62.4 136.4

Constant ÷ word → word Word ÷ word → word

MBSL

94.0

Word × word → word

167.6

DM × DM → DM

86.3

Word ÷ word → word

DBSL

Conditions

160.4

DM ÷ DM → DM

31.0 33.7 82.4

Comparing a constant and word Comparing words

CPSL

51.3

Comparing words

102.6

Comparing DM

41.3 44.5 92.7

Converting a constant → word Converting a word → word

NEGL

51.1

Converting a constant → words

103.2

Converting DM → DM

38.2 44.7 114.6

Comparing a constant to a word range Comparing a word to a word range

CPSL

77.7

Comparing words to a word range

151.4

Comparing DM to a DM range

35.3

Transferring 1 bit between words with a constant for control data Transferring 1 bit between words with a word for control data

ACC

SCL2 SCL3

2.5 2.5

2.5 2.5

Converting DM → DM

ZCP

PLS2

2.5

Comparing DM

NEG

56.8 298.3

OFF execution time (µs) 2.5

DM ÷ DM → DM

CPS

XFRB

7-1

2.5 2.5

Comparing DM to a DM range 2.5 2.5

Transferring 255 bits between DM with DM for control data

821.7

Words for control words

849.0

DM for control words

547.3

Mode 0: Words for control words

577.0

Mode 0: DM for control words

392.8

Mode 1: Words for control words

424.0

Mode 1: DM for control words

404.8

Mode 2: Words for control words

430.3

Mode 2: DM for control words

259.5

Mode 3: Words for control words

418.3

Mode 3: DM for control words

105.0

Word to word conversion, words for parameter words

179.8

DM to DM conversion, DM for parameter words

112.0

Word to word conversion, words for parameter words

186.8

DM to DM conversion, DM for parameter words

2.5 2.5

2.5 2.5

399

Page 417

Section

CPM1/CPM1A Cycle Time and I/O Response Time

7-2

7-2

CPM1/CPM1A Cycle Time and I/O Response Time

7-2-1 The CPM1/CPM1A Cycle The overall flow of CPM1/CPM1A operation is as shown in the following flowchart.

Power application

Initialization processes

Initialization

Check hardware and Program Memory. No

Check OK? Overseeing processes Yes

Set error flags and activate indicators.

ERROR or ALARM? ERROR (lit)

Preset cycle time monitoring time. ALARM (flashing)

Execute user program. End of program?

No

Program execution

Yes Check cycle time setting. Minimum cycle time set? Yes

Cycle time No Cycle time processing

Wait until minimum cycle time expires.

Compute cycle time.

Refresh input bits and output terminals.

I/O refreshing

Service peripheral port.

Service peripheral port.

Note Initialization processes include clearing the IR, SR, and AR areas, presetting system timers, and checking I/O Units.

400

Page 418

Section

CPM1/CPM1A Cycle Time and I/O Response Time

7-2

7-2-2 CPM1/CPM1A Cycle Time The processes involved in a single CPM1/CPM1A cycle are shown in the following table, and their respective processing times are explained. Process

Content

Time requirements

Overseeing

Setting cycle watchdog timer, I/O bus check, UM check, clock refreshing, refreshing bits allocated to new functions, etc.

0.6 ms

Program execution

User program is executed.

Total time for executing instructions. (Varies according to content of user’s program.)

Cycle time calculation

Standby until set time, when minimum cycle time is set in DM 6619 of PC Setup.

Almost instantaneous, except for standby processing.

I/O refresh

Calculation of cycle time. Input information is read to input bits. Output information (results of executing program) is written to output bits.

Peripheral port servicing

Devices connected to peripheral port serviced.

10-point CPU : 0.06 ms 20-point CPU: 0.06 ms 30-point CPU: 0.3 ms Expansion I/O Unit 0.3 ms 0.26 ms min., 5% or less of cycle time up to 66 ms (see note)

Note The percentage of the cycle allocated to peripheral port servicing can be changed in the PC Setup (DM 6617).

Cycle Time and Operations

Cycle time 10 ms or longer 20 ms or longer 100 ms or longer 120 ms or longer 200 ms or longer

The effects of the cycle time on CPM1/CPM1A operations are as shown below. When a long cycle time is affecting operation, either reduce the cycle time or improve responsiveness with interrupt programs. Operation conditions

TIMH(15) may be inaccurate when TC 004 through TC 127 are used (operation will be normal for TC 000 through TC 003). Programming using the 0.02-second Clock Bit (SR 25401) may be inaccurate. TIM may be inaccurate. Programming using the 0.1-second Clock Bit (SR 25500) may be inaccurate. A CYCLE TIME OVER error is generated (SR 25309 will turn ON). See note 1. The FALS 9F monitoring time SV is exceeded. A system error (FALS 9F) is generated, and operation stops. See note 2. Programming using the 0.2-second Clock Bit (SR 25501) may be inaccurate.

Note

1. The PC Setup (DM 6655) can be used to disable detection of CYCLE TIME OVER error. 2. The cycle monitoring time can be changed in the PC Setup (DM 6618).

Cycle Time Example

In this example, the cycle time is calculated for a CPM1/CPM1A CPU Unit with 20 I/O points (12 input points and 8 output points). The I/O is configured as follows: Inputs: 1 word (00000 to 00011) Outputs: 1 word (01000 to 01007) The rest of the operating conditions are assumed to be as follows: User’s program:500 instructions (consists of only LD and OUT) Cycle time: Variable (no minimum set)

401

Page 419

Section

CPM1/CPM1A Cycle Time and I/O Response Time

7-2

The average processing time for a single instruction in the user’s program is assumed to be 2.86 µs. The cycle times are as shown in the following table. Process

Calculation method

1. Overseeing

Fixed

0.6 ms

Time without peripheral device 0.6 ms

2. Program execution

2.86 × 500 (µs)

1.43 ms

1.43 ms

3. Cycle time calculation

Negligible

0 ms

0 ms

4. I/O refresh

0.01 × 1 + 0.005 × 1 (µs)

0.06 ms

0.06 ms

5. Peripheral port servicing

Minimum time

0.26 ms

0 ms

Cycle time

(1) + (2) + (3) + (4) + (5)

2.35 ms

2.09 ms

Note

Time with peripheral device

1. The cycle time can be read from the PC via a Peripheral Device. 2. The maximum and current cycle time are stored in AR 14 and AR 15. 3. The cycle time can vary with actual operating conditions and will not necessarily agree precisely with the calculated value.

7-2-3 I/O Response Time The I/O response time is the time it takes after an input signal has been received (i.e., after an input bit has turned ON) for the PC to check and process the information and to output a control signal (i.e., to output the result of the processing to an output bit). The I/O response time varies according to the timing and processing conditions. The minimum and maximum I/O response times are shown here, using the following program as an example. Output Input

The following conditions are taken as examples for calculating the I/O response times. Input ON delay: Overseeing time: Instruction execution time: Output ON delay: Peripheral port:

8 ms (input time constant: default setting) 1 ms (includes I/O refresh for CPM1A) 14 ms 10 ms Not used.

Minimum I/O Response Time The CPM1/CPM1A responds most quickly when it receives an input signal just prior to I/O refreshing, as shown in the illustration below. Input point

Input ON delay (8 ms)

Input bit I/O refreshing

Program execution and other processes (15 ms)

I/O refreshing Output ON delay (10 ms)

Output point Min. I/O response time = 8+15+10 = 33 ms

402

Page 420

Section

CPM1/CPM1A Cycle Time and I/O Response Time

7-2

Maximum I/O Response Time The CPM1/CPM1A takes longest to respond when it receives the input signal just after the input refresh phase of the cycle, as shown in the illustration below. In that case, a delay of approximately one cycle will occur. Input point

Input ON delay (8 ms)

Input bit I/O refreshing

Program execution and other processes (15 ms)

I/O refreshing

Program execution and other processes (15 ms)

I/O refreshing Output ON delay (10 ms)

Output point Max. I/O response time = 8+15 × 2+10 = 48 ms

7-2-4 One-to-one Link I/O Response Time When two CPM1/CPM1As are linked one-to-one, the I/O response time is the time required for an input executed at one of the CPM1/CPM1As to be output to the other CPM1/CPM1A by means of one-to-one link communications. The minimum and maximum I/O response times are shown here, using as an example the following instructions executed at the master and the slave. In this example, communications proceed from the master to the slave.

Master

Slave Output (LR)

Input

Input (LR)

Output

The following conditions are taken as examples for calculating the I/O response times. In CPM1/CPM1A PCs, LR area words LR 00 to LR 15 are used in one-toone links and the transmission time is fixed at 12 ms. Input ON delay: Master cycle time: Slave cycle time: Output ON delay: Peripheral port:

8 ms (input time constant: default setting) 10 ms 15 ms 10 ms Not used.

Minimum I/O Response Time The CPM1/CPM1A responds most quickly under the following circumstances: 1, 2, 3...

1. The CPM1/CPM1A receives an input signal just prior to the input refresh phase of the cycle. 2. The Master’s communications servicing occurs just as the master-to-slave transmission begins.

403

Page 421

Section

CPM1/CPM1A Cycle Time and I/O Response Time

7-2

3. The Slave’s communications servicing occurs just after the transmission is completed. Input point

I/O refresh Overseeing, communications, etc.

Input ON delay (8 ms)

Input bit

Master

Program execution

CPU processing

Master’s cycle time (10 ms)

Master to Slave

Transmission time (12 ms) Program execution

CPU processing

Output ON Slave’s cycle time (15 ms) delay (10 ms)

Slave Output point

Min. I/O response time = 8+10+12+15+10 = 55 ms

Calculation formula = Input ON response time + Master’s cycle time + Slave’s cycle time + Output ON response time Maximum I/O Response Time The CPM1/CPM1A takes the longest to respond under the following circumstances: 1, 2, 3...

1. The CPM1/CPM1A receives an input signal just after the input refresh phase of the cycle. 2. The Master’s communications servicing just misses the master-to-slave transmission. 3. The transmission is completed just after the Slave’s communications servicing ends.

I/O Maximum Response Time Input ON response time + Master’s cycle time x 2 + Transmission time x 3 + Output ON response time Input point

I/O refresh Input ON response time

Peripheral port servicing

Master Input bit CPU processing

Program execution

Program execution

Program execution

Master #1

(Data transmission according to input point) Master to Slave

CPU processing

Transmission time

Program execution

Slave #1 Slave

Program execution

Slave to Master

Program execution

Transmission time

Master to Slave

Transmission time

Program execution

Slave #2

Program execution

Slave #3

Output point Maximum I/O response time = 8 + 10 x 2 + 12 x 3 + 15 x 3 + 10 = 119 (ms)

404

Output OFF response time

Page 422

Section

CPM1/CPM1A Cycle Time and I/O Response Time

7-2

7-2-5 Interrupt Processing Time This section explains the processing times involved from the time an interrupt is executed until the interrupt processing routine is called, and from the time an interrupt processing routine is completed until returning to the initial location. This explanation applies to input interrupts, interval timer interrupts, and high-speed counter interrupts. 1, 2, 3...

Item Interrupt ON delay Wait for completion of interrupt-mask processing Change to interrupt processing Return

1. Source of interrupt 2. Interrupt ON delay 3. Wait for completion of interrupt-mask processing 4. Change to interrupt processing 5. Interrupt routing (CPM1A only) 6. Return to initial location The table below shows the times involved from the generation of an interrupt signal until the interrupt processing routine is called, and from when the interrupt processing routine is completed until returning to the original position. Contents

Time

This is the delay time from the time the interrupt input bit turns ON until the time that the interrupt is executed. This is unrelated to other interrupts. This is the time during which interrupts are waiting until processing has been completed. This situation occurs when a mask processes is executed. It is explained below in more detail.

100 µs

This is the time it takes to change processing to an interrupt.

30 µs

This is the time it takes, from execution of RET(93), to return to the processing that was interrupted.

30 µs

See below.

Mask Processing Interrupts are masked during processing of the operations described below. Until the processing is completed, any interrupts will remain masked for the indicated times. Generation and clearing of non-fatal errors: When a non-fatal error is generated and the error contents are registered at the CPM1, or when an error is being cleared, interrupts will be masked for a maximum of 100 µs until the processing has been completed. Online editing: Interrupts will be masked for a maximum of 600 ms (i.e.: editing DM 6144 to DM 6655) when online editing is executed during operation. In addition, the system processing may have to wait for a maximum of 170 µs during this processing. Example Calculation

This example shows the interrupt response time (i.e., the time from when the interrupt input turns ON until the start of the interrupt processing routine) when input interrupts are used under the conditions shown below. Minimum Response Time Interrupt ON delay: 100 µs Interrupt mask standby time: 0 µs 30 µs + Change-to-interrupt processing: Minimum response time: 130 µs Maximum Response Time (Except for the Online Editing of DM 6144 to DM6655) Interrupt ON delay: 100 µs Interrupt mask standby time: 170 µs 30 µs + Change-to-interrupt processing: Maximum response time: 300 µs

405

Page 423

Section

CPM1/CPM1A Cycle Time and I/O Response Time

7-2

In addition to the response time shown above, the time required for executing the interrupt processing routine itself and a return time of 30 µs must also be accounted for when returning to the process that was interrupted.

7-2-6 CPM1/CPM1A Instruction Execution Times The following table lists the execution times for CPM1/CPM1A instructions. Basic Instructions Code

Mnemonic

ON execution time (µs)

---------------------------

LD LD NOT AND AND NOT OR OR NOT AND LD OR LD OUT OUT NOT SET RSET TIM

1.72

---

CNT

Conditions (Top: min.; bottom: max.)

OFF execution time (µs) RSET ---

Any

IL

JMP

1.32

0.72 4.0 5.8 5.9 10.0

Constant for SV

12.5

DM for SV Constant for SV DM for SV

16.2 31.4 14.1 29.1

16.0 31 6.2 6.2

6.4 6.4 6.6 6.6

Special Instructions Code

Mnemonic

00 01 02 03 04 05 06 07 08 09 10

NOP END IL ILC JMP JME FAL FALS STEP SNXT SFT

11

KEEP

12

CNTR

ON execution time (µs) 0.36 10.8 4.6 3.6 4.3 4.7 38.5 5.0 14.9 14.2

With 1-word shift register With 10-word shift register With 100-word shift register Any

Constant for SV

Any

13

DIFU

14

DIFD

11.0

OFF execution time (µs)

Any

21.9 34.1 93.6 6.2

25.8 41.2 11.8

406

Conditions (Top: min.; bottom: max.)

DM for SV Any

2.6 3.6 2.4 4.7 5.5 5.4 11.1 7.6 Reset 19.7 26.5 60.1 Reset 6.1 Reset 16.8

IL 2.6 2.6 2.6 IL 3.1 IL 12.2

JMP 2.6 2.6 2.6 JMP 3.1 JMP 12.2

Shift 10.1 Shift 10.0

IL 12.2 IL 9.9

JMP 12.2 JMP 2.3

Page 424

Section

CPM1/CPM1A Cycle Time and I/O Response Time Code

Mnemonic

15

TIMH

16

17

20

21

22

23 24

WSFT

ASFT

CMP

MOV

MVN

BIN BCD

25

ASL

26

ASR

27 28 29 30

31

ROL ROR COM ADD

SUB

ON execution time (µs)

Conditions (Top: min.; bottom: max.)

7-2

OFF execution time (µs) Reset 25.7

IL 28.4

JMP 15.8

43.6

15.8

19.0 20.2 19.0 20.2

Regular execution, constant for SV Interrupt execution, constant for SV Regular execution, DM for SV Interrupt execution, DM for SV

41.2

29.2 40.7 1.42 ms

With 1-word shift register With 10-word shift register

5.6

29.6 50.2 1.76 ms

Shifting a word Shifting 10 words

15.8 17.2 46.3

When comparing a constant to a word When comparing two words

16.3 17.7 45.5

When transferring a constant to a word When moving from one word to another

16.4 17.5 45.7

When transferring a constant to a word When moving from one word to another

31.6 45.7

When converting a word to a word

29.5 57.3

When converting a word to a word

17.3 31.3

When shifting a word

16.9 31.1

When shifting a word

14.5 28.5

When rotating a word

14.5 28.5

When rotating a word

18.1 32.1

When inverting a word

29.5 30.9 72.7

Constant + word → word Word + word → word

29.3 30.5 72.5

Constant – word → word Word – word → word

With 1,024-word shift register using DM 5.6

Shifting 1,023 words via DM 5.6

When comparing two DM 5.6

When transferring DM to DM 5.6

When transferring DM to DM 5.6

When converting DM to DM 5.6

When converting DM to DM 5.5

When shifting DM 5.5

When shifting DM 5.5

When rotating DM 5.5

When rotating DM 5.5

When inverting DM 5.6

DM + DM → DM 5.6

DM – DM → DM

32

MUL

49.1 50.5 95.1

Constant word → word Word word → word DM DM → DM

5.6

33

DIV

47.7 50.9 94.3

Word ÷ constant → word word ÷ word → word

5.6

DM ÷ DM → DM

407