@@ -366,6 +366,21 @@ def set_axis_backlash(self, wait: bool = True, **axes: float):
366366 """
367367 self ._set_cmd_args_and_kwds (Cmds .BACKLASH , ** axes , wait = wait )
368368
369+ @axis_check ()
370+ def get_axis_backlash (self , * axes : str ):
371+ """Return the backlash compensation value for one or more axes.
372+
373+ :param axes: one or more lettered axes (case insensitive).
374+ :return: backlash compensation of requested axes in dict form (upper case).
375+
376+ .. code-block:: python
377+
378+ box.get_axis_backlash('x') # returns: {'X': 0.1}
379+ box.get_axis_backlash('x', 'y') # returns: {'X': 0.1, 'Y': 0.2}
380+
381+ """
382+ return self ._get_axis_value (Cmds .BACKLASH , * axes )
383+
369384 @axis_check ()
370385 def get_position (self , * axes : str ):
371386 """Return the controller's locations for lettered (non-numeric) axes.
@@ -897,15 +912,26 @@ def start_array_scan(self, wait: bool = True):
897912 self ._set_cmd_args_and_kwds (Cmds .ARRAY , card_address = card_address ,
898913 wait = wait )
899914
900- def reset_ring_buffer (self , wait : bool = True ):
901- """Clear the ring buffer contents."""
902- self ._clear_ring_buffer (wait = wait )
903- self ._rb_axes = []
915+ def reset_ring_buffer (self , axis : str = None , wait : bool = True ):
916+ """Clear the ring buffer contents.
917+ See `RING BUFFER MODULE <https://asiimaging.com/docs/ring_buffer>`_
918+ for mode details.
919+
920+ .. WARNING:: This command is card-specific and axes on a shared card
921+ will also be affected.
904922
905- def _clear_ring_buffer (self , wait : bool = True ):
906- """Clear the ring buffer contents."""
907- kwds = {'X' : 0 }
908- self ._set_cmd_args_and_kwds (Cmds .RBMODE , ** kwds , wait = wait )
923+ :param axis: axis for ring buffer reset.
924+ :param wait: wait until the reply has been received.
925+ """
926+ kwds = {"X" : 0 }
927+ if axis :
928+ card_address , _ = self .axis_to_card [axis ]
929+ self ._set_cmd_args_and_kwds (
930+ Cmds .RBMODE , card_address = card_address , ** kwds , wait = wait
931+ )
932+ else :
933+ self ._set_cmd_args_and_kwds (Cmds .RBMODE , ** kwds , wait = wait )
934+ self ._rb_axes = []
909935
910936 @axis_check ('mode' , 'wait' )
911937 def setup_ring_buffer (self , * axes : str ,
0 commit comments