Todas las variables de entrada y de salida utilizadas para la programación de esta función han sido declaradas en la Cabecera de la POU. Se utiliza la misma cabecera de la POU para todos los lenguajes de programación.
VAR
bResetReceiveBuffer: BOOL:=FALSE;
wDummy: WORD:=0;
END_VAR
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 9 ;
NETWORK_BODY
B(B_F,F159_MTRN!,,13,3,21,9,,?DEN?Ds_Start?Dn_Number?Dd_Port?AENO);
B(B_VARIN,,wDummy,11,5,13,7,);
B(B_VARIN,,0,11,6,13,8,);
B(B_VARIN,,1,11,7,13,9,);
B(B_CONTACT,,bResetReceiveBuffer,5,4,7,6,R);
B(B_COMMENT,,Prepares the receive buffer for COM port 1 to receive the next data,2,1,22,3,);
L(1,5,5,5);
L(7,5,13,5);
L(1,0,1,9);
END_NETWORK_BODY
END_NET_WORK
END_BODY
if (DF(bResetReceiveBuffer)) then
(* Clears the receive buffer of the COM1 port of the FP-SIGMA *)
F159_MTRN(s_Start := wDummy, n_Number :=0, d_Port :=1);
end_if;