Instrument-control Toolkit - Functions


The following functions are available:

Common Functions

flushinputFlush the instruments input buffers
flushoutputFlush the instruments output buffers
readbinblockread a binblock of data from a instrument device
readlineread data from a instrument device excluding terminator value
writebinblockWrite a IEEE 488.2 binblock of data to a instrument device
writelineWrite data to a instrument device including terminator value
writereadwrite a ASCII command and read data from a instrument device.

General

instrhelpDisplay instrument help
instrhwinfoQuery available hardware for instrument-control
resolvehostResolve a network host name or address to network name and address

GPIB

clrdeviceSend clear command to Clear GPIB instrument.
gpibOpen gpib interface.
gpib_readRead from gpib interface.
gpib_writeWrite data to a gpib interface.
gpib_timeoutSet new or get existing gpib interface timeout parameter.
gpib_closeClose the interface and release a file descriptor.
spollSerial polls GPIB instruments.
triggerTriggers GPIB instrument.
@octave_gpib/fcloseCloses connection to GPIB device OBJ
@octave_gpib/fopenOpens connection to GPIB device OBJ This currently is a dummy function to imp...
@octave_gpib/fprintfWrites string CMD to GPIB instrument
@octave_gpib/freadReads DATA from GPIB instrument
@octave_gpib/fscanfReads data RES from GPIB instrument
@octave_gpib/fwriteWrites DATA to GPIB instrument

I2C

i2cOpen i2c interface.
i2c_addrSet new or get existing i2c slave device address.
i2c_closeClose the interface and release a file descriptor.
i2c_readRead from i2c slave device.
i2c_writeWrite data to a i2c slave device.
@octave_i2c/fcloseCloses I2C connection OBJ
@octave_i2c/fopenOpens I2C connection OBJ
@octave_i2c/freadReads DATA from I2C instrument
@octave_i2c/fwriteWrites DATA to I2C instrument
@octave_i2c/getGet the properties of i2c object.
@octave_i2c/setSet the properties of i2c object.

Modbus

modbusOpen modbus interface using a specified transport of 'tcpip' or 'serialrtu'.
@octave_modbus/getGet the properties of modbus object.
@octave_modbus/maskWriteRead holding register at ADDRESS from modbus device DEV apply masking and wri...
@octave_modbus/readRead data from modbus device DEV target TARGET starting at address ADDRESS.
@octave_modbus/setSet the properties of modbus object.
@octave_modbus/writeWrite data DATA to modbus device DEV target TARGET starting at address ADDRESS.
@octave_modbus/writeReadWrite data VALUES to the modbus device DEV holding registers starting at addr...

Parallel

parallelOpen Parallel interface.
pp_closeClose the interface and release a file descriptor.
pp_ctrlSets or Read the Control lines.
pp_dataSets or Read the Data lines.
pp_datadirControls the Data line drivers.
pp_statReads the Status lines.
@octave_parallel/fcloseCloses parallel connection OBJ
@octave_parallel/fopenOpens parallel interface OBJ
@octave_parallel/freadReads DATA from parallel instrument
@octave_parallel/fwriteWrites DATA to parallel instrument

Serial (Deprecated)

serialOpen serial interface.
seriallistReturns a list of all serial ports detected in the system.
srl_readRead from serial interface.
srl_writeWrite data to a serial interface.
@octave_serial/fopenOpens SERIAL interface OBJ
@octave_serial/fcloseCloses SERIAL connection OBJ
@octave_serial/flushinputFlush the pending input, which will also make the BytesAvailable property be 0.
@octave_serial/flushoutputFlush the output buffer.
@octave_serial/fprintfWrites formatted string TEMPLATE using optional parameters to serial instrument
@octave_serial/freadReads DATA from serial instrument
@octave_serial/fwriteWrites DATA to serial instrument
@octave_serial/getGet the properties of serial object.
@octave_serial/serialbreakSend a break to the serial port
@octave_serial/setSet the properties of serial object.
@octave_serial/srl_baudrateSet new or get existing serial interface baudrate parameter.
@octave_serial/srl_bytesizeSet new or get existing serial interface byte size parameter.
@octave_serial/srl_closeClose the interface and release a file descriptor.
@octave_serial/srl_flushFlush the pending input/output.
@octave_serial/srl_paritySet new or get existing serial interface parity parameter.
@octave_serial/srl_stopbitsSet new or get existing serial interface stop bits parameter.
@octave_serial/srl_timeoutSet new or get existing serial interface timeout parameter used for srl_read(...

Serial Port

serialportOpen serial port interface.
serialportlistReturns a list of all serial ports detected in the system.
@octave_serialport/configureTerminatorSet terminator for ASCII string manipulation
@octave_serialport/flushFlush the serial port buffers
@octave_serialport/fprintfWrites formatted string TEMPLATE using optional parameters to serialport inst...
@octave_serialport/freadReads DATA from serial port instrument
@octave_serialport/fwriteWrites DATA to serial port instrument
@octave_serialport/getGet the properties of serialport object.
@octave_serialport/getpinstatusGet status of serial pins
@octave_serialport/readRead a specified number of values from a serialport using optional precision ...
@octave_serialport/serialbreakSend a break to the serial port
@octave_serialport/setSet the properties of serialport object.
@octave_serialport/setDTRSet the state of the DTR line
@octave_serialport/setRTSSet the state of the RTS line
@octave_serialport/writeWrites DATA to serialport instrument

SPI

spiOpen a spi interface.
spi_closeClose the interface and release a file descriptor.
spi_readRead from spi slave device.
spi_writeWrite data to a spi slave device.
spi_writeAndReadWrite data to a spi slave device and then read same number of values.
@octave_spi/fcloseCloses SPI connection OBJ
@octave_spi/fopenOpens SPI connection OBJ
@octave_spi/freadReads DATA from a SPI instrument
@octave_spi/fwriteWrites DATA to SPI instrument
@octave_spi/getGet the properties of spi object.
@octave_spi/readReads DATA from SPI instrument
@octave_spi/setSet the properties of spi object.
@octave_spi/writeWrites DATA to SPI instrument
@octave_spi/writeAndReadWrites and reads DATA from SPI instrument

TCP (Deprecated)

tcpOpen tcp interface.
tcp_closeClose the interface and release a file descriptor.
tcp_readRead from tcp interface.
tcp_writeWrite data to a tcp interface.
tcp_timeoutSet new or get existing tcp interface timeout parameter used for tcp_read() r...
tcpipMatlab compatible wrapper to the tcp interface.
@octave_tcp/fcloseCloses TCP connection OBJ
@octave_tcp/flushFlush the tcp socket buffers
@octave_tcp/flushinputFlush the pending input, which will also make the BytesAvailable property be 0.
@octave_tcp/flushoutputFlush the output buffer.
@octave_tcp/fopenOpens TCP connection OBJ
@octave_tcp/fprintfWrites formatted string TEMPLATE using optional parameters to TCP instrument
@octave_tcp/freadReads DATA from TCP instrument
@octave_tcp/fwriteWrites DATA to TCP instrument
@octave_tcp/getGet the properties of tcp object.
@octave_tcp/readReads DATA from TCP instrument
@octave_tcp/setSet the properties of tcp object.
@octave_tcp/writeWrites DATA to TCP instrument

TCP Client

tcpclientOpen tcpclient interface.
@octave_tcpclient/configureTerminatorSet terminator on a tcpclient object for ASCII string manipulation
@octave_tcpclient/flushFlush the tcpclient socket buffers
@octave_tcpclient/getGet the properties of tcpclient object.
@octave_tcpclient/readReads DATA from TCP instrument
@octave_tcpclient/setSet the properties of tcpclient object.
@octave_tcpclient/writeWrites DATA to TCP instrument

TCP Server

tcpserverOpen tcpserver interface.
@octave_tcpserver/configureTerminatorSet terminator on a tcpserver object for ASCII string manipulation
@octave_tcpserver/flushFlush the tcpserver socket buffers
@octave_tcpserver/getGet the properties of tcpserver object.
@octave_tcpserver/readReads DATA from TCP instrument
@octave_tcpserver/setSet the properties of tcpserver object.
@octave_tcpserver/writeWrites DATA to TCP instrument

UDP (Deprecated)

udpOpen udp interface.
udp_closeClose the interface and release a file descriptor.
udp_demoRun test SNTP demonstration for udp class
udp_readRead from udp interface.
udp_timeoutSet new or get existing udp interface timeout parameter used for udp_read() r...
udp_writeWrite data to a udp interface.
@octave_udp/fcloseCloses UDP connection OBJ
@octave_udp/flushFlush the udp socket buffers
@octave_udp/flushinputFlush the pending input, which will also make the BytesAvailable property be 0.
@octave_udp/flushoutputFlush the output buffer.
@octave_udp/fopenOpens UDP connection OBJ This currently is a dummy function to improve compat...
@octave_udp/fprintfWrites formatted string TEMPLATE using optional parameters to UDP instrument
@octave_udp/freadReads DATA from UDP instrument
@octave_udp/fwriteWrites DATA to UDP instrument
@octave_udp/getGet the properties of udp object.
@octave_udp/readReads DATA from UDP instrument
@octave_udp/setSet the properties of udp object.
@octave_udp/writeWrites DATA to UDP instrument

UDP Port

udpportOpen udpport interface.
@octave_udpport/configureMulticastConfigure udpport device to receive multicast data
@octave_udpport/configureTerminatorSet terminator for ASCII string manipulation
@octave_udpport/flushFlush the udpport socket buffers
@octave_udpport/freadReads DATA from UDP instrument
@octave_udpport/fwriteWrites DATA to UDP instrument
@octave_udpport/fprintfWrites formatted string TEMPLATE using optional parameters to UDP instrument
@octave_udpport/getGet the properties of udpport object.
@octave_udpport/readReads DATA from UDP instrument
@octave_udpport/setSet the properties of udpport object.
@octave_udpport/writeWrites DATA to UDP instrument
@octave_udpport/writelineWrite data to a udpport including terminator value

USBTMC

usbtmcOpen usbtmc interface.
usbtmc_readRead from usbtmc slave device.
usbtmc_writeWrite data to a usbtmc slave device.
usbtmc_closeClose the interface and release a file descriptor.
@octave_usbtmc/fcloseCloses USBTMC connection OBJ
@octave_usbtmc/fopenOpens USBTMC connection OBJ This currently is a dummy function to improve com...
@octave_usbtmc/freadReads DATA from usbtmc instrument
@octave_usbtmc/fwriteWrites DATA to an usbtmc instrument

VXI11

vxi11Open vxi11 interface.
vxi11_closeClose the interface and release a file descriptor.
vxi11_readRead from vxi11 slave device.
vxi11_writeWrite data to a vxi11 slave device.
@octave_vxi11/fcloseCloses VXI11 connection OBJ
@octave_vxi11/fopenOpens VXI11 connection OBJ This currently is a dummy function to improve comp...
@octave_vxi11/freadReads DATA from vxi11 instrument
@octave_vxi11/fwriteWrites DATA to vxi11 instrument