callback

所属分类:界面编程
开发工具:Visual Basic
文件大小:38KB
下载次数:19
上传日期:2006-06-08 13:27:32
上 传 者sunnyjiang
说明:  通讯界面编程,源代码,可进行二次开发
(communications interface programming, source code can be re-developed.)

文件列表:
DPI515.exe (45056, 2002-09-16)
DPI515.frm (16681, 2002-09-16)
DPI515.log (268, 2002-09-09)
DPI515.mak (909, 2002-09-16)
DPI515.vbw (105, 2002-09-16)
GpibNotify.ocx (40960, 1999-03-01)
NIGLOBAL.BAS (12125, 1998-05-04)
Vbib-32.bas (51902, 2002-09-16)

Win32 Microsoft Visual Basic Language Interface Version 1.1. Copyright 19*** National Instruments Corporation. All Rights Reserved. The \VBASIC\VER4 subdirectory contains the following: ----------------------------------------------------- README.TXT - This readme file VBIB-32.BAS - Visual Basic source file with NI-488.2 routine and NI-488 function prototypes NIGLOBAL.BAS - Visual Basic global module containing certain predefined constant declarations DPI515.MAK - Visual Basic NI-488.2 sample project file DPI515.FRM - Visual Basic NI-488.2 sample form file Choosing How to Access GPIB-32.DLL ---------------------------------- Applications can access GPIB-32.DLL by using either the Win32 Microsoft C/C++ language interface, the Win32 Borland C/C++ language interface, the Microsoft Visual Basic language interface, or direct entry. If you are using Microsoft C/C++, Borland C/C++, or Microsoft Visual Basic, use the corresponding language interface to develop your application. If you are using any other development environment, you must use direct entry. Refer to Chapter 3, "Developing Your Application" in the GPIB User Manual, for information on how to use direct entry to access GPIB-32.DLL. Checking Status with Global Variables ------------------------------------- Each NI-488 function and NI-488.2 routine updates four global variables to reflect the status of the device or board that you are using. The four global variables are the status word (ibsta), the error variable (iberr), and the count variables (ibcnt and ibcntl). Your application should check for errors after each NI-488 or NI-488.2 call by looking at ibsta. The ERR bit in ibsta indicates if the call succeeded or not. If the ERR bit is set, iberr contains an error code. For a complete description of ibsta bits and iberr error codes, see the Status Word Conditions and Error Codes and Solutions appendices at the back of your User Manual and Function Reference Manual. If you are writing a multithreaded application, please read the section titled "Writing Multithreaded Win32 GPIB Applications" in the "GPIB Programming Techniques" chapter of the GPIB User Manual. Creating Your Application Program --------------------------------- You must include VBIB-32.BAS and NIGLOBAL.BAS in your Microsoft Visual Basic version 4.0 application project file. VBIB-32.BAS contains the NI-488.2 routine and NI-488 function prototypes for interfacing with the dynamic link library GPIB-32.DLL. NIGLOBAL.BAS contains GPIB- specific variable declarations and constant definitions. Regarding I/O Functions and Data Types -------------------------------------- The I/O functions (i.e., ilrd, ilwrt, etc.) can be used to transfer all data types (byte, word, long) provided the count parameter specifies the number of bytes to transfer. For example, if you want to transfer an array of 16 longs, the correct transfer count to specify is 16*4=***. Note on Asynchronous I/O Calls ------------------------------ The asynchronous I/O calls (ibcmda, ilcmda, ibrda, ilrda, ibwrta, ilwrta) are converted to synchronous I/O calls in the Win32 Visual Basic language interface. With Visual Basic version 4.0, the buffers that are passed to DLLs are remapped. When the call to the DLL returns, the remapped buffer is freed up. As a result of this, the buffer passed to GPIB-32.DLL for asynchronous I/O operation becomes invalid when the asynchronous I/O call returns. This makes it impossible to safely use the asynchronous I/O functions. Therefore, they are remapped to their synchronous counterparts in the Microsoft Visual Basic 4.0 language interface. More Information ---------------- Refer to the "Developing Your Application" chapter in your GPIB User Manual for more information on application development.

近期下载者

相关文件


收藏者