import instrumentkit as ik
# Connect to the SCPI instrument
inst = ik.generic_scpi.SCPIInstrument.open_tcpip('192.168.0.2', 8888)
# Get the name of the connected instrument
name = inst.name
print(name)
# Get the SCPI version supported by the instrument
scpi_version = inst.scpi_version
print(scpi_version)
# Check if all operations sent to the instrument have been completed
op_complete = inst.op_complete
print(op_complete)
# Get the power on status of the instrument
power_on_status = inst.power_on_status
print(power_on_status)
# Set the power on status of the instrument
inst.power_on_status = True
# Get the results of the instrument's self test
self_test_ok = inst.self_test_ok
print(self_test_ok)
# Reset the instrument
inst.reset()
# Clear the instrument
inst.clear()
# Send a software trigger event to the instrument
inst.trigger()
# Instruct the instrument to wait until it has completed all received commands before continuing
inst.wait_to_continue()
# Get the power line frequency setting for the instrument
line_frequency = inst.line_frequency
print(line_frequency)
# Set the power line frequency setting for the instrument
inst.line_frequency = 50
# Check and clear the error queue for the instrument
error_queue = inst.check_error_queue()
print(error_queue)
# Get the brightness of the display on the instrument
display_brightness = inst.display_brightness
print(display_brightness)
# Set the brightness of the display on the instrument
inst.display_brightness = 0.5
# Get the contrast of the display on the instrument
display_contrast = inst.display_contrast
print(display_contrast)
# Set the contrast of the display on the instrument
inst.display_contrast = 0.8
# Close the connection to the instrument
inst.close()