AI_9812_Config Previous topicNext topicFirst topicLast topic

AI_9812_Config

@ Description

Informs PCIS-DASK library of the trigger source, trigger mode, and trigger properties selected for the PCI-9812/cPCI-9812 card with card ID CardNumber. You must call this function before calling function to perform analog input operation.

@ Cards Support

9812/10

@ Syntax

I16 AI_9812_Config (U16 CardNumber, U16 TrgMode, U16 TrgSrc, U16 TrgPol, U16 ClkSel, U16 TrgLevel, U16 PostCnt)

@ Parameter

CardNumber : The card id of the card that want to perform this operation.
TrgMode : The setting for A/D trigger mode. The valid trigger modes are as follows:
                P9812_TRGMOD_SOFT : Software Trigger (no trigger)
                P9812_TRGMOD_POST : Post Trigger
                P9812_TRGMOD_PRE : Pre-Triger Mode
                P9812_TRGMOD_DELAY: Delay Trigger
                P9812_TRGMOD_MIDL : Middle Triger
TrgSrc : The setting for A/D Trigger Source. The valid trigger sources are as follows:
                P9812_TRGSRC_CH0 : Channel 0
                P9812_TRGSRC_CH1 : Channel 1
                P9812_TRGSRC_CH2 : Channel 2
                P9812_TRGSRC_CH3 : Channel 3
                P9812_TRGSRC_EXT_DIG : External Digital Trigger
TrgPol : The setting of Trigger polarity. The valid values are:
                P9812_TRGSLP_POS : Positive slope Trigger
                P9812_TRGSLP_NEG : Negative slope Trigger
ClkSel : The setting of A/D clock source. This argument is an integer expression formed from one or more of the manifest
             constants defined in DASK.H. There are two groups of constants:
             (1) A/D Clock Frequency
                 P9812_AD2_GT_PCI :  Freq. of A/D clock is higher than PCI clock freq.
                 P9812_AD2_LT_PCI :  Freq. of A/D clock is lower than PCI clock freq.
             (2) The ADC clock source
                 P9812_CLKSRC_INT : Internal clock
                 P9812_CLKSRC_EXT_SIN :  External sin wave clock
                 P9812_CLKSRC_EXT_DIG :  External square wave clock
             When two constants are used to form the ClkSel argument, the constants are combined with the bitwise-OR operator(|).
TrgLevel : The setting of Trigger level. The relationship between the value of TrgLevel and trigger voltage is listed in the following
                table:
 

PostCnt: The post count value setting for Middle Trigger mode or Delay Trigger mode. This argument is expressed as:
              For Middle Trigger mode: the number of data accessed for each selected channel after a specific trigger event
              For Delay Trigger mode: the counter value for deferring to access data after a specific trigger event

@ Return Code

NoError, ErrorInvalidCardNumber, ErrorCardNotRegistered, ErrorFuncNotSupport