The specs_XRC1000 module¶
Autogenerated API documentation for specs_XRC1000¶
Self contained module to run a SPECS sputter gun including fall-back text gui
-
class
PyExpLabSys.drivers.specs_XRC1000.
CursesTui
(sourcecontrol)[source]¶ Bases:
threading.Thread
Defines a fallback text-gui for the source control.
-
__init__
(sourcecontrol)[source]¶ This constructor should always be called with keyword arguments. Arguments are:
group should be None; reserved for future extension when a ThreadGroup class is implemented.
target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called.
name is the thread name. By default, a unique name is constructed of the form “Thread-N” where N is a small decimal number.
args is the argument tuple for the target invocation. Defaults to ().
kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}.
If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.
-
run
()[source]¶ Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
-
-
class
PyExpLabSys.drivers.specs_XRC1000.
XRC1000
(port=None)[source]¶ Bases:
threading.Thread
Driver for X-ray Source Control - XRC 1000
-
__init__
(port=None)[source]¶ Initialize module
Establish serial connection and create status variable to expose the status for the instrument for the various gui’s
-
comm
(command)[source]¶ Communication with the instrument
Implements the synatx need to send commands to instrument including handling carrige returns and extra lines of ‘OK’ and other pecularities of the instrument.
Parameters: command (str) – The command to send Returns: The reply to the command striped for protocol technicalities Return type: str posible comands: REM?, IEM?, UAN?, IHV?, IFI?, UFI?, PAN?, SERNO?, ANO?, STAT?, OPE? REM, LOC, IEM 20e-3, UAN 10e3, OFF, COOL, STAN, UAON, OPE, ANO 1, ANO 2
-
read_water_flow
()[source]¶ read the water flow from external hardware :return: water flow in L/min :rtype float
-
read_emission_current
()[source]¶ Read the emission current. Unit A :return: The emission current :rtype: float
-
read_filament_voltage
()[source]¶ Read the filament voltage. Unit V :return: The filament voltage :rtype: float
-
read_filament_current
()[source]¶ Read the filament current. Unit A :return: The filament current :rtype: float
-
read_anode_voltage
()[source]¶ Read the anode voltage. Unit V :return: The anode voltage :rtype: float
-
standby
()[source]¶ Set the device on standby The function is not working entirely as intended. TODO: Implement check to see if the device is alrady in standby :return: The direct reply from the device :rtype: str
-
operate
()[source]¶ Set the device in operation mode TODO: This function should only be activated from standby!!! :return: The direct reply from the device :rtype: str
-
remote_enable
(local=False)[source]¶ Enable or disable remote mode :param local: If True the device is set to local, otherwise to remote :type local: Boolean :return: The direct reply from the device :rtype: str
-
change_control
()[source]¶ Enable or disable remote mode :param local: If True the device is set to local, otherwise to remote :type local: Boolean :return: The direct reply from the device :rtype: str
-
cooling
()[source]¶ Enable or disable water cooling :type local: Boolean :return: The direct reply from the device :rtype: str
-
update_status
()[source]¶ Update the status of the instrument
Runs a number of status queries and updates self.status
Returns: The direct reply from the device Return type: str
-
run
()[source]¶ Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
-