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 #90 background imageLoading...
Page #90 background image
Chapter 8 NI-488.2 Programming Techniques
NI-488.2 User Manual 8-18 ni.com
Parallel Polling with Traditional NI-488.2 Calls
Complete the following steps to implement parallel polling using
traditional NI-488.2 calls. Each step contains example code.
1. Configure the device for parallel polling using the
ibppc function,
unless the device can configure itself for parallel polling.
ibppc requires an 8-bit value to designate the data line number,
the
ist sense, and whether the function configures the device for
the parallel poll. The bit pattern is as follows:
0 1 1 E S D2 D1 D0
E is 1 to disable parallel polling and 0 to enable parallel polling for that
particular device.
S is 1 if the device is to assert the assigned data line when
ist is 1,
and 0 if the device is to assert the assigned data line when
ist is 0.
D2 through D0 determine the number of the assigned data line. The
physical line number is the binary line number plus one. For example,
DIO3 has a binary bit pattern of 010.
The following example code configures a device for parallel polling
using traditional NI-488.2 calls. The device asserts DIO7 if its
ist
is 0.
In this example, the
ibdev command opens a device that has a primary
address of 3, has no secondary address, has a timeout of 3 s, asserts
EOI with the last byte of a write operation, and has EOS characters
disabled.
#include "ni488.h"
dev = ibdev(0,3,0,T3s,1,0);
The following call configures the device to respond to the poll on DIO7
and to assert the line in the case when its
ist is 0. Pass the binary bit
pattern, 0110 0110 or hex 66, to
ibppc.
ibppc(dev, 0x66);
If the GPIB interface configures itself for a parallel poll, you should
still use the
ibppc function. Pass the interface index or an interface
unit descriptor value as the first argument in
ibppc. Also, if the
individual status bit (
ist) of the interface needs to be changed, use the
ibist function.

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.