User guide
eWON 500-2001-4001-4002 User Guide - Programming the eWON
eWON 500®2001®4001®4002® Version 4_3_0 - User Guide - 10/5/05 - ©ACT'L sa - Page 140
9.2.26.4 TCP/UDP Syntax [function] – Binary mode
GET E1, E2
• E1 is the file number returned by OPEN.
• E2: maximum number of bytes to read from the socket.
Purpose:
Returns a string with the data read from the TCP/UDP socket.
If there are no data to read from the buffer the returned string is empty.
If E1 is specified and the buffer contains more than E1 bytes, the function returns with E1 bytes.
If E1 is specified and the buffer contains less than E1 bytes, then the function returns with the content of the buffer.
If the other party has closed the socket or if the socket is in error at the TCP/IP stack level, the function exits with error
(See ONERROR on page 152)
Then function always returns immediately.
See also:
“CLOSE” on page 133, “EOF” on page 137, “OPEN” on page 154, “PUT” on page 160
9.2.27 GETFTP
Syntax [function]
GETFTP F1, F2
• F1 is the name of the file to retrieve on the FTP server.
• F2 is the name to assign to the file on the eWON
Purpose:
Retrieves a file on an FTP server
Example:
GETFTP "server_file_name.txt", "/usr/ewon_file_name.txt"
9.2.28 GETIO
Syntax [function]
GETIO S1 / E1
• S1 is the name of the tag
• E1 is the ID of the tagPurpose:
Returns the value of the S1 Tag. This value is a FLOAT.
Example 1:
Example 2:
This function is equivalent A = MyTag@
Warning:
The MYTAG Basic variable is distinct than the memory Tag "MYTAG".
A = GETIO "MyTag"
A = GETIO 12 rem if TagID =12