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 148
9.2.40 IOSEND
Syntax [function]
IOSEND S1, S2, S3
Purpose:
Sends a request by using the IO server's protocol.
Parameters are:
• STRING IOServerName: IO Server name as it appears in the Tag configuration page
• STRING Address: Slave address as described in the eWON User manual for each IO server section
• STRING IoCommand: Array of bytes with a protocol command, the content depends on the IO server.
Returns a request number that must be used in IORCV for reading the response to the request.
Note:
The request result is read by using the IORCV function and uses a polling mechanism.
That means that you need to use IORCV in order to check with the request received with IOSEND that the slot is free.
There are three transmission slots available, using IORCV allows you to free them before the three slots are busy.
Requests are interlaced with gateway requests sent to the IO server and with normal IO server polling operations.
Example:
See also:
“IORCV” on page 147
9.2.41 LEN
Syntax [function]
LEN S1
Purpose:
The function returns the number of characters in a string.
Example:
a% = IOSEND IOServerName,Address,IoCommand
a$= "Hop "
A% = LEN A$
REM a% equal 3