GCTR_Setup Previous topicNext topicFirst topicLast topic

GCTR_Setup

@ Description

Controls the operation of the selected counter/timer.

@ Cards Support

9116

@ Syntax

I16 GCTR_Setup (U16 CardNumber, U16 GCtr, U16 GCtrCtrl, U32 Count)

@ Parameter

CardNumber : The card id of the card that want to perform this operation.

GCtr : The counter number.
        Range: 0 for cPCI-9116.
GCtrCtrl   : The setting for general-purpose control. This argument is an integer expression formed from one or more of the manifest constants
               defined in DASK.H. There are six groups of constants:
               (1) Timer/Counter Mode
                    General_Counter: General counter
                    Pulse_Generation: Generation of pulse
               (2) Timer/Counter Source
                    GPTC_CLKSRC_INT: internal time base
                    GPTC_CLKSRC_EXT: external time base from GP_TC_CLK pin
               (3) Timer/Counter Gate Source
                    GPTC_GATESRC_INT: gate is controlled by software
                    GPTC_GATESRC_EXT: gate is controlled by GP_TC_CLK pin
               (4) Timer/Counter UpDown Source
                    GPTC_UPDOWN_SELECT_SOFT: Up/Down controlled by software
                    GPTC_UPDOWN_SELECT_EXT: Up/Down controlled by GP_TC_UPDN pin
               (5) Timer/Counter UpDown Control
                    GPTC_DOWN_CTR: counting direction is down
                    GPTC_UP_CTR: counting direction is up (6) Timer/Counter Enable
                    GPTC_ENABLE: general-purpose counter/timer enabled
                    GPTC_DISABLE: general-purpose counter/timer disable
               When two or more constants are used to form the GCtrCtrl argument, the constants are combined with the bitwise-OR
               operator(|).

Count : The counter value of general purpose timer/counter.
        Range: 0 through 65535.

@ Return Code

NoError, ErrorInvalidCardNumber, ErrorCardNotRegistered, ErrorFuncNotSupport, InvalidCounter