Jackhammer Mode
This is an internal feature for rapidly oscillating the manipulator along an axis.
Jackhammer mode is not exposed in Ephys Link yet so this guide is to demonstrate how to test it in Python.
1. Get Ephys Link
Follow the instructions for Installing for Development. Or, just use a basic Python virtual environment (Python 3.13+ is required):
2. Change the Sensapex SDK to support Jackhammer Mode
You need to replace the libum.dll
file in the Sensapex library folder. This is located at <virtual env>\Lib\site-packages\sensapex
. If you made a virtual environment named venv
in the previous step, it would be .\venv\Lib\site-packages\sensapex
.
- Download the custom SDK here.
- (Optional) Make a backup of the old
libum.dll
in the Sensapex library folder by renaming it tolibum.dll.bck
or something like that. - Copy the downloaded
libum.dll
to the Sensapex library folder. - Modify
sensapex.py
in the Sensapex library folder to enable using this custom DLL. Set themax_version
variable at line398
to(1, 510)
.
You can (optionally) test if everything is still working by running Ephys Link and checking to see if it can still see and control Sensapex manipulators.
3. Use the test script
There's a test script in scripts/jackhammer.py
that makes a call to Jackhammer mode.
In short, jackhammer mode enables open-loop control of the manipulators by letting you turn on and off the motors in a sequence. You can define a "first" and "second" stage to cycle between. When the "thrust length" argument is positive, the manipulator will move in the forward direction and when it is negative it will move backwards. Thrust length is not a real unit but is some percentage representing the amount of movement a step should take.