@@ -282,7 +282,7 @@ def set_solution(self,
282282
283283 logger .info ("%s loaded successfully." , solution_name )
284284
285- def start_sonication (self ) -> bool :
285+ def start_sonication (self , use_external_power_supply : bool = False ) -> bool :
286286 """
287287 Start sonication.
288288
@@ -292,8 +292,12 @@ def start_sonication(self) -> bool:
292292 if self ._test_mode :
293293 return True
294294
295- logger .info ("Turn ON HV" )
296- bHvOn = self .hvcontroller .turn_hv_on ()
295+ if not use_external_power_supply :
296+ logger .info ("Turn ON HV" )
297+ bHvOn = self .hvcontroller .turn_hv_on ()
298+ else :
299+ logger .info ("Using external power supply, HV will not be turned ON." )
300+ bHvOn = True
297301
298302 if self ._async_mode :
299303 self .txdevice .async_mode (True )
@@ -340,7 +344,7 @@ def get_status(self) -> LIFUInterfaceStatus:
340344
341345 return self .status
342346
343- def stop_sonication (self ) -> bool :
347+ def stop_sonication (self , use_external_power_supply : bool = False ) -> bool :
344348 """
345349 Stop sonication.
346350
@@ -353,7 +357,14 @@ def stop_sonication(self) -> bool:
353357 logger .info ("Stop Sonication" )
354358 # Send the solution data to the device
355359 bTriggerOff = self .txdevice .stop_trigger ()
356- bHvOff = self .hvcontroller .turn_hv_off ()
360+
361+ if not use_external_power_supply :
362+ logger .info ("Turn OFF HV" )
363+ bHvOff = self .hvcontroller .turn_hv_off ()
364+ else :
365+ logger .info ("Using external power supply, HV will not be turned OFF." )
366+ bHvOff = True
367+
357368 if self ._async_mode :
358369 self .txdevice .async_mode (False )
359370
0 commit comments