
ACLS-LVIEW2 VIs
for
LabVIEWâ for Windows
User Manual
Version 2.0, December 1996
ADLink Technology Inc.
All rights reserved
@Copyright 1996
All Rights Reserved.
Manual edition 2.0, December 1996
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.
In no event will the manufacturer be liable for direct, indirect, special, incidental, or consequential damages 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
IBM PC is a registered trademark of International Business Machines Corporation. Intel is a registered trademark of Intel Corporation. Other product names mentioned herein are used for identification purposes only and may be trademarks and/or registered trademarks of their respective companies.
Contents
AI : Single-Channel Single-Point Analog Input ( Voltage)
AI : Single-Channel Single-Point Analog Input ( reading)
AI : Multiple-Channel Single-Point Analog Input ( Reading)
AI : Acquire Multiple Waveforms
AO : Single-Immediate Voltage Updates
AO : Single-Immediate Current Updates
AO : Buffered Single Analog Output
Appendix B Error Code & AI range 4-1
1
Step 1.
Place the diskette in the appropriate 3.5" floppy drive ( i.e. A: or B:).
Step 2. Select [RUN...] item from [File] menu of Program Manager, and type the "Drive:\SETUP" in the dialog box. The Drive is the floppy drive where installation disk resides. Shown as following :

After typing the correct path name, you can press [OK] button to start the installation procedure.
Step 3.
When the following Dialog Box shown, you can press [Change] button to change the default ACLS-LVIEW2 directory from ALV2 to any directory you like.
After pressing [Finish] button, the installation disk will put ACLS-LVIEW2 VI library and demo programs to the directory you choose.
The default ACLS-LVIEW2 directory and files:
|
Files |
Default Directory |
Description |
|
ALV2_31.LLB |
C:\ALV2\W31 |
ACLS-LVIEW2 VI library includes all VIs needed for LabVIEW programming with ADLink DAQ Cards. ( for Windows 3.11 ver.) |
|
ALV2_31.DLL |
C:\ALV2\W31 |
The Windows DLL is used by ACLS-LVIEW2 VIs. |
|
Demo programs |
C:\ALV2\W31\DEMO-LV |
The demo programs show you how to use ALV2.LLB with ADLink DAQ Cards. |
|
ALV2_95.LLB |
C:\ALV2\W95 |
ACLS-LVIEW2 VI library includes all VIs needed for LabVIEW programming with ADLink DAQ Cards. ( for Windows 95 version) |
|
ALV2_95.DLL |
C:\ALV2\W95 |
The Windows DLL is used by ACLS-LVIEW2 VIs. |
|
Demo programs |
C:\ALV2\W95\DEMO-LV |
The demo programs show you how to use ALV2.LLB with ADLink DAQ Cards. |
|
ALV2_NT.LLB |
C:\ALV2\WNT |
ACLS-LVIEW2 VI library includes all VIs needed for LabVIEW programming with ADLink DAQ Cards. ( for Windows NT version) |
|
ALV2_NT.DLL |
C:\ALV2\WNT |
The Windows DLL is used by ACLS-LVIEW2 VIs. |
|
Demo programs |
C:\ALV2\WNT\DEMO-LV |
The demo programs show you how to use ALV2.LLB with ADLink DAQ Cards. |
ACLS-LVIEW2 VIs contains the following 27 functions:

When you select a function of this VIs, LabVIEW may prompt you the following dialog box for you to make sure the DLL it called. Just select the DASK.DLL in Windows directory.

2
The functionality of ACLS-LVIEW2 VIs can be classified to the following capabilities:
1. Card Configuration (Registration & Release):
- Setup hardware base I/O address and release the hardware.
2. Single/Multiple Channels Single-Point/Waveform AI:
-Perform single (multiple) channels analog to digital conversion.
3. Single Channel Single-Point/Waveform AO:
- Performs single channel digital to analog conversion.
4. Digital I/O & Timer/Counter:
- Input/Output digital signals
In addition, Total six demo programs are also included in the DEMO-LV directory. Thorough understanding of these demo programs will help you understand how to use the library more quickly. And you are welcome to modify the demo programs for your DAQ application needs.
Before the ACL DAS cards are operating, you have to configure the hardwae for each card. All the I/O port address ( base address), interrupt level ( IRQ), and DMA channel should be specified by the config VI for each DAS card.
An ACL-6126 card is configured according the corresponding base address. Every ACL-6126 multi-function data acquisition card have to be configured by this VI before using other VI.

base address : the I/O port base address of the card . See ACL-6126 manual for details. Make sure the hardware DIP switch setting for base address is the same as software setting.
error in : The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. The 6126 Config VI is often the first sub VI called in your diagram, and you may not need to wire this input. A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes, for a code descriptions.
cardID out : A numeric card id for the card configured. The range of cardID out is between 0 and 31. The value of this output terminal is used as the value of input terminal cardID in of other ACLS-LVIEW2 VIs.
error out : Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
An ACL-6128 card is configured according the corresponding base address. Every ACL-6128 analog output card have to be configured by this VI before using other VI.

base address : the I/O port base address of the card . See ACL-6128 manual for details.
error in : The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. The 6128 Config VI is often the first sub VI called in your diagram, and you may not need to wire this input. A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes, for a code descriptions.
cardID out : A numeric card id for the card configured. The range of cardID out is between 0 and 31. The value of this output terminal is used as the value of input terminal cardID in of other ACLS-LVIEW2 VIs.
error out : Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
An ACL-8111 card is configured according the corresponding base address and IRQ. Every ACL-8111 multi-function data acquisition card have to be configured by this VI before using other VI.

base address : the I/O port base address of the card. See ACL-8111 manual for details.
error in : The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. The 8111 Config VI is often the first sub VI called in your diagram, and you may not need to wire this input. A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes, for a code descriptions.
cardID out : A numeric card id for the card configured. The range of cardID out is between 0 and 31. The value of this output terminal is used as the value of input terminal cardID in of other ACLS-LVIEW2 VIs.
error out : Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
An ACL-8112DG card is configured according the corresponding base address and IRQ. Every ACL-8112DG multi-function data acquisition card have to be configured by this VI before using other VI.

base address : the I/O port base address of the card. See ACL-8112DG manual for details.
error in : The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. The 8112DG Config VI is often the first sub VI called in your diagram, and you may not need to wire this input. A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes, for a code descriptions.
cardID out : A numeric card id for the card configured. The range of cardID out is between 0 and 31. The value of this output terminal is used as the value of input terminal cardID in of other ACLS-LVIEW2 VIs.
error out : Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
An ACL-8112HG card is configured according the corresponding base address and IRQ. Every ACL-8112HG multi-function data acquisition card have to be configured by this VI before using other VI.

base address : the I/O port base address of the card. See ACL-8112HG manual for details.
error in : The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. The 8112HG Config VI is often the first sub VI called in your diagram, and you may not need to wire this input. A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes, for a code descriptions.
cardID out : A numeric card id for the card configured. The range of cardID out is between 0 and 31. The value of this output terminal is used as the value of input terminal cardID in of other ACLS-LVIEW2 VIs.
error out : Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
An ACL-8113 card is configured according the corresponding base address. Every ACL-8113 isolated analog input card have to be configured by this VI before using other VI.

base address : the I/O port base address of the card . See ACL-8113 manual for details.
error in : The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. The 8113 Config VI is often the first sub VI called in your diagram, and you may not need to wire this input. A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes, for a code descriptions.
cardID out : A numeric card id for the card configured. The range of cardID out is between 0 and 31. The value of this output terminal is used as the value of input terminal cardID in of other ACLS-LVIEW2 VIs.
error out : Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
An ACL-812PG card is configured according the corresponding base address and IRQ. Every ACL-812PG multi-function data acquisition card have to be configured by this VI before using other VI.

base address : the I/O port base address of the card. See ACL-812PG manual for details.
error in : The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. The 8112PG Config VI is often the first sub VI called in your diagram, and you may not need to wire this input. A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes, for a code descriptions.
cardID out : A numeric card id for the card configured. The range of cardID out is between 0 and 31. The value of this output terminal is used as the value of input terminal cardID in of other ACLS-LVIEW2 VIs.
error out : Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
There are at most 8 ADLink‘s data acquisition cards that can be configured to perform operation simultaneously. This function is used to tell system this card is not used currently and can be released. This would make room for new card to configured for operation.

cardID in : The card to be released.
error in : The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes, for a code descriptions.
error out : Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
6126, 6128, 8111, 8112DG, 8112HG, 8112PG, 8113
This section show you how to acquire analog input data through varios VIs :
* One-Stop Single Point : read one voltage or reading from an input channel or multiple input channels , and immediately retruns the value(s) to you.
* Buffering for Waveform : more than one reading on one or more input channel(s). The converted data taken at timed intervals from an ACL DAS card to a data buffer in memory.
AI : Single-Channel Single-Point Analog Input ( Voltage)
This function is used to poll the A/D conversion data from a channel. It is an immediate, non-buffered operation, No buffering or timing is required, so the analog input data can be acquired when you need one data point from one selected channel. It is very useful for monitoring a system periodically. The return value is in voltage.

cardID in : The card to be used for analog input. This terminal should be wired from an output terminal cardID out of a VI of ACLS-LVIEW2 VIs.
AI channel : channel to perform A/D conversion. The default input value is 0.
Range:
8111
8112DG, 8112HG, 8112PG, 812PG: 0 through 15
8113: 0 through 31
AI range : the analog input range the specified channel is setting. The possible values are listed below:
|
Value |
Range |
|
1 |
Bipolar -10V to +10V |
|
2 |
Bipolar -5V to +5V |
|
3 |
Bipolar -2.5V to +2.5V |
|
4 |
Bipolar -1.25V to +1.25V |
|
5 |
Bipolar -0.625V to +0.625V |
|
6 |
Bipolar -0.3125V to +0.3125V |
|
7 |
Bipolar -0.5V to +0.5V |
|
8 |
Bipolar -0.05V to +0.05V |
|
9 |
Bipolar -0.005V to +0.005V |
|
10 |
Bipolar -1V to +1V |
|
11 |
Bipolar -0.1V to +0.1V |
|
12 |
Bipolar -0.01V to +0.01V |
|
13 |
Unipolar 0 to +20V |
|
14 |
Unipolar 0 to +10V |
|
15 |
Unipolar 0 to +5V |
|
16 |
Unipolar 0 to +2.5V |
|
17 |
Unipolar 0 to +1.25V |
|
18 |
Unipolar 0 to +1V |
|
19 |
Unipolar 0 to +0.1V |
|
20 |
Unipolar 0 to +0.01V |
Valid value:
8111
: 2, 3, 4, 5, 68112DG, 8112PG, 812PG : 1, 2, 3, 4, 5, 6
8112HG: 1, 2, 7, 8, 9, 10, 11, 12, 14, 18, 19, 20
Note: If JP9 on the ACL-8112DG or ACL-812PG is set to ± 5V, then 1 (± 10V) is not allowed. If JP9 is set to ± 10V, then 6 (± 0.3125V) is not allowed.
8113: 1, 2, 3, 4, 5, 13, 14, 15, 16, 17
Note: Please check the setting of JP1 and JP2 on the ACL-8113 to make sure AI range is valid for the jumper setting. See ACL-8113 manual for detail.
The default input is 2 (± 5V).
error in : The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix , Error Codes, for a code descriptions.
cardID out : Has the same value as cardID in.
voltage : the floating-point voltage value measured on the specified AI channel, scaled to units of volts.
error out : Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
8111, 8112DG, 8112HG, 8112PG, 8113, 812PG
This function is used to poll the A/D conversion data from a channel. It is an immediate, non-buffered operation, No buffering or timing is required, so the analog input data can be acquired when you need one data point from one selected channel. It is very useful for monitoring a system periodically. For 12-bit A/D conversion, the return reading value is between 0 ~ 4095.

|
|
Card number: |
The card id of the card that want to perform this operation.
|
|
|
AI Channel: |
analog input channel number. Range: 711B, 8111: 0 throygh 7 8112PG, 8112DG, 8112HG, 812PG: 0 through 15 813, 8113: 0 through 31
|
|
|
AI Range: |
the analog input range the specified channel is setting. For more information, please refer to Table B of the Appendix.
|
|
|
Error In: |
The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix , Error Codes, for a code descriptions.
|
|
|
Card number: |
has the same number as card number. |
|
|
Reading: |
the 12-bit A/D converted value. The value should range from 0 to 4095.
|
|
|
Error Out: |
Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
|
711B, 812PG, 813, 8111, 8112DG, 8112HG, 8113
Note :
This function can be combined with AI Scale functions. You can translate the reading value to voltage value.
The reading values on several channels are retrun to you at one time. The DAS card executes a scan across each of the specified channel and retrun the reading values. The values is between 0-4095, and stored in an integer array.

|
|
Card number: |
The card id of the card that want to perform this operation.
|
|
|
Number of Channels: |
The number of analog input ranges in the array AD Range.
|
|
|
Channels: |
array of analog input channel numbers. Range: 711B, 8111: 0 through 7 812PG, 8112DG, 8112HG: 0 through 15 813, 8113: 0 through 31
|
|
|
AD Range: |
an integer array of length number of Channels that contains the analog input ranges used to scale the binary values in the array readings. For more information, please refer to Table B of the Appendix.
|
|
|
Error In: |
The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix , Error Codes, for a code descriptions.
|
|
|
Card number: |
has the same number as card number. |
|
|
Reading: |
the array used to store the 12-bit converted binary values from each analog input channel. The elements of reading should range from 0 to 4095.
|
|
|
Error Out: |
Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
|
711B, 812PG, 813, 8111, 8112DG, 8112HG, 8113
Note :
This function can be combined with AI Scale functions. You can translate the reading value to voltage value.
This function performs continuous A/D conversions on the specified analog input channel at a rate as close to the rate you specified. This VI has the number of inputs to acquire a waveform from a single channel. These inputs are waveform ( memory buffer), size of the buffer, sample rate, A/D input range ( gain), and mode, etc.
Note : The data saved in buffer is a reading value ( 0~4095). It is not a voltage value. You can change these reading values to voltage value by using the AI Scale VI. ( Refer to page ).

|
|
Card number: |
The card id of the card that want to perform this operation.
|
||
|
|
Channel: |
analog input channel number Range: 711B, 8111: 0 through 7 812PG, 8112DG, 8112HG: 0 through 15
|
||
|
|
ad_range: |
the analog input range the specified channel is setting. For more information, please refer to Table B of the Appendix.
|
||
|
|
Count: |
If double-buffered mode is disabled, count is the number of A/D conversions to be performed. For double-buffered acquisition, count is the length of circular buffer and its value must be even.
|
||
|
|
Sample_rate: |
the sample rate you want for analog input in hertz (points per second). Your maximum rate depends on the card type and your computer system. If you set A/D trigger mode as external trigger (EXT_TRIGGER) by calling AI Cont Config VI, the sample rate is determined by an external trigger source, you can ignore this parameter. |
||
|
|
Error In: |
The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes, for a code descriptions.
|
||
|
|
Card number: |
The same number as card number. |
||
|
|
Buffer: |
an integer array to contain the acquired data. buffer must has a length equal to or greater than the value of parameter count. If double-buffered mode is enabled, this buffer is used as circular buffer. |
||
|
|
Error Out: |
Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI. |
||
Cards Support
: 711B, 812PG, 8111, 8112DG, 8112HG
AI : Acquire Multiple Waveforms
This function performs continuous A/D conversions on the specified analog input channels at a rate as close to the sampling rate you specified. All data will be saved in a single arrary ( buffer).

|
|
Card number: |
The card id of the card that want to perform this operation.
|
|
|
NumChans: |
the number of analog input channels in the array chans.
|
|
|
Chans: |
array of analog input channel numbers. Range: 711B, 8111: 0 through 7 812PG, 8112DG, 8112HG: 0 through 15
|
|
|
Ad_range: |
an integer array of length numChans that contains the analog input range for each channel in array chans. For more information, please refer to Table B of the Appendix.
|
|
|
Count: |
If double-buffered mode is disabled, count is the number of A/D conversions to be performed. For double-buffered acquisition, count is the length of circular buffer and its value must be even.
|
|
|
Sample_rate: |
the sample rate you want for analog input in hertz (points per second). Your maximum rate depends on the card type and your computer system. If you set A/D trigger mode as external trigger (EXT_TRIGGER) by calling AI Cont Config VI, the sample rate is determined by an external trigger source, you can ignore this parameter.
|
|
|
Scan_rate: |
the rate for a scan (samples all specified channels one time), that is, the sample rate for every single channel's acquired data.
|
|
|
Error In: |
The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix , Error Codes, for a code descriptions.
|
|
|
Card number: |
has the same number as card number. |
|
|
Buffer: |
an integer array to contain the acquired data. buffer must has a length equal to or greater than the value of parameter count. The acquired data is stored in interleaved sequence. For example, if the value of numChans is 2, the channel numbers in chans are 0 and 1, then this function input data from channel 0, then channel 1, then channel 0, then channel 1, ... The data acquired is put to buffer by order. So the data read from channel 0 is stored in buffer[0], buffer[2], buffer[4], ... The data from channel 1 is stored in buffer[1], buffer[3], buffer[5], ... If double-buffered mode is enabled, this buffer is used as circular buffer.
|
|
|
Error Out: |
Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
|
Cards Support :
711B, 812PG, 8111, 8112DG, 8112HG
Informs DASK library of the transfer mode, and trigger mode selected for the card with card ID card_number. You must call this function before calling function to perform continuous analog input operation. If you changed the jumpers that affect the analog input configuration, this function is also need to be called.

|
|
Card number: |
The card id of the card that want to perform this operation.
|
||
|
|
xfer_mode: |
This parameter indicates the transfer mode of continuous analog input. Valid values: 711B, 8111: INTERRUPT 812PG, 8112DG, 8112HG: INTERRUPT and DMA. Note: For 812PG, 8112DG, and 8112HG, this parameter must be the same as jumpers JP6 and JP7 selected on the card.
|
||
|
|
trig_mode: |
The continuous A/D conversion trigger source. Valid values: INT_TRIGGER: on-board programmable pacer EXT_TRIGGER: external pulse signal Note: For 812PG, 8112DG, and 8112HG, this parameter must be the same as jumper JP1 selected on the card.
|
||
|
|
Error In: |
The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix , Error Codes, for a code descriptions.
|
||
|
|
Card number: |
has the same number as card number. |
||
|
|
Error Out: |
Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
|
||
711B, 812PG, 8111, 8112DG, 8112HG
Converts the 12-bit binary result from an AI Read Single Channel VI to the actual input voltage.

|
|
Card number: |
The card id of the card that want to perform this operation.
|
|
|
Ad_range: |
the analog input range used to scale the binary value. For more information, please refer to Table B of the Appendix.
|
|
|
Reading: |
12-bit A/D conversion value returned by AI Read Single Channel VI.
|
|
|
Error In: |
The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix , Error Codes, for a code descriptions.
|
|
|
Card number: |
has the same number as card number. |
|
|
Voltage: |
the input voltage converted from parameter reading.
|
|
|
Error Out: |
Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
|
711B, 812PG, 813, 8111, 8112DG, 8112HG, 8113
Converts the values of an array of 12-bit binary data to the actual input voltages.

|
|
Card_number: |
The card id of the card that want to perform this operation.
|
|
|
NumChans: |
he number of analog input ranges in the array ad_range.
|
|
|
ad_range: |
an integer array of length numChans that contains the analog input ranges used to scale the binary values in the array readings. For more information, please refer to Table B of the Appendix.
|
|
|
Count: |
the total number of points in array readings.
|
|
|
Readings: |
array of 12-bit binary values. The binary values should be arranged in interleaved sequence. For example, if numChans is 2, range values in ad_range are AD_B_5_V and AD_B_10_V, then readings[0] is scaled with AD_B_5_V, readings[1] is scaled with AD_B_10_V, readings[2] is scaled with AD_B_5_V, readings[3] is scaled with AD_B_10_V, ...
|
|
|
Error In: |
The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix , Error Codes, for a code descriptions.
|
|
|
Card number: |
has the same number as card number. |
|
|
Voltages: |
an array of floating-point voltage values that correspond to the input voltage measured.
|
|
|
Error Out: |
Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
|
711B, 812PG, 813, 8111, 8112DG, 8112HG, 8113
This section show you how to generate analog ouptut through varios VIs :
* One Point Output :
change the output voltage only as fast as VI is called.* Buffered Analog Output: change the output voltage using buffered analog updates.
AO : Single-Immediate Voltage Updates
This function is used to write data to D/A converters.

cardID in : The card to be used for analog output. This terminal should be wired from an output terminal cardID out of a VI of ACLS-LVIEW2 VIs.
AO channel : The AO channel number. The default value is 0.
Range:
6126: 0 through 5
8111: 0
6128, 8112DG, 8112HG, 812PG: 0 through 1
AO voltage : The floating-point voltage value to be scaled and written to AO channel. The voltage value must be within the range of analog output range specified by parameter AO range.
AO range : The analog output range is jumper selected on the card. This value must be set correctly or the output AO voltage will be incorrect. The possible values are listed below:
Value |
Range |
1 |
Bipolar -10V to +10V |
2 |
Bipolar -5V to +5V |
3 |
Unipolar 0 to +10V |
4 |
Unipolar 0 to +5V |
6126, 6128: 1, 2, 3, or 4
8111, 8112DG, 8112HG, 812PG: 3 or 4
error in : The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix , Error Codes, for a code descriptions.
cardID out : Has the same value as cardID in.
error out : Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
6126, 6128, 8111, 8112DG, 8112HG, 812PG
AO : Single-Immediate Current Updates
This function is used to analog output current. The resolution of analog output channel is 12-bit, the current range is from 4mA to 20mA or 0 to 20mA.

cardID in : The card to be used for analog output. This terminal should be wired from an output terminal cardID out of a VI of ACLS-LVIEW2 VIs.
AO channel : The AO channel number. The default value is 0.
Range:
6126: 0 through 5
6128: 0 through 1
current range : The current range is jumper selected on the card. This value must be set correctly or the output AO current will be incorrect. The possible values are listed below:
Value |
Range |
0 |
4mA to 20mA |
1 |
0 to 20 mA |
6126: 0
6128: 0 or 1
AO current : the floating-point current value to be scaled and written to AO channel.
error in : The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix , Error Codes, for a code descriptions.
cardID out : Has the same value as cardID in.
error out : Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
6126, 6128
AO : Buffered Single Analog Output
This function continuously writes binary values that stored in buffer to the specified analog output channel at a rate as close to the rate you specified.
AO Cont Write Channel VI will wait for operation completion before returning (that is, it is synchronous).

|
|
Card number: |
The card id of the card that want to perform this operation.
|
||
|
|
AO Channel: |
analog output channel number Range: 6126: 0 through 5 8111: 0 6128, 8112DG, 8112HG, 812PG: 0 through 1
|
||
|
|
Buffer: |
an array of binary values to be written to the analog channel
|
||
|
|
Count: |
the number of points in buffer.
|
||
|
|
Iterations: |
the number of times the data in buffer to output to channel. A value of 0 means that analog output operation proceeds indefinitely.
|
||
|
|
Rate: |
the rate of analog output in hertz (points per second). A value of 0 for rate means that an external trigger will determine the analog output rate. Your maximum rate depends on the card type and your computer system. With the value of greater than 0, if there is jumper for trigger source, please make sure it is set to be internal trigger.
|
||
|
|
Synch_mode: |
whether this operation is performed synchronously or asynchronously. Valid values: SYNCH_OP: synchronous D/A conversion, that is, the function does not return until the analog output operation complete. ASYNCH_OP: asynchronous D/A conversion.
|
||
|
|
Error In: |
The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix , Error Codes, for a code descriptions.
|
||
|
|
Card number: |
has the same number as card number. |
||
|
|
Error Out: |
Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
|
||
711B, 812PG, 8111, 8112DG, 8112HG
This function continuously writes binary values that stored in buffer to the specified analog output channels.
AO Cont Write Multiple Channels VI will wait for operation completion before returning (that is, it is synchronous).

|
|
Card number: |
The card id of the card that want to perform this operation.
|
||
|
|
NumChans: |
the number of analog output channels in the array chans.
|
||
|
|
chans: |
array of channel numbers. Range of channel number: 6126: 0 through 5 8111: 0 6128, 8112DG, 8112HG, 812PG: 0 through 1
|
||
|
|
Buffer: |
This is an array of binary values used to store the data to be written to the analog channels. You should arrange the data in interleaved sequence. For example, if the channel numbers in chans are 0 and 1, then buffer[0] is written to channel 0, buffer[1] is written to channel 1, buffer[2] is for channel 0, buffer[3] is for channel 1, ...
|
||
|
|
Count: |
the number of points in buffer. count should be a multiple of numChans.
|
||
|
|
Iterations: |
the number of times the data in buffer to output to channels. A value of 0 means that analog output operation proceeds indefinitely.
|
||
|
|
Rate: |
the rate of analog output in hertz (points per second). A value of 0 for rate means that an external trigger will determine the analog output rate. Your maximum rate depends on the card type and your computer system. With the value of greater than 0, if there is jumper for trigger source, please make sure it is set to be internal trigger.
|
||
|
|
Synch_mode: |
whether this operation is performed synchronously or asynchronously. Valid values: SYNCH_OP: synchronous D/A conversion, that is, the function does not return until the analog output operation complete. ASYNCH_OP: asynchronous D/A conversion.
|
||
|
|
Error In: |
The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes, for a code descriptions.
|
||
|
|
Card number: |
has the same number as card number. |
||
|
|
Error Out: |
Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
|
||
711B, 812PG, 8111, 8112DG, 8112HG
This section show you how to control digital inputs and outputs through varios VIs :
The digital I/O are specified by line and port. The line means single digital input or output signal, all digital lines are grouped into ports on the ACL DAS devices. Each 8 digital lines in the ACL cards are grouped into a port. In the digital Vis, both digital line and port control are supported.
* One Line Digital I/O : change the output voltage only as fast as VI is called.
* One Port Digital I/O: change the output voltage uses buffered analog updates.
This function is used to read the digital logic state of the specified digital line in the specified port.

cardID in : The card to be used for digital input. This terminal should be wired from an output terminal cardID out of a VI of ACLS-LVIEW2 VIs.
port : To indicate which port is read. The valid input values are 0 or 1 for 6126, 8111, 8112DG, 8112HG, and 812PG. The default input is port 0.
line : The digital line to be read. The valid value of line is 0 through 7. The default input is line 0.
error in : The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes, for a code descriptions.
cardID out : Has the same value as cardID in.
DI data : Returns the digital logic state, 0 or 1, of the specified line.
error out : Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
6126, 8111, 8112DG, 8112HG, 812PG
This function is used to read data from digital input port.

cardID in : The card to be used for digital input. This terminal should be wired from an output terminal cardID out of a VI of ACLS-LVIEW2 VIs.
port : To indicate which port is read. The valid input values are 0 or 1 for 6126, 8111, 8112DG, 8112HG, and 812PG. The default input is port 0.
error in : The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes, for a code descriptions.
cardID out : Has the same value as cardID in.
DI data : The 8-bit digital data read from digital port.
error out : Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
Cards Support
6126, 8111, 8112DG, 8112HG, 812PG
This function is used to set the specified digital output line in the specified digital port to the specified state.

cardID in : The card to be used for digital output. This terminal should be wired from an output terminal cardID out of a VI of ACLS-LVIEW2 VIs.
port : To indicate which port is data written to. The valid range is 0 or 1 for 6126, 8111, 8112DG, 8112HG, and 812PG. The default input is port 0.
DO data : the new digital logic state, 0 or 1.
error in : The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix , Error Codes, for a code descriptions.
cardID out : Has the same value as cardID in.
error out : Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
Cards Support 6126, 8111, 8112DG, 8112HG, 812PG
This function is used to write data to digital output ports.

cardID in : The card to be used for digital output. This terminal should be wired from an output terminal cardID out of a VI of ACLS-LVIEW2 VIs.
port : To indicate which port is data written to. The valid range is 0 or 1 for 6126, 8111, 8112DG, 8112HG, and 812PG. The default input is port 0.
DO data : The value that will be written to digital output port.
error in : The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes, for a code descriptions.
cardID out : Has the same value as cardID in.
error out : Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
Cards Support 6126, 8111, 8112DG, 8112HG, 812PG
This section show you how to control timer/counter function through varios VIs. Most of ACL multiple function card, a free counter is available for customer to use freely. You can use the following VI to control this counter.
Reads the current contents of the selected counter without disturbing the counting process.
|
|
card number: |
The card id of the card that want to perform this operation.
|
|
|
Ctr: |
the counter number. Range: 0 through 2.
|
|
|
Error In: |
The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes, for a code descriptions.
|
|
|
Card number: |
has the same number as card number.
|
|
|
Count: |
returns the current count of the specified counter. Range: 0 through 65536 for binary mode (default). 0 through 9999 for BCD counting mode.
|
|
|
Error Out: |
Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI. |
711B, 812PG, 8111, 8112DG, 8112HG
Sets the output of the selected counter to the specified state.

|
|
Ctr: |
the counter number. Range: 0 through 2.
|
||
|
|
state: |
the logic state to which the counter is to be reset. Range: 0 or 1.
|
||
|
|
Error In: |
The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes, for a code descriptions.
|
||
|
|
Card number: |
The same number as card number. |
||
|
|
Error Out: |
Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
|
||
Cards Support
711B, 812PG, 8111, 8112DG, 8112HG
Configures the selected counter to operate in the specified mode.

|
|
card number: |
The card id of the card that want to perform this operation.
|
|
|
Ctr: |
the counter number. Range: 0 through 2.
|
|
|
mode: |
the mode in which the counter is to operate. Valid value: TOGGLE_OUTPUT (0) PROG_ONE_SHOT (1) RATE_GENERATOR (2) SQ_WAVE_RATE_GENERATOR (3) SOFT_TRIG (4) HARD_TRIG (5)
|
|
|
count: |
The period from one output pulse to the next.
|
|
|
BinBcd: |
Whether the counter operates as a 16-bit binary counter or as a 4-decade binary-coded decimal (BCD) counter. Valid value: BIN: 16-bit binary counter. BCD: 4-decade BCD counter.
|
|
|
Error In: |
The error conditions occurring before this VI executes. This code default to no error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes, for a code descriptions.
|
|
|
Card number: |
has the same number as card number. |
|
|
Error Out: |
Error code. If the error in indicated an error, the error out contains the same value. Otherwise, error out describes the error status of this VI.
|
Cards Support
711B, 812PG, 8111, 8112DG, 8112HGThere are several demo. programs based on ACL VI(s) in LabVIEW 4.0 environment. The filename and its description are listed as follows.
|
Filename |
Description |
|
DEMO.VI |
An generic demostration, all functions of the ACL-8112PG are included, such as A/D, D/A, DI, and DO, etc.. |
|
DEMO-AD.VI |
A demostration of Single-Channel, Single-Point Analog Input |
|
DEMO-ADM.VI |
A demostration of Nultiple-Channel, Single-Point Analog Input |
|
DEMO-WAV.VI |
A demostration of Single Wareform Analog Input |
|
DEMO-WAM.VI |
A demostration of Multiple Wareforms Analog Input |
|
DEMO-CRT.VI |
A demostration of Timer/Counter |
The diagram of each demo. program are listed as below :
1. DEMO.VI

2. DEMO_AD.VI

3. DEMO_ADM.VI

4.DEMO_WAV.VI
5. DEMO_WAM.VI

6. DEMO_CRT.VI

Appendix B Error Code and AI Range
Table A. The Error Code for ACLS-LVIEW2 VIs.
|
Code |
Name |
Description |
|
0 |
NoError |
No error occurred |
|
-2 |
BadBaseAddress |
The base address is not valid. |
|
-3 |
TooManyRegisteredCards |
There have been 32 cards that were configured. |
|
-4 |
CardNotRegistered |
No card is configured successfully as the id as the value of input terminal cardID in. |
|
-6 |
InvalidVoltageRange |
The value of input terminal A/D voltage range is invalid. |
|
-7 |
InvalidADRange |
The value of input terminal AI range is invalid. |
|
-8 |
InvalidDARange |
The value of input terminal AO range is invalid. |
|
-9 |
InvalidADChannel |
The value of input terminal AI channel is out of range. |
|
-10 |
InvalidDAChannel |
The value of input terminal AO channel is out of range. |
|
-11 |
ADTimeOut |
A/D conversion not completed in specific time. |
|
-23 |
InvalidDIOPort |
The value of input terminal port is out of range. |
Table B. The Analog Input Range of ADLink Card
|
AD_B_10_V |
Bipolar -10V to +10V |
|
AD_B_5_V |
Bipolar -5V to +5V |
|
AD_B_2_5_V |
Bipolar -2.5V to +2.5V |
|
AD_B_1_25_V |
Bipolar -1.25V to +1.25V |
|
AD_B_0_625_V |
Bipolar -0.625V to +0.625V |
|
AD_B_0_3125_V |
Bipolar -0.3125V to +0.3125V |
|
AD_B_0_5_V |
Bipolar -0.5V to +0.5V |
|
AD_B_0_05_V |
Bipolar -0.05V to +0.05V |
|
AD_B_0_005_V |
Bipolar -0.005V to +0.005V |
|
AD_B_1_V |
Bipolar -1V to +1V |
|
AD_B_0_1_V |
Bipolar -0.1V to +0.1V |
|
AD_B_0_01_V |
Bipolar -0.01V to +0.01V |
|
AD_U_20_V |
Unipolar 0 to +20V |
|
AD_U_10_V |
Unipolar 0 to +10V |
|
AD_U_5_V |
Unipolar 0 to +5V |
|
AD_U_2_5_V |
Unipolar 0 to +2.5V |
|
AD_U_1_25_V |
Unipolar 0 to +1.25V |
|
AD_U_1_V |
Unipolar 0 to +1V |
|
AD_U_0_1_V |
Unipolar 0 to +0.1V |
|
AD_U_0_01_V |
Unipolar 0 to +0.01V |
Valid value:
711B, 8111
8112PG, 8112DG: AD_B_10_V, AD_B_5_V, AD_B_2_5_V, AD_B_1_25_V, AD_B_0_625_V, and AD_B_0_3125_V
Note: If JP9 on the card is set to +-5V, then AD_B_10_V is not allowed. If JP9 is set to +-10V, then AD_B_0_3125_V is not allowed.
8112HG: AD_B_5_V, AD_B_0_5_V, AD_B_0_05_V, AD_B_0_005_V, AD_B_10_V, AD_B_1_V, AD_B_0_1_V, AD_B_0_01_V, AD_U_10_V, AD_U_1_V, AD_U_0_1_V, and AD_U_0_01_V
813, 8113: AD_B_10_V, AD_B_5_V, AD_B_2_5_V, AD_B_1_25_V, AD_B_0_625_V, AD_U_20_V, AD_U_10_V, AD_U_5_V, AD_U_2_5_V, and AD_U_1_25_V
Note: Please check the setting of JP1 and JP2 on the card to make sure ad_range is valid for the jumper setting. See ACL-813 or ACL-8113 manual for detail.


©1995 Circuit Specialists, Inc.