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

The text of a manual · part 40 of 68

Programmable Controllers C200HX-CPU-ZE, C200HG-CPU-ZE, C200HE-CPU-ZE Operation Manual: SECTION 5 Instruction Set, pages 364 to 373

Pages 364 to 373 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 364

Section 5-26

Special Instructions

The content of a word containing an indirect DM/EM address is not BCD or the DM/EM area boundary has been exceeded. CY:

ON when the time between the execution of FPD(269) and the execution of a diagnostic output exceeds T.

5-26-13 DATA SEARCH – SRCH(181)

Ladder Symbols

Operand Data Areas N: Number of words

SRCH(181)

@SRCH(181)

N

N

R1

R1

C

C

IR, SR, AR, DM, EM, HR, LR, # R1: First word in range IR, SR, AR, DM, EM, HR, TC, LR C: Comparison data, result word IR, SR, AR, DM, EM, HR, LR

Limitations

N must be BCD between 0001 to 6656. R1 and R1+N–1 must be in the same data area. SRCH(181) is an expansion instruction. A Programming Device can be used to reassign function code 181 to another expansion instruction.

Description

When the execution condition is OFF, SRCH(181) is not executed. When the execution condition is ON, SRCH(181) searches the range of memory from R1 to R1+N–1 for addresses that contain the comparison data in C. If one or more addresses contain the comparison data, the EQ Flag (SR 25506) is turned ON and the lowest address containing the comparison data is identified in C+1. The address is identified differently for the DM area: 1, 2, 3...

1. For an address in the DM area, the word address is written to C+1. For example, if the lowest address containing the comparison data is DM 0114, then #0114 is written in C+1. 2. For an address in another data area, the number of addresses from the beginning of the search is written to C+1. For example, if the lowest address containing the comparison data is IR 114 and the first word in the search range is IR 014, then #0100 is written in C+1. If none of addresses in the range contain the comparison data, the EQ Flag (SR 25506) is turned OFF and C+1 is left unchanged.

Flags

ER:

The content of a word containing an indirect DM/EM address is not BCD or the DM/EM area boundary has been exceeded. N is not BCD between 0001 and 6656.

EQ:

352

ON when the comparison data has been matched in the search range.

Page 365

Section 5-26

Special Instructions Example

In the following example, the 10 word range from DM 0010 to DM 0019 is searched for addresses that contain the same data as DM 0000 (#FFFF). Since DM 0012 contains the same data, the EQ Flag (SR 25506) is turned ON and #0012 is written to DM 0001. 00001 @SRCH(181) #0010 DM 0010

Address

Instruction

00000 00001

LD @SRCH(181)

Operands 00001 #0010 DM 0010 DM 0000

DM 0000

DM 0010 DM 0011 DM 0012 DM 0013 DM 0014 DM 0015 DM 0016 DM 0017 DM 0018 DM 0019

0000 9898 FFFF 9797 AAAA 9595 1414 0000 0000 FFFF

DM 0000 DM 0001

FFFF 0012

5-26-14 EXPANSION DM READ – XDMR(280) Ladder Symbols

Operand Data Areas N: Number of words

XDMR(280)

@XDMR(280)

N

N

S

S

D

D

IR, SR, AR, DM, EM, HR, TC, LR, # S: First expansion DM word IR, SR, AR, DM, EM, HR, TC, LR, # D: First destination word IR, SR, AR, DM, EM, HR, LR

Limitations

N must be BCD between 0001 and 3000. S must be BCD between 7000 and 9999. S and S+N–1 must be in the same data area, as must D and D+N–1. XDMR(280) is an expansion instruction. A Programming Device can be used to reassign function code 280 to another expansion instruction.

Description

When the execution condition is OFF, XDMR(280) is not executed. When the execution condition is ON, XDMR(280) copies the contents of expansion DM words S through S+N–1 to the destination words D through D+N–1.

Precautions

The Expansion DM area must be set in the PC Setup before it can be used in programming. Do not exceed the set range of the Expansion DM area. Execution of XDMR(280) is given priority whenever a power interruption occurs.

Flags

ER:

The specified expansion DM words do not exist. Make sure that the specified words have been allocated to expansion DM. Refer to 7-2-15 UM Area Allocation for details. The content of a word containing an indirect DM/EM address is not BCD or the DM/EM area boundary has been exceeded.

353

Page 366

Section 5-26

Special Instructions N is not BCD between 0001 and 3000. S is not BCD between 7000 and 9999. Example

In the following example, the 100 word range from DM 7000 through DM 7099 is copied to DM 0010 through DM 0109 when IR 00001 is ON. 00001 @XDMR(280) #0100 #7000

Address

Instruction

00000 00001

LD @XDMR(280)

Operands 00001 #0100 #7000 DM 0010

DM 0010

DM 7000 to DM 7099 DM 7000

DM 9999

DM 0010 to DM 0109

DM 0000

DM 6143

5-26-15 INDIRECT EM ADDRESSING – IEMS(––)

Ladder Symbols

Limitations

Operand Data Areas

IEMS(––)

@IEMS(––)

C

C

C: Control word 000, #E000, or #E0B1 to #E0B2

C must be 000 or #E000 through #E0BF. IEMS(––) is an expansion instruction. A Programming Device must be used to assign a function code to IEMS(––) in order to use this instruction.

Description

When executed with an ON execution condition, IEMS(––) changes the destination of indirect DM addressing to DM or the specified EM bank. The current EM bank number can also be changed when indirect addressing is changed to EM. The destination for is switched to the DM area at the start of an interrupt subroutine. It is also returned to the DM area at the beginning of each scan. The following table shows the allowed values for C and their functions:

354

Page 367

Section 5-26

Special Instructions C 000 #E000 #E0B0 #E0B1 : : #E0BF

IEMS(––) Operation Switches the destination of to the DM area. Switches the destination of to the current bank in the EM area. Switches the destination of to the bank 0 in the EM area. Switches the destination of to the bank 1 in the EM area. : : Switches the destination of to the bank F in the EM area.

The content of DM 6031 indicates the current destination and the current EM bank number as shown in the following table. Use DM 6031 in the ladder-diagram program to determine if the contents of indirect DM addressing is the DM or EM area. (Programming Devices cannot be used here because bits 08 to 15 will always indicate the DM area when read from the Programming Device.) Word DM 6031

Bits 00 to 07 Current EM bank number (00 to 02)

Bits 08 to 15 destination (00: DM; 80: EM)

Note Input 000 for the second and third operands when using replacement instructions. Flags

ER:

C is not one of the allowed values.

Example

In the following example, IEMS(––) changes the destination for to EM bank 1 and uses indirect addressing to move #1234 into EM 0001 in EM bank 1. 00000 IEMS #EOB1

MOV #1234

DM0000

0001

EM0000 0001

1234

5-26-16 SELECT EM BANK – EMBC(281) Ladder Symbols

Operand Data Areas

EMBC(281)

@EMBC(281)

N

N

N: Bank number IR, SR, AR, DM, EM, HR, LR, #

Limitations

N must be 0000 through 000F and the bank number specified by N must exist in the CPU Unit.

Description

When executed with an ON execution condition, EMBC(281) changes the current EM bank to the specified bank number. The CPU Unit can access only the current bank, which is indicated in bits 00 through 07 of DM 6031. An error will occur and EMBC(281) won’t be executed if the specified bank number doesn’t exist in the CPU Unit.

355

Page 368

Section 5-27

Network Instructions Flags

ER:

The content of a word containing an indirect DM/EM address is not BCD or the DM/EM area boundary has been exceeded. The specified bank number, N, doesn’t exist in the CPU Unit.

Example

In the following example, EMBC(281) changes the current bank to bank number 2 when IR 00000 is ON.

00000 EMBC #0002

5-27 Network Instructions The network instructions are used for communicating with other PCs, BASIC Units, or host computers linked through the SYSMAC NET Link System, SYSMAC LINK System, Ethernet System, or Controller Link System.

5-27-1 NETWORK SEND – SEND(090) Operand Data Areas

Ladder Symbols

S: Source beginning word SEND(090)

@SEND(090)

S

S

D

D

C

C

IR, SR, AR, DM, EM, HR, TC, LR D: Destination beginning word IR, SR, AR, DM, EM, HR, TC, LR C: First control data word IR, SR, AR, DM, EM, HR, TC, LR

Limitations

C through C+2 must be within the same data area and must be within the values specified below. To be able to use SEND(090), the system must have a SYSMAC NET Link, SYSMAC LINK Unit, PC Card Unit, or Controller Link Unit mounted.

Description

When the execution condition is OFF, SEND(090) is not executed. When the execution condition is ON, SEND(090) transfers data beginning at word S, to addresses specified by D in the designated node on the SYSMAC NET Link, SYSMAC LINK System, Ethernet System, or Controller Link System. The control words, beginning with C, specify the number of words to be sent, the destination node, and other parameters. The contents of the control data depends on whether a transmission is being sent in a SYSMAC NET Link System, a SYSMAC LINK System, an Ethernet System, or a Controller Link System. The status of bit 15 of C+1 determines whether the instruction is for a SYSMAC NET Link System or a SYSMAC LINK/Ethernet/Controller Link System.

356

Page 369

Section 5-27

Network Instructions Control Data Ethernet Systems

Set the destination node number to 0 to send the data to all nodes. Refer to the PC Card Unit Operation Manual for details. Word C C+1

Bits 00 to 07 Bits 08 to 15 Number of words (0 to 1000 in 4-digit hexadecimal, i.e., 0000hex to 03E8hex) Response time limit (0.1 to 25.4 Bits 08 to 11: seconds in 0.1 s increments in No. of retries (0 to 15 in 2-digit hexadecimal without hexadecimal, decimal point, i.e., 01hex to FFhex) i.e., 0hex to Fhex) Default is 00hex (2 seconds)

C+2

Destination node (0 to 127 in 2-digit hexadecimal, i.e., 00hex to 7Ehex)*

Bit 12

ON: Direct destination beginning word designation OFF: Indirect designation

Bit 13

ON: Response not returned. OFF: Response returned.

Bit 14

ON: Operating level 0 OFF: Operating level 1

Bit 15: Set to 1. Bits 08 to 12: Unit address of destination node. Set to 00hex. Bits 13 to 15: Set to 0.

SYSMAC NET Link Systems

The destination port number is always set to 0. Set the destination node number to 0 to send the data to all nodes. Set the network number to 0 to send data to a node on the same Subsystem (i.e., network). Refer to the SYSMAC NET Link System Manual for details. Word C C+1

Bits 00 to 07 Bits 08 to 15 Number of words (0 to 1000 in 4-digit hexadecimal, i.e., 0000hex to 03E8hex) Network number (0 to 127 in 2-digit Bit 12 ON: Direct destination hexadecimal, i.e., 00hex to 7Fhex) beginning word designation OFF: Indirect designation Bit 14

C+2

ON: Operating level 0 OFF: Operating level 1 Bits 08 to 11, 13 and 15: Set to 0. Destination node (0 to 126 in 2-digit Destination port hexadecimal, i.e., 00hex to 7Ehex)* NSB: 00 NSU: 01/02

*The node number of the PC executing the send may be set.

357

Page 370

Network Instructions

Section 5-27

SYSMAC LINK Systems

Set the destination node number to 0 to send the data to all nodes. Refer to the SYSMAC LINK System Manual for details. Word C C+1

Bits 00 to 07 Bits 08 to 15 Number of words (0 to 1000 in 4-digit hexadecimal, i.e., 0000hex to 03E8hex) Response time limit (0.1 to 25.4 Bits 08 to 11: seconds in 2-digit hexadecimal No. of retries (0 to 15 in without decimal point, i.e., 00hex to hexadecimal, FFhex) i.e., 0hex to Fhex) Note: The response time will be 2 seconds if the limit is set to 0hex. There will be no time limit if the time limit is set to FFhex.

C+2

Destination node (0 to 62 in 2-digit hexadecimal, i.e., 00hex to 3Ehex)*

Bit 12

ON: Direct destination beginning word designation OFF: Indirect designation

Bit 13

ON: Response not returned. OFF: Response returned.

Bit 14

ON: Operating level 0 OFF: Operating level 1

Bit 15: Set to 1. Set to 0.

*The node number of the PC executing the send cannot be set.

358

Page 371

Section 5-27

Network Instructions

SEND(090) transmits “n” words beginning with S (the beginning source word for data transmission at the source node) to the “n” words beginning with D (the beginning destination word for data reception at destination node N).

Controller Link Systems

15 @SEND(090)

S D C

S: Source node beginning send word D: Destination node beginning receive word C: Source node first control data word

1514

Source node 0

S L

“n” number of send words n

Destination node N 0 15 D n L

0

C

“n” number of send words 0000 to 03DE (Hex): 0 to 990 words 0: Destination network address not specified (local network) 1: Destination network address specified. 1514131211 C +1 1

87

0

Response monitor time Number of retries 00 (Hex): 2 s (for 2 Mbps) 0 to F (Hex): 0 to 15 retries 4 s (for 1 Mbps) Direct/Indirect 8 s (for 500 Kbps) 0: Direct; 1: Indirect 01 to FE (Hex): 0.1 to 25.4 s (unit: 0.1 s) 0: Response required 1: Response not required FF (Hex): No response monitoring 0: Operating level 1 1: Operating level 0 Always “1” for Controller Link Networks 15

87

0

C+2

Destination unit address 00 (Hex): PC’s CPU Unit 01 (Hex): Computer (user program) 10 to 1F (Hex): Unit nos. 0 to 15 FE (Hex): Unit connected to network 15 C+3

Destination node address (N) 00 to 20 (Hex): 0 to 32 The same data can be broadcast to all nodes on the network by setting the destination node address to FF (Hex). The range of node addresses will vary for networks other than Controller Link Networks.

0 0

0

Destination network address 00 (Hex): Local network 01 to 7F (Hex): 1 to 127 This setting is enabled only when “Destination network address specified” is set in word C. When specifying a destination network address, set all the nodes in the routing tables. For details on routing tables, refer to refer to the section on network interconnections in the Controller Link Unit Operation Manual (W309).

Note

1. When communicating in the same network with CV-series PCs manufactured prior to April 1996, the local network address cannot be set to “00.” Set a number other than “00” as the local network address in the routing tables, and then specify that number. 2. With the message service, there is no guarantee that a message to a destination node will reach its destination. It is always possible that the message may be lost in transit due to noise or some other condition. When using the message service, it is advisable to prevent this situation from occurring by performing resend processing at the node where instructions are issued. With the SEND, RECV, and CMND(194) instructions, resend processing is performed automatically once the number of retries has been set, so be sure to specify a number other than “0” for the number of retries.

359

Page 372

Section 5-27

Network Instructions Indirect Destination Beginning Word Designations

D is used to specify the destination beginning word as follows when indirect specification is designated: 12 to 15 D

08 to 11

Area type

D+1 Word no. (4th digit)

SYSMAC NET Link Systems

04 to 07

00 to 03

Word no. (2nd digit)

Word no. (5th digit) Word no. (1st digit)

0 Word no. (3rd digit)

Indirect designations depend on the series of the destination PC. CV-series PCs Addresses in parentheses are for the CV500. Designation Area

Corresponding CV-series PC words

Area code IR area 00 LR area 06 HR area 07 SR area 08 Timer area (PV) 03

Word number 0 to 999 0 to 63 0 to 99 0 to 27 0 to 1023

DM area

0 to 24575

05

Area

Word number

CIO Area

0 to 999 1000 to 1063 1064 to 1163 1164 to 1191 0 to 1023 (0 to 511)

Timer Area (PV) DM Area

0 to 24575 (0 to 8191)

C-series PCs Designation Area

Area code

Word number

IR area

00

0 to 511

LR area

06

0 to 63

HR area

07

0 to 99

SR area

08

0 to 27

Timer area (PV) 03

0 to 511

DM area

05

0 to 6655

EM area

10 to 17 (Bank 0 to 7)

0 to 6143

28 to 2F (Bank 8 to 15) 18

SYSMAC LINK/Ethernet Systems

(Current bank)

Indirect designations depend on the series of the destination PC. CV-series PCs Designation Area

Area code

CIO Area

00

0 to 2555

CPU Bus Link Area

01

0 to 255

Auxiliary Area

02

0 to 511

Timer Area

03

0 to 1023

Counter Area

04

0 to 1023

DM Area

05

0 to 24575

EM Area

10 to 17: Bank 0 to 7

0 to 32765

18:

360

Word number

Current bank

Page 373

Section 5-27

Network Instructions C-series PCs Designation Area

Controller Link Systems

IR area

Area code 00

Word number 0 to 511

LR area

06

0 to 63

HR area

07

0 to 99

SR area

08

0 to 27

Timer area (PV) 03

0 to 511

DM area

0 to 6655

05

CV-series PCs have a larger area than C200HX/HG/HE PCs, so the beginning words for sending and receiving at destination nodes cannot always be directly specified by means of SEND(192) and RECV(193) operands. Moreover, depending on circumstances, it may be desirable to change the beginning word at destination nodes. In such cases, set the “Direct/Indirect” control data designation to “1” (Indirect), and specify the beginning words for sending as described below. The beginning receive word is determined by the contents of the destination node’s D and D+1 words.

@SEND(090) S: Source node beginning send word D: Destination node beginning receive word C: Source node first control data word

S D C

D

1514131211109 8 7 6 5 4 3 2 1 0 Area code* 0 0 0 0

Word address (5th digit)

D+1

Word address (1st digit) Word address (2nd digit) Word address (3rd digit) Word address (4th digit)

Note Specify the area code according to the following table. Destination node: C200HX/HG/HE PC Area

Destination node: CV-series PC Code

Area

Code

IR (Internal Relay)

00

CIO

00

LR (Link Relay)

06

CPU Bus Link

01

HR (Holding Relay)

07

Auxiliary

02

AR (Auxiliary Relay)

08

Timer

03

TC (Timer/Counter)

03

Counter

04

05

DM (Data Memory)

10 to 17 28 to 2F 18

EM (Expansion DM)

DM (Data Memory) EM (Expansion DM)

Banks 0 to 7 Banks 8 to 15 Current bank

05 Banks 0 to 7 Current bank

10 to 17 18

361