Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

When to use what? Serial Polling, Async, Send/Recieve

One thing that has confused me a little about working with the GPIB32.dll library is that I'm never quite sure when to use what method of communication for the bus/device.

Are there any ground rules or baseline recommendations for when you should Serial Poll or use Async.. or just use the plain vanilla Send and Receive calls?
0 Kudos
Message 1 of 3
(3,241 Views)
Thats depending on what you want to do. In a GPIB-System, you have a system controller, talkers and listeners. e.g. you have more than one talker, which can notify you about a service request (means, that e.g. a multimeter has detected a new voltage), then the system controller must look, what talker has sent this request. To do this, you must do a serial poll. Now, all devices will be checked, whether they send this request, or not.
Async .... I don´t know.

Sorry about my bad english, but I hope to have helped you.


Greetings
Andy
0 Kudos
Message 2 of 3
(3,233 Views)
Hello,

1. Serial Polling:
------------------
You can use serial polling to obtain specific information from GPIB devices when they request service. When the GPIB SRQ line is asserted, it signals the Controller that a service request is pending. The Controller must then determine which device asserted the SRQ line and respond accordingly. The most common method for SRQ detection and servicing is the serial poll.

If you'd like to read more about serial polling, see the following manual starting on page 8-12:

http://www.ni.com/pdf/manuals/370428b.pdf


2. Asyncronous vs Synchronous
-----------------------------
The asynchronous vs synchronous commands (such as ibrda vs. ibrd) are distinguished as follows:

The asynchronous I/O calls (ibcmda, ibrda, ibwrta) are designed so that applications can
perform other non-GPIB operations while the I/O is in progress. Once the asynchronous I/O
begins, further NI-488.2 calls are strictly limited. Any calls that would interfere with the I/O
in progress are not allowed; the driver returns EOIP in this case. Once the I/O is complete, the application must resynchronize with the NI-488.2 driver. Resynchronization is accomplished by using one of the following functions:

ibnotify - if the ibsta value passed to the ibnotify callback contains CMPL, the driver
and application are resynchronized.

ibwait - if the returned ibsta contains CMPL, the driver and application are
resynchronized.

ibstop - the I/O is canceled; the driver and application are resynchronized.

ibonl - the I/O is canceled and the interface is reset; the driver and application are
resynchronized.


You can find more about this in the NI-488.2 Function Reference Manual:

http://www.ni.com/pdf/manuals/370936a.pdf


Hope this helps!

Best Regards,

JLS
Best,
JLS
Sixclear
0 Kudos
Message 3 of 3
(3,211 Views)