--- format:markdown ... # Current Derive Power Circuit @ the tokamak GOLEM ## Scheme ![](CurrentDeriveCircuitDiagram.png) [svg source](CurrentDeriveCircuitDiagram.svg) ## Flowchart diagram (initiation) ![](VacuumSystemOperation.png) [svg source](VacuumSystemOperation.svg) ## Codes ### charge_CD_capacitors (api.py) ~~~ def charge_CD_capacitors(shared_namespace, controller, relay_action_lock, slow_charging_activated, target_voltage): if target_voltage > global_config.Ucd_limit: log.warning('target voltage {} V over Ucd limit {} V, charging only to limit'.format( target_voltage, global_config.Ucd_limit)) target_voltage = global_config.Ucd_limit voltage = controller.get_capacitor_voltage(2) while voltage <= target_voltage: log.debug("CD capacitor voltage: %.2f V" % voltage) with relay_action_lock: voltage = controller.get_capacitor_voltage(2) if not slow_charging_activated.is_set() and voltage >= 0.98 * target_voltage: #charging at 98% slow_charging_activated.set() #prevent others from disabling slow_charge with relay_action_lock: controller.control_Quido_set(-7) # engage large charging resistor log.debug("CD slow charge activated") sleep(0.1) #prevent voltage peaks sleep(0.5) with relay_action_lock: controller.CD_control_Quido_set(-1) # disengage charging log.debug("CD charging disengaged") sleep(1) #wait for full relay action controller.control_Quido_set(+7) # disengage large resistor log.debug("CD slow charging deactivated") sleep(0.1) # prevent voltage peaks being measured slow_charging_activated.clear() controller.panel_Quido_set(+20) # Et capacitors charged - signal on panel ~~~ ## Connectivity with control system ![](VacuumControlSystem.png) [svg source](VacuumControlSystem.svg) ## Photogallery