Package: sensapex
Sensapex SDKThis python library wraps the C SDK provided by Sensapex's umsdk. It provides general access to the
functions present therein, as well as a device-based abstraction.Installationpip install sensapexThis library comes packaged
withthe latest umsdk libraryfor windows. All other
versions can be downloaded and/or compiled separately and configured withUMP.set_library_path.UsagefromsensapeximportUMPump=UMP.get_ump()dev_ids=ump.list_devices()stage=ump.get_device(20)stage.calibrate_zero_position()manipulator=ump.get_device(4)manipulator.goto_pos((2500.0412,6810.0003,15830.1419),speed=200)pressure=ump.get_device(30)pressure.set_pressure(1,2.3e-4)Also included are some simple test scripts. The following will report on all devices present:python-msensapex.testOr for a more involved test of your hardware as it moves around randomly,
installpyqtgraphin your environment and use e.g.:python-msensapex.accuracy_test<device_id>Where<device_id>should be replaced with the numerical ID of your device, as shown bypython -m sensapex.test.ACQ4 IntegrationSensapex stages (uMs), manipulators (uMp) and pressure controllers (uMc) are all well integrated into theACQ4neurophysiology platform. To access these devices from ACQ4, simply installsensapexinto your ACQ4 environment and add appropriate configuration. Indefault.cfgadd:drivers:sensapex:group:0# [default] of Group 'A' or whatever numeric index corresponds to your hardwaredebug:False# [default] or True to get debug logging as described belowaddress:"169.254.255.255"# [default] or whatever your hardware's broadcast address isdriverPath:None# [default] to using standard OS library searches or set to a custom locationAnd indevices.cfg, add any number of the following device configuration sections (named distinctly):Stage:driver:"Sensapex"nAxes:3deviceId:20# ...ObjectiveChanger:driver:'SensapexObjectiveChanger'deviceId:20# ...Manipulator1:driver:"Sensapex"isManipulator:TruedeviceId:1# ...Pressure1:Driver:"SensapexPressureControl"deviceId:30pressureChannel:1DebugYou can turn on debugging to produce detailed logs and network packet captures. First,
installWireshark(or for linux, use your package manager
to get thepcaputilspackage). Make sure the user account you use has permission to run
thedumpcapprogram. Next, install the psutil python package:pipinstallpsutilOnce those are installed, you can turn on the debug logging for your SDK wrapper:fromsensapeximportUMPUMP.set_debug_mode(True)ump=UMP.get_ump()This will create a directory,sensapex-debug/in the current working directory, populated with a
log file and a pcap file. Repeated initializations of the debug mode will create addition pcap files
and append to the log file. These can be sent toSensapexalong with any relevant details, such as:A description of errant behaviorThe color of each of the relevant device lightsA picture of the touchscreen stateSteps to reproduce and how consistently it occursAuthorshipCopyright (c) 2016-2021 Sensapex OyThanks to the following for contributions:Luke CampagnolaAri SalmiMartin ChaseThomas BraunChangelog1.400.0Update to latest driverAccuracy test for 4-axis devices (ignoring the 4th axis)1.022.8Include ACQ4 integration instructions in README1.022.7Packaging fix to include driver binary.find_library to find libum in default locations.1.022.6More accuracy_test improvements.Handle floating point movements.1.022.5The accuracy_test script now takes--linearto test linear movements.1.022.4Binary installer works in develop modeErrors no longer prevent other devices from movingAllow init args for UMP.get_device (to avoid n_axes race)1.022.3Bad MoveRequests should blow up on init, rather than during movement.1.022.2A bunch of fixes from Luke.1.022.1Debug mode: logs, hardware details and PCAPBugfix in default library path for test scripts1.022.0Setup bdist_wheel that pre-downloads the SDKBump SDK version to the latest1.021.2SDK version bump1.021.1Move-finish error captureUse new windows library name1.021.0Update to new version0.920.4Pressure devices don't need positioning callbacks0.920.3Expose more pressure functions.0.920.2Workaround for sdk bug in motion planning