FB_exit
Syntax
Method FB_exit : BOOL
Variables, which are given at the input of FB_init
, could be online changed after this method has been called. Normally this method can be used to dynamically make connections to multiple Q-SYS cores.
Example:
Switch the target server from “192.168.0.110” to “192.168.0.100”:
PROGRAM MAIN
VAR
fbConnect : FB_Connect(‘’, ‘192.168.1.110’, T#15S, fbResExtract);
fbResExtract : FB_QRC_ResExtract;
nStep : INT;
bChangeTarget : BOOL;
END_VAR
CASE nStep OF
0:
fbConnect.Connect();
IF NOT fbConnect.bBusy AND NOT fbConnect.bError THEN
nStep := nStep + 1;
END_IF
1:
IF bChangeTarget THEN
bChangeTarget := FALSE;
nStep := nStep + 1;
ELSE
nStep := 3;
END_IF
2:
fbConnect.FB_exit(FALSE);
fbConnect.FB_init(FALSE, FALSE, '', '192.168.0.100', T#15S, fbResExtract);
nStep := 0;
3:
(*Rest of Codes*)
END_CASE