Omron CS CJ1W-ETN21 User Manual

Page 178

Advertising
background image

154

Using Socket Services with CMND(490)

Section 6-8

Note When using the above programming example, change the bit and word

addresses as necessary to avoid using the same areas used by other parts of
the user program or the CPU Bus Unit.

When the UDP Receiving Flag (CIO 000203) turns ON, the
status of the Port Enabled Flag (A20200) is checked to be
sure it is ON and a UDP RECEIVE REQUEST command is
sent using CMND(490).
D04000: First command word
D04010: First response word
D00030: First control data word

The UDP Receiving Flag (CIO 000203) is also turned OFF.

UDP Receive
When the UDP Receive Bit (CIO 000003) turns ON, the
UDP Receive Error Flag (CIO 000103) is turned OFF
and the UDP Receiving Flag (CIO 000203) is turned ON
to initialize processing.

When the UDP Sending Flag (CIO 000202) turns ON, the
status of the Port Enabled Flag (A20200) is checked to be
sure it is ON and a UDP SEND REQUEST command is
sent using CMND(490).
D02000: First command word
D03000: First response word
D00020: First control data word

The UDP Sending Flag (CIO 000202) is also turned OFF.

UDP Send
When the UDP Send Bit (CIO 000002) turns ON, the UDP
Send Error Flag (CIO 000102) is turned OFF and the
UDP Sending Flag (CIO 000202) is turned ON to initialize
processing.

If the Port Enabled Flag (A20200) turns ON and the
Sending Flag (CIO 150102) turns OFF while the UDP
Sending Flag (CIO 000202) is OFF, checks are made and
if any of the following are true, the UDP Send Error Flag
(CIO 000102) is turned ON.

The Results Storage Error Flag (CIO 150114) is ON.

The contents of the Response Storage Area set in the
command code (D03010) is not 0000 Hex (normal end).

The Network Communications Error Flag (A21900) is ON.

After the execution results have been checked, the UDP
Send Bit (CIO 000002) is turned OFF.

If the Port Enabled Flag (A20200) turns ON and the Re-
ceiving Flag (CIO 150101) turns OFF while the UDP Re-
ceiving Flag (CIO 000203) is OFF, checks are made and if
any of the following are true, the UDP Receive Error Flag
(CIO 000103) is turned ON.

The Results Storage Error Flag (CIO 150114) is ON.

The contents of the Response Storage Area set in the com-
mand code (D04020) is not 0000 Hex (normal end).

The Network Communications Error Flag (A21900) is ON.

After the execution results have been checked, the UDP
Receive Bit (CIO 000003) is turned OFF.

Continued from previous page.

000202

CMND(490)

@RSET

000002

@SET

000002

000202

A20200

RSET

SET

000002

A20200 150102

150114

<>(305)

A21900

000202

RSET

000002

A20200

150102

000203

CMND(490)

@RSET

000003

@SET

000003

000203

A20200

RSET

SET

000003

A20200

150101

150114

<>(305)

A21900

000203

RSET

000003

A20200

150101

END(001)

000102

000202

D02000

D03000

D00020

000202

000102

D03010

#0000

000002

000103

000203

D04000

D04010

D00030

000203

000103

D04020

#0000

000003

Advertising