The text of a manual · part 5 of 60
C200HX/C200HG/C200HE Programmable Controllers Operation Manual, pages 34 to 43
Pages 34 to 43 of 586
The original document is the PDF (3.4 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.
For the Omron C200HE-CPU42-E
Page 34
Section 2-4
Memory Cassettes
2-4
Memory Cassettes The C200HX/HG/HE comes equipped with a built-in RAM for the user’s program, so a normal program be created even without installing a Memory Cassette. An optional Memory Cassette can be used to store the program, PC Setup, I/O comments, DM area and other data area contents. Refer to the C200HX/ HG/HE Installation Guide for details on installing Memory Cassettes.
Memory Cassette Functions
The Memory Cassette can be used to store and retrieve UM and IOM data; UM stored in the Memory Cassette can also be compared to the UM in the PC.
1, 2, 3...
1. The contents of UM (user memory) can be stored in the Memory Cassette for later retrieval or verification. If pin 2 of the CPU Unit DIP switch is set to ON, the contents of the Memory Cassette are automatically retrieved when the PC is turned ON. The UM area contains the ladder program, fixed DM (such as the PC Setup), expansion DM, I/O comments, the I/O table, and the UM area allocation information. 2. The contents of the PC’s I/O memory (IOM) can be stored in the Memory Cassette for later retrieval. IOM includes the IR area, SR area, LR area, HR area, AR area, timer and counter PVs, DM 0000 through DM 6143, and EM 0000 through EM 6143.
Note Only the user program or the I/O memory contents can be stored on one Memory Card. UM and IOM data is completely compatible between the C200HX/HG/HE and the C200HS data, except the portion of the C200HX/HG/HE data areas that exceed the capacity of the C200HS and the new instructions (BXF2(––), IEMS(––), IORD(––), IOWR(––), PMCR(––), STUP(––), and XFR2(––)) that aren’t supported by the C200HS CPU Unit. Data area addresses and instructions that aren’t supported by the C200HS can’t be used in the C200HS. IOM data can’t be retrieved to the PC’s RAM unless the size of the IOM in the Memory Cassette matches the size of the IOM in the PC. Compatible Memory Cassettes
There are two types of Memory Cassette available: EEPROM and EPROM. The following table shows the Memory Cassettes which can be used with the C200HX/HG/HE PCs. Memory EEPROM
EPROM
Capacity
Model number
4K words
C200HW-ME04K
8K words
C200HW-ME08K
16K words
C200HW-ME16K
32K words
C200HW-ME32K
16K or 32K words
C200HS-MP16K
Comments The EEPROM Memory Cassette can be used to write and read UM and I/O data to the CPU Unit. It does not require any backup power supply and will retain its data even after it is removed from the CPU Unit. The EPROM chip is not included with the Memory Cassette; it must be purchased separately. 27256 equivalent (ROM-JD-B): 16K 27512 equivalent (ROM-KD-B): 32K
Note
1. Data stored in EEPROM won’t be reliable after the contents have been overwritten 50,000 times. 2. Use a standard PROM writer to write a program to the EPROM Memory Cassette. Connect an EPROM to the EPROM Memory Cassette before installing the EPROM Memory Cassette to the CPU Unit. The EPROM Memory Cassette will lose its data if it is removed from the CPU Unit.
16
Page 35
Section 2-4
Memory Cassettes
2-4-1 Hardware and Software Settings The hardware and software settings related to Memory Cassette operations are described below. Switch Settings
Switch 1 on the Memory Cassette is turned OFF when the Memory Cassette is shipped. Check the setting on switch 1 before installation. Memory Cassette EEPROM EPROM
Switch 1 setting ON OFF ON OFF
SR Area Flags and Control Bits
Function The data in the Memory Cassette is write-protected. The data in the Memory Cassette can be overwritten. 27512-equivalent ROM-KD-B EPROM (32K words, 150 ns access time) 27256-equivalent ROM-JD-B EPROM (16K words, 150 ns access time)
SR 269 through SR 273 contain flags and control bits related to Memory Cassette contents and operation. Refer to 3-4 SR (Special Relay) Area for details.
2-4-2 Writing/Reading UM Data Use the following procedures to transfer UM data to or from a Memory Cassette. (A PROM writer is required to write data to an EPROM Memory Cassette. Refer to the SYSMAC Support Software Operation Manual for details.) Note UM contains the ladder program, fixed DM (such as the PC Setup), expansion DM, I/O comments, the I/O table, and the UM area allocation information. Writing UM Data to a Memory Cassette 1, 2, 3...
Use the following procedure to write UM data to an EEPROM Memory Cassette.
Reading UM Data from a Memory Cassette
There are two ways to read UM data from a Memory Cassette: automatic transfer at startup or a one-time transfer using a Peripheral Device. (There is no function that automatically writes data to the Memory Cassette.) Automatic Transfer at Startup:
1. Before turning ON the C200HX/HG/HE’s power supply, make sure that switch 1 on the Memory Cassette is set to OFF. 2. Turn ON the C200HX/HG/HE and write the ladder program or read an existing program from a data disk. 3. Switch the C200HX/HG/HE to PROGRAM mode. 4. Use a host computer running SSS or a Programming Console to turn ON SR 27000 (the Save UM to Cassette Bit). The data will be written from the PC to the Memory Cassette. SR 27000 will be turned OFF automatically after the data transfer has been completed. 5. If you want to write-protect the data on the Memory Cassette, turn OFF the PC and set switch 1 of the Memory Cassette to ON. If this switch is ON, data in the Memory Cassette will be retained even if SR 27000 is turned ON.
1, 2, 3...
1. Turn ON pin 2 of the CPU Unit’s DIP switch. 2. Install the Memory Cassette containing the data into the C200HX/HG/HE. 3. Turn ON the C200HX/HG/HE’s power supply. The contents of the Memory Cassette will be transferred to the CPU Unit automatically. A memory error will occur if the data couldn’t be transferred. One-time Transfer using a Peripheral Device:
1, 2, 3...
1. Install the Memory Cassette containing the data into the C200HX/HG/HE. 2. Turn ON the C200HX/HG/HE and switch it to PROGRAM mode. 3. Use a host computer running SSS or a Programming Console to turn ON SR 27001 (the Load UM from Cassette Bit). The data will be read from the Memory Cassette to the PC. SR 27001 will be turned OFF automatically after the data transfer has been completed.
17
Page 36
Section 2-4
Memory Cassettes Comparing UM Data on a Memory Cassette 1, 2, 3...
Use the following procedure to the UM data on an Memory Cassette to the UM data in the PC. 1. Switch the C200HX/HG/HE to PROGRAM mode. 2. Use a host computer running SSS or a Programming Console to turn ON SR 27002 (the Compare UM to Cassette Bit). The data will be compared between the PC and the Memory Cassette. SR 27002 will be turned OFF automatically after the data comparison has been completed. 3. Use a host computer running SSS or a Programming Console to check the status of SR 27003 (the Comparison Results Flag).
Note If data verification is executed in a mode other than the PROGRAM mode, an operation continuance error (FAL90) will occur and 27002 will turn ON (1). Although 27003 will also turn ON, comparison will not be performed. If data comparison is executed without mounting the Memory Cassette, 27003 will turn ON (1).
2-4-3 Writing/Reading IOM Data Use the following procedures to transfer IOM data to or from a Memory Cassette. (A PROM writer is required to write data to an EPROM Memory Cassette. Refer to the SYSMAC Support Software Operation Manual for details.) IOM includes the IR area, SR area, LR area, HR area, AR area, timer and counter PVs, DM 0000 through DM 6143, and EM 0000 through EM 6143. The capacity of the Memory Cassette must match the memory capacity of the CPU Unit when IOM data is transferred to or from a Memory Cassette. The memory requirements are as follows: Writing IOM: CPU Unit’s capacity ≤ Memory Cassette’s capacity Reading IOM: CPU Unit’s capacity = Amount of IOM data in Memory Cassette Note In C200HS PCs, the data transfer will be performed even if the memory capacities don’t match, an error which can easily go unnoticed. The following table shows the Memory Cassette capacity required to store 1 or more banks of EM. Memory Cassette capacity 4K words
Number of EM banks
8K words
None (A 4K-word Memory Cassette can’t be used to store other IOM data, either.) None
16K words
1 bank (Only EM bank 0 can be stored.)
32K words
3 banks (EM banks 0 through 2 can be stored.)
Bits 08 through 15 of SR 273 indicate the EM bank number of the IOM data stored in the Memory Cassette. Content of SR 27308 to SR 27315 00
01 04
Writing IOM Data to a Memory Cassette 1, 2, 3...
18
Meaning There is no Memory Cassette installed, no IOM data in the Memory Cassette, or no EM data in the Memory Cassette. The Memory Cassette contains IOM data that includes EM bank 0 only. The Memory Cassette contains IOM data that includes EM banks 0 through 2.
Use the following procedure to write IOM data to an EEPROM Memory Cassette. 1. Before turning ON the C200HX/HG/HE’s power supply, make sure that switch 1 on the Memory Cassette is set to OFF.
Page 37
Section 2-4
Memory Cassettes
2. Turn ON the C200HX/HG/HE and switch it to PROGRAM mode. 3. Use a host computer running SSS or a Programming Console to turn ON SR 27300 (the Save IOM to Cassette Bit). The data will be written from the PC to the Memory Cassette. SR 27300 will be turned OFF automatically after the data transfer has been completed. 4. If you want to write-protect the data on the Memory Cassette, turn OFF the PC and set switch 1 of the Memory Cassette to ON. If this switch is ON, data in the Memory Cassette will be retained even if SR 27300 is turned ON. Reading IOM Data from a Memory Cassette
Use the following procedure to read IOM data from a Memory Cassette. The contents of the error history (DM 6000 through DM 6030) can’t be read from the Memory Cassette.
Note There is no function that automatically reads IOM data from the Memory Cassette. 1, 2, 3...
1. Install the Memory Cassette containing the data into the C200HX/HG/HE. 2. Turn ON the C200HX/HG/HE and switch it to PROGRAM mode. 3. Use a host computer running SSS or a Programming Console to turn ON SR 27301 (the Load IOM from Cassette Bit). The data will be read from the Memory Cassette to the PC. SR 27301 will be turned OFF automatically after the data transfer has been completed.
19
Page 38
Section 2-5
CPU Unit DIP Switch
2-5
CPU Unit DIP Switch The 6 pins on the DIP switch control 6 of the CPU Unit’s operating parameters.
Pin 1
Item Memory protect
Setting
2
Automatic transfer of Memory Cassette contents
3
Message language
OFF ON
4
Expansion instruction setting
OFF ON
5
Communications parameters
OFF ON
ON OFF ON
Function The UM area1 cannot be overwritten from a Peripheral Device. The UM area1 can be overwritten from a Peripheral Device. The contents of the Memory Cassette will be automatically transferred to the internal RAM at start-up. The contents will not be automatically transferred. Programming Console messages will be displayed in English. (see note 1) Programming Console messages will be displayed in Japanese. Expansion instructions will be set by user. Normally ON when using a host computer for programming/monitoring. Expansion instructions will be set to defaults. Standard communications parameters (see note 2) will be set for the following serial communications ports. • Built-in RS-232C port • Peripheral port (only when a CQM1-CIF01/-CIF02 Cable is connected. Does not apply to Programming Console.) Note 1. Standard communications parameters are as follows: Serial communications mode: Host Link or peripheral bus; start bits: 1; data length: 7 bits; parity: even; stop bits: 2; baud rate: 9,600 bps 2. The CX-Programmer running on a personal computer can be connected to the peripheral port via the peripheral bus using the above standard communications parameters.
OFF
6
Expansion TERMINAL mode setting when AR 0712 is ON
Note
20
ON OFF
The communications parameters for the following serial communications ports will be set in PC Setup as follows: • Built-in RS-232C port: DM 6645 and DM 6646 • Peripheral port: DM 6650 and DM 6651 Note When the CX-Programmer is connected to the peripheral port with the peripheral bus, either set bits 00 to 03 of DM 6650 in the Fixed DM Area to 0 Hex (for standard parameters), or set bits 12 to 15 of DM 6650 to 0 Hex and bits 00 to 03 of DM 6650 to 1 Hex (for Host Link or peripheral bus ) separately. Expansion TERMINAL mode (Programming Console); AR 0712 ON. Normal mode (Programming Console); AR 0712: OFF
1. Pin 3 is set to ON when the PC is shipped. 2. The UM area contains the ladder program, fixed DM (including the PC Setup), expansion DM, I/O comments, the I/O table, and the UM area allocation information.
Page 39
Section 2-6
Operating without a Backup Battery
2-6
Operating without a Backup Battery An EEPROM or EPROM Memory Cassette can be used together with various memory settings to enable operation without a backup battery. The following conditions must be met. 1, 2, 3...
1. The user program must be written to an EPROM or EEPROM Memory Cassette. 2. The clock cannot be used. (A battery is required to run the internal clock.) 3. The PC Setup must be set to not detect low battery voltage. 4. The system must be designed to run properly even if DM area data is lost. 5. The Output OFF Bit (SR 25215) must be programmed to remain OFF. (The status of this bit will be unstable without a battery.) 25314 (Always OFF Flag) 25215
6. The Forced Status Hold Bit (SR 25211) and Data Retention Control Bit (SR 25212) must be set to be cleared in the PC Setup. (The status of these bits will be unstable without a battery.) 7. The DIP switch on the CPU Unit must be set so that pin 1 is OFF and pin 2 is ON. If these conditions can be met, use the following procedures to operate without a backup battery. EEPROM Memory Cassette 1, 2, 3...
1. Allocate UM area using the SYSMAC Support Software (SSS) if you want to use Expansion DM for Special I/O Units or if you want to store I/O comments in the PC. 2. Write and transfer the user program, including a line using the Always OFF Flag (SR 25314) to ensure that the Output OFF Bit (SR 25215) remains OFF. 25314 (Always OFF Flag) 25215
3. Set the following in the PC Setup DM 6601 = 0000 (To reset Forced Status Hold Bit (SR 25211) and I/O Status Hold Bit (SR 25212) at startup) DM 6655 bits 12 to 15 = 1, bits 4 to 7 = 0 (To not detect low battery voltage) DM 6600 and DM 6602 to DM 6654 = As required by the application. 4. Set Fixed DM (including the Communications Board settings in DM 6144 to DM 6599) and Expansion DM as required by the application. 5. Check operation. 6. Mount the Memory Cassette in the CPU Unit. 7. Switch to PROGRAM mode. 8. Turn ON SR 27000 to transfer the program, Fixed DM, and the PC Setup to the Memory Cassette. (This bit will automatically reset itself if turned ON from a Programming Console. It will need to be turned OFF by clearing forced status if it is set from the SSS.) 9. Turn ON the write protect switch on the Memory Cassette. 10. Turn OFF pin 1 and turn ON pin 2 on the DIP switch on the CPU Unit to automatically transfer the program, Fixed DM, and the PC Setup from the Memory Cassette when power is turned ON.
21
Page 40
Section 2-6
Operating without a Backup Battery EPROM Memory Cassette 1, 2, 3...
1. Allocate UM area using the SYSMAC Support Software (SSS) if you want to use Expansion DM for Special I/O Units or if you want to store I/O comments in the PC. 2. Write and transfer the user program, including a line using the Always OFF Flag (SR 25314) to ensure that the Output OFF Bit (SR 25215) remains OFF. 25314 (Always OFF Flag) 25215
3. Set the following in the PC Setup DM 6601 = 0000 (To reset Forced Status Hold Bit (SR 25211) and I/O Status Hold Bit (SR 25212) at startup) DM 6655 bits 12 to 15 = 1, bits 4 to 7 = 0 (To not detect low battery voltage) DM 6600 and DM 6602 to DM 6654 = As required by the application. 4. Set Fixed DM (including the Communications Board settings in DM 6144 to DM 6599) and Expansion DM as required by the application. 5. Check operation. 6. Transfer the program, Fixed DM, and the PC Setup to the SSS. 7. Write the program, Fixed DM, and the PC Setup to ROM using the SSS and a PROM writer. 8. Mount the ROM onto the Memory Cassette. 9. Mount the Memory Cassette in the CPU Unit. 10. Turn OFF pin 1 and turn ON pin 2 on the DIP switch on the CPU Unit to automatically transfer the program, Fixed DM, and the PC Setup from the Memory Cassette when power is turned ON.
22
Page 41
SECTION 3 Memory Areas Various types of data are required to achieve effective and correct control. To facilitate managing this data, the PC is provided with various memory areas for data, each of which performs a different function. The areas generally accessible by the user for use in programming are classified as data areas. The other memory area is the UM Area, where the user’s program is actually stored. This section describes these areas individually and provides information that will be necessary to use them. As a matter of convention, the TR area is described in this section, even though it is not strictly a memory area. 3-1 3-2 3-3 3-4
3-5
3-6
3-7 3-8 3-9 3-10 3-11 3-12
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1-1 Data Area Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1-2 IR/SR Area Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Area Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IR (Internal Relay) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SR (Special Relay) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-1 SYSMAC NET/SYSMAC LINK System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-2 Remote I/O Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-3 Link System Flags and Control Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-4 Forced Status Hold Bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-5 I/O Status Hold Bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-6 Output OFF Bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-7 FAL (Failure Alarm) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-8 Low Battery Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-9 Cycle Time Error Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-10 I/O Verification Error Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-11 First Cycle Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-12 Clock Pulse Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-13 Step Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-14 Group-2 Error Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-15 Special Unit Error Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-16 Instruction Execution Error Flag, ER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-17 Arithmetic Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-18 Interrupt Subroutine Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-19 RS-232C Port Communications Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-20 Peripheral Port Communications Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-21 Memory Cassette Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-22 Data Transfer Error Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-23 Ladder Diagram Memory Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-24 Memory Error Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-25 Data Save Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-26 Transfer Error Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-27 PC Setup Error Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-28 Clock and Keyboard Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-29 Group-2 Error Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4-30 Special I/O Unit Restart Bits and Error Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AR (Auxiliary Relay) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5-1 Restarting Special I/O Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5-2 Slave Rack Error Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5-3 Group-2 Error Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5-4 Optical I/O Unit and I/O Terminal Error Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5-5 SYSMAC LINK/Controller Link System Data Link Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5-6 Error History Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5-7 Active Node Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5-8 SYSMAC LINK/SYSMAC NET Link System Service Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5-9 Calendar/Clock Area and Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5-10 TERMINAL Mode Key Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5-11 Power OFF Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5-12 SYSMAC LINK – Peripheral Device Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5-13 Cycle Time Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5-14 Link Unit Mounted Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5-15 CPU Unit-mounting Device Mounted Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5-16 FPD Trigger Bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5-17 Data Tracing Flags and Control Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5-18 Cycle Time Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DM (Data Memory) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6-1 Expansion DM Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6-2 Special I/O Unit Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6-3 Error History Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6-4 PC Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6-5 Communications Board Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6-6 Special I/O Unit Area Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . HR (Holding Relay) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TC (Timer/Counter) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . LR (Link Relay) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UM Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TR (Temporary Relay) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . EM (Extended Data Memory) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12-1 Using the EM Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12-2 The Current EM Bank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24 24 25 25 29 33 38 39 40 41 42 42 42 42 43 43 43 43 44 44 44 44 44 45 45 46 46 47 47 47 48 48 48 48 48 48 48 50 51 51 51 52 52 52 53 53 54 54 54 55 55 55 55 55 55 56 57 58 58 60 65 67 68 68 69 70 71 71 71 72
23
Page 42
Section 3-1
Introduction
3-1
Introduction
3-1-1 Data Area Overview Details, including the name, size, and range of each area are summarized in the following table. Data and memory areas are normally referred to by their acronyms, e.g., the IR Area, the SR Area, etc. Area
Size
Range
Internal Relay Area 1
3,776 bits
IR 000 to IR 235
Special Relay Area 1 Special Relay Area 2 Internal Relay Area 2
312 bits 704 bits 3,392 bits
SR 236 to SR 255 SR 256 to SR 299 IR 300 to IR 511
Temporary Relay Area
8 bits
TR 00 to TR 07
Holding Relay Area
1,600 bits
HR 00 to HR 99
Auxiliary Relay Area
448 buts
AR 00 to AR 27
Link Relay Area
1,024 bits
LR 00 to LR 63
Timer/Counter Area
512 counters/ timers
TC 000 to TC 511
Comments Refer to 3-1-2 IR/SR Area Overview and 3-3 IR (Internal Relay) Area for more details. Refer to 3-1-2 IR/SR Area Overview and 3-4 SR (Special Relay) Area for more details. Refer to 3-1-2 IR/SR Area Overview and 3-3 IR (Internal Relay) Area for more details. Used to temporarily store and retrieve execution conditions when programming certain types of branching ladder diagrams. Used to store data and to retain the data values when the power to the PC is turned OFF. Contains flags and bits for special functions. Retains status during power failure. Used for data links in the PC Link System. (These bits can be used as work words or work bits when not used in the PC Link System.) Used to define timers and counters, and to access completion flags, PV, and SV. TIM 000 through TIM 015 are refreshed via interrupt processing as high-speed timers.
Data Memory Area
Fixed DM Area Extended Data Memory Area
6,144 words
1,000 words 2,600 words 3,400 words 31 words (44 words) 512 words 56 words 6,144 words
DM 0000 to DM 6143
Read/Write
DM 0000 to DM 0999 DM 1000 to DM 2599 DM 2600 to DM 5999 DM 6000 to DM 6030 DM 6100 to DM 6143 DM 6144 to DM 6599 DM 6600 to DM 6655 EM 0000 to EM 6143
DM 6031 is used for indirect DM addressing and EM bank information and should not be written by the user. Normal DM. Special I/O Unit Area Normal DM. History Log Link test area (reserved) Fixed DM Area (read only) PC Setup The amount of EM area memory depends on the PC model being used. PCs are available with no EM, one 6,144-word bank, or three 6,144-word banks. Like DM, the EM memory can be accessed in word units only and EM area data is retained when the power to the PC is turned OFF.
Work Bits and Words
When some bits and words in certain data areas are not being used for their intended purpose, they can be used in programming as required to control other bits. Words and bits available for use in this fashion are called work words and work bits. Most, but not all, unused bits can be used as work bits. Those that can be used are described area-by-area in the remainder of this section. Actual application of work bits and work words is described in Section 4 Writing and Inputting the Program.
Flags and Control Bits
Some data areas contain flags and/or control bits. Flags are bits that are automatically turned ON and OFF to indicate particular operation status. Although
24
Page 43
Section 3-2
Data Area Structure some flags can be turned ON and OFF by the user, most flags are read only; they cannot be controlled directly. Control bits are bits turned ON and OFF by the user to control specific aspects of operation. Any bit given a name using the word bit rather than the word flag is a control bit, e.g., Restart bits are control bits.
3-1-2 IR/SR Area Overview When designating a data area, the acronym for the area is always required for any area except the IR and SR areas. Although the acronyms for the IR and SR areas are given for clarity in text explanations, they are not required, and not entered, when programming. The IR and SR areas are divided into two 256-word sections; the boundary between these sections is located in the SR area between SR 255 and SR 256. When the SR area is used as an operand in an instruction, the operand cannot cross over this boundary. Also, basic instructions that access bits in the second section (SR 25600 through IR 51115) have somewhat longer execution times. Area
Range
IR Area 1 I/O Area 1
IR 000 to IR 029
Group-2 High-density I/O Unit and B7A Interface Unit Area SYSMAC BUS and DeviceNet Output Area Special I/O Unit Area 1 Optical I/O Unit and I/O Terminal Area Work Area SR Area 1 SR Area 2
IR Area 2 I/O Area 2
IR 030 to IR 049 IR 050 to IR 099 IR 100 to IR 199 IR 200 to IR 231
Note
I/O words are allocated to the CPU Rack and Expansion I/O Racks by slot position. Allocated to Group-2 High-density I/O Units and to B7A Interface Units 0 to 9. Allocated to DeviceNet outputs and Remote I/O Slave Racks 0 to 4. Allocated to Special I/O Units 0 to 9. Allocated to Optical I/O Units and I/O Terminals.
IR 232 to IR 235 For use as work bits in the program. SR 23600 to SR 25507 Contains system clocks, flags, control bits, and status information. SR 256 to SR 299 Contains flags, control bits, and status information. SR 290 to SR 297 are used as I/O words by MCRO(99). IR 300 to IR 309
Work Area Group-2 High-density I/O Unit Area 2 Work Area DeviceNet Input Area Special I/O Unit Area 2 Work Area
Comments
IR 310 to IR 329 IR 330 to IR 341
These I/O words are allocated to a third Expansion I/O Rack by slot position. For use as work bits in the program. Allocated to Group-2 High-density I/O Units.
IR 342 to IR 349 IR 350 to IR 399 IR 400 to IR 459 IR 460 to IR 511
For use as work bits in the program. Allocated to DeviceNet inputs. Allocated to Special I/O Units A to F. For use as work bits in the program.
1. Refer to 3-3 IR (Internal Relay) Area for more details on the IR area. Refer to 3-4 SR (Special Relay) Area for more details on the SR area. 2. Bits in IR Area 1 and IR Area 2 can can be used in programming as work bits when not used for their allocated purpose.
3-2
Data Area Structure When designating a data area, the acronym for the area is always required for any but the IR and SR areas. Although the acronyms for the IR and SR areas are often given for clarity in text explanations, they are not required, and not entered, when programming. Any data area designation without an acronym is assumed to be in either the IR or SR area. Because IR and SR addresses run consecutively, the word or bit addresses are sufficient to differentiate these two areas.
25