8.1.8 FB 67 - TUSEND - Sending data - UDP
FB 67 TUSEND sends data via UDP to the remote partner specified by the parameter
ADDR.
When sending separate data in sequence to different partners, you only
need to adjust the parameter ADDR when calling FB 67 TUSEND. It is
not necessary to call FB 65 TCON and FB 66 TDISCON again.
n FB 67 TUSEND is an asynchronously functioning FB, which means that its pro-
cessing extends over several FB calls. To start sending data, call FB 67 with REQ =
1.
n The job status is indicated at the output parameters BUSY and STATUS. STATUS
corresponds to the RET_VAL output parameter of asynchronously functioning SFCs
(see also Meaning of the Parameters REQ, RET_VAL and BUSY with asynchronous
SFCs).
n The following table shows the relationships between BUSY, DONE and ERROR.
Using this table, you can determine the current status of FB 67 or when the sending
process (transmission) is complete.
BUSY DONE ERROR Description
TRUE irrelevant irrelevant The job is being processed.
FALSE TRUE FALSE The job was completed successfully.
FALSE FALSE TRUE The job was ended with an error.
The cause of the error can be found in the STATUS parameter.
FALSE FALSE FALSE The FB was not assigned a (new) job.
Due to the asynchronous function of FB 67 TUSEND, you must keep the
data in the sender area consistent until the DONE parameter or the
ERROR parameter assumes the value TRUE.
Parameters
Parameter Declaration Data type Memory area Description
REQ INPUT BOOL I, Q, M, D, L Control parameter REQ, initiates the transmission at
rising edge.
At the first call with REQ = 1, bytes are transmitted from
the area specified by the DATA parameter.
ID INPUT WORD M, D,
constant
Reference to the associated connection between the
user program and the communication level of the oper-
ating system.
ID must be identical to the associated parameter ID in the
local connection description.
Range of values: 0001h ... 0FFFh
Description
Function
VIPA SPEED7
Network Communication
Open Communication > FB 67 - TUSEND - Sending data - UDP
HB00 | OPL_SP7 | Operation list | en | 18-30 131