PCIS-DASK Data Acquisition Software Development Kit for NuDAQ® PCI Bus Cards User’s Manual Manual Rev. 2.00 Revision Date: March 05, 2007 Part No: 50-11224-2000 Advance Technologies; Automate the World.
Copyright 2007 ADLINK TECHNOLOGY INC. All Rights Reserved. Disclaimer 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.
Getting service Customer satisfaction is our top priority. Contact us should you require any service or assistance. ADLINK TECHNOLOGY INC. Web Site Sales & Service Telephone No. Fax No. Mailing Address http://www.adlinktech.com service@adlinktech.com +886-2-8226-5877 +886-2-8226-5717 9F No. 166 Jian Yi Road, Chungho City, Taipei Hsien 235, Taiwan, ROC ADLINK TECHNOLOGY AMERICA, INC. Sales & Service Toll-Free Fax No. Mailing Address info@adlinktech.
ADLINK TECHNOLOGY BEIJING Sales & Service Telephone No. Fax No. Mailing Address market@adlinkchina.com.cn +82-2-20570565 +82-2-20570563 4F, Kostech Building, 262-2, Yangjae-Dong, Seocho-Gu, Seoul, 137-130, Korea ADLINK TECHNOLOGY BEIJING Sales & Service Telephone No. Fax No. Mailing Address market@adlinkchina.com.cn +86-10-5885-8666 +86-10-5885-8625 Room 801, Building E, Yingchuangdongli Plaza, No.1 Shangdidonglu, Haidian District, Beijing, China ADLINK TECHNOLOGY SHANGHAI Sales & Service Telephone No.
Using this manual Audience and scope This manual guides you when using the PCIS-DASK software driver for NuDAQ PCI bus data acquisition cards. This manual also describes how to install and use the software library and meet your requirements when creating programs for your software applications. How this manual is organized This manual is organized as follows: Chapter 1 Introduction: This chapter intoduces the PCISDASK and lists all DAQ modules and language environments which the program supports.
Conventions Take note of the following conventions used throughout the manual to make sure that you perform certain tasks and instructions properly. NOTE Additional information, aids, and tips that help you perform particular tasks. IMPORTANT Critical information and instructions that you MUST perform to complete a task. WARNING Information that prevents physical injury, data loss, module damage, program corruption etc. when trying to complete a particular task.
PCIS-DASK Table of Contents 1 Introduction ........................................................................ 1 1.1 1.2 Hardware Support................................................................ 2 Language Support ............................................................... 3 2 Function Classes................................................................ 5 2.1 2.2 2.3 General Configuration Function Group................................ 6 Actual Sampling Rate Function Group ............
PCIS-DASK 3.1 3.2 3.3 3.4 Contiguous Memory Allocation .......................................... 27 Application Building Fundamentals in Windows ................ 28 Using Microsoft® Visual C®/C++® ............................... 28 Using Microsoft® Visual Basic® ................................... 29 Application Building Fundamentals in Linux ...................... 32 Application Building Fundamentals Using .NET ................ 33 Using Microsoft VB.net. ................................................
PCIS-DASK 4.5 4.6 Asynchronous Continuous Digital Output ..................... 70 Pattern Generation Digital Output ................................. 71 Multiple-buffered Asynchronous Continuous Digital Output ...................................................... 72 DAQ Event Message Programming Hints ......................... 74 Interrupt Event Message Programming Hints.................... 76 5 Continuous Data Transfer ............................................... 79 5.1 5.2 5.3 Mechanisms.........
PCIS-DASK Trigger Mode Data I/O Through DMA Data Transfer or Interrupt Operation ......................... 123 8 Distribution of Applications........................................... 125 8.1 8.2 8.3 iv Required Files.................................................................. 125 Automatic Installers.......................................................... 127 Manual Installation ...........................................................
PCIS-DASK 1 Introduction The PCIS-DASK is a software development kit for NuDAQ data acquisition cards utilizing the PCI bus. With high performance data acquisition driver, the PCIS-DASK lets you develop custom applications under Windows® NT/98/2000/XP/Server 2003 and Linux environments. With memory and data buffer management capabilities, the PCISDASK gives you freedom from dealing with complex issues and focus more on developing your applications.
PCIS-DASK Hardware Support 1.
PCIS-DASK Language Support 1.2 Language Support The PCIS-DASK is a DLL (Dynamic-Link Library) version for usewith Windows® and Linux environments. It works with any Windows programming language that allows calls to a DLL. These include Microsoft® Visual C/C++ (4.0 or higher versions), Borland C++ (5.0 or higher versions), or Microsoft® Visual Basic (4.0 or higher version). In Linux, it works with any 32-bit compiler, such as gcc.
PCIS-DASK Language Support 4 Introduction
PCIS-DASK 2 Function Classes This chapter describes the classes of functions that the PCISDASK supports.
PCIS-DASK General Configuration Function Group 2.1 General Configuration Function Group These functions initialize and configure data acquisition cards. Register_Card Initializes the hardware and software states of a NuDAQ PCI-bus data acquisition card. This function must be called before any other DASK library functions. Release_Card Tells the DASK library that the registered card is not in use and can be released. This function makes room for a new card to register.
PCIS-DASK Analog Input Function Group 2.3 Analog Input Function Group Analog Input Configuration Functions AI_9111_Config Informs PCIS-DASK library of the trigger source and trigger mode selected for the analog input operation of PCI9-111. You must call this function before calling function to perform continuous analog input operation of PCI-9111. AI_9112_Config Informs PCIS-DASK library of the trigger source selected for the analog input operation of PCI-9112.
PCIS-DASK Analog Input Function Group log input operation of PCI9118. You must call this function before calling function to perform continuous analog input operation of PCI-9118. AI_9221_Config Informs PCIS-DASK library of the trigger source, trigger mode, and trigger properties selected for the analog input operation of PCI-9221. You must call this function before calling function to perform continuous analog input operation of PCI-9221.
PCIS-DASK Analog Input Function Group AI_GetView Gets the mapped buffer address of the analog input memory that is available in the device driver. AI_SetTimeOut Sets the Timeout period for Sync mode of continuous AI. 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 (unscaled).
PCIS-DASK Analog Input Function Group AI_ContReadMultiChannels Performs continuous A/D conversions on the specified analog input channels at a rate as close to the rate you specified. This function is only available for those cards that support auto-scan functionality. AI_ContReadChannelToFile Performs continuous A/D conversions on the specified analog input channel at a rate as close to the rate you specified and saves the acquired data in a disk file.
PCIS-DASK Analog Input Function Group The notification is performed through a user-specified callback function. AI_ContBufferReset Resets all the buffers set by function “AI_ContBufferSetup” for continuous analog input. AI_ContBufferSetup Sets up a specified buffer for continuous analog input. Asynchronous Analog Input Monitoring Functions AI_AsyncCheck Checks the current status of the asynchronous analog input operation. AI_AsyncClear Stops the asynchronous analog input operation.
PCIS-DASK Analog Output Function Group 2.4 Analog Output Function Group Analog Output Configuration Functions 12 AO_6208A_Config Informs PCIS-DASK library of the current range selected for the analog output operation of PCI-6208A. You must call this function before calling function to perform current output operation. AO_6308A_Config Informs PCIS-DASK library of the current range selected for the analog output operation of PCI-6308A.
PCIS-DASK Analog Output Function Group One-Shot Analog Output Functions AO_WriteChannel Writes a binary value to the specified analog output channel. AO_VWriteChannel Accepts a voltage value, scales it to the proper binary value and writes a binary value to the specified analog output channel. AO_VoltScale Scales a voltage to a binary value. AO_SimuWriteChannel Writes binary values to the specified analog output channels simultaneously.
PCIS-DASK Digital Input Function Group 2.5 Digital Input Function Group Digital Input Configuration Functions DI_7200_Config Informs PCIS-DASK library of the trigger source and trigger properties selected for the digital input operation of PCI7200. You must call this function before calling function to perform continuous digital input operation of PCI-7200.
PCIS-DASK Digital Input Function Group Continuous Digital Input Functions DI_ContReadPort Performs continuous digital input on the specified digital input port at a rate as close to the rate you specified. DI_ContReadPortToFile Performs continuous digital input on the specified digital input port at a rate as close to the rate you specified and saves the acquired data in a disk file. DI_ContStatus Checks the current status of the continuous digital input operation.
PCIS-DASK Digital Input Function Group Asynchronous Digital Input Monitoring Functions DI_AsyncCheck Checks the current status of the asynchronous digital input operation. DI_AsyncClear Stops the asynchronous digital input operation. DI_AsyncDblBufferMode Enables or disables double buffer data acquisition mode. DI_AsyncDblBufferHalfReady Checks whether the next half buffer of data in circular buffer is ready for transfer during an asynchronous double-buffered digital input operation.
PCIS-DASK Digital Output Function Group 2.6 Digital Output Function Group Digital Output Configuration Functions DO_7200_Config Informs PCIS-DASK library of the trigger source and trigger properties selected for the digital input operation of PCI7200. You must call this function before calling function to perform continuous digital output operation of PCI-7200.
PCIS-DASK Digital Output Function Group One-Shot Digital Output Functions 18 DO_WriteLine Sets the specified digital output line in the specified digital output port to the specified state. This function is only available for those cards that support digital output read-back functionality. DO_WritePort Writes digital data to the specified digital output port. DO_SImuWritePort Write the output digital data to the specified digital output port simultaneously.
PCIS-DASK Digital Output Function Group Continuous Digital Output Functions DO_ContWritePort Performs continuous digital output on the specified digital output port at a rate as close to the rate you specified. DO_ContStatus Checks the current status of the continuous digital output operation. DO_EventCallBack Controls and notifies the user's application when a specified DAQ event occurs. The notification is performed through a user-specified callback function.
PCIS-DASK Timer/Counter Function Group 2.7 Timer/Counter Function Group Timer/Counter Functions CTR_Setup Configures the selected counter to operate in the specified mode. CTR_Read Reads the current contents of the selected counter. CTR_Clear Sets the output of the selected counter to the specified state. CTR_Update Writes a new initial count to the selected counter. CTR_8554_ClkSrc_Config Sets the counter clock source. CTR_8554_CK1_Config Sets the source of CK1.
PCIS-DASK Timer/Counter Function Group GPTC_Status Function Classes Reads the latched GPTC status of the general-purpose counter/timer from GPTC status register.
PCIS-DASK Digital Input/Output Function Group 2.8 Digital Input/Output Function Group Digital Input/Output Configuration Functions 22 DIO_LineConfig This function is only used by the Digital I/O cards whose I/O port can be set as input port or output port. This function informs PCIS-DASK library of the line direction selected for the digital input/ output operation. You must call this function before calling functions to perform digital input/output operation.
PCIS-DASK Digital Input/Output Function Group Dual-Interrupt System Setting Functions DIO_SetDualInterrupt Controls two interrupt sources of Dual Interrupt system. DIO_SetCOSInterrupt Sets the ports used for COS interrupt detection. DIO_SetCOSInterrupt32 Sets the ports with 32-bit data width used for COS interrupt detection. DIO_GetCOSLatchData Get the DI data that latched in the COS Latch register while the Change-of-State (COS) interrupt occurred.
Local Interrupt Setting Functions DIO_7300SetInterrupt Controls the interrupt sources (AUXDI and Timer2) of local Interrupt system of PCI-7300A/cPCI-7300A. DIO_AUXDI_EventMessageControls AUXDI Interrupt and notifies the user's application when an interrupt event occurs. The notification is performed through a user-specified callback function or the Windows PostMessage API. DIO_T2_EventMessage 24 Controls Timer2 Interrupt and notifies the user's application when an interrupt event occurs.
PCIS-DASK Emergency Shutdown Function Group 2.9 Emergency Shutdown Function Group EMGShutDownControl Controls emergency shutdown. EMGShutDownStatus Returns the emergency shutdown condition. 2.10 Watchdog Timer Function Group WDT_Control Control watchdog timer. WDT_Reload Reload watchdog timer counter. WDT_Setup Setup a watchdog timer. WDT_Status Get the overflow status of a watchdog timer 2.11 Hot-system Reset Hold Function Group HotResetoldStatus Read hot reset hold status.
PCIS-DASK Calibration Function Group 26 Function Classes
PCIS-DASK Contiguous Memory Allocation 3 Building Applications 3.1 Contiguous Memory Allocation The PCIS-DASK features continuous data transfer functions that input or output blocks of data to or from an installed NuDAQ PCI device. To prevent reduced data transfer performance caused by memory fragment, the PCIS-DASK allocates physically contiguous buffers in device driver at system startup time (Windows® 98) or when system boots (Windows® NT/2000/XP/2003 and Linux).
PCIS-DASK Application Building Fundamentals in Windows 3.2 Application Building Fundamentals in Windows The following sections provide fundamental instructions when using PCIS-DASK to build application in Windows® NT/98/2000/ XP/Server 2003 operating environment. Using Microsoft® Visual C®/C++® Follow these steps to create a data acquisition application using PCIS-DASK and Microsoft Visual C/C++. 1. Launch the Microsoft Visual C/C++ application. 2.
PCIS-DASK Application Building Fundamentals in Windows Using Microsoft® Visual Basic® Follow the steps in the succeeding sections to create a data acquisition application using PCIS-DASK and Visual Basic. Open a project Do one of the following to open a new or existing project: 1. Open a new project by selecting the New Project command from the File menu. To open an existing project, select the Open Project command from the File menu to display the Open Project dialog box. 2.
PCIS-DASK Application Building Fundamentals in Windows stants that can be used to develop the data acquisition application. To add the file: 1. Select Add File from the File menu. The Add File window appears, displaying a list of files in the current directory. 2. Double-click on the DASK.BAS file. If the file is not on the list, make sure the list is displaying files from the correct directory. By default, the DASK.BAS file is installed at C:\ADLink\PCIS-DASK\INCLUDE.
PCIS-DASK Application Building Fundamentals in Windows Design the interface To design the interface for the application, place all the interface elements such as command buttons, list boxes, and text boxes on the Visual Basic form. These standard controls are available from the Visual Basic Toolbox. To place a control on the form, select the desired control from the Toolbox, then draw it on the form. You may also double-click on the control icon from the Toolbox to place it on the form.
PCIS-DASK Application Building Fundamentals in Linux 3.3 Application Building Fundamentals in Linux The following sections provide fundamental instructions when using PCIS-DASK to build application in Linux. To create a data acquisition application using PCIS-DASK/X and GNU C/C++, follow these steps: Edit the source files Include the header file dask.h in the C/C++ source files that call PCIS-DASK/X functions. The dask.
PCIS-DASK Application Building Fundamentals Using .NET 3.4 Application Building Fundamentals Using .NET The following sections provide fundamental instructions when using PCIS-DASK to build application in Linux. To create a data acquisition application using PCIS-DASK/X and GNU C/C++, follow these steps: Using Microsoft VB.net. To create a data acquisition application using PCIS-DASK and VB.net, follow these steps after entering VB.net: 1. Open a new or existing project. 2. Add the file DASK.
PCIS-DASK Application Building Fundamentals Using .NET tory. By default, the DASK.vb file is installed at C:\ADLINK\PCIS-DASK\INCLUDE. 3. Develop the application. You can call the functions that are declared in the file Dask.vb to perform data acquisition operations. 4. Run your application. Do one of the following to run the application: Z Choose Start from the Run menu Z Click the Start icon Z Press from the toolbar 5. Distribute the application.
PCIS-DASK Application Building Fundamentals Using .NET Using Microsoft C# To create a data acquisition application using PCIS-DASK and C#, follow these steps after entering C#: 1. Open a new or existing project. 2. Add the file DASK.cs to the project, if the file is not yet included. This file contains all the procedure declarations and constants that can be used to develop the data acquisition application. To add the file: Z X Select Add File from the File menu.
PCIS-DASK Application Building Fundamentals Using .NET tory. By default, the DASK.cs file is installed at C:\ADLINK\PCIS-DASK\INCLUDE. 3. Develop the application. You can call the functions that are declared in the file Dask.cs to perform data acquisition operations. 4. Run your application. Do one of the following to run the application: Z Choose Start from the Run menu Z Click the Start icon Z Press from the toolbar 5. Distribute the application.
PCIS-DASK Application Building Fundamentals Using .NET Creating Windows® PCIS-DASK Application Using Microsoft VB.net. To create a data acquisition application using DASK and C#, follow these steps after entering VB.net: 1. Open a new or existing project. 2. Add the file DASK.vb to the project, if the file is not yet included. This file contains all the procedure declarations and constants that can be used to develop the data acquisition application.
4. Run your application. Do one of the following to run the application: Z Choose Start from the Run menu Z Click the Start icon Z Press from the toolbar 5. Distribute the application. After completing the project, save the application as an executable (.EXE) file using the Make EXE File command from the File menu. The application, after being transformed into an executable file, is now ready for distribution.
PCIS-DASK Application Building Fundamentals Using .NET Using Callback Functions in a C# Application with PCISDASK To use callback functions in a c# Application with PCIS-DASK, follow these steps after creating a Windows® 2000/XP PCIS-DASK application using C#: 1. Create a callback function. For example: private static void CallBack() { //Add the C# function you like. } 2. Set the callback function. For example: CallbackDelegate del = new Callback Delegate( CallBack ); DASK.
PCIS-DASK Application Building Fundamentals Using .
PCIS-DASK 4 Application Hints This chapter provides the programming schemes showing the function flow of that PCIS-DASK performs analog I/O and digital I/ O. The figure below shows the basic building blocks of a PCIS-DASK application. However, except using Register_Card at the beginning and Release_Card at the end, depending on the specific devices and applications you have, the PCIS-DASK functions comprising each building block vary.
PCIS-DASK Analog Input 4.1 Analog Input PCIS-DASK provides two kinds of analog input operation: nonbuffered single-point analog input readings and buffered continuous analog input operation. The non-buffered single-point AI uses software polling method to read data from the device. The buffered continuous analog input uses interrupt transfer or DMA transfer method to transfer data from device to user's buffer.
PCIS-DASK Analog Input One-Shot Analog Input This section describes the function flow typical of non-buffered single-point analog input readings. While performing one-shot AI operation, most cards (except PCI-9118 Series cards) doesn't need to include the AI configuration step at the beginning of the application.
PCIS-DASK Analog Input Synchronous Continuous Analog Input This section describes the function flow typical of synchronous analog input operation. While performing continuous AI operation, the AI configuration function has to be called at the beginning of your application. In addition, for synchronous AI, the SyncMode argument in continuous AI functions has to be set to SYNCH_OP.
PCIS-DASK Analog Input Non-Trigger Non-double-buffered Asynchronous Continuous Analog Input This section describes the function flow typical of non-trigger, nondouble-buffered asynchronous analog input operation. While performing continuous AI operation, the AI configuration function has to be called at the beginning of your application. In addition, for asynchronous AI, the SyncMode argument in continuous AI functions has to be set to ASYNCH_OP.
PCIS-DASK Analog Input Example code fragment card = Register_Card(PCI_9112, card_number); … AI_9112_Config(card,TRIG_INT_PACER); AI_AsyncDblBufferMode (card, 0); //non-double-buffer AI AI_ContScanChannels (card, channel, range, ai_buf, data_size, (F64)sample_rate, ASYNCH_OP); or AI_ContReadChannel(card, channel, range, ai_buf, data_size, (F64)sample_rate, ASYNCH_OP) do { AI_AsyncCheck(card, &bStopped, &count); } while (!bStopped); AI_AsyncClear(card, &count); … Release_Card(card); 46 Application Hints
PCIS-DASK Analog Input Non-Trigger Double-buffered Asynchronous Continuous Analog Input This section describes the function flow typical of non-trigger, double-buffered asynchronous analog input operation. While performing continuous AI operation, the AI configuration function has to be called at the beginning of your application. For asynchronous AI, The SyncMode argument in continuous AI functions has to be set to ASYNCH_OP.
PCIS-DASK Analog Input Example code fragment card = Register_Card(PCI_9112, card_number); … AI_9112_Config(card,TRIG_INT_PACER); AI_AsyncDblBufferMode (card, 1); // Double-buffered AI_ContScanChannels (card, channel, range, ai_buf, data_size, (F64)sample_rate, ASYNCH_OP); or AI_ContReadChannel(card, channel, range, ai_buf, data_size, (F64)sample_rate, ASYNCH_OP) do { do { AI_AsyncDblBufferHalfReady(card, &HalfRead &fstop); } while (!HalfReady); AI_AsyncDblBufferTransfer(card, ai_buf); … } while (!clear_op)
PCIS-DASK Analog Input Trigger Mode Non-double-buffered Asynchronous Continuous Analog Input This section describes the function flow typical of trigger mode double-buffered asynchronous analog input operation. A trigger is an event that occurs based on a specified set of conditions. An interrupt mode or DMA-mode Analog input operation can use a trigger to determinate when acquisition stop.
PCIS-DASK Analog Input Example code fragment card = Register_Card(PCI_9118, card_number); … AI_9118_Config(card, P9118_AI_BiPolar|P9118_AI_SingEnded, P9118_AI_DtrgPositive|P9118_AI_EtrgPositive| P9118_AI_AboutTrgEn, 0, postCount) AI_AsyncDblBufferMode (card, 0); //non-double-buffer AI AI_ContScanChannels (card, channel, range, ai_buf, data_size, (F64)sample_rate, ASYNCH_OP); or AI_ContReadChannel(card, channel, range, ai_buf, data_size, (F64)sample_rate, ASYNCH_OP) do { AI_AsyncCheck(card, &bStopped, &coun
PCIS-DASK Analog Input Trigger Mode Double-buffered Asynchronous Continuous Analog Input This section describes the function flow typical of trigger mode double-buffered asynchronous analog input operation. A trigger is an event that occurs based on a specified set of conditions. An interrupt mode or DMA-mode Analog input operation can use a trigger to determinate when acquisition stop.
PCIS-DASK Analog Input AI_XXXX_Config with Trigger Mode enabled (XXXX = card type) With Enable = TRUE AI_AsyncDblBufferMode YES Sample multiple continuous channels? NO With SyncMode = ASYNCH_OP With SyncMode = ASYNCH_OP AI_ContScanChannels/ AI_ContScanChannelsToFile AI_ContReadChannel/ AI_ContReadChannelToFile AI_AsyncDblBuffer HalfReady NO Next half buffer ready for transfer? Or Operation complete? YES AI_AsyncDblBuffer Transfer NO Do you want to stop the operation? YES AI_AsyncClear 52 Ap
PCIS-DASK Analog Input Example code fragment card = Register_Card(PCI_9118, card_number); … AI_9118_Config(card,P9118_AI_BiPolar|P9118_AI_SingE d, P9118_AI_DtrgPositive|P9118_AI_EtrgPositive| P9118_AI_AboutTrgEn,0,postCount) AI_AsyncDblBufferMode (card, 1); Double-buffered A AI_ContScanChannels (card, channel, range, ai_buf, data_size, (F64)sample_rate, ASYNCH_OP); or AI_ContReadChannel(card, channel, range, ai_buf, data_size, (F64)sample_rate, ASYNCH_OP) do { do { AI_AsyncDblBufferHalfReady(card, &HalfRea
PCIS-DASK Analog Output Programming Hints 4.2 Analog Output Programming Hints This section describes the function flow typical of single-point analog output conversion. While performing the following operation, the AO configuration function has to be called at the beginning of your application: 1. Use PCI-6208A or PCI-6308A to perform current output 2. Use the analog output function that can convert a voltage value to a binary value, then write it to the device.
PCIS-DASK Digital Input Programming Hints 4.3 Digital Input Programming Hints The PCIS-DASK provides two types of digital input operation: nonbuffered single-point digital input operation and buffered continuous digital input operation. The non-buffered single-point DI uses software polling method to read data from the device. The programming scheme for this kind of DI operation is described in section . The buffered continuous DI uses DMA transfer method to transfer data from device to user's buffer.
PCIS-DASK Digital Input Programming Hints One-Shot Digital Input This section describes the function flow typical of non-buffered single-point digital input readings. While performing one-shot DI operation, devices whose I/O port can be set as input or output port (PCI-7248, PCI-7296, and PCI-7442) need to include port configuration function at the beginning of the application.
PCIS-DASK Digital Input Programming Hints : card = Register_Card(PCI_7442, card_number); //line configured DIO_LineConfig(card ,P7442_TTL0, 0, INPUT_LINE); //DI operation DI_ReadLinet(card, P7442_TTL0, 0, &inDataLine0); … Release_Card(card); Application Hints 57
PCIS-DASK Digital Input Programming Hints Synchronous Continuous Digital Input This section describes the function flow typical of synchronous digital input operation. While performing continuous DI operation, the DI configuration function has to be called at the beginning of the application. For synchronous DI, the SyncMode argument in continuous DI functions has to be set to SYNCH_OP.
PCIS-DASK Digital Input Programming Hints Non-double-buffered Asynchronous Continuous Digital Input This section describes the function flow typical of non-double-buffered asynchronous digital input operation. While performing continuous DI operation, the DI configuration function has to be called at the beginning of the application. For asynchronous DI operation, the SyncMode argument in continuous DI functions has to be set to ASYNCH_OP.
PCIS-DASK Digital Input Programming Hints Example code fragment: card = Register_Card(PCI_7200, card_number); … DI_7200_Config(card,TRIG_INT_PACER, DI_NOWAITING, DI_TRIG_FALLING, IREQ_FALLING); DI_AsyncDblBufferMode (card, 0); // non-doublebuffered mode DI_ContReadPort(card, 0, pMem, data_size, (F64)sample_rate, ASYNCH_OP) do { DI_AsyncCheck(card, &bStopped, &count); } while (!bStopped); DI_AsyncClear(card, &count); … Release_Card(card); 60 Application Hints
PCIS-DASK Digital Input Programming Hints Double-buffered Asynchronous Continuous Digital Input This section describes the function flow typical of double-buffered asynchronous digital input operation. While performing continuous DI operation, the DI configuration function has to be called at the beginning of the application. For asynchronous DI, the SyncMode argument in continuous DI functions has to be set to ASYNCH_OP.
PCIS-DASK Digital Input Programming Hints Example code fragment: card = Register_Card(PCI_7200, card_number); … DI_7200_Config(card,TRIG_INT_PACER, DI_NOWAITING, DI_TRIG_FALLING, IREQ_FALLING); DI_AsyncDblBufferMode (card, 1); // Double-buffered mode DI_ContReadPort(card, 0, pMem, data_size, (F64)sample_rate, ASYNCH_OP) do { do { DI_AsyncDblBufferHalfReady(card, &HalfReady); } while (!HalfReady); DI_AsyncDblBufferTransfer(card, pMem); } while (!clear_op); DI_AsyncClear(card, &count); … Release_Card(card);
PCIS-DASK Digital Input Programming Hints Multiple-buffered Asynchronous Continuous Digital Input This section describes the function flow typical of multi-buffered asynchronous digital input operation. While performing continuous DI operation, the DI configuration function has to be called at the beginning of the application. For asynchronous DI, the SyncMode argument in continuous DI functions has to be set to ASYNCH_OP.
PCIS-DASK Digital Input Programming Hints DI_XXXX_Config (XXXX = card type) DI_ContMultiBufferSetup repeatedly… ContMultiBufferStart DI_AsyncMultiBufferNextReady YES NO Next half buffer ready? YES Handling the ready data NO Stop the operation? YES DI_AsyncClear 64 Application Hints
PCIS-DASK Digital Input Programming Hints Example code fragment: card = Register_Card(PCI_7300A_RevB, card_number); … DI_7300B_Config(card, 16, TRIG_CLK_10MHZ, P7300_WAIT_NO, P7300_TERM_ON, 0, 1, 1); //setting the DMA buffers repeatedly DI_ContMultiBufferSetup (card, in_buf, data_size, &BufferId); DI_ContMultiBufferSetup (card, in_buf, data_size, &BufferId); … // start multi-buffered DI DI_ContMultiBufferStart (card, 0, 1); do { do { DI_AsyncDblBufferHalfReady(card, &HalfReady); } while (!HalfReady); //Han
PCIS-DASK Digital Output Programming Hints 4.4 Digital Output Programming Hints The PCIS-DASK provides three types of digital output operation: non-buffered single-point digital output operation, buffered continuous digital output operation, and pattern generation. The non-buffered single-point DO uses software polling method to write data to the device. The programming scheme for this kind of DO operation is described in section .
PCIS-DASK Digital Output Programming Hints One-Shot Digital Output This section describes the function flow typical of non-buffered single-point digital output operation. While performing one-shot DO operation, the cards whose I/O port can be set as input or output port (PCI-7248, PCI7249, PCI-7296, and PCI-7442) need to include port configuration function at the beginning of the application.
PCIS-DASK Digital Output Programming Hints : card = Register_Card(PCI_7442, card_number); //Lines configured DIO_LineConfig(card, P7442_TTL0, 0, OUTPUT_LINE); //DO operation DO_WriteLine(card, P7442_TTL0, 0, out_value); … Release_Card(card); 68 Application Hints
PCIS-DASK Digital Output Programming Hints Synchronous Continuous Digital Output This section describes the function flow typical of synchronous digital output operation. While performing continuous DO operation, the DO configuration function has to be called at the beginning of the application. In addition, the SyncMode argument in continuous DO functions for synchronous mode has to be set to SYNCH_OP.
PCIS-DASK Digital Output Programming Hints Asynchronous Continuous Digital Output This section describes the function flow typical of asynchronous digital output operation. While performing continuous DO operation, the DO configuration function has to be called at the beginning of the application. In addition, the SyncMode argument in continuous DO functions for asynchronous mode has to be set to ASYNCH_OP.
PCIS-DASK Digital Output Programming Hints Pattern Generation Digital Output This section describes the function flow typical of pattern generation for digital output. While performing pattern generation of DO, the DO configuration function has to be called at the beginning of the application.
PCIS-DASK Digital Output Programming Hints Multiple-buffered Asynchronous Continuous Digital Output This section describes the function flow typical of multi-buffered asynchronous digital output operation. While performing continuous DO operation, the DO configuration function has to be called at the beginning of the application. For asynchronous DO, the SyncMode argument in continuous DO functions has to be set as ASYNCH_OP.
PCIS-DASK Digital Output Programming Hints Example code fragment: card = Register_Card(PCI_7300A_RevB, card_number); … DO_7300B_Config (card, 16, TRIG_CLK_10MHZ, P7300_WAIT_NO, P7300_TERM_ON, 0, 0x00040004); //setting the DMA buffers repeatedly DO_ContMultiBufferSetup (card, out_buf, data_size, &BufferId); DO_ContMultiBufferSetup (card, out_buf, data_size, &BufferId); … // start multi-buffered DO DO_ContMultiBufferStart (card, 0, 1); do { do { DO_AsyncDblBufferHalfReady(card, &HalfReady); } while (!HalfRea
PCIS-DASK DAQ Event Message Programming Hints 4.5 DAQ Event Message Programming Hints DAQ Event Message functions are efficient ways to monitor your background data acquisition processes without dedicating your foreground process for status checking. There are two kinds of events: AI/DI/DO operation completed notification event and half buffer ready notification event.
PCIS-DASK DAQ Event Message Programming Hints Example code fragment: card = Register_Card(PCI_9118DG, card_number); AI_9118_Config(card,P9118_AI_BiPolar|P9118_AI_SingE d, P9118_AI_DtrgPositive|P9118_AI_EtrgPositive|P9118 I_AboutTrgEn,0,postCount); AI_AsyncDblBufferMode(card, 1); //double-buffer mo // Enable half buffer ready event notification AI_EventCallBack (card, 1, DBEvent, (U32) DB_cbfn ); //Enable AI completeness event notification AI_EventCallBack (card, 1, AIEnd, (U32) AI_cbfn ); AI_ContScanChanne
PCIS-DASK Interrupt Event Message Programming Hints 4.6 Interrupt Event Message Programming Hints The PCIS-DASK comes with two methods of performing interrupt occurrence notification for NuDAQ DIO cards that have dual-interrupt system. The Event Message method handles event notification through user-defined callbacks and/or the Windows Message queue (for VB5, through user-defined callbacks only).
PCIS-DASK Interrupt Event Message Programming Hints Through user-defined callbacks and Windows Message queue Example code fragment: card = Register_Card(PCI_7230, card_number); //INT1 event notification is through window message DIO_INT1_EventMessage (card, INT1_EXT_SIGNAL, hWnd, WM_INT, NULL); //INT2 event notification is through a callback function DIO_INT2_EventMessage (card, INT2_EXT_SIGNAL, hWnd, NULL, (void *) cbfn); ….
PCIS-DASK Interrupt Event Message Programming Hints Through a Win32 wait function Example code fragment: card = Register_Card(PCI_7230, card_number); DIO_SetDualInterrupt(card, INT1_EXT_SIGNAL, INT2_EXT_SIGNAL, hEvent); …. //wait for INT1 event if (WaitForSingleObject(hEvent[0], INFINITE) == WAIT_OBJECT_0) { ResetEvent(hEvent[0]); …… } ….. //wait for INT2 event if (WaitForSingleObject(hEvent[1], INFINITE) == WAIT_OBJECT_0) { ResetEvent(hEvent[1]); …… } …..
PCIS-DASK Mechanisms 5 Continuous Data Transfer The continuous data transfer function in the PCIS-DASK inputs or outputs blocks of data to or from a plugged-in NuDAQ PCI device. For input operations, the PCIS-DASK transfers the incoming data to a buffer in the system memory. For output operations, the PCISDASK transfers outgoing data from a buffer in the computer memory to the NuDAQ PCI device.
PCIS-DASK Double-Buffered AI/DI Operation 5.2 Double-Buffered AI/DI Operation The PCIS-DASK uses double-buffering techniques in its driver software for continuous input of large amounts of data. Double Buffer Mode Principle The data buffer for double-buffered continuous input operation is a logical circular buffer. It is logically divided into two equal halves. The double-buffered input begins when the device starts writing data into the first half of the circular buffer (a). Refer to figure below.
PCIS-DASK Double-Buffered AI/DI Operation AI_AsyncDblBufferHalfReady or DI_AsyncDblBufferHalfReady to check if data in the circular buffer is half full and ready for copying to the transfer buffer. Then you may call: AI_AsyncDblBufferTransfer or DI_AsyncDblBufferTransfer to copy data from the ready half buffer to the transfer buffer.
PCIS-DASK Double-Buffered AI/DI Operation Single-Buffered Versus Double-Buffered Data Transfer Single-buffered data transfer is the most common method for continuous data transfer. In single-buffered input operations, a fixed number of samples are acquired at a specified rate and transferred into user's buffer. After the user's buffer stores the data, the application can analyze, display, or store the data to the hard disk for later processing.
PCIS-DASK Trigger Mode Data Acquisition for Analog Input 5.3 Trigger Mode Data Acquisition for Analog Input A trigger is an event that occurs based on a specified set of conditions. An interrupt mode or DMA-mode analog input operation can use a trigger to determinate when acquisition stops or starts. The PCIS-DASK also provides two buffering methods for trigger mode AI double-buffering and single-buffering. However, the single buffer in trigger mode AI is different from that in non-trigger mode AI.
84
PCIS-DASK Win32 Utilities 6 Utilities This chapter introduces the tools that came with the PCIS-DASK package. 6.1 Win32 Utilities NuDAQ Registry/Configuration (PciUtil) The PciUtil registers the PCIS-DASK drivers (Windows® NT4 only), removes installed drivers (Windows® NT4 only), and sets/ modifies the allocated buffer sizes of AI, AO, DI, and DO. By default, the utility is located at \Util directory.
PCIS-DASK Win32 Utilities A Driver Configuration window appears. From the Card Type drop-down menu, select the driver you want to register, then key-in the allocated buffer (KB) for the AI, AO, DI, or DO functions depending on your application requirements. The allocated buffer represents the size of contiguous, initially allocated memory for continuous analog input, analog output, digital input, and digital output. The device driver allocates the memory size during system startup.
PCIS-DASK Win32 Utilities After setting the driver configuration, click OK to register the driver and return to the PciUtil main window. The registered driver appears on the registered driver list. To change the allocated buffer, select the driver from the Registered Driver list, then click Modify. The Driver Configuration window appears. Key-in the new allocated buffer size in each available AI, AO, DI and DO fields, then click OK.
PCIS-DASK Win32 Utilities Using PciUtil in Windows® 98/2000/XP/Server 2003 The PciUtil sets or modifies the allocated buffer sizes of AI, AO, DI and DO in Windows® 98/2000/XP/Server 2003 environment. The allocated buffer represents the size of contiguous, initially allocated memory for continuous analog input, analog output, digital input, and digital output. The device driver allocates the memory size during system startup.
PCIS-DASK Win32 Utilities Data File Converter (DAQCvt) When performing continuous data acquisition followed by storage to a disk operation, the data files generated by the PCIS-DASK functions are written in binary format. Normal text editors may not be able to read binary files and spreadsheet applications may not recognize binary files for analysis. The PCIS-DASK comes with the DAQCvt tool to conveniently convert these binary files into easily-read formats.
PCIS-DASK Win32 Utilities NOTE The default destination for the converted file with a .cvt extension is in the same directory as the source file. 3. To change the default file path, click Browse, then select the destination for the converted file. 4. To change the format of the converted file, click the Format drop-down menu, then select from three available data formats. Refer to the formats’ description below: 90 Z Scaled data to text file.
PCIS-DASK Win32 Utilities Z Binary codes to text file. The data in hexadecimal format or converted to a decimal value is written to disk in text file format. If the original data includes channel information, the raw value is handled to get the real data value. This type is available for data accessed from continuous AI and DI operations. 5. Select the text file separator. You may separate data using a space, a comma, or a tab. 6.
PCIS-DASK Win32 Utilities Sample Programs Browser The PCIS-DASK comes with Examples.exe — a sample program browser that allows you to view and execute all bundled sample programs. Examples.exe is located at the \Samples directory. After launching Examples.exe, double-click the icon of the sample you want to execute.
PCIS-DASK PCIS-DASK/X Utilities 6.2 PCIS-DASK/X Utilities This section introduces the tools that comes with the PCIS-DASK/ X package for Linux distributions. dask_conf The dask_conf configures the PCIS-DASK drivers, removes configured drivers, and sets or modifies the allocated buffer sizes of AI, AO, DI and DO. By default, the dask_conf is located at pcidask_xxx/util (where xxx is the version number) directory.
PCIS-DASK PCIS-DASK/X Utilities number of pages of contiguous initially allocated memory for continuous analog input, analog output, digital input, and digital output. The device driver allocates these memory sizes from the memory management module. After the selected driver is configured, type Y to confirm and return to the dask_conf main screen. The configured driver now appears at the Configured Cards list.
PCIS-DASK PCIS-DASK/X Utilities Utilities 95
PCIS-DASK Module Installation Script 6.3 Module Installation Script The PCI-bus architecture allows automatic detection of PCI devices right after these are installed and device nodes are created. The following commands are necessary: “insmod p9111” “grep'p9111' /proc/devices” “mknod /dev/PCI9111W0 c 254 0” “mknod /dev/PCI9111W1 c 254 1”… You can do these commands manually or use the provided installation scripts. The installation script is located at pci-dask_xxx/drivers. Using the pcidask.
PCIS-DASK Module Installation Script Because the current modules are designed based on Uni-Processor kernel, these modules may not work with SMP kernel. The installation script checks the kernel version through the /proc/sys/ kernel/version file. For SMP kernel, the version-checking procedure displays the additional error/warning messages and stops the installation.
6.4 Uninstallation Script The dask_remove.pl removes the PCIS-DASK/X installed in Linux. By default, this script is located at pci-dask_xxx/util directory. To remove the PCIS-DASK for Linux, execute the uninstallation script: /pci-dask_xxx/util/dask_remove.pl The script removes the device nodes made in /dev and the library copied into /usr/lib. 6.
PCIS-DASK Data File Converter (DAQCvt) Options for data format conversion DAQCvt provides three data format options. -st : text file with scaled data The data in hexadecimal format is scaled to engineering unit (voltage, ample, etc.) according to the card type, data width, and data range, then written to disk in text file format. This type is available for the data accessed from continuous AI operation only.
PCIS-DASK Data File Converter (DAQCvt) 100 Utilities
PCIS-DASK Brief Program Descriptions 7 Sample Programs Several sample programs are provided in the software CD. These sample program are designed to assist you when creating your own applications using PCIS-DASK. NOTE ADLINK periodically upgrades the PCIS-DASK for new cards/modules. Check the card/modules’s Release Notes to know if PCIS-DASK supports it. 7.1 Brief Program Descriptions Below is a list of programs and their description.
PCIS-DASK Brief Program Descriptions Card Type Sample Name PCI-7200 Description 1. C7200File Digital input of PCI-7200/cPCI-7200 through DMA transfer 2. Storing the data to disk Visual C/C++ console Program C7200DbfFile 1. Double buffer mode digital input of PCI-7200/ cPCI-7200 through DMA transfer 2.
PCIS-DASK Brief Program Descriptions Card Type Sample Name PCI-7248 SDK7248 Description D/I, and D/O of PCI-7248/cPCI-7248 Visual C/C++ Program SDK7248Int D/I, and D/O of PCI-7248/cPCI-7248 by Interrupt Event Status checking and waiting method Visual C/C++ Program SDK7248DbEvt D/I, and D/O of PCI-7248/cPCI-7248 by Interrupt Event Status checking and waiting method (Dual Interrupt Events) Visual C/C++ Program SDK7248IntMsg D/I, and D/O of PCI-7248/cPCI-7248 by Interrupt Event Message method Visual
PCIS-DASK Brief Program Descriptions Card Type PCI-7296 Sample Name SDK7296 SDK7296Int D/I, and D/O of PCI-7296 Visual C/C++ sample program D/I, and D/O of PCI-7296 by Interrupt Event Status checking and waiting method Visual C/C++ sample program SDK7296DbEvt D/I, and D/O of PCI-7296 by Interrupt Event Status checking and waiting method (Dual Interrupt Events) Visual C/C++ sample program SDK7248IntMsg D/I, and D/O of PCI-7296 by Interrupt Event Message method Visual C/C++ Program SDK7248DbEvtMsg D
PCIS-DASK Brief Program Descriptions Card Type PCI-7300 Rev.B Sample Name SDK7300Wave S7300PGwav SDK7300aMBufWav SDK7300Int Description Digital input of PCI-7300A_Rev.B/cPCI-7300A_Rev.B through DMA transfer Visual C/C++ Program Pattern generation of PCI-7300A_Rev.B/cPCI7300A_Rev.B Visual C/C++ program Multiple buffer mode digital input of PCI-7300A_Rev.B/ cPCI-7300A_Rev.B through DMA transfer Visual C/C++ Program Interrupt operation of PCI-7300A_Rev.B/cPCI7300A_Rev.
PCIS-DASK Brief Program Descriptions Card Type Sample Name PCI-7348/ PCI-7396 SDK7348 SDK7348Int SDK7348DbEvt SDK7348COSi SDK7348IntMsg SDK7348DbEvtMsg VB7348 SDK7396 SDK7396Int SDK7396DbEvt SDK7396COSi SDK7396IntMsg SDK7396DbEvtMsg VB7396 106 Description D/I, and D/O of PCI-7348 Visual C/C++ sample program D/I, and D/O of PCI-7348 by Interrupt Event Status checking and waiting method Visual C/C++ Program D/I, and D/O of PCI-7348 by Interrupt Event Status checking and waiting method (Dual
PCIS-DASK Brief Program Descriptions Card Type Sample Name PCI-7432 SDK7432 Description D/I, and D/O of PCI-7432/cPCI-7432 Visual C/C++ sample program SDK7432Int D/I, and D/O of PCI-7432/cPCI-7432 by Interrupt Event Status checking and waiting method Visual C/C++ Program SDK7432DbEvt D/I, and D/O of PCI-7432/cPCI-7432 by Interrupt Event Status checking and waiting method (Dual Interrupt Events) Visual C/C++ Program SDK7432IntMsg D/I, and D/O of PCI-7432/cPCI-7432 by Interrupt Event Message method
PCIS-DASK Brief Program Descriptions Card Type PCI-7442 Sample Name C7442TTL_Line Programmable D/I and D/O of PCI-7442 Visual C/C++ Program C7442TTL_Port Programmable D/I and D/O of PCI-7442 Visual C/C++ Program CDIOOnePoint Watchdog timer of PCI-7442 Visual C/C++ Program SDK7442DbEvt Change-of-state of PCI-7442 Visual C/C++ Program SDK7442DBEvtMsg Change-of-state of PCI-7442 Visual C/C++ Program SDK7442int Change-of-state of PCI-7442 Visual C/C++ Program SDK7442intMsg Change-of-state of PCI-
PCIS-DASK Brief Program Descriptions Card Type PCI-7444 Sample Name Description C7444TTL_Line Programmable D/I and D/O of PCI-7444 Visual C/C++ Program C7444TTL_Port Programmable D/I and D/O of PCI-7444 Visual C/C++ Program CDOOnePoint CWdtOvflow Watchdog timer of PCI-7444 Visual C/C++ Program SDK7444TTL Programmable D/I and D/O of PCI-7444 Visual C/C++ Program SDKWdtOvflow VB7444TTL PCI-8554 D/O of PCI-7444 Visual C/C++ Program Watch-dog Timer of PCI-7444 Visual C/C++ Program Programmable D/
PCIS-DASK Brief Program Descriptions Card Type Sample Name PCI-9112 SDK9112 Description A/D conversion, D/A conversion, D/I, and D/O of PCI9112/cPCI-9112 Visual C/C++ program SDK9112DMA Analog input of PCI-9112/cPCI-9112 through DMA data transfer Visual C/C++ Program SDK9112DbfDma Double buffer mode analog input of PCI-9112/cPCI-9112 through DMA data transfer Visual C/C++ sample program C9112File 1. Analog input of PCI-9112 through DMA data transfer 2.
PCIS-DASK Brief Program Descriptions Card Type Sample Name PCI-9114 Description SDK9114 A/D conversion, D/A conversion, D/I, and D/O of PCI9114 Visual C/C++ Program SDK9114Int Analog input of PCI-9114 through Interrupt operation Visual C/C++ Program SDK9114DbfInt Double buffer mode analog input of PCI-9114 through Interrupt operation Visual C/C++ sample program C9114File 1. Analog input of PCI-9114 through Interrupt operation 2. Storing the data to disk Visual C/C++ console Program 1.
PCIS-DASK Brief Program Descriptions Card Type Sample Name cPCI-9116 SDK9116 Description A/D conversion of cPCI-9116 Visual C/C++ Program SDK9116ScanDma Software trigger with Single buffer mode analog input of cPCI-9116 through DMA data transfer Visual C/C++ Program SDK9116PostTrg Post trigger with Single buffer mode analog input of cPCI9116 through DMA data transfer Visual C/C++ Program SDK9116MidTrg Middle trigger with Single buffer mode analog input of cPCI-9116 through DMA data transfer Visua
PCIS-DASK Brief Program Descriptions Card Type Sample Name Description SDK9118HRDbfDma Double buffer mode analog input of PCI-9118HR through DMA data transfer Visual C/C++ Program PCI-9118 SDK9118ScanDma Autoscan Analog input of PCI-9118 through DMA data transfer Visual C/C++ Program SDK9118HRScanDma Autoscan Analog input of PCI-9118HR through DMA data transfer Visual C/C++ Program SDK9118DbfPreTrg Pre-trigger with Double buffer mode analog input of PCI9118 through DMA data transfer Visual C/C++
PCIS-DASK Brief Program Descriptions Card Type Sample Name PCI-9812 Description SDK9812SoftTrg Software trigger with Single buffer mode analog input of PCI-9812/cPCI-9812 through DMA data transfer Visual C/C++ Program SDK9812PreTrg Pre-trigger with Single buffer mode analog input of PCI9812/cPCI-9812 through DMA data transfer Visual C/C++ Program SDK9812PostTrg Post trigger with Single buffer mode analog input of PCI9812/cPCI-9812 through DMA data transfer Visual C/C++ Program SDK9812MidTrg SDK9
PCIS-DASK Brief Program Descriptions Card Type Sample Name PCI-9221 C9221AIDma C9221AIDma_ExtD C9221AIDmaToFile C9221AIPoll C9221AIPoll_MultiChn Description A/D conversion of PCI-9221 Visual C/C++ Program A/D conversion of PCI-9221 with external trigger Visual C/C++ Program A/D conversion of PCI-9221 Stores acquired data to a disk file Visual C/C++ Program A/I Polling of PCI-9221 Visual C/C++ Program A/I Polling of PCI-9221 for multiple channels Visual C/C++ Program C9221AO A/O of PCI-9221 Visual C
PCIS-DASK Development Environments 7.2 Development Environments Visual Basic Sample Programs Several Visual Basic sample programs are provided for each card. Using VB9112DMA as example, the following files are included in each sample program: X VB project file - VB9112D.VBP X VB form files - VB9112D.FRM X Executable file - VB9112D.EXE You must install a 32-bit Microsoft® Visual Basic 4.0 Professional Edition or higher to view these sample programs. Refer to Microsoft® Visual Basic 4.
PCIS-DASK Development Environments You can use any Microsoft® Visual C++ 4.0 editor to view or modify these source files. However, you must install Microsoft® Visual C++ 4.0 or higher to build the executable 7200WAV.EXE. Refer to the Microsoft® Visual C++ manual or related reference books for additional information.
PCIS-DASK Execute Sample Programs 7.3 Execute Sample Programs To run the sample programs: 1. Open the sample program You can use Microsoft Visual C++ 4.0 or Visual Basic 4.0 to open and execute the sample programs. Or you can run the executable files directly. 2. Set the testing parameters Depending on your requirements, set the testing parameters such as A/D or D/A conversion, testing channels, sampling rate, transfer count, etc. 3. Click the Start button to run the program.
PCIS-DASK Detailed Descriptions of Programs 7.
PCIS-DASK Detailed Descriptions of Programs A/D Conversion, D/A Conversion, D/I, and D/O This sample illustrates how to use the PCIS-DASK to operate software trigger with program polling data mode and read/write data from digital input/output channels on PCI-9112. The main program main screen is shown below: Analog Input (A/D). Shows the results of A/D conversion. You can select the input channels (allows multiple channels) and the input range (gain) you want to test. Analog output (D/A).
PCIS-DASK Detailed Descriptions of Programs Data I/O Through DMA Data Transfer or Interrupt Operation This program demonstrates the use of PCIS-DASK to operate data I/O through DMA data transfer or Interrupt operation. The program main screen is shown below. These programs allow you to adjust the input channels, input range (PCI-7200 does not have these two options), sampling rate, and data size (transfer count).
PCIS-DASK Detailed Descriptions of Programs Double Buffer Mode Data I/O Through DMA Transfer or Interrupt Operation This program tells you how to use PCIS-DASK to operate doublebuffered data I/O through DMA transfer or Interrupt operation. The program main screen is shown below: These programs lets you input channel, input range (PCI-7200 does not have this two options), sampling rate, and data size (transfer count).
PCIS-DASK Detailed Descriptions of Programs Trigger Mode Data I/O Through DMA Data Transfer or Interrupt Operation These programs tell you how to use PCIS-DASK to operate trigger mode data I/O through DMA data transfer or interrupt operation. Except for the additional input item postCount, the main screen of these programs are similar with Single-Buffer Mode or DoubleBuffer Mode programs. Please refer to these two sections for the details.
PCIS-DASK Detailed Descriptions of Programs 124 Sample Programs
PCIS-DASK Required Files 8 Distribution of Applications 8.1 Required Files When installing an application that uses PCIS-DASK on another computer, you must install the necessary driver files and supporting libraries on the target system. You can create an automatic installer that installs your program and all files needed to run the program or you can install the program and program files manually For both installation methods, you must install the following files: Required support DLLs: Pci-dask.
PCIS-DASK Required Files for PCI-7200). These files must be copied to Winnt\system32\drivers directory. X Corresponding INF file in \Software\Pcis-dask\W98NT2K \redist\W2000\Inf (e.g. p7200.inf for PCI-7200). These files must be copied to Winnt\inf directory. X Device configuration utility in \Software\Pcisdask\W98NT2K \redist\W2000\Util. Utility file (option) X 126 Data conversion utility DAQCvt.
PCIS-DASK Automatic Installers 8.2 Automatic Installers Several programming environments provide setups or distribution kit tools that automatically create an installation program so that it can be conveniently installed from one computer to another. For the application to function properly, this tool must locate and include the required control files and supporting libraries in the installation program that it creates.
PCIS-DASK Manual Installation 8.3 Manual Installation If the programming environment does not include a setup or distribution kit tool, the installation task may be performed manually. To install the program to another computer: 1. Copy the program executable to the target computer. 2. Copy all required PCIS-DASK files described in the section 8.1 to the appropriate directory on the target computer. 3. Use NuDAQ Device Configuration utility to configure the device.