CPM2A_PROGRAMMING MANUAL (W353-E1-2) (986750), страница 85
Текст из файла (страница 85)
Thisexplanation applies to input interrupts, interval timer interrupts, and high-speedcounter interrupts.1, 2, 3...ItemInterrupt ON delayWait for completion ofinterrupt-mask processingChange to interruptprocessingReturn1. Source of interrupt2. Interrupt ON delay3.
Wait for completion of interrupt-mask processing4. Change to interrupt processing5. Interrupt routing (CPM1A only)6. Return to initial locationThe table below shows the times involved from the generation of an interrupt signal until the interrupt processing routine is called, and from when the interruptprocessing routine is completed until returning to the original position.ContentsTimeThis is the delay time from the time the interrupt input bit turns ON until thetime that the interrupt is executed.
This is unrelated to other interrupts.This is the time during which interrupts are waiting until processing hasbeen completed. This situation occurs when a mask processes isexecuted. It is explained below in more detail.100 µsThis is the time it takes to change processing to an interrupt.30 µsThis is the time it takes, from execution of RET(93), to return to the processing that was interrupted.30 µsSee below.Mask ProcessingInterrupts 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 atthe CPM1, or when an error is being cleared, interrupts will be masked for amaximum 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 toDM 6655) when online editing is executed during operation.
In addition, thesystem processing may have to wait for a maximum of 170 µs during thisprocessing.Example CalculationThis example shows the interrupt response time (i.e., the time from when theinterrupt input turns ON until the start of the interrupt processing routine) wheninput interrupts are used under the conditions shown below.Minimum Response TimeInterrupt ON delay:100 µsInterrupt mask standby time:0 µs30 µs+Change-to-interrupt processing:Minimum response time:130 µsMaximum Response Time(Except for the Online Editing of DM 6144 to DM6655)Interrupt ON delay:100 µsInterrupt mask standby time:170 µs30 µs+Change-to-interrupt processing:Maximum response time:300 µs489SectionCPM1/CPM1A Cycle Time and I/O Response Time8-1In addition to the response time shown above, the time required for executingthe interrupt processing routine itself and a return time of 30 µs must also be accounted for when returning to the process that was interrupted.8-1-6 CPM1/CPM1A Instruction Execution TimesThe following table lists the execution times for CPM1/CPM1A instructions.Basic InstructionsCodeMnemonicON executiontime (µs)---------------------------LDLD NOTANDAND NOTOROR NOTAND LDOR LDOUTOUT NOTSETRSETTIM1.72---CNTConditions (Top: min.; bottom: max.)OFF execution time (µs)RSET---AnyILJMP1.320.724.05.85.910.0Constant for SV12.5DM for SVConstant for SVDM for SV16.231.414.129.116.0316.26.26.46.46.66.6Special InstructionsCodeMnemonic0001020304050607080910NOPENDILILCJMPJMEFALFALSSTEPSNXTSFT11KEEP12CNTRON executiontime (µs)0.3610.84.63.64.34.738.55.014.914.2With 1-word shift registerWith 10-word shift registerWith 100-word shift registerAnyConstant for SVAny13DIFU14DIFD11.0OFF execution time (µs)Any21.934.193.66.225.841.211.8490Conditions (Top: min.; bottom: max.)DM for SVAny2.63.62.44.75.55.411.17.6Reset19.726.560.1Reset6.1Reset16.8IL2.62.62.6IL3.1IL12.2JMP2.62.62.6JMP3.1JMP12.2Shift10.1Shift10.0IL12.2IL9.9JMP12.2JMP2.3SectionCPM1/CPM1A Cycle Time and I/O Response TimeCodeMnemonic15TIMHON executiontime (µs)19.020.219.020.216WSFT29.240.71.42 ms17ASFT29.650.21.76 ms20CMP15.817.246.321MOV16.317.745.522MVN16.417.545.723BIN31.645.724BCD29.557.325ASL17.331.326ASR16.931.127ROL14.528.528ROR14.528.529COM18.132.130ADD29.530.972.731SUB29.330.572.532MUL49.150.595.133DIV47.750.994.334ANDW27.128.770.7Conditions (Top: min.; bottom: max.)Regular execution, constant for SVInterrupt execution, constant for SVRegular execution, DM for SVInterrupt execution, DM for SVWith 1-word shift registerWith 10-word shift register8-1OFF execution time (µs)Reset25.7IL28.4JMP15.841.243.615.85.6With 1,024-word shift register using DMShifting a wordShifting 10 words5.6Shifting 1,023 words via DMWhen comparing a constant to a wordWhen comparing two words5.6When comparing two DMWhen transferring a constant to a wordWhen transferring from one word to another5.6When transferring DM to DMWhen transferring a constant to a wordWhen transferring from one word to another5.6When transferring DM to DMWhen converting a word to a word5.6When converting DM to DMWhen converting a word to a word5.6When converting DM to DMWhen shifting a word5.5When shifting DMWhen shifting a word5.5When shifting DMWhen rotating a word5.5When rotating DMWhen rotating a word5.5When rotating DMWhen inverting a word5.5When inverting DMConstant + word → wordWord + word → word5.6DM + DM → DMConstant – word → wordWord – word → word5.6DM – DM → DMConstant word → wordWord word → word5.6DM DM → DMWord ÷ constant → wordword ÷ word → word5.6DM ÷ DM → DMConstant Ɠ word → wordWord Ɠ word → word5.6DM Ɠ DM → DM491SectionCPM1/CPM1A Cycle Time and I/O Response TimeCodeMnemonic35ORW36XORW27.128.770.537XNRW27.028.670.538INC17.931.939DEC18.332.3404146STCCLCMSG6.36.350ADB51SBBON executiontime (µs)27.128.770.721.535.730.532.173.930.932.774.552MLB34.736.380.753DVB35.136.781.154ADDL48.994.755SUBL48.994.756MULL138.7184.357DIVL136.7181.360CMPL30.460.86162492INIPRV112.0126.048.048.0120.0128.046.060.062.278.0Conditions (Top: min.; bottom: max.)Constant V word → wordWord V word → wordOFF execution time (µs)5.6DM V DM → DMConstant V word → wordWord V word → word5.6DM V DM → DMConstant V word → wordWord V word → word5.6DM V DM → DMWhen incrementing a word5.5When incrementing DMWhen decrementing a word5.5When decrementing DMAnyWith message in words5.55.55.5With message in DMConstant + word → wordWord + word → word5.6DM + DM → DMConstant – word → wordWord – word → word5.6DM – DM → DMConstant word → wordWord word → word5.6DM DM → DMWord ÷ constant → wordWord ÷ word → word5.6DM ÷ DM → DMWord + word → word5.6DM + DM → DMWord – word → word5.6DM – DM → DMWord word → word5.6DM DM → DMWord ÷ word → word5.6DM ÷ DM → DMComparing words5.6Comparing DMStarting comparison via word5.6Starting comparison via DMStopping comparison via wordStopping comparison via DMChanging PV via wordChanging PV via DMStopping pulse output via wordStopping pulse output via DMDesignating output via wordDesignating output via DM8-15.6SectionCPM1/CPM1A Cycle Time and I/O Response TimeCodeMnemonic63CTBLON executiontime (µs)106.3120.3Conditions (Top: min.; bottom: max.)Target table with 1 target in words and startOFF execution time (µs)5.6Target table with 1 target in DM and start775.5799.5Target table with 16 targets in words and start711.5722.5Range table in words and start91.9106.3Target table with 1 target in words693.5709.5Target table with 16 targets in words607.5621.5Range table in wordsTarget table with 16 targets in DM and startRange table in DM and startTarget table with 1 target in DMTarget table with 16 targets in DMRange table in DM64SPED73.675.088.8Specifying a constantSpecifying a word5.6Specifying DM5.665PULS62.078.0Specifying a word5.667BCNT52.64.08 msCounting a word68BCMP79.680.8123.2Comparing constant, results to wordComparing word, results to word69STIM47.558.747.959.133.563.525.754.1Word-set one-shot interrupt start45.547.11.78 msWhen transferring a constant to a wordWhen transferring a word to a word70XFERSpecifying DMDM-set scheduled interrupt startWord-set timer readDM-set timer readWord-set timer stopDM-set timer stop5.6When transferring 1,024 words using DMWhen setting a constant to 1 wordWhen setting word constant to 10 words73XCHG30.559.1Word → word74SLD25.951.73.02 msShifting 1 wordShifting 10 word75SRD25.951.73.02 msShifting 1 wordShifting 10 word47.792.7When decoding word to word59.595.5When encoding word to wordDMPX5.6DM-set one-shot interrupt startWord-set scheduled interrupt start28.138.31.12 ms775.6Comparing DM, results to DMBSETMLPX5.6Counting 6,656 words via DM71768-15.6When setting DM to 1,024 words5.6DM → DM5.6Shifting 1024 words using DM5.6Shifting 1,024 words using DM5.6When decoding DM to DM5.6When encoding DM to DM493SectionCPM1/CPM1A Cycle Time and I/O Response TimeCodeMnemonic78SDEC80DIST8182838485COLLMOVBMOVDSFTRTCMPON executiontime (µs)51.196.3Conditions (Top: min.; bottom: max.)When decoding word to wordWhen setting a constant to a word + a wordWhen setting a word to a word + a word42.643.683.478.079.21.76 msWhen setting a constant + a word to a wordWhen setting a word + a word to a word66.868.0112.0When setting a word + constant to LIFO stackWhen setting a word + word to LIFO stack32.537.579.1When transferring a constant to a wordWhen transferring from one word to another28.333.375.5When transferring a constant to a wordWhen transferring from one word to another39.352.91.42 msShifting 1 wordShifting 10 word57.758.9101.9Comparing constant to word-set tableComparing word to word-set table5.6When setting DM + DM to DMWhen setting a word + constant to FIFO stackWhen setting a word + word to FIFO stackWhen setting a DM + DM toFIFO stack via DMWhen setting a DM + DM toLIFO stack via DM5.6When transferring DM to DM5.6When transferring DM to DM5.6Shifting 1,024 words using DM5.6Comparing DM to DM-set table56.7103.9Word → word89INT32.346.329.143.127.341.529.743.715.315.315.915.9Set masks via word36.61.715.0Any4945.6When setting DM to a stack via DMASCSBSSBNRET5.6When setting DM to DM +DMWhen setting a constant to a stackWhen setting a word to a stack86919293OFF execution time (µs)When decoding DM to DM39.140.984.763.465.0109.68-15.6DM → DM5.6Set masks via DMClear interrupts via wordClear interrupts via DMRead mask status via wordRead mask status via DMChange counter SV via wordChange counter SV via DMMask all interrupts via wordMask all interrupts via DMClear all interrupts via wordClear all interrupts via DM5.51.72.5SectionCPM2A/CPM2C Cycle Time and I/O Response TimeCodeMnemonic97IORF99MCRO8-2ON executiontime (µs)40.0142.6135.474.0116.4Conditions (Top: min.; bottom: max.)8-2OFF execution time (µs)6.0Refreshing IR 000Refreshing one input wordRefreshing one output wordWith word-set I/O operands5.6With DM-set I/O operandsCPM2A/CPM2C Cycle Time and I/O Response Time8-2-1 CPM2A/CPM2C Cycle TimeThe processes involved in a single CPM2A/CPM2C cycle are shown in the following table, and their respective processing times are explained.ProcessContentTime requirementsOverseeingSetting cycle watchdog timer, I/O bus check, UMcheck, clock refreshing, refreshing bits allocated tonew functions.0.3 msProgramexecutionCycle timecalculationUser program is executed.Total time for executing instructions.
(Variesaccording to content of user’s program.)Negligible except for the delay itself when required.I/O refreshingAutomatic delay until minimum cycle time when aminimum cycle time is set in DM 6619 of PC Setup.Calculation of cycle time.Output information (results of executing program) iswritten to output bits.Input information is read to input bits.RS-232C portservicingPeripheral portservicingCPM2C CPU Unit:20-point CPM2A CPU Unit:30-point CPM2A CPU Unit:40-point CPM2A CPU Unit:60-point CPM2A CPU Unit:Expansion I/O Unit:0.06 ms0.06 ms0.3 ms0.3 ms0.54 ms0.3 msCommunications processing when a ProgrammingDevice or Communications Adapter is connected tothe RS-232C port.0.55 ms min., 5% or less of cycle time up to131 msDevices connected to peripheral port serviced.0.55 ms min., 5% or less of cycle time up to131 ms(The percentage of cycle time allocated toRS-232C servicing can be set in DM 6616.)(The percentage of cycle time allocated to peripheral port servicing can be set in DM 6617.)Cycle Time and OperationsCycle time1 ms or longer10 ms or longer20 ms or longer100 ms or longer120 ms or longer200 ms or longerThe effects of the cycle time on CPM2A/CPM2C 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 conditionsTMHH(––) may be inaccurate when TC 000 through TC 003 or TC 008 through TC 255 are used(operation will be normal for TC 004 through TC 007).TIMH(15) may be inaccurate when TC 004 through TC 255 are used (operation will be normal forTC 000 through TC 003).Programming using the 0.02-second Clock Bit (SR 25401) may be inaccurate.TIM may be inaccurate.