AI_9116_Config | ![]() ![]() ![]() ![]() |
AI_9116_Config
@ Description
Informs PCIS-DASK library of the trigger source, trigger mode and trigger properties selected for the PCI-9116 with card ID CardNumber. You must call this function before calling function to perform continuous analog input operation.
@ Cards Support
9116
@ Syntax
I16 AI_9116_Config (U16 CardNumber, U16 ConfigCtrl, U16 TrigCtrl, U16 PostCnt, U16 MCnt, U16 ReTrgCnt)
@ Parameter
CardNumber : The
card id of the card that want to perform this operation.
ConfigCtrl : The setting
for A/D mode control. This argument is an integer expression formed from
one or more of the
manifest constants defined in DASK.H. There are tree groups of constants:
(1) A/D Polarity Control
P9116_AI_BiPolar
P9116_AI_UniPolar
(2) A/D Channel Input Mode
P9116_AI_SingEnded
P9116_AI_Differential
(3) Common Mode Selection
P9116_AI_LocalGND: Local Ground of cPCI-9116
P9116_AI_UserCMMD: User defined Common Mode
When two or more constants are used to form the ConfigCtrl argument,
the constants are combined with the
bitwise-OR operator(|).
TrigCtrl :
The setting for A/D Trigger control. This argument is an integer expression formed from one or more of the manifest constants
defined in DASK.H. There are seven groups of constants:
(1) Trigger Mode Selection
P9116_TRGMOD_SOFT: Software Trigger (no tigger)
P9116_TRGMODE_POST: Post Trigger
P9116_TRGMOD_DELAY: Delay Trigger
P9116_TRGMOD_PRE: Pre-Trigger Mode
P9116_TRGMOD_MIDL: Middle Trigger
(2) Trigger Polarity
P9116_AI_TrgNegative: Trigger negative edge active
P9118_AI_TrgPositive: Trigger positive edge active
(3) Time Base Selection
P9116_AI_IntTimeBase: Internal time base (24 MHz)
P9116_AI_ExtTimeBase: External time base
(4) Delay Source Selection
P9116_AI_DlyInSamples: delay in samples
P9116_AI_DlyInTimebase: delay in time base
(5) Re-Trigger Mode Enable
P9116_AI_ReTrigEn: Re-trigger in an acquisition is enable
(6) MCounter Enable
P9116_AI_MCounterEn: Mcounter is enabled and then the trigger signal is ignored before M terminal count is reached
(7) AD Conversion Mode Selection
P9116_AI_SoftPolling: Software Polling
P9118_AI_INT: Interrupt mode of contimuous AI
P9118_AI_DMA: DMA mode of continuous AI
When two or more constants are used to form the TrigCtrl argument,
the constants are combined with the bitwise-OR
operator(|).
PostCnt : The number
of data will be accessed after a specific trigger event. This argument is only valid for Middle trigger and Delay trigger mode.
MCnt : The counter value of MCounter. This argument is only valid for Pre-trigger and Middle trigger mode.
ReTrgCnt : The accepted tigger times in an acquisition. This argument is only valid for Delay trigger and Post trigger mode.
@ Return Code
NoError, ErrorInvalidCardNumber, ErrorCardNotRegistered, ErrorFuncNotSupport