Instrument Control Toolbox    
spoll

Perform a serial poll

Syntax

Arguments

obj
A GPIB object or an array of GPIB objects.
val
A numeric array containing the indices of the objects in obj, that must be ready for servicing before control is returned to MATLAB.
out
The GPIB objects ready for servicing.

Description

out = spoll(obj) performs a serial poll on the instruments associated with obj. out contains the GPIB objects that are ready for servicing. If no objects are ready for servicing, then out is empty.

out = spoll(obj,val) performs a serial poll and waits until the instruments specified by val are ready for servicing. An error is returned if a value specified in val does not match an index value in obj.

Using this syntax, spoll blocks access to the MATLAB command line until the objects specified by val are ready for servicing, or a timeout occurs for each instrument object specified by val. The timeout period is specified by the Timeout property.

Remarks

Serial polling is a method of obtaining specific information from GPIB objects when they request service. When you perform a serial poll, out contains the GPIB object that has asserted its service request (SRQ) line.

If obj is an array of GPIB objects

Example

If obj is a four-element array and val is set to [1 3], then spoll will block access to the MATLAB command line until the instruments connected to the first and third GPIB objects have both asserted their SRQ line, or a timeout occurs.

See Also

Functions

gpib, length

Properties

BoardIndex, Timeout


  size stopasync