LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ibwrt/ibrd vs Send/Receive

Hi,

 

The NI GPIB library that I use with CVI includes more than one function to perform I/O.

Two of these pairs are ibwrt/ibrd and Send/Receive.

 

Can someone clarify what exactly is different between those 2 functions?

I'm reading the help text but since I'm not a GPIB protocol expert, I feel I cannot sense some small details, if any.

 

Thanks, 

S. Eren BALCI
IMESTEK
0 Kudos
Message 1 of 4
(6,392 Views)

They belong to two different GPIB libraries explained here. Each library is modeled on a corresponding National Instruments library.

All functions which begin with "ib" (or "il") are part of the "488.1" or "Original GPIB library." All other routines are part of the "488.2 library."

 

Original 488.1 library — the 488.1 library (also referred to as the original library), consists of all of the functions and subroutines that begin with the letters "ib" (or "il"). This library uses a concept of device names and handles rather than GPIB addresses when referring to GPIB devices. There are two advantages to this approach:
(1) The GPIB addresses of each device are not stored in the program, so the same program can run on different buses where the addresses of each device are different.

(2) The program can refer to each device with an intelligible name rather than a number (the GPIB address).


488.2 library — this library consists of all the routines that do not begin with the letters "ib", or "il" for Basic, such as "Send" and "Receive" functions. These routines refer to all devices on the bus by their GPIB addresses rather than by names.

 

You should only use one or the other library in your code. Each library provides a different method of performing the same tasks. The choice of which library to use is a matter of personal preference.

Message Edited by dcl9000 on 10-08-2009 12:21 PM
0 Kudos
Message 2 of 4
(6,368 Views)

Hi dcl9000,

 

Thank you for the reply.

 

So they are equivalent in function, but do you know if they are equivalent at a lower level (like the changes they make on the individual GPIB lines)?

Can some instruments support only one of them? Did you (or anyone) have an experience of this kind?

Have you actually seen any bad consequences of using both 488.1 and 488.2 calls in your code ?

 

In my project, I personally preferred the 488.2 functions but other ready-to-use instrument drivers use ibwrt/ibrd and even some VISA functions for GPIB communication. So it is a whole soup of technologies.

 

I have a communication problem (the device suddenly stops communication after some random time of normal operation) with one of the devices and I'm wondering if that may be the cause.

 

Regards, 

S. Eren BALCI
IMESTEK
0 Kudos
Message 3 of 4
(6,351 Views)

Ans:

1. I don't know the lower level difference.

2. Yes. Some instruments may only support 488.1, especially old ones.

3. I'm not sure.  You probably can.  I've written code using both VISA functions and native 488.1 functions

    to control one instrument at the same time and found no issue at all.  However, I believe it is also

    instrument dependent.  It may work on one machine but not the other.

4. If your code works for a while and suddenly stops functioning, most likely it's hardware problem or

    limitation on communication buffer size.  There could be other causes, still.     

 

0 Kudos
Message 4 of 4
(6,333 Views)