I_sACN
The function block FB_sACN
and its derived function block FB_sACN_Ex
both implemented the interface I_sACN
. With its help these two function blocks can be switched online only when the bBusy
is FALSE.
METHODS
Send: Send frames.
Receive: Receive frames.
Example:
MAIN
VAR
fbsACN : FB_sACN(ipCommunication:= fbUDP, aCID := aCID);
isACN : I_sACN := fbsACN;
fbsACNex : FB_sACN_Ex(ipCommunication:= fbUDP, aCID:= aCID);
fbUDP : FB_UDP_Connection(sLocalHost:= '192.168.1.100', nLocalPort:= 200, sSrvNetId:= '');
aCID : ARRAY[1..16] OF BYTE;
bSwitch : BOOL;
bExtended : BOOL;
bBusy : BOOL;
END_VAR
IF bSwitch AND NOT bBusy THEN
bExtended := NOT bExtended;
bSwitch := FALSE;
END_IF
IF bExtended THEN
isACN := fbsACNex;
bBusy := fbsACNex.bBusy OR fbUDP.bBusy;
ELSE
isACN := fbsACN;
bBusy := fbsACN.bBusy OR fbUDP.bBusy;
END_IF