ユーザーズマニュアル目次NI-488.2 User Manual for Windows1Support2Worldwide Technical Support and Product Information2National Instruments Corporate Headquarters2Worldwide Offices2Important Information3Warranty3Copyright3Trademarks3WARNING REGARDING MEDICAL AND CLINICAL USE OF NATIONAL INSTRUMENTS PRODUCTS3Contents4About This Manual10Usingthe NI-488.2 Documentation10Accessing the NI-488.2 Online Help10Conventions11Related Documentation11Chapter 1 Introduction12Setting up and Configuring Your System12Controlling More Than One Interface13Configuration Requirements13Chapter 2 Measurement & Automation Explorer15Overview15Starting Measurement & Automation Explorer16Getting Started with NI-488.216Troubleshoot NI-488.2 Problems18Add a New GPIB Interface18Delete a GPIB Interface19Scan for GPIB Instruments19Instruments Not Found20Instruments Enumeration Failed20Communicate with Your Instrument20Basic Communication (Query/Write/Read)20Advanced Communication21View NI-488.2 Software Version22Monitor, Record, and Display NI-488.2 Calls22View or Change GPIB Interface Settings23Windows98/9523Windows2000/NT24View GPIB Instrument Information25Change GPIB Device Templates26Windows98/9526Windows2000/NT27Enable/Disable NI-488.2 DOS Support27Windows98/9527Windows2000/NT28Access Additional Help and Resources28NI-488.2 Online Help28National Instruments GPIB Web Site29View or Change GPIB-ENET Network Settings (Windows98/95 Only)29Assign IP Address29Configure Advanced IP Settings29Update GPIB-ENET Firmware30Chapter 3 Developing Your NI-488.2 Application31Simple Instrument Control31Interactive Instrument Control32Choosing Your Programming Methodology33Choosing a Method to Access the NI-488.2 Driver33NI-488.2 Language Interfaces33Direct Entry Access33Choosing How to Use the NI-488.2 API34Communicating with a Single GPIB Device34Using Multiple Interfaces and/or Multiple Devices35Checking Status with Global Variables35Status Word (ibsta)35Error Variable (iberr)37Count Variables (ibcnt and ibcntl)37Using Interactive Control to Communicate withDevices37Programming Models38Applications That Communicate with a Single GPIB Device38Items to Include38General Program Steps and Examples38Applications That Use Multiple Interfaces or Communicate with MultipleGPIB Devices40Items to Include40General Program Steps and Examples40Language-Specific Programming Instructions42Microsoft Visual C/C++ (Version 2.0 or Later)42Borland C/C++ (Version 4.0 or Later)42Visual Basic (Version 4.0 or Later)43Direct Entry with C43gpib-32.dll Exports43Directly Accessing the gpib-32.dll Exports44Running Existing NI-488.2 Applications47Running Existing Win32 and Win16 NI-488.2 Applications47Running Existing DOS NI-488.2 Applications Under Windows98/9547Running Existing DOS NI-488.2 Applications under Windows2000/NT48Chapter 4 Debugging Your Application49NI Spy49Global Status Variables50Existing Applications51NI-488.2 Error Codes51Configuration Errors51Timing Errors52Communication Errors53Repeat Addressing53Termination Method53Other Errors53Chapter 5 NI Spy Utility54Overview54Starting NI Spy54Using the NI Spy Online Help55Locating Errors with NI Spy55Viewing Properties for Recorded Calls55Exiting NI Spy56Performance Considerations56Chapter 6 Interactive Control Utility57Overview57Getting Started with Interactive Control57Interactive Control Syntax60Number Syntax60String Syntax60Address Syntax61Interactive Control Commands61Status Word66Error Information66Count Information67Chapter 7 NI-488.2 Programming Techniques68Termination of Data Transfers68High-Speed Data Transfers (HS488)69Enabling HS48869System Configuration Effects on HS48870Waiting for GPIB Conditions71Asynchronous Event Notification in Win32 NI-488.2Applications71Calling the ibnotify Function71ibnotify Programming Example72Writing Multithreaded Win32 NI-488.2 Applications76Device-Level Calls and Bus Management78Talker/Listener Applications78Serial Polling79Service Requests from IEEE 488 Devices79Service Requests from IEEE 488.2 Devices79Automatic Serial Polling80Stuck SRQ State80Autopolling and Interrupts81SRQ and Serial Polling with Device-Level Traditional NI-488.2 Calls81SRQ and Serial Polling with Multi-Device NI-488.2 Calls82Example 1: Using FindRQS83Example 2: Using AllSpoll83Parallel Polling84Implementing a Parallel Poll84Parallel Polling with Traditional NI-488.2 Calls84Parallel Polling with Multi-Device NI-488.2 Calls86Appendix A GPIB Basics87Talkers, Listeners, and Controllers87Controller-In-Charge and System Controller87GPIB Addressing88Sending Messages across the GPIB88Data Lines88Handshake Lines89Interface Management Lines89Appendix B Status Word Conditions90ERR (dev, brd)91TIMO (dev, brd)91END (dev, brd)91SRQI (brd)92RQS (dev)92CMPL (dev, brd)92LOK (brd)92REM (brd)93CIC (brd)93ATN (brd)93TACS (brd)93LACS (brd)94DTAS (brd)94DCAS (brd)94Appendix C Error Codes and Solutions95EDVR (0)96Solutions96ECIC (1)96Solutions97ENOL (2)97Solutions97EADR (3)98Solutions98EARG (4)98Solutions98ESAC (5)99Solutions99EABO (6)99Solutions99ENEB (7)99Solutions100EDMA (8)100Solutions100EOIP (10)100Solutions100ECAP (11)101Solutions101EFSO (12)101Solutions101EBUS (14)102Solutions102ESTB (15)102Solutions102ESRQ (16)103Solutions103ETAB (20)103Solutions103Appendix D Windows 98/95: Troubleshooting and Common Questions104Troubleshooting EDVR Error Conditions104EDVR Error Condition with ibcntl Set to 0xE028002C (–534249428)104EDVR Error Condition with ibcntl Set to 0xE0140025 (–535560155)104EDVR Error Condition with ibcntl Set to 0xE0140035 (–535560139)105EDVR Error Condition with ibcntl Set to 0xE0320029 (–533594071) or 0xE1050029 (–519765975)105EDVR Error Condition with ibcntl Set to 0xE0140004 (–535560188)105EDVR Error Condition with ibcntl set to 0xE1030043 (–519897021)105Troubleshooting Device Manager Problems106Enabling Interrupts107Step 1. Free up an Interrupt Resource107Step 2. Remove Your GPIB Interface from the Device Manager108Step 3. Refresh the Device Manager or Reinstall Your GPIB interface108Common Questions108Appendix E Windows 2000/NT: Common Questions112Common Questions112Appendix F Technical Support Resources115Glossary117A-B117C-E118F-H119I120L-M121N-R122S123T-U124Index125Numbers/Symbols125A125B-C126D-E127F-G128H-I129L-M130N131O-P132Q-S133T-W134Figures8Figure 1-1. Linear and Star System Configuration12Figure 1-2. Example of Multiboard System Configuration13Figure 2-1. Measurement & Automation Explorer16Figure 2-2. Viewing Documentation on Your CD17Figure 2-3. NI-488.2 Troubleshooting Wizard18Figure 2-4. NI-488.2 Communicator21Figure 2-5. NI-488.2 Calls Recorded by NI Spy23Figure 2-6. Properties Dialog Box in Windows 98/9524Figure 2-7. GPIB Configuration Utility in Windows NT25Figure 3-1. NI-488.2 Communicator32Figure 4-1. NI-488.2 Calls Recorded by NI Spy50Figure 5-1. NI-488.2 Calls Recorded by NI Spy55Figure 6-1. Instrument Address in Measurement & Automation Explorer58Figure A-1. GPIB Address Bits88Tables8Table 2-1. Measurement & Automation Explorer Instrument Information26Table 3-1. Status Word Layout36Table 6-1. Syntax for Device-Level Traditional NI-488.2 Calls in Interactive Control61Table 6-2. Syntax for Board-Level Traditional NI-488.2 Calls in Interactive Control63Table 6-3. Syntax for Multi-Device NI-488.2 Calls in Interactive Control64Table 6-4. Auxiliary Functions in Interactive Control65Table A-1. GPIB Handshake Lines89Table A-2. GPIB Interface Management Lines89Table B-1. Status Word Layout90Table C-1. GPIB Error Codes95Table D-1. Device Manager Status Codes106サイズ: 1MBページ数: 135Language: Englishマニュアルを開く
ユーザーズマニュアル目次NI-488.2 User Manual1Support2Worldwide Technical Support and Product Information2National Instruments Corporate Headquarters2Worldwide Offices2Important Information3Warranty3Copyright3Trademarks3Patents3WARNING REGARDING USE OF NATIONAL INSTRUMENTS PRODUCTS3Contents4About This Manual9Using the NI-488.2 Documentation9Accessing the NI-488.2 Online Help10Conventions10Related Documentation11Chapter 1 Introduction12Setting Up and Configuring Your System12Figure 1-1. Linear and Star System Configuration12Controlling More Than One Interface13Figure 1-2. Example of Multiboard System Configuration13Configuration Requirements13Chapter 2 Measurement & Automation Explorer (Windows)15Overview15Starting Measurement & Automation Explorer16Figure 2-1. Measurement & Automation Explorer16Troubleshoot NI-488.2 Problems17Figure 2-2. NI-488.2 Troubleshooting Utility17Add a New GPIB Interface18Remove a GPIB Interface18Scan for GPIB Instruments19Instruments Not Found19Too Many Listeners on the GPIB19Communicate with Your Instrument20Basic Communication (Query/Write/Read)20Figure 2-3. NI-488.2 Communicator21Advanced Communication22View NI-488.2 Software Version22Monitor, Record, and Display NI-488.2 Calls23Figure 2-4. NI-488.2 Calls Recorded by NI Spy23View or Change GPIB Interface Settings24Figure 2-5. GPIB Interface Properties in Measurement & Automation Explorer25View GPIB Instrumentation Information26Change GPIB Device Templates26Enable/Disable NI-488.2 DOS Support27Access Additional Help and Resources27NI-488.2 Online Help27National Instruments GPIB Web Site27View or Change GPIB-ENET/100 Network Settings28Device Configuration28Update GPIB-ENET/100 Firmware28Chapter 3 GPIB Explorer (Mac OS X and Linux)29Starting GPIB Explorer30Mac OS X30Figure 3-1. GPIB Explorer (Mac OS X)30Linux31Figure 3-2. GPIB Explorer (Linux)31Add a New GPIB Interface32Delete a GPIB Interface33View NI-488.2 Software Version33View or Change GPIB Interface Settings34Figure 3-3. Properties Dialog Box (Mac OS X)34Figure 3-4. Properties Dialog Box (Linux)35Access Additional Help and Resources36NI-488.2 Online Help36National Instruments GPIB Web Site36View or Change GPIB-ENET/100 Network Settings36Device Configuration37Update GPIB-ENET/100 Firmware37Chapter 4 Developing Your NI-488.2 Application38Interactive Instrument Control38Choosing Your Programming Methodology39Choosing a Method to Access the NI-488.2 Driver39Choosing How to Use the NI-488.2 API40Communicating with a Single GPIB Device40Using Multiple Interfaces and/or Multiple Devices41Checking Status with Global Variables41Status Word (ibsta)42Table 4-1. Status Word Layout42Error Variable (iberr)43Count Variables (ibcnt and ibcntl)43Using Interactive Control to Communicate with Devices44Programming Models44Applications That Communicate with a Single GPIB Device44Items to Include44General Program Steps and Examples45Applications That Use Multiple Interfaces or Communicate with Multiple GPIB Devices46Items to Include46General Program Steps and Examples46Language-Specific Programming Instructions for Windows48Microsoft Visual C/C++ (Version 2.0 or Later)48Borland C/C++ (Version 4.0 or Later)49Visual Basic (Version 4.0 or Later)49Direct Entry with C49gpib-32.dll Exports49Directly Accessing the gpib-32.dll Exports50Language-Specific Programming Instructions for Mac OS X53Language-Specific Programming Instructions for Linux53Chapter 5 Debugging Your Application55NI Spy55Global Status Variables55NI-488.2 Error Codes55Configuration Errors56Timing Errors56Communication Errors57Repeat Addressing57Termination Method57Other Errors57Chapter 6 NI Spy Utility58Overview58Starting NI Spy58Windows58Mac OS X and Linux58Monitoring API Calls with NI Spy59Figure 6-1. NI-488.2 Calls Recorded by NI Spy, Shown on Windows59Using the NI Spy Online Help59Locating Errors with NI Spy59Debugging Existing Applications60Viewing Properties for Recorded Calls60Exiting NI Spy60Performance Considerations60Chapter 7 Interactive Control Utility61Overview61Getting Started with Interactive Control61Interactive Control Syntax64Number Syntax64String Syntax65Address Syntax65Interactive Control Commands65Table 7-1. Syntax for Device-Level Traditional NI-488.2 Calls in Interactive Control66Table 7-2. Syntax for Board-Level Traditional NI-488.2 Calls in Interactive Control67Table 7-3. Syntax for Multi-Device NI-488.2 Calls in Interactive Control69Table 7-4. Auxiliary Functions in Interactive Control70Status Word71Error Information71Count Information72Chapter 8 NI-488.2 Programming Techniques73Termination of Data Transfers73High-Speed Data Transfers (HS488)74Enabling HS48874System Configuration Effects on HS48875Waiting for GPIB Conditions76Asynchronous Event Notification in NI-488.2 Applications76Calling the ibnotify Function76ibnotify Programming Example78Writing Multithreaded NI-488.2 Applications81Device-Level Calls and Bus Management83Talker/Listener Applications84Serial Polling84Service Requests from IEEE 488 Devices85Service Requests from IEEE 488.2 Devices85Automatic Serial Polling85Stuck SRQ State86Autopolling and Interrupts86SRQ and Serial Polling with Device-Level Traditional NI-488.2 Calls87SRQ and Serial Polling with Multi-Device NI-488.2 Calls87Example 1: Using FindRQS88Example 2: Using AllSpoll89Parallel Polling89Implementing a Parallel Poll89Parallel Polling with Traditional NI-488.2 Calls90Parallel Polling with Multi-Device NI-488.2 Calls91Appendix A GPIB Basics93Figure A-1. GPIB Address Bits94Table A-1. GPIB Handshake Lines95Table A-2. GPIB Interface Management Lines95Appendix B Status Word Conditions97Table B-1. Status Word Layout97Appendix C Error Codes and Solutions102Table C-1. GPIB Error Codes102Appendix D Common Questions114Appendix E Technical Support and Professional Services117Glossary118A-B118C-E119F-H120I121L-M122N-R123S124T-U125Index126Symbols126A-C126D-E127F128G-H129I130K-N131O-Q132R-T133V-W134サイズ: 1.26MBページ数: 134Language: Englishマニュアルを開く