2 socket% function, 3 bind% function – Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual

Page 112

Advertising
background image

8Ć2

of the ENI will turn off for approximately 10 seconds while the

initialization is performed.
Values Returned:
ă1

Success

-1

ENI failed self test

-8

Bus error

-10 Error allocating interrupts

-11 Bad slot number

-12 Bad Internet address

-13 Total number of sockets >64
For example:

STATUS% = ENI_INIT%( 4, 128.0.0.10", 32, 10, 3 )

8.2

SOCKET% Function

Format:

SOCKET%( slot%, type% )

where:

slot%

is the logical slot the ENI is to be in. This can be

a variable or a constant. The only legal values

are 2 or 4.

type%

is used to select the protocol for this socket.
Legal values for type are:
1 for a TCP socket

2 for a UDP socket

3 for a Raw Ethernet socket

This function will find an available socket of the requested type. If

successful, the value returned is the number of the socket allocated.

All subsequent function calls to communicate with the ENI use this

socket number to select the socket to talk through.
Values Returned:
>0

The socket number allocated

-2

ENI not initialized

-3

Did not create socket

-9

No buffer space

-11 Bad slot number

-14 Bad socket type
For example:

SOCKET_NUM% = SOCKET%( 4, 1 )

8.3

BIND% Function

Format:

BIND%( sn%, port% )

where:

sn%

is the number of the socket you want to bind. This

is the value that was returned from the SOCKET%

Advertising
This manual is related to the following products: