CPM2A_PROGRAMMING MANUAL (W353-E1-2) (986750), страница 87
Текст из файла (страница 87)
The cycle time can be read using Programming Devices.2. Cycle time maximum and current cycle time are stored in AR 14 and AR 15.3. Change to processing will cause cycle times to change therefore the calculated values and actual values (for cycle time) will no always match.509SectionSRM1(-V2) Cycle Time and I/O Response Time8-38-3-2 SRM1(-V2) Cycle TimeThe processes involved in a single SRM1(-V2) cycle are shown in the followingtable, and their respective processing times are explained.ProcessContentTime requirementsOverseeingSetting cycle watchdog timer, UM check, etc.0.18 msCompoBus/S end waitWaiting for CompoBus/S processing to finishInput refreshingInput information is read to input bits.CompoBus/S communications response time – Overseeing time –RS-232C port servicing time – peripheral port servicing time0.02 msProgram executionUser program is executed.Cycle time calculationOutput refreshingRefer to 8-3-6 SRM1(-V2) Instruction ExecutionTimes.Standby until set time, when minimum cycle time isset in DM 6619 of PC Setup.Calculation of cycle time.Output information (results of executing program) iswritten to output bits.RS-232C port servicingCompoBus/S communications are started.Devices connected to RS-232C port serviced.Peripheral port servicingDevices connected to peripheral port serviced.Minimum Cycle TimeTotal time for executing instructions.(Varies according to content of user’sprogram.)Almost instantaneous, except forstandby processing.0.05 ms5% or less of cycle time, but alwaysbetween 0.55 and 131 ms(Set in DM 6616.)5% or less of cycle time, but alwaysbetween 0.55 and 131 ms(Set in DM 6617.)In SRM1(-V2) PCs, CompoBus/S communications are started after the outputrefresh is completed.
As a result, when the overseeing time plus the RS-232Cport servicing time plus the peripheral port servicing time is shorter than theCompoBus/S communications response time, processing is placed on stand-byuntil CompoBus/S communications are completed.The minimum cycle time therefore is the the CompoBus/S communications response time plus the program execution time plus the input refresh time plus theoutput refresh time. The CompoBus/S communications response time dependson the “maximum number of nodes” and “communications mode” settings, asfollows:Max.
number of nodes Communications mode32High-speed modeLong-distance mode16High-speed modeLong-distance modeCompoBus/S response time0.8 ms6.0 ms0.5 ms4.0 msNote The maximum number of nodes and communications mode are set in the PCSetup (DM 6603).510SectionSRM1(-V2) Cycle Time and I/O Response TimeCycle Time and OperationsThe effects of the cycle time on SRM1(-V2) operations are as shown below.When a long cycle time is affecting operation, either reduce the cycle time or improve responsiveness with interrupt programs.Cycle time10 ms or longer20 ms or longer100 ms or longer120 ms or longer200 ms or longer8-3Operation conditionsTIMH(15) may be inaccurate when TC 004 through TC 127 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.
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.Note1. The PC Setup (DM 6655) can be used to disable detection of CYCLE TIMEOVER error.2.
The cycle monitoring time can be changed in the PC Setup (DM 6618).Cycle Time ExampleThe following is an example of a cycle time calculation.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)RS-232C port: Not used.Max. nodes:32 nodes and high-speed communications mode(CompoBus/S communication response time = 0.8 ms)Peripheral:0.7 msThe average processing time for a single instruction in the user’s program is assumed to be 1.16 µs.
The cycle times are as shown in the following table.ProcessCalculation methodPeripheral port usedPeripheral port not used1. OverseeingFixed0.18 ms0.18 ms2. CompoBus/S end waitSee previous page.0.00 ms0.62 ms3. Input refreshFixed0.02 ms0.02 ms4. Program execution1.16 × 500 (µs)0.8 ms0.8 ms5. Cycle time calculationNegligible0.00 ms0.00 ms6. Output refresh0.01 × 1 + 0.005 × 1 (µs)0.05 ms0.05 ms7. RS-232C port servicingNot required0.00 ms0.00 ms8.
Peripheral port servicing5% of cycle time0.7 ms0.00 msCycle time(1) + (2) + (3) + ...+ (8)1.75 ms1.67 msNote1. The cycle time can be read from the PC via a Programming 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.4. When the peripheral port is used, there is no CompoBus/S end wait time as itis always 0 or less.5.
CompoBus/S end wait time = 0.8 – 0.18 – 0 – 0 = 0.62 (CompoBus/S communication response time – Overseeing – RS-232C port servicing time –peripheral port servicing time.511SectionSRM1(-V2) Cycle Time and I/O Response Time8-38-3-3 I/O Response TimeThe 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).CompoBus/S communications are started when the SRM1(-V2) input refresh finishes. The ON/OFF status is read from the Input Terminals during the input refresh and the ON/OFF status is output to the Output Terminal during the outputrefresh.
Accordingly, the SRM1(-V2) I/O response time varies according to thecycle time and CompoBus/S communications cycle status or I/O timing.Example calculations of the I/O response time are provided next.Minimum I/O Response TimeMinimum I/O response time =Input ON delay + Output ON delay + CompoBus/S communications cycle time +SRM1(-V2) cycle timeCycle timeSRM1(-V2) cycleCompoBus/Scycle timeCommunicationsresponse timeInputdelayInput on SlaveOutputdelayOutput on SlaveMaximum I/O Response TimeMaximum I/O response time =Input ON delay + Output ON delay + CompoBus/S communications cycle time +SRM1(-V2) cycle time x 2Cycle timeSRM1(-V2) cycleCompoBus/Scycle timeCommunicationsresponse timeInput on SlaveOutput on Slave512InputdelayOutputdelaySectionSRM1(-V2) Cycle Time and I/O Response Time8-38-3-4 One-to-one PC Link I/O Response TimeWhen two SRM1s are linked in a 1:1 PC Link, the I/O response time is the timerequired for an input executed at one of the SRM1s to be output to the otherSRM1 by means of 1:1 PC Link communications.Minimum I/O Response Time The SRM1(-V2) responds most quickly under the following circumstances:1, 2, 3...Inputpoint1.
The SRM1(-V2) receives an input signal just prior to the I/O refresh phase ofthe cycle.2. The Master’s communications servicing occurs just as the Master-to-Slavetransmission begins.3. The Slave’s communications servicing occurs just after the transmission iscompleted.I/O refreshOverseeing, communications, etc.Input ON delay (8 ms)InputbitProgramexecutionMaster’s cycle time (10 ms)Master toSlaveTransmission time (39 ms)ProgramexecutionOutput ONSlave’s cycle time (15 ms) delay (10 ms)OutputpointMin. I/O response time = 8+10+39+15+10 = 82 msMaximum I/O Response Time The SRM1(-V2) takes the longest to respond under the following circumstances:1, 2, 3...1. The SRM1(-V2) receives an input signal just after the I/O refresh phase ofthe cycle.2.
The Master’s communications servicing just misses the Master-to-Slavetransmission.513SectionSRM1(-V2) Cycle Time and I/O Response Time8-33. The transmission is completed just after the Slave’s communications servicing ends.InputpointI/O refreshInput ON delay (8 ms)Overseeing, communications, etc.InputbitProgramexecutionProgramexecutionMaster’s cycle time (10 ms)Master toSlaveSlave toMasterMaster toSlaveTransmission time (39 ms × 3)ProgramexecutionProgramexecutionSlave’s cycle time (15 ms)Output ONdelay (10 ms)OutputpointMax.
I/O response time = 8 + 10 × 2 + 39 × 3 + 15× 2 + 10 = 185 ms8-3-5 Interrupt Processing TimeThis section explains the processing times involved from the time an interrupt isexecuted until the interrupt processing routine is called, and from the time an interrupt processing routine is completed until returning to the initial location. Thisexplanation applies to input, interval timer interrupts.1, 2, 3...Item1. Source of interrupt2. Wait for completion of interrupt-mask processing3.
Change to interrupt processing4. Interrupt routing (CPM1A only)5. 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.ContentsTimeWait for completion ofinterrupt-mask processingThis 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.See below.Change to interruptprocessingReturnThis is the time it takes to change processing to an interrupt.15 µsThis is the time it takes, from execution of RET(93), to return to the processing that was interrupted.15 µsMask ProcessingInterrupts are masked during processing of the operations described below.