CPM2A_PROGRAMMING MANUAL (W353-E1-2) (986750), страница 45
Текст из файла (страница 45)
(TXD(48) does not support multiple frames.)277SectionHost Link CommandsResponse FormatAn end code of 00 indicates normal completion.@x 101 x 100Node no.Parameters4-5TSData specified in TXD(48)HeadercodeFCSCharacters(122 max.)↵TerminatorCharacters (Response)This is the data specified in TXD(48) that has been converted to ASCII.4-5-34 Undefined Command – ICThis response is returned if the header code of a command cannot be decoded.Check the header code.Response Format@x 101 x 100Node no.278ICHeadercodeFCS↵TerminatorSECTION 5Memory AreasThis section describes the structure of the PC memory areas and explains how to use them.5-15-25-3Memory Area Functions .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-1-1 Memory Area Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-1-2 Functions . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-1-3 CPM1/CPM1A/SRM1(-V2) Flash Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . .I/O Allocation for CPM1/CPM1A/CPM2A PCs . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .5-2-1 CPU Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-2-2 Expansion I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-2-3 Expansion Units . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-2-4 Examples of Expansion Unit and Expansion I/O Unit Allocation . . . . . . . . . . . .I/O Allocation for CPM2C PCs . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .5-3-1 CPU Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-3-2 Expansion I/O Units . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .5-3-3 Expansion Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-3-4 Examples of Expansion Unit and Expansion I/O Unit Allocation . . . . . . . . . . . .280280283285285285289290291295295296298299279SectionMemory Area Functions5-15-1Memory Area Functions5-1-1 Memory Area StructureCPM1/CPM1AData areaIR area1 Input areaOutput areaWork areaSR areaTR areaThe following memory areas can be used with the CPM1/CPM1A.WordsIR 000 to IR 009(10 words)IR 010 to IR 019(10 words)IR 200 to IR 231(32 words)SR 232 to SR 255(24 words)---BitsIR 00000 to IR 00915(160 bits)IR 01000 to IR 01915(160 bits)IR 20000 to IR 23115(512 bits)SR 23200 to SR 25515(384 bits)TR 0 to TR 7(8 bits)HR 0000 to HR 1915(320 bits)HR area2HR 00 to HR 19(20 words)AR area2AR 00 to AR 15AR 0000 to AR 1515(16 words)(256 bits)LR 00 to LR 15LR 0000 to LR 1515(16 words)(256 bits)TC 000 to TC 127 (timer/counter numbers)3LR area1Timer/Counter area2DM area Read/write2DM 0000 to DM 0999 --DM 1022 to DM 1023(1,002 words)Error logDM 1000 to DM 1021 --(22 words)Read-only4DM 6144 to DM 6599 --(456 words)DM 6600 to DM 6655 --(56 words)PC Setup4NoteFunctionThese bits are allocated to the external I/Oterminals.Work bits can be freely used within the program.These bits serve specific functions such asflags and control bits.These bits are used to temporarily storeON/OFF status at program branches.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.These bits serve specific functions such asflags and control bits.Used for a 1:1 PC Link with another PC.Timers and counters use the TIM,TIMH(15), CNT and CNTR(12) instructions.The same numbers are used for both timersand counters.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. These wordscan be used as ordinary read/write DMwhen the error log function is not beingused.Cannot be overwritten from program.Used to store various parameters that control PC operation.1.
IR and LR bits that are not used for their allocated functions can be used aswork bits.2. The contents of the HR area, AR area, Counter area, and read/write DMarea are backed up by a capacitor. The backup time varies with the ambienttemperature, but at 25C, the capacitor will back up memory for 20 days. Ifthe power supply is off longer than the backup time, memory contents will becleared and AR1314 will turn ON. (This flag turns ON when data can nolonger be retained by the built-in capacitor.) Refer to 2-1-2 Characteristics inthe CPM1 and CPM1A Operation Manual for a graph showing the backuptime vs.
temperature.3. When accessing a PV, TC numbers are used as word data; when accessingCompletion Flags, they are used as bit data.4. Data in DM 6144 to DM 6655 cannot be overwritten from the program, butthey can be changed from a Programming Device.280SectionMemory Area FunctionsCPM2A/CPM2CThe following memory areas can be used with the CPM2A/CPM2C.Data areaIR area1Input area5-1WordsBitsFunctionThese bits are allocated to the external I/Oterminals.IR 000 to IR 009(10 words)IR 010 to IR 019(10 words)IR 020 to IR 049,IR 200 to IR 227(58 words)IR 00000 to IR 00915(160 bits)IR 01000 to IR 01915(160 bits)IR 02000 to IR 04915,IR 20000 to IR 22715(928 bits)SR areaSR 228 to SR 255(28 words)SR 22800 to SR 25515 These bits serve specific functions such as(448 bits)flags and control bits.TR area---TR 0 to TR 7(8 bits)These bits are used to temporarily storeON/OFF status at program branches.HR area2HR 00 to HR 19(20 words)HR 0000 to HR 1915(320 bits)These bits store data and retain their ON/OFF status when power is turned OFF, oroperation starts or stops.
They are used inthe same way as work bits.AR area2AR 00 to AR 23(24 words)AR 0000 to AR 2315(384 bits)These bits serve specific functions such asflags and control bits.LR area1LR 00 to LR 15(16 words)LR 0000 to LR 1515(256 bits)Used for a 1:1 PC Link with another PC.Timer/Counter area2TC 000 to TC 255 (timer/counter numbers)3Timers and counters use the TIM,TIMH(15), CNT, CNTR(12), TMHH(––), andTIML(––) instructions. The same numbersare used for both timers and counters.DM area Read/write2DM 0000 to DM 1999 --DM 2022 to DM 2047(2,026 words)DM area data can be accessed in wordunits only. Word values are retained whenthe power is turned off, or operation startedor stopped.Output areaWork areaError logDM 2000 to DM 2021 --(22 words)Read-only4,5DM 6144 to DM 6599 --(456 words)DM 6600 to DM 6655 --(56 words)PC Setup4,5NoteWork bits can be freely used within the program.Read/write areas can be read and writtenfreely within the program.Used to store the time of occurrence anderror code of errors that occur.
These wordscan be used as ordinary read/write DMwhen the error log function isn’t being used.Cannot be overwritten from program.Used to store various parameters that control PC operation.1. IR and LR bits that are not used for their allocated functions can be used aswork bits.2. The contents of the HR area, AR area, Counter area, and read/write DMarea are backed up by the CPU Unit’s battery. If the battery is removed orfails, the contents of these areas will be lost and returned to default values.(In CPM2C CPU Units without a battery, these areas are backed up by a capacitor.)3. When a TC numbers is used as a word operand, the timer or counter PV isaccessed; when used as a bit operand, its Completion Flag is accessed.4. Data in DM 6144 to DM 6655 cannot be overwritten from the program, butthey can be changed from a Programming Device.5.
The program and data in DM 6144 to DM 6655 are stored in flash memory.281SectionMemory Area FunctionsSRM1(-V2)The following memory areas can be used with the SRM1(-V2).Data areaIRarea1WordsBitsInput areaIR 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)SR area5-1FunctionThese bits are allocated to the external I/Oterminals.
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 specific functions such as(248 bits)flags and control bits.TR area---TR 0 to TR 7(8 bits)These bits are used to temporarily storeON/OFF status at program branches.HR area2HR 00 to HR 19(20 words)HR 0000 to HR 1915(320 bits)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.AR area2AR 00 to AR 15(16 words)AR 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 area1LR 00 to LR 15(16 words)LR 0000 to LR 1515(256 bits)Used for a 1:1 PC Link with another PC.Timer/Counter area2TC 000 to TC 127 (timer/counter numbers)3Timers and counters use the TIM,TIMH(15), CNT and CNTR(12) instructions.The same numbers are used for both timersand counters.DM area Read/write2DM 0000 to DM 1999 --(2,000 words)DM area data can be accessed in wordunits only. Word values are retained whenthe power is turned off, or operation startedor stopped.Error logDM 2000 to DM 2021 --(22 words)Read-only4DM 6144 to DM 6599 --(456 words)DM 6600 to DM 6655 --(56 words)PC Setup4NoteRead/write areas can be read and writtenfreely within the program.Used to store the time of occurrence anderror code of errors that occur. These wordscan be used as ordinary read/write DMwhen the error log function is not beingused.Cannot be overwritten from program.Used to store various parameters that control PC operation.1.