Instrument Control Toolbox | ![]() ![]() |
Syntax
out = spoll(obj) out = spoll(obj,val)
Arguments
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:
obj
must have the same BoardIndex
property value.obj
is polled to determine if the instrument is ready for servicing.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.
Functions
Properties
![]() | size | stopasync | ![]() |