HscInfo_GetCurrentSpeed

返回高速计数器通道的当前速度

此指令返回iChannel指定的高速计数器通道的当前速度(Hz)。

参数

输入

iChannel (INT)

高速计数器通道:

FPS: 0, 2

FP-X R: 0, 1

FP-X 16K C14T: 0, 1, 2

FP-X 32K C30T, C60T: 0, 1, 2, 3

FP0R: 0, 1, 2, 3

FP0: 0, 1

FP-e: 0, 1

输入/输出

dutMemory (DUT)

HscInfo_GetCurrentSpeed_DUT

输出

VAR_OUT (DINT)

存储iChannel所指定通道的当前速度

示例

POU头

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

	VAR
		iChannel: INT:=0;
		Memory_DUT: HscInfo_GetCurrentSpeed_DUT;
		diCurrentSpeed: DINT:=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 := 5 ;
        NETWORK_BODY
B(B_F,HscInfo_GetCurrentSpeed!,,12,1,25,5,,?DiChannel?DdutMemory?AdutMemory?AdiCurrentSpeed);
B(B_VARIN,,iChannel,10,2,12,4,);
B(B_VARIN,,Memory_DUT,10,3,12,5,);
B(B_VAROUT,,diCurrentSpeed,25,2,27,4,);
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

ST本体

HscInfo_GetCurrentSpeed(iChannel := iChannel,
dutMemory := Memory_DUT,
diCurrentSpeed => diCurrentSpeed);

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