Download Print this page

ADLINK Technology NuDAQ 9112 Series Instruction Manual

Multi-function das cards for pci / 3u compactpci
Hide thumbs Also See for NuDAQ 9112 Series:

Advertisement

Quick Links

Manual Rev.
Revision Date:
Part No:
Advance Technologies; Automate the World.
This datasheet has been downloaded from
®
NuDAQ
9112 Series
Multi-function DAS Cards
For PCI / 3U CompactPCI
4.00
November 18, 2005
50-11111-2040
®
/ NuIPC
http://www.digchip.com
at this
page

Advertisement

loading
Need help?

Need help?

Do you have a question about the NuDAQ 9112 Series and is the answer not in the manual?

Questions and answers

Summary of Contents for ADLINK Technology NuDAQ 9112 Series

  • Page 1 ® ® NuDAQ / NuIPC 9112 Series Multi-function DAS Cards For PCI / 3U CompactPCI Manual Rev. 4.00 Revision Date: November 18, 2005 Part No: 50-11111-2040 Advance Technologies; Automate the World. This datasheet has been downloaded from http://www.digchip.com at this page...
  • Page 2 Copyright 2005 ADLINK TECHNOLOGY INC. All Rights Reserved. The information in this document is subject to change without prior notice in order to improve reliability, design, and function and does not represent a commitment on the part of the manufacturer.
  • Page 3 Getting Service from ADLINK Customer Satisfaction is top priority for ADLINK Technology Inc. Please contact us should you require any service or assistance. ADLINK TECHNOLOGY INC. Web Site: http://www.adlinktech.com Sales & Service: Service@adlinktech.com TEL: +886-2-82265877 FAX: +886-2-82265717 Address: 9F, No. 166, Jian Yi Road, Chungho City,...
  • Page 5 Table of Contents Table of Contents..............i List of Tables................ viii List of Figures ................ ix 1 Introduction ................ 1 Features................2 Applications ................ 3 Specifications............... 4 Analog Input (A/D) ............4 Analog Output (D/A) ............5 Digital I/O (DIO) .............. 5 Programmable Counter ..........
  • Page 6 Pin Assignments of PCI-9112 ........21 cPCI-9112 and cPCI-9112R Pin Assignments ..... 24 LPCI-9112 Pin Assignments ......... 26 Hardware Installation Outline..........27 2.10 Device Installation for Windows Systems ......28 2.11 Terminal Board Connection ..........28 Connect with ACLD-8125 ..........29 Connect with ACLD-9137 ..........
  • Page 7 5 C/C++ Libraries..............51 Libraries Installation............51 Programming Guide............51 Naming Convention ............51 Data Types ..............52 _9112_Initial ..............52 @ Description ............... 52 @ Syntax ..............53 @ Argument ..............53 @ Return Code ............. 53 @ Example ..............53 _9112_DI ................
  • Page 8 @ Description ............... 59 @ Syntax ..............60 @ Argument ..............60 @ Return Code ............. 60 5.10 _9112_AD_Set_Mode............60 @ Description ............... 60 @ Syntax ..............61 @ Argument ..............61 @ Return Code ............. 61 @ Example ..............61 5.11 _9112_AD_Set_Autoscan..........
  • Page 9 @ Description ............... 69 @ Syntax ..............69 @ Argument ..............70 @ Return Code ............. 70 @ Example ..............70 5.17 _9112_ContDmaStart ............70 @ Description ............... 70 @ Syntax ..............71 @ Argument ..............71 @ Return Code ............. 72 @ Example ..............
  • Page 10 @ Example ..............77 5.23 _9112_AD_INT_Status ............77 @ Description ............... 77 @ Syntax ..............77 @ Argument ..............78 @ Return Code ............. 78 @ Example ..............78 5.24 _9112_AD_INT_Stop............78 @ Description ............... 78 @ Syntax ..............78 @ Argument: ..............
  • Page 11 @ Description ............... 83 @ Syntax ..............84 @ Argument: ..............84 @ Return Code: ............84 5.31 _9112_Get_Sample............84 @ Description ............... 84 @ Syntax ..............84 @ Argument: ..............84 @ Return Code: ............85 6 Calibration................. 87 What you need..............
  • Page 12 List of Tables Table 1-1: 9112 Series A/D Accuracy ........4 Table 2-1: Jumper Settings ............17 Table 2-2: cPCI-9112 and cPCI-9112R Pin Assignments ..24 Table 2-3: LPCI-9112 Pin Assignments ........26 Table 3-1: I/O Address ............. 33 Table 6-1: VR Functions ............87 Table 8-1: DOS Examples ............
  • Page 13 List of Figures Figure 2-1: PCI-9112 PCB Layout ..........13 Figure 2-2: cPCI-9112 Layout PCB Layout........ 14 Figure 2-3: cPCI-9112R PCB Layout......... 15 Figure 2-4: LPCI-9112 PCB Layout ........... 16 Figure 2-5: Analog Input Mode Setting ........18 Figure 2-6: Timer's Clock Source Setting ........19 Figure 2-7: Analog Output Voltage Setting ........
  • Page 14 List of Figures...
  • Page 16 Introduction The 9112 series products are multi-function data acquisition cards. The 9112 series includes: PCI-9112: 12-bit 110KHz Multifunction DAS card cPCI-9112: 12-bit 110KHz Multifunction DAS card for 3U CompactPCI cPCI-9112R: 12-bit 110kHz Multifunction DAS card for 3U CompactPCI with Rear I/O connector LPCI-9112: 12-bit 110KHz Multifunction DAS card for Low- Profile MD1 mechanism The 9112 series data acquisition cards uses state-of-the-art tech-...
  • Page 17 1.1 Features The 9112 series Data Acquisition Card provides the following advanced features: 32-bit PCI-Bus 12-bit analog input resolution On-board A/D FIFO memory Auto-scanning channel selection Up to 110KHz A/D sampling rates 16 single-ended or 8 differential analog input channels Bipolar or Unipolar input signals Programmable Gain Control (x0.5, x1, x2, x4, x8) Two 12-bit monolithic multiplying analog output channels...
  • Page 18 Applications Industrial and laboratory ON/OFF control Energy management Annunciation Security controller Product testing Event and frequency counting Waveform and pulse generation BCD interface driver Introduction...
  • Page 19 1.3 Specifications Analog Input (A/D) Converter: ADS774 or equivalent, successive approxima- tion type Resolution: 12-bit Numbers of Input Channel: 16 single-ended or 8 differential Input Range: (Programmable) Bipolar: *10V, * 5V, *2.5V, *1.25V, *0.625V Unipolar: 0~10V, 0~5V, 0~2.5V, 0~1.25V Conversion Time: 8 * sec Throughput: 110KHz multiplexing (maximum) Analog Input Over-voltage Protection: Continuous * 35V max.
  • Page 20 Analog Output (D/A) Numbers of Output Channel: 2 double-buffered analog out- Resolution: 12-bit Output Range: Internal Reference: (unipolar) 0~5V or 0~10V External Reference: (unipolar) max. +10V or -10V Converter: DAC7541 or equivalent, monolithic multiplying Settling Time: 30 * sec Linearity: *1/2 bit LSB Output Driving Capability: *5mA max.
  • Page 21 General Specifications Connector: 37-pin D-type connector Operating Temperature: 0* C ~ 60* C Storage Temperature: -20* C ~ 80* C Humidity: 5 ~ 95%, non-condensing Power Requirement: PCI-9112: +5 V @ 460 mA typical +12V @ 110 mA typical cPCI-9112: +5 V @ 600 mA typical +12V @ 20 mA typical cPCI-9112R:...
  • Page 22 1.4 Software Support ADLINK provides versatile software drivers and packages to address different approaches to building a system. We not only provide programming libraries such as DLLs for many Windows systems, but also provide drivers for many software packages such as LabVIEW®, HP VEE , DASYLab , InTouch , InCon-...
  • Page 23 DAQ-LVIEW PnP: LabVIEW® Driver DAQ-LVIEW PnP contains VIs that are used to interface with the LabVIEW® software package. DAQ-LVIEW PnP supports Win- dows 95/98/NT/2000/XP. The LabVIEW® drivers are shipped free with the board. You can install and use them without a license. For more information about DAQ-LVIEW PnP, please refer to the user’s guide in the CD (\\Manual\Software Package\DAQ-LVIEW PnP).
  • Page 24 PCIS-ICL: InControlTM Driver PCIS-ICL is the InControl driver which supports Windows NT. PCIS-ICL is included in the ADLINK CD and license is required to use the drivers. PCIS-OPC: OPC Server PCIS-OPC is an OPC Server that can link with OPC clients. There are several software packages on the market which can provide OPC clients.
  • Page 25 Introduction...
  • Page 26 Installation This chapter describes how to install and setup the 9112 cards. Please follow these instructions carefully. 2.1 Unpacking Checklist Check the shipping carton for any damage. If the shipping carton and contents are damaged, notify the dealer for a replacement. Retain the shipping carton and packing materials for inspection by the dealer.
  • Page 27 2.2 Device Installation for Windows Systems Once Windows 95/98/2000 has started, the Plug and Play func- tions of Windows will find the new NuDAQ/NuIPC cards. If this is the first time a NuDAQ/NuIPC cards is running on your Windows system, you will be prompted to input the device information source.
  • Page 28 2.3 PCB Layout PCI-9112 Layout Figure 2-1: PCI-9112 PCB Layout Installation...
  • Page 29 cPCI-9112 Layout Figure 2-2: cPCI-9112 Layout PCB Layout Installation...
  • Page 30 cPCI-9112R Layout Figure 2-3: cPCI-9112R PCB Layout Installation...
  • Page 31 LPCI-9112 Layout Figure 2-4: LPCI-9112 PCB Layout Installation...
  • Page 32 2.4 Jumper Settings The following configuration can be set with jumpers: the analog input signal mode, counter’s clock source, and analog output range. The card's jumpers and switches are preset at the factory. You can change the jumper settings for your own applications. The location of the jumpers are listed in the table below Jumpers Jumpers...
  • Page 33 2.5 Analog Input Channel Configuration The PCI-9112 offers 16 single-ended or 8 differential analog input channels. Jumpers JP1 and JP5 control the analog input configu- rations. The settings of JP1 and JP5 are specified below: Figure 2-5: Analog Input Mode Setting 2.6 Clock Source Setting The programmable interval timer 8254 is used in the PCI-9112.
  • Page 34 2MHz clock or an external clock signal from connector CN3 pin 35. The setting for clock source is shown below: Figure 2-6: Timer's Clock Source Setting 2.7 D/A Reference Voltage Setting The D/A converter's reference voltage source can be supplied both internally and external.
  • Page 35 nel 2 are selected by JP4, respectively. The possible settings are shown below: Figure 2-7: Analog Output Voltage Setting Installation...
  • Page 36 The internal D/A reference voltage can be set to –5V or –10V by JP3. The possible configurations are specified as Figure 2.7. Note that the internal reference voltage is used only when the JP4 is set to internal reference only. Figure 2-8: Internal Reference Voltage Setting Note: If the -10V D/A reference voltage is selected, the D/A output...
  • Page 37 CN 3: Analog Input / Output & Counter/Timer Figure 2-9: Pin Assignments of CN3 Legend: AI n:Analog Input Channel n (single-ended) AIH n:Analog High Input Channel n (differential) AIL n:Analog Low Input Channel n (differential) ExtRef n: External Reference Voltage for D/A CH n AO n: Analog Output Channel n ExtCLK: External Clock Input ExtTrig: External Trigger Signal...
  • Page 38 CN 1: Digital Signal Input (DI 0 - 15) Figure 2-10: Pin Assignment of CN1 CN 2: Digital Signal Output (DO 0 - 15) Figure 2-11: Pin Assignment of CN2 Legend: DO n:Digital output signal channel n DI n:Digital input signal channel n GND:Digital ground Installation...
  • Page 39 cPCI-9112 and cPCI-9112R Pin Assignments (1) DOUT_0 (26) DIN_9 (51) GND (76) GND (2) DOUT_1 (27) DIN_10 (52) GND (77) GND (3) DOUT_2 (28) DIN_11 (53) GND (78) GND (4) DOUT_3 (29) DIN_12 (54) GND (79) GND (5) DOUT_4 (30) DIN_13 (55) GND (80) GND (6) DOUT_5...
  • Page 40 ExtCLK:External Clock Input for 8254, Counter #0 COUT n: Signal output of Counter n GATE0: Gate input for 8254 Timer #0 GATE: Gate input for 8254 Timer #1,2 ExtRef n: External Reference Voltage for D/A CH n DAn: Analog Output Channel n (n=1,2) REFout: Internal Voltage Reference Output 5Vout: Internal 5V Output 12Vout: Internal 12V Output...
  • Page 41 LPCI-9112 Pin Assignments DOUT0 DIN0 DOUT1 DIN1 DOUT2 DIN2 DOUT3 DIN3 DOUT4 DIN4 DOUT5 DIN5 DOUT6 DIN6 DOUT7 DIN7 DOUT8 DIN8 DOUT9 A10 A44 DIN9 DOUT10 A11 A45 DIN10 DOUT11 A12 A46 DIN11 DOUT12 A13 A47 DIN12 DOUT13 A14 A48 DIN13 DOUT14 A15 A49...
  • Page 42 Legend: AINm:Analog Input Channel m (single-ended) AINHm:Analog High Input Channel m (differential) AINLm:Analog Low Input Channel m (differential) ExtTrig:External AD Trigger Signal DIN_x: Digital Input Channel x DOUT_x:Digital Output Channel x ExtCLK:External Clock Input for 8254, Counter #0 COUT n: Signal output of Counter n GATE0: Gate input for 8254 Timer #0 GATE: Gate input for 8254 Timer #1,2 ExtRef n: External Reference Voltage for D/A CH n...
  • Page 43 PCI system board and slot must provide bus-mastering capability to operate at its optimum level. Installation Procedures 1. Turn off your computer. 2. Turn off all accessories (printer, modem, monitor, etc.) connected to your computer. 3. Remove the cover from your computer. 4.
  • Page 44 The LPCI-9112 is equipped with a 68-pin SCSI-VHDCI connector which is associated with DIN-68S, a general-purpose screw termi- nal board with a 68-pin SCSI-VHDCI connector and DIN-Rail mounting. Connect with ACLD-8125 The ACLD-8125 has a 37-pin D-sub connector, which can connect to the PCI-9112 through the 37-pin assemble cable.
  • Page 45 Connect with ACLD-9185 The ACLD-9185 is a 16-channel SPDT relay output board. This board is connected to CN2 of the PCI-9112 via a 20-pin flat cable. By using this board, you can control external devices through the digital output signals. Connect with ACLD-9138 and ACLD-9188 ACLD-9138 and ACLD-9188 are general-purpose terminal boards it is equipped with a 37-pin D-sub connector.
  • Page 46 Connect with DB-100RU DB-100RU is a transition board for REAR I/O cards, which comes with a 100-pin SCSI connector. Utilizing the DB-100RU, the cPCI- 9112R connector pin assignments are the same with cPCI-9112. For pin assignment details, please refer to the pin diagram. Installation...
  • Page 47 Installation...
  • Page 48 Registers The descriptions of the registers and structure of the PCI-9112 are outlined in this chapter. The information in this chapter will assist programmers, who wish to handle the card with low-level pro- grams. In addition, the low level programming syntax is introduced. This information can help the beginners to operate the PCI-9112 in the shortest learning time.
  • Page 49 I/O Address Read Write Base + 10 A/D Data Reg. CH1 D/A Data Reg. Base + 14 ------------- CH2 D/A Data Reg. Base + 18 A/D Status Reg. A/D Control Reg. Base + 1C Digital IN Reg. Digital OUT Reg. Base + 20 ------------- Software Trigger...
  • Page 50 Address: BASE + 10 Attribute: write only Data Format: (for D/A Channel 1) Base + 10 DA7 DA6 DA5 DA4 DA3 DA2 DA1 DA0 Base + 11 DA11 DA10 DA9 DA8 Base + 12 Base + 14 Address: BASE + 14 Attribute: write only Data Format: (for D/A Channel 2) Base + 14 DA7 DA6 DA5 DA4 DA3...
  • Page 51 ister, the multiplexer switches to the new channel and waits for the conversion. Address: BASE + 18 Attribute: write only Data Format: Base + 18 MUX Auto-Scan A/D Mode Base + 19 GAIN MUX Base + 1A --- --- --- Base + 1B --- --- --- A/D Mode:...
  • Page 52 The modes below applies only to the PCI-9112 card: Bit 3 EITS Bit 2 TPST Bit 1 INTX Bit 0 DMAX Mode & Description Software Trigger & Polling Timer Pacer Trigger & DMA Timer Pacer Trigger & INT External Trigger & Polling External Trigger &...
  • Page 53 With the PCI-9112, the analog input ranges are software program- mable and is controlled by the gain value. The gain values and its corresponding input range are shown below. (Bit12) G3 (Bit11) G2 (Bit10) G1 (Bit9) G0 Bipolar or Unipolar Input Range Bipolar *10V Bipolar...
  • Page 54 3.6 Software Trigger Register If you want to generate a trigger pulse to the PCI-9112 for A/D conversion, you just write any data to this register, and then the A/ D converter will be triggered. Address: BASE + 20 Attribute: write only Data Format: 7 6 5 4 3 2 1 0 BASE+20 X X X X X X X X...
  • Page 55 3.8 Internal Timer/Counter Register Two 8254 counters are used to periodically trigger the A/D conver- sion, A third counter is left free for user applications. The 8254 occupies four I/O address locations in the PCI-9112 as shown below. Users can refer to NEC's or Intel's data sheet for a full description of the 8254 features.
  • Page 56 Operation Theory The operation theory of the functions on PCI-9112 card is described in this chapter. The functions include the A/D conver- sion, D/A conversion, Digital I/O and counter / timer. The operation theory can help you to understand how to configure or to program the PCI-9112.
  • Page 57 more than two floating sources are available, the source must be with common ground. Figure 4-1: Floating source and single-ended Differential input mode The differential input mode provides two inputs that respond to dif- ferences in signals. If the signal source has one side connected to local ground, the differential mode can be used to reduce the effect of ground loops.
  • Page 58 A differential mode must be used when the signal source is differ- ential. A differential source means that the ends of the signal are not grounded. To avoid the danger of high voltages between the local ground of the signal and the ground of the PC system, a shorted ground path must be connected.
  • Page 59 is cleared and indicates that the data is not ready. After the con- version is completed, the DRDY bit will return to active high (1) level. The converted data can now be read from the A/D data reg- isters. Please refer to section 3.5 for more information about the A/ D status register.
  • Page 60 fer. It's recommended that this mode be used if your application needs a fixed and precise A/D sampling rate. External Trigger Through pin-17 of CN3 (ExtTrig), the A/D conversion can also be performed when a rising edge of an external signal is present. The conversion rate of this mode is more flexible than the previous two modes, because the user can control the external signal with the external device.
  • Page 61 When the interrupt transfer is used, the hardware interrupt will be inserted and its corresponding ISR (Interrupt Service Routine) will be invoked and executed after A/D conversion is completed (the converted data is transferred by the ISR program). In PCI design, the IRQ level is assigned by the BIOS directly.
  • Page 62 The PCI-9112 has two unipolar analog output channels. To make a D/A output connection to the appropriate D/A output, please refer to Figure 4-5. Figure 4-5: Analog Output Connection 4.4 Digital Input and Output The PCI-9112 provides 16 digital input and 16 digital output chan- nels through the connectors CN1 and CN2 on-board.
  • Page 63 written to in groups of 16 bits. It is impossible to access individual bit. Figure 4-6: Digital I/O Connection 4.5 Timer/Counter Operation The PCI-9112 has an interval 8254 timer/counter on-board. It offers 3 independent 16-bit programmable down counters; counter 1 and counter 2 are cascaded together for A/D timer pacer trigger of A/D conversions, and counter 0 is free for user applications.
  • Page 64 Figure 4-7: Block Diagram of 8254 Timer/Counter The clock source of counter 0 can be internal or external, while the gate can be controlled externally and the output is send to connec- tor CN3. As for counter 1 and counter 2, the clock source is fixed internally;...
  • Page 65 Event counter Binary rate multiplier Real-time clock Digital one-shot Motor control Pacer Trigger Source Counter 1 and 2 are cascaded together to generate the timer pacer trigger for A/D conversion. The frequency of the pacer trig- ger is software controllable. The maximum pacer signal rate is 2MHz/4=500KHz which exceeds the maximum A/D conversion rate of the PCI-9112.
  • Page 66 C/C++ Libraries This chapter describes the software libraries for operating this card. Only functions in the DOS library and Windows 95 DLL are described. Refer to the PCIS-DASK function reference manual, which is included in the ADLINK CD, for descriptions of Windows 98/NT/2000/XP DLL functions.
  • Page 67 In order to recognize the difference between the DOS library and Windows 95 library, a capital "W" is placed at the start of each function name Windows drivers. e.g. W_9112_Initial(). Data Types We have defined some data types in the Pci_9112.h (DOS) and Acl_pci.h (Windows 95) header files.
  • Page 68 @ Syntax Visual C++ (Windows-95) int W_9112_Initial (int card_number, int *base_address, int *irq_no) Visual Basic (Windows-95) W_9112_Initial (ByVal card_number As Long, base_address As Long, irq_no As Long) As Integer C/C++ (DOS) int _9112_Initial (int card_number, int *base_address, int *irq_no) @ Argument card_number: the card number to be initialized, only four cards can be initialized, the card number must be CARD_1, CARD_2, CARD_3, or CARD_4.
  • Page 69 errCode = _9112_Initial( CARD_2, &baseAddr2, &irqNo2); if ( errCode != ERR_NoError ) exit(0); 5.4 _9112_DI @ Description This function is used to read data from the digital input port. There are 16 digital inputs on the PCI-9112. You can get all 16 input data from _9112_DI in one shot.
  • Page 70 5.5 _9112_DI _Channel @ Description This function is used to read data from the digital input channels (bit). There are 16 digital input channels on the PCI-9112. When performing this function, the digital input port is read and the value of the corresponding channel is returned.
  • Page 71 int baseAddr, irqNo; _9112_Initial( CARD_1, &baseAddr, &irqNo); /* Assume NoError when Initialize PCI-9112 */ for( ch=0; ch<16; ch++ ) _9112_DI_Channel(CARD_1, ch , &data ); printf( "The value of DI channel %d is %d.\n",ch , data); 5.6 _9112_DO @ Description This function is used to write data to the digital output port. There are 16 digital outputs on the PCI-9112, @ Syntax Visual C++ (Windows-95)
  • Page 72 5.7 _9112_DA @ Description This function is used to write data to the D/A converters. There are two Digital-to-Analog conversion channels on the PCI-9112. The resolution of each channel is 12-bit, i.e. the range is from 0 to 4095. @ Syntax Visual C++(Windows-95) int W_9112_DA (int card_number, int da_ch_no, unsigned int data)
  • Page 73 _9112_Initial( CARD_1, &baseAddr, &irqNo); /* Assume NoError when Initialize PCI-9112 */ /* if the hardware setting for DA output range is 0~5V */ _9112_DA(CARD_1, DA_CH_1 , 0x800 ); printf( "The output voltage of CH1 is 2.5V \n" ); _9112_DA(CARD_1, DA_CH_2 , 0xFFF ); printf( "The output voltage of CH2 is 5V \n"...
  • Page 74 @ Argument card_number:the card number of PCI-9112 ad_ch_no: channel number to perform AD conversion for single- ended mode: channel no. is from 0-15; for differential mode: chan- nel no. is from 0-7 @ Return Code: ERR_NoError,ERR_BoardNoInit ERR_InvalidADChannel 5.9 _9112_AD_Set_Range @ Description This function is used to set the A/D analog input range by means of writing data to the A/D range control register.
  • Page 75 @ Syntax Visual C++ (Windows-95) int W_9112_ AD_Set_Range (int card_number, int ad_range) Visual Basic (Windows-95) W_9112_AD_Set_Channel (ByVal card_number As Long, ByVal ad_range As Long) As Long C/C++ ( DOS) int _9112_AD_Set_Range (int card_number, int ad_range ) @ Argument card_number:the card number of PCI-9112 ad_range: the programmable range of A/D conversion, please refer the the above table for the possible range values.
  • Page 76 A/D Mode @ Description AD_MODE_5 External Trigger, DMA (bus mastering) Transfer @ Syntax Visual C++ (Windows-95) int W_9112_AD_Set_Mode (int card_number, int ad_mode) Visual Basic (Windows-95) W_9112_AD_Set_Mode (ByVal card_number As Long, ByVal ad_mode As Long) As Long C/C++ ( DOS) int _9112_AD_Set_Mode (int card_number, int ad_mode ) @ Argument card_number:the card number of PCI-9112...
  • Page 77 printf( "Now, The Internal Timer Pacer trigger is set \n" ); /* All A/D conversion will be trigger by internal timer pacer, and the converted data should be transfered in the interrupt service routine. (ISR). */ 5.11 _9112_AD_Set_Autoscan @ Description This function is used to enable or disable an automatic hardware channel scan.
  • Page 78 @ Return Code ERR_NoError, ERR_BoardNoInit @ Example See the demo program ‘AD_DEMO4.C' 5.12 _9112_AD_Soft_Trig @ Description This function is used to trigger the A/D conversion by software. When the function is called, a trigger pulse will be generated and A/D conversion will start, and the converted data will be stored in the base address Base + 0x10 after the conversion.
  • Page 79 @ Syntax Visual C++ (Windows-95) int W_9112_AD_Aquire (int card_number, int *ad_data) Visual Basic (Windows-95) W_9112_ AD_Aquire (ByVal card_number As Long, ad_data As Long) As Integer C/C++ ( DOS) int _9112_AD_Aquire (int card_number, int *ad_data ) @ Argument card_number:the card number of PCI-9112 ad_data: 12-bit A/D converted value, the value should be within 0 to 4095.
  • Page 80 if( errCode == ERR_NoError ) printf( "The AD value is %d.\n", ad_data ); else printf( "AD conversion error happen\n" ); Also See Demo Program 'AD_DEMO1.C' 5.14 _9112_AD_DMA_Start @ Description This function will perform A/D conversion N times with DMA data transfer.
  • Page 81 etc. Please make sure your PCI-9112 is plugged into a bus-mastering slot, otherwise this function will not work. 2. Load the PCI controller with the count and 32-bit physi- cal address of the start of previously allocated destina- tion memory, which will accept A/D data. This count is the number of bytes (not longwords!) transferred during the bus mastering operation and can be a large number up to 64 million (2^26) bytes.
  • Page 82 @ Syntax 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)
  • Page 83 D11 D10 D9 .......D1 D0 C3 C2 C1 C0 D11, D10, ..., D1, D0: A/D converted data C3, C2, C1, C0: converted channel no. memID(Windows-95): the memory ID of the allocated system DMA memory. Windows environment, before calling W_9112_AD_DMA_Start, W_9112_Alloc_DMA_Mem must be called allocate contiguous...
  • Page 84 C/C++ ( DOS) int _9112_AD_DMA_Status(int card_number, int *status , int *count ) @ Argument card_number:the card number of PCI-9112 status: status of the DMA data transfer 0: AD_DMA_STOP: DMA is completed 1: AD_DMA_RUN: DMA is not completed count: the number of A/D data which has been transferred. @ Return Code ERR_NoError,ERR_BoardNoInit @ Example...
  • Page 85 C/C++ ( DOS) int _9112_AD_DMA_Stop (int card_number, int *count ) @ Argument card_number:the card number of PCI-9112 count: the number of A/D converted data which has been trans- ferred. @ Return Code ERR_NoError ERR_BoardNoInit @ Example See Demo Program 'AD_DEMO3.C', ‘AD_DEMO6.C’ 5.17 _9112_ContDmaStart @ Description This function will perform A/D conversion continuously with DMA...
  • Page 86 @ Syntax Visual C++ (Windows-95) int W_9112_ContDmaStart (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_ContDmaStart (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...
  • Page 87 D11, D10, ..., D1, D0: A/D converted data C3, C2, C1, C0: converted channel no. memID(Windows-95): the memory ID of the allocated system DMA memory to act as the circular buffer. In Windows 95 environment, before calling W_9112_ContDmaStart, W_9112_Alloc_DMA_Mem must be called to allocate a contiguous DMA memory. W_9112_Alloc_DMA_Mem will return a memory ID for identify the allocated DMA memory, as well as the linear address of the DMA memory for user to access the data.
  • Page 88 Visual Basic (Windows-95) int W_9112_CheckHalfReady (ByVal card_number As Long, halfReady As Long) As Long C/C++ ( DOS) int _9112_CheckHalfReady(int card_number, int *halfReady ) @ Argument card_number:the card number of PCI-9112 halfReady: TRUE or FALSE. @ Return Code ERR_NoError,ERR_BoardNoInit @ Example See Demo Program 'AD_DEMO5.C' 5.19 _9112_DblBufferTransfer @ Description...
  • Page 89 userBuffer: user buffer for A/D converted data, size of user buffer is half of doubleBuf (count /2). @ Return Code: ERR_NoError, ERR_BoardNoInit @ Example: See Demo Program 'AD_DEMO5.C' 5.20 _9112_GetOverrunStatus @ Description When using _9112_ContDmaStart() to convert A/D data and _9112_DblBufferTransfer is not used to move converted data the double buffer overrun will occur, you can use this function to check overrun counts.
  • Page 90 @ Example See Demo Program 'AD_DEMO5.C' 5.21 _9112_ContDmaStop @ Description This function is used to stop continuous DMA data transfers. @ Syntax Visual C++ (Windows-95) int W_9112_ContDmaStop (int card_number) Visual Basic (Windows-95) W_9112_ContDmaStop (ByVal card_number As Long) As Long C/C++ ( DOS) int _9112_ContDmaStop (int card_number) @ Argument: card_number:the card number of PCI-9112...
  • Page 91 function is performed on single A/D channel with a fixed analog input range. @ Syntax Visual C++(Windows-95) int W_9112_AD_INT_Start(int card_number, int auto_scan, int ad_ch_no, int ad_range, int count, unsigned long *ad_buffer, int c1, int Visual Basic (Windows-95) W_9112_ AD_INT_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, ad_buffer As Integer,ByVal c1 As Long,...
  • Page 92 Under DOS environment, please make sure this memory is dou- ble-word alignment. Every 16-bit unsigned integer data in ad_buffer: D11 D10 D9 .......D1 D0 C3 C2 C1 C0 D11, D10, ..., D1, D0: A/D converted data C3, C2, C1, C0: converted channel no. c1:the 16-bit timer frequency divider of timer channel #1 c2:the 16-bit timer frequency divider of timer channel #2 @ Return Code...
  • Page 93 @ Argument card_number:the card number of PCI-9112 status: status of the INT data transfer 0: AD_INT_STOP: DMA is completed 1: AD_INT_RUN: DMA is not completed count: current conversion count number. @ Return Code ERR_NoError,ERR_BoardNoInit @ Example See Demo Program 'AD_DEMO2.C' , ‘AD_DEMO5.C’ 5.24 _9112_AD_INT_Stop @ Description This function is used to stop the interrupt data transfer function.
  • Page 94 @ Argument: card_number:the card number of PCI-9112 count: the number of A/D data which has been transferred. @ Return Code: ERR_NoError ERR_BoardNoInit @ Example: See Demo Program 'AD_DEMO2.C' , ‘AD_DEMO5.C’ 5.25 _9112_AD_Timer @ Description This function is used to setup Timer #1 and #2. Timer #1 and #2 are used as frequency divider for generating constant A/D sam- pling rate.
  • Page 95 c2: frequency divider of timer #2 Note: the A/D sampling rate is equal to:2MHz / (c1 * c2). @ Return Code ERR_NoError ERR_BoardNoInit ERR_InvalidTimerValue @ Example main() errCode; baseAddr, irqNo; _9112_Initial( CARD_1, &baseAddr, &irqNo); /* Assume NoError when Initialize PCI- 9112 */ _9112_AD_Timer(CARD_1,10 , 10 );...
  • Page 96 Visual Basic (Windows-95) W_9112_TIMER_Start(ByVal card_number As Long, timer_mode As Long, c0 As Long) As Long C/C++ ( DOS) int _9112_TIMER_Start(int card_number, int timer_mode, unsigned int c0 ) @ Argument card_number:the card number of PCI-9112 timer_mode: the 8253 timer mode, the possible values are: TIMER_MODE0, TIMER_MODE1, TIMER_MODE2, TIMER_MODE3, TIMER_MODE4, TIMER_MODE5.
  • Page 97 @ Argument: card_number:the card number of PCI-9112 counter_value: the counter value of the Timer #0 @ Return Code: ERR_NoError,ERR_BoardNoInit 5.28 _9112_TIMER_Stop @ Description This function is used to stop the timer operation. The timer is set to the 'One-shot' mode with counter value ' 0 '. That is, the clock output signal will be set to high after executing this function.
  • Page 98 5.29 _9112_Alloc_DMA_Mem @ Description Contacts Windows 95 system to allocate a block of contiguous memory for DMA transfer. This function is only available in Win- dows 95 version. @ Syntax Visual C++(Windows-95) int W_9112_Alloc_DMA_Mem (unsigned long buf_size, HANDLE *memID, unsigned long *linearAddr) Visual Basic (Windows-95) W_9112_Alloc_DMA_Mem (ByVal buf_size As Long, memID As Long, linearAddr As Long) As Long...
  • Page 99 @ Syntax Visual C++(Windows-95) int W_9112_Free_DMA_Mem (HANDLE memID) Visual Basic (Windows-95) W_9112_Free_DMA_Mem (ByVal memID As Long) As Long @ Argument: memID:The memory ID of the system DMA memory to deallocate. @ Return Code: ERR_NoError 5.31 _9112_Get_Sample @ Description For programming languages without pointer support such as Visual Basic, programmers can use this function to access the index-th data in DMA buffer.
  • Page 100 @ Return Code: ERR_NoError C/C++ Libraries...
  • Page 101 C/C++ Libraries...
  • Page 102 Calibration In data acquisition processes, how to calibrate your measurement devices to maintain its accuracy is very important. Users can cali- brate the analog input and output channels under the users' oper- ating environment to maximize the accuracy. This chapter will guide you though how to calibrate the PCI-9112.
  • Page 103 6.3 A/D Adjustment To calibrate the analog input channel, please follow the proce- dures described below. Note that whether unipolar or bipolar input mode is applied, programmable amplifier offset should be cali- brated first. Moreover, when A/D input configuration is bipolar, you should only follow the bipolar calibration procedure.
  • Page 104 Unipolar Calibration (Gain = 1, i.e. input range = 0~+10V) 1. Set the A/D input range to bipolar 5V. 2. Adjust the voltage calibrator’s voltage output to – 4.9987V (i.e. –Vfull scale + 1/2 LSB). Apply this signal to A/D channel 0. 3.
  • Page 105 D/A Channel Calibration D/A CH1 calibration 1. Connect the DVM (+) to CN3 pin-30 (AO1) and the DVM (-) to A.GND. 2. Write the Digital value 0x0FFF into the register at BASE+10 address 3. Trim the variable resister VR3 to obtain a +5V reading on the DVM.
  • Page 106 Software Utilities The utility program in the software package includes System Con- figuration, Calibration, and Functional testing. All the utilities use menu-driven operating mode based on Windows environment, so it is very easy to operate and not much learning effort is required. In addition to the Utility and C/C++, DLL Libraries, some demon- stration programs are also included;...
  • Page 107 The 9112UTIL.EXE includes six functions: 1. Configuration: Check the hardware setting of your PCI- 9112. 2. Calibration: Calibrate the A/D and D/A measurement accuracy 3. Software Trigger Testing: Testing utility for software poll- ing A/D, D/A and Digital I/O. 4. Interrupt Testing: Testing utility for interrupt A/D data transfer mode.
  • Page 108 The bottom window shows the procedures that should be followed when calibrating the PCI-9112. Functional Testing This function is used to test the multi-functionalities of PCI-9112; it includes Digital I/O, D/A, A/D, Timer, and DMA testing. When you choose this test function from the main menu list, a dia- gram is displayed on the screen;...
  • Page 109 Software Utilities...
  • Page 110 Appendix DOS Examples: There are 8 DOS demonstration programs available in the soft- ware CD. They can provide assistance when programming your application using C programming Language. The description of these programs are specified in the table below: AD_DEMO1.C: A/D conversion using software trigger and program data transfer. AD_DEMO2.C A/D conversion using interrupts and program data transfer.
  • Page 111 Windows 95 DLL: There are several demonstration programs for Windows 95 DLL. They can provide assistance when programming your application using C/C++ or Visual Basic Language to link DLL libraries. The description of these programs are specified as follows: A/D conversion using software trigger and program data trans- Samples\sdk\9112\ 9112util.exe fer.
  • Page 112 Warranty Policy Thank you for choosing ADLINK. To understand your rights and enjoy all the after-sales services we offer, please read the follow- ing carefully. 1. Before using ADLINK’s products please read the user man- ual and follow the instructions exactly. When sending in damaged products for repair, please attach an RMA appli- cation form which can be downloaded from: http:// rma.adlinktech.com/policy/.
  • Page 113 3. Our repair service is not covered by ADLINK's two-year guarantee in the following situations: Damage caused by not following instructions in the user's manual. Damage caused by carelessness on the user's part dur- ing product transportation. Damage caused by fire, earthquakes, floods, lightening, pollution, other acts of God, and/or incorrect usage of voltage transformers.