📄 readme.txt
字号:
Win32 Microsoft C/C++ Language Interface
Version 1.1.
Copyright 1996 National Instruments Corporation.
All Rights Reserved.
The C subdirectory contains the following:
README.TXT - This readme file
DECL-32.H - Win32 C/C++ include file; contains NI-488
function and NI-488.2 routine prototypes
and various pre-defined constants
GPIB-32.OBJ - Win32 C/C++ language interface object
module
DEVSAMP.C - Win32 C device-level sample program
SAMP4882.C - Win32 C NI-488.2 sample program
The C sample programs are Win32 console applications. They illustrate
how to use the function calls exported by the NI-488.2M driver. Since
most of the popular Win32 compilers support console applications as
well as GUI applications, it is simple to create Win32 applications
without knowledge of Windows GUI programming. A Win32 console
application is a Win32 program which uses text-based input and output,
not a graphical interface. This allows you to quickly create a Win32
application by using simple input and output functions like printf
and scanf.
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 "NI-488.2M User Manual for Windows 95 and Windows NT", 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 "NI-488.2M User Manual for Windows 95 and
Windows NT".
Compiling, Linking, and Running Your Microsoft Visual C/C++
Win32 Language Interface Application
-------------------------------------------------------------
Before you compile your application, make sure that you have included
two header files at the beginning of your application:
#include <windows.h>
#include "decl-32.h"
From the standard DOS shell command line, you can compile and link
your application. Using Microsoft Visual C/C++ (version 2.0 or higher),
type:
cl devsamp.c gpib-32.obj
To run the application from the DOS shell, just type in the executable
name at the prompt. To run it from within Windows 95 or Windows NT
version 4.0 or higher, choose the RUN... option from the START menu.
Enter the name of the compiled program in the dialog box that pops up.
To run it from within Windows NT version 3.51, choose the RUN...
option from the FILE menu in the Program Manager. Enter the name of
the compiled program in the dialog box that pops up.
From the Microsoft Visual C/C++ (version 2.0 or higher) environment,
select CONSOLE APPLICATION for the PROJECT TYPE when creating a new
Project. Add your application files along with the GPIB-32.OBJ file to the
list of PROJECT FILES for that particular project. To compile the
application using Microsoft Visual C/C++ (version 2.x), select PROJECT
from the menu bar, then select BUILD from the list. To run the
application within the environment, select PROJECT from the menu bar,
then select EXECUTE from the list. To compile the application using
Microsoft Visual C/C++ (version 4.0 or higher), select BUILD from the
menu bar, then select BUILD from the list. To run the application
within the environment, select BUILD from the menu bar, then select
EXECUTE from the list.
More Information
----------------
Refer to the "Developing Your Application" chapter in your NI-488.2M
User Manual for more information on application development.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -