HP 9112 manual 52 ∙ C/C++ Library

Page 60

3.After the A/D conversion is started, the A/D converted data is stored in the FIFO of PCI controller. Each bus mastering data transfer continually tests if any data in the FIFO and then blocks transfer, the system will continuously loop until the conditions are satisfied again but will not exit the block transfer cycle if the block count is not complete . If there is momentarily no A/D data, the PCI-9112 will relinquish the bus temporarily but returns immediately when more A/D samples appear. This operation continues until the whole block is done.

4.This operation proceeds transparently until the PCI controller transfer byte count is complete. All normal PCI bus operation applies here such as a receiver which cannot accept the transfers, higher priority devices requesting the PCI bus, etc. Remember that only one PCI initiator can have bus mastership at any one time. However, review the PCI priority and "fairness" rules. Also study the effects of the Latency Timer. And be aware that the PCI priority strategy (round robin rotated, fixed priority, custom, etc.) is unique to your host PC and is explicitly not defined by the PCI standard. You must determine this priority scheme for your own PC (or replace it).

5.The interrupt request from the PCI controller can be optionally set up to indicate that this longword count is complete although this can also be determined by polling the PCI controller.

uSyntax

Visual C++ (Windows-95)

int W_9112_AD_DMA_Start (int card_number, int auto_scan, int ad_ch_no, int ad_range, int count, HANDLE memID, int c1, int c2)

Visual Basic (Windows-95)

W_9112_AD_DMA_Start (ByVal card_number As Long, ByVal auto_scan As Long, ByVal ad_ch_no As Long, ByVal ad_range As Long, ByVal count As Long, ByVal memID As Long, ByVal c1 As Long, ByVal c2 As Long) As Long

C/C++ ( DOS)

int _9112_AD_DMA_Start (int card_number, int auto_scan, int ad_ch_no, int ad_range, int count , unsigned long *ad_buffer, int c1,int c2)

uArgument

card_number: the card number of PCI-9112

auto_scan: TRUE or FALSE

Example1: auto_scan is FALSE, ad_ch_no is 3. Using DMA mode to read A/D data only channel 3.

Example2: auto_scan is TRUE, ad_ch_no is 3. Using DMA mode to read A/D data with multi -channel , channel 3, 2, 1 and 0. Reading sequence is channel 3,2,1,0, 3,2,1,0,3,2,1,0....

52 C/C++ Library

Image 60
Contents Page ALL Rights Reserved TrademarksAdlink Technology Inc Detailed Company InformationQuestions Page Contents Conversion Conversion Digital Input and Output9112DO 9112DA 9112ADSetChannel 9112ADSetRange 9112DblBufferTransfer 9112GetOverrunStatusAppendix A. Demo. Programs Product Warranty/Service What do you need VR Assignment AdjustmentSoftware Utilities PCI Scan UtilityHow to Use This Guide Features T r o d u c t i o nIntroduction ∙ Specifications ApplicationsAnalog Input A/D Analog Output D/AGeneral Specifications Digital I/O DIOProgrammable Counter Software Supporting Programming LibraryPCIS-LVIEW LabVIEW Driver PCIS-VEE HP-VEE Driver DAQBenchTM ActiveX ControlsDASYLabTM PRO PCIS-DDE DDE Server and InTouchTMInstallation ∙ InstallationWhat You Have Device Installation for Windows Systems Installation ∙Unpacking PCB Layout PCI-9112 LayoutConverter PCI -Bus ControllerCPCI-9112 Layout PCB Layout of the PCI-9112Jumper Settings Analog Input Channel Configuration10 ∙ Installation Clock Source Setting D/A Reference Voltage SettingInternal Reference Voltage Setting 12 ∙ InstallationConnectors Pin Assignments CN 3 Analog Input / Output & Counter/TimerPin Assignments of PCI-9112 CN 1 Digital Signal Input DI 0 CN 2 Digital Signal Output do 014 ∙ Installation Pin Assignments of cPCI-9112 Hardware Installation Outline 16 ∙ InstallationDaughter Board Connection Connect with ACLD-8125Connect with ACLD-9137 Connect with ACLD-918218 ∙ Installation Connect with ACLD-9185Connect with ACLD-9138 and ACLD-9188 G i s t e r s F o r m a t I/O Registers MapRegisters Format ∙ A/D Data Registers 20 ∙ Registers FormatD/A Output Register A/D control Register Mode22 ∙ Registers Format Auto-Scan Bit MUX Register Bit8 ~ Bit524 ∙ Registers Format A/D Status Register Software Trigger RegisterDigital I/O register 26 ∙ Registers FormatInternal Timer/Counter Register High Level ProgrammingLow Level Programming Analog Input Signal Connection E r a t i o n T h e o r e mA/D Conversion 28 ∙ Operation TheoremSingle-ended Mode Differential input modeOperation Theorem ∙ 4 Floating source and differential input 30 ∙ Operation Theorem1 A/D Conversion Procedure Timer Pacer Trigger2 A/D Trigger Modes Software trigger3 A/D Data Transfer Modes External TriggerSoftware Data Transfer Drdy Interrupt Transfer IntxD/A Conversion DMA Transfer DmaxDigital Input and Output 34 ∙ Operation TheoremTimer/Counter Operation CounterGeneral Purpose Timer/ Counter Pacer Trigger SourceAddress 36 ∙ Operation TheoremControl Byte Mode Definitions 38 ∙ Operation TheoremLibraries Installation + + L i b r a r y++ Library ∙ Programming Guide Naming ConventionData Types 40 ∙ C/C++ Library9112Initial SyntaxArgument Return Code9112DI 9112DI ChannelDescription 42 ∙ C/C++ Library9112DO 9112DA 44 ∙ C/C++ Library9112ADSetChannel 9112ADSetRange 46 ∙ C/C++ Library10 9112ADSetMode Cardnumber the card number of PCI-911211 9112ADSetAutoscan 48 ∙ C/C++ Library12 9112ADSoftTrig 13 9112ADAquire 50 ∙ C/C++ Library14 9112ADDMAStart 52 ∙ C/C++ Library 15 9112ADDMAStatus 16 9112ADDMAStop 54 ∙ C/C++ Library17 9112ContDmaStart 18 9112CheckHalfReady 56 ∙ C/C++ Library19 9112DblBufferTransfer 20 9112GetOverrunStatus21 9112ContDmaStop 58 ∙ C/C++ Library22 9112ADINTStart 23 9112ADINTStatus 60 ∙ C/C++ Library25 9112ADTimer 24 9112ADINTStop2MHz / c1 * c2 62 ∙ C/C++ Library26 9112TIMERStart 27 9112TIMERRead28 9112TIMERStop 29 9112AllocDMAMemArgument cardnumber countervalue 64 ∙ C/C++ Library30 9112FreeDMAMem 32 9112GetSample66 ∙ C/C++ Library Calibration What do you needCalibration ∙ A/D Adjustment VR AssignmentBipolar Calibration Unipolar CalibrationD/A Adjustment Reference Voltage Calibration2 D/A Channel Calibration Software Utilities Software Utility70 ∙ Software Utility System Configuration Running the UtilityCalibration Software Utility ∙Functional Testing PCI Scan Utility72 ∙ Software Utility P e n d i x a . D e m o O g r a m s DOS SoftwareWindows 95 DLL Appendix a Demo Programs ∙74 ∙ Appendix a Demo Programs Product Warranty/Service Product Warranty/Service ∙