AI_9118_Config | ![]() ![]() ![]() ![]() |
AI_9118_Config
@ Description
Informs PCIS-DASK library of the trigger source, trigger mode and trigger properties selected for the PCI-9118 with card ID CardNumber. You must call this function before calling function to perform continuous analog input operation.
@ Cards Support
9118
@ Syntax
I16 AI_9118_Config (U16 CardNumber, U16 ModeCtrl, U16 FunCtrl, U16 BurstCnt, U16 PostCnt)
@ Parameter
CardNumber : The
card id of the card that want to perform this operation.
ModeCtrl : 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 four groups of constants:
(1) A/D Polarity Control
P9118_AI_BiPolar
P9118_AI_UniPolar
(2) A/D Channel Input Mode
P9118_AI_SingEnded
P9118_AI_Differential
(3) External Gate Enable
P9118_AI_ExtG: 8254 counter is controlled by TGIN pin
(4) External Trigger Enable
P9118_AI_ExtTrig: External Hardware Trigger Mode enabled
When two or more constants are used to form the ModeCtrl argument,
the constants are combined with the
bitwise-OR operator(|).
FunCtrl :
The setting for A/D Function. This argument is an integer expression formed
from one or more of the manifest constants
defined in DASK.H. There are four groups of constants:
(1) Digital Trigger Polarity
P9118_AI_DtrgNegative: Digital trigger negative active
P9118_AI_DtrgPositive: Digital trigger positive active
(2) External Trigger Polarity
P9118_AI_EtrgNegative: External trigger negative active
P9118_AI_EtrgPositive: External trigger positive active
(3) Burst Mode Enable
P9118_AI_BurstModeEn: Burst Mode is enabled
(4) Burst Mode with Sample and Hold Mode Enable
P9118_AI_SampleHold: Burst mode with sample and hold is enabled
(5) Trigger Mode Enable
P9118_AI_PostTrgEn: Post trigger mode is enabled
P9118_AI_AboutTrgEn: About trigger mode or Pre-trigger mode is enabled
When two or more constants are used to form the ModeCtrl argument,
the constants are combined with the bitwise-OR
operator(|).
BurstCnt : The burst
number
PostCnt : The number
of data will be accessed after a specific trigger event
@ Return Code
NoError, ErrorInvalidCardNumber, ErrorCardNotRegistered, ErrorFuncNotSupport