EasyManua.ls Logo

National Instruments NI-488.2 NI-488.2 User Manual

National Instruments NI-488.2 NI-488.2
134 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #92 background imageLoading...
Page #92 background image
Chapter 8 NI-488.2 Programming Techniques
NI-488.2 User Manual 8-20 ni.com
2. Conduct the parallel poll using PPoll, store the response, and check
the response for a certain value. In the following example, because
DIO5 is asserted by the device if
ist is 1, the program checks
bit 4 (hex 10) in the response to determine the value of
ist.
PPoll(0, &response);
/* If response has bit 4 (hex 10) set, the ist bit
of the device at that time is equal to 1. If
it does not appear, the ist bit is equal to 0.
Check the bit in the following statement. */
if (response & 0x10) {
printf("The ist equals 1.\n");
}
else {
printf("The ist equals 0.\n");
}
3. Unconfigure the device for parallel polling using PPollUnconfig, as
shown in the following example. In this example, the
NOADDR constant
must appear at the end of the array to signal the end of the address list.
If
NOADDR is the only value in the array, all devices receive the parallel
poll disable message.
AddressList[0] = 3;
AddressList[1] = NOADDR;
PPollUnconfig(0, AddressList);

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the National Instruments NI-488.2 NI-488.2 and is the answer not in the manual?

National Instruments NI-488.2 NI-488.2 Specifications

General IconGeneral
Operating SystemsWindows, Linux, macOS
Programming LanguagesC, C++, Python, LabVIEW
InterfaceGPIB
Supported StandardsIEEE 488.2
FunctionalityGPIB instrument control, data acquisition, and analysis

Summary

Chapter 1 Introduction

Setting Up and Configuring Your System

Describes how to set up and configure your GPIB system.

Chapter 2 Measurement & Automation Explorer (Windows)

Troubleshoot NI-488.2 Problems

Instructions for using the NI-488.2 Troubleshooting Utility.

Chapter 3 GPIB Explorer (Mac OS X and Linux)

Chapter 4 Developing Your NI-488.2 Application

Interactive Instrument Control

Using the Interactive Control utility for instrument communication.

Choosing How to Use the NI-488.2 API

Guidance on selecting between traditional and multi-device NI-488.2 API calls.

Checking Status with Global Variables

Explains how to use global status variables (ibsta, iberr, etc.).

Chapter 5 Debugging Your Application

NI Spy

Introduction to NI Spy utility for monitoring NI-488.2 calls.

Global Status Variables

Details on global status variables (ibsta, iberr, ibcnt, ibcntl).

NI-488.2 Error Codes

Explanation of error variable (iberr) and error codes.

Chapter 6 NI Spy Utility

Chapter 7 Interactive Control Utility

Chapter 8 NI-488.2 Programming Techniques

High-Speed Data Transfers (HS488)

Describes the HS488 protocol for high-speed GPIB data transfer.

Enabling HS488

Instructions on how to enable the HS488 feature for GPIB interfaces.

Asynchronous Event Notification in NI-488.2 Applications

Using ibnotify for asynchronous notification of GPIB events.

Appendix C Error Codes and Solutions

GPIB Error Codes

Lists and describes GPIB error codes and their meanings.

EDVR (0)

Explains the EDVR error and provides solutions for accessing issues.