res =
fclose (obj)
¶Closes USBTMC connection obj
obj is a usbtmc object.
res =
fopen (obj) (dummy)
¶Opens USBTMC connection obj This currently is a dummy function to improve compatibility to MATLAB
data =
fread (obj)
¶data =
fread (obj, size)
¶data =
fread (obj, size, precision)
¶[data,count] =
fread (obj, ...)
¶[data,count,errmsg] =
fread (obj, ...)
¶Reads data from usbtmc instrument
obj is a usbtmc object.
size Number of values to read. (Default: 100).
precision precision of data.
data The read data.
count values read.
errmsg read operation error message.
usbtmc =
usbtmc (path)
¶Open usbtmc interface.
path - the interface path of type String. If omitted defaults to ’/dev/usbtmc0’.
The usbtmc() shall return instance of octave_usbtmc class as the result usbtmc.
(usbtmc)
¶Close the interface and release a file descriptor.
usbtmc - instance of octave_usbtmc class.
None
[data, count] =
usbtmc_read (usbtmc, n)
¶Read from usbtmc slave device.
usbtmc - instance of octave_usbtmc class.
n - number of bytes to attempt to read of type Integer.
count - the number of bytes successfully read as an Integer.
data - the read bytes as a uint8 array.
n =
usbtmc_write (usbtmc, data)
¶Write data to a usbtmc slave device.
usbtmc - instance of octave_usbtmc class.
data - data, of type uint8, to be written to the slave device.
Upon successful completion, usbtmc_write() shall return the number of bytes written as the result n.