3.15 USBTMC

3.15.1 @octave_usbtmc/fclose

Function File: res = fclose (obj)

Closes USBTMC connection obj

Inputs

obj is a usbtmc object.

3.15.2 @octave_usbtmc/fopen

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

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

3.15.3 @octave_usbtmc/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 usbtmc instrument

Inputs

obj is a usbtmc object.
size Number of values to read. (Default: 100).
precision precision of data.

Outputs

data The read data.
count values read.
errmsg read operation error message.

3.15.4 @octave_usbtmc/fwrite

Function File: numbytes = fwrite (obj, data)
Function File: numbytes = fwrite (obj, data, precision)

Writes data to an usbtmc instrument

Inputs

obj is a usbtmc object.
data data to write.
precision precision of data.

Outputs

returns number of bytes written.

3.15.5 usbtmc

Loadable Function: usbtmc = usbtmc (path)

Open usbtmc interface.

Inputs

path - the interface path of type String. If omitted defaults to ’/dev/usbtmc0’.

Outputs

The usbtmc() shall return instance of octave_usbtmc class as the result usbtmc.

3.15.6 usbtmc_close

Loadable Function: usbtmc_close (usbtmc)

Close the interface and release a file descriptor.

Inputs

usbtmc - instance of octave_usbtmc class.

Outputs

None

3.15.7 usbtmc_read

Loadable Function: [data, count] = usbtmc_read (usbtmc, n)

Read from usbtmc slave device.

Inputs

usbtmc - instance of octave_usbtmc class.
n - number of bytes to attempt to read of type Integer.

Outputs

count - the number of bytes successfully read as an Integer.
data - the read bytes as a uint8 array.

3.15.8 usbtmc_write

Loadable Function: n = usbtmc_write (usbtmc, data)

Write data to a usbtmc slave device.

Inputs

usbtmc - instance of octave_usbtmc class.
data - data, of type uint8, to be written to the slave device.

Outputs

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