ACL-DASK

User Manual

for PC Compatibles

Version 1.1

 

@Copyright 1995

All Rights Reserved.

Manual edition 30, Auguest 1995

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

How to Use This Manual

1. Introduction to ACL-DASK

1.1 About the ACL-DASK Software

1.2 ACL-DASK Hardware Support

1.3 ACL-DASK Language Support

1.4 ACL-DASK Installation

1.4.1 Installing ACL-DASK/DOS

1.4.2 Installing ACL-DASK/Windows

1.5 The Fundamentals of Building DOS Application with ACL-DASK/DOS

1.5.1 Creating a DOS ACL-DASK Application Using

Microsoft C/C++

1.5.2 Creating a DOS ACL-DASK Application Using

Borland C++

1.6 The Fundamentals of Building Windows Application with ACL-DASK/Windows

1.6.1 Creating a Windows ACL-DASK Application Using

Microsoft C/C++ and Windows SDK

1.6.2 Creating a Windows ACL-DASK Application Using

Microsoft Visual Basic

2. ACL-DASK Overview

2.1 General Configuration Function Group

2.2 Analog Input Function Group

2.2.1 Analog Input Configuration Functions

2.2.2 One-Shot Analog Input Functions

2.2.3 Continuous Analog Input Functions

2.2.4 Asynchronous Analog Input Monitoring Functions

2.3 Analog Output Function Group

2.4 Digital I/O Function Group

2.5 Timer/Counter Function Group

3. Function Description

3.1 Data Types

3.2 Function Reference

4. Sample Programs

Appendix A: Status Codes

Appendix B: Function Support

 

 

 

How to Use This Manual

This manual is designed to help you use the ACL-DASK software driver for ADCLONE's data acquisition cards. The manual describes how to install and use the software library to meet your requirements and help you program your own software application. It is divided into five chapters:

Chapter 1, "Introduction to ACL-DASK" describes how to install the software and how to program your application by using ACL-DASK.

Chapter 2, "ACL-DASK Overview" describes the classes of functions in ACL-DASK and briefly describes each function.

Chapter 3, "Function Reference" contains detailed descriptions of ACL-DASK functions.

Chapter 4, "Sample Programs" describes some sample programs in the software diskette.

 

 

 

1

Introduction to ACL-DASK

1.1 About the ACL-DASK Software

 

ACL-DASK is software driver for ACL-series data acquisition cards. It includes two versions, ACL-DASK/DOS and ACL-DASK/Windows. It is a high performance data acquisition driver for developing custom applications under DOS and Windows 3.1.

 

Built into this software are sophisticated memory and data buffer management capabilities that free developers from having to deal with those complex issues. That is, ACL-DASK is constructed to provide a simple programming interface for communication with the ACL-series data acquisition cards. The easy to use functions provided by ACL-DASK allow a programmer to use the features of the card in a high level way.

 

Using ACL-DASK/Windows also lets you take advantage of the power and features of Microsoft Windows for your data acquisition application. These include running multiple

applications and using extended memory. Also, Visual Basic and ACL-DASK/WIndows make it easy to create custom user interfaces and graphics.

 

In addition to the software drivers, some demonstration programs are also provided; you can refer to it and save a lot of programming time and get some other benefits as well.

 

 

1.2 ACL-DASK Hardware Support

 

ADLink will periodically upgrades ACL-DASK to add support for new ACL series data acquisition cards. This release of ACL-DASK supports the following hardware:

 

· ACL-720 : 32 Digital I/O and 3 timer/counter Card

· ACL-722 : 144 Digital I/O Card

· ACL-724 : 24 Digital I/O Card

· ACL-725 : 8 Relay Actuactor & Isolated Digital Input

· ACL-725B : 16 Relay Actuactor & Isolated Digital Input

· PET-48DIO : 48 Digital I/O with Timer/Counter

· ACL-726 : 6-CH Analog Output Card

· ACL-711B : Multi-function DAS Card

· ACL-812PG : Advanced Multi-function Card

· ACL-813 : 32-CH Isolated Analog Input Card

· ACL-7120 : 32 Digital I/O and 6 timer/counter Card

· ACL-7122 : 144 Digital I/O Card

· ACL-7124 : 24 Digital I/O Card

· ACL-7125 : 8 Relay Actuactor & Isolated Digital Input

· ACL-7225 :16 Relay Actuactor & Isolated Digital Input

· ACL-6126 : 6-CH Analog Output Card

· ACL-8111 : Multi-function DAS Card

· ACL-8112DG : Advanced Multi-function Low Gain DAS Card

· ACL-8112HG : Advanced Multi-function High Gain DAS Card

· ACL-8113 : 32-CH Isolated Analog Input Card

 

1.3 ACL-DASK Language Support

ACL-DASK/DOS supports the following languages under DOS:

 

· Microsoft C 5.0, 5.1, 6.0, 7.0, and 8.0

· Borland C++ ?

 

ACL-DASK/Windows is DLL (Dynamic-Link Library) version for use under Windows. It can work with any Windows programming language that allows calls to a DLL, such as Microsoft C/C++, Microsoft Visual Basic.

 

1.4 ACL-DASK Installation

Backup Your Disk

The diskette of ACL-DASK is in DOS format which is compatible with DOS 3.0 or higher reversions. It is advisable to make a back up copy before using the software.

 

For a direct back up, use the DOS DISKCOPY or alternatively XCOPY *.* to a pre-formatted disk. The back up procedures are specified as follows:

 

step 1. Insert "ACL-DASK" diskette into floppy drive A:

 

step 2. Insert your back-up diskette into floppy drive B:

 

step 3. XCOPY A: *.* B: /s or

DISKCOPY A: B:

 

1.4.1 Installing ACL-DASK/DOS

System Requirements

 

ACL-DASK/DOS requires the following minimum configuration:

· An IBM PC/AT or compatibles, running MS-DOS version 5.0 or later

· An 80386 or higher processor

· Four megabytes of available memory

· A hard disk with enough disk space to install ACL-DASK

· A 1.44-MB, 3.5-inch disk drive.

· Application development system: Microsoft C/C++ or Borlabd C++.

· ADCLONE's data acquisition cards that ACL-DASK supports.

Installation

 

The Setup program provided by ACL-DASK/DOS performs all tasks necessary for installing the components.

 

step 1. Place the diskette in the appropriate 3.5" floppy drive

( A: or B:).

 

step 2. Typing the A:\SETUP or B:\SETUP in the DOS prompt.

 

1.4.2 Installing ACL-DASK/Windows

System Requirements

 

ACL-DASK/Windows requires the following minimum configuration:

· An IBM PC/AT or compatibles, running MS-DOS version 5.0 or later

· An 80386 or higher processor

· Four megabytes of available memory

· A hard disk with enough disk space to install ACL-DASK

· A 1.44-MB, 3.5-inch disk drive.

· Microsoft Windows 3.1

· Application development system: Any Windows programming language that allows calls to a DLL, such as Microsoft C/C++, Microsoft Visual Basic.

· ADCLONE's data acquisition cards that ACL-DASK supports.

 

Installation

 

The Setup program provided by ACL-DASK/Windows performs all tasks necessary for installing the components.

 

step 1. Place the diskette in the appropriate 3.5" floppy drive

( A: or B:).

 

step 2. If Windows is loaded, choose Run from the Program Manager File menu.

 

step 3. Typing the A:\SETUP or B:\SETUP in the Run dialog box.

 

 

Setup first displays a dialog box for you to enter information such as your ACL-DASK's serial number, your company name, and your name. You can find the serial number on the label of the ACL-DASK diskette.

 

 

 

 

After entering the above information, Setup prompt the following dialog box for you to specify the drive and path of the ACL-DASK souce files. Default path for source files ( A:\ ) is showed in edit box; if A: is the drive the source diskette placed, you don't need to change the path, just click Continue button to continue the setup process; otherwise, you have to change the path before continuing Setup.

 

 

 

Then you have to specify the directory for ACL-DASK. The default path is C:\DASK.

 

 

 

 

By default, Setup installs most of the files in C:\DASK. When you have completed the installation process, the DASK directory should contain the following files and subdirectories:

 

File/Subdirectory

Description

726 <DIR>

The source for ACL-726 software driver

711B <DIR>

The source for ACL-711B software driver

812PG <DIR>

The source for ACL-812PG software driver

LIB <DIR>

ACL-DASK import libraries and DLLs

INCLUDE <DIR>

Include files for application

programming. DLL2.BAS for Visual Basic Programming. 726.H, 711B.H, and 812PG.H for Microsoft C/C++ and SDK programming.

SAMPLES\VB\726 <DIR>

ACL-726 Visual Basic sample program

SAMPLES\VB\711B <DIR>

ACL-711B Visual Basic sample program

SAMPLES\VB\812PG <DIR>

ACL-812PG Visual Basic sample program

SAMPLES\SDK\726 <DIR>

ACL-726 Microsoft C/C++ sample program

 

 

Setup also copies the following files to Windows System directory ( default is C:\WINDOWS\SYSTEM ):

 

· ACL-DASK/Windows software driver --- DASK.DLL

· Visual Basic custom controls that Visual Basic sample programs need --- SPIN.VBX and THREED.VBX

· 711DEMO.DLL, 812DEMO.DLL --- Demo drivers for ACL-711B and ACL-812PG Visual Basic sample programs

1.5 The Fundamentals of Building DOS Application with ACL-DASK/DOS

1.5.1 Creating a DOS ACL-DASK Application Using Microsoft C/C++

 

To create a DOS data acquisition application using ACL-DASK/DOS and Microsoft C/C++, follow these steps:

 

step 1. Prepare C/C++ source files.

 

The source files should contain the WinMain function, window functions, and other application code.

 

step 2. Include header file DASK.H into C/C++ source file.

 

DASK.H contains all the function declarations and constants that you can use to develop your data acquisition application. Use '#include' declarative to include header files.

 

step 3. Compile and link all C/C++ sources.

 

Compile your source files with the Microsoft C/C++ compiler. The following shows a typical CL command for compiling a source file:

 

cl -c -AL -W2 -Ic:\dask\include source_file

 

The -I option cause the compiler to search the directory you specify for include files. Place the directory that contains the ACL-DASK's include files after -I. The default directory to place these include files is C:\DASK\INCLUDE. After finish compiling all the source files, link the source files with C/C++ run-time libraries, and most importantly, ACL-DASK/DOS software library DASK.LIB. For example, suppose your source files are DA1.C and DA2.C; the executable made is named DA.EXE.

 

link /NOD DA1.OBJ DA2.OBJ, DA.EXE,,

C:\DASK\LIB\DASK,,

( please make it as one line )

 

You have to specify the full path of DASK.LIB. By default, it is located in C:\DASK\LIB. This link command would produce DA.EXE executable.

 

1.5.2 Creating a DOS ACL-DASK Application Using Borland C++

 

To create a DOS data acquisition application using ACL-DASK/DOS and Borland C++, follow these steps:

 

step 1. Prepare C/C++ source files.

 

The source files should contain the WinMain function, window functions, and other application code.

 

step 2. Include header file DASK.H into C/C++ source file.

 

DASK.H contains all the function declarations and constants that you can use to develop your data acquisition application. Use '#include' declarative to include header files.

 

step 3. Compile and link all C/C++ sources.

 

Compile your source files with the Microsoft C/C++ compiler. The following shows a typical CL command for compiling a source file:

 

cl -c -AL -W2 -Ic:\dask\include source_file

 

The -I option cause the compiler to search the directory you specify for include files. Place the directory that contains the ACL-DASK's include files after -I. The default directory to place these include files is C:\DASK\INCLUDE. After finish compiling all the source files, link the source files with C/C++ run-time libraries, and most importantly, ACL-DASK/DOS software library DASK.LIB. For example, suppose your source files are DA1.C and DA2.C; the executable made is named DA.EXE.

 

link /NOD DA1.OBJ DA2.OBJ, DA.EXE,,

C:\DASK\LIB\DASK,,

( please make it as one line )

 

You have to specify the full path of DASK.LIB. By default, it is located in C:\DASK\LIB. This link command would produce DA.EXE executable.

 

1.6 The Fundamentals of Building Windows Application with ACL-DASK/Windows

1.6.1 Creating a Windows ACL-DASK Application Using Microsoft C/C++ and Windows SDK

 

To create a data acquisition application using ACL-DASK/Windows, Microsoft C/C++, and Windows SDK, follow these steps:

 

step 1. Prepare C/C++ source files.

 

The source files should contain the WinMain function, window functions, and other application code.

 

step 2. Include header file DASK.H into C/C++ source file.

 

DASK.H contains all the function declarations and constants that you can use to develop your data acquisition application. Use '#include' declarative to include header files.

 

step 3. Create a resource script (.RC) file.

 

This file defines all the application's resources. It also defines menus, dialog boxes, and other resources.

 

step 4. Create the module-definition (.DEF) file.

 

This file contains the definition of the attributes of the application modules, such as segment attributes, stack size, and heap size.

 

step 5. Compile and link all C/C++ sources.

 

Compile your source files with the Microsoft C/C++ compiler. The following shows a typical CL command for compiling a source file:

 

cl -c -AL -Gsw -Ow -Zp -W2 -Ic:\dask\include source_file

 

The -I option cause the compiler to search the directory you specify for include files. Place the directory that contains the ACL-DASK's include files after -I. The default directory to place these include files is C:\DASK\INCLUDE. After finish compiling all the source files, link the source files with Windows and C/C++ run-time libraries, and most importantly, ACL-DASK/Windows driver's import library DASK.LIB. For example, suppose your source files are DA1.C and DA2.C; the module definition file is DA.DEF; the executable made is named DA.EXE.

 

link /NOD DA1.OBJ DA2.OBJ, DA.EXE

/align:16, NUL, LLIBCEW LIBW C:\DASK\LIB\DASK,

DA.DEF

( please make it as one line )

 

You have to specify the full path of DASK.LIB. By default, it is located in C:\DASK\LIB.

 

step 6. Use the Resource Compiler to compile the resource script file and add it to the executable file. Suppose the resource script file is DA.RC.

 

rc DA.RC DA.EXE

 

 

Figure 1.1 shows the steps required to build a Windows application.

 

 

 

 

Figure 1.1

 

1.6.2 Creating a Windows ACL-DASK Application Using Microsoft Visual Basic

 

To create a data acquisition application using ACL-DASK and Visual Basic, follow these steps after entering Visual Basic:

 

step 1. Open the project in which you want to use ACL-DASK. This can be a new or existing project

 

Open a new project by selecting the New Project command from the File menu. If it is an existing project, open it by selecting the Open Project command from the File menu. Then the Open Project dialog box appears.

 

 

 

Changed directory to the place the project file located. Double-click the project file name in the File Name list to load the project.

 

step 2. Add file DASK.BAS into the project if this file is not included in the project. This file contains all the procedure declarations and constants that you can use to develop your data acquisition application.

 

From the File menu, select the Add File command. The Add File window appears, displaying a list of files in the current directory.

 

 

 

Select DASK.BAS from the Files list by doubl-clicking on it. If you can't find this file in the list, make sure the list is displaying files from the correct directory. By default, DASK.BAS is installed in C:\DASK\INCLUDE.

 

step 3. Design the interface for the application.

 

To design the interface, you place the desired elements, such as command button, list box, text box, etc., on the Visual Basic form. These are standard controls from the Visual Basic Toolbox. To place a control on a form, you just move pointer to Toolbox, select the desired control and draw it on the form. Or you can double-click the control icon in the Toolbox to place it on the form.

 

step 4. Set properties for the controls.

 

To view the property list, click the desired control and then choose the Properties command from the Window menu or press F4, you can also click the Properties button on the toolbar.

 

step 5. Write the event code.

 

The event code defines the action you want to perform when an event occurs. To write the event code, you double click the desired control or form to view the code module then add code you want. You can call the procedures that declared in the file DASK.BAS to perform data acquisition operations.

 

step 6. Run your application.

 

To run the application, choose Start from the Run menu, or click the Start icon on the toolbar (you can also press F5).

 

step 7. Distribute your application.

 

Once you have finished a project, you can save the application as an executable (.EXE) file by using the Make EXE File command on the File menu. And once you have saved your application as an executable file, you've ready to distribute it. When you distribute your applicatiion, remember also to include the ACL-DASK software driver (DASK.DLL). DASK.DLL should be copied to the same directory your application located or Windows System directory (by default, C:\WINDOWS\SYSTEM).

2

ACL-DASK Overview

This chapter describes the classes of functions in ACL-DASK and briefly describes each function.

 

ACL-DASK functions are grouped to the following classes:

· General Configuration Function Group

· Analog Input Function Group

- Analog Input Configuration functions

- One-Shot Analog Input functions

- Continuous Analog Input functions

- Asynchronous Analog Input Monitoring functions

· Analog Output Function Group

· Digital I/O Function Group

· Timer/Counter Function Group

2.1 General Configuration Function Group

Use these functions to initializes and configures data acquisition card.

 

Register_Card Initializes the hardware and software states of an ADCLONE data acquisition card Register_Card must be called before any other DASK library functions can be called for that card.

 

Release_Card Tells DASK library that this registered card is not used currently and can be released. This would make room for new card to register.

 

 

2.2 Analog Input Function Group

2.2.1 Analog Input Configuration Functions

AI_VoltageRange Informs DASK library of the voltage range jumper setting on the card. Only ACL-812PG and ACL-813 need this function.

AI_ContADConfig Informs DASK library of the transfer mode, and trigger mode selected for the card. You must call this function before calling function to perform continuous analog input operation.

2.2.2 One-Shot Analog Input Functions

AI_ReadChannel Performs a software triggered A/D conversion (analog input) on an analog input channel and returns the value converted.

 

AI_ReadChannelVolt Performs a software triggered A/D conversion (analog input) on an analog input channel and returns the result scaled to voltage in units of volts.

 

AI_Scale Converts the 12-bit binary result from an AI_ReadChannel call to the actual input voltage.

 

AI_ReadMultiChannels Performs one software triggered A/D conversion (analog input) on each of the analog input channels specified in array chans, and returns the values converted in the array reading.

 

AI_ScaleMultiChannels Converts the values of an array of 12-bit binary data to the actual input voltages.

2.2.3 Continuous Analog Input Functions

AI_ContReadChannel This function performs continuous A/D conversions on the specified analog input channel at a rate as close to the rate you specified.

 

AI_ContReadChannelToFile This function performs continuous A/D conversions on the specified analog input channel at a rate as close to the rate you specified and simultaneously put the acquired data in a disk file.

 

AI_ContReadMultiChannels This function performs continuous A/D conversions on the specified analog input channels at a rate as close to the rate you specified.

 

AI_ContReadMultiChannelsToFile

This function performs continuous A/D conversions on the specified analog input channels at a rate as close to the rate you specified and simultaneously put the acquired data in a disk file.

2.2.4 Asynchronous Analog Input Monitoring Functions

AI_AsyncCheck Chech the current status of the asynchronous analog input operation.

 

AI_AsyncClear Stop the asynchronous analog input operation.

 

AI_AsyncDblBufferMode Enables or Disables double-buffered data acquisition mode.

 

AI_AsyncDblBufferHalfReady

Checks whether the next half buffer of data is ready for transfer during an asynchronous double-buffered analog input operation.

 

AI_AsyncDblBufferTransfer Transfers half of the data of circular buffer to parameter buffer. You can execute this function repeatly to return sequential half buffers of the data.

2.2.5 Asynchronous Analog Input Programming Hints

 

Non-double-buffered

 

 

 

Double-buffered

 

 

 

2.3 Analog Output Function Group

2.3.1 One-Shot Analog Output Functions

AO_WriteChannelVolt scales the voltage value to the proper binary number, then writes that number to D/A converter.

 

AO_WriteChannel Writes a binary value to the specified analog output channel.

 

AO_Scale Scales a floating-point voltage value to a binary value that, when written to the specified channel, produces the specified voltage.

 

AO_ScaleMultiChannels Scales an array of floating-point voltages value to an array of binary values that, when written to the specified channels, produces the specified voltages.

2.3.2 Continuous Analog Output Functions

AO_ContWriteChannel 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_ContWriteChannelFromFile

Continuously writes binary values that stored in a disk file to the specified analog output channel at a rate as close to the rate you specified.

 

AO_ContWriteMultiChannels

Continuously writes binary values that stored in buffer to the specified analog output channels.

 

AO_ContWriteMultiChannelsFromFile

Continuously writes binary values that stored in a disk file to the specified analog output channels at a rate as close to the rate you specified.

2.2.3 Asynchronous Analog Output Monitoring Functions

AO_AsyncClear Stop the asynchronous analog output operation.

 

2.4 Digital I/O Function Group

DIO_ConfigPort Configures the specified port for direction (input or output).

 

DIO_InLine Reads the digital logic state of the specified digital line in the specified port.

 

DIO_InPort Reads digital data from the specified digital I/O port.

 

DIO_OutLine Sets the specified digital output line in the specified digital port to the specified state.

 

DIO_OutPort Writes digital data to the specified digital I/O port.

 

DIO_ReadbackLine Reads back the last digital logic state that set to the specified digital line in the specified port.

 

DIO_ReadbackPort Reads back the last digital data written to the specified digital I/O port.

 

2.5 Timer/Counter Function Group

CTR_Read Reads the current contents of the selected counter.

 

CTR_Reset Sets the output of the selected counter to the specified state.

 

CTR_Setup Configures the selected counter to operate in the specified mode.

 

3

Function Description

This chapter contains the detailed description of ACL-DASK functions, including the ACL-DASK data types and function reference. The functions are arranged alphabetically in 3.2 Function Reference.

 

3.1 Data Types

We defined some data types in DASK.H. These data types is used by ACL-DASK library. We suggest you to use these data types in your application programs. The following table shows the data type names and their ranges.

 

Type Name

Description

Range

U8

8-bit ASCII character

0 to 255

I16

16-bit signed integer

-32768 to 32767

U16

16-bit unsigned integer

0 to 65535

I32

32-bit signed integer

-2147483648 to

2147483647

U32

32-bit unsigned integer

0 to 4294967295

F32

32-bit single-precision

floating-point

-3.402823E38 to

3.402823E38

F64

64-bit double-precision

floating-point

-1.797683134862315E308 to

1.797683134862315E309

STR

character string

 

 

3.2 Function Reference

 

AI_AsyncCheck

@ Description

 

Chech the current status of the asynchronous analog input operation.

@ Cards Support

 

711B, 812PG, 8111, 8112DG, 8112HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AI_AsyncCheck(I16 card_number, Boolean *stopped, I32 *retrieved)

 

Visual Basic (Windows)

 

AI_AsyncCheck(ByVal card_number As Integer, stopped As Integer, retrieved As Long) As Integer

@ Parameter

 

card_number : The card id of the card that performs the asynchronous operation.

stopped : whether the asynchronous analog input operation has completed. If stopped = TRUE, the analog input operation has stopped. Either the number of A/D conversions indicated in the call that initiated the asynchronous analog input operation has completed or an error has occured. If stopped = FALSE, the operation is not yet complete.

retrieved : the number of A/D data that has been transferred at the time the call to AI_AsyncCheck.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

NoAsyncAD : There is no asynchronous operation initiated on this card.

 

 

AI_AsyncClear

@ Description

 

Stop the asynchronous analog input operation.

@ Cards Support

 

711B, 812PG, 8111, 8112DG, 8112HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AI_AsyncClear(I16 card_number, I32 *retrieved)

 

Visual Basic (Windows)

 

AI_AsyncClear(ByVal card_number As Integer, retrieved As Long) As Integer

@ Parameter

 

card_number : The card id of the card that performs the asynchronous operation.

retrieved : the number of A/D data that has been transferred at the time the call to AI_AsyncClear.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

NoAsyncAD : There is no asynchronous A/D operation initiated on this card.

 

AI_AsyncDblBufferHalfReady

@ Description

 

Checks whether the next half buffer of data is ready for transfer during an asynchronous double-buffered analog input operation.

@ Cards Support

 

711B, 812PG, 8111, 8112DG, 8112HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AI_AsyncDblBufferHalfReady(I16 card_number, Boolean *halfReady)

 

Visual Basic (Windows)

 

AI_AsyncDblBufferHalfReady(ByVal card_number As Integer, halfReady As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that performs the asynchronous double-buffered operation.

halfReady : wether the next half buffer of data is available. If halfReady = TRUE, you can call AI_AsyncDblBufferTransfer to transfer the data to your buffer.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

NotDoubleBufferMode : double-buffered mode is disabled.

NoAsyncAD : There is no asynchronous operation initiated on this card.

 

 

AI_AsyncDblBufferMode

@ Description

 

Enables or disables double-buffered data acquisition mode.

@ Cards Support

 

711B, 812PG, 8111, 8112DG, 8112HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AI_AsyncDblBufferMode(I16 card_number, Boolean enabled)

 

Visual Basic (Windows)

 

AI_AsyncDblBufferMode(ByVal card_number As Integer, ByVal enabled As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that double-buffered mode to be set.

enabled : whether the double-buffered mode is enabled or not.

TRUE: double-buffered mode is enabled.

FALSE: double-buffered mode is disabled.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

 

 

AI_AsyncDblBufferTransfer

@ Description

 

Transfers half of the data of circular buffer to parameter buffer. You can execute this function repeatly to return sequential half buffers of the data.

@ Cards Support

 

711B, 812PG, 8111, 8112DG, 8112HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AI_AsyncDblBufferTransfer(I16 card_number, U16 *buffer)

 

Visual Basic (Windows)

 

AI_AsyncDblBufferTransfer(ByVal card_number As Integer, buffer As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that performs the asynchronous double-buffered operation.

buffer : an integer array to which the data is to be transferred.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

NotDoubleBufferMode : Double-buffered mode is disabled.

NoAsyncAD : There is no asynchronous operation initiated on this card.

OverwriteBeforeTransfer : Some of the unretrieved data in circular buffer has been overwritten. Even though the warning occurs, this function transfers data.

 

 

AI_ContADConfig

@ Description

 

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.

@ Cards Support

 

711B, 812PG, 8111, 8112DG, 8112HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AI_ContADConfig(I16 card_number, I16 xfer_mode, I16 trig_mode)

 

Visual Basic (Windows)

 

AI_ContADConfig(ByVal card_number As Integer, ByVal xfer_mode As Integer, ByVal trig_mode As Integer) As Integer

@ Parameter

 

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:

INTERRUPT for ACL-711B

INTERRUPT or DMA for ACL-812PG, and ACL-812PG Plus

Note: For ACL-812PG, and ACL-812PG Plus, 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 ACL-812PG, and ACL-8112 series, this parameter must be the same as jumper JP1 selected on the card.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

 

 

AI_ContReadChannel

@ Description

 

This function performs continuous A/D conversions on the specified analog input channel at a rate as close to the rate you specified.

@ Cards Support

 

711B, 812PG, 8111, 8112DG, 8112HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AI_ContReadChannel(I16 card_number, I16 channel, I16 ad_range, U16 *buffer, I32 count, F32 sample_rate, I16 synch_mode)

 

Visual Basic (Windows)

 

Declare Function I_ContReadChannel(ByVal card_number As Integer, ByVal channel As Integer, ByVal ad_range As Integer, buffer As Integer, ByVal count As Long, ByVal sample_rate As Single, ByVal synch_mode As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

channel : analog input channel number

Range: 0 through 7 for ACL-711B

0 through 15 for ACL-812PG and ACL-812PG Plus

ad_range : the analog input range the specified channel is setting. We define some constants to represent various A/D input ranges in DASK.H:

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:

ACL-711B

: 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

ACL-812PG

: 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.

ACL-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

 

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.

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_Config, the sample rate is determined by an external trigger source, you can ignore this parameter.

synch_mode : whether this operation is performed synchronously or asynchronously.

Valid values:

SYNCH_OP: synchronous A/D conversion, that is, the function does not return until the A/D operation complete.

ASYNCH_OP: asynchronous A/D conversion

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidADChannel : The parameter channel is out of range.

InvalidADRange : The specified analog input range is invalid for this card.

InterruptTransferActive : There is an interrupt transfer on this card not being completed.

 

AI_ContReadChannelToFile

@ Description

 

This function performs continuous A/D conversions on the specified analog input channel at a rate as close to the rate you specified and simultaneously put the acquired data in a disk file.

@ Cards Support

 

711B, 812PG, 8111, 8112DG, 8112HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AI_ContReadChannelToFile(I16 card_number, I16 channel, I16 ad_range, U8 *filename, I32 count, F32 sample_rate, Boolean concat, I16 synch_mode)

 

Visual Basic (Windows)

 

AI_ContReadChannelToFile(ByVal card_number As Integer, ByVal channel As Integer, ByVal ad_range As Integer, ByVal filename As String, ByVal count As Long, ByVal sample_rate As Single, ByVal concat As Integer, ByVal synch_mode As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

channel : analog input channel number.

Range: 0 through 7 for ACL-711B

0 through 15 for ACL-812PG and ACL-812PG Plus

ad_range : the analog input range the specified channel is setting. We define some constants to represent various A/D input ranges in DASK.H:

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:

ACL-711B

: 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

ACL-812PG

: 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.

ACL-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

 

filename : the name of the data file used to store the analog input data. This file is a text file with the data separated by blank character or end-of-line.

count : the number of A/D conversions to be performed.

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_Config, the sample rate is determined by an external trigger source, you can ignore this parameter.

concat : concatenation of data to an existing file. No matter what value concat is, AI_ContReadChannelToFile creates the file if the file does not exist.

Valid values:

TRUE: Concatenate acquired data to an existing file.

FALSE: Overwrite file if it exists.

synch_mode : whether this operation is performed synchronously or asynchronously.

Valid values:

SYNCH_OP: synchronous A/D conversion, that is, the function does not return until the A/D operation complete.

ASYNCH_OP: asynchronous A/D conversion

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

DblBufrModeNotAllowed: Double-buffered transfer mode is not allowed for A/D conversion to data file.

DMATransferNotAllowed : DMA transfer only supports single channel continuous A/D conversion to data buffer.

InvalidADChannel : The parameter channel is out of range.

InvalidADRange : The specified analog input range is invalid for this card.

InterruptTransferActive : There is an interrupt transfer on this card not being completed.

OpenFileError : An error occurred while opening the output data file.

 

 

AI_ContReadMultiChannels

@ Description

 

This function performs continuous A/D conversions on the specified analog input channels at a rate as close to the rate you specified.

@ Cards Support

 

711B, 812PG, 8111, 8112DG, 8112HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AI_ContReadMultiChannels(I16 card_number, I16 numChans, I16 *chans, I16 *ad_range, U16 *buffer, I32 count, F32 sample_rate, F32 scan_rate, I16 synch_mode)

 

Visual Basic (Windows)

 

AI_ContReadMultiChannels(ByVal card_number As Integer, ByVal numChans As Integer, chans As Integer, ad_range As Integer, buffer As Integer, ByVal count As Long, ByVal sample_rate As Single, ByVal scan_rate As Single, ByVal synch_mode As Integer) As Integer

@ Parameter

 

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: 0 through 7 for ACL-711B

0 through 15 for ACL-812PG and ACL-812PG Plus

ad_range : an integer array of length numChans that contains the analog input range for each channel in array chans. We define some constants to represent various A/D input ranges in DASK.H:

 

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.

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_Config, 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.

synch_mode : whether this operation is performed synchronously or asynchronously.

Valid values:

SYNCH_OP: synchronous A/D conversion, that is, the function does not return until the A/D operation complete.

ASYNCH_OP: asynchronous A/D conversion

 

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

DMATransferNotAllowed : DMA transfer only supports single channel continuous A/D conversion to data buffer.

InvalidADChannel : Some channel numbers in chans are out of range.

InvalidADRange : The specified analog input range is invalid for this card.

InterruptTransferActive : There is an interrupt transfer on this card not being completed.

 

AI_ContReadMultiChannelsToFile

@ Description

 

This function performs continuous A/D conversions on the specified analog input channels at a rate as close to the rate you specified and simultaneously put the acquired data in a disk file.

@ Cards Support

 

711B, 812PG, 8111, 8112DG, 8112HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AI_ContReadMultiChannelsToFile(I16 card_number, I16 numChans, I16 *chans, I16 *ad_range, U8 *filename, I32 count, F32 sample_rate, F32 scan_rate, Boolean concat, I16 synch_mode)

 

Visual Basic (Windows)

 

AI_ContReadMultiChannelsToFile(ByVal card_number As Integer, ByVal numChans As Integer, chans As Integer, ad_range As Integer, ByVal filename As String, ByVal count As Long, ByVal sample_rate As Single, ByVal scan_rate As Single, ByVal concat As Integer, ByVal synch_mode As Integer) As Integer

@ Parameter

 

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: 0 through 7 for ACL-711B

0 through 15 for ACL-812PG and ACL-812PG Plus

ad_range : an integer array of length numChans that contains the analog input range for each channel in array chans. We define some constants to represent various A/D input ranges in DASK.H:

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:

ACL-711B

: 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

ACL-812PG

: 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.

ACL-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

 

filename : the name of the data file used to store the analog input data. This file is a text file with the data separated by blank character and end-of-line. Each line contains data of one scan. For example, if the value of numChans is 3, the channel numbers in chans are 0, 1, and 3. Then every line in file contains 3 integer values corresponding to the analog input data from channel 0, 1, and 3. The values in one line are separated by blank character.

count : the number of A/D conversions to be performed.

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_Config, 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.

concat : concatenation of data to an existing file. No matter what value concat is, AI_ContReadChannelToFile creates the file if the file does not exist.

Valid values:

TRUE: Concatenate acquired data to an existing file.

FALSE: Overwrite file if it exists.

synch_mode : whether this operation is performed synchronously or asynchronously.

Valid values:

SYNCH_OP: synchronous A/D conversion, that is, the function does not return until the A/D operation complete.

ASYNCH_OP: asynchronous A/D conversion

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

DblBufrModeNotAllowed: Double-buffered transfer mode is not allowed for A/D conversion to data file.

DMATransferNotAllowed : DMA transfer only supports single channel continuous A/D conversion to data buffer.

InvalidADChannel : Some channel numbers in chans are out of range.

InvalidADRange : The specified analog input range is invalid for this card.

InterruptTransferActive : There is an interrupt transfer on this card not being completed.

OpenFileError : An error occurred while opening the output data file.

 

AI_ReadChannel

@ Description

 

This function does a software triggered A/D conversion (analog input) on an analog input channel and returns the value converted.

@ Cards Support

 

711B, 812PG, 813, 8111, 8112DG, 8112HG, 8113

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AI_ReadChannel(I16 card_number, I16 channel, I16 ad_range, U16 *reading)

 

Visual Basic (Windows)

 

AI_ReadChannel(ByVal card_number As Integer, ByVal channel As Integer, ByVal ad_range As Integer, reading As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

channel : analog input channel number.

Range: 0 through 7 for ACL-711B

0 through 15 for ACL-812PG and ACL-812PG Plus

0 through 31 for ACL-813

ad_range : the analog input range the specified channel is setting. We define some constants to represent various A/D input ranges in DASK.H:

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:

ACL-711B

: 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

ACL-812PG

: 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.

ACL-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

ACL-813

: 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

reading : the 12-bit A/D converted value. The value should range from 0 to 4095.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidADChannel : The parameter channel is out of range.

InvalidADRange : The specified analog input range is invalid for this card.

ADTimeOut : A/D conversion not completed in specific time.

 

 

AI_ReadChannelVolt

@ Description

 

This function does a software triggered A/D conversion (analog input) on an analog input channel and returns the result scaled to voltage in units of volts.

@ Cards Support

 

711B, 812PG, 813, 8111, 8112DG, 8112HG, 8113

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AI_ReadChannelVolt(I16 card_number, I16 channel, I16 ad_range, F32 *voltage)

 

Visual Basic (Windows)

 

AI_ReadChannelVolt(ByVal card_number As Integer, ByVal channel As Integer, ByVal ad_range As Integer, voltage As Single) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

channel : analog input channel number.

Range: 0 through 7 for ACL-711B

0 through 15 for ACL-812PG and ACL-812PG Plus

0 through 31 for ACL-813

ad_range : the analog input range the specified channel is setting. We define some constants to represent various A/D input ranges in DASK.H:

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:

ACL-711B

: 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

ACL-812PG

: 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.

ACL-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

ACL-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 manual for detail.

 

voltage : the floating-point voltage value measured on the specified analog input channel, scaled to units of volts.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidADChannel : The parameter channel is out of range.

InvalidADRange : The specified analog input range is invalid for this card.

ADTimeOut : A/D conversion not completed in specific time.

 

 

AI_ReadMultiChannels

@ Description

This function does one software triggered A/D conversion (analog input) on each of the analog input channels specified in array chans, and returns the values converted in the array reading.

@ Cards Support

 

711B, 812PG, 813, 8111, 8112DG, 8112HG, 8113

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AI_ReadMultiChannels(I16 card_number, I16 numChans, I16 *chans, I16 *ad_range, U16 *reading)

 

Visual Basic (Windows)

 

AI_ReadMultiChannels(ByVal card_number As Integer, ByVal numChans As Integer, chans As Integer, ad_range As Integer, reading As Integer) As Integer

@ Parameter

 

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: 0 through 7 for ACL-711B

0 through 15 for ACL-812PG and ACL-812PG Plus

0 through 31 for ACL-813

ad_range : an integer array of length numChans that contains the analog input range for each channel in array chans. We define some constants to represent various A/D input ranges in DASK.H:

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:

ACL-711B

: 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

ACL-812PG

: 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.

ACL-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

ACL-813

: 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

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.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidADChannel : Some channel numbers in chans are out of range.

InvalidADRange : The specified analog input range is invalid for this card.

ADTimeOut : A/D conversion not completed in specific time.

 

 

AI_Scale

@ Description

 

Converts the 12-bit binary result from an AI_ReadChannel call to the actual input voltage.

@ Cards Support

 

711B, 812PG, 813, 8111, 8112DG, 8112HG, 8113

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AI_Scale(I16 card_number, I16 ad_range, U16 reading, F32 *voltage)

 

Visual Basic (Windows)

 

AI_Scale(ByVal card_number As Integer, ByVal ad_range As Integer, ByVal reading As Integer, voltage As Single) As Integer

@ Parameter

 

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. We define some constants to represent various A/D input ranges in DASK.H:

 

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:

ACL-711B

: 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

ACL-812PG

: 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.

ACL-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

ACL-813

: 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 manual for detail.

reading : 12-bit A/D conversion value returned by AI_ReadChannel.

voltage : the input voltage converted from parameter reading.

 

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidADRange : The specified analog input range is invalid for this card.

 

AI_ScaleMultiChannels

@ Description

 

Converts the values of an array of 12-bit binary data to the actual input voltages.

@ Cards Support

 

711B, 812PG, 813, 8111, 8112DG, 8112HG, 8113

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AI_ScaleMultiChannels(I16 card_number, I16 numChans, I16 *ad_range, I32 count, U16 *readings, F32 *volts)

 

Visual Basic (Windows)

 

AI_ScaleMultiChannels(ByVal card_number As Integer, ByVal numChans As Integer, ad_range As Integer, ByVal count As Long, readings As Integer, volts As Single) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

numChans : the 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. We define some constants to represent various A/D input ranges in DASK.H:

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:

ACL-711B: 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

ACL-812PG: 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.

ACL-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

ACL-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-8113 manual for detail.

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, ...

volts : an array of floating-point voltage values that correspond to the input voltage measured.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidADRange : The specified analog input range is invalid for this card.

 

 

AI_VoltageRange

@ Description

 

Informs DASK library of the voltage range jumper setting on the card with card ID card_number. If you changed the jumper setting, this function is need to be called. Only ACL-812PG and ACL-813 need this function. If the function has not been called, the default voltage ranges for ACL-812PG and ACL-813 are 5 and 10 respectively.

@ Cards Support

 

812PG, 813, 8112DG, 8113

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AI_VoltageRange(I16 card_number, I16 voltage_range)

 

Visual Basic (Windows)

 

AI_VoltageRange(ByVal card_number As Integer, ByVal voltage_range As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

voltage_range : For ACL-812PG, please set this parameter the same as what jumper JP9 selected on the card. The valid value is either 5 or 10. For ACL-813, please set this parameter the same as what jumper JP1 selected on the card. The valid value is either 10 or 20. This parameter must be set correctly or the converted input value will be incorrect.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidVoltageRange : The specified voltage_range is invalid for this card.

 

 

AO_AsyncClear

@ Description

 

Stop the asynchronous analog output operation.

@ Cards Support

 

711B, 812PG, 8111, 8112DG, 812HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AI_AsyncClear(I16 card_number)

 

Visual Basic (Windows)

 

AO_AsyncClear(ByVal card_number As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that performs the asynchronous operation.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

NoAsyncDA : There is no asynchronous D/A operation initiated on this card.

 

AO_ContWriteChannel

@ Description

 

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_ContWriteChannel will wait for operation completion before returning (that is, it is synchronous).

@ Cards Support

 

711B, 812PG, 8111, 8112DG, 812HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AO_ContWriteChannel(I16 card_number, I16 channel, U16 *buffer, I16 count, I16 iterations, F32 rate, I16 synch_mode)

 

Visual Basic (Windows)

 

Declare Function AO_ContWriteChannel Lib "dask.dll" (ByVal card_number As Integer, ByVal channel As Integer, buffer As Integer, ByVal count As Long, ByVal iterations As Integer, ByVal rate As Single, ByVal synch_mode As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

channel : the analog output channel number

Range: 0 for for ACL-711B

0 or 1 for ACL-812PG and ACL-812PG Plus

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

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidADChannel : The parameter channel is out of range.

InterruptTransferActive : There is an interrupt transfer on this card not being completed.

 

AO_ContWriteChannelFromFile

@ Description

 

This function continuously writes binary values that stored in a disk file to the specified analog output channel at a rate as close to the rate you specified. AO_ContWriteChannelFromFile will wait for operation completion before returning (that is, it is synchronous).

@ Cards Support

 

711B, 812PG, 8111, 8112DG, 812HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AO_ContWriteChannelFromFile(I16 card_number, I16 channel, U8 *filename, I16 count, I16 iterations, F32 rate, I16 synch_mode)

 

Visual Basic (Windows)

 

AO_ContWriteChannelFromFile(ByVal card_number As Integer, ByVal channel As Integer, ByVal filename As String, ByVal count As Long, ByVal iterations As Integer, ByVal rate As Single, ByVal synch_mode As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

channel : the analog output channel number.

Range: 0 for for ACL-711B

0 or 1 for ACL-812PG and ACL-812PG Plus

filename : This is the name of the data file containing the analog output data. This file should be a text file. The data is separated by blank character or end-of-line.

count : the number of points in file

iterations : the number of times the data in the file 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

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidADChannel : The parameter channel is out of range.

InterruptTransferActive : There is an interrupt transfer on this card not being completed.

OpenFileError : An error occurred while opening the data file.

UnexpectedEOF : The number of data points in file is less than count.

ReadFileError : Error occurs while reading data from file.

 

AO_ContWriteMultiChannels

@ Description

 

This function continuously writes binary values that stored in buffer to the specified analog output channels. AO_ContWriteMultiChannels will wait for operation completion before returning (that is, it is synchronous).

@ Cards Support

 

711B, 812PG, 8111, 8112DG, 812HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AO_ContWriteMultiChannels(I16 card_number, I16 numChans, I16 *chans, U16 *buffer, I16 count, I16 iterations, F32 rate, I16 synch_mode)

 

Visual Basic (Windows)

 

AO_ContWriteMultiChannels(ByVal card_number As Integer, ByVal numChans As Integer, chans As Integer, buffer As Integer, ByVal count As Long, ByVal iterations As Integer, ByVal rate As Single, ByVal synch_mode As Integer) As Integer

@ Parameter

 

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:

0 for for ACL-711B

0 or 1 for ACL-812PG and ACL-812PG Plus

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

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidDAChannel : Some channel numbers in chans are out of range.

InterruptTransferActive : There is an interrupt transfer on this card not being completed.

 

AO_ContWriteMultiChannelsFromFile

@ Description

 

This function continuously writes binary values that stored in a disk file to the specified analog output channels at a rate as close to the rate you specified. AO_ContWriteMultiChannelsFromFile will wait for operation completion before returning (that is, it is synchronous).

@ Cards Support

 

711B, 812PG, 8111, 8112DG, 812HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AO_ContWriteMultiChannelsFromFile(I16 card_number, I16 numChans, I16 *chans, U8 *filename, I16 count, I16 iterations, F32 rate, I16 synch_mode)

 

Visual Basic (Windows)

 

AO_ContWriteMultiChannelsFromFile(ByVal card_number As Integer, ByVal numChans As Integer, chans As Integer, ByVal filename As String, ByVal count As Long, ByVal iterations As Integer, ByVal rate As Single, ByVal synch_mode As Integer) As Integer

@ Parameter

 

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:

0 for for ACL-711B

0 or 1 for ACL-812PG and ACL-812PG Plus

filename: This is the name of the data file containing the analog output data. This file should be a text file. The data is separated by blank character or end-of-line. The data in file should be arranged in interleaved sequence. For example, if the channel numbers in chans are 0 and 1, then the first item in file is written to channel 0, the second is written to channel 1, the third is for channel 0, the fourth is for channel 1, ...

count : the number of points in file. count should be a multiple of numChans.

iterations : the number of times the data in file 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

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidDAChannel : Some channel numbers in chans are out of range.

InterruptTransferActive : There is an interrupt transfer on this card not being completed.

OpenFileError : An error occurred while opening the data file.

UnexpectedEOF : The number of data points in file is less than count.

ReadFileError : Error occurs while reading data from file.

 

AO_Scale

@ Description

 

Scales a floating-point voltage value to a binary value according to the specified D/A range.

@ Cards Support

 

726, 711B, 812PG, 6126, 8111, 8112DG, 812HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AO_Scale(I16 card_number, I16 da_range, F32 voltage, U16 *value)

 

Visual Basic (Windows)

 

AO_Scale(ByVal card_number As Integer, ByVal da_range As Integer, ByVal voltage As Single, value As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

da_range : This parameter tells DASK library what analog output range is used to scale the specified voltage value. This parameter must be set correctly or the output value will be incorrect. We define some constants to represent various D/A output range in DASK.H:

DA_B_10_V: Bipolar, -10V to +10V

DA_B_5_V: Bipolar, -5V to +5V

DA_U_10_V: Unipolar, 0 to +10V

DA_U_5_V: Unipolar, 0 to +5V

Valid value:

ACL-726: DA_B_10_V, DA_B_5_V, DA_U_10_V, or DA_U_5_V

ACL-711B, ACL-812PG, and ACL-812PG Plus: U_10_V or U_5_V

voltage : The voltage value to be converted to a binary value. The voltage value must be within the range of the analog output range specified by parameter da_range.

value : returns the converted binary value

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidDARange : The specified analog output range is invalid for this card.

 

AO_ScaleMultiChannels

@ Description

 

Scales an array of floating-point voltages value to an array of binary values according to the specified D/A ranges.

@ Cards Support

 

726, 711B, 812PG, 6126, 8111, 8112DG, 812HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AO_ScaleMultiChannels(I16 card_number, I16 numChans, I16 *da_range, I16 count, F32 *volt, U16 *value)

 

Visual Basic (Windows)

 

AO_ScaleMultiChannels(ByVal card_number As Integer, ByVal numChans As Integer, da_range As Integer, ByVal count As Long, volt As Single, value As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

numChans : the number of D/A ranges in the array da_range.

da_range : This parameter tells DASK library what analog output ranges are used to scale the specified voltage values. This parameter must be set correctly or the scaled values will be incorrect. We define some constants to represent various D/A output ranges in DASK.H:

DA_B_10_V: Bipolar, -10V to +10V

DA_B_5_V: Bipolar, -5V to +5V

DA_U_10_V: Unipolar, 0 to +10V

DA_U_5_V: Unipolar, 0 to +5V

Valid value:

ACL-726: DA_B_10_V, DA_B_5_V, DA_U_10_V, or DA_U_5_V

ACL-711B, ACL-812PG and ACL-812PG Plus: U_10_V or U_5_V

count : the number of points in the array volt. count should be a multiple of numChans.

volt : The voltage values to be converted to binary values. The voltage values must be within the corresponding range of the analog output range specified by parameter da_range. The voltage values should be arranged in interleaved sequence. For example, if range values in da_range are B_5_V and B_10_V, then volt[0] is scaled with B_5_V, volt[1] is scaled with B_10_V, volt[2] is scaled with B_5_V, volt[3] is scaled with B_10_V, ...

value : the array used to store the converted binary values.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidDARange : Some analog output range in da_range are invalid for this card.

 

AO_WriteChannel

@ Description

 

Writes a binary value to the specified analog output channel.

@ Cards Support

 

726, 711B, 812PG, 6126, 8111, 8112DG, 812HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AO_WriteChannel(I16 card_number, I16 channel, U16 value)

 

Visual Basic (Windows)

 

AO_WriteChannel(ByVal card_number As Integer, ByVal channel As Integer, ByVal value As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

channel : the analog output channel number.

Range: 0 through 5 for ACL-726

0 for ACL-711B

0 or 1 for ACL-812PG and ACL-812PG Plus

value : The value to be written to the analog output channel.

Range: 0 through 4095 for ACL-726, ACL-711B, ACL-812PG, and ACL-812PG Plus

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidDAChannel : The parameter channel is out of range.

 

 

AO_WriteChannelVolt

@ Description

 

This function will scale the voltage value to the proper binary number, then writes that number to D/A converter.

@ Cards Support

 

726, 711B, 812PG, 6126, 8111, 8112DG, 812HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 AO_WriteChannelVolt(I16 card_number, I16 channel, I16 da_range, F32 voltage)

 

Visual Basic (Windows)

 

AO_WriteChannelVolt(ByVal card_number As Integer, ByVal channel As Integer, ByVal da_range As Integer, ByVal voltage As Single) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

channel : the analog output channel number.

Range: 0 through 5 for ACL-726

0 for ACL-711B

0 or 1 for ACL-812PG and ACL-812PG Plus

da_range : This parameter tells DASK library what analog output range is jumper selected on the card. This parameter must be set correctly or the output value will be incorrect. We define some constants to represent various D/A output range in DASK.H:

DA_B_10_V: Bipolar, -10V to +10V

DA_B_5_V: Bipolar, -5V to +5V

DA_U_10_V: Unipolar, 0 to +10V

DA_U_5_V: Unipolar, 0 to +5V

Valid value:

ACL-726: DA_B_10_V, DA_B_5_V, DA_U_10_V, or DA_U_5_V

ACL-711B, ACL-812PG, and ACL-812PG Plus: U_10_V or U_5_V

voltage : the floating-point voltage value to be scaled and written to analog output channel. The voltage value must be within the range of analog output range specified by parameter da_range.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidDAChannel : The parameter channel is out of range.

InvalidDARange : The specified analog output range is invalid for this card.

 

 

CTR_Read

@ Description

 

Reads the current contents of the selected counter without disturbing the counting process.

@ Cards Support

 

711B, 812PG, 8111, 8112DG, 8112HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 CTR_Read(I16 card_number, I16 ctr, I32 *count)

 

Visual Basic (Windows)

 

CTR_Read(ByVal card_number As Integer, ByVal ctr As Integer, count As Long) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

ctr : the counter number.

Range: 0 through 2.

count : returns the current count of the specified counter.

Range: 0 through 65536 for binary mode (default).

0 through 9999 for BCD counting mode.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidCounter: The parameter ctr is out of range.

 

CTR_Reset

@ Description

 

Sets the output of the selected counter to the specified state.

@ Cards Support

 

711B, 812PG, 8111, 8112DG, 8112HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 CTR_Reset(I16 card_number, I16 ctr, I16 state)

 

Visual Basic (Windows)

 

CTR_Reset(ByVal card_number As Integer, ByVal ctr As Integer, ByVal state As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

ctr : the counter number.

Range: 0 through 2.

state : the logic state to which the counter is to be reset.

Range: 0 or 1.

 

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidCounter: The parameter ctr is out of range.

InvalidCounterState: The state parameter is out of range.

 

CTR_Setup

@ Description

 

Configures the selected counter to operate in the specified mode.

@ Cards Support

 

711B, 812PG, 8111, 8112DG, 8112HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 CTR_Setup(I16 card_number, I16 ctr, I16 mode, I32 count, I16 binBcd)

 

Visual Basic (Windows)

 

CTR_Setup(ByVal card_number As Integer, ByVal ctr As Integer, ByVal mode As Integer, ByVal count As Long, ByVal binBcd As Integer) As Integer

@ Parameter

 

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

PROG_ONE_SHOT

RATE_GENERATOR

SQ_WAVE_RATE_GENERATOR

SOFT_TRIG

HARD_TRIG

TOGGLE_OUTPUT: Toggle output from low to high on terminal count

 

In this mode, the output goes low after the mode set operation, and the counter begins to count down while the gate input is high. When terminal count is reached, the output goes high and remains high until the selected counter is set to a different mode. The following diagram shows the TOGGLE_OUTPUT mode timing diagram.

 

 

 

PROG_ONE_SHOT: Programmable one-shot

 

In this mode, the output goes low on the cofollowing the rising edge of the gate input and goes high on terminal count. The following diagram shows the PROG_ONE_SHOT mode timing diagram.

 

 

 

RATE_GENERATOR: Rate generator

 

In this mode, the output goes low for one period of the clock input. count indicates the period from one output pulse to the next. The following diagram shows the RATE_GENERATOR mode timing diagram.

 

 

 

 

SQ_WAVE_RATE_GENERATOR: Square wave rate generator

 

In this mode, the output stays high for one half of the count clock pulses and stays low for the other half. The following diagram shows the SQ_WAVE_RATE_GENERATOR mode timing diagram.

 

 

 

SOFT_TRIG: Software-triggered strobe

 

In this mode, the output is initially high, and the counter begins to count down while the gate input is high. On terminal count, the output goes low for one clock pulse, then goes high again. The following diagram shows the SOFT_TRIG mode timing diagram.

 

 

 

 

HARD_TRIG: Hardware-triggered strobe

 

This mode is similar to SOFT_TRIG mode except that the gate input is used as a trigger to start counting. The following diagram shows the HARD_TRIG mode timing diagram.

 

 

 

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.

 

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidCounter: The parameter ctr is out of range.

InvalidCounterMode: The value of parameter mode is invalid.

 

 

DIO_ConfigPort

@ Description

 

Configures the specified port for direction (input or output). For those types of cards that do not emulate MODE 0 of 8255 PPI, this function is not needed.

@ Cards Support

 

722, 724, 48DIO, 7122, 7124

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 DIO_ConfigPort(I16 card_number, I16 port, I16 direction)

 

Visual Basic (Windows)

 

DIO_ConfigPort(ByVal card_number As Integer, ByVal port As Integer, ByVal direction As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that want to be configured.

port : Digital I/O port number.

Range: 0 through 17 for ACL-722

0 through 2 for ACL-724

0 through 5 for PET-48DIO

direction : The direction, input or output, to which the port is to be configured. direction can be INPUT or OUTPUT.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidDIOPort : The parameter port is out of range.

 

DIO_InLine

@ Description

 

Read the digital logic state of the specified digital line in the specified port.

@ Cards Support

 

720, 722, 724, 725, 725B, 48DIO, 726, 711B, 812PG, 7120, 7122, 7124, 7125, 7225, 6126, 8111, 8112DG, 8112HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 DIO_InLine(I16 card_number, I16 port, I16 line, U8 *state)

 

Visual Basic (Windows)

 

DIO_InLine(ByVal card_number As Integer, ByVal port As Integer, ByVal dio_line As Integer, state As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

port : Digital I/O port number.

Range:

0 through 3 for ACL-720

0 through 17 for ACL-722

0 through 2 for ACL-724

0 for ACL-725

0 through 5 for PET-48DIO

0 through 1 for ACL-726, ACL-711B, ACL-812PG, and ACL-812PG Plus

line : The digital line to be read. The valid value of line is 0 through 7.

state : returns the digital logic state, 0 or 1, of the specified line.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidDIOPort : The parameter port is out of range.

InvalidDIOLine : The parameter line is out of range.

NotInputPort : The specified port is not configured as input port.

 

 

DIO_InPort

@ Description

 

Read digital data from the specified digital I/O port.

@ Cards Support

 

720, 722, 724, 725, 725B, 48DIO, 726, 711B, 812PG, 7120, 7122, 7124, 7125, 7225, 6126, 8111, 8112DG, 8112HG

 

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 DIO_InPort(I16 card_number, I16 port, U8 *pattern)

 

Visual Basic (Windows)

 

DIO_InPort(ByVal card_number As Integer, ByVal port As Integer, pattern As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

port : Digital I/O port number.

Range:

0 through 3 for ACL-720

0 through 17 for ACL-722

0 through 2 for ACL-724

0 for ACL-725

0 through 5 for PET-48DIO

0 through 1 for ACL-726, ACL-711B, ACL-812PG, and ACL-812PG Plus

pattern : returns the 8-bit digital data read from the specified port.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidDIOPort : The parameter port is out of range.

NotInputPort : The specified port is not configured as input port.

 

 

DIO_OutLine

@ Description

 

Sets the specified digital output line in the specified digital port to the specified state.

@ Cards Support

 

720, 722, 724, 725, 725B, 48DIO, 726, 711B, 812PG, 7120, 7122, 7124, 7125, 7225, 6126, 8111, 8112DG, 8112HG

 

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 DIO_OutLine(I16 card_number, I16 port, I16 line, U8 state)

 

Visual Basic (Windows)

 

DIO_OutLine(ByVal card_number As Integer, ByVal port As Integer, ByVal dio_line As Integer, ByVal state As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

port : Digital I/O port number.

Range:

0 through 3 for ACL-720

0 through 17 for ACL-722

0 through 2 for ACL-724

0 for ACL-725

0 through 5 for PET-48DIO

0 through 1 for ACL-726, ACL-711B, ACL-812PG, and ACL-812PG Plus

line : the digital output line to be written to. The valid value of line is 0 through 7.

state : the new digital logic state, 0 or 1.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidDIOPort : The parameter port is out of range.

InvalidDIOLine : The parameter line is out of range.

NotOutputPort : The specified port is not configured as output port.

 

DIO_OutPort

@ Description

 

Writes digital data to the specified digital I/O port.

@ Cards Support

 

720, 722, 724, 725, 725B, 48DIO, 726, 711B, 812PG, 7120, 7122, 7124, 7125, 7225, 6126, 8111, 8112DG, 8112HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 DIO_OutPort(I16 card_number, I16 port, U8 pattern)

 

Visual Basic (Windows)

 

DIO_OutPort(ByVal card_number As Integer, ByVal port As Integer, ByVal pattern As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

port : Digital I/O port number.

Range:

0 through 3 for ACL-720

0 through 17 for ACL-722

0 through 2 for ACL-724

0 for ACL-725

0 through 5 for PET-48DIO

0 through 1 for ACL-726, ACL-711B, ACL-812PG, and ACL-812PG Plus

pattern : 8-bit digital data that is written to the specified port.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidDIOPort : The parameter port is out of range.

NotOutputPort : The specified port is not configured as output port.

 

DIO_ReadbackLine

@ Description

 

Reads back the last digital logic state that set to the specified digital line in the specified port. For those types of cards that emulates 8255 PPI, the port must be configured as a output port.

@ Cards Support

 

720, 722, 724, 725, 725B, 48DIO, 726, 711B, 812PG, 7120, 7122, 7124, 7125, 7225, 6126, 8111, 8112DG, 8112HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 DIO_ReadbackLine(I16 card_number, I16 port, I16 line, U8 *state)

 

Visual Basic (Windows)

 

DIO_ReadbackLine(ByVal card_number As Integer, ByVal port As Integer, ByVal dio_line As Integer, state As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

port : Digital I/O port number.

Range:

0 through 3 for ACL-720

0 through 17 for ACL-722

0 through 2 for ACL-724

0 for ACL-725

0 through 5 for PET-48DIO

0 through 1 for ACL-726, ACL-711B, ACL-812PG, and ACL-812PG Plus

line : The digital line to be read. The valid value of line is 0 through 7.

state : returns the digital logic state, 0 or 1, of the specified line.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidDIOPort : The parameter port is out of range.

InvalidDIOLine : The parameter line is out of range.

NotOutputPort : The specified port is not configured as output port.

 

 

DIO_ReadbackPort

@ Description

 

Reads back the last digital data written to the specified digital I/O port. For those types of cards that emulates 8255 PPI, the port must be configured as a output port.

@ Cards Support

 

720, 722, 724, 725, 725B, 48DIO, 726, 711B, 812PG, 7120, 7122, 7124, 7125, 7225, 6126, 8111, 8112DG, 8112HG

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 DIO_ReadbackPort(I16 card_number, I16 port, U8 *pattern)

 

Visual Basic (Windows)

 

DIO_ReadbackPort(ByVal card_number As Integer, ByVal port As Integer, pattern As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that want to perform this operation.

port : Digital I/O port number.

Range:

0 through 3 for ACL-720

0 through 17 for ACL-722

0 through 2 for ACL-724

0 for ACL-725

0 through 5 for PET-48DIO

0 through 1 for ACL-726, ACL-711B, ACL-812PG, and ACL-812PG Plus

pattern : returns the 8-bit digital data read from the specified port.

@ Return Code

 

NoError

CardNotRegistered : There is no card that is registered as id card_number.

BadCardType : Card type is incompatible with the function called.

InvalidDIOPort : The parameter port is out of range.

NotOutputPort : The specified port is not configured as output port.

 

 

 

Register_Card

@ Description

Initializes the hardware and software states of an ADCLONE data acquisition card, and then returns a numeric card number that corresponds to the card initialized. Register_Card must be called before any other DASK library functions can be called for that card. The function initializes the card and variables internal to DASK library.

@ Cards Support

 

720, 722, 724, 725, 725B, 48DIO, 726, 711B, 812PG, 813, 7120, 7122, 7124, 7125, 7225, 6126, 8111, 8112DG, 8112HG, 8113

 

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 Register_Card(I16 card_type, I16 base_address, I16 irq, I16 dma_ch)

 

Visual Basic (Windows)

 

Register_Card(ByVal card_type As Integer, ByVal base_address As Integer, ByVal irq As Integer, ByVal dma_ch As Integer) As Integer

@ Parameter

 

card_type : The type of card to be initialized. Following are the constants defined in DASK.H that represent the ADCLONE's data acquisition cards that DASK currently supports:

ACL_720

ACL_722

ACL_724

ACL_725

ACL_725B

PET_48DIO

ACL_726

ACL_711B

ACL_812PG

ACL_812PG_PLUS

ACL_813

ACL_7120

ACL_7122

ACL_7124

ACL_7125

ACL_7225

ACL_6126

ACL_8111

ACL_8112DG

ACL_8112HG

ACL_8113

 

base_address : This parameter tells DASK library which I/O port base address is jumper selected on the card. See the manual for this specific card for details. This parameter must be set correctly or the software will be unable to communicate with the card.

irq : The IRQ channel used to trigger interrupts used in DASK functions. For those types of cards that do not support interrupt transfer, this parameter is meaningless, you can pass DONT_CARE. For those types of cards that IRQ channel is selected by jumper, this parameter must be the same as what jumper selected on the card. See the manual for this specific card for details.

dma_ch : The DMA channel used for DMA transfer used in DASK functions. For those types of cards that do not support DMA transfer, this parameter is meaningless, you can pass DONT_CARE. For those types of cards that DMA channel is selected by jumper, this parameter must be the same as what jumper selected on the card. See the manual for this specific card for details.

@ Return Code

 

This function returns a numeric card id for the card initialized. The range of card id is between 0 and 31. If there is any error occurs, it will return negative error code, the possible error codes are listed below:

TooManyRegisteredCards : There have been 16 cards that were registered. In ths situation, you can release some other cards by calling Release_Card to make room for the card you want to register.

UnknownCardType : The value of parameter card_type must be in the list shown above.

BadBaseAddress : The base address is not valid for this type of card.

 

Release_Card

@ Description

 

There are at most 32 cards that can be registered simultaneously. This function is used to tell DASK library that this registered card is not used currently and can be released. This would make room for new card to register.

@ Cards Support

 

720, 722, 724, 725, 725B, 48DIO, 726, 711B, 812PG, 813, 7120, 7122, 7124, 7125, 7225, 6126, 8111, 8112DG, 8112HG, 8113

@ Syntax

 

Microsoft C/C++ and Borland C++ (DOS, Windows)

 

I16 Release_Card(I16 card_number)

 

Visual Basic (Windows)

 

Release_Card(ByVal card_number As Integer) As Integer

@ Parameter

 

card_number : The card id of the card that want to be released.

@ Return Code

 

This function always returns NoError.

 

 

 

 

4

Sample Programs

In this software diskette, there are 4 sample programs provided. They could help you to program your own applications by using ACL-DASK easily. The description of these programs are specified as follows:

 

UTIL726.MAK

D/A conversion, D/I, and D/O of ACL-726

Visual Basic Program

UTIL726.C

D/A conversion, D/I, and D/O of ACL-726

Microsoft C/C++ Program

UTIL711.MAK

A/D conversion, D/A conversion, D/I, and D/O of ACL-711B

Visual Basic Program

UTIL812.MAK

A/D conversion, D/A conversion, D/I, and D/O of ACL-711B

Visual Basic Program

 

 

Visual Basic Sample Programs

 

There are three Visual Basic sample programs, 'UTIL726.MAK', 'UTIL711.MAK', and 'UTIL812.MAK'. You must have Microsoft Visual Basic 3.0 Professional Edition to deal with these sample programs. To reference a sample program, follow these steps (using 'UTIL711.MAK' as an example):

 

step 1. Open project UTIL711.MAK

 

Open UTIL711.MAK by selecting the Open Project command from the File menu. Then the Open Project dialog box appears.

 

Change directory to the place that project file UTIL711.MAK located. By default, it is installed in C:\DLL2\SAMPLES\VB\711B.

 

 

 

Select UTIL711.MAK from the File Names list by doubl-clicking on it. The contents of Visual Basic's Project window would change as follow:

 

 

 

 

If you can't find the Project window, choose the Project command from the Window menu.

 

step 2. View the sample program.

 

There are two Form, UTIL711.FRM and SETTING.FRM, in this project. For viewing the appearance of Form, click the Form you want from Project window, then click View Form button in Project window. For example, if you select UTIL711.FRM and click View Form button, UTIL711.FRM will appear.

 

 

 

You can view the program code of a Form from Code window. To open the Code window, from the Project window, select the name of the form and choose the View Code button. The following shows the Code window of UTIL711.FRM.

 

 

The Code window includes the following elements:

 

· Object box --- Displays the name of the selected object.

· Procedure list box --- Lists the procedures for an object.

 

You can select object of UTIL711.FRM to view the event procedures of the object.

 

 

 

 

For example, if you select the object Gain, and its Click procedure. The Click event procedure of Gain will appear in Code Window; you can modify it as you wish.

 

 

 

If you want to view or modify the properties of a object, select the object by clicking it, then select Properties command from the Window menu.

 

 

 

 

step 3. Run sample program.

 

To run the sample program, choose Start from the Run menu, or click the Start icon on the toolbar (you can also press F5). Then you can find the main window of UTIL711.MAK appears.

 

 

 

 

Microsoft C/C++ Sample Programs

 

We include one Microsoft C/C++ sample program in this package. By default, it is located in directory C:\DLL2\SAMPLES\SDK\726. It includes the following files:

 

· C source files --- UTIL726.C

· Module definition file --- UTIL726.DEF

· Resource script file --- UTIL726.RC

· Make file --- MAKEFILE and UTIL726.LNK

 

You can use any available text editor to view and edit these files. To build the executable UTIL726.EXE, type NMAKE then press ENTER key under DOS prompt.

 

 

Appendix A: Status Codes

This appendix lists the status codes return by ACL-DASK, including the name and description.

 

Each ACL-DASK function returns a status code that indicates whether the function was performed successfully. When an ACL-DASK function returns a negative number, it means that an error occurred while executing the function.

 

 

Status

Code

Status Name

Description

0

NoError

No error occurred

-1

UnknownCardType

The card_type parameter is not valid

-2

BadBaseAddress

The base address is not valid for this type of card.

-3

TooManyRegisteredCards

There have been 16 cards that were registered.

-4

CardNotRegistered

No card registered as id card_number.

-5

BadCardType

Card type is incompatible with the function called.

-6

InvalidVoltageRange

The specified voltage_range is invalid.

-7

InvalidADRange

The specified analog input range is invalid.

-8

InvalidDARange

The specified analog output range is invalid.

-9

InvalidADChannel

The channel parameter is out of range.

-10

InvalidDAChannel

The channel parameter is out of range.

-11

ADTimeOut

A/D conversion not completed in specific time.

-12

OpenFileError

An error occurred while opening the data file.

-13

ReadFileError

Error occurs while reading data from file.

-14

OverwriteBeforeTransfer

Double-buffered data has been overwritten before it could be transferred to another buffer.

-15

NotDoubleBufferMode

Double-buffered mode is disabled.

-16

NoAsyncAD

There is no asynchronous A/D operation initiated on this card.

-17

NoAsyncDA

There is no asynchronous D/A operation initiated on this card.

-18

InvalidCounterMode

The mode parameter is invalid.

-19

InvalidCounter

The ctr parameter is out of range.

-20

InvalidCounterState

The state parameter is out of range.

-21

NotInputPort

The specified port is not configured as input port.

-22

NotOutputPort

The specified port is not configured as output port.

-23

InvalidDIOPort

The port parameter is out of range.

-24

InvalidDIOLine

The line parameter is out of range.

-25

UnexpectedEOF

The number of data points in file is less than parameter count.

-26

InterruptTransferActive

There is an interrupt transfer on this card not being completed.

-27

DblBufrModeNotAllowed

Double-buffered transfer mode is not allowed for A/D conversion to data file.

-28

DMATransferNotAllowed

DMA transfer only supports single channel continuous A/D conversion to data buffer.

 

 

Appendix B: Function Support

This appendix shows which data acquisition hardware each ACL-DASK function supports.

 

 

��������

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

AI_AsyncCheck

             

l

l

l

l

 

AI_AsyncClear

             

l

l

l

l

 

AI_AsyncDblBufferHalfReady

             

l

l

l

l

 

AI_AsyncDblBufferMode

             

l

l

l

l

 

AI_AsyncDblBufferTransfer

             

l

l

l

l

 

AI_ContADConfig

             

l

l

l

l

 

AI_ContReadChannel

             

l

l

l

l

 

AI_ContReadChannelToFile

             

l

l

l

l

 

AI_ContReadMultiChannels

             

l

l

l

l

 

AI_ContReadMultiChannelsToFile

             

l

l

l

l

 

AI_ReadChannel

           

l

l

l

l

l

l

AI_ReadChannelVolt

           

l

l

l

l

l

l

AI_ReadMultiChannels

           

l

l

l

l

l

l

AI_Scale

           

l

l

l

l

l

l

AI_ScaleMultiChannels

           

l

l

l

l

l

l

AI_VoltageRange

               

l

   

l

AO_ContWriteChannel

             

l

l

l

l

 

AO_ContWriteChannelFromFile

             

l

l

l

l

 

AO_ContWriteMultiChannels

             

l

l

l

l

 

AO_ContWriteMultiChannelsFromFile

             

l

l

l

l

 

AO_WriteChannel

           

l

l

l

l

l

 

AO_WriteChannelVolt

           

l

l

l

l

l

 

AO_Scale

           

l

l

l

l

l

 

AO_ScaleMultiChannels

             

l

l

l

l

 

CTR_Read

l

           

l

l

l

l

 

CTR_Reset

l

           

l

l

l

l

 

CTR_Setup

l

           

l

l

l

l

 

DIO_ConfigPort

 

l

l

   

l

           

DIO_InLine

l

l

l

l

l

l

l

l

l

l

l

 

DIO_InPort

l

l

l

l

l

l

l

l

l

l

l

 

DIO_OutLine

l

l

l

l

l

l

l

l

l

l

l

 

DIO_OutPort

l

l

l

l

l

l

l

l

l

l

l

 

Register_Card

l

l

l

l

l

l

l

l

l

l

l

l

Release_Card

l

l

l

l

l

l

l

l

l

l

l

l

 

 



©1995 Circuit Specialists, Inc.