NuDAQ ACL-8111 16-bit High Resolution Data Acquisition Card User’s Guide
@Copyright 1995~2000 ADLINK Technology Inc. All Rights Reserved. Manual Rev. 2.43: April 15, 2000 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.
Getting service from ADLINK ♦ Customer Satisfaction is always the most important thing for ADLINK Tech Inc. If you need any help or service, please contact us and get it. ADLINK Technology Inc. Web Site Sales & Service Technical Support TEL Address ♦ http://www.adlink.com.tw service@adlink.com.tw NuDAQ nudaq@adlink.com.tw NuDAM nudam@adlink.com.tw NuIPC nuipc@adlink.com.tw NuPRO nupro@adlink.com.tw Software sw@adlink.com.tw AMB amb@adlink.com.tw +886-2-82265877 FAX +886-2-82265717 9F, No.
Table of Contents How to Use This Guide..................................................................... 1 Chapter 1 Introduction .................................................................. 1 1.1 1.2 1.3 1.4 Features.............................................................................. 1 Applications........................................................................ 2 Specifications..................................................................... 2 Software Supporting...........
4.2 4.3 D/A Conversion ................................................................. 28 Digital Input and Output.................................................... 30 Chapter 5 C/C++ Library for DOS................................................. 33 5.1 DOS Software Library Installation .................................... 33 5.1.1 5.1.2 5.1.3 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.10 5.11 5.12 5.13 5.14 5.15 5.16 5.17 Installation.......................................................................
How to Use This Guide This manual is designed to help you use the ACL-8111. The manual describes how to modify various settings on the ACL-8111 card to meet your requirements. It is divided into six chapters: • Chapter 1, "Introduction," gives an overview of the product features, applications, and specifications. • Chapter 2, "Installation," describes how to install the ACL8111.
1 Introduction The ACL-8111 is a multi -function, high performance, and generalpurpose data acquisition card for the IBM Personal Computer and compatible computers. The registers map is fully compatible with PCL-711B. The ACL-8111 is designed to combine all the data acquisition functions, such A/D, D/A, D/O, and D/I in a single board, The highend specifications of the card makes it ideal for wide range of applications in industrial and laboratory automation. 1.
1.2 Applications • • • • • • • • • 1.
• Output Range: Internal reference: (unipolar) 0~5V or 0~10V External reference: (unipolar) max. +10V or -10V • • • Settling Time: 30 µ sec • • Number of channel: 16 DI & 16 DO (TTL compatible) Linearity: ± 1/2 bit LSB Output driving capability: ± 5mA max. ♦ Digital I/O (DIO) Input Voltage: Low: Min. 0V; Max. 0.8V High: Min. +2.0V • Input Load: Low: +0.5V @ -0.2mA max. High: +2.7V @+20 uA max. • Output Voltage: Low: Min. 0V; Max. 0.4V High: Min. +2.4V • Output Driving Capacity: Low: Max. +0.
+12V @ 60 mA typical • Dimension: 158mm X 108mm 4 • Introduction
1.4 Software Supporting The ACL-8111 is programmed using simple 8 -bit I/O port commands. Users can use high level language, such as BASIC, C, or PASCAL, or low- level language, such as assembly to program the board. For the programming under Windows or LabView, please contact your dealer to purchase ACLS-DLL2 or ACLD-LVIEW. 1.4.1 ACLS-DLL2 For easily program the board under Windows environment, we also provide ACLS-DLL2, which include the DLL for Windows 95/98/NT.
2 Installation This chapter describes how to install the ACL-8111. The following list shows the installation procedures: 1. 2. 3. 4. 5. 2.
You are now ready to install your ACL-8111. 2.2 What You Have In addition to this User's Manual, the package includes the following items: • • ACL-8111 multi-function data acquisition card ADLINK Software CD If any of these items is missing or damaged, contact the dealer from whom you purchased the product. Save the shipping materials and carton in case you want to ship or store the product in the future. 2.
Figure 2.3 ACL-8111‘s PCB layout Installation • 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4 Base Address Setting The ACL-8111 requires 16 consecutive address locations in I/O address space. The base address of the ACL-8111 is restricted by the following conditions. 1. 2. 3. The base address must be within the range Hex 200 to Hex 3FF. The base address should not conflict with any PC reserved I/O address. See Appendix A. The base address must not conflict with any add-on card on your own PC. Please check your PC before installing the ACL8111.
OFF (1) OFF (1) 300-30F 3F0-3FF OFF (1) OFF (1) ON (0) OFF (1) ON (0) OFF (1) ON (0) OFF (01 ON (0) OFF (1) ON: 0 OFF: 1. A4 ... A9 are correspond to PC address lines. How to Define a Base Address for the ACL-8111? The DIP1 to DIP6 in the switch SW1are one to one corresponding to the PC bus address line A9 to A4. A0, A1, A2, and A3 are always 0. If you want to change the base address, you can only change the values of A9 to A4 (shadow area of below table).
12 • Installation
2.6 Connectors Pin Assignments The ACL-8111 has three connectors: one 37-pin D-type connector (CN1) and two 20-pin insulation displacement connectors (CN2 and CN3). CN1 is for analog input and analog output signals. CN2 is for digital input signal. CN3 is for digital output signal. The pin assignments for each connector are illustrated in the Figure 3.1 ~ Figure 3.3.
• CN 2: Digital Input Signals (DI 0 - 15) CN2 DI 0 DI 2 DI 4 DI 6 DI 8 DI 10 DI 12 DI 14 GND +5V • 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 DI 1 DI 3 DI 5 DI 7 DI 9 DI 11 DI 13 DI 15 GND Strobe CN 3: Digital Output Signals (DO 0 - 15) CN3 DO 0 DO 2 DO 4 DO 6 DO 8 DO 10 DO 12 DO 14 GND +5V Legend: DO n DI n GND +12V Strobe 14 • Installation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 DO 1 DO 3 DO 5 DO 7 DO 9 DO 11 DO 13 DO 15 GND +12V : Digital output signal channel n : Digital inpu
2.7 Daughter Board Connection The ACL-8111 can be connected with five different daughter boards ACLD-9137, 9182, 9185, and 9188. The functionality and connections are specified as following: 2.7.1 Connect with ACLD-9137 The ACLD-9137 is a direct connector for the card, which is equipped with 37-pin D-sub connector. This board provides a simple way for connection. It is very suitable for the simple applications that do not need complex signal condition before the A/D conversion is performed. 2.7.
2.7.4 Connect with ACLD-9188 ACLD-9188 is a general-purpose terminal board for the entire card, which comes equipped w ith 37-pin D-sub connector.
3 Registers Format The chapter specifies the detailed descriptions of the register format. This information is useful for the programmers who wish to handle the card by low-level program. 3.1 Registers Address Map The ACL-8111 requires 16 consecutive addresses in the I/O address space. The following table (Table 3.1) shows the location of each register relative to the base address and register descriptions.
3.2 A/D Data Registers ACL-8111 provides 8 single-end A/D input channels. The 12 bit A/D data is put in two 8-bit registers. The low byte date (8 LSBs) is at address BASE+4 and the high byte data (4 MSBs) is at address BASE+5. The DRDY bit is used to indicate the status of A/D conversion. DRDY goes to low-level means A/D conversion is completed.
CL2 is MSB, and CL0 is LSB. Where CL2, CL1, and CL0 are multiplexer channel selection: Channel NO. 0 1 2 3 4 5 6 7 3.4 CL2 0 0 0 0 1 1 1 1 CL1 0 0 1 1 0 0 1 1 CL0 0 1 0 1 0 1 0 1 Power Up Setting A/D Input Range Control Register The gain control register is a write-only register using address Base + 9. It is used to adjust the gain of the analog input programmable amplifier.
Analog Input Range = Maximum Input Voltage / Gain 20 • Registers Format
3.5 Mode and Interrupt Control Register The Mode and Interrupt control register is a write-only register. This register control the AD operating modes and the IRQ level of the ACL-8111. The AD operation modes include the AD clock source and the AD data transfer method.
1 3.6. 1 1 IRQ7 Interrupt Status Register The Interrupt Status Register is used to clear the interrupt status for next new interrupt can be generated. If the ACL-8111 is in interrupt data transfer mode, a hardware status flag will be set after each A/D conversion. You have to clear the status flag by just writing any data to this register, let the ACL-8111 can generate next interrupt if a new A/D conversion is happen. Address : BASE + 8 Attribute: write only Data Format: Bit 7 BASE+8 3.
Data Format: Bit 7 6 5 4 3 2 1 0 Base + 6 DI7 DI6 DI5 DI4 DI3 DI2 DI1 DI0 Base + 7 DI15 DI14 DI13 DI12 DI11 DI10 DI9 DI8 Address : BASE + 13 & BASE + 14 Attribute: write only Data Format: Bit 7 6 5 4 3 2 1 0 Base + 13 DO7 DO6 DO5 DO4 DO3 DO2 DO1 DO0 Base + 14 DO15 DO14 DO13 DO12 DO11 DO10 DO9 DO8 3.9 D/A Output Register The D/A converter will convert the D/A output register data to the analog signal. The register data of the address Base + 4 and Base + 5 are used for D/A conversion.
4 Operation Theorem The chapter describe the operation theorem of ACL-8111. The functions include the A/D conversion, D/A conversion, and digital I/O. The operation theorem can help you to understand how to manipulate and to program the ACL-8111. 4.1 A/D Conversion Before programming the ACL-8111 to perform the A/D conversion, you should understand the following issues: • A/D conversion procedure • A/D trigger mode • A/D data transfer mode • Signal Connection 4.1.
optimize the DAS system. Refer to section 4.1.3 for data transfer modes. 4.1.2 A/D Clock Sources (Trigger Modes) In the ACL-8111, two Internal or one external clock sources can trigger A/D conversion. The two internal sources are the software trigger and the timer pacer trigger, which is controlled by the A/D operation mode control register (BASE+11). The A/D operation modes combine the AD clock sources and the data transfer mode together.
Pacer rate = 2 MHz / (C1 * C2) 8253 Timer/Counter Not Used Counter 0 CLK0 GATE0 OUT0 Vcc Counter 1 CLK1 GATE1 2MHz Oscillator OUT1 Timer Pacer Counter 2 CLK2 GATE2 OUT2 The maximum pacer signal rate is 2MHz/4=500K, which excess the maximum A/D conversion rate of the ACL-8111. The minimum signal rate is 2MHz/65535/65535, which is a very slow frequency that user may never use it. For example, if you wish to get a pacer rate 2.5 kHz, you can set C1 = 40 and C2 = 10. That is 2.
Software Data Transfer Usually, this mode is used with software A/D trigger mode. After the A/D conversion is triggered by software, the software should poll the DRDY bit until it becomes to high level. Whenever the low byte of A/D data is read, the DRDY bit will be cleared to indicate the data is read out. It is possible to read A/D converted data without polling. The A/D conversion time will not excess 8µs on ACL-8111 card.
-5 or -10 INT or Ext Pin-30 ( AO) Ref In D/A Converter + To D/A Output Pin-20 ( A.GND) Analog GND Figure 4.
Vout = −Vref × DAn 4096 Where the Vref is the reference voltage, the Vout is the output voltage, and the DAn is the digital value in D/A data registers. Before performing the D/A conversion, users should care about the D/A reference voltage, which set by the JP1. Please refer section 2.6 for jumper setting. The reference voltage will effect the output voltage. If the reference voltage is -5V, the D/A output scaling will be 0~5V. If the reference voltage is -10V, the D/A output scaling will be 0~10V.
74LS244 Digital Input(DI) From TTL Signal Digital Output (DO) To TTL Devices 74LS373 ACL-8111 Digital GND (DGND) Outside Device Figure 4.3 Digital I/O Connection To program digital I/O operation is fairly straightforward. The digital input operation is just to read data from the corresponding registers, and the digital output operation is to write data to the corresponding registers. Note that the DIO data channel can only be read or written in form of 8 bits together.
5 C/C++ Library for DOS This chapter describes the DOS software library, which is free supplied. The DOS library software includes a utility program, C language library, and some demonstration programs, which can help you reduce the programming work. To program in Windows environment, please use ACLS-DLL2. The function reference manual of ACLS-DLL2 is included in the ADLINK CD. It needs license. 5.1 DOS Software Library Installation 5.1.
5.1.3 Example Programs Six example programs in C language are supported in the directory , you can refer these samples and modify them for your own application. They can help you understand the library more quickly. 5.2 _8111_Initial @ Description An ACL-8111 card is initialized according to the card number and the corresponding base address. Every ACL-8111 Multi-Function Data Acquisition Card have to be initialized by this function before calling other functions.
C/C++ Library for DOS • 35
5.3 _8111_Switch_Card_No @ Description This function is used on dual-cards system. After two ACL-8111 cards are initialized by the initial function, you can select one card which you want to operate. @ Syntax int _8111_Switch_Card_No(int card_number) @ Argument: card_number: The card number to be initialized, only two cards can be initialized, the card number must be CARD_1 or CARD_2. @ Return Code: ERR_NoError ERR_InvalidBoardNumber @ Example: #include “aclerr.h” #include “8111.
5.4 _8111_DI @ Description This function is used to read data from digital input port. There are 16-bit digital inputs on the ACL-8111. The bit 0 to bit 7 are defined as low byte and the bit 8 to bit 15 are defined as the high byte. @ Syntax int _8111_DI( int port_number, unsigned char *data ) @ Argument: port_number: To indicate which port is read, DI_LO_BYTE or DI_HI_BYTE. DI_LO_BYTE: bit 0 ~ bit 7, DI_HI_BYTE: bit8 ~ bit15 data: return value from digital port.
5.5 _8111_DI _Channel @ Description This function is used to read data from digital input channels (bit). There are 16 digital input channels on the ACL-8111. When performs this function, the digital input port is read and the value of the corresponding channel is returned. Note: channel means each bit of digital input ports. @ Syntax int _8111_DI_Channel(int di_ch_no, unsigned int *data ) @ Argument: di_ch_no: the DI channel number, the value has to be set from 0 to 15. data: return value, either 0 or 1.
5.6 _8111_DO @ Description This function is used to write data to digital output ports. There are 16 digital outputs on the ACL-8111, they are divided by two ports, DO_LO_BYTE and DO_HI_BYTE. The channel 0 to channel 7 are defined in DO_LO_BYTE port and the channel 8 to channel 15 are defined as the DO_HI_BYTE port.
5.7 _8111_DA @ Description This function is used to write data to D/A converters. There is a Digital-to-Analog conversion channel on the ACL-8111. The resolution is 12-bit, i.e. the range is from 0 to 4095. @ Syntax int _8111_DA(unsigned int data ) @ Argument: data: D/A converted value, if the value is greater than 4095, the higher 4-bits are negligent. @ Return Code: ERR_NoError ERR_BoardNoInit ERR_InvalidDAChannel @ Example: #include “aclerr.h” #include “8111.
5.8 _8111_AD_Set_Channel @ Description This function is used to set AD channel by means of writing data to the multiplexer scan channel register. There are 8 single-ended A/D channels in ACL-8111, so the channel number should be set between 0 to 7 only. The initial state is channel 0 which is a default setting by the ACL-8111 hardware configuration.
5.9 _8111_AD_Set_Gain @ 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. The initial value of gain is “1’ which is set by the ACL-8111 harware. The relationship between gain and input voltage ranges is specified by following tables: The initial value of gain is '1‘ and input type is bipolar, which are preset by the ACL-8111 hardware.
_8111_AD_Set_Gain( AD_GAIN_8 ); printf( "The A/D analog input range is +/0.625V now.\n" ); } 5.10 _8111_AD_Set_Mode @ Description This function is used to set the A/D trigger and data transfer mode by means of writing data to the mode control register. The hardware initial state of the ACL-8111 is set as AD_MODE_1 software( internal) trigger with program polling data.
_8111_Initial( CARD_1 , 0x220 ); /* Assume NoError when Initialize ACL-8111 */ _8111_AD_Set_Mode( IRQ5, AD_MODE_0 ); printf( "Now, disable internal trigger.
5.11 _8111_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 the converted data will be stored in the base address Base +4 and Base +5, and can be retrieved by function _8111_AD_Aquire(). Please refer to section 6.11. @ Syntax int _8111_AD_Soft_Trig( void ) @ Argument: None @ Return Code: ERR_NoError ERR_BoardNoInit @ Example: Please refer the example in next section. 5.
/* Assume NoError when Initialize ACL-8111 */ /* Set to software trigger at first*/ _8111_AD_Set_Mode( IRQ5, AD_MODE_1 ); /* then trigger the AD */ _8111_AD_Soft_Trig(); /* wait for AD data ready then read it */ ErrCode = _8111_AD_Aquire( &ad_data ); if( ErrCode == ERR_NoError ) printf( "The AD value is %d.\n", ad_data ); else printf( "AD conversion error happen\n" ); } Also see deme program 'AD_DEMO1.C' 5.
check the status of the operation by using the function 8111_AD_INT_Status(). The function is perform on single A/D channel with fixed analog input range.
@ Syntax int _8111_INT_Start( int ad_ch_no, int ad_range, int irq_ch_no, int count, int *ad_buffer, unsigned int c1, unsigned int c2) @ Argument: ad_ch_no: A/D channel number ad_range: A/D analog input range, please refer to section 6.9 for the possible values. irq_ch_no: IRQ channel number used to transfer AD data, the possible value is defined in ' 8111.
5.15 _8111_AD_INT_Status @ Description Since the _8111_AD_INT_Start() function executes in background, you can issue the function _8111_AD_INT_Status to check the status of interrupt operation. @ Syntax int _8111_AD_INT_Status( int *status , int *count ) @ Argument: status: status of the INT data transfer 0: A/D INT is completed 1: A/D INT is not completed count: current conversion count number. @ Return Code: ERR_NoError ERR_BoardNoInit ERR_AD_INTNotSet @ Example: See demo program 'AD_Demo2.C' 5.
5.17 _8111_AD_Timer @ Description This function is used to setup the Timer #1 and Timer #2. Timer #1 & #2 are used as frequency divider for generating constant A/D sampling rate dedicatedly. It is possible to stop the pacer trigger by setting any one of the dividers as 0. The AD conversion rate is limited due to the conversion time of the AD converter, the highest sampling rate of the ACL-8111 can not be exceeded 30 KHz,Thus the multiplication of the dividers must be larger than 70.
6 Calibration In data acquisition process, how to calibrate your measurement devices to maintain its accuracy is very important. Users can calibrate the analog input and analog output channels under the users' operating environment for optimizing the accuracy. This chapter will guide you to calibrate your ACL-8111 to an accuracy condition. Note: Your ACL-8111 board has been carefully calibrated in the factory before it is shipped to you. 6.
52 • Calibration
6.2 VR Assignments There are five variable resistors (VR) on the ACL-8111 board to allow you making accurate adjustment on A/D and D/A channels. The function of each VR is specified below: VR No. VR1 VR2 VR3 VR4 VR5 6.3 Function D/A full scale adjustment D/A zero offset adjustment A/D offset adjustment A/D full scale adjustment A/D programmable amplifier offset adjustment D/A Calibration The D/A input reference voltage should be connected to for calibration.
6.4 A/D Calibration Since the ACL-8111 provides versatile A/D input ranges, the calibration on one A/D range may cause a small offset on other ranges. It is suggested that you calibrate the A/D range which you need best accuracy. The procedures of calibration are as follows: 1. Set the analog input range as: +/- 5V, i.e. the gain = 1 2. Short the A/D channel 0 (pin 1 of CN1) to ground (GND), and connect the TP1 (+) and TP2 (-) with your DVM. Trim the variable resister VR5 to obtain 0 reading in the DVM. 3.
Appendix A. Demo. Programs In this software diskette, there are 6 demonstration programs are provided. They could help you to program your application by using C Language Library easily. The description of these programs are specified as follows: AD_DEMO1.C: A/D conversion uses software trigger and program data transfer. AD_DEMO2.C A/D conversion uses interrupt and program data transfer. AD_DEMO3.C: A/D conversion uses DMA data transfer. DA_DEMO.C: D/A conversion DI_DEMO.
Product Warranty/Service Seller warrants that equipment furnished will be free form defects in material and workmanship for a period of one year from the confirmed date of purchase of the original buyer and that upon written notice of any such defect, Seller will, at its option, repair or replace the defective item under the terms of this warranty, subject to the provisions and specific exclusions listed herein.