zaber and python issue

180 views
Skip to first unread message

Emily Dennis

unread,
Mar 13, 2022, 6:48:56 PM3/13/22
to Bonsai Users
hey folks! I have a zaber device and I can run it from python. On it is a camera, and in Bonsai using the Pylon lib I can access the data and subsequently extract images and find centroids etc. I want to use the camera data to drive the gantry/zaber controller. Any general advice on getting zaber controllers working with Bonsai would be a huge help, I have tried many things with different issues (& am a total Bonsai n00b) 

I see there's a zaber motion library package, but no documentation on use. I installed it but didn't know where to go from there so I gave up.

I tried instead using a python Transform node. got 'no zaber_motion module' error, added my Anaconda3/Lib/site-packages to sys path in the script, and then have had many uninformative errors depending on what zaber_motion thing I try to import (e.g. unexpected token ',' or 'no module named enum') adding Anaconda3/Lib to sys path fixed the latter...

(1) is there a way to get more useful debug messages? using the GUI feels super limiting as I'm figuring this out
(2) is there a better way to go about this in general?
(3) anyone have experience using the zaber motion library package?

also running into the issue that googling bonsai (or even bonsairx) and these issues is giving me Microsoft bons.ai results that swamp out anything useful, so super happy to be here as a n00b -- thanks all!

Pierce Maolan

unread,
Apr 26, 2022, 5:14:25 AM4/26/22
to Bonsai Users
Hi Emily,

I haven't tried the zaber motion library yet but we've been using serial communication from Bonsai to drive our zaber controllers. Here's a link to the zaber protocol manual https://www.zaber.com/protocol-manual#topic_command_stream_setup_store

Just open up a serial port connection in Bonsai and send a string into a serial write node e.g. "/move rel 10000" moves a zaber stepper motor 10000 microsteps

Hope this helps,

Pierce
Reply all
Reply to author
Forward
0 new messages