CPM2A_OPERATION MANUAL (W352-E1-3) (986749), страница 7
Текст из файла (страница 7)
If IORF(97) is executed too frequently, a fatal system error may occur (FALS 9F), stopping operation. The intervalbetween executions of IORF(97) should be at least 1.3 ms + total execution timeof the interrupt subroutine.IORF(97) can be executed in the program to refresh a specified range of I/Owords. The specified I/O words will be refreshed when IORF(97) is executed.IORF(97) can be used to refresh I/O from the main program or the interrupt program.15SectionFunctions Listed by Usage1-4When IORF(97) is used, the cycle time is extended by the time required to refresh the specified I/O words.Overseeing processesMain programIORF(97) executed.CycletimeImmediate refreshingI/O refreshingI/O refreshingRS-232C port servicingPeripheral port servicing1-4Functions Listed by UsageMachine Control FunctionsUsageReceive high-speedcount inputs(For example, calculatinglength or position with anencoder).Max.
count frequency of 2 kHz(single-phase)Max. count frequency of 5 kHz (differentialphase) or 20 kHz (single-phase)Generate a pulse output based on a multiple of an input pulse tosynchronize control of a peripheral process with the main process.The multiple for the peripheral process (such as tool feed rate) can bechanged during operation by calculating the multiple from another inputvalue (such as an encoder) in the peripheral process.This method can be used to change the process for different productsor models without stopping the equipment.16FunctionUse interrupt input (counter mode) toread the present value withoutinterrupts.Use high-speed counter to read thepresent value without interrupts.Pulse synchronizationRefertoW353SectionFunctions Listed by UsageUsageMultiply the input pulse frequency from a high-speed counter by a fixedmultiple, convert that value to an analog value, and output as ananalog output.(For example, synchronizing the speed of a supply conveyor with therotational position of the main piece of equipment (such as a labelinserter) measured by an analog input.)Reliably receive input pulses with an ON-time shorter than the cycletime (such as inputs from a photomicrosensor).Interrupt functionsExecute a special process very quicklywhen an input goes ON.(For example, operating a cutter when aninterrupt input is received from a ProximitySwitch or Photoelectric Switch.)Count input ON pulses and execute aspecial process very quickly when thecount reaches the preset value.(For example, stopping the supply feedwhen a preset number of workpieces havepassed through the system.)Execute a special process at a presetcount value.(For example, cutting material veryprecisely at a given length.)Execute a special process when the countis within a preset range.(For example, sorting material very quicklywhen it is within a given length range.)Execute a special process when a timertimes out.(For example, stopping a conveyor at veryprecise time (independent of the cycletime) after the workpiece is detected.)Repeat a special process at regularintervals.(For example, the speed of a sheet feedercan be monitored by measuring the inputsignal from an encoder at regular intervalsand calculating the speed.)Perform simple positioning by outputting pulses to a motor driver thataccepts pulse-train inputs.Use a variable duty-ratio output to perform time-allocated temperaturecontrol.Easily set and fine-tune settings such as the low-speed feed rate whena conveyor is temporarily stopped.Receive an analog input and output an analog output.Receive temperature sensor input directly at the PC.Reduce required wiring, space, and PC load by controlling equipmentwith a few low-capacity PCs dispersed near the equipment rather thana single, large, centralized PC.(Create a remote I/O link with a CompoBus/S Master and CompoBus/SSlaves.)FunctionPulse synchronization and analogoutput function1-4RefertoW353Quick-response input functionInterrupt input (interrupt input mode)Interrupt input (counter mode)High-speed counter interruptgenerated when the count matchesthe set value.High-speed counter interruptgenerated when the count is within theset range.Interval timer interrupt(One-shot mode)Interval timer interrupt(Scheduled interrupt mode)Pulse output functionAnalog input + Variable duty-ratiooutput pulse function (PWM(––))Analog controlsAnalog I/O Unit(Connect the Analog I/O Unit to theCPU Unit.)Temperature Sensor Unit(Connect the Temperature SensorUnit to the CPU Unit.)CompoBus/S I/O Link Unit(Connect the CompoBus/S I/O LinkUnit to the CPU Unit.)17SectionComparison with the CPM1A1-5Basic FunctionsUsageSet the cycle time to a fixed interval.Stop PC operation when the cycle time exceeds amaximum setting.Keep all outputs ON when PC operation stops.Retain the contents of I/O memory when startingoperation.Retain the contents of I/O memory when the PC isturned on.Eliminate effects from chattering and external noise.FunctionSet a minimum (fixed) cycle time in the PC Setup.Set a maximum (watch) cycle time in the PC Setup.RefertoW353Turn ON the IOM Hold Bit (SR 25212).Turn ON the IOM Hold Bit (SR 25212).Turn ON the IOM Hold Bit (SR 25212) and set the PCSetup (DM 6601) so that the status of the IOM Hold Bitis maintained at startup.Set a longer input time constant in the PC Setup.Maintenance FunctionsUsageFunctionRecord data with time-stamp.Establish user-defined errors for desired inputconditions.
(Fatal and non-fatal errors can be defined.)Clock/calendar functionFAL(06) defines non-fatal errors. (PC operationcontinues.)Read the number of power interruptions.Set the startup operating mode.FALS(07) defines fatal errors. (PC operation stops.)The number of power interruptions is stored in AR 23.Set the startup operating mode in the PC Setup(DM 6600).RefertoW353Communications FunctionsUsageFunctionRead/write I/O memory data and change the operatingmode from a host computer.Connect to a serial device such as a bar code readeror serial printer.Make a high-speed connection with an OMRONProgrammable Terminal.Make a PC-PC data link connection with anotherCPM2A, or a CPM1, CPM1A, CPM2C, SRM1, CQM1,C200HS, or C200HX/HG/HE PC.Connect a Programming Console.Host Link communications (Set the communicationsmode to Host Link in the PC Setup.)No-protocol communications (Set the communicationsmode to no-protocol in the PC Setup.)1:1 NT Link (Set the communications mode to 1:1 NTLink in the PC Setup.)1:1 PC Link (Set the communications mode to 1:1 PCLink in the PC Setup.)RefertoW353Page98Connect a personal computer running SYSMACSupport Software (SSS) or SYSMAC-CPT SupportSoftware.Connect the Programming Console to the Peripheralport.
(The CPU Unit’s Communications Switch settinghas no effect on this connection.)The computer can be connected to the Peripheral portor RS-232C port.(The Host Link settings in the PC Setup are usedwhen the switch is OFF; the standard Host Linkcommunications settings are used when the CPUUnit’s Communications Switch is ON.)Monitor equipment with a Programmable Terminal andprogram the PC with a Programming Device.The RS-232C port and Peripheral port can be usedsimultaneously.W353Page981-5Comparison with the CPM1AItemInstruction setInstructionexecution timesProgram capacity18Page89Basic instructionsSpecial instructionsBasic instructionsSpecial instructionsCPM2A14105 instructions, 185 variationsLD: 0.64 µsMOV(21): 7.8 µs4,096 wordsCPM1ASame as CPM2A.79 instructions, 139 variationsLD: 1.72 µsMOV(21): 16.3 µs2,048 wordsSectionComparison with the CPM1AItemMaximum numberof I/O pointsCPM2AStand-alone CPU UnitCPU Unit with Expansion I/OUnits1-5CPM1A30, 40, or 60 points90, 100, or 120 points max.10, 20, 30, or 40 points90 or 100 points max.A maximum of 3 Units can beconnected to any of the CPUUnits.(If the CPM1A-TS002/102 isconnected, the maximum is 2.)A maximum of 3 Units can beconnected to the 30-point and40-point CPU Units.Available modelsExpansion I/O Units,Analog I/O Unit, TemperatureSensor Units, andCompoBus/S I/O Link UnitSame as CPM2A.Input bitsOutput bitsWork bitsIR 00000 to IR 00915IR 01000 to IR 01915928 bits:IR 02000 to IR 04915,IR 20000 to IR 22715448 bits:SR 22800 to SR 255158 bits: TR0 to TR7320 bits:HR 0000 to HR 1915384 bits:AR 0000 to AR 2315256 bits:LR 0000 to LR 1515256 bits:TIM/CNT 0 to TIM/CNT 2562,048 words(DM 0000 to DM 2047)456 words(DM 6144 to DM 6599)56 words(DM 6600 to DM 6655)Same as CPM2A.Same as CPM2A.512 bits:IR 20000 to IR 23115Flash memory backupSame as CPM2A.Internal battery backup(5-year lifetime, replaceable)Capacitor backup(20-day backup at 25°C)Interrupt inputs (interrupt input mode)4Same as CPM2A.Interrupt inputs(counter mode)Decrementing counterMethod to change counter PVIncrementing counterDecrementing counter2 kHzContains counter PV.Read SR 244 to SR 247.Execute PRV(62).(Counter PV)Execute INI(61).Interval timerOne-shot modeScheduled interrupt modeYesYesYesYesQuick-responseinputsSetting the quick-responsefunctionINT(89) (Mask)INT(89) (Read mask)INT(89) (Clear)Minimum pulse widthPC SetupPC Setup and INT(89)(Unmask interrupt input.)Supported.Reads result of mask setting.Supported.200 µs min.Expansion UnitsMaximum number of Unitsand Expansion I/OUnitsI/O memorySR (Special Relay) areaTR (Temporary Relay) areaHR (Holding Relay) areaAR (Auxiliary Relay) areaLR (Link Relay) areaTimer/Counter areaDM (DataMemory) areaMemory backupRead/writeareaRead-onlyareaPC SetupProgram area, read-only DMarea (including PC Setup)Read/write DM area, HR area,AR area, and countersCounter modeCounter upper limitSR 244 to SR 247Method(s) to read counter PVNot supported (ignored)Reads mask status.Not supported (ignored)50 µs min.384 bits:SR 23200 to SR 25515Same as CPM2A.Same as CPM2A.256 bits:AR 0000 to AR 1515Same as CPM2A.128 bits:TIM/CNT 0 to TIM/CNT 1271,024 words(DM 0000 to DM 1023)Same as CPM2A.Same as CPM2A.1 kHzContains counter PV–1.Read SR 244 to SR 247.(Counter PV – 1)Not supported.19SectionComparison with the CPM1AItemHigh-speedcounterCPM2ACPM1ACount modeDifferential-phase (up/down)modePulse plus direction modeUp/down pulse modeIncrement modeDifferential-phase (up/down)modeIncrement modeMax.
counter frequency5 kHz in differential-phase(up/down) mode2.5 kHz in differential-phase(up/down) mode,5 kHz in increment modeCounter PV rangeCheck when registering targetvalue match tableMethod used to reference thetarget value match interrupttableReading range-comparisonresultsReading status20 kHz in pulse plus directionmode, up/down pulse mode,and increment mode–8,388,608 to 8,388,607 indifferential-phase (up/down)mode, pulse plus directionmode, and up/down pulsemode0 to 16,777,215 in incrementmodeSame direction, same SV notpossibleComparison of all values in thetable, regardless of order ofappearance in tableCheck AR 1100 to AR 1107 orexecute PRV(62).Check AR 1108 (comparison inprogress), check AR 1109(high-speed counter PVoverflow/underflow), orexecute PRV(62).–32,768 to 32,767 indifferential-phase (up/down)mode0 to 65,535 in increment modeSame direction, same SVpossibleComparison in order ofappearance in tableCheck AR 1100 to AR 1107.---Pulse synchronizationSupported.Not supported.Pulse outputcontrolSupported with ACC(––).