CPM2A_PROGRAMMING MANUAL (W353-E1-2) (986750), страница 95
Текст из файла (страница 95)
Refer to 1-1-3 CPM2A/CPM2C PCSetup Settings for details on the PC Setup.AR AreaThese bits mainly serve as flags related to CPM2A/CPM2C operation. These bits retain their status even after theCPM2A/CPM2C power supply has been turned off or when operation begins or stops.549Appendix CMemory AreasWord(s)AR 00,AR 01AR 02Bit(s)Not used.00010203These flags turn ONExpansion Unit Error Flag for 1st Unitwhen there is an error inExpansion Unit Error Flag for 2nd Unitthe corresponding Unit.Expansion Unit Error Flag for 3rd UnitExpansion Unit Error Flag for 4th Unit(Not used by CPM2A.)Expansion Unit Error Flag for 5th Unit(Not used by CPM2A.)Not used.Number of Expansion Units and Expansion I/O Units ConnectedNot used.Not used.---00 to 03RS-232C Port Error Code0: Normal completion1: Parity error2: Frame error3: Overrun error225,23304RS-232C Communications Error FlagTurns ON when an RS-232C port communications error occurs.RS-232C Transmit Ready FlagTurns ON when the PC is ready to transmit data.
(No-protocol and Host Link only)RS-232C Reception Completed FlagTurns ON when the PC has completed reading data. (No-protocol only)RS-232C Reception Overflow FlagTurns ON when an overflow has occurred. (No-protocol only)Peripheral Port Error Code0: Normal completion1: Parity error2: Frame error3: Overrun error05 to 0708 to 1112 to 1500 to 1505060708 to 1112131415AR 0900 to 15AR 1000 to 15550Page00 to 1504AR 03 toAR 07AR 08FunctionPeripheral Port Communications Error FlagTurns ON when a peripheral port communications error occurs.Peripheral Port Transmit Ready FlagTurns ON when the PC is ready to transmit data. (No-protocol and Host Link only)Peripheral Port Reception Completed FlagTurns ON when the PC has completed reading data.
(No-protocol only)Peripheral Port Reception Overflow FlagTurns ON when an overflow has occurred. (No-protocol only)RS-232C Port Reception Counter (4 digits BCD)Valid only when no-protocol communications are used.Peripheral Port Reception Counter (4 digits BCD)Valid only when no-protocol communications are used.---233233Appendix CMemory AreasWord(s)AR 11Bit(s)00 to 07(Note 1)08AR 12(Note 1)FunctionHigh-speed Counter Range Comparison Flags00 ON: Counter PV is within comparison range 101 ON: Counter PV is within comparison range 202 ON: Counter PV is within comparison range 303 ON: Counter PV is within comparison range 404 ON: Counter PV is within comparison range 505 ON: Counter PV is within comparison range 606 ON: Counter PV is within comparison range 707 ON: Counter PV is within comparison range 8High-speed Counter Comparison OperationON:OperatingOFF:Stopped09High-speed Counter PV Overflow/Underflow FlagON:An overflow or underflow occurred.OFF:Normal operation1011Not used.Pulse Output 0 Output StatusON:Pulse output 0 is accelerating or decelerating.OFF:Pulse output 0 is operating at a constant rate.12Pulse Output 0 Overflow/Underflow FlagON:An overflow or underflow occurred.OFF:Normal operation13Pulse Output 0 Pulse Quantity Set FlagON:Pulse quantity has been set.OFF:Pulse quantity has not been set.14Pulse Output 0 Pulse Output Completed FlagON:CompletedOFF:Not completed15Pulse Output 0 Output StatusON:Pulses being output.OFF:Stopped.00 to 1112Not used.Pulse Output 1 Overflow/Underflow FlagON:An overflow or underflow occurred.OFF:Normal operation13Pulse Output 1 Pulse Quantity Set FlagON:Pulse quantity has been set.OFF:Pulse quantity has not been set.14Pulse Output 1 Pulse Output Completed FlagON:CompletedOFF:Not completed15Pulse Output 1 Output StatusON:Pulses being output.OFF:Stopped.Page539595551Appendix CMemory AreasWord(s)AR 13Bit(s)Function00Power-up PC Setup Error FlagTurns ON when there is an error in DM 6600 to DM 6614 (the part of the PC Setup areathat is read at power-up).01Start-up PC Setup Error FlagTurns ON when there is an error in DM 6615 to DM 6644 (the part of the PC Setup areathat is read at the beginning of operation).02RUN PC Setup Error FlagTurns ON when there is an error in DM 6645 to DM 6655 (the part of the PC Setup areathat is always read).03, 0405Not used.Cycle Time Too Long FlagTurns ON if the actual cycle time is longer than the cycle time set in DM 6619.Not used.Memory Area Specification Error FlagTurns ON when a non-existent data area address is specified in the program.Flash Memory Error FlagTurns ON when there is an error in flash memory.Read-only DM Error FlagTurns ON when a checksum error occurs in the read-only DM (DM 6144 to DM 6599)and that area is initialized.06, 070809101112PC Setup Error FlagTurns ON when a checksum error occurs in the PC Setup area.Program Error FlagTurns ON when a checksum error occurs in the program memory (UM) area, or whenan improper instruction is executed.Page525-------526---13Expansion Instruction Area Error FlagTurns ON when a checksum error occurs in the expansion instruction assignments area.
Theexpansion instruction assignments will be cleared to their default settings.14Data Save Error FlagTurns ON if data could not be retained with the backup battery.---The following words are normally backed up by the battery:DM read/write words (DM 0000 to DM 1999 and DM 2022 to DM 2047), Error Log(DM 2000 to DM 2021), HR area, counter area, SR 25511, SR 25512 (if DM 6601 is setto hold I/O memory at startup), AR 23, operating mode (if DM 6600 is set to use theprevious operating mode), and clock words (AR 17 to AR 21, for CPU Units withclocks).If the above words cannot be retained, all data will be cleared except that AR 2114 willbe turned ON. The CPU Unit will start in PROGRAM mode if DM 6600 is set to use theprevious operating mode. (If DM 6604 is set to generate an error, the PC will start inPROGRAM mode regardless.)15Not used.AR 1400 to 15Maximum Cycle Time (4 digits BCD, see note 3)The longest cycle time since the beginning of operation is stored.
It is not cleared whenoperation stops, but it is cleared when operation starts again.AR 1500 to 15Current Cycle Time (4 digits BCD, see note 3)The most recent cycle time during operation is stored. The Current Cycle Time is notcleared when operation stops.AR 1600 to 15Not used.AR 1700 to 07Minute (00 to 59, BCD)(Note 2)08 to 15Hour (00 to 59, BCD)AR 1800 to 07Second (00 to 59, BCD)(Note 2)08 to 15Minute (00 to 59, BCD)AR 1900 to 07Hour (00 to 23, BCD)(Note 2)08 to 15Day of the Month (01 to 31, BCD)AR 2000 to 07Month (01 to 12, BCD)(Note 2)08 to 15Year (00 to 99, BCD)552495151Appendix CMemory AreasWord(s)AR 21Bit(s)00 to 07(Note 2)FunctionPageWeek3Day of the00: Sunday04: Thursday(00 to 06, BCD)01: Monday02: Tuesday05: Friday06: Saturday15103: Wednesday08 to 1213Not used.30-second Compensation BitTurn this bit ON to round off to the nearest minute.
When the seconds are 00 to 29, theseconds are cleared to 00 and the rest of the time setting is left unchanged. When theseconds are 30 to 59, the seconds are cleared to 00 and the time is incremented byone minute.14Clock Stop BitTurn this bit ON to stop the clock. The time/date can be overwritten while this bit is ON.Clock Set BitTo change the time/date, turn ON AR 2114, write the new time/date (being sure to leaveAR 2114 ON), and then turn this bit ON to enable a new time/date setting.
The clockwill restart and both AR 2114 and AR 2115 will be turned OFF automatically.Not used.15AR 2200 to 15AR 2300 to 15Power-off Counter (4 digits BCD)This is the count of the number of times that the power has been turned off.To clear the count, write “0000” from a Programming Device.151---Note 1.
The same data can be read immediately with PRV(62).2. The time and date can be set while AR 2114 is ON. The new setting becomes effective when AR 2115 isturned ON. (AR 2114 and AR 2115 are turned OFF automatically when the new setting goes into effect.)These words will contain 0000 in CPM2C CPU Units that are not equipped with the clock function.3. The units for the maximum and current cycle times are determined by the setting in bits 08 to 15 ofDM 6618. A setting of 00 specifies 0.1-ms units, 01 specifies 0.1-ms units, 02 specifies 1-ms units, and03 specifies 10-ms units.SRM1 Memory AreasMemory Area StructureThe following memory areas can be used with the SRM1.Data areaIR area1 Input areaSR areaWordsBitsIR 000 to IR 007(8 words)IR 00000 to IR 00715(128 bits)Output areaIR 010 to IR 017(8 words)IR 01000 to IR 01715(128 bits)Work areaIR 008 to IR 009IR 018 to IR 019IR 200 to IR 239(44 words)SR 240 to SR 255(16 words)FunctionThese bits can be allocated to the externalI/O terminals.
The ON/OFF status of the I/Obits will be the same as the ON/OFF statusof the I/O terminals(When the CompoBus/S is used in 128-bitmode, IR 004 to IR 007 and IR 014 toIR 017 can also be used as work bits.)IR 00800 to IR 00915Work bits can be freely used within the proIR 01800 to IR 01915gram. IR 232 to IR 239 however, are usedIR 20000 to IR 23915as the MACRO input area when MCRO(99)(704 bits)is being used.SR 24000 to SR 25507 These bits serve as storage space for flags(248 bits)and function set values/present values forSRM1 operation. Refer to SR Area.TR area---TR 0 to TR 7(8 bits)HR area2HR 00 to HR 19(20 words)HR 0000 to HR 1915(320 bits)When a complicated ladder diagram cannotbe recorded as a mnemonic these bits areused to temporarily store ON/OFF status atprogram branches.
These temporary bitscannot be used within the same block but ifthe blocks are different several may beused. The ON/OFF status of these bits cannot be monitored using the monitoring function of a Programming Device.These bits store data and retain their ON/OFF status when power is turned off, or operation starts or stops. They are used in thesame way as work bits.553Appendix CMemory AreasData areaARWordsarea2AR 00 to AR 15(16 words)LR area1Timer/Counter area2BitsFunctionAR 0000 to AR 1515(256 bits)These bits serve specific functions such asflags and control bits.
AR 04 to 07 are usedas slaves. Refer to AR Area.LR 00 to LR 15LR 0000 to LR 1515(16 words)(256 bits)TC 000 to TC 127 (timer/counter numbers)3Used for a 1:1 data link with another SRM1,CQM1 or C200HS PC.Timers and counter use the TIM, TIMH(15),CNT and CNTR(12) instructions. The samenumbers are used for both timers andcounters.Timer/counter numbers should be specifiedas bits when dealing with timer/counterpresent values. The counter data will bestored even when the SRM1 power isturned off or operation is stopped or started.DM area Read/write2DM 0000 to DM 1999 --(2,000 words)Error log4DM 2000 to DM 2021 --(22 words)Read-only4DM 6144 to DM 6599 --(456 words)DM 6600 to DM 6655 --(56 words)PC Setup4When timer/counter are treated as up-flagsthe number should be specified as relaydata.DM area data can be accessed in wordunits only. Word values are retained whenthe power is turned off, or operation startedor stopped.Read/write areas can be read and writtenfreely within the program.Used to store the time of occurrence anderror code of errors that occur.
Refer to 7-5Coding Right-hand Instructions.Cannot be overwritten from program.Used to store various parameters that control PC operation.Note 1. IR and LR bits that are not used for their allocated functions can be used as work bits.2. The contents of the HR area, LR area, Counter area, and read/write DM area are backed up by a capacitor. At 25C, the capacitor will back up memory for 20 days. Refer to 2-1-2 Characteristics in the SRM1Master Control Unit Operation Manual for a graph showing the backup time vs. temperature.3. When accessing a PV, TC numbers are used as word data; when accessing Completion Flags, they areused as bit data.4. Data in DM 6144 to DM 6655 cannot be overwritten from the program, but they can be changed from aProgramming Device.SR AreaThese bits mainly serve as flags related to SRM1 operation or contain present and set values for various functions.The functions of the SR area are explained in the following table.Note “Read-only” words and bits can be read as status in controller PC operation, but they cannot be written fromthe ladder program.