D2KLVIEW FunctionRef

Embed Size (px)

Citation preview

  • 7/27/2019 D2KLVIEW FunctionRef

    1/82

    Contents ? 1

    D2K-LVIEW

    LabVIEW ? Interf aces for DAQ-2000 Series

    Windows 98/NT/2000/XP

    Function Reference Manual

  • 7/27/2019 D2KLVIEW FunctionRef

    2/82

    @Copyright 2001-2002 ADLINK Technology Inc.

    All Rights Reserved.

    Manual Rev. 1.31: May 19, 2003

    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.

  • 7/27/2019 D2KLVIEW FunctionRef

    3/82

    Contents ? i

    CONTENTS

    How to Use This Manual...................................................................................... v

    VI Function Descriptions ..................................................................................... 1

    D2K AI Async Check..................................................................................... 1

    D2K AI Async Clear....................................................................................... 1

    D2K AI Async Double Buffer Half Ready............. ......... ......... ......... .......... ... 2

    D2K AI Async Double Buffer Mode .............................................................. 3

    D2K AI Async Double Buffer To File............................................................ 3

    D2K AI Async Double Buffer Transfer......................................................... 3

    D2K AI CH Config.......................................................................................... 4

    D2K AI Config ................................................................................................ 5

    D2K AI Cont Buffer Reset ............................................................................. 6

    D2K AI Cont Buffer Setup............................................................................. 7

    D2K AI Cont Mux Scan ................................................................................. 7

    D2K AI Cont Mux Scan To File ..................................................................... 9

    D2K AI Cont Read Channel ........................................................................ 10

    D2K AI Cont Read Channel To File ............................................................ 12

    D2K AI Cont Read Multiple Channels ........................................................ 14

    D2K AI Cont Read Multiple Channels To File......... ......... ......... ......... ........ 16 D2K AI Cont Scan Channels....................................................................... 18

    D2K AI Cont Scan Channels To File .......................................................... 21

    D2K AI Cont Status ..................................................................................... 23

    D2K AI Cont VScale .................................................................................... 24

    D2K AI Initial Memory Allocated ................................................................ 25

    D2K AI Mux Scan Setup.............................................................................. 25

    D2K AI Read Channel ................................................................................. 26

    D2K AI Read Mux Scan............................................................................... 26 D2K AI Scan Read Channels ...................................................................... 27

    D2K AI Simu Read Channel........................................................................ 28

    D2K AI Volt Scale........................................................................................ 28

    D2K AI Read Channel Volt.......................................................................... 29

    D2K AIO Config........................................................................................... 29

    D2K AO Async Check................................................................................. 30

    D2K AO Async Clear................................................................................... 31

    D2K AO Async Double Buffer Half Ready................................................. 31

  • 7/27/2019 D2KLVIEW FunctionRef

    4/82

    D2K AO Async Double Buffer Mode .......................................................... 32

    D2K AO CH Config...................................................................................... 32

    D2K AO Config............................................................................................ 33

    D2K AO Cont Buffer Compose................................................................... 35

    D2K AO Cont Buffer Reset ......................................................................... 36

    D2K AO Cont Buffer Setup......................................................................... 36

    D2K AO Cont Status ................................................................................... 37

    D2K AO Cont Write Channel ...................................................................... 37

    D2K AO Cont Write Multiple Channels ...................................................... 38

    D2K AO Group FIFO Load .......................................................................... 40

    D2K AO Group Setup.................................................................................. 41

    D2K AO Group Update................................................................................ 41

    D2K AO Group Update Volt ........................................................................ 42

    D2K AO Group WFM Async Check ............................................................ 42 D2K AO Group WFM Async Clear.............................................................. 43

    D2K AO Group WFM Start .......................................................................... 44

    D2K AO Group WFM Stop Config .............................................................. 46

    D2K AO Initial Memory Allocated...... ......... .......... ......... ......... ......... .......... . 46

    D2K AO Simu Write Channel...................................................................... 47

    D2K AO Volt Scale ...................................................................................... 47

    D2K AO Write Channel Volt........................................................................ 48

    D2K AO Write Channel ............................................................................... 49 D2K DB Auto Calibration All ...................................................................... 49

    D2K DI Read Line ........................................................................................ 49

    D2K DI Read Port ........................................................................................ 50

    D2K DIO Port Config ................................................................................... 51

    D2K DO Read Line ...................................................................................... 51

    D2K DO Read Port....................................................................................... 52

    D2K DO Write Line ...................................................................................... 52

    D2K DO Write Port ...................................................................................... 53

    D2K EEPROM Calib Constant Update ....................................................... 53

    D2K GCTR Control ...................................................................................... 54

    D2K GCTR Read.......................................................................................... 54

    D2K GCTR Reset......................................................................................... 55

    D2K GCTR Setup......................................................................................... 55

    D2K GCTR Status........................................................................................ 57

    D2K Load Calib Data................................................................................... 57

    D2K Release Card....................................................................................... 58

    D2K SSI Source Clear ................................................................................. 58

  • 7/27/2019 D2KLVIEW FunctionRef

    5/82

    Contents ? iii

    D2K SSI Source Connect............................................................................ 59

    D2K SSI Source Disconnect....................................................................... 59

    DAQ2005 Acquire AD Error ........................................................................ 60

    DAQ2005 Acquire DA Error ........................................................................ 60

    DAQ2006 Acquire AD Error ........................................................................ 61

    DAQ2006 Acquire DA Error ........................................................................ 61

    DAQ2010 Acquire AD Error ........................................................................ 62

    DAQ2010 Acquire DA Error ........................................................................ 62

    DAQ2204 Acquire AD Error ........................................................................ 63

    DAQ2204 Acquire DA Error ........................................................................ 63

    DAQ2205 Acquire AD Error ........................................................................ 64

    DAQ2205 Acquire DA Error ........................................................................ 64

    DAQ2206 Acquire AD Error ........................................................................ 65

    DAQ2206 Acquire DA Error ........................................................................ 65 DAQ250X Acquire AD Error........................................................................ 66

    DAQ250X Acquire DA Error........................................................................ 66

    Appendix A Error Codes................................................................................... 68

    Appendix B AI Range Codes ........................................................................... 70

    Appendix C AI DATA FORMAT ..................................................................... 71

    Appendix D DATA File FORMAT................................................................... 72

  • 7/27/2019 D2KLVIEW FunctionRef

    6/82

  • 7/27/2019 D2KLVIEW FunctionRef

    7/82

    How to Use This Manual ? v

    How to Use This Manual

    This manual is designed to help you use the D2K-LVIEW software driver for DAQ-2000 series dataacquisition cards. The manual describes how to use the D2K-LVIEW VI library to meet your requirements and help you program your own software applications. It is organized as follows:

    ?? Chapter 1, "VI Function Descriptions" gives the detailed description of each VID2K-LVIEW provided.

    ?? Appendix A, "Error Codes" lists the status codes returned by D2K-LVIEW VIs, aswell as their meanings.

    ?? Appendix B, "AI Range Codes " lists all the valid AI range codes for each card.

    ?? Appendix C, "AI Data Format" lists the AI data format for the card performinganalog input operation, as well as the calculation methods to retrieve the A/Dconversion data and channel.

    ?? Appendix D, "Data File Format" describes the data format of the data filesgenerated by the continuous data acquisition followed by storing the data to disk.

  • 7/27/2019 D2KLVIEW FunctionRef

    8/82

  • 7/27/2019 D2KLVIEW FunctionRef

    9/82

    VI Function Descriptions ? 1

    1

    VI Function Descriptions

    D2K AI Async Check

    Description

    Check the current status of the asynchronous analog input operation.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber :The card id of the card that performs the asynchronous operation.(u16) Buffer : The buffer to contain the input data. Please connect the buffer to the D2K AI

    Cont Buffer Setup VI to this terminal.(i16) Error_In : The error condition occurred before this VI executes. This code default to no

    error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the

    Appendix, Error Codes , for the code descriptions.Output Values

    (i8) Stopped : Whether the asynchronous analog input operation has completed. If Stopped =1, the analog input operation has stopped. Either the number of A/Dconversions indicated in the call that initiated the asynchronous analog inputoperation has completed or an error has occurred. If Stopped = 0, theoperation is not yet complete.

    (u32) AccessCnt : In the condition that trigger acquisition mode is not used, AccessCnt returns thenumber of A/D data that has been transferred at the time calling D2K AI

    Async Check . If any trigger mode is enabled and double-buffered mode isenabled, AccessCnt returns the next position after the position the last A/D datais stored in the circular buffer at the time calling D2K AI Async Check .

    (u16) Buffer : The buffer to contain the input data; copied from the input Buffer .(i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains the same

    value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Async Clear

    Description

    Stop the asynchronous analog input operation.

  • 7/27/2019 D2KLVIEW FunctionRef

    10/82

    2 ? VI Function Descriptions

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber :The card id of the card that performs the asynchronous operation.(i16) Error_In : The error condition occurred before this VI executes. This code default to no

    error. If an error has already occurred, this VI does not perform any operation. A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (u32) StartPos : In the condition that the trigger acquisition mode is not used, StartPos is zero. If

    pre-trigger or middle triggr mode of AI is used, StartPos returns the position of the first A/D data in the data buffer at the time calling D2K AI Async Clear .

    (u32) AccessCnt : In the condition that the trigger acquisition mode is not used, AccessCnt returns

    the number of A/D data that has been transferred at the time calling D2K AI Async Clear . If double-buffered mode is enabled, AccessCnt returns the

    next position the last A/D data in stored in the circular buffer. (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains the same

    value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Async Double Buffer Half Ready

    Description

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

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber :The card id of the card that performs the asynchronous double-bufferedoperation.

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform any operation.

    A value of 0 means no error, a negative value means an error. Refer to the

    Appendix, Error Codes , for the code descriptions.

    Output Values

    (i8) HalfReady : Whether the next half buffer of data is available. 1: available; 0: not availableyet.

    (i8) StopFlag : Whether the asynchronous analog input operation has completed. If StopFlag =1, the analog input operation has stopped. If StopFlag = 0, the operation is notyet complete.

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains the samevalue. Otherwise, Error_Out describes the error status of this VI.

  • 7/27/2019 D2KLVIEW FunctionRef

    11/82

    VI Function Descriptions ? 3

    D2K AI Async Double Buffer Mode

    Description

    Enables or disables double-buffered data acquisition mode.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber :The card id of the card that double-buffered mode to be set. (i8) Enable : Whether the double-buffered mode is enabled or not.

    1: double-buffered mode is enabled.0: double-buffered mode is disabled.

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform any operation.

    A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains the samevalue. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Async Double Buffer To File

    Description

    If the continuous AI function is D2K AI Cont Read Channel To File ,D2K AI Cont Read Multiple Channels To File , D2 K AI Co n t Sc a n Ch a n n e l s To Fi l e or D2K AI Cont Mux Scan To File , calling this function to log the data of the circular buffer into a disk file.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber :The card id of the card that double-buffered mode to be set. (i16) Error_In : The error condition occurred before this VI executes. This code default to no

    error. If an error has already occurred, this VI does not perform any operation.

    A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains the samevalue. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Async Double Buffer Transfer

    Description

  • 7/27/2019 D2KLVIEW FunctionRef

    12/82

    4 ? VI Function Descriptions

    Copies the data of the selected half buffer to user buffer. You can execute this function repeatedly toreturn sequential buffers of the data.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber :The card id of the card that wants to perform this operation. (u16) Index : Which half buffer to copy. It can be 0 or 1. (u16) Buffer : An integer array to contain the acquired data. The size of Buffer must be equal

    to or greater than the size of the buffer that setup with D2K AI Cont Buffer Setup VI. Please refer to Appendix, AI Data Format, for the data format of eachdata value in Buffer .

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform any operation.

    A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values(u16) Buffer : An integer array to contain the acquired data. (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains the same

    value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI CH Config

    Description

    Informs D2K-DASK library of the AI range selected for the specified channel of the card with card ID

    CardNumber . You must call this function before calling function to perform analog input operation.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber :The card id of the card that want to perform this operation. (u16) Channel :The A/D channel wished to do the channel setting.

    Valid values:DAQ2010 : 0 through 3; -1 means all channelsDAQ2005 : 0 through 3; -1 means all channelsDAQ2006 : 0 through 3; -1 means all channelsDAQ2204 : 0 through 63; -1 means all channelsDAQ2205 : 0 through 63; -1 means all channelsDAQ2206 : 0 through 63; -1 means all channelsDAQ2501 : 0 through 7; -1 means all channelsDAQ2502 : 0 through 3; -1 means all channels

    (u16) AdRange_RefGnd :The settings for analog input channel. This argument is an integer expression formed from the addition of one or more of the values. There aretwo groups of values:(1) A/D range Selection

    Please refer to the Appendix B, AI Rang e Codes , for the valid range values.

  • 7/27/2019 D2KLVIEW FunctionRef

    13/82

    VI Function Descriptions ? 5

    (2) A/D reference Ground Selection ( only avai lable for for DAQ- 2204/2205/2206 ) DAQ-2010, DAQ-2005, DAQ-2006, DAQ-2501, DAQ-2502: 0DAQ-2204, DAQ-2205, DAQ2206:

    0 : Referenced single ended mode ( 64chs common to ground systemon board)

    256 : Differential mode512 : Non-referenced single ended mode ( 64chs common to AISENSEpin )

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform any operation.

    A value of 0 means no error, a negative value means an error. Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains the samevalue. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Config

    Description

    Informs D2K-DASK library of the trigger source, trigger mode, input mode and trigger properties for the DAQ-2000 device with card ID CardNumber . You must call this function before calling function toperform continuous analog input operation.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber :The card id of the card that want to perform this operation. (u16) ConfigCtrl : The setting for A/D configuration control. This argument is an integer

    expression formed from the addition of one or more of the values. There aretwo groups of values:

    (1) A/D Conversion Source Selection 0 : Internal timer 4: From AFI0 pin8: From SSI source12: From AFI1 pin (on ly available for DAQ-2501/2502 )

    (2) A/D Delay Counter Source Selection ( only avai lable for DAQ- 2501/2502 )

    0 : Internal timer 16: From AFI1 pin32: From GPTC0_OUT48: From GPTC1_OUT

    (u32) TrigCtrl : The setting for A/D Trigger control. This argument is an integer expressionformed from the addition of one or more of the values. There are seven groupsof values:

    (1) Trigger Source Selection 0 : software1 : From analog trigger pin

  • 7/27/2019 D2KLVIEW FunctionRef

    14/82

    6 ? VI Function Descriptions

    2 : From external digital trigger pin3 : From SSI source

    (2) Trigger Mode Selection 0 : Post Trigger Mode8 : Delay Trigger Mode16 : Pre-Trigger Mode

    24 : Middle-Trigger Mode(3) Delay Source Selection 256 : delay in samples0 : delay in time base

    (4) Re-Trigger Mode Enable 128 : Re-trigger in an acquisition is enabled

    (5) MCounter EnableThis constant is only valid for Pre-trigger and Middle trigger mode 1024 : Mcounter is enabled and then the trigger signal is ignore before M

    terminal count is reached.(6) External Digital Trigger Polarity

    0 : Trigger positive edge active4096 : Trigger negative edge active

    (u32) MidOrDlyScans : This argument is only valid for middle trigger and delay trigger mode.For midd le t r igger , MidOrDlyScans indicates the number of data will beaccessed after a specific trigger event.For delay t r igger , MidOrDlyScans indicates the number of data or timer ticks will be ignored after a specific trigger event.

    (u16) MCnt : The counter value of MCounter . This argument is only valid for pre-trigger and middle trigger mode.

    (u16) ReTrgCnt : The accepted trigger times in an acquisition. This argument is only valid for delay trigger and post trigger mode.

    (i8) AutoResetBuf :0 : The AI buffers set by function D2K AI Cont Buffer Setup are

    retained and must call function D2K AI Cont Buffer Reset to resetthe buffer

    1 : The AI buffers set by function D2K AI Cont Buffer Setup are resetautomatically by driver while the AI operation is finished

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values(i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains the

    same value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Cont Buffer Reset

    Description

    This function reset all the buffers set by function D2K AI Cont Buffer Setup for continuousanalog input. The function has to be called if the data buffers wont be used.

    Cards Support

  • 7/27/2019 D2KLVIEW FunctionRef

    15/82

    VI Function Descriptions ? 7

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber : The card id of the card that want to perform this operation. (i16) Error_In : The error condition occurred before this VI executes. This code default to no

    error. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Cont Buffer Setup

    Description

    This function set up the buffer for continuous analog input. The function has to be called repeatedlyto setup all of the data buffers (at most 2 buffers).

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber : The card id of the card that want to perform this operation. (u16) Buffer : The buffer to contain the input data. (u32) ReadCount : The size (in samples) of the buffer and its value must be even. (i16) Error_In : The error condition occurred before this VI executes. This code default to no

    error. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (u16) BufferId : Returns the index of the buffer currently set up.(u16) Buffer : The buffer to contain the input data. (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains the

    same value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Cont Mux Scan

    Description

    This function initializes the Channel-Gain Queue to point to the start of the scan sequence asspecified by D2K AI Mux Scan Setup and starts a multiple-channel scanned data acquisitionoperation. This function is only available for Mult ip lexed AD card (e.g. DAQ-2205).

    Cards Support

    2204, 2205, 2206

    Input Values

    (u16) CardNumber : The card ID of the card that want to perform this operation.

  • 7/27/2019 D2KLVIEW FunctionRef

    16/82

    8 ? VI Function Descriptions

    (u16) BufId : The buffer ID (returned from function D2K AI Cont Buffer Setup ) of the buffer containing the acquired data. The size of the buffer with buffer idof BufId must have a length equal to or greater than the value of parameter ScanCount . If double-buffered mode is enabled, the starting buffer idshould be 0. You can ignore this argument. Please refer to Appendix C, A I Data Format for the data format in the buffer with BufId .

    (u32) ReadScans : If double-buffered mode is disabled, the total number of scans to beperformed. For double-buffered acquisition, ReadScans is the size (insamples) allocated for each channel in the circular buffer. This value mustbe a multiple of 2.

    (u32) ScanIntrv : The length of the scan interval (that is, the counter value between theinitiation of each scan sequence). The scan rate will be TimeBase/ScanIntrv .The value of TimeBase depends on the card type.If the timer base is from external , the valid range of the value is 2 through16777215. If the timer base is Internal timer , the valid range of the value isas follows:DAQ -2204 : 14 through 16777215

    DAQ -2205 : 80 through 16777215DAQ -2206 : 160 through 16777215

    (u32) SampIntrv : The length of the sample interval (that is, the counter value between each A/D conversion within a scan sequence). The A/D conversion rate will beTimeBase/SampIntrv . The value of TimeBase depends on the card type.If the timer base is from external , the valid range of the value is 2 through65535.If the timer base is Internal timer , the valid range of the value is as follows:DAQ -2204 : 14 through 65535DAQ -2205 : 80 through 65535DAQ -2206 : 160 through 65535

    For example :

    Acquisit ion_in_progress

    Scan_start

    AD_conversion

    Scan_in_progress

    3 Scans, 4 Samples per scan(PSC_Counter=3, NumChan_Counter=4)

    Sampling Interval t=SI2_COUNTER/TimeBase

    Scan Interval T=SI_COUNTER/TimeBase

    Ch2Ch3

    Ch1Ch0

    Ch2Ch3

    Ch1Ch0

    Ch2Ch3

    Ch1Ch0

    ( channel sequences are specified in Channel Gain Queue)

    Figure. Scan Timing

    Note: if the card is Simul taneous AD card (e.g. DAQ-2010), the parameter SampIntrv is of no use.

  • 7/27/2019 D2KLVIEW FunctionRef

    17/82

    VI Function Descriptions ? 9

    (u16) SyncMode : Whether this operation is performed synchronously or asynchronously. If pre-/middle trigger mode is enabled by calling D2K AI Config , thisoperation should be performed asynchronously .Valid values:1 : synchronous A/D conversion, that is, the function does not return until

    the A/D operation complete.2 : asynchronous A/D conversion

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Cont Mux Scan To File

    Description

    Initializes the Channel-Gain Queue to point to the start of the scan sequence as specified by D2K AI Mux Scan Setup , starts a multiple-channel scanned data acquisition operation and saves the

    acquired data in a disk file. The data is written to disk in binary format, with the lower byte first (littleendian). Please refer to Appendix D, Data File Format for the data file structure and Appendix C, A I Data Format for the format of the data in the data file. This function takes advantage of the DAQ-2000 channel-gain that can be set separately for each channel to perform multi-channel/gain analoginput. This function is only available for Mult ip lexed AD card (e.g. DAQ-2205).

    Cards Support2204, 2205, 2206

    Input Values

    (u16) CardNumber : The card ID of the card that want to perform this operation.(u16) BufId : The buffer ID (returned from function D2K AI Cont Buffer Setup ) of

    the buffer containing the acquired data. The size of the buffer with buffer idof BufId must have a length equal to or greater than the value of parameter ReadScans . If double-buffered mode is enabled, the starting buffer idshould be 0. You can ignore this argument. Please refer to Appendix C, A I Data Format for the data format in the buffer with BufId .

    (abc) FileName : Name of data file which stores the acquired data(u32) ReadScans : If double-buffered mode is disabled, the total number of scans to be

    performed. For double-buffered acquisition, ReadScans is the size (insamples) allocated for each channel in the circular buffer. This value mustbe a multiple of 2.

    (u32) ScanIntrv : The length of the scan interval (that is, the counter value between theinitiation of each scan sequence). The scan rate will be TimeBase/ScanIntrv .The value of TimeBase depends on the card type.If the timer base is from external , the valid range of the value is 2 through16777215. If the timer base is Internal timer , the valid range of the value isas follows:DAQ -2204 : 14 through 16777215

  • 7/27/2019 D2KLVIEW FunctionRef

    18/82

    10 ? VI Function Descriptions

    DAQ -2205 : 80 through 16777215DAQ -2206 : 160 through 16777215

    (u32) SampIntrv : The length of the sample interval (that is, the counter value between each A/D conversion within a scan sequence). The A/D conversion rate will beTimeBase/SampIntrv . The value of TimeBase depends on the card type.If the timer base is from external , the valid range of the value is 2 through

    65535.If the timer base is Internal timer , the valid range of the value is as follows:DAQ -2204 : 14 through 65535DAQ -2205 : 80 through 65535DAQ -2206 : 160 through 65535

    For example :

    Acquisit ion_in_progress

    Scan_start

    AD_conversion

    Scan_in_progress

    3 Scans, 4 Samples per scan(PSC_Counter=3, NumChan_Counter=4)

    Sampling Interval t=SI2_COUNTER/TimeBase

    Scan Interval T=SI_COUNTER/TimeBase

    Ch2Ch3

    Ch1Ch0

    Ch2Ch3

    Ch1Ch0

    Ch2Ch3

    Ch1Ch0

    ( channel sequences are specified in Channel Gain Queue)

    Figure. Scan Timing

    Note: if the card is Simul taneous AD card (e.g. DAQ-2010), the parameter SampIntrv is of no use.

    (u16) SyncMode : Whether this operation is performed synchronously or asynchronously. If pre/middle trigger mode is enabled by calling D2K AI Config , thisoperation should be performed asynchronously .Valid values:1 : synchronous A/D conversion, that is, the function does not return until

    the A/D operation complete.2 : asynchronous A/D conversion

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Cont Read Channel

  • 7/27/2019 D2KLVIEW FunctionRef

    19/82

    VI Function Descriptions ? 11

    Description

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

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values(u16) CardNumber : The card id of the card that want to perform this operation. (u16) Channel : Analog input channel number

    Range: 0 through 3 for DAQ-2010, DAQ-2005, DAQ-2006, DAQ-2502Range: 0 through 63 for DAQ-2204, DAQ-2205, DAQ-2206Range: 0 through 7 for DAQ-2501

    (u16) BufId : The buffer ID (returned from function D2K AI Cont Buffer Setup ) of the buffer containing the acquired data. The size of the buffer with buffer idof BufId must have a length equal to or greater than the value of parameter ReadScans . If double-buffered mode is enabled, the starting buffer idshould be 0. You can ignore this argument. Please refer to Appendix C, A I Data Format for the data format in the buffer with BufId .

    (u32) ReadScans : If double-buffered mode is disabled, the total number of scans to beperformed. For double-buffered acquisition, ReadScans is the size (insamples) allocated for each channel in the circular buffer. This value mustbe a multiple of 2.

    (u32) ScanIntrv : The length of the scan interval (that is, the counter value between theinitiation of each scan sequence). The scan rate will be TimeBase/ScanIntrv .The value of TimeBase depends on the card type.If the timer base is from external , the valid range of the value is 2 through16777215. If the timer base is Internal timer , the valid range of the value isas follows:DAQ -2010 : 20 through 16777215DAQ -2005 : 80 through 16777215DAQ -2006 : 160 through 16777215DAQ -2204 : 14 through 16777215DAQ -2205 : 80 through 16777215DAQ -2206 : 160 through 16777215DAQ -2501 : 100 through 16777215DAQ -2502 : 100 through 16777215

    (u32) SampIntrv : The length of the sample interval (that is, the counter value between each A/D conversion within a scan sequence). The A/D conversion rate will be

    TimeBase/SampIntrv . The value of TimeBase depends on the card type.If the timer base is from external , the valid range of the value is 2 through65535.If the timer base is Internal timer , the valid range of the value is as follows:DAQ -2010 : invalidDAQ -2005 : invalidDAQ -2006 : invalidDAQ -2204 : 14 through 65535DAQ -2205 : 80 through 65535DAQ -2206 : 160 through 65535DAQ -2501 : 100 through 16777215

    DAQ -2502 : 100 through 16777215

  • 7/27/2019 D2KLVIEW FunctionRef

    20/82

    12 ? VI Function Descriptions

    For example :

    Acquisit ion_in_progress

    Scan_start

    AD_conversion

    Scan_in_progress

    3 Scans, 4 Samples per scan(PSC_Counter=3, NumChan_Counter=4)

    Sampling Interval t=SI2_COUNTER/TimeBase

    Scan Interval T=SI_COUNTER/TimeBase

    Ch2Ch3

    Ch1Ch0

    Ch2Ch3

    Ch1

    Ch0

    Ch2Ch3

    Ch1Ch0

    ( channel sequences are specified in Channel Gain Queue)

    Figure. Scan Timing

    Note: if the card is Simul taneous AD card (e.g. DAQ-2010), the parameter SampIntrv is of no use.

    (u16) SyncMode : Whether this operation is performed synchronously or asynchronously. If pre-/middle trigger mode is enabled by calling D2K AI Config , thisoperation should be performed asynchronously .Valid values:1 : synchronous A/D conversion, that is, the function does not return until

    the A/D operation complete.2 : asynchronous A/D conversion

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Cont Read Channel To File

    Description

    This function performs continuous A/D conversions on the specified analog input channel at a rateas close to the rate you specified and saves the acquired data in a disk file. The data is written todisk in binary format, with the lower byte first (little endian). Please refer to Appendix D, Data File Format for the data file structure and Appendix C, AI Data Format for the format of the data in thedata file.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

  • 7/27/2019 D2KLVIEW FunctionRef

    21/82

    VI Function Descriptions ? 13

    (u16) CardNumber : The card id of the card that want to perform this operation. (u16) Channel : Analog input channel number

    Range: 0 through 3 for DAQ-2010, DAQ-2005, DAQ-2006, DAQ-2502Range: 0 through 63 for DAQ-2204, DAQ-2205, DAQ-2206Range: 0 through 7 for DAQ-2501

    (u16) BufId : The buffer ID (returned from function D2K AI Cont Buffer Setup ) of

    the buffer containing the acquired data. The size of the buffer with buffer idof BufId must have a length equal to or greater than the value of parameter ReadScans . If double-buffered mode is enabled, the starting buffer idshould be 0. You can ignore this argument. Please refer to Appendix C, A I Data Format for the data format in the buffer with BufId .

    (abc) FileName : Name of data file which stores the acquired data(u32) ReadScans : If double-buffered mode is disabled, the total number of scans to be

    performed. For double-buffered acquisition, ReadScans is the size (insamples) allocated for each channel in the circular buffer. This value mustbe a multiple of 2.

    (u32) ScanIntrv : The length of the scan interval (that is, the counter value between the

    initiation of each scan sequence). The scan rate will be TimeBase/ScanIntrv .The value of TimeBase depends on the card type.If the timer base is from external , the valid range of the value is 2 through16777215. If the timer base is Internal timer , the valid range of the value isas follows:DAQ -2010 : 20 through 16777215DAQ -2005 : 80 through 16777215DAQ -2006 : 160 through 16777215DAQ -2204 : 14 through 16777215DAQ -2205 : 80 through 16777215DAQ -2206 : 160 through 16777215

    DAQ -2501 : 100 through 16777215DAQ -2502 : 100 through 16777215

    (u32) SampIntrv : The length of the sample interval (that is, the counter value between each A/D conversion within a scan sequence). The A/D conversion rate will beTimeBase/SampIntrv . The value of TimeBase depends on the card type.If the timer base is from external , the valid range of the value is 2 through65535.If the timer base is Internal timer , the valid range of the value is as follows:DAQ -2010 : invalidDAQ -2005 : invalidDAQ -2006 : invalidDAQ -2204 : 14 through 65535DAQ -2205 : 80 through 65535DAQ -2206 : 160 through 65535DAQ -2501 : 100 through 16777215DAQ -2502 : 100 through 16777215

    For example :

  • 7/27/2019 D2KLVIEW FunctionRef

    22/82

    14 ? VI Function Descriptions

    Acquisit ion_in_progress

    Scan_start AD_conversion

    Scan_in_progress

    3 Scans, 4 Samples per scan(PSC_Counter=3, NumChan_Counter=4)

    Sampling Interval t=SI2_COUNTER/TimeBase

    Scan Interval T=SI_COUNTER/TimeBase

    Ch2Ch3

    Ch1Ch0

    Ch2Ch3

    Ch1Ch0

    Ch2Ch3

    Ch1Ch0

    ( channel sequences are specified in Channel Gain Queue)

    Figure. Scan Timing

    Note: if the card is Simul taneous AD card (e.g. DAQ-2010), the parameter SampIntrv is of no use.

    (u16) SyncMode : Whether this operation is performed synchronously or asynchronously. If pre-/middle trigger mode is enabled by calling D2K AI Config , thisoperation should be performed asynchronously .Valid values:1 : synchronous A/D conversion, that is, the function does not return until

    the A/D operation complete.2 : asynchronous A/D conversion

    (i16) Error_In : The error condition occurred before this VI executes. This code default to no

    error. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Cont Read Multiple Channels

    Description

    This function performs continuous A/D conversions on the specified analog input channels at a rateas close to the rate you specified. This function takes advantage of the DAQ-2000 channel-gain thatcan be set separately for each channel to perform multi-channel/gain analog input.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber : The card ID of the card that want to perform this operation.(u16) numChans : The number of analog input channels in the array Chans . The valid value:

    DAQ-2010: 1 through 4

  • 7/27/2019 D2KLVIEW FunctionRef

    23/82

    VI Function Descriptions ? 15

    DAQ-2005: 1 through 4DAQ-2006: 1 through 4DAQ-2204: 1 through 512DAQ-2205: 1 through 512DAQ-2206: 1 through 512DAQ-2501: 1 through 8

    DAQ-2502: 1 through 4(u16) Chans : Array of analog input channel numbers.DAQ-2010: numbers in Chans must be within 0 and 3.DAQ-2005: numbers in Chans must be within 0 and 3.DAQ-2006: numbers in Chans must be within 0 and 3.DAQ-2204: numbers in Chans must be within 0 and 63.DAQ-2205: numbers in Chans must be within 0 and 63.DAQ-2206: numbers in Chans must be within 0 and 63.DAQ-2501: numbers in Chans must be within 0 and 7.DAQ-2502: numbers in Chans must be within 0 and 3.

    (u16) BufId : The buffer ID (returned from function D2K AI Cont Buffer Setup ) of

    the buffer containing the acquired data. The size of the buffer with buffer idof BufId must have a length equal to or greater than the value of parameter ReadScans . If double-buffered mode is enabled, The starting buffer idshould be 0. You can ignore this argument. Please refer to Appendix C, A I Data Format for the data format in the buffer with BufId .

    (u32) ReadScans : If double-buffered mode is disabled, the total number of scans to beperformed. For double-buffered acquisition, ReadScans is the size (insamples) allocated for each channel in the circular buffer. This value mustbe a multiple of 2.

    (u32) ScanIntrv : The length of the scan interval (that is, the counter value between theinitiation of each scan sequence). The scan rate will be TimeBase/ScanIntrv .

    The value of TimeBase depends on the card type.If the timer base is from external , the valid range of the value is 2 through16777215. If the timer base is Internal timer , the valid range of the value isas follows:DAQ -2010 : 20 through 16777215DAQ -2005 : 80 through 16777215DAQ -2006 : 160 through 16777215DAQ -2204 : 14 through 16777215DAQ -2205 : 80 through 16777215DAQ -2206 : 160 through 16777215DAQ -2501 : 100 through 16777215DAQ -2502 : 100 through 16777215

    (u32) SampIntrv : The length of the sample interval (that is, the counter value between each A/D conversion within a scan sequence). The A/D conversion rate will beTimeBase/SampIntrv . The value of TimeBase depends on the card type.If the timer base is from external , the valid range of the value is 2 through65535.If the timer base is Internal timer , the valid range of the value is as follows:DAQ -2010 : invalidDAQ -2005 : invalidDAQ -2006 : invalidDAQ -2204 : 14 through 65535DAQ -2205 : 80 through 65535

  • 7/27/2019 D2KLVIEW FunctionRef

    24/82

    16 ? VI Function Descriptions

    DAQ -2206 : 160 through 65535DAQ -2501 : 100 through 16777215DAQ -2502 : 100 through 16777215

    For example :

    Acquisit ion_in_progress

    Scan_start

    AD_conversion

    Scan_in_progress

    3 Scans, 4 Samples per scan(PSC_Counter=3, NumChan_Counter=4)

    Sampling Interval t=SI2_COUNTER/TimeBase

    Scan Interval T=SI_COUNTER/TimeBase

    Ch2Ch3

    Ch1Ch0

    Ch2Ch3

    Ch1Ch0

    Ch2Ch3

    Ch1Ch0

    ( channel sequences are specified in Channel Gain Queue)

    Figure. Scan Timing

    Note: if the card is Simul taneous AD card (e.g. DAQ-2010), the parameter SampIntrv is of no use.

    (u16) SyncMode : Whether this operation is performed synchronously or asynchronously. If pre-/middle trigger mode is enabled by calling D2K AI Config , thisoperation should be performed asynchronously .Valid values:1 : synchronous A/D conversion, that is, the function does not return until

    the A/D operation complete.2 : asynchronous A/D conversion

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Cont Read Multiple Channels To File

    Description

    This function performs continuous A/D conversions on the specified analog input channels at a rateas close to the rate you specified and saves the acquired data in a disk file. The data is written todisk in binary format, with the lower byte first (little endian). Please refer to Appendix D, Data File Format for the data file structure and Appendix C, AI Data Format for the format of the data in thedata file. This function takes advantage of the DAQ-2000 channel-gain that can be set separately for each channel to perform multi-channel/gain analog input.

  • 7/27/2019 D2KLVIEW FunctionRef

    25/82

    VI Function Descriptions ? 17

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber : The card ID of the card that want to perform this operation.(u16) numChans : The number of analog input channels in the array Chans . The valid value:

    DAQ-2010: 1 through 4 DAQ-2005: 1 through 4DAQ-2006: 1 through 4DAQ-2204: 1 through 512DAQ-2205: 1 through 512DAQ-2206: 1 through 512DAQ-2501: 1 through 8DAQ-2502: 1 through 4

    (u16) Chans : Array of analog input channel numbers.DAQ-2010: numbers in Chans must be within 0 and 3.DAQ-2005: numbers in Chans must be within 0 and 3.

    DAQ-2006: numbers in Chans must be within 0 and 3.DAQ-2204: numbers in Chans must be within 0 and 63.DAQ-2205: numbers in Chans must be within 0 and 63.DAQ-2206: numbers in Chans must be within 0 and 63.DAQ-2501: numbers in Chans must be within 0 and 7.DAQ-2502: numbers in Chans must be within 0 and 3.

    (u16) BufId : The buffer ID (returned from function D2K AI Cont Buffer Setup ) of the buffer containing the acquired data. The size of the buffer with buffer idof BufId must have a length equal to or greater than the value of parameter ReadScans . If double-buffered mode is enabled, the starting buffer idshould be 0. You can ignore this argument. Please refer to Appendix C, A I

    Data Format for the data format in the buffer with BufId . (abc) FileName : Name of data file which stores the acquired data(u32) ReadScans : If double-buffered mode is disabled, the total number of scans to be

    performed. For double-buffered acquisition, ReadScans is the size (insamples) allocated for each channel in the circular buffer. This value mustbe a multiple of 2.

    (u32) ScanIntrv : The length of the scan interval (that is, the counter value between theinitiation of each scan sequence). The scan rate will be TimeBase/ScanIntrv .The value of TimeBase depends on the card type.If the timer base is from external , the valid range of the value is 2 through16777215. If the timer base is Internal timer , the valid range of the value is

    as follows:DAQ -2010 : 20 through 16777215DAQ -2005 : 80 through 16777215DAQ -2006 : 160 through 16777215DAQ -2204 : 14 through 16777215DAQ -2205 : 80 through 16777215DAQ -2206 : 160 through 16777215DAQ -2501 : 100 through 16777215DAQ -2502 : 100 through 16777215

    (u32) SampIntrv : The length of the sample interval (that is, the counter value between each A/D conversion within a scan sequence). The A/D conversion rate will beTimeBase/SampIntrv . The value of TimeBase depends on the card type.

  • 7/27/2019 D2KLVIEW FunctionRef

    26/82

    18 ? VI Function Descriptions

    If the timer base is from external , the valid range of the value is 2 through65535.If the timer base is Internal timer , the valid range of the value is as follows:DAQ -2010 : invalidDAQ -2005 : invalidDAQ -2006 : invalid

    DAQ -2204 : 14 through 65535DAQ -2205 : 80 through 65535DAQ -2206 : 160 through 65535DAQ -2501 : 100 through 16777215DAQ -2502 : 100 through 16777215

    For example :

    Acquisit ion_in_progress

    Scan_start

    AD_conversion

    Scan_in_progress

    3 Scans, 4 Samples per scan(PSC_Counter=3, NumChan_Counter=4)

    Sampling Interval t=SI2_COUNTER/TimeBase

    Scan Interval T=SI_COUNTER/TimeBase

    Ch2Ch3

    Ch1Ch0

    Ch2Ch3

    Ch1Ch0

    Ch2Ch3

    Ch1Ch0

    ( channel sequences are specified in Channel Gain Queue)

    Figure. Scan Timing

    Note: if the card is Simul taneous AD card (e.g. DAQ-2010), the parameter SampIntrv is of no use.

    (u16) SyncMode : Whether this operation is performed synchronously or asynchronously. If pre-/middle trigger mode is enabled by calling D2K AI Config , thisoperation should be performed asynchronously .Valid values:1 : synchronous A/D conversion, that is, the function does not return until

    the A/D operation complete.2 : asynchronous A/D conversion

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Cont Scan Channels

  • 7/27/2019 D2KLVIEW FunctionRef

    27/82

    VI Function Descriptions ? 19

    Description

    This function performs continuous A/D conversions on the specified continuous analog inputchannels at a rate as close to the rate you specified. This function takes advantage of the hardwaresimultaneous or auto-scan functionality to perform multi-channel analog input.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber : The card ID of the card that want to perform this operation.(u16) Channel : The largest channel number of specified continuous analog input channel.

    The channel order for acquiring data is as follows: DAQ-2010: number of Channel must be within 0 and 3. The continuous scan

    sequence is ascending and the first one must be zero, for example, 0, 1, 2, 3.

    DAQ-2005: number of Channel must be within 0 and 3. The continuous scansequence is ascending and the first one must be zero, for example, 0, 1, 2, 3.

    DAQ-2006: number of Channel must be within 0 and 3. The continuous scansequence is ascending and the first one must be zero, for example, 0, 1, 2, 3.

    DAQ-2204: number of Channel must be within 0 and 63. The continuousscan sequence is ascending and the first one must be zero, for example, 0, 1, 2, 3.

    DAQ-2205: number of Channel must be within 0 and 63. The continuousscan sequence is ascending and the first one must be zero, for example, 0, 1, 2, 3.

    DAQ-2206: number of Channel must be within 0 and 63. The continuousscan sequence is ascending and the first one must be zero, for example, 0, 1, 2, 3.

    DAQ-2501: number of Channel must be within 0 and 7. The continuous scansequence is ascending and the first one must be zero, for example, 0, 1, 2, 3.

    DAQ-2502: number of Channel must be within 0 and 3. The continuous scansequence is ascending and the first one must be zero, for example, 0, 1, 2, 3.

    (u16) BufId : The buffer ID (returned from function D2K AI Cont Buffer Setup ) of the buffer containing the acquired data. The size of the buffer with buffer idof BufId must have a length equal to or greater than the value of parameter

    ReadScans . If double-buffered mode is enabled, the starting buffer idshould be 0. You can ignore this argument. Please refer to Appendix C, A I Data Format for the data format in the buffer with BufId .

    (u32) ReadScans : If double-buffered mode is disabled, the total number of scans to beperformed. For double-buffered acquisition, ReadScans is the size (insamples) allocated for each channel in the circular buffer. This value mustbe a multiple of 2.

    (u32) ScanIntrv : The length of the scan interval (that is, the counter value between theinitiation of each scan sequence). The scan rate will be TimeBase/ScanIntrv .The value of TimeBase depends on the card type.If the timer base is from external , the valid range of the value is 2 through

    16777215. If the timer base is Internal timer , the valid range of the value is

  • 7/27/2019 D2KLVIEW FunctionRef

    28/82

    20 ? VI Function Descriptions

    as follows:DAQ -2010 : 20 through 16777215DAQ -2005 : 80 through 16777215DAQ -2006 : 160 through 16777215DAQ -2204 : 14 through 16777215DAQ -2205 : 80 through 16777215

    DAQ -2206 : 160 through 16777215DAQ -2501 : 100 through 16777215DAQ -2502 : 100 through 16777215

    (u32) SampIntrv : The length of the sample interval (that is, the counter value between each A/D conversion within a scan sequence). The A/D conversion rate will beTimeBase/SampIntrv . The value of TimeBase depends on the card type.If the timer base is from external , the valid range of the value is 2 through65535. If the timer base is Internal timer , the valid range of the value is asfollows:DAQ -2010 : invalidDAQ -2005 : invalid

    DAQ -2006 : invalidDAQ -2204 : 14 through 65535DAQ -2205 : 80 through 65535DAQ -2206 : 160 through 65535DAQ -2501 : 100 through 16777215DAQ -2502 : 100 through 16777215

    For example :

    Acquisit ion_in_progress

    Scan_start

    AD_conversion

    Scan_in_progress

    3 Scans, 4 Samples per scan(PSC_Counter=3, NumChan_Counter=4)

    Sampling Interval t=

    SI2_COUNTER/TimeBase

    Scan Interval T=

    SI_COUNTER/TimeBase

    Ch2Ch3

    Ch1Ch0

    Ch2Ch3

    Ch1Ch0

    Ch2Ch3

    Ch1Ch0

    ( channel sequences are specified in Channel Gain Queue)

    Figure. Scan Timing

    Note: if the card is Simul taneous AD card (e.g. DAQ-2010), the parameter SampIntrv is invalid.

    (u16) SyncMode : Whether this operation is performed synchronously or asynchronously. If pre-/middle trigger mode is enabled by calling D2K AI Config , thisoperation should be performed asynchronously .Valid values:1 : synchronous A/D conversion, that is, the function does not return until

    the A/D operation complete.

  • 7/27/2019 D2KLVIEW FunctionRef

    29/82

    VI Function Descriptions ? 21

    2 : asynchronous A/D conversion

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Cont Scan Channels To File

    Description

    This function performs continuous A/D conversions on the specified continuous analog inputchannels at a rate as close to the rate you specified and saves the acquired data in a disk file. Thedata is written to disk in binary format, with the lower byte first (little endian). Please refer to

    Appendix D, Data File Format for the data file structure and Appendix C, AI Data Format for theformat of the data in the data file. This function takes advantage of the hardware simultaneous or auto-scan functionality to perform multi-channel analog input.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber : The card ID of the card that want to perform this operation.(u16) Channel : The largest channel number of specified continuous analog input channel.

    The channel order for acquiring data is as follows:

    DAQ-2010: number of Channel must be within 0 and 3. The continuous scansequence is ascending and the first one must be zero, for example, 0, 1, 2, 3.

    DAQ-2005: number of Channel must be within 0 and 3. The continuous scansequence is ascending and the first one must be zero, for example, 0, 1, 2, 3.

    DAQ-2006: number of Channel must be within 0 and 3. The continuous scansequence is ascending and the first one must be zero, for example, 0, 1, 2, 3.

    DAQ-2204: number of Channel must be within 0 and 63. The continuousscan sequence is ascending and the first one must be zero, for example, 0, 1, 2, 3.

    DAQ-2205: number of Channel must be within 0 and 63. The continuousscan sequence is ascending and the first one must be zero, for example, 0, 1, 2, 3.

    DAQ-2206: number of Channel must be within 0 and 63. The continuousscan sequence is ascending and the first one must be zero, for example, 0, 1, 2, 3.

    DAQ-2501: number of Channel must be within 0 and 7. The continuous scansequence is ascending and the first one must be zero, for example, 0, 1, 2, 3.

  • 7/27/2019 D2KLVIEW FunctionRef

    30/82

    22 ? VI Function Descriptions

    DAQ-2502: number of Channel must be within 0 and 3. The continuous scansequence is ascending and the first one must be zero, for example, 0, 1, 2, 3.

    (u16) BufId : The buffer ID (returned from function D2K AI Cont Buffer Setup ) of the buffer containing the acquired data. The size of the buffer with buffer idof BufId must have a length equal to or greater than the value of parameter

    ReadScans . If double-buffered mode is enabled, the starting buffer idshould be 0. You can ignore this argument. Please refer to Appendix C, A I Data Format for the data format in the buffer with BufId .

    (abc) FileName : Name of data file which stores the acquired data(u32) ReadScans : If double-buffered mode is disabled, the total number of scans to be

    performed. For double-buffered acquisition, ReadScans is the size (insamples) allocated for each channel in the circular buffer. This value mustbe a multiple of 2.

    (u32) ScanIntrv : The length of the scan interval (that is, the counter value between theinitiation of each scan sequence). The scan rate will be TimeBase/ScanIntrv .The value of TimeBase depends on the card type.

    If the timer base is from external , the valid range of the value is 2 through16777215. If the timer base is Internal timer , the valid range of the value isas follows:DAQ -2010 : 20 through 16777215DAQ -2005 : 80 through 16777215DAQ -2006 : 160 through 16777215DAQ -2204 : 14 through 16777215DAQ -2205 : 80 through 16777215DAQ -2206 : 160 through 16777215DAQ -2501 : 100 through 16777215DAQ -2502 : 100 through 16777215

    (u32) SampIntrv : The length of the sample interval (that is, the counter value between each A/D conversion within a scan sequence). The A/D conversion rate will beTimeBase/SampIntrv . The value of TimeBase depends on the card type.If the timer base is from external , the valid range of the value is 2 through65535. If the timer base is Internal timer , the valid range of the value is asfollows:DAQ -2010 : invalidDAQ -2005 : invalidDAQ -2006 : invalidDAQ -2204 : 14 through 65535DAQ -2205 : 80 through 65535DAQ -2206 : 160 through 65535DAQ -2501 : 100 through 16777215DAQ -2502 : 100 through 16777215

    For example :

  • 7/27/2019 D2KLVIEW FunctionRef

    31/82

    VI Function Descriptions ? 23

    Acquisit ion_in_progress

    Scan_start AD_conversion

    Scan_in_progress

    3 Scans, 4 Samples per scan(PSC_Counter=3, NumChan_Counter=4)

    Sampling Interval t=SI2_COUNTER/TimeBase

    Scan Interval T=SI_COUNTER/TimeBase

    Ch2Ch3

    Ch1Ch0

    Ch2Ch3

    Ch1Ch0

    Ch2Ch3

    Ch1Ch0

    ( channel sequences are specified in Channel Gain Queue)

    Figure. Scan Timing

    Note: if the card is Simul taneous AD card (e.g. DAQ-2010), the parameter SampIntrv is invalid.

    (u16) SyncMode : Whether this operation is performed synchronously or asynchronously. If pre-/middle trigger mode is enabled by calling D2K AI Config , thisoperation should be performed asynchronously .Valid values:1 : synchronous A/D conversion, that is, the function does not return until

    the A/D operation complete.2 : asynchronous A/D conversion

    (i16) Error_In : The error condition occurred before this VI executes. This code default to no

    error. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Cont Status

    Description

    While performing continuous A/D conversions, this function is called to get the A/D status. Pleaserefer to the manual for your device for the AI status the device might meet.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber : The card id of the card that want to perform this operation. (i16) Error_In : The error condition occurred before this VI executes. This code default to no

    error. If an error has already occurred, this VI does not perform any

  • 7/27/2019 D2KLVIEW FunctionRef

    32/82

    24 ? VI Function Descriptions

    operation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    Status : The continuous AI status returned. The description of the parameter Status for various card types is the following:DAQ2010, 2005, 2006, 2204, 2205, 2206:bit 0 : '1' indicates A/D FIFO is emptybit 1 : '1' indicates A/D FIFO is Half Fullbit 2 : '1' indicates A/D FIFO is Full

    bit 3 ~ 15 : not used

    DAQ2501, 2502:bit 0 : '1' indicates A/D FIFO is emptybit 1 : '1' indicates A/D FIFO is Half Full

    bit 2 : '1' indicates A/D FIFO is Full

    bit 3 : '1' indicates A/D FIFO is Almost Empty bit 4 : '1' indicates A/D FIFO is Almost Full bit 5 ~ 15 : not used

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Cont VScale

    Description

    This function converts the values of an array of acquired binary data from an continuous A/Dconversion call to the actual input voltages. The acquires binary data in the reading array might

    include the channel information (please refer to continuous functions, D2K AI Cont Read Channel or D2K AI Cont Scan Channels , for the detailed data format); however, Thecalculated voltage values in the voltage array returned will not include the channel message.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber : The card id of the card that want to perform this operation. (u16) AdRange : The analog input range the continuous specified channel is setting. Please

    refer to the Appendix B for the valid range values.(u16) readingArray : Acquired continuous analog input data array(i32) count : The size of readingArray (i16) Error_In : The error condition occurred before this VI executes. This code default to no

    error. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (dbl) voltageArray : computed voltages array returned (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains the

    same value. Otherwise, Error_Out describes the error status of this VI.

  • 7/27/2019 D2KLVIEW FunctionRef

    33/82

    VI Function Descriptions ? 25

    D2K AI Initial Memory Allocated

    Description

    This function returns the available memory size for analog input in the device driver in argumentMemSize . The continuous analog input transfer size can not exceed this size.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber : The card id of the card that want to perform this operation. (i16) Error_In : The error condition occurred before this VI executes. This code default to no

    error. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (u32) MemSize : The available memory size for continuous AI in device driver of this card.The unit is KB (1024 bytes).

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Mux Scan Setup

    Description

    This function stores numChans , chans , and gain_refGnd in the Channel-Gain Queue for a scanneddata acquisition operation. The function D2K AI Read Mux Scan , D2K AI Cont Mux Scan orD2K AI Cont Mux Scan To File uses this memory table during scanning operations toautomatically sequence through an arbitrary set of analog input channels and to allow gains toautomatically change during scanning. This function is only available for Multip lexed AD card (e.g.DAQ-2205, DAQ-2206, except DAQ-2501 and DAQ-2502). If any of AI functions other than D2K AIRead Mux Scan , D2K AI Cont Mux Scan or D2K AI Cont Mux Scan To File is calling, thechannel-gain queue will be modified.

    Cards Support

    2204, 2205, 2206

    Input Values(u16) CardNumber : The card id of the card that want to perform this operation. (u16) numChans : The number of analog input channels in the array Chans . The valid value:

    DAQ-2204: 1 through 512DAQ-2205: 1 through 512DAQ-2206: 1 through 512

    (u16) Chans : Array of analog input channel numbers.DAQ-2204: numbers in Chans must be within 0 and 63.DAQ-2205: numbers in Chans must be within 0 and 63.DAQ-2206: numbers in Chans must be within 0 and 63.

    (u16) AdRange_RefGnds : An integer array of length numChans that contains the analog input

    range and reference ground for every channel in array Chans. Please refer

  • 7/27/2019 D2KLVIEW FunctionRef

    34/82

    26 ? VI Function Descriptions

    to D2K AI CH Config section for the setting of AdRange_RefGnd for each channel.

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values(i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains the

    same value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Read Channel

    Description

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

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber : The card id of the card that want to perform this operation. (u16) Channel : Analog input channel number.

    Range: 0 through 3 for DAQ-2010, DAQ-2005, DAQ-2006, DAQ-2502Range: 0 through 63 for DAQ-2204, DAQ-2205, DAQ-2206Range: 0 through 7 for DAQ-2501

    (i16) Error_In : The error condition occurred before this VI executes. This code default to no

    error. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (u16) Value : The A/D converted value. For the data format in value , please refer to thedescription of Buffer argument of D2K AI Cont Read Channel for thecorrect data format.

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Read Mux Scan

    DescriptionReturns readings for all analog input channels selected by D2K AI Mux Scan Setup . This functionis only available for Multi plexed AD card (e.g. DAQ-2205, DAQ-2206, except DAQ-2501 and DAQ-2502).

    Cards Support

    2204, 2205, 2206

    Input Values

  • 7/27/2019 D2KLVIEW FunctionRef

    35/82

    VI Function Descriptions ? 27

    (u16) CardNumber : The card id of the card that want to perform this operation. (u16) Buffer : An integer array to contain the acquired data. Buffer must has a length

    equal to or greater than the value of input terminal numChans . (i16) Error_In : The error condition occurred before this VI executes. This code default to no

    error. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.

    Refer to the Appendix, Error Codes , for the code descriptions.Output Values

    (u16) Buffer : An integer array to contain the acquired data. Please refer to Appendix, AI Data Format , for the data format of each data in Buffer.

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Scan Read Channels

    Description

    This function performs software triggered A/D conversions (analog input) on analog input channelsand returns the values converted. This function is only available for Mult ip lexed AD card (e.g.DAQ-2205).

    Cards Support

    2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber : The card id of the card that want to perform this operation. (u16) numChans : The number of analog input channels in the array Chans . The valid value:

    DAQ-2204: 1 through 512DAQ-2205: 1 through 512DAQ-2206: 1 through 512DAQ-2501: 1 through 4DAQ-2502: 1 through 8

    (u16) Chans : Array of analog input channel numbers.DAQ-2204: numbers in Chans must be within 0 and 63.DAQ-2205: numbers in Chans must be within 0 and 63.DAQ-2206: numbers in Chans must be within 0 and 63.DAQ-2501: numbers in Chans must be within 0 and 3.DAQ-2502: numbers in Chans must be within 0 and 7.

    (u16) Buffer : An integer array to contain the acquired data. The length of Buffer must beequal to or greater the value of the input terminal numChans .

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (u16) Buffer : An integer array to contain the acquired data. Please refer to Appendix, AI Data Format , for the data format of each data in Buffer.

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

  • 7/27/2019 D2KLVIEW FunctionRef

    36/82

    28 ? VI Function Descriptions

    D2K AI Simu Read Channel

    Description

    This function performs a software triggered A/D conversion (analog input) on analog input channelsand returns the values converted. This function is only available for Simul taneous AD card (e.g.DAQ-2010).

    Cards Support

    2010, 2005, 2006

    Input Values

    (u16) CardNumber : The card id of the card that want to perform this operation. (u16) numChans : The number of analog input channels in the array Chans . The valid value:

    DAQ-2010: 1 through 4 DAQ-2005: 1 through 4 DAQ-2006: 1 through 4

    (u16) Chans : Array of analog input channel numbers.DAQ-2010: numbers in Chans must be within 0 and 3.DAQ-2005: numbers in Chans must be within 0 and 3.DAQ-2006: numbers in Chans must be within 0 and 3.

    (u16) Buffer : An integer array to contain the acquired data. The length of Buffer must beequal to or greater the value of the input terminal numChans .

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (u16) Buffer : An integer array to contain the acquired data. Please refer to Appendix, AI Data Format , for the data format of each data in Buffer.

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Volt Scale

    DescriptionThis function converts the result from a D2K AI Read Channel call to the actual input voltage.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber : The card id of the card that want to perform this operation. (u16) AdRange : The analog input range the specified channel is setting. Please refer to the

    Appendix B for the valid range values.(i16) reading : The result of the A/D Conversion.

  • 7/27/2019 D2KLVIEW FunctionRef

    37/82

    VI Function Descriptions ? 29

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (dbl) voltage : Computed voltage value.(i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains the

    same value. Otherwise, Error_Out describes the error status of this VI.

    D2K AI Read Channel Volt

    Description

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

    Cards Support2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber : The card id of the card that want to perform this operation. (u16) Channel : Analog input channel number.

    Range: 0 through 3 for DAQ-2010, DAQ-2005, DAQ-2006, DAQ-2502Range: 0 through 63 for DAQ-2204, DAQ-2205, DAQ-2206Range: 0 through 7 for DAQ-2501

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform any

    operation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (dbl) voltage : The measured voltage value returned and scaled to units of voltage.(i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains the

    same value. Otherwise, Error_Out describes the error status of this VI.

    D2K AIO Config

    Description

    Informs D2K-DASK library of the Timer Source and the Analog Trigger setting for the DAQ-2000device with card ID CardNumber . You must call this function, if using the external t imer sou rce or the analog t r igger mode of AI/AO is performed.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber : The card id of the card that want to perform this operation. (u16) TimerBase : The Time Base the device selected. The valid values are:

    0 : Internal timer as the time base

  • 7/27/2019 D2KLVIEW FunctionRef

    38/82

    30 ? VI Function Descriptions

    1 : External timer as the time base2 : The timer based on the SSI source

    (u16) AnaTrigCtrl : The setting for Analog Trigger control. This argument is an integer expression formed from the addition of one or more of the values. There aretwo groups of values:(1) Trigger Source Selection

    DAQ2010, DAQ2005, DAQ2006:0 : AI channel 02 : AI channel 14 : AI channel 26 : AI channel 31 : From external analog trigger pin

    DAQ2204, DAQ2205, DAQ2206, DAQ2501, DAQ2502:0 : The fi rst AI channel in the channel-gain queue1 : From external analog trigger pin

    (2) Trigger Condition Selection 0 : Below-Low-Level Triggering

    256 : Above-High-Level Triggering512 : Inside Region Triggering768 : High Hysteresis Triggering1024 : Low Hysteresis Triggering

    (u16) H_TrgLevel : The High value setting of Trigger level. Please refer to the hardware manualfor the relationship between the value of TrgLevel and trigger voltage.

    (u16) L_TrgLevel : The Low value setting of Trigger level. Please refer to the hardware manualfor the relationship between the value of TrgLevel and trigger voltage.For example :If the trigger voltage is ? 10V, the relationship between the value of TrgLevel and trigger voltage is as the following table:

    Trigger Level digital setting trigger voltage0xFF 9.92V0xFE 9.84V

    --- ---0x81 0.08V0x80 00x7F -0.08V

    --- ---0x01 -9.92V0x00 -10V

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

    D2K AO Async Check

    Description

    Check the current status of the asynchronous analog output operation.

  • 7/27/2019 D2KLVIEW FunctionRef

    39/82

    VI Function Descriptions ? 31

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206

    Input Values

    (u16) CardNumber : The card id of the card that performs the asynchronous operation.(i16) Error_In : The error condition occurred before this VI executes. This code default to no

    error. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (i8) Stopped : Whether the asynchronous analog output operation has completed. If Stopped = 1, the analog output operation has stopped. Either the number of D/A conversions indicated in the call that initiated the asynchronousanalog output operation has completed or an error has occurred. If Stopped = 0, the operation is not yet complete.

    (u32) WriteCnt : The number of analog output data that have been written at the time callingD2K AO Async Check .

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

    D2K AO Async Clear

    Description

    Stop the asynchronous analog output operation.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206

    Input Values

    (u16) CardNumber : The card id of the card that performs the asynchronous operation.(u16) stop_mode : The DA transfer termination mode selected. The valid values are:

    0 : Software terminate the DA continuous operation immediately1 : Software terminate the DA continuous operation on next update counter

    terminal count2 : Software terminate the DA continuous operation on iteration count

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform any

    operation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (u32) WriteCnt : The number of analog output data that have been written at the time callingD2K AO Async Clear .

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

    D2K AO Async Double Buffer Half Ready

  • 7/27/2019 D2KLVIEW FunctionRef

    40/82

    32 ? VI Function Descriptions

    Description

    Checks whether the next half buffer is ready for new data during an asynchronous double-bufferedanalog output operation.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values(u16) CardNumber : The card id of the card that performs the asynchronous double-buffered

    operation.(i16) Error_In : The error condition occurred before this VI executes. This code default to no

    error. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (i8) HalfReady : Whether the next half buffer is ready for new data.(i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains the

    same value. Otherwise, Error_Out describes the error status of this VI.

    D2K AO Async Double Buffer Mode

    Description

    Enables or disables double-buffered data acquisition mode.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    CardNumber : The card id of the card that double-buffered mode to be set. Enable : Whether the double-buffered mode is enabled or not.

    1 : double-buffered mode is enabled.0 : double-buffered mode is disabled.

    (i16) Error_In : The error condition occurred before this VI executes. This code default to noerror. If an error has already occurred, this VI does not perform anyoperation. A value of 0 means no error, a negative value means an error.Refer to the Appendix, Error Codes , for the code descriptions.

    Output Values

    (i16) Error_Out : Error code. If the Error_In indicated an error, the Error_Out contains thesame value. Otherwise, Error_Out describes the error status of this VI.

    D2K AO CH Config

    Description

    Informs D2K-DASK library of the reference voltage value selected for an analog output channel of DAQ-2000 Deivice. You can configure each channel to use an internal reference of 10V (default) or

    an external reference (-10V ~ +10V). You must call this function before calling function to perform

  • 7/27/2019 D2KLVIEW FunctionRef

    41/82

    VI Function Descriptions ? 33

    voltage output operation.

    Cards Support

    2010, 2005, 2006, 2204, 2205, 2206, 2501, 2502

    Input Values

    (u16) CardNumber : The card id of the card that want to perform this operation.

    (u16) Channel : The AO channel number configured.DAQ2010 : 0 through 1; -1 means all channelsDAQ2005 : 0 through 1; -1 means all channelsDAQ2006 : 0 through 1; -1 means all channelsDAQ2204 : 0 through 1; -1 means all channelsDAQ2205 : 0 through 1; -1 means all channelsDAQ2206 : 0 through 1; -1 means all channelsDAQ2501 : 0 through 3; -1 means all channelsDAQ2502 : 0 through 7; -1 means all channels

    (u16) OutputPolarity : The polarity (unipolar or bipolar) of the output channel. The valid values are:1 : bipolar

    0 : unipolar (u16) IntOrExtref : The DA reference voltage source of the output channel. The valid values

    are:0 : internal reference1 : external reference

    (