device.trap_diganostics module

class device.trap_diganostics.TrapDiagnostics(bus, bus_switch, **kwargs)[source]

Bases: ArduinoBase

Multi-purpuse Arduino controller that handles

  • 16x DS18B20 digital thermometers, one for each coil

  • 1x thermocouple, measures temp of the heated cathode insulation

  • 1x Hall probe

  • 1x needle valve

Communication:

  • serial interface to Arduino

close_needle()[source]

Close the needle valve, shorthand for set_needle(0).

get_needle()[source]

Get current state of the needle valve 0-100%.

is_main_on()[source]
main_switch_off()[source]
main_switch_on()[source]
measure_field()[source]

Measure magnetic field using the Hall probe.

set_needle(percent)[source]

Set state of the needle valve 0-100%.

Parameters:

percent (float) – Percentage in range 0-100, where 0 is closed.

set_needle_for(percent, duration)[source]

Set state of the needle valve 0-100%, close it when duration is exceeded.

Parameters:
  • percent (float) – Percentage in range 0-100, where 0 is closed.

  • duration (float) – Time interval in seconds.

temp_cathode()[source]

Read temperature of heated cathode insulation.

temp_coils()[source]

Read temperature of all 16 coils.

update_frontend(device_client)[source]