8.1.5 FB 65 - TCON - Establishing a connectionBoth communications partners call FB 65 TCON to establish the communications connec-tion. In the parameters you specify which partner is the active communications transmis-sion point and which is the passive one. For information on the number of possible con-nections, please refer to the technical data for your CPU. After the connection isestablished, it is automatically monitored and maintained by the CPU. If the connection isinterrupted, such as due a line break or due to the remote communications partner, theactive partner attempts to reestablish the connection. In this case, you do not have to callFB 65 TCON again. An existing connection is terminated when FB 66 TDISCON is calledor when the CPU has gone into STOP mode. To reestablish the connection, you will haveto call FB 65 TCON again.Both communications partner call FB 65 TCON in order to configure their local communi-cations access point. A connection is configured between the user program and the com-munications level of the operating system. No connection is established to the remotepartner. The local access point is used to send and receive UDP message frames.FB 65 TCON is an asynchronously functioning FB, which means that its processingextends over several FB calls. To start establishing a connection, call FB 65 with REQ =1. The job status is indicated at the output parameters RET_VAL and BUSY. STATUScorresponds to the RET_VAL output parameter of asynchronously functioning SFCs (seealso Meaning of the Parameters REQ, RET_VAL and BUSY with asynchronous SFCs).The following table shows the relationships between BUSY, DONE and ERROR. Usingthis table, you can determine the current status of FB 65 or when the establishment of theconnection is complete.BUSY DONE ERROR DescriptionTRUE 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 foundin the STATUS parameter.FALSE FALSE FALSE The FB was not assigned a (new) job.ParametersParameter Declaration Data type Memory area DescriptionREQ INPUT BOOL I, Q, M, D, L Control parameter REQ, initiates establishing theconnection at rising edge.ID INPUT WORD M, D,constantReference to the connection to be established to theremote partner or between the user program and thecommunications level of the operating system. IDmust be identical to the associated parameter ID inthe local connection description. Range of values:0001h ... 0FFFhDONE OUTPUT BOOL I, Q, M, D, L DONE status parameter:n 0: Job not yet started or still running.n 1: Job executed without error.BUSY OUTPUT BOOL I, Q, M, D, L n BUSY = 1: Job is not yet completed.n BUSY = 0: Job is completed.Use with TCP native andISO on TCPUse with UDPDescriptionVIPA SPEED7Network CommunicationOpen Communication > FB 65 - TCON - Establishing a connectionHB00 | OPL_SP7 | Operation list | en | 18-30122