Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 5 of 27

SYSMAC C20P/C28P/C40P/C60P P-type Programmable Controllers Operation Manual, pages 18 to 27

Pages 18 to 27 of 211: SECTION 2; SECTION 3

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 18 read from a scan by OCR; it may hold reading errors

SECTION 2 Hardware Considerations

2-1 Introduction ..... 0... cence ee ee eee ee neee 10 2-2 Indicators .... 0... ec cee eee ence eee e eee eneee 10 2-3 PC Configuration ...... 0... ec eee eee ee 10

Page 19

Section 2–3

PC Configuration

2–1

Introduction This section provides information on hardware aspects of P-type PCs that are relevant to programming and software operation. These include indicators on the CPU and basic PC configuration. This information is covered in detail in the Installation Guide.

2–2

Indicators CPU indicators provide visual information on the general operation of the PC. Using the flags and other error indicators provided in the memory data areas, although not a substitute for proper error programming, provides ready confirmation of proper operation.

CPU Indicators

CPU indicators are located on the front right hand side of the PC adjacent to the I/O expansion slot and are described in the following table. Indicator

2–3

Function

POWER

Lights when power is supplied to the CPU.

RUN

Lights when the CPU is operating normally.

ERR

Lights when an error is discovered in system error diagnosis operations. When this indicator lights, the RUN indicator will go off, CPU operation will be stopped, and all outputs from the PC will be turned OFF.

ALARM

Lights when an error is discovered in system error diagnosis operations. PC operation will continue.

PC Configuration The Units from which P-type PCs can be built are shown below. Unit type CPU

Expansion I/O Unit

Special I/O Units

Name

Words occupied

Inputs provided

Outputs provided

C20P

2

12 points

8 points

C28P

2

16 points

12 points

C40P

4

24 points

16 points

C60P

4

32 points

24 points

C4K

2

4 input points or 4 output points

C20P

2

12 points

8 points

C28P

2

16 points

12 points

C40P

4

24 points

16 points

C60P

4

32 points

24 points

Analog Timer Unit

2

4 timer inputs

C4K Analog Input Unit

2

4 analog inputs

C1K Analog Input Unit

2

1 analog input

Analog Output Unit

2

1 analog output

I/O Link Unit

2

16 input and 16 output bits

Each PC is connected in series starting with a CPU and, if required, continuing on with Expansion I/O or Special I/O Units. All other Units are connected in series following the CPU and can be in any order desired except for the I/O Link Unit, which must always come last. Up to five Units, including the CPU can be connected as long as the total number of words occupied does not exceed ten. Refer to Section 3–3 IR Area for configuration examples.

10

Page 20

SECTION 3 Memory Areas 3–1 3–2 3–3 3–4

3–5 3–6 3–7 3–8

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Area Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IR Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SR Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–4–1 Battery Alarm Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–4–2 Scan Time Error Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–4–3 High-speed Drum Counter Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–4–4 Clock Pulse Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–4–5 Error Flag ER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–4–6 Always OFF and Always ON Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–4–7 First Scan Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–4–8 Arithmetic Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DM Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . HR Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TC Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TR Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12 12 15 24 24 24 24 24 25 25 25 25 26 26 26 27

11

Page 21

Section 3–2

Data Area Structure

3–1

Introduction 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 Program Memory, where the user’s program is actually stored. This section describes these areas individually and provides information that will be necessary to use them. The name, acronym, range, and function of each area are summarized in the following table. All but the last one of these are data areas. All memory areas are normally referred to by their acronyms.

Area

Acronym

Range

Internal Relay area

IR

Words: Bits:

00 to 18 (right half) 0000 to 1807

Used to manage I/O points, control other bits, timers, and counters, to temporarily store data.

Special Relay area

SR

Words: Bits:

18 (left half) and 19 1808 to 1907

Contains system clocks, flags, control bits, and status information.

Data Memory area

DM

DM 00 to DM 63 (words only)

Used for internal data storage and manipulation.

Holding Relay area

HR

Words: Bits:

Used to store data and to retain the data values when the power to the PC is turned off.

Timer/Counter area

TC

TC 00 to TC 47 (TC numbers are used to access other information)

Used to define timers and counters and to access Completion Flags, PV, and SV for them.

Temporary Relay area

TR

TR 00 to TR 07 (bits only)

Used to temporarily store execution conditions.

Program Memory

UM

UM: 1,194 words.

Contains the program executed by the CPU.

Function

HR 0 to HR 9 HR 000 to HR 915

Work Bits and Words

When some bits and words in certain data areas are not 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 bits and work words. Most, but not all, unused bits can be used as work bits. Those that can be are specified by area in the remainder of this section. Actual application of work bits and work words is described in Section 4 Programming.

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 status of one form or another. Although some flags can be turned ON and OFF by the user, most flags can be 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–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, they are not required and not input when programming. Any data area designation without an acronym is assumed to be in either the IR and SR area. Because IR and SR addresses run consecutively, the word or bit addresses are sufficient to differentiate these two areas.

12

Page 22

Section 3–2

Data Area Structure

An actual data location within any data area but the TC area is designated by its address. The address designates the bit and/or word within the area where the desired data is located. The TR area consists of individual bits used to store execution conditions at branching points in ladder diagrams. The use of TR bits is described in Section 4 Programming. The TC area consists of TC numbers, each of which is used for a specific timer or counter defined in the program. Refer to 3–7 TC Area for more details on TC numbers and to 5–11 Timer and Counter Instructions for information on actual application. The rest of the data areas (i.e., the IR, SR, HR and DM areas) consist of words, each of which consists of 16 bits numbered 00 through 15 from right to left. IR words 00 and 01 are shown below with bit numbers. Here, the content of each word is shown as all zeros. Bit 00 is called the rightmost bit; bit 15, the leftmost bit. Bit number

15

14

13

12

11

10

09

08

07

06

05

04

03

02

01

00

IR word 00

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

IR word 01

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

Note The term least significant is often used for rightmost; the term most significant, for leftmost. These terms have not been used in this manual because a single word is often split into two or more parts, with each part used for different parameters or operands, sometimes even with bits in another word. When this is done, the rightmost bits in a word may actually be the most significant bits, i.e., the leftmost bits, of a value with other bits, i.e., the least significant bits, contained in another word. The DM area is accessible by word only; you cannot designate an individual bit within a DM word. Data in the IR, SR and HR areas is accessible either by bit or by word, depending on the instruction in which the data is being used. To designate one of these areas by word, all that is necessary is the acronym (if required) and the one or two-digit word address. To designate an area by bit, the word address is combined with the bit number as a single three- or four-digit address. The examples in the following table should make this clear. The two rightmost digits of a bit designation must indicate a bit between 00 and 15. The same TC number can be used to designate either a word containing the present value (PV) of the timer or counter or a bit that functions as the Completion Flag for the timer or counter. This is explained in more detail in 3–7 TC Area.

Area

Word designation

Bit designation

IR

00

0015 (leftmost bit in word 00)

SR

19

1900 (rightmost bit in word 19)

DM

DM 10

Not possible

TC

TC 46 (designates PV)

TC 46 (designates Completion Flag)

13

Page 23

Section 3–2

Data Area Structure Data Structure

Word data input as decimal values is stored in binary-coded decimal (BCD) code; word data input as hexadecimal is stored in binary form. Because each word contains 16 bits, each four bits of a word represents one digit: either a hexadecimal digit equivalent numerically to the binary bits or decimal. One word of data thus contains four digits, which are numbered from right to left. These digit numbers and the corresponding bit numbers for one word are shown below.

Digit number

3

2

1

0

Bit number

15

14

13

12

11

10

09

08

07

06

05

04

03

02

01

00

Contents

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

When referring to the entire word, the digit numbered 0 is called the rightmost digit; the one numbered 3, the leftmost digit. A piece of data in memory does not necessarily require exactly one word. If a piece of data is in 3-digit BCD, for example, only 12 bits will be required to express it (see decimal point example below). These would most likely be in the same word and occupy either the rightmost or leftmost three digits. Data requiring more than four digits must be split between words: sometimes between two whole words and sometimes between one word and part of another word. When inputting data into data areas, it must be input in the proper form for the intended purpose. This is no problem when designating individual bits, which are merely turned ON (equivalent to a binary value of 1) or OFF (a binary value of 0). When inputting word data, however, it is important to input it either as decimal or as hexadecimal, depending on what is called for by the instruction it is to be used for. Section 5 Instruction Set specifies when a particular form of data is required for an instruction. Converting Different Forms of Data

Binary and hexadecimal can be easily converted back and forth because each four bits of a binary number is numerically equivalent to one digit of a hexadecimal number. The binary number 0101111101011111 is converted to hexadecimal by considering each set of four bits in order from the right. Binary 1111 is hexadecimal F; binary 0101 is hexadecimal 5. The hexadecimal equivalent would thus be 5F5F, or 24,415 in decimal (163 x 5 + 162 x 15 + 16 x 5 + 15). Decimal and BCD can also be easily converted back and forth. In this case, each BCD digit (i.e., each four BCD bits) is numerically equivalent of the corresponding decimal digit. The BCD bits 0101011101010111 are converted to decimal by considering each four bits from the right. Binary 0101 is decimal 5; binary 0111 is decimal 7. The decimal equivalent would thus be 5,757. Note that this is not the same numeric value as the hexadecimal equivalent of 0101011101010111, which would be 5,757 hexadecimal, or 22,359 in decimal (163 x 5 + 162 x 7 + 16 x 5 + 7). Because the numeric equivalent of each four BCD binary bits must be equivalent to a decimal value, any four bit combination numerically greater then 9 cannot be used, e.g., 1011 is not allowed because it is numerically equivalent to 11, which cannot be expressed as a single digit in decimal notation. The binary bits 1011 are of course allowed in hexadecimal and they are equivalent to the hexadecimal digit C.

14

Page 24

Section 3–3

IR Area

There are instructions provided to convert data in either direction between BCD and hexadecimal. Refer to 5–15 Data Conversion for details. Tables of binary equivalents to hexadecimal and BCD digits are provided in the appendices for reference. Decimal Points

Digits Bit number

Decimal points are also not stored directly in memory, although some of the parameters contained in data areas have assumed decimal points. For example, if a value is said to be in 3-decimal hexadecimal to the tenths of an second and it occupies the rightmost three digits in a specified word (i.e., bits 00 through 11), the rightmost digit (bits 00 through 03) would contain tenths of a second and the other two digits would contain the number of whole seconds. If the value was 15.4 decimal, the corresponding BCD bits in memory would be as shown below. Not used here. 15

14

13

Contents

3–3

12

1

5

4

11

10

09

08

07

06

05

04

03

02

01

00

0

0

0

1

0

1

0

1

0

1

0

0

IR Area The IR area is used both to control I/O points and as work bits to manipulate and store data internally. It is accessible both by bit and by word. Those words that can be used to control I/O points are called I/O words. Bits in I/O words are called I/O bits. The number of I/O words varies between the P-type PCs. As shown, the IR area is comprised of three main sections. These are input words, output words and work words (work bits). Work bits are used in programming to manipulate data and control other bits. IR area work bits are reset when power is interrupted or PC operation is stopped. Word type

I/O Words

I/O words

I/O bits

Input

IR 00 through IR 04

IR 0000 through IR 0415

Output

IR 05 through IR 09

IR 0500 through IR 0915

Work

IR 10 through IR 18

IR 1000 through IR 1807

I/O bits are assigned to input or output points as described in Word Allocations. If a Unit brings inputs into the PC, the bit assigned to it is an input bit; if the Unit sends an output from the PC, the bit is an output bit. To turn on an output, the output bit assigned to it must be turned ON. When an input turns on, the input bit assigned to it also turns ON. These facts can be used in the program to access input status and control output status through I/O bits. I/O bits that are not assigned to I/O points can be used as work bits, unless otherwise specified in Word Allocations.

Input Bit Usage

Input bits can directly input external signals to the PC and can be used in any order in programming. Each input bit can also be used in as many instruc-

15

Page 25

IR Area

Section 3–3 tions as required to achieve effective and proper control. They cannot be used in instructions that control bit status, e.g., the Output, Differentiation Up, and Keep instructions.

Output Bit Usage

Output bits are used to output program execution results and can be used in any order in programming. Because outputs are refreshed only once during each scan (i.e., once each time the program is executed), any output bit can be used only one instruction that controls its status, including OUT, KEEP(11), DIFU(13), DIFD(14) and SFT(10). If an output bit is used in more than one such instruction, only the status determined by the last one will actually be output from the PC. As outputs are refreshed only once during each scan (i.e. once each time the program is executed), any output bit can be used in only one instruction that controls its status, including OUT, OUT NOT, KEEP(11), DIFU(13), DIFD(14), and SFT(10). If an output bit is used in more than one such instruction, only the status determined by the last instruction will actually be output from the PC. See 5–12–1 Shift Register – SFT(10) for an exception to this rule.

Word Allocations

The maximum number of words available for I/O within the IR area is 10, numbered 00 through 09. The remaining words (10 through 18) are to be used for work bits. (Note that with word 18, only the bits 00 through 07 are available for work bits although some of the remaining bits are required for special purposes when RDM(98) is used). The actual number of bits that can be used as I/O bits is determined by the model of the CPU and the PC configuration. There are different models of Expansion I/O Units and Special I/O Units and I/O Link Units which can be connected to any of the CPUs. Each CPU model provides a particular number of I/O bits and each Expansion I/O Unit, Special I/O Unit or I/O Link Unit provides a particular number of I/O bits. Configuration charts for the possible combinations of CPUs and Units are included later in this section. Refer to those to determine the actual available I/O bits. With P-type PCs, IR 00 through IR 04 are always input bits and IR 05 through IR 09 are always outputs bits. These are allocated in order from IR 00 (input) and IR 05 (output) beginning from the CPU. Each Unit is allocated either one input word and one output word or, for the C40P/C60P Units, two input words and two output words. If the words or bits within a word are not need by the Unit, they are not allocated to any other Unit. Unallocated input bits cannot be used for any purpose, but unallocated output bits can be used in programming as work bits.

16

Page 26

Section 3–3

IR Area I/O Bits Available in CPUs

The following table shows which bits can be used as I/O bits in each of the P-type CPUs. Bits in the shaded areas can be used as work bits but not as output bits. IR 0000 and IR 0001 are used by HDM(98).

Model

Input bits

Output bits

IR 00

C20K

IR 05

00

08

00

08

01

09

01

09

02

10

02

10

03

11

03

11

04

12

05

13

06

14

07

07

15

IR 00

IR 05

04 05 06

C28K

Cannot be used

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 00

C40K

IR 05

IR 06

00

08

00

00

08

00

08

01

09

01

01

09

01

09

02

10

02

02

10

02

10

03

11

03

03

11

03

11

04

12

04

04

12

04

12

05

13

05

05

13

05

13

06

14

06

06

14

06

14

07

15

07

07

15

07

15

IR 01

IR 05

IR 00

C60K

IR 01

Cannot be used

IR 06

00

08

00

08

00

08

00

08

01

09

01

09

01

09

01

09

02

10

02

10

02

10

02

10

03

11

03

11

03

11

03

11

04

12

04

12

04

12

04

12

05

13

05

13

05

13

05

13

06

14

06

14

06

14

06

14

07

15

07

15

07

15

07

15

17

Page 27

Section 3–3

IR Area I/O Bits Available in Expansion I/O Units

Model

The following table shows which bits can be used as I/O bits in each of the Expansion I/O 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 Expansion I/O Unit is coupled to. In all cases the first Expansion 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 Expansion I/O Unit is attached. For example, if the last word address was IR 03, the first input or output word address for the Expansion I/O Units will be IR 04. In the tables below “n” is the word allocated prior to the Expansion I/O Unit.

Input bits

Output bits

IR (n+1)

C20P

08

00

08

00

08

01

09

01

09

01

09

01

09

02

10

02

10

02

10

02

10

03

11

03

11

03

11

03

11

04

12

04

12

04

12

05

13

05

13

05

13

06

14

06

14

06

14

07

07

15

07

15

07

15

IR (n+1)

IR (n + 6)

Cannot be used

C16P Input

IR (n + 1)

IR (n + 6)

00

08

00

08

00

08

01

09

01

09

01

09

02

10

02

10

02

10

03

11

03

11

04

12

04

12

05

13

05

06

14

06

07

15

07

IR (n+1)

IR (n + 2)

IR (n + 6)

C16P Output

03

11

04

12

13

05

13

14

06

14

15

07

15

IR (n + 4)

Cannot be used

IR (n + 1)

IR (n + 6)

00

08

00

00

08

00

08

00

00

08

01

09

01

01

09

01

09

01

01

09

02

10

02

02

10

02

10

02

02

10

03

11

03

03

11

03

11

03

03

11

04

12

04

04

12

04

12

04

12

05

13

05

05

13

05

13

05

13

06

14

06

06

14

06

14

06

14

07

15

07

07

15

07

15

07

15

IR (n + 2)

IR (n + 6)

IR (n+1)

18

IR (n + 6)

00

06

C60P

IR (n + 1)

IR (n + 6)

Output bits

08

05

C40P

Input bits

00

04

C28P

Model

Cannot be used

C4K Input

Cannot be used

IR (n + 4)

IR (n + 1)

IR (n + 6)

00

08

00

08

00

08

00

08

00

08

01

09

01

09

01

09

01

09

01

09

02

10

02

10

02

10

02

10

02

10

03

11

03

11

03

11

03

11

03

11

04

12

04

12

04

12

04

12

04

12

05

13

05

13

05

13

05

13

05

13

06

14

06

14

06

14

06

14

06

14

07

15

07

15

07

15

07

15

07

15

C4K Output

Cannot be used