按错误类型获取MEWNET-W单元上出现的错误数
此FP指令读取由s_Slot指定的插槽编号中MEWNET-W单元上出现的错误数。
输入
扩展单元的插槽编号
输出
按错误类型将出现的错误数存储在FP_MEWNET_W_ERROR_OCCURRENCY_DUT中。
所有用于编程此函数的输入和输出变量已在POU头中声明。所有编程语言使用相同的POU头。
VAR
bEnable: BOOL:=FALSE;
iSlot: INT:=0;
dutMewnetWErrorOccurrency: FP_MEWNET_W_ERROR_OCCURRENCY_DUT;
END_VAR
当变量bEnable设置为TRUE时,执行此函数。
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 7 ;
NETWORK_BODY
B(B_CONTACT,,bEnable,4,3,6,5,);
B(B_F,FP_MEWNET_W_GET_ERROR_OCCURRENCY!,,15,2,35,6,,?DEN?Ds_Slot?AENO?Cd_dutMewnetWErrorOccurrency);
B(B_VARIN,,iSlot,13,4,15,6,);
B(B_VAROUT,,dutMewnetWErrorOccurrency,35,4,37,6,);
L(1,0,1,7);
L(1,4,4,4);
L(6,4,15,4);
END_NETWORK_BODY
END_NET_WORK
END_BODY
If (bEnable) Then
FP_MEWNET_W_GET_ERROR_OCCURRENCY(s_Slot := iSlot,
d_dutMewnetWErrorOccurrency => dutMewnetWErrorOccurrency);
End_if;