HscInfo_ReadTargetValue

Reads target value from high-speed counter channel

This instruction reads the target value from the high-speed counter channel specified by iChannel.

Parameters

Input

iChannel (INT)

High-speed counter channel:

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

Output

VAR_OUT (DINT)

Stores the target value of the channel specified by iChannel

Example

POU header

All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.

	VAR
		iChannel: INT:=0;
		diTargetValue: DINT:=0;
END_VAR

LD body

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_ReadTargetValue!,,10,1,23,4,,?DiChannel?C);
B(B_VARIN,,iChannel,8,2,10,4,);
B(B_VAROUT,,diTargetValue,23,2,25,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 body

diTargetValue := HscInfo_ReadTargetValue(iChannel := iChannel);

Modified on: 2019-01-25Feedback on this pagePanasonic hotline