Using Socket Services with CMND(490)

Section 6-8

Note If there is more than one Communications Unit mounted to the PLC, the FINS network address must be set as a parameter for CMND(490) and a local net- work table must be created in the routing tables from the CX-Programmer.

6-8-4 Response Codes in the Command Response

A response code is returned in the command response as a 2-byte code that indicates the results of command execution. The response code is returned just after the command code in the response. The first byte of the response code provides the overall result of command execution and is called the main response code (MRES). The second byte provides details and is called the sub-response code (SRES).

6-8-5 Response Codes in the Results Storage Areas

The response code stored in the Results Storage Area is a 2-byte code that indicates the processing results of the socket service requested by the com- mand. This response code is stored in the Results Storage Area when pro- cessing has been completed.

6-8-6 Communications Timing Chart

The timing of the status changes of the bits in the socket status area and the

Port Enabled Flag is shown in the following diagram.

Port Enabled Flag

1

0

Opening Flag (bit 0)

1

0

Receiving Flag (bit 1)

1

0

Sending Flag (bit 2)

1

0

Closing Flag (bit 3)

1

0

Open Flag (bit 15)

1

0

Open request received

 

 

 

 

Receive request

Send request

received

received

Close request received

Open complete

Receive

Send complete

Close complete

 

complete

 

 

6-8-7 Socket Service Timing Chart

The timing of the socket service open, send, receive, and close request com- mands are shown in the following diagrams.

OPEN REQUEST

1

Port Enabled Flag

0

 

CMND(490) response code

 

 

1

Open Flag

0

 

 

1

Opening Flag

0

 

Results storage area

 

Running

Running

 

 

Error response code

Normal response code

 

 

 

 

 

 

 

 

 

 

Store normal response code

 

 

 

 

 

 

OPEN REQUEST

 

OPEN REQUEST

Open complete

command received

Error

command received Normal

(normal end)

 

end

end

 

 

 

139

Page 163
Image 163
Omron CJ1W-ETN21 operation manual Response Codes in the Command Response, Response Codes in the Results Storage Areas