7 sendl% function – Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual

Page 116

Advertising
background image

8Ć6

8.7

SENDL% Function

Format:

SENDL%( sn%, list! )

where:

sn%

is the number of the socket through which the

message is to be sent. This is the value that was

returned from the SOCKET% or ACCEPT%

function. This can be specified as a simple variable

or as an element of an array.

list!

is a single dimension double integer array whose

size is limited only by memory capacity. The values

in this array define where to get the data to send.

No subscript is given on this parameter.
Beginning at list!(0), the even elements of the array

contain pointers to the data to send and odd

elements of the array contain the number of bytes

to transfer. The number of bytes must be even. The

value for pointers is found with the VARPTR! or

FINDVAR! function. The list is terminated by a

pointer with a value of zero at the even boundary.

This function causes a message to be sent to the destination as

defined by the socket number.
If a TCP socket is specified, it must be connected. If the connection

was established with an ACCEPT%, the destination is the station

that established the connection.
Values Returned:
>0

Number of bytes transferred

-2

ENI not initialized

-9

No buffer space

-15 Bad socket number

-17 Message too long

-18 Zero length

-19 Illegal Pointer

-25 Not a double integer array

-26 Not a single dimension array

-27 Bad array format

-30 Odd number of bytes in list parameter

-102 Socket not connected
For example:

XMIT_LEN% = SENDL%( SN%, NETWORK_LIST! )

Advertising
This manual is related to the following products: