Omron CS CJ1W-ETN21 User Manual

Page 140

Advertising
background image

116

Using Socket Services by Manipulating Dedicated Control Bits

Section 6-7

Parameter Settings

The following table shows the parameters that are required for each service
and the use of the parameters by the socket service.

UDP Socket Services

Note W:

Written by user

RW: Written by user at execution and then read for results at completion
R:

Read by user for results at completion

---:

Not used.

TCP Socket Services

Note W:

Written by user

RW: Written by user at execution and then read for results at completion

Parameter

No. of

words

Range

(decimal values in

parentheses)

Socket service

UDP

open

UDP

receive

UDP

send

UDP

close

Socket option

1

Specified bit

---

---

---

---

UDP/TCP socket No.

0001 to 0008 hexadecimal
(1 to 8)

W

W

W

W

Local UDP/TCP port No.

1

0000 to FFFF hexadecimal
(0 to 65,535)

W

---

---

---

Remote IP address

2

00000000 to FFFFFFFF
hexadecimal
(0.0.0.0 to 255.255.255.255)

---

R

W

---

Remote UDP/TCP port No.

1

0000 to FFFF hexadecimal
(0 to 65,535)

---

R

W

---

Number of bytes to send/receive

1

0000 to 07C0 hexadecimal
(0 to 1,984 bytes)

---

RW

RW

---

Send/Receive data address

2

Memory area address

---

W

W

---

Time out time

(Unit: 100 ms)

1

0000 to FFFF hexadecimal
(0 to 65,535)
(0: No limit, 0.1 to 6,553.5 s)

---

W

---

---

Response code

1

---

R

R

R

R

Parameter

No. of

words

Range

(decimal values in

parentheses)

Socket service

TCP

passive

open

TCP

active

open

TCP

receive

TCP

send

TCP

close

Socket option

1

Specified bit

W

W

---

---

---

UDP/TCP socket No.

0001 to 0008 hexadecimal
(1 to 8)

W

W

W

W

W

Local UDP/TCP port No. 1

0000 to FFFF hexadecimal
(0 to 65,535)

W

RW

---

---

---

Remote IP address

2

00000000 to FFFFFFFF
hexadecimal
(0.0.0.0 to 255.255.255.255

RW

W

---

---

---

Remote UDP/TCP port
No.

1

0000 to FFFF hexadecimal
(0 to 65,535)

RW

W

---

---

---

Number of bytes to send/
receive

1

0000 to 07C0 hexadecimal
(0 to 1,984 bytes)

---

---

RW

RW

---

Send/Receive data
address

2

Memory area address

---

---

W

W

---

Time out time

(Unit: 100 ms)

1

0000 to FFFF hexadecimal
(0 to 65,535)
(0: No limit, 0.1 to 6,553.5 s)

W

---

W

---

---

Response code

1

---

R

R

R

R

R

Advertising