示例

POU头

所有用于编程此函数的输入和输出变量已在POU头中声明。所有编程语言使用相同的POU头。

	VAR 
		bResetReceiveBuffer: BOOL:=FALSE;
		wDummy: WORD:=0;
	END_VAR

LD本体

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

ST本体

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;

最后更新日期:2022-04-05此页面上的反馈松下热线