The text of a manual · part 15 of 68
Programmable Controllers C200HX-CPU-ZE, C200HG-CPU-ZE, C200HE-CPU-ZE Operation Manual: SECTION 4 Writing and Inputting the Program, pages 119 to 127
Pages 119 to 127 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 119
Section
Preparation for Operation
4-6
4-6-7 Reading the I/O Table The I/O Table Read operation is used to access the I/O table that is currently registered in the CPU Unit memory. This operation can be performed in any PC mode. Key Sequence
[0 to 3]
[0 to 9]
Rack number
Unit number
Press the EXT key to select Remote I/O Slave Racks or Optical I/O Units.
Example
00000 00000 FUN (??) 00000IOTBL ? ?Ć?U=
(Main Rack)
(Slave Rack Units)
00000IOTBL ? R??Ć?U= (Optical I/O Unit)
00000IOTBL ? 2??LU= 00000IOTBL ? ?Ć?U= 00000IOTBL ? 0Ć?U= 00000IOTBL ? 0-5U= 00000IOTBL READ 0-5U=i*** 005 00000IOTBL READ 0-4U=o*** 004 00000IOTBL READ 0-5U=i*** 005
106
(Main Rack)
Page 120
Section
Preparation for Operation
4-6
Meaning of Displays I/O Unit Designations for Displays (see I/O Units Mounted in Remote Slave Racks, page 108) C500, 1000H/C2000H I/O Units No. of points
Input Unit
Output Unit
16
O * * *
32
I * * * I I * *
64
I I I I
O O O O
O O * *
C200H, C200HS I/O Units No. of points 8 16
Input Unit
Output Unit i(*)* * i i * * o * * * o o * *
Note: (∗) is i for non-fatal errors or F_
I/O Units
00000IOTBL READ *Ć*U=**** *** I/O word number I/O type: i: (input), o: (output) Unit number (0 to 9) Rack number (0 to 3)
Interrupt Input Units
00000IOTBL READ *Ć*U=**** INT0 or INT1: Mounted to CPU Unit or Expansion I/O Rack.
Special I/O Units
00000IOTBL READ *Ć*U=$*** Blank: W:
Unit 1 exclusively Unit 2 exclusively C: High-speed Counter Special I/O N: Position Control Unit Unit type: A: Other Unit number (0 to F) Indicates Special I/O Unit
Remote I/O Master Units
00000IOTBL READ *Ć*U=RMT* Remote I/O Master no. (0 or 1)
107
Page 121
Section
Preparation for Operation Remote I/O Slave Racks
4-6
00000IOTBL READ R**Ć*U=**** *** I/O word number I/O type: I, O i, o (see tables on previous page) Unit number (0 to 9) Remote I/O Slave Unit number (0 to 4) Remote I/O Master Unit number (0 or 1) Indicates a Remote I/O Rack
Group-2 HIgh-density I/O Units
00000IOTBL READ *Ć*U=#*** 2: 4:
2 words (32 points) 4 words (64 points)
I: O:
Input Unit Output Unit
Unit number (0 to F) Indicates Group-2 HIgh-density I/O Unit
Optical I/O Units and Remote Terminals
00000IOTBL READ 2**HU=R*Ć* I/O type: I (input), O (output), or W (input/output) Remote I/O Master Unit number (0 to 1) Word (H: leftmost 8 bits; L: rightmost 8 bits) I/O word number (200 to 231)
4-6-8 Clearing the I/O Table The I/O Table Clear operation is used to delete the contents of the I/O table that is currently registered in the CPU Unit memory. The PC will be set for operation based on the I/O Units mounted when the I/O Table Clear operation is performed. The I/O Table Clear operation will reset all Special I/O Units and Link Units mounted at the time. Do not perform the I/O Table Clear operation when a Host Link Unit, PC Link Unit, Remote I/O Master Unit, High-speed Counter Unit, Position Control Unit, or other Special I/O Unit is in operation. Note This operation can be performed only in PROGRAM mode with the write-protection switch (pin 1 of the CPU Unit’s DIP switch) set to OFF (OFF=“WRITE”).
108
Page 122
Section
Preparation for Operation
4-6
Key Sequence
Example
00000 00000 FUN (??) 00000IOTBL ?Ć?U= 00000IOTBL
WRIT ????
00000IOTBL
CANC ????
00000IOTBL
CANC 9713
00000IOTBL OK
CANC
4-6-9 SYSMAC NET Link Table Transfer The SYSMAC NET Link Table Transfer operation transfers a copy of the SYSMAC NET Link Data Link table to the UM Area program memory. This allows the user program and SYSMAC NET Link table to be written into EPROM together. The data link table must be created with the SYSMAC Support Software and transferred to the PC before copying the table to program memory. The data link table is stored in RAM when it is transferred to the PC from the SYSMAC Support Software, so the table will be lost if the CPU Unit’s backup battery dies. To prevent this loss, we recommend converting the program (with the data link table) to EPROM or storing the program in an EEPROM Memory Cassette. Note When power is applied to a PC which has a copy of a SYSMAC NET Link table stored in its program memory, the SYSMAC NET Link table of the CPU Unit will be overwritten. Changes made in the SYSMAC NET Link table do not affect the copy of the SYSMAC NET Link table in program memory; SYSMAC NET Link Table Transfer must be repeated to change the copy in program memory. The SYSMAC NET Link Table Transfer operation will not work if: • The Memory Unit is not RAM or EEPROM, or the write protect switch is not set to write. • There isn’t an END(001) instruction. • The contents of program memory exceeds 14.7 KW. The program capacity is reduced when memory is allocated to expansion DM or the I/O comment area. About 0.5 KW of program memory beyond the END(001) instruction are needed to store the data link table. SYSMAC NET Link table transfer can only be done in PROGRAM mode.
109
Page 123
Section
Preparation for Operation Key Sequence
Example
00000 00000 FUN(??) 00000LINK TBL~UM (SYSMAC-NET)???? 00000LINK TBL~UM (SYSMAC-NET)9713 00000LINK TBL~UM OK The following indicates that the I/O table cannot be transferred.
00000LINK TBL~UM DISABLED
110
4-6
Page 124
Inputting, Modifying, and Checking the Program
4-7
Section
4-7
Inputting, Modifying, and Checking the Program Once a program is written in mnemonic code, it can be input directly into the PC from a Programming Console. Mnemonic code is keyed into Program Memory addresses from the Programming Console. Checking the program involves a syntax check to see that the program has been written according to syntax rules. Once syntax errors are corrected, a trial execution can begin and, finally, correction under actual operating conditions can be made. The operations required to input a program are explained below. Operations to modify programs that already exist in memory are also provided in this section, as well as the procedure to obtain the current cycle time. Before starting to input a program, check to see whether there is a program already loaded. If there is a program loaded that you do not need, clear it first using the program memory clear key sequence, then input the new program. If you need the previous program, be sure to check it with the program check key sequence and correct it as required. Further debugging methods are provided in Section 7 Program Monitoring and Execution.
4-7-1 Setting and Reading from Program Memory Address When inputting a program for the first time, it is generally written to Program Memory starting from address 00000. Because this address appears when the display is cleared, it is not necessary to specify it. When inputting a program starting from other than 00000 or to read or modify a program that already exists in memory, the desired address must be designated. To designate an address, press CLR and then input the desired address. Leading zeros of the address need not be input, i.e., when specifying an address such as 00053 you need to enter only 53. The contents of the designated address will not be displayed until the down key is pressed. Once the down key has been pressed to display the contents of the designated address, the up and down keys can be used to scroll through Program Memory. Each time one of these keys is pressed, the next or previous word in Program Memory will be displayed. If Program Memory is read in RUN or MONITOR mode, the ON/OFF status of any displayed bit will also be shown. Key Sequence
111
Page 125
Section
Inputting, Modifying, and Checking the Program Example
4-7
If the following mnemonic code has already been input into Program Memory, the key inputs below would produce the displays shown. 00000
Address
Instruction
00200
00200 00201 00202
LD AND TIM
00203
LD
00200READ LD
OFF 00000
00201READ AND
ON 00001
00202READ TIM
OFF 000
00202 TIM 00203READ LD 00100
Operands 00000 00001 000 #0123 00100
#0123 ON
4-7-2 Entering and Editing Programs Programs can be entered and edited only in PROGRAM mode with the writeprotect switch (pin 1 of the CPU Unit’s DIP switch) set to OFF (OFF=“WRITE”). The same procedure is used to either input a program for the first time or to edit a program that already exists. In either case, the current contents of Program Memory is overwritten, i.e., if there is no previous program, the NOP(000) instruction, which will be written at every address, will be overwritten. To enter a program, input the mnemonic code that was produced from the ladder diagram step-by-step, ensuring that the correct address is set before starting. Once the correct address is displayed, enter the first instruction word and press WRITE. Next, enter the required operands, pressing WRITE after each, i.e., WRITE is pressed at the end of each line of the mnemonic code. When WRITE is pressed at the end of each line, the designated instruction or operand is entered and the next display will appear. If the instruction requires two or more words, the next display will indicate the next operand required and provide a default value for it. If the instruction requires only one word, the next address will be displayed. Continue inputting each line of the mnemonic code until the entire program has been entered. When inputting numeric values for operands, it is not necessary to input leading zeros. Leading zeros are required only when inputting function codes (see below). When designating operands, be sure to designate the data area for all but IR and SR addresses by pressing the corresponding data area key, and to designate each constant by pressing CONT/#. CONT/# is not required for counter or timer SVs (see below). The AR area is designated by pressing SHIFT and then HR. TC numbers as bit operands (i.e., completion flags) are designated by pressing either TIM or CNT before the address, depending on whether the TC number has been used to define a timer or a counter. To designate an indirect DM address, press CH/∗ before the address (pressing DM is not necessary for an indirect DM address).
112
Page 126
Section
Inputting, Modifying, and Checking the Program
4-7
Inputting SV for Counters and Timers
The SV (set value) for a timer or counter is generally entered as a constant, although inputting the address of a word that holds the SV is also possible. When inputting an SV as a constant, CONT/# is not required; just input the numeric value and press WRITE. To designate a word, press CLR and then input the word address as described above.
Designating Instructions
The most basic instructions are input using the Programming Console keys provided for them. All other instructions are entered using function codes. These function codes are always written after the instruction’s mnemonic. If no function code is given, there should be a Programming Console key for that instruction. To designate the differentiated form of an instruction, press NOT after the function code. To input an instruction using a function code, set the address, press FUN, input the function code including any leading zeros, press NOT if the differentiated form of the instruction is desired, input any bit operands or definers required for the instruction, and then press WRITE.
! Caution
Enter function codes with care and be sure to press SHIFT when required.
Key Sequence [Address displayed]
[Instruction word]
[Operand]
113
Page 127
Section
Inputting, Modifying, and Checking the Program Example
The following program can be entered using the key inputs shown below. Displays will appear as indicated. 00000 00200 00200 LD
00002
00201READ NOP (000) 00201 TIM
000
00201 TIM DATA #0000 00201 TIM
#0123
00202READ NOP (000) 00202 FUN (??) 00202 TIMH (015)
000
00202 TIMH DATA #0000 00202 TIMH 00203READ NOP (000)
114
4-7
#0500
Address
Instruction
00200 00201
LD TIM
00202
TIMH(015)
Operands 00002 000 #0123 000 #0500