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

The text of a manual · part 11 of 19

C-series SYSMAC LINK System Manual, pages 94 to 103

Pages 94 to 103 of 174

The original document is the PDF (983 KB). 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 C200HW-SLK24

Page 94

Section 6-2

NETWORK READ/WRITE Instructions

6-2-6 Network Instruction Status Flags SEND(90) and RECV(98) are based on command/response processing. That is, the transmission is not complete until the sending node receives and acknowledges a response from the destination node. Operation without a response is also possible for SEND(90), if desired. The SEND(90)/RECV(98) Enable Flag is not turned ON until the first END(01) after the transmission is completed. If multiple SEND(90)/RECV(98) operations are used, the following flags must be used to ensure that any previous operation is completed before attempting another. Because the C200H/C200HS provides separate flags for each operating level, it is possible to control these independently and have operations going on in both levels simultaneously. With the C1000H/C2000H, only one SEND(90)/RECV(98) operation should be performed in the network at a time, regardless of the number of operating levels. C200HX/C200HG/C200HE/ C200HS/C200H Enable Flag Level 0: SR 25201 Level 1: SR 25204 Error Flag Level 0: SR 25200 Level 1: SR 25203

C1000H/C2000H

Functions

Enable Flag All levels SR 25204

OFF during SEND(90)/RECV(98) execution (including command response processing). Do not start a SEND(90)/RECV(98) operation unless this flag is ON.

Error Flag All levels: SR 25203

OFF following normal completion of SEND/RECV (i.e., after reception of response signal) ON after an unsuccessful SEND(90)/RECV(98) attempt. Error status is maintained until the next SEND(90)/RECV(98) operation. Error types: Time-out error (command/response time greater than 1 second) Transmission data errors

Timing

The following diagram shows the status of the Enable Flag, Error Flag, and response code while two network instructions are issued in the C1000H PC. An error occurs during execution of first instruction. 1

Enable Flag

0 1

Error Flag

0 Response code

Previous response code

00

Instruction #1 received

Instruction #1 00 response code

Instruction #1 completed

Instruction #2 received

Instruction #2 response code

Instruction #2 completed

Data Processing for SEND(90)/RECV(98)

Data is transmitted for SEND(90) and RECV(98) for the C1000H/C2000H when SEND(90)/RECV(98) is executed and for the C200H/C200Hj when END(01) is executed. Final processing for transmissions/receptions is performed when END(01) is executed for all PCs.

Programming Example: Multiple SEND(90)/RECV(98)

To ensure successful SEND(90)/RECV(98) operations, the program must use the SEND(90)/RECV(98) Enable Flag and SEND(90)/RECV(98) Error Flags to confirm that execution is possible. The following program shows one way to do this:

80

Page 95

Section 6-2

NETWORK READ/WRITE Instructions 00000

25204

12802 S

KEEP(11) 12800

(Enable Flag) 12801

12800 prevents execution of SEND(90) until RECV(98) (below) is completed. IR 00000 is turned ON to start transmission.

R

12800

@MOV(21) #000A DM 0000 @MOV(21)

Data is placed into control data words to specify the 10 words to be transmitted to node 3 in operating level 0.

#8000 DM 0001 @MOV(21)

DM 000 DM 001 DM 002

00 80 00

0A 00 03

10 words Node 3 (a PC)

#0003 DM 0002 XFER(70) #0010

Transfers the 10 words beginning at IR 000 to the 10 words beginning at DM 0010.

000 DM 0010 @SEND(90) DM 0010 DM 0020 DM 0000 12800

25204 DIFU(13)

12800

25203

12801

SEND(90)/RECV(98) Error Flag 00200

00001

25204

12800 S

KEEP(11) 12802

Turns ON to indicate transmission error. 12802 prevents execution of RECV(98) when SEND(90) above has not completed. IR 00001 is turned ON to start transmission.

12803 R 12802 @MOV(21) #0010 DM 0003 @MOV(21) #8000

Data moved into control data words to specify the 16 words to be transmitted from node 4 in operating level 0.

DM 0004 @MOV(21) #0004 DM 0005

DM 003 DM 004 DM 005

00 80 00

10 00 04

16 words Node 4 (a PC)

@RECV(98) HR 10 LR 10 DM 0003 12802

25204 DIFU(13)

12802

12802

25203

25204

12801

SEND(90)/RECV(98) Error Flag 00201

Turns ON to indicate reception error.

#0016

Transmitted data moved into words beginning at DM 0030 for storage.

12800 XFER(70)

LR 10 DM 0030

81

Page 96

Section 6-2

NETWORK READ/WRITE Instructions Indirect Addressing of Beginning Words for C200H/C200Hj PCs 00000

25204

12802 S

KEEP(11) 12800

(Enable Flag) 12801 R

12800

The transmission program is started when IR 00000 goes ON, provided that the SEND(90)/RECV(98) Enable Flag is ON (indicating RECV(98) isn’t being executed). IR 12800 is ON while SEND(90) is being executed.

@MOV(21) #000A DM 0000

Data is placed into control data words to specify the 10 words to be transmitted to node 3 in operating level 0.

@MOV(21) #8000 DM 0001

DM 000 DM 001 DM 002

00 80 00

0A 00 03

10 words Node 3 (a PC)

@MOV(21) #0003 DM 0002 @MOV(21) #0500

Indirectly addressed beginning destination word. Beginning destination word in destination node = DM 4000.

DM 0020 @MOV(21) #4000

DM 020 DM 021

05 40

00 00

DM 0021 XFER(70) #0010

Transfers the 10 words beginning at IR 000 to the 10 words beginning at DM 0010.

000 DM 0010 @SEND(90) DM 0010 DM 0020 DM 0000 12800

25204 DIFU(13)

12800

25203

12801

SEND(90)/RECV(98) Error Flag 00200

00001

25204

12800 S

KEEP(11) 12802

12803 R

(Continued on the next page)

82

Turns ON to indicate transmission error. 12802 prevents execution of RECV(98) when SEND(90) above has not completed. IR 00001 is turned ON to start transmission.

Page 97

Section 6-2

NETWORK READ/WRITE Instructions (Continued from previous page) 12802 @MOV(21) #0010

Data moved into control data words to specify the 16 words to be transmitted from node 4 in operating level 0.

DM 0003 @MOV(21) #8000 DM 0004

DM 003 DM 004 DM 005

00 80 00

10 00 04

16 words Node 4 (a PC)

@MOV(21) #0004 DM 0005 @MOV(21) #0500

Indirectly addressed beginning destination word. Beginning destination word in destination node = DM 5000.

HR 10

HR 10 HR 11

@MOV(21)

05 50

00 00

#5000 HR 11 @RECV(98) HR 10 LR 10 DM 0003 12802

25204 DIFU(13)

12802

12802

25203

25204

12801

SEND(90)/RECV(98) Error Flag 00201

Turns ON to indicate reception error.

#0016

Transmitted data moved into words beginning at DM 0030 for storage.

12800 XFER(70)

LR 10 DM 0030

83

Page 98

Section 6-2

NETWORK READ/WRITE Instructions

6-2-7 Delay Times The two charts which follow indicate the sequence of processing which will enable users to calculate the maximum delay time to be expected between the time SEND(90) or RECV(98) is executed and the time the data is stored in the remote or local node’s memory area, ready for use by other instructions in the program. SEND(90)

The following diagram indicates the data flow which will yield the maximum delay time from the time SEND(90) is executed by the user program to the time the SYSMAC LINK Unit stores the data in the destination Unit’s memory. Note Be sure to take into account the time required for data links and program execution, which are not included in the following example.

SEND(90) executed

SYSMAC LINK Unit servicing (source node) Transmission processing

Communications cycle Reception processing

SYSMAC LINK Unit servicing (destination node)

Max. transmission delay Data stored

Max. transmission delay = LINK Unit servicing interval (source node) + Transmission processing + Communications cycle time + Reception processing + LINK Unit servicing interval (destination node). SYSMAC LINK Unit servicing is performed once per PC scan. Delay cause Transmission/reception processing Communications Coaxial cycle time1 Optical

Note

Delay (ms) No. of words transferred × 0.013 ms + 5 ms Max. node no. × 0.01 ms + no. of nodes × 0.075 ms + no. of polled units × 0.75 ms + 1.322 ms Max. node no. × 0.01 ms + no. of nodes × 0.133 ms + no. of polled units × 0.75 ms + 1.322 ms

1. When the data link is halted. Refer to 5-10-1 Data Link Communications Cycle Time for details on the communications cycle time when the data link is operating. 2. The I/O response time might increase due to noise or restrictions on the number of frames that can be transmitted while the data link is operating.

84

Page 99

Section 6-2

NETWORK READ/WRITE Instructions Example

In this example, the maximum transmission delay is calculated for an instruction sending 256 words of data in a system with 32 nodes. Network specifics are detailed below: Max. node number: 32 Number of nodes: 32 Number of polled units: 4 Number of words: 256 Communications: coaxial cable Data link: halted Delay cause

Maximum delay (ms)

LINK Unit servicing

PC scan time

Transmission processing

8.328 ms

Communications cycle time

7.042 ms

Reception processing

8.328 ms

The maximum transmission delay is thus: (PC scan time × 2) + 23.698 ms. The following indicates the data flow which will yield the maximum transfer interval from the time the RECV(98) instruction is executed by the user program to the time the SYSMAC LINK Unit stores the data in the local Unit’s memory area.

RECV(98) Instruction Maximum Delay Time

Note Be sure to take into account the time required for data links and program execution, which are not included in the following example. RECV(98) executed

Data stored Max. transmission delay SYSMAC LINK Unit servicing (source node) Transmission processing (command)

Reception processing (response) Communications cycle

Reception processing (command)

Transmission processing (response) SYSMAC LINK Unit servicing (destination node)

Max. transmission delay = LINK Unit servicing interval (source node) + Transmission processing (command) + Communications cycle + Reception processing (command) + LINK Unit servicing interval (destination node) + Transmission processing (response) + Communications cycle + Reception processing (response) + LINK Unit servicing interval (source node). SYSMAC LINK Unit servicing is performed once per PC scan. Delay cause Transmission/reception processing (command) Transmission/reception processing (response) Communications Coaxial cycle time1 Optical

Delay (ms) 5 ms No. of words transferred × 0.013 ms + 5 ms Max. node no. × 0.01 ms + no. of nodes × 0.075 ms + no. of polled units × 0.75 ms + 1.322 ms Max. node no. × 0.01 ms + no. of nodes × 0.133 ms + no. of polled units × 0.75 ms + 1.322 ms

85

Page 100

Section 6-3

CV-mode Command/Response Format Note

1. When the data link is halted. Refer to 5-10-1 Data Link Communications Cycle Time for details on the communications cycle time when the data link is operating. 2. The I/O response time might increase due to noise or restrictions on the number of frames that can be transmitted while the data link is operating.

Example

In this example, the maximum transmission delay is calculated for an instruction receiving 256 words of data in a system with 32 nodes. Network specifics are detailed below: Max. node number: 32 Number of nodes: 32 Number of polled units: 4 Number of words: 256 Communications: coaxial cable Data link: halted Delay cause

Maximum delay (ms)

LINK Unit servicing

PC scan time

Transmission processing (command)

5 ms

Reception processing (command)

5 ms

Communications cycle time (× 2)

7.042 ms (× 2)

Transmission processing (response)

8.328 ms

Reception processing (response)

8.328 ms

The maximum transmission delay is thus: (PC scan time × 3) + 40.74 ms.

6-3

CV-mode Command/Response Format This section describes the format of commands that can be received from computers or CV-series PCs and the responses that are returned. C-series SYSMAC LINK Units (except models C1000H-SLK21 and C200H-SLK21) can receive CV-mode (FINS) commands, but cannot transmit commands in this command/response format because they are not equipped with a COMMAND instruction (CMND(194) in CV-series PCs). Unless another format is specifically indicated, all commands and responses are in hexadecimal. Commands that are sent to the PC CPU Unit differ from those that are sent to the SYSMAC LINK Unit.

Command Format

Response Format

Commands have the following format: 2 bytes

540 bytes max.

Command code

Data

Responses have the following format: 2 bytes 01

538 bytes max.

Response code

Data

01

Command code

86

2 bytes

Page 101

Section 6-3

CV-mode Command/Response Format

6-3-1 List of CV-mode Commands for PCs Command

Name code 01

PC mode RUN

Page

MONITOR

PROGRAM

01

MEMORY AREA READ

Valid

Valid

Valid

90

02

MEMORY AREA WRITE

Valid

Valid

Valid

90

04

MULTIPLE MEMORY AREA READ

Valid

Valid

Valid

91

02

02

PARAMETER AREA WRITE

Not valid

Not valid

Valid

92

03

06

PROGRAM AREA READ

Valid

Valid

Valid

92

07

PROGRAM AREA WRITE

Not valid

Not valid

Valid

93

01*

RUN

Valid

Valid

Valid

94

04

02*

STOP

Valid

Valid

Valid

94

05

01*

CONTROLLER DATA READ

Valid

Valid

Valid

95

06

01*

CONTROLLER STATUS READ

Valid

Valid

Valid

95

07

01

CLOCK READ (C200H/C200Hj only)

Valid

Valid

Valid

97

02

CLOCK WRITE (C200H/C200Hj only)

Not valid

Valid

Valid

97

21

01

ERROR CLEAR

Valid

Valid

Valid

98

22

0F

Valid

Valid

Valid

98

Valid

Valid

Valid

99

Not valid

Valid

Valid

100

01

FILE MEMORY INDEX READ (C1000H/C2000H only) FILE MEMORY BLOCK READ (C1000H/C2000H only) FILE MEMORY BLOCK WRITE (C1000H/C2000H only) FORCED SET/RESET

Not valid

Valid

Valid

101

02

FORCED SET/RESET CANCEL

Not valid

Valid

Valid

102

0A

FORCED STATUS READ (C200H/C200j only)

Valid

Valid

Valid

102

10 11 23

Note *These command codes are also used for CV-mode commands sent to SYSMAC LINK Units.

6-3-2 List of CV-mode Commands for SYSMAC LINK Units Command

Name code 04

Data link mode Operating

Page

Halted

01*

START DATA LINK

Not valid

Valid

103

02*

HALT DATA LINK

Valid

Not valid

103

03

RESET

Valid

Valid

104

05

01*

CONTROLLER DATA READ

Valid

Valid

104

06

01*

CONTROLLER STATUS READ

Valid

Valid

105

02

NETWORK STATUS READ

Valid

Valid

107

03

DATA LINK STATUS READ

Valid

Valid

108

01*

INTERNODE ECHO TEST

Valid

Valid

109

02

BROADCAST TEST RESULTS READ

Valid

Valid

110

03

BROADCAST TEST DATA SEND

Valid

Valid

110

08

Note *These command codes are also used for CV-mode commands addressed to PCs.

87

Page 102

Section 6-4

Memory Area Designations

6-3-3 CV-mode Response Codes A 2-byte response code is returned with all responses. The first byte contains the main code indicating the general category of the response, and the second byte contains the sub-code giving more specific information. The table below shows the main codes. Refer to 8-1 Troubleshooting for details on sub-codes. Main code

6-4

Description

00

Normal completion

01

Source node error

02

Destination node error

03

Controller error

04

Not executable

05

Routing error

10

Command format error

11

Parameter error

20

Read not possible

21

Write not possible

22

Not executable in current PC mode

23

No Unit

24

Start/stop not possible

25

Unit error

26

Command error

30

Access right error

Memory Area Designations The following table gives the addresses that can be used when reading or writing PC data. The Data area address column gives the data area addresses normally used in the PC program. The Address used in communications column are the PC memory addresses used in CV-mode commands and responses. These addresses are combined with the memory area codes to specify PC memory locations. These addresses are not the same as the actual memory addresses of the data. The Bytes/item column specifies the smallest increment of data that can be read or written for that area. The increment will be either words (2 bytes) or bytes (1 byte).

Memory area Bit status

00000 to 25515

Address used in communications 000000 to 00FF0F

Word contents

000 to 255

000000 to 00FF00

80

2

Bit status

LR 0000 to LR 6315

03E800 to 04270F

00

1

Word contents

LR 00 to LR 63

03E800 to 042700

80

2

Bit status

HR 0000 to HR 9915

042800 to 048B0F

00

1

Word contents

HR 00 to HR 99

042800 to 048B00

80

2

Bit status

AR 0000 to AR 2715

048C00 to 04A70F

00

1

Word contents

AR 00 to AR 27

048C00 to 04A700

80

2

Completion Flag status

TC 000 to TC 511

000000 to 01FF00

01

1

PV

TC 000 to TC 511

000000 to 01FF00

81

2

DM Area

Word contents

DM 0000 to DM 9999

000000 to 270F00

82

2

EM Area

Word contents

EM 0000 to EM 6143

000000 to 17FF00

90 to 98

2

IR and SR Link Relay Holding Relay Auxiliary Relay Timer/Counter

Data

Note

88

Data area address

Memory area code 00

Bytes/ item 1

1. The actual size of memory areas depends on the PC model being used. Refer to the PC Operation Manual for details on memory area ranges.

Page 103

Section 6-4

Memory Area Designations

2. The memory area codes for the EM Area are as follows: codes 90 through 97 specify banks 0 through 7 and code 98 specifies the current bank.

6-4-1 Word/Bit Addresses Each word/bit address specifies a specific bit or word. The rightmost two digits of the address specify bit 00 to 15 (or 00 if not required), and leftmost four digits specify the word address.

Specify the bit between 00 and 0F (00 to 15). Set to 00 to specify word or flag data. Specify the address of the word or flag.

To obtain the corresponding address of the desired word or bit, add the data area word address (hexadecimal) to the first address of the range of addresses used for that data area in communications. For example, the address for word AR 13 is computed as follows: First address for AR Area; 048C + 0D (13 in BCD);

048C 0499

The word address for AR 13 would thus be 049900 (the memory area code would specify this as a word) and the address of bit 12 in AR 13 would be 04990C.

6-4-2 Memory Area Code The memory area code specifies the data area being accessed and whether a bit or word is being accessed, as shown below. Bit:

07

06

05

04

03

Access size 00: Bit 10: Word

02

01

00

Memory area designator 00: IR, SR, LR, HR, or AR 01: Timer/counter 02: Data Memory (DM)

If the access size indicates a bit is being accessed, one byte of data will be read or written. If the access size indicates a word is being accessed, two bytes of data (one word) will be read or written.

6-4-3 Data Configuration The configuration of the types of data that can be read or written is shown below. The number of bytes required for each type of data is also given. Flag or Bit Status (One Byte) 00: Bit is OFF (0) 01: Bit is ON (1) Word Contents, PV (Two Bytes)

Bits 0 to 7 (second byte) Bits 8 to 15 (first byte)

89