background image

22 

 C/C++ Library for DOS 

5.4  _8113_ActCard_Set 

Ø 

Description 

This function is used to switch active card which the A/D operations can be 
applied.  After more than one cards are initialized by the function 
_8113_Initial, you have to use this function to select which card is activate 
currently. 

Note: In this library, up to eight ACL-8113A cards can be initialized.  

Ø 

Syntax 

int _8113_ActCard_Set( int card_number) 

Ø 

Argument 

card_number: 

The card number must be initialized; up to 8 

cards can be initialized in one system. The valid 
vaule is from 0 to 7. 

Ø 

Return Code 

ERR_NoRrror 
ERR_InvalidBoardNumber 
ERR_BaseAddressError 

Ø 

Example 

 

#include  "8113.h" 
 
 
main() 

 

_8113_Initial( CARD_1, 0x210 );  

 

_8113_Initial( CARD_2, 0x220 ); 

 

/* Assume NoError when Initialize ACL-8113A */ 

 
 

_8113_ActCard_Set( CARD_1 ); 

 

/*..... You can perform certain functions to Card_1 
here 

*/ 

 
 

_8113_ActCard_Set( CARD_2 ); 

 

/*..... You can perform certain functions  to Card_2 
here 

*/ 

 

 

Содержание NuDAQ ACL-8113A

Страница 1: ...NuDAQ ACL 8113A 12 bit 32 Channels Isolated Analog Input Card User s Guide ...

Страница 2: ...ges arising out of the use or inability to use the product or documentation even if advised of the possibility of such damages This document contains proprietary information protected by copyright All rights are reserved No part of this manual may be reproduced by any mechanical electronic or other means in any form without prior written permission of the manufacturer Trademarks NuDAQ is registere...

Страница 3: ......

Страница 4: ... 7 Connector Pin Assignment 9 Chapter 3 Registers Format 10 3 1 I O Port Address Map 10 3 2 A D Data Registers 11 3 3 A D Channel Control Register 11 3 4 A D Range Control Register 12 Chapter 4 Operation Theorem 14 4 1 A D Conversion Procedure 14 4 2 A D Signal Source Control 15 4 3 A D Trigger Source Control 16 4 4 A D Data Conversion 16 Chapter 5 C C Library for DOS 19 5 1 Installation 20 5 2 C ...

Страница 5: ...ii Table of Contents Chapter 6 Calibration 28 6 1 What do you need 28 6 2 VR Assignment 28 6 3 Bipolar A D Adjustment 29 6 4 Uni polar A D Adjustment 29 Product Warranty Service 30 ...

Страница 6: ...dress and jumpers setting for analog input channel configuration are specified u Chapter 3 Registers format describes the details of register format and structure of the ACL 8113A this information is very important for the programmers who want to control the hardware by low level programming u Chapter 4 Operation Theorem describes how to operate the A D sequence on the ACL 8113A u Chapter 5 C C li...

Страница 7: ......

Страница 8: ...enuate the analog input or provide the holes for I to V conversion In addition two DC to DC converters and software programmable gain on each channel are provided for stability and flexibility 1 1 Features The ACL 8113A 32 Channel S E Isolated A D Card provides the following advanced features l 32 single end analog input channels l Over 2500 VDC Isolation l On board signal conditioning circuits l ...

Страница 9: ... Input Range 10V Range Bi polar 5V 2 5V 1 25V 0 625V 0 3125V Uni polar 0 10V 0 5V 0 2 5V 0 1 25V 0 0 625V 20V Range Bi ploar 10V 5V 2 5V 1 25V 0 625V Uni polar 0 10V 0 5V 0 2 5V 0 1 25V Over voltage Protection Continuous 35V maximum l Converter Type Successive approximation l Converter B B AD774 or equivalent l Conversion Speed 50 KHz maximum l Accuracy 0 015 of reading 1 LSB l None linearity 1 bi...

Страница 10: ...wn programs we provide MS DOS Borland C C and MS C libraries which are free ACLS DLL2 is the Development Kit for NuDAQ ISA Bus Cards with Analog I O windows 3 1 95 98 NT ACLS DLL2 can be used for many programming environments such as VC VB Delphi ACLS DLL2 is included in the ADLINK CD It need license 1 4 2 LabView Driver The ACLS LVIEW includes the ACL 8316 8312 s VIs which is used to interface wi...

Страница 11: ...urchased the product Save the shipping materials and carton in case you want to ship or store the product in the future 2 2 Unpacking Your ACL 8113A card contains sensitive electronic components that can be easily damaged by static electricity The card should be done on a grounded anti static mat The operator should be wearing an anti static wristband grounded at the same point as the anti static ...

Страница 12: ...t they are properly seated Do this only with the module place on a firm flat surface Note DO NOT APPLY POWER TO THE CARD IF IT HAS BEEN DAMAGED You are now ready to install your ACL 8113A 2 3 ACL 8113A s Layout CN1 VR1 VR2 VR3 VR4 SW1 JP1 JP2 ADS774 8113G 32CH S E ISOLATED A D CARD REV A 10V 20V B I U N ...

Страница 13: ...e jumper 2 5 Base Address Setting The ACL 8113A requires 16 consecutive address locations in I O address space The base address of the ACL 8113A is restricted by the following conditions 1 The base address must be within the range 000hex to 3F0hex 2 The base address should not conflict with any reserved I O address The ACL 8113A s I O port base address is selectable by an 5 position DIP switch SW1...

Страница 14: ...e to one corresponding to the PC bus address line A8 to A4 A9 is always 1 and A0 A3 are always 0 If you want to change the base address you can only change the values of A8 to A4 the shadow area of below table The following table is an example which shows you how to define the base address as Hex 220 Base Address Hex 220 2 2 0 1 0 0 0 1 0 0 0 0 0 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0 2 6 Input Range Selec...

Страница 15: ...Input Range 10V Bipolar Mode Default 10V 20V UN BI X1 5V 5V X2 2 5V 2 5V X4 1 25V 1 25V X8 0 625V 0 625V X16 0 3125V 0 3125V Input Range 10V Uni polar Mode 10V 20V UN BI X1 0V 10V X2 0V 5V X4 0V 2 5V X8 0V 1 25V X16 0V 0 625V 10V 20V UN BI X1 10V 10V X2 5V 5V X4 2 5V 2 5V X8 1 25V 1 25V X16 0 625V 0 625V 10V 20V UN BI X1 Not Used X2 0V 10V X4 0V 5V X8 0V 2 5V X16 0V 1 25V Table 2 2 Analog Input Ra...

Страница 16: ...gure 2 3 as following 1 2 3 4 5 6 10 11 12 13 14 15 7 8 9 16 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 29 35 36 37 34 AI2 AI4 AI6 AI8 AI10 AI12 AI14 A GND AI16 AI18 AI20 AI22 AI24 AI26 AI28 A GND AI30 A GND AI1 AI3 AI5 AI7 AI9 AI11 AI13 AI15 AI19 AI21 AI23 AI25 AI27 AI17 A GND AI29 AI31 AI0 A GND Figure 2 3 Pin Assignment of DB 37 female connector Legend AIn Analog Input CH n A GND Analog Gr...

Страница 17: ...ACL 8113A requires 16 consecutive addresses in the PC I O address space The following table shows the location of each register and driver relative to the base address and its description Location READ WRITE Base 0 Not Used Not Used Base 1 Not Used Not Used Base 2 Not Used Not Used Base 3 Not Used Not Used Base 4 A D low byte Not Used Base 5 A D high byte Not Used Base 6 Not Used Not Used Base 7 N...

Страница 18: ...6 5 4 3 2 1 0 BASE 4 AD7 AD6 AD5 AD4 AD3 AD2 AD1 AD0 BASE 5 0 0 0 DRDY AD11 AD10 AD9 AD8 AD11 AD0 Analog to digital data AD11 is the Most Significant Bit MSB AD0 is the Least Significant Bit LSB DRDY Data Ready Signal 1 A D data is not ready 0 A D conversion is completed It will be set to 1 when reading the low byte 3 3 A D Channel Control Register This register is used to control the A D channels...

Страница 19: ...ster is used to adjust the analog input ranges for A D channels Two factor will effect the input range Gain and Bipolar Unipolar Both of these issues can be controlled by this register The Table 4 2 shows the relationship between the register data and the A D input range Address BASE 9 Attribute write only Data Format Bit 7 6 5 4 3 2 1 0 X X X X X G2 G1 G0 The relationship between input voltage ra...

Страница 20: ...r 0 1 0 X 4 1 25 V 0 1 1 X 8 0 625 V 1 0 0 X 16 0 3125 V 0 0 0 X 1 0 10 V 10V 0 0 1 X 2 0 5 V Uni polar 0 1 0 X 4 0 2 5 V 0 1 1 X 8 0 1 25 V 1 0 0 X 16 0 0 625 V 0 0 0 X 1 10 V 20V 0 0 1 X 2 5 V Bipolar 0 1 0 X 4 2 5 V 0 1 1 X 8 1 25 V 1 0 0 X 16 0 625 V 0 0 0 X 1 X 20V 0 0 1 X 2 0 10 V Uni polar 0 1 0 X 4 0 5 V 0 1 1 X 8 0 2 5 V 1 0 0 X 16 0 1 25 V Note Please refer section 2 6 for jumper setting...

Страница 21: ... know about the property of the signal to be measured at first Then users should define and control the A D signal sources including the A D channel A D gain and A D signal types Please refer to section 4 2 For A D signal source control After deciding the A D signal source the user must decide how to trigger the A D conversion and define control the trigger source The A D converter will start to c...

Страница 22: ...und AIN AGND n 0 31 Floating Signal Source Opertional Amplifier To A D Converter Input Multipexer V1 V2 Signal Conditioning Three are 32 SE A D channels on board The R C filters attenuators are on board for every channel The RC circuits for each channel are shown in the following diagram where n is the channel number User can install the R C for special purpose such as attenuating the voltage to i...

Страница 23: ...hat is the A D conversion is starting when any value is written into the software trigger register This trigger mode is suitable for low speed A D conversion Under this mode the timing of the A D conversion is fully controlled by software However it is difficult to control the fixed A D conversion rate unless another timer interrupt service routine is used to generate a fixed rate trigger 4 4 A D ...

Страница 24: ...ortb Base_addr 5 0x0f 6 Convert binary data to an integer value e g Data lowByte highByte 256 A D Data Format The range of A D data read from the FIFO port is from 0 to 4095 As the A D gain is 1 the A D signal range is roughly 10V 10V or 5V 5V bi polar and 0V 10V uni polar The relationship between the voltage and the value is shown in the following table Voltage Volts Bipolar Uni polar A D Data He...

Страница 25: ... between the A D data and the analog value is Direct Binary Coding Bipolar 10V Voltage AD_Data 20 4096 gain 10 gain Bipolar 5V Voltage AD_Data 10 4096 gain 5 gain Uni polar 10V Voltage AD_Data 10 4096 gain where the gain is 1 2 4 8 16 ...

Страница 26: ...he function reference manual of ACLS DLL2 is included in the ADLINK CD It needs license The DOS library includes 6 C language functions The functionality of these function calls can be classified to the following capabilities 1 Initialization setups the hardware base I O address and switches different cards 2 A D conversion performs analog to digital conversion In addition to the library some demo...

Страница 27: ...anguage Library The ACL 8113A s analog to digital conversion library was constructed to provide a simple programming interface for communicating with the ACL 8113A card The library provides easy to use functions which allow programmers to use the features of the card in a high level way The version of this library included in the diskette is DOS only To be compatible with the various compilers you...

Страница 28: ... initialized up to eight cards can be initialized in one system the card number must be 0 7 base_address this parameter tells the library which I O base address is jumper selected on the card Please refer to I O base address setting of ACL 8113A Ø Return Code ERR_NoRrror ERR_InvalidBoardNumber ERR_BaseAddressError Ø Example include 8113 h main int ErrCode Errcode _8113_Initial CARD_1 0x220 if ErrC...

Страница 29: ... be initialized Ø Syntax int _8113_ActCard_Set int card_number Ø Argument card_number The card number must be initialized up to 8 cards can be initialized in one system The valid vaule is from 0 to 7 Ø Return Code ERR_NoRrror ERR_InvalidBoardNumber ERR_BaseAddressError Ø Example include 8113 h main _8113_Initial CARD_1 0x210 _8113_Initial CARD_2 0x220 Assume NoError when Initialize ACL 8113A _8113...

Страница 30: ...r conversion _8113_Channel_Deselect removes a channel from the list of selected channles _8113_Channel_Clear clears all the channles from the list of slected list and no channel is selected _8113_ChannelNo_Get returns the number of selected channels Ø Syntax int _8113_Channel_Select int channel int _8113_Channel_Deselect int channel int _8113_Channel_Clear void int _8113_ChannelNo_Get int no Ø Arg...

Страница 31: ...ial value of gain is x1 which is set by the ACL 8113A hardware The relationships between gain and input voltage ranges are specified by following tables When input voltage range is set 10V JP1 and Bipolar mode JP2 the relationship between gain and input voltage range is listed in the following table Input Range V Gain Gain Code 5 V X 1 AD_GAIN_1 2 5 V X 2 AD_GAIN_2 1 25 V X 4 AD_GAIN_4 0 625 V X 8...

Страница 32: ..._GAIN_1 AD_GAIN_2 AD_GAIN_4 and AD_GAIN_8 Ø Return Code ERR_NoRrror ERR_InvalidBoardNumber ERR_BaseAddressError Ø Example include 8113 h main _8113_Initial CARD_1 0x220 Assume NoError when Initialize ACL 8113A _8113_Gain_Select AD_GAIN_8 printf The gain of AD channels is now 8 times n If the input range is biploar then the analog voltage is bewteen 0 625V ...

Страница 33: ...lected channels list Ø Syntax int _8113_AD_Aquire int channel int ad_data Ø Argument channel converted channel no ad_data 12 bits A D converted value the value should within 0 to 4095 Ø Return Code NoError Board_No_Init AD_Aquire_Time_Out Ø Example include 8113 h main int ad_data int ErrCode _8113_Initial CARD_1 0x220 Assume NoError when Initialize ACL 8113A _8113_ActCard_Set CARD_1 converter chan...

Страница 34: ...c Ø Syntax int _8113_MAD_Aquire Ø Return Code ERR_NoRrror ERR_InvalidBoardNumber ERR_BaseAddressError Ø Example include 8113 h main _8113_Initial CARD_1 0x220 Assume NoError when Initialize ACL 8113A _8113_ActCard_Set CARD_1 select CARD_1 as active card _8113_Channel_Select 3 printf AD channel 3 is now selected n _8113_Channel_Select 5 channel 5 is selected _8113_Channel_Select 7 channel 7 is sele...

Страница 35: ...nce the program is executed it will guide you to do the calibration This program is included in the delivered package 2 one 6 1 2 digit multimeter 3 a voltage calibrator or very stable and noise free DC voltage generator 6 2 VR Assignment There are four variable resistors VR on the ACL 8113A board to allow you making accurate adjustment on A D and D A channels The functionality of each VR is liste...

Страница 36: ...en 2047 and 2048 5 Set Gain as x1 and applied 5V voltage to AI0 Adjust VR2 until the reading of the A D conversion data flickers between 4094 and 4095 6 4 Uni polar A D Adjustment 1 Set jumper JP1 to 10V and JP2 to UN position 2 Short the A GND and AI0 Channel 0 analog input 3 Trim the VR3 until the reading of the A D conversion data flickers between 0000 and 0001 4 Set Gain as x1 and applied 10V ...

Страница 37: ...g its specifications or if the serial number has been removed Seller does not assume any liability for consequential damages as a result from our products uses and in any event our liability shall not exceed the original selling price of the equipment The equipment warranty shall constitute the sole and exclusive remedy of any Buyer of Seller sequipment and the sole and exclusive liability of the ...

Отзывы: