The text of a manual · part 6 of 27
SYSMAC C20P/C28P/C40P/C60P P-type Programmable Controllers Operation Manual, pages 28 to 36
Pages 28 to 36 of 211
The original document is the PDF (2.2 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 C28P
Page 28
Section 3–3
IR Area
I/O Bits Available in Special The following table shows which bits are allocated to each of the Special I/O I/O Units Units. Bits in the shaded areas can be used as work bits but not as output bits. The word addresses depend on the Unit(s) that the Special I/O Unit is coupled to. In all cases the first Special I/O Unit address for input and output words is one more than the last address for input and output words used by the Unit to which the Special I/O Unit is attached. For example, if the last word address was IR 03, the first input or output word address for the Special I/O Units will be IR 04. In the tables below “n” is the word allocated prior to the Special I/O Unit.
Model
Input bits IR (n + 1)
IR (n + 6)
00
00
08
01
01
09
02
10
02
C1K–AD
C4K–AD
03
Cannot be used
03
11
04
04
12
05
05
13
06
06
14
07
07
15
IR (n + 1)
IR (n + 6)
00
08
00
08
01
09
01
09
02
10
02
10
03
11
03
11
04
12
04
12
05
13
05
13
06
14
06
14
07
15
07
15
IR (n + 6)
IR (n + 1)
C1K–DA
Cannot be used
C4K–TM
08
01
09
02
10
03
11
04
12
05
13
06
14
07
15
00
08
00
08
01
09
01
09
02
10
02
10
03
11
03
11
04
12
04
12
05
13
05
13
06
14
06
14
07
15
07
15
IR (n + 1)
IR (n + 6)
00
00
08
01
01
09
02
02
10
03
03
11
04
12
05
13
06
14
07
15
Cannot be used
PC Configuration and I/O Word Allocation
00
IR (n + 6)
IR (n + 1)
C20–LK 011(–P)
Output bits
A P-type PC consists of a CPU Unit plus one or more of the following Units: Expansion I/O Units, Analog Timer Units, Analog I/O Units, or an I/O Link Unit. All of these Units are connected in series with the CPU Unit at one end. An I/O Link Unit, if included, must be on the other end (meaning only one I/O
19
Page 29
Section 3–3
IR Area
Link Unit can be used) and an Analog Timer Unit cannot be used with. The rest of the Units can be in any order desired. The tables on the following pages show the possible configurations for a P-type PC. Although the tables branch to show the various possibilities at any one point, there can be no branching in the actual PC connections. You can choose either branch at any point and go as far as required, i.e., you can break off at any point to create a smaller PC System.When implementing a system there is a physical restriction on the total cable length allowable. The sum of the lengths of all cables in the system must be limited to less than 1.2 meters. The tables also show which words will be input words and which words will be output words. All of these are determined by the position of the Unit. With the C4P and C16P Expansion I/O Units, the type of Unit (input or output) determines whether the input or output word is used. The symbols used in the table represent the following:
C20P/C28P
C20P or C28P CPU Unit
Input
Output
Input
Output
C40P/C60P Input
C40P or C60P CPU or Output
Expansion I/O Unit C4K/C16P Input or
Output
C20P/C28P/TU/AN/LU
Input
C4K or C16P Expansion I/O Unit
C20P Expansion I/O Unit, C28P Expansion I/O Unit,
Output
Analog Timer Unit, Analog I/O Unit, or I/O Link Unit
20
Page 30
Section 3–3
IR Area IR 00
IR 05
C20P/C28P Input
Output
IR 01
IR 06
IR 02
Output
Input
C4K/C16P Input or
IR 07
IR 03
C4K/C16P or
IR 08
IR 04
C4K/C16P
Output
Input or
IR 09
C4K/C16P
Output
Input or
Output
C20P/C28P/TU/AN/LU
Input
C4K/C16P
C20P/C28P/TU/AN/LU
Input
Output
Output
Input or
Output
C20P/C28P/TU/AN/LU
Input
Output
C40P/C60P Input
Output
Input
C4K/C16P
C20P/C28P/TU/AN/LU
Input
Output
Input or
Output
C4K/C16P
Output
Input or
Output
C20P/C28P/TU/AN/LU
Input
C4K/C16P
C20P/C28P/TU/AN/LU
Input
Output
Output
Input or
Output
C20P/C28P/TU/AN/LU
Input
Output
C40P/C60P Input
Output
Input
Output
Input
C4K/C16P
C40P/C60P Input
Output
Output
Input or
Output
C20P/C28P/TU/AN/LU
Input C20P/C28P/TU/AN/LU
Input
Output
C4K/C16P Input or
Output
C4K/C16P
C4K/C16P Input or
Output
Output
Input or
Output
C20P/C28P/TU/AN/LU
Input
C4K/C16P
C20P/C28P/TU/AN/LU
Input
Output
Output
Input or
Output
C20P/C28P/TU/AN/LU
Input
Output
C40P/C60P Input
Output
Input
Output
21
Page 31
Section 3–3
IR Area IR 00
IR 05
C20P/C28P Input
Output
IR 01
IR 06
C20P/C28P/TU/AN/LU
Input
Output
IR 02
IR 07
IR 03
Output
IR 04
C4K/C16P
C20P/C28P/TU/AN/LU
Input
IR 08
Input or
IR 09
C4K/C16P
Output
Input or
Output
C20P/C28P/TU/AN/LU
Input
C4K/C16P
C20P/C28P/TU/AN/LU
Input
Output
Output
Input or
Output
C20P/C28P/TU/AN/LU
Input
Output
C40P/C60P Input
Output
Input
Output
Input
C4K/C16P
C40P/C60P Input
Output
Output
Input or
Output
C20P/C28P/TU/AN/LU
Input C4K/C16P
C40P/C60P Input
Output
Input
Output
Input or
Output
C4K/C16P
Output
Input or
Output
C20P/C28P/TU/AN/LU
Input
C4K/C16P
C20P/C28P/TU/AN/LU
Input
Output
Output
Input or
Output
C20P/C28P/TU/AN/LU
Input
Output
C40P/C60P Input
22
Output
Input
Output
Page 32
Section 3–3
IR Area IR 00
IR 05
Input
Output
IR 01
IR 06
IR 07
IR 03
C4K/C16P
C40P/C60P Input
IR 02
Output
Input or
IR 08
IR 04
C4K/C16P
Output
Input or
IR 09
C4K/C16P
Output
Input or
Output
C20P/C28P/TU/AN/LU
Input
C4K/C16P
C20P/C28P/TU/AN/LU
Input
Output
Output
Input or
Output
C20P/C28P/TU/AN/LU
Input
Output
C40P/C60P Input
Output
Input
C4K/C16P
C20P/C28P/TU/AN/LU
Input
Output
Input or
Output
C4K/C16P
Output
Input or
Output
C20P/C28P/TU/AN/LU
Input
C4K/C16P
C20P/C28P/TU/AN/LU
Input
C40P/C60P Input
Output
Input
C20P/C28P/TU/AN/LU
Output
Input
Output
Output
C20P/C28P/TU/AN/LU
Input
Output
Input
Output
Output
Input or
Output
C20P/C28P/TU/AN/LU
Input
Output
C40P/C60P
Output
Input
Output
C4K/C16P
C40P/C60P Input
Input
Output
Input or
Output
C20P/C28P/TU/AN/LU
Input
Output
23
Page 33
Section 3–4
SR Area
3–4
SR Area The SR area contains flags and control bits used for monitoring system operation, accessing clock pulses, and signalling errors. SR area word addresses range from 18 through 19; bit addresses, from 1808 through 1907. The following table lists the functions of SR area flags and control bits. Most of these bits are described in more detail following the table. Unless otherwise stated, flags are OFF until the specified condition arises, when they are turned ON. Bits 1903 to 1907 are turned OFF when END is executed at the end of each program scan, and thus cannot be monitored on the Programming Console. Other control bits are OFF until set by the user. Word
Bit
Function
18
08
Battery Alarm Flag
09
Scan Time Error Flag
10
High-speed Counter Reset
11
Always OFF Flag
12
Always OFF Flag
13
Always ON Flag
14
Always OFF Flag
15
First Scan Flag
00
0.1-second Clock Pulse
01
0.2-second Clock Pulse
02
1-second Clock Pulse
03
Error (ER) Flag
04
Carry (CY) Flag
05
Greater Than (GR) Flag
06
Equals (EQ) Flag
07
Less Than (LE) Flag
19
3–4–1
Battery Alarm Flag SR 1808 turns ON if the voltage of the CPU backup battery drops. A voltage drop can be indicated by connecting the output of this bit to an external indicating device such as a LED. This bit can be used in programming to activate an external warning for a low battery.
3–4–2
Scan Time Error Flag SR 1809 turns ON if the scan time exceeds 100 ms. This bit is turned ON when the scan time is between 100 and 130 ms. The PC will still operate but timing may become inaccurate. The PC will stop operating if the execution time exceeds 130 ms.
3–4–3
High-speed Drum Counter Reset SR 1810 turns ON for one scan time when the hard reset signal (input 0001) is turned ON.
3–4–4
Clock Pulse Bits Three clock pulses are available to control program timing. Each clock pulse bit is ON for the first half of the rated pulse time, then OFF for the second half. In other words, each clock pulse has a duty factor of 1 to 1.
24
Page 34
Section 3–4
SR Area
These clock pulse bits are often used with counter instructions to create timers. Refer to 5–11 Timer and Counter Instructions for an example of this. Pulse width
0.1 s
0.2 s
1.0 s
Bit
1900
1901
1902
SR 1900 0.1-s clock pulse
.05 s
.05 s 0.1 s
SR 1901 0.2-s clock pulse
0.1 s
0.1 s 0.2 s
SR 1902 1.0-s clock pulse
0.5 s
0.5 s 1.0 s
3–4–5
Caution: Because the 0.1-second clock pulse bit has an ON time of 50 ms, the CPU may not be able to accurately read the pulses if program execution time is too long.
Error Flag ER SR 1903 turns ON when the results of an arithmetic operation is not output in BCD or the value of the BIN data processed by the BIN to BCD or BCD to BIN conversion instruction exceeds 9999. When the ER Flag is ON the current instruction is not executed.
3–4–6
Always OFF and Always ON Flags SR 1811, SR 1812 and SR 1814 are always OFF and AR 1813 is always ON. By connecting these bits to external indicating devices such as a LED they can be used to monitor the PC’s operating status.
3–4–7
First Scan Flag SR 1815 turns ON when program execution starts and turns OFF after one scan.
3–4–8
Arithmetic Flags The following flags are used in data shifting, arithmetic calculation, and comparison instructions. They are generally referred to only by their two-letter abbreviations. These flags are all reset when END is executed, and therefore cannot be monitored from a Programming Device. Refer to 5–12 Data Shifting, 5–14 Data Comparison and 5–16 BCD Calculations for details.
Carry Flag, CY
SR 1904 turns ON when there is a carry in the result of an arithmetic operation. The content of CY is also used in some arithmetic operations, e.g., it is added or subtracted along with other operands. This flag can be set and cleared from the program using the STC and CLC instructions. Use CLC before any instruction using CY unless the current content of CY is required.
Greater Than Flag, GR
SR 1905 turns ON when the result of a comparison shows the second of two 4-digit operands to be greater than the first.
25
Page 35
Section 3–7
TC Area Equal Flag, EQ
SR 1906 turns ON when the result of a comparison shows two operands to be equal or when the result of an arithmetic operation is zero.
Less Than Flag, LE
SR 1907 turns ON when the result of a comparison shows the second of two 4-digit operands to be less than the first.
3–5
DM Area The DM area is used for internal data storage and manipulation and is accessible only by word. Addresses range from DM 00 through DM 63. Although composed of 16 bits just like any other word in memory, DM words cannot be specified by bit for use in instructions with bit-size operands, such as LD, OUT, AND, and OR. When the HDM(98) (High-speed Drum Counter) is used the DM area words 32 to 63 are used as the area where the upper and lower limits of the counter are preset and as such these words cannot be used for any other purposes. The DM area retains status during power interruptions.
3–6
HR Area The HR area is used to store and manipulate various kinds of data and can be accessed either by word or by bit. Word addresses range from HR 0 through HR 9; bit addresses, from HR 000 through HR 915. 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, or when power is interrupted.
3–7
TC 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 00 through TC 47. Each TC number is defined as either a timer or counter using one of the following instructions: TIM, TIMH, CNT or CNTR. No prefix is required when using a TC number as a definer 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 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. Once defined, a TC number can be designated as an operand in one or more 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.
26
Page 36
Section 3–8
TR Area
TC numbers are also used to access the SV of timers and counters from a Programming Device. The procedures for doing so from the Programming Console are provided in 7–8 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. Refer to 5–7 Interlock and Interlock Clear – IL(02) and ILC(03) 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 00” is used to designate three things: the Timer instruction defined with TC number 00, 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. In explanations of ladder diagrams, the Completion Flag and PV accessed through a TC number are generally called the Completion Flag or the PV of the instruction (e.g., the Completion Flag of TIM 00 is the Completion Flag accessed through TC number 00, which has been defined using TIM). When the RDM(98) (Reversible High-speed Drum Counter) is used TC 46 is used as the present value storage area of the counter and thus cannot be used for any other purpose.
3–8
TR 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 Programming. 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 TR bit is not used twice in the same instruction block.
27