Error Variable (Iberr); Count Variables (Ibcnt And Ibcntl); Using Interactive Control To Communicate With Devices - National Instruments NI-488.2 User Manual

National instruments user manual ni-488.2
Hide thumbs Also See for NI-488.2:
Table of Contents

Advertisement

Error Variable (iberr)

Note
The value in
, indicating that an error has occurred.
ibsta

Count Variables (ibcnt and ibcntl)

Using Interactive Control to Communicate with Devices

© National Instruments Corporation
The language header file defines each of the
for an
status bit being set using the bitwise
ibsta
C/C++). For example, the
To check for an NI-488.2 error, use the following statement after each
NI-488.2 call:
if (ibsta & ERR)
printf("NI-488.2 error encountered");
If the ERR bit is set in
error occurs, the error type is specified by
error, use the following statement after each NI-488.2 call:
if (ibsta & ERR)
printf("NI-488.2 error %d encountered", iberr);
is meaningful as an error type only when the ERR bit is set in
iberr
For more information about error codes and solutions, refer to Chapter 4,
Debugging Your
Application, or Appendix C,
The count variables are updated after each read, write, or command
function. In Win32 applications,
On some systems, like MS-DOS,
a 32-bit integer. For cross-platform compatibility, all applications should
use
. If you are reading data, the count variables indicate the
ibcntl
number of bytes read. If you are sending data or commands, the count
variables reflect the number of bytes sent.
Before you begin writing your application, you might want to use the
Interactive Control utility to communicate with your instruments
interactively by typing in commands from the keyboard rather than from an
application. You can use the Interactive Control utility to learn to
communicate with your instruments using the NI-488.2 API. For specific
device communication instructions, refer to the user manual that came with
your instrument. For information about using the Interactive Control utility
and detailed examples, refer to Chapter 6,
Chapter 3
ibsta
ERR bit is bit 15 of
ibsta
, an NI-488.2 error has occurred. When an
ibsta
iberr
and
ibcnt
is a 16-bit integer, and
ibcnt
Interactive Control
3-7
Developing Your NI-488.2 Application
status bits. You can test
operator (
and
&
.
ibsta
. To check for an NI-488.2
Error Codes and
Solutions.
are 32-bit integers.
ibcntl
ibcntl
Utility.
NI-488.2 User Manual for Windows
in
is

Advertisement

Table of Contents
loading

Table of Contents