VAR_GLOBAL
nSocketPort : INT;
sNetID : T_AmsNetId;
END_VAR
VAR_GLOBAL CONSTANT
cSocketAddr : INT := 1;
cLocalNetID : T_AmsNetId := '';
END_VAR
FUNCTION F_CompareVelocity : UINT
{attribute 'qualified_only'}
{attribute 'strict'}
TYPE E_StandardColor :
(
Blue := 0,
Green := 1
);
END_TYPE
FUNCTION_BLOCK FB_WirelessCom
VAR CONSTANT
cFrequency : REAL := 868.0;
END_VAR
VAR
eColor : E_StandardColor;
aColors : ARRAY[1..cMaxColors] OF E_StandardColor;
END_VAR
-----------------------------------------------------------------
IF (sNetId = cLocalNetID) THEN
eColor := E_StandardColor.Green;
aColors[1] := eColor;
END_IF
FUNCTION_BLOCK FB_ModuleControl
VAR_IN_OUT
aTerminalData : ARRAY[1..cOversamples] OF INT;
END_VAR
VAR
fbCalc : FB_Calculate;
END_VAR
-----------------------------------------------------------------
fbCalc.Reset();
fbCalc( pDataIn := ADR(aTerminalData),
nDataInSize := SIZEOF(aTerminalData) );