It's fine, I just figured out how to query the pressure over the network with a python script using
PyVISA.
Here's the code
import pyvisa
# instantiate the PyVISA-py backend using '@py'
rm = pyvisa.ResourceManager('@py')
# Initialise the instrument using the VXI-11 Address String. Edit to your own device.
with rm.open_resource("TCPIP::192.168.186.120::inst0::INSTR") as druck:
sens_press = float(druck.query(':SENSe:PRESsure?').split()[1]) #Query returns string, so must split and float to get pressure value alone.
print(f'{sens_press:.2f}mbar')
We need to access a pressure reading for a temperature-pressure correction factor when performing quality checks for dose output calculations in our radiotherapy center. We have several linear accelerators all in different rooms of the department. I don't want to have to install software on every computer just to access a pressure reading.
We have a local server with a database (QATrack+) that is accessible via a web browser interface, which we use to input data and perform automatic calculation procedures with python. So this pythonic method of querying the device is perfect as our server runs the code and gives the result without having any extra software installations on other computers.