The text of a manual · part 49 of 60
C200HX/C200HG/C200HE Programmable Controllers Operation Manual, pages 474 to 483
Pages 474 to 483 of 586
The original document is the PDF (3.4 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 C200HE-CPU42-E
Page 474
Page 475
SECTION 10 Host Link Commands This section describes the host link commands which can be used for host link communications via the C200HX/HG/HE ports. Refer to 8-2 Host Link Communications for information on the procedures for using host link commands and errors associated with host link commands. 10-1 Host Link Command Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2 Host Link End Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2-1 End Code Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2-2 Command/End Code Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3 Host Link Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-1 IR/SR AREA READ –– RR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-2 LR AREA READ –– RL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-3 HR AREA READ –– RH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-4 PV READ –– RC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-5 TC STATUS READ –– RG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-6 DM AREA READ –– RD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-7 AR AREA READ –– RJ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-8 EM AREA READ –– RE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-9 IR/SR AREA WRITE –– WR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-10 LR AREA WRITE –– WL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-11 HR AREA WRITE –– WH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-12 PV WRITE –– WC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-13 TC STATUS WRITE –– WG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-14 DM AREA WRITE –– WD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-15 AR AREA WRITE –– WJ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-16 EM AREA WRITE –– WE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-17 SV READ 1 –– R# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-18 SV READ 2 –– R$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-19 SV READ 3 –– R% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-20 SV CHANGE 1 –– W# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-21 SV CHANGE 2 –– W$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-22 SV CHANGE 3 –– W% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-23 STATUS READ –– MS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-24 STATUS WRITE –– SC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-25 ERROR READ –– MF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-26 FORCED SET –– KS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-27 FORCED RESET –– KR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-28 MULTIPLE FORCED SET/RESET –– FK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-29 FORCED SET/RESET CANCEL –– KC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-30 PC MODEL READ –– MM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-31 TEST–– TS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-32 PROGRAM READ –– RP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-33 PROGRAM WRITE –– WP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-34 I/O TABLE GENERATE –– MI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-35 COMPOUND COMMAND –– QQMR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-36 COMPOUND COMMAND DATA READ –– QQIR . . . . . . . . . . . . . . . . . . . . . . 10-3-37 ABORT –– XZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-38 INITIALIZE –– . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-39 TXD RESPONSE –– EX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3-40 Undefined Command –– IC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
458 459 459 461 462 462 463 464 465 466 467 468 468 469 470 471 472 473 474 475 476 477 478 480 481 482 484 485 487 488 489 490 492 493 494 495 496 497 498 499 500 501 502 502 503
457
Page 476
Section 10-1
Host Link Command Summary
10-1 Host Link Command Summary Command Chart
The commands listed in the chart below can be used for host link communications with the C200HX/HG/HE. PC mode
Header code RUN
Name
MON
Page
PRG
RR
Valid
Valid
Valid
IR/SR AREA READ
462
RL
Valid
Valid
Valid
LR AREA READ
463
RH
Valid
Valid
Valid
HR AREA READ
464
RC
Valid
Valid
Valid
PV READ
465
RG
Valid
Valid
Valid
TC STATUS READ
466
RD
Valid
Valid
Valid
DM AREA READ
467
RJ
Valid
Valid
Valid
AR AREA READ
468
RE
Valid
Valid
Valid
EM AREA READ
468
WR
Not valid
Valid
Valid
IR/SR AREA WRITE
469
WL
Not valid
Valid
Valid
LR AREA WRITE
470
WH
Not valid
Valid
Valid
HR AREA WRITE
471
WC
Not valid
Valid
Valid
PV WRITE
472
WG
Not valid
Valid
Valid
TC STATUS WRITE
473
WD
Not valid
Valid
Valid
DM AREA WRITE
474
WJ
Not valid
Valid
Valid
AR AREA WRITE
475
WE
Not valid
Valid
Valid
EM AREA WRITE
476
R#
Valid
Valid
Valid
SV READ 1
477
R$
Valid
Valid
Valid
SV READ 2
478
R%
Valid
Valid
Valid
SV READ 3
480
W#
Not valid
Valid
Valid
SV CHANGE 1
481
W$
Not valid
Valid
Valid
SV CHANGE 2
482
W%
Not valid
Valid
Valid
SV CHANGE 3
484
MS
Valid
Valid
Valid
STATUS READ
485
SC
Valid
Valid
Valid
STATUS WRITE
487
MF
Valid
Valid
Valid
ERROR READ
488
KS
Not valid
Valid
Valid
FORCED SET
489
KR
Not valid
Valid
Valid
FORCED RESET
490
FK
Not valid
Valid
Valid
MULTIPLE FORCED SET/RESET
492
KC
Not valid
Valid
Valid
FORCED SET/RESET CANCEL
493
MM
Valid
Valid
Valid
PC MODEL READ
494
TS
Valid
Valid
Valid
TEST
495
RP
Valid
Valid
Valid
PROGRAM READ
496
WP
Not valid
Not valid
Valid
PROGRAM WRITE
497
MI
Not valid
Not valid
Valid
I/O TABLE GENERATE
498
Valid
Valid
Valid
COMPOUND COMMAND
499
XZ
Valid
Valid
Valid
ABORT (command only)
501
Valid
Valid
Valid
INITIALIZE (command only)
502
EX
Valid
Valid
Not valid
TXD RESPONSE (response only)
502
IC
---
---
---
Undefined command (response only)
503
458
Page 477
Host Link End Codes
Section 10-2
10-2 Host Link End Codes 10-2-1 End Code Summary These are the response (end) codes that are returned in the response frame. When two or more errors occur, the end code for the first error will be returned. End code
Contents
Probable cause
Corrective measures
00
Normal completion
---
---
01
Not executable in RUN mode
The command that was sent cannot be executed when the PC is in RUN mode.
Check the relation between the command and the PC mode.
02
Not executable in MONITOR mode
The command that was sent cannot be executed when the PC is in MONITOR mode.
03
UM write-protected
The PC’s UM is write-protected.
Turn OFF pin 1 of the CPU Unit’s DIP switch.
04
Address over
The program address setting in an SV Read or SV Change command is above the highest program address but less than 65,536.
Correct the program address setting and transfer the command again.
13
FCS error
The FCS is wrong. Either the FCS calculation is mistaken or there is adverse influence from noise.
Check the FCS calculation method. If there was influence from noise, transfer the command again.
14
Format error
The command format is wrong or a command that can’t be divided has been divided.
Check the format and transfer the command again.
15
Entry number data error
The data is outside of the specified range or too long.
Correct the data and transfer the command again.
16
Command not supported
The operand specified in an SV Check the command and program. Read or SV Change command does not exist in the program.
18
Frame length error
The maximum frame length of 132 bytes was exceeded. (If the frame exceeds 280 bytes, the Reception Overflow Flag will be turned ON and there won’t be a response.)
Check the command and divide it into multiple frames if necessary.
19
Not executable
Items to read not registered for composite command (QQ).
Execute QQ to register items to read before attempting batch read.
20
Couldn’t create I/O table
Unrecognized Remote I/O Unit, too many I/O words, or node number duplication for Remote Optical I/O Units.
Check the Remote I/O System and the number of I/O words.
23
User memory protected
Pin 1 on C200HX/HG/HE DIP switch is ON.
Turn OFF pin 1 of the CPU Unit’s DIP switch.
A3
Aborted due to FCS error in transmit data
An FCS error occurred in the second or later frame.
Check the FCS calculation method. If there was influence from noise, transfer the command again.
A4
Aborted due to format error in transmit data
The command format did not match the number of bytes in the second or later frame.
Check the format and transfer the command again.
A5
Aborted due to entry number data error in transmit data
There was a entry number data error in the second or later frame.
Correct the data and transfer the command again.
A8
Aborted due to frame length error in transmit data
The length of the second or later frame exceeded the 132-byte max.
Keep frames to 132 bytes or fewer.
459
Page 478
Host Link End Codes Errors without Responses
Section 10-2 A response won’t be received with some errors, regardless of the command. These errors are listed in the following table.
Error Parity overrun or framing error during command reception
PC operation The Communications Error Flag will be turned ON, an error code will be registered, and receptions will be reset. (The error will be cleared automatically if communications restart normally.)
A carriage return (CR) isn’t received within 280 bytes.
SR 26407 (RS-232C Port Reception Overflow Flag) will be turned ON. Communications return to normal when a normal command is transmitted.
A command is received that doesn’t have the @ character at the beginning of the first frame. Incorrect node number (Not the local node, hexadecimal, or over 31) A Write command’s intermediate frame or last frame has only one or two bytes of data.
Receptions are reset.
460
The command is discarded and receptions are reset. FCS error
Page 479
Host Link End Codes
Section 10-2
10-2-2 Command/End Code Table The following table shows which end codes can be returned for each command. Header
Possible End Codes
Comments
RR
00
13
14
15
18
A3
A8
---
RL
00
13
14
15
18
A3
A8
---
RH
00
13
14
15
18
A3
A8
---
RC
00
13
14
15
18
A3
A8
---
RG
00
13
14
15
18
A3
A8
---
RD
00
13
14
15
18
A3
A8
---
RJ
00
13
14
15
18
RE
00
13
14
15
18
A3
A8
---
WR
00
01
13
14
15
18
A3
A4
A5
A8
---
WL
00
01
13
14
15
18
A3
A4
A5
A8
---
WH
00
01
13
14
15
18
A3
A4
A5
A8
---
WC
00
01
13
14
15
18
A3
A4
A5
A8
---
WG
00
01
13
14
15
18
A3
A4
A5
A8
---
WD
00
01
13
14
15
18
WJ
00
01
13
14
15
18
WE
00
01
13
14
15
R#
00
13
14
15
16
18
23
---
R$
00
04
13
14
15
16
18
23
---
R%
00
04
13
14
15
16
18
23
---
W#
00
01
13
14
15
16
18
23
---
W$
00
01
04
13
14
15
16
18
23
---
W%
00
01
04
13
14
15
16
18
23
---
MS
00
13
14
SC
00
13
14
15
18
MF
00
13
14
15
18
---
KS
00
01
13
14
15
18
---
KR
00
01
13
14
15
18
---
FK
00
01
13
14
15
18
---
KC
00
01
13
14
18
---
MM
00
13
14
18
---
13
14
18
13
14
18
TS RP
00
WP
00
01
02
MI
00
01
02
00
03
13
14
13
14
13
14
---
23
18
A3
A4
A5
A8
---
A3
A4
A5
A8
---
A3
A4
A5
A8
---
18
15
18
--19
--19
18 15
18
---
23
A3
23
A3
A4
A5
A8
---
A8
---
20 19
--A3
A4
A5
A8
---
XZ
---
No response
---
No response
EX
---
No end code
IC
---
No end code
461
Page 480
Host Link Commands
Section 10-3
10-3 Host Link Commands This section explains the various Host Link commands that can be issued from the host computer to the PC. Refer to 8-2 Host Link Communications for information on the procedures for using host link commands and errors associated with host link commands.
10-3-1 IR/SR AREA READ –– RR Reads the contents of the specified number of IR and SR words, starting from the specified word. Command Format @ x 101 x 100
Node no.
R
R
Header code x 103 x 102 x 101 x 100 x 103 x 102 x 101 x 100
Beginning word (0000 to 0511)
No. of words (0001 to 0512)
FCS
↵
Terminator
Response Format @ x 101 x 100
Node no.
R
R
Header code x 161 x 160 x 163 x 162 x 161 x 160
End code
Read data (1 word)
FCS
↵
Terminator
Read data (for number of words read)
Limitations
The text portion of the response’s first frame can contain up to 30 words. If more than 30 words are read, the data will be returned in multiple frames. In the second and later frames, the text portion of the response can contain up to 31 words. The INITIALIZE and ABORT commands can be sent instead of the delimiter for multiple responses for this command. If other commands are sent, they will be treated the same as delimiters.
PC Settings RUN OK
PC Mode MONITOR OK
PROGRAM OK
UM Area Write-protected Read-protected OK OK
Execution Conditions Commands Single OK
End Codes
Responses Multiple ---
Multiple OK
An end code of 14 (format error) will be returned if the length of the command is incorrect and an end code of 15 (entry number data error) will be returned if the specified words exceed the data area boundaries or aren’t specified in BCD. End code
462
Single OK
Contents
00
Normal completion
13
FCS error
14
Format error
15
Entry number data error
18
Frame length error
A3
Aborted due to FCS error in transmit data
A8
Aborted due to frame length error in transmit data
Page 481
Host Link Commands
Section 10-3
10-3-2 LR AREA READ –– RL Reads the contents of the specified number of LR words, starting from the specified word. Command Format @ x 101 x 100
Node no.
R
L
Header code x 103 x 102 x 101 x 100 x 103 x 102 x 101 x 100
Beginning word (0000 to 0063)
No. of words (0001 to 0064)
FCS
↵
Terminator
Response Format @ x 101 x 100
Node no.
R
L
Header code x 161 x 160 x 163 x 162 x 161 x 160
End code
Read data (1 word)
FCS
↵
Terminator
Read data (for number of words read)
Limitations
The text portion of the response’s first frame can contain up to 30 words. If more than 30 words are read, the data will be returned in multiple frames. In the second and later frames, the text portion of the response can contain up to 31 words. The INITIALIZE and ABORT commands can be sent instead of the delimiter for multiple responses for this command. If other commands are sent, they will be treated the same as delimiters.
PC Settings RUN OK
PC Mode MONITOR OK
PROGRAM OK
UM Area Write-protected Read-protected OK OK
Execution Conditions Commands Single OK
End Codes
Responses Multiple ---
Single OK
Multiple OK
An end code of 14 (format error) will be returned if the length of the command is incorrect and an end code of 15 (entry number data error) will be returned if the specified words exceed the data area boundaries or aren’t specified in BCD. End code
Contents
00
Normal completion
13
FCS error
14
Format error
15
Entry number data error
18
Frame length error
A3
Aborted due to FCS error in transmit data
A8
Aborted due to frame length error in transmit data
463
Page 482
Host Link Commands
Section 10-3
10-3-3 HR AREA READ –– RH Reads the contents of the specified number of HR words, starting from the specified word. Command Format @ x 101 x 100
Node no.
R
H
Header code x 103 x 102 x 101 x 100 x 103 x 102 x 101 x 100
Beginning word (0000 to 0099)
No. of words (0001 to 0100)
FCS
↵
Terminator
Response Format @ x 101 x 100
Node no.
Limitations
R
H
Header code x 161 x 160 x 163 x 162 x 161 x 160
End code
Read data (1 word)
FCS
↵
Terminator
Read data (for number of words read)
The text portion of the response’s first frame can contain up to 30 words. If more than 30 words are read, the data will be returned in multiple frames. In the second and later frames, the text portion of the response can contain up to 31 words. The INITIALIZE and ABORT commands can be sent instead of the delimiter for multiple responses for this command. If other commands are sent, they will be treated the same as delimiters.
PC Settings RUN OK
PC Mode MONITOR OK
PROGRAM OK
UM Area Write-protected Read-protected OK OK
Execution Conditions Commands Single OK
End Codes
Responses Multiple ---
Multiple OK
An end code of 14 (format error) will be returned if the length of the command is incorrect and an end code of 15 (entry number data error) will be returned if the specified words exceed the data area boundaries or aren’t specified in BCD. End code
464
Single OK
Contents
00
Normal completion
13
FCS error
14
Format error
15
Entry number data error
18
Frame length error
A3
Aborted due to FCS error in transmit data
A8
Aborted due to frame length error in transmit data
Page 483
Host Link Commands
Section 10-3
10-3-4 PV READ –– RC Reads the contents of the specified number of timer/counter PVs (present values), starting from the specified timer/counter. Command Format @ x 101 x 100
Node no.
R
C x 103 x 102 x 101 x 100 x 103 x 102 x 101 x 100
Header code
Beginning timer/counter (0000 to 0511)
R x 161 x 160 x 103 x 102 x 101 x 100
No. of timers/counters (0001 to 0512)
FCS
↵
Terminator
Response Format @ x 101 x 100
Node no.
Limitations
C
Header code
End code
Read data (1 word) Read data (for number of words read)
FCS
↵
Terminator
The text portion of the response’s first frame can contain up to 30 words. If more than 30 words are read, the data will be returned in multiple frames. In the second and later frames, the text portion of the response can contain up to 31 words. The INITIALIZE and ABORT commands can be sent instead of the delimiter for multiple responses for this command. If other commands are sent, they will be treated the same as delimiters.
PC Settings RUN OK
PC Mode MONITOR OK
PROGRAM OK
UM Area Write-protected Read-protected OK OK
Execution Conditions Commands Single OK
End Codes
Responses Multiple ---
Single OK
Multiple OK
An end code of 14 (format error) will be returned if the length of the command is incorrect and an end code of 15 (entry number data error) will be returned if the specified words exceed the data area boundaries or aren’t specified in BCD. End code
Contents
00
Normal completion
13
FCS error
14
Format error
15
Entry number data error
18
Frame length error
A3
Aborted due to FCS error in transmit data
A8
Aborted due to frame length error in transmit data
465