General functions
InstrumentConfig.initialize — Functioninitialize(model::Type{Instrument})
initialize(model::Type{Instrument}, address::String; GPIB_ID::Int=-1)Initializes a connection to the instrument at the given (input) IP address.
Arguments
model::Type{<:Instrument}: The device type you are connecting to. Usehelp> Instrumentto see available optionsaddress(optional): The ip address of the device. Ex. "10.3.30.23". If not provided, TcpInstruments will look for the address in the config file
Keywords
GPIB_ID: The GPIB interface ID of your device. This is optional and doesn't need to be set unless you are using a prologix controller to control it remotely
Returns
Instr: An instrument of the specified model connected to the given IP address.
Throws
- 'Instrument was not found in your .tcp_instruments.yml file' if the specified model is not listed
InstrumentConfig.terminate — Functionterminate(instr::Instrument)Closes the TCP connection.
Arguments
instr::Instrument: The device to close the TCP connection
TcpInstruments.info — Functioninfo(instr::Instrument)Asks an instrument to print model number and other device info.
Arguments
obj: Specified instrument to get device info
TcpInstruments.scan_network — Functionscan_network(; network_id="10.1.30.0", host_range=1:255)By default, report all found devices between addresses 10.1.30.1 to 10.1.30.255.
Searches for devices connected on port:
- 5025 (scpi)
- 1234 (prologix)
Keywords
network="10.1.30.": IP addresshost_range=1:255: range for IP address
Returns
Array: IP Addresses
TcpInstruments.save — Functionsave(data)
save(data; format=:matlab)
save(data; filename="custom_file_name.ext")Save data to a file
By default saves to julia format (.jld2) but can also export data to matlab by using the format=:matlab keyword argument
Arguments
data: data to be saved to file
Keywords
filename = "": default file nameformat = :julia: default julia format
TcpInstruments.load — Functiondata = load("function load(filename)
")Loads saved data from a file
Arguments
filename: name of file
Returns
Dict: data from file