- NATIONAL INSTRUMENTS User Manual NI-488.2
Contents
NI-488.2 User Manual for Windows vi www.natinst.com
Access Additional Help and Resources......................................................................... 2-14
NI-488.2 Online Help ..................................................................................... 2-14
National Instruments GPIB Web Site ............................................................. 2-15
View or Change GPIB-ENET Network Settings (Windows 98/95 Only) .................... 2-15
Assign IP Address........................................................................................... 2-15
Configure Advanced IP Settings..................................................................... 2-15
Update GPIB-ENET Firmware....................................................................... 2-16
Chapter 3
Developing Your NI-488.2 Application
Simple Instrument Control ............................................................................................ 3-1
Interactive Instrument Control ...................................................................................... 3-2
Choosing Your Programming Methodology................................................................. 3-3
Choosing a Method to Access the NI-488.2 Driver........................................ 3-3
NI-488.2 Language Interfaces .......................................................... 3-3
Direct Entry Access.......................................................................... 3-3
Choosing How to Use the NI-488.2 API ........................................................ 3-4
Communicating with a Single GPIB Device.................................... 3-4
Using Multiple Interfaces and/or Multiple Devices ......................... 3-5
Checking Status with Global Variables......................................................................... 3-5
Status Word (ibsta).......................................................................................... 3-5
Error Variable (iberr) ...................................................................................... 3-7
Count Variables (ibcnt and ibcntl).................................................................. 3-7
Using Interactive Control to Communicate with Devices............................................. 3-7
Programming Models.................................................................................................... 3-8
Applications That Communicate with a Single GPIB Device........................ 3-8
Items to Include ................................................................................ 3-8
General Program Steps and Examples.............................................. 3-8
Applications That Use Multiple Interfaces or Communicate with
Multiple GPIB Devices................................................................................ 3-10
Items to Include ................................................................................ 3-10
General Program Steps and Examples..............................................3-10
Language-Specific Programming Instructions.............................................................. 3-12
Microsoft Visual C/C++ (Version 2.0 or Later) ............................................. 3-12
Borland C/C++ (Version 4.0 or Later)............................................................ 3-12
Visual Basic (Version 4.0 or Later) ................................................................ 3-13
Direct Entry with C......................................................................................... 3-13
gpib-32.dll Exports ........................................................................... 3-13
Directly Accessing the gpib-32.dll Exports...................................... 3-14
Running Existing NI-488.2 Applications...................................................................... 3-17
Running Existing Win32 and Win16 NI-488.2 Applications......................... 3-17
Running Existing DOS NI-488.2 Applications Under Windows 98/95 ......... 3-17
Running Existing DOS NI-488.2 Applications under Windows 2000/NT..... 3-18