启用脉冲输出通道的计数
此指令可以在通过PulseControl_CountingDisable禁用计数后,启用对iChannel指定的脉冲输出通道的计数。脉冲输出控制代码的第1位设置为FALSE。
输入
脉冲输出通道:
FPS: 0, 2
FP-X/XH R: 0, 1
FP-X/XH 16K C14T: 0, 1, 2
FP-X/XH 32K C30T: 0, 1, 2, 3
FP-X/XH 32K C60T: 0, 1, 2, 3, 4, 5
FP0R: 0, 1, 2, 3
FP0: 0, 1
FP-e: 0, 1
所有用于编程此函数的输入和输出变量已在POU头中声明。 所有编程语言使用相同的POU头。
VAR
bEnableCounting: BOOL:=FALSE;
iChannel: INT:=0;
END_VAR
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 1 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 5 ;
NETWORK_BODY
B(B_VARIN,,iChannel,10,3,12,5,);
B(B_CONTACT,,bEnableCounting,5,2,7,4,R);
B(B_F,PulseControl_CountingEnable!,,12,1,26,5,,?DEN?DiChannel?AENO);
L(1,3,5,3);
L(7,3,12,3);
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 5 ;
NETWORK_BODY
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 5 ;
NETWORK_BODY
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
END_BODY
if DF(bEnableCounting) then
PulseControl_CountingEnable(iChannel := iChannel);
end_if;