3.3 GPIB

3.3.1 @octave_gpib/fclose

Function File: res = fclose (obj)

Closes connection to GPIB device obj

3.3.2 @octave_gpib/fopen

Function File: res = fopen (obj) (dummy)

Opens connection to GPIB device obj This currently is a dummy function to improve compatibility to MATLAB

3.3.3 @octave_gpib/fprintf

Function File: fprintf (obj, cmd)
Function File: fprintf (obj, format, cmd)
Function File: fprintf (obj, cmd, mode)
Function File: fprintf (obj, format, cmd, mode)

Writes string cmd to GPIB instrument

obj is a GPIB object

cmd String format Format specifier mode sync

3.3.4 @octave_gpib/fread

Function File: data = fread (obj)
Function File: data = fread (obj, size)
Function File: data = fread (obj, size, precision)
Function File: [data,count] = fread (obj, ...)
Function File: [data,count,errmsg] = fread (obj, ...)

Reads data from GPIB instrument

obj is a GPIB object

size Number of values to read. (Default: 100) precision precision of data

count values read errmsg read operation error message

3.3.5 @octave_gpib/fscanf

Function File: res = fscanf (obj)
Function File: res = fscanf (obj, format)
Function File: res = fscanf (obj, format, size)
Function File: [res,count] = fscanf (obj, ...)
Function File: [res,count,errmsg] = fscanf (obj, ...)

Reads data res from GPIB instrument

obj is a GPIB object

format Format specifier size number of values

count values read errmsg read operation error message

3.3.6 @octave_gpib/fwrite

Function File: fwrite (obj, data)
Function File: fwrite (obj, data, precision)
Function File: fwrite (obj, data, mode)
Function File: fwrite (obj, data, precision, mode)

Writes data to GPIB instrument

obj is a GPIB object

data data to write precision precision of data mode sync

3.3.7 clrdevice

Function File: clrdevice (obj)

Send clear command to Clear GPIB instrument.

obj is a GPIB object

3.3.8 gpib

Loadable Function: gpib = gpib ([gpibid], [timeout])

Open gpib interface.

gpibid - the interface number.
timeout - the interface timeout value. If omitted defaults to blocking call.

The gpib() shall return instance of octave_gpib class as the result gpib.

3.3.9 gpib_close

Loadable Function: gpib_close (gpib)

Close the interface and release a file descriptor.

gpib - instance of octave_gpib class.

3.3.10 gpib_read

Loadable Function: [data, count, eoi] = gpib_read (gpib, n)

Read from gpib interface.

gpib - instance of octave_gpib class.
n - number of bytes to attempt to read of type Integer.

The gpib_read() shall return number of bytes successfully read in count as Integer and the bytes themselves in data as uint8 array. eoi indicates read operation complete

3.3.11 gpib_timeout

Loadable Function: gpib_timeout (gpib, timeout)
Loadable Function: t = gpib_timeout (gpib)

Set new or get existing gpib interface timeout parameter. The timeout value is valid from 0 to 17.

gpib - instance of octave_gpib class.
timeout - Value of 0 means never timeout, 11 means one second and 17 means 1000 seconds (see GPIB documentation (ibtmo) for further details)

If timeout parameter is omitted, the gpib_timeout() shall return current timeout value as the result t.

3.3.12 gpib_write

Loadable Function: n = gpib_write (gpib, data)

Write data to a gpib interface.

gpib - instance of octave_gpib class.
data - data to be written to the gpib interface. Can be either of String or uint8 type.

Upon successful completion, gpib_write() shall return the number of bytes written as the result n.

3.3.13 spoll

Function File: out = spoll (obj)
Function File: [out,statusByte] = spoll (obj)

Serial polls GPIB instruments.

obj is a GPIB object or a cell array of GPIB objects

out GPIB objects ready for service statusByte status Byte

3.3.14 trigger

Function File: trigger (obj)

Triggers GPIB instrument.

obj is a GPIB object