The text of a manual · part 11 of 68
Programmable Controllers C200HX-CPU-ZE, C200HG-CPU-ZE, C200HE-CPU-ZE Operation Manual: SECTION 3 Memory Areas, pages 83 to 91
Pages 83 to 91 of 613, from Programmable Controllers C200HX-CPU-ZE, C200HG-CPU-ZE, C200HE-CPU-ZE Operation Manual
The original document is the PDF (3.8 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
Filed in the catalog under the Omron C200H-SP001 and Omron C200HW-PA204
Page 83
Section
DM (Data Memory) Area Word(s) DM 6648
Bit(s) 00 to 07 08 to 11 12 to 15
DM 6649
00 to 07 08 to 15
Function
3-6
Default
Node number (Host Link) 00 to 31 (BCD) Start code enable (RS-232C) 0: Disable; 1: Set End code enable (RS-232C) 0: Disable (number of bytes received) 1: Set (specified end code) 2: CR, LF Start code (RS-232C) 00 to FF (binary) 12 to 15 of DM 6648 set to 0: Number of bytes received 00: Default setting (256 bytes) 01 to FF: 1 to 255 bytes
0 Disabled Disabled
Not used (0000)
12 to 15 of DM 6648 set to 1: End code (RS-232C) 00 to FF (binary) Peripheral Port Settings (DM 6650 to DM 6654) The following settings are accessed continually while the PC is ON. Note: To use the peripheral port set to Host Link mode after using it in peripheral bus mode, turn OFF the power once and turn ON again or disconnect and reconnect the cable. DM 6650 00 to 03 Port settings Standard 0:
04 to 11 12 to 15 DM 6651
00 to 07 08 to 15
DM 6652
00 to 15
DM 6653
00 to 07 08 to 11 12 to 15
70
Standard (Host Link or peripheral bus serial communications mode, 1 start bit, 7-bit data, even parity, 2 stop bits, 9,600 bps)
1: Settings in DM 6651 Reserved Serial communications mode 0: Host link; 1: No-protocol Baud rate 00: 1.2K, 01: 2.4K, 02: 4.8K, 03: 9.6K, 04: 19.2K Frame format Start Length Stop 00: 1 bit 7 bits 1 bit 01: 1 bit 7 bits 1 bit 02: 1 bit 7 bits 1 bit 03: 1 bit 7 bits 2 bit 04: 1 bit 7 bits 2 bit 05: 1 bit 7 bits 2 bit 06: 1 bit 8 bits 1 bit 07: 1 bit 8 bits 1 bit 08: 1 bit 8 bits 1 bit 09: 1 bit 8 bits 2 bit 10: 1 bit 8 bits 2 bit 11: 1 bit 8 bits 2 bit Transmission delay (Host Link) 0000 to 9999: in 10-ms units. Node number (Host Link) 00 to 31 (BCD) Start code enable (RS-232C) 0: Disable; 1: Set End code enable (RS-232C) 0: Disable (number of bytes received) 1: Set (specified end code) 2: CR, LF
--Host Link 1.2 K
Parity Even Odd None Even Odd None Even Odd None Even Odd None
1 start bit, 7-bit data, 1 stop bit, even parity
0 ms 0 Disable Disable
Page 84
Section
DM (Data Memory) Area Word(s) DM 6654
Bit(s) 00 to 07 08 to 15
Function
3-6
Default 0000
Start code (RS-232C) 00 to FF (binary) 12 to 15 of DM 6653 set to 0: Number of bytes received 00: Default setting (256 bytes) 01 to FF: 1 to 255 bytes 12 to 15 of DM 6653 set to 1: End code (RS-232C) 00 to FF (binary)
Error Settings (DM 6655) The following settings are accessed continually while the PC is ON. DM 6655 00 to 03 Interrupt programming error enable 0: Detect interrupt programming errors 1: Do not detect
Detect
04 to 07 08 to 11
Reserved Cycle time monitor enable 0: Detect long cycles as non-fatal errors 1: Do not detect long cycles
--Detect
12 to 15
Low battery error enable 0: Detect low battery voltage as non-fatal error 1: Do not detect low battery voltage
Detect
3-6-6 Communications Board Settings DM 6550 through DM 6554 contain the communications settings for Communications Board port B and DM 6555 through DM 6559 contain the communications settings for Communications Board port A. Word(s)
Bit(s)
Function
Default
Communications Board Port B Settings (DM 6550 to DM 6554) The following settings are accessed continually while the PC is ON. DM 6550 00 to 03 Port settings 0: Standard (1 start bit, 7-bit data, even parity, 2 stop bits, 9,600 bps) 1: Settings in DM 6551
Standard
04 to 07
CTS control setting 0: Disable CTS control 1: Enable CTS control
Disable
08 to 11
Words linked for 1:1 PC Link (Cannot be changed once set in the 1:1 PC Link Master.) 0: LR 00 to LR 63; 1: LR 00 to LR 31; 2: LR 00 to LR 15
LR 00 to LR 63
Maximum PT node number for 1:N NT Link 1 to 7 BCD (1 to 3 with a 12 to 15
PC)
Communications mode 0: Host link; 1: RS-232C; 2: 1:1 PC Link Slave; 3: 1:1 PC Link Master; 4: 1:1 NT link; 5: 1:N NT link; 6: Protocol Macro
Host Link
71
Page 85
Section
DM (Data Memory) Area Word(s) DM 6551
Bit(s) 00 to 07 08 to 15
DM 6552
00 to 15
DM 6553
00 to 07 08 to 11 12 to 15
DM 6554
00 to 07 08 to 15
Function Baud rate 00: 1.2K, 01: 2.4K, 02: 4.8K, 03: 9.6K, 04: 19.2K Frame format Start Length Stop 00: 1 bit 7 bits 1 bit 01: 1 bit 7 bits 1 bit 02: 1 bit 7 bits 1 bit 03: 1 bit 7 bits 2 bit 04: 1 bit 7 bits 2 bit 05: 1 bit 7 bits 2 bit 06: 1 bit 8 bits 1 bit 07: 1 bit 8 bits 1 bit 08: 1 bit 8 bits 1 bit 09: 1 bit 8 bits 2 bit 10: 1 bit 8 bits 2 bit 11: 1 bit 8 bits 2 bit Transmission delay 0000 to 9999: BCD in 10-ms units. Node number (Host Link) 00 to 31 (BCD) Start code enable (RS-232C) 0: Disable; 1: Set End code enable (RS-232C) 0: Disable (number of bytes received) 1: Set (specified end code) 2: CR, LF Start code (RS-232C) 00 to FF (binary) 12 to 15 of DM 6553 set to 0: Number of bytes received 00: Default setting (256 bytes) 01 to FF: 1 to 255 bytes
3-6
Default 1.2 K
Parity Even Odd None Even Odd None Even Odd None Even Odd None
1 start bit, 7-bit data, 1 stop bit, even parity
0 ms 0 Disabled Disabled
0000
12 to 15 of DM 6553 set to 1: End code (RS-232C) 00 to FF (binary) Communications Board Port A Settings (DM 6555 to DM 6559) The following settings are read continually while the PC is ON. DM 6555 00 to 03 Port settings 0: Standard (1 start bit, 7-bit data, even parity, 2 stop bits, 9,600 bps) 1: Settings in DM 6556 04 to 07
CTS control setting 0: Disable CTS control 1: Enable CTS control
Disable
08 to 11
Words linked for 1:1 PC Link (Can’t be changed once set in the 1:1 PC Link Master.) 0: LR 00 to LR 63; 1: LR 00 to LR 31; 2: LR 00 to LR 15
LR 00 to LR 63
Maximum PT node number for 1:N NT Link 1 to 7 BCD (1 to 3 with a 12 to 15
72
Standard
PC)
Communications mode 0: Host Link; 1: RS-232C; 2: 1:1 PC Link Slave; 3: 1:1 PC Link Master; 4: 1:1 NT link; 5: 1:N NT link; 6: Protocol Macro
Host Link
Page 86
Section
DM (Data Memory) Area Word(s) DM 6556
Bit(s) 00 to 07 08 to 15
DM 6557
00 to 15
DM 6558
00 to 07 08 to 11 12 to 15
DM 6559
00 to 07 08 to 15
Function Baud rate 00: 1.2K, 01: 2.4K, 02: 4.8K, 03: 9.6K, 04: 19.2K Frame format Start Length Stop 00: 1 bit 7 bits 1 bit 01: 1 bit 7 bits 1 bit 02: 1 bit 7 bits 1 bit 03: 1 bit 7 bits 2 bit 04: 1 bit 7 bits 2 bit 05: 1 bit 7 bits 2 bit 06: 1 bit 8 bits 1 bit 07: 1 bit 8 bits 1 bit 08: 1 bit 8 bits 1 bit 09: 1 bit 8 bits 2 bit 10: 1 bit 8 bits 2 bit 11: 1 bit 8 bits 2 bit Transmission delay 0000 to 9999: BCD in 10-ms units. Node number (Host Link) 00 to 31 (BCD) Start code enable (RS-232C) 0: Disable; 1: Set End code enable (RS-232C) 0: Disable (number of bytes received) 1: Set (specified end code) 2: CR, LF Start code (RS-232C) 00 to FF (binary) 12 to 15 of DM 6558 set to 0: Number of bytes received 00: Default setting (256 bytes) 01 to FF: 1 to 255 bytes
3-6
Default 1.2 K
Parity Even Odd None Even Odd None Even Odd None Even Odd None
1 start bit, 7-bit data, 1 stop bit, even parity
0 ms 0 Disabled Disabled
0000
12 to 15 of DM 6558 set to 1: End code (RS-232C) 00 to FF (binary)
3-6-7 Special I/O Unit Area Settings The setting in bits 08 through 15 of DM 6602 determines the size and location of the Special I/O Unit Area, as shown in the following table. Setting Mode Function 00 C200H-compatible DM 1000 through DM 2599 are used for the Special I/O Unit Area. RAM Mode • Data in the Special I/O Unit Area can be read/written. 01
• The data cannot be converted to ROM. C200H-compatible The contents of DM 7000 through DM 7999 are transferred to DM 1000 through DM 1999 ROM Mode 1 at startup and DM 1000 through DM 1999 are used for the Special I/O Unit Area. • The UM Area Allocation operation must be performed beforehand. • The data is compatible with C200H applications that use EEPROM/EPROM.
02
• ROM conversion is possible indirectly by converting DM 7000 through DM 7999 to ROM. DM Linear Mode 1 DM 7000 through DM 7999 are used for the Special I/O Unit Area. • The UM Area Allocation operation must be performed beforehand. • DM 1000 through DM 1999 can be used as regular DM. • DM 7000 through DM 7999 can be converted to ROM.
73
Page 87
Section
TC (Timer/Counter) Area
3-8
Setting Mode Function 11 C200H-compatible The contents of DM 7000 through DM 8599 are transferred to DM 1000 through DM 2599 ROM Mode 2 at startup and DM 1000 through DM 2599 are used for the Special I/O Unit Area. • The UM Area Allocation operation must be performed beforehand. • ROM conversion is possible indirectly by converting DM 7000 through DM 8599 to ROM. 12
DM Linear Mode 2 DM 7000 through DM 8599 are used for the Special I/O Unit Area. • The UM Area Allocation operation must be performed beforehand. • DM 1000 through DM 2599 can be used as regular DM. • DM 7000 through DM 8599 can be converted to ROM.
DM 7000 through DM 9999 cannot be read or overwritten directly from the program. To read this data from the program, the data must be copied to another data area or regular DM using the EXPANSION DM READ – XDMR(280) instruction. When C200H-compatible ROM Mode or DM Linear Mode is set, the UM Area Allocation operation must be performed in advance to allocate part of the ladder program area for use as expansion DM. A system error (FAL 9B) will occur if memory isn’t allocated as expansion DM. Refer to 7-2-15 UM Area Allocation for details on the UM Area Allocation operation. When DM Linear Mode is set, the Special I/O Unit’s data area will begin from DM 7000 instead of DM 1000 so add 6000 to the DM addresses where they appear in the Special I/O Unit’s Operation Manual. When the Special I/O Unit Area setting is 01, 02, 11, or 12 and expansion DM beyond DM 8000 hasn’t been allocated, a Special I/O Unit error will occur for a Unit with unit number A through F when the Unit accesses its allocated area.
3-7
HR (Holding Relay) Area The HR area is used to store/manipulate various kinds of data and can be accessed either by word or by bit. Word addresses range from HR 00 through HR 99; bit addresses, from HR 0000 through HR 9915. HR bits can be used in any order required and can be programmed as often as required. The HR area retains status when the system operating mode is changed, when power is interrupted, or when PC operation is stopped. HR area bits and words can be used to preserve data whenever PC operation is stopped. HR bits also have various special applications, such as creating latching relays with the Keep instruction and forming self-holding outputs. These are discussed in Section 4 Writing and Inputting the Program and Section 5 Instruction Set. Note The required number of words is allocated between HR 00 and HR 42 for routing tables and to monitor timers when using SYSMAC NET Systems.
3-8
TC (Timer/Counter) Area The TC area is used to create and program timers and counters and holds the Completion flags, set values (SV), and present values (PV) for all timers and counters. All of these are accessed through TC numbers ranging from TC 000 through TC 511. Each TC number is defined as either a timer or counter using one of the following instructions: TIM, TIMH, CNT, CNTR(012), and TTIM(087). No prefix is required when using a TC number in a timer or counter instruction. Once a TC number has been defined using one of these instructions, it cannot be redefined elsewhere in the program either using the same or a different instruction. If the same TC number is defined in more than one of these instructions or in the same instruction twice, an error will be generated during the program check. There are no restrictions on the order in which TC numbers can be used.
74
Page 88
Section
LR (Link Relay) Area
3-9
Once defined, a TC number can be designated as an operand in one or more of certain set of instructions other than those listed above. When defined as a timer, a TC number designated as an operand takes a TIM prefix. The TIM prefix is used regardless of the timer instruction that was used to define the timer. Once defined as a counter, the TC number designated as an operand takes a CNT prefix. The CNT is also used regardless of the counter instruction that was used to define the counter. TC numbers can be designated for operands that require bit data or for operands that require word data. When designated as an operand that requires bit data, the TC number accesses the completion flag of the timer or counter. When designated as an operand that requires word data, the TC number accesses a memory location that holds the PV of the timer or counter. TC numbers are also used to access the SV of timers and counters from a Programming Device. The procedures for doing so using the Programming Console are provided in 7-1 Monitoring Operation and Modifying Data. The TC area retains the SVs of both timers and counters during power interruptions. The PVs of timers are reset when PC operation is begun and when reset in interlocked program sections, but the PVs of counters are retained. Refer to 5-10 INTERLOCK and INTERLOCK CLEAR – IL(002) and ILC(003) for details on timer and counter operation in interlocked program sections. The PVs of counters are not reset at these times. Note that in programming “TIM 000” is used to designate three things: the Timer instruction defined with TC number 000, the completion flag for this timer, and the PV of this timer. The meaning in context should be clear, i.e., the first is always an instruction, the second is always a bit, and the third is always a word. The same is true of all other TC numbers prefixed with TIM or CNT.
3-9
LR (Link Relay) Area The LR area is used as a common data area to transfer information between PCs. This data transfer is achieved through a PC Link System. Certain words will be allocated as the write words of each PC. These words are written by the PC and automatically transferred to the same LR words in the other PCs in the System. The write words of the other PCs are transferred in as read words so that each PC can access the data written by the other PCs in the PC Link System. Only the write words allocated to the particular PC will be available for writing; all other words may be read only. Refer to the PC Link System Manual for details. The LR area is accessible either by bit or by word. LR area word addresses range from LR 00 to LR 63; LR area bit addresses, from LR 0000 to LR 6315. Any part of the LR area that is not used by the PC Link System can be used as work words or for SYSMAC NET Link or SYSMAC LINK Systems. LR area data is not retained when the power is interrupted, when the PC is changed to PROGRAM mode, or when it is reset in an interlocked program section. Refer to 5-10 INTERLOCK and INTERLOCK CLEAR – IL(002) and ILC(003) for details on interlocks.
75
Page 89
Section 3-10
UM Area
3-10 UM Area With the C200HX/HG/HE PCs, the UM area contains the ladder program. Part of the UM area can be allocated for use as expansion DM or the I/O comment area. The usable size of the UM area ranges from 3.2 KW in the C200HE-CPU11-ZE to 63.2 KW in the C200HX-CPU65-ZE and C200HX-CPU85-ZE. A Programming Console or SYSMAC-CPT Support Software can be used to allocate expansion DM, but the I/O comment area can be allocated with SYSMACCPT Support Software only. The structure of the DM and UM areas is shown in the following illustration. DM 0000
DM 6144
DM 6600
DM 6655
PC Setup
DM 7000
Reserved
DM 9999 Expansion DM Area (0 to 3 KW)
I/O Comment Area
Ladder program
Variable size
Special I/O Unit Default Area DM 1000 to DM 1999
Fixed DM Area
Normal DM Area
UM Area (64 KW max.) ROM-convertible Area
Note Refer to the SYSMAC-CPT Support Software Manual for details on using the software to allocate UM for expansion DM or I/O comments. Refer to 7-2-15 UM Area Allocation for details on using the Programming Console to allocate UM for expansion DM. Area Normal DM
Function This area can be used freely for calculations and programming instructions. DM can be accessed in word units only. DM 1000 through DM 2599 are assigned to Special I/O Units when Special I/O Units are being used, but can be used as normal DM when the Special I/O Unit Area has been set to DM 7000 through DM 8599 in the PC Setup (DM 6602).
PC Setup Reserved Expansion DM
The PC Setup contains various settings that control PC operation. This area is reserved for system use. It cannot be accessed by the user. This area contains initialing data such as Special I/O Unit data, numerical or character string tables for PTs, and calculation data. Data can’t be read directly from the expansion DM area as it can from normal DM.
I/O comment
Expansion DM can be overwritten by performing the Hexadecimal/BCD Data Modification operation from a Programming Console or by transferring edited DM data from SYSMAC Support Software. This area is used to store I/O comments, which can be saved together with the program. The I/O comments will be automatically uploaded with the program and automatically allocated so that monitored can be performed with I/O Comments.
Ladder program This area is used to store the ladder program created by the user. UM area words allocated to expansion DM and/or the I/O Comment Area are taken from the ladder program area.
Note
76
1. The ladder program area is reduced proportionately when UM area words are allocated to expansion DM and/or the I/O Comment Area. Make sure that there is enough excess capacity in the ladder program area before allocating memory to expansion DM and/or the I/O Comment Area. 2. The default setting for the UM area doesn’t have any memory allocated to expansion DM or the I/O Comment Area. This memory must be allocated by the user as required.
Page 90
Section 3-12
EM (Extended Data Memory) Area
3-11 TR (Temporary Relay) Area The TR area provides eight bits that are used only with the LD and OUT instructions to enable certain types of branching ladder diagram programming. The use of TR bits is described in Section 4 Writing and Inputting the Program. TR addresses range from TR 0 though TR 7. Each of these bits can be used as many times as required and in any order required as long as the same LR bit is not used twice in the same instruction block.
3-12 EM (Extended Data Memory) Area In addition to the high-capacity DM area, C200HG and C200HX PCs are equipped with an EM area that can store up to 96K-words of data. The EM area is divided into banks which contain 6,144 words each (EM 0000 through EM 6143). The C200HG PCs have one bank (bank 0), the PCs have three banks (0, 1, and 2), the C200HX-CPU65-ZE has eight banks (0 through 7), and the C200HX-CPU85-ZE has sixteen banks (0 through F). The effective bank is called the current bank.
3-12-1 Using the EM Area Although addresses in the current bank of the EM Area can be used as operands in programming instructions, the other banks of the EM Area can’t be accessed directly. To access data in the other banks, the PCs are provided with the EMBC(281), XFR2(––), BXF2(––), and IEMS(––) instructions. Instruction EMBC(281) XFR2(––) BXF2(––) IEMS(––)
Example 1
Function Changes the current bank to the specified bank number. Transfers data within the current EM bank or between the current EM bank and one of the regular data areas. Transfers data between the specified EM bank and another EM bank or a regular data area. Switches the destination of indirect addressing to the specified EM bank. Can also switch the destination back to DM.
The following example uses EMBC(281) to set the current bank to bank 1 and XFR2(––) to transfer the contents of EM 2000 through EM 2999 to DM 0000 through DM 0999. After execution of a program section, the contents of DM 0000 through DM 0999 are transferred back to EM 2000 through EM 2999.
EMBC #0001
XFR2 #1000 #2000 D0000
Data processing performed with data in DM 0000 through DM 0999. XFR2 #1000 D0000 #2000
Note If BXF2(––) were used to perform the data transfers, any EM bank could be specified and EMBC(281) would not be required to select EM bank 1.
77
Page 91
Section 3-12
EM (Extended Data Memory) Area Example 2
The following example uses IEMS(––) to change the destination for indirect addressing to EM bank 1. After this instruction is executed, operands access words in EM bank 1 and not the DM area. In this case, the second operand in the MOV(021) instruction transfers #1234 to a word in the EM bank. (For example, #1234 will be moved to EM 0100 if DM 0000 contains 0100.) Later in the program, the destination for indirect addressing is switched back to the DM area by executing IEMS(––) with an operand of 000.
IEMS #E0B1
MOV #1234 ∗D0000
IEMS 000
Note
1. Be sure to return the indirect addressing destination to its default (the DM area) when necessary. The destination will be returned to the DM area automatically at the beginning of the next cycle. 2. The destination for indirect addressing reverts to the DM area at the start of interrupt subroutines, but can be changed within a subroutine. The destination is returned to its original setting when control is returned to the main program.
3-12-2 The Current EM Bank The current EM bank is set to bank 0 when the PC is turned ON, and the current EM bank can be changed by EMBC(281) or IEMS(––). Unlike the destination for indirect addressing, the current bank number is not initialized at the start of a cycle or the start of an interrupt subroutine. After the PC has been turned ON, the switched bank status will be resumed after the PC mode is changed or execution of an interrupt subroutine is completed.
78