knobby

Knobby scheduler

CaptureA new Scanbox panel allows users to define arbitrary changes in (x,y,z) position over time (frames) which are then executed by Knobby (version 2 only) while imaging.

Each entry define changes in x, y and z (in micrometers) relative to the present position and the frame number at which they will take place.

The “mem” column allows one to specify one of the stored absolute coordinates instead (memory locations are coded A=1, B=2, C=3).  If a memory location is defined the other entries are ignored and the position in the referenced memory is used instead.

This mechanism extends the z-stack functionality to include the ability to tile a sample and brings back the control window to one of the panels in Scanbox (as opposed to being controlled in Knobby’s screen).  The Knobby table is also saved in the info.knobby_table variable.

Paths can be computed offline and stored in a Matlab file that can be loaded.  The example below shows knobby moving the sample along a circular path.

Virtual Knobby

Happy new year! We have plenty of exciting Scanbox developments happening this year, so stay tuned to the blog.  You don’t want to miss anything!

We recently introduced a wireless version of knobby that runs on Android tablets. The same software is now available to run on Windows, side-by-side your Scanbox application.

virtual_knobby

The controls and behavior are identical to the tablet version.  To use virtual knobby simply set the tri_knob configuration variable to “127.0.0.1”.

After launching Scanbox from Matlab go to the yeti/knoby_virtual/ directory and launch the knobby_virtual.exe application.  That’s all…  Go ahead, give it a try!

So you now have three options for position control: classic knobby, knobby tablet and virtual knobby.

Note also that if you are a user of classic knobby and run into some issues (like a rotary encoder going bad) you can always use virtual knobby as an emergency replacement while the hardware version gets fixed.  So no more downtime for a broken knobby.

 

 

Disabling Knobby’s automatic reset

[Note: please do not use this feature yet — there are some bugs that need to be worked out. I will keep you posted.]

Up to now starting a new Scanbox session from Matlab causes knobby will auto-reset, bringing all the position counters back to zero and clearing all its position memories. This is done because there is no way for Scanbox to know if the microscope stages were moved manually from its last position (there are no absolute encoders), or if the motor box was powered off, since its last session.

Some users have asked for the option of not resetting Knobby between Scanbox sessions under the assumption that neither the stages nor the motor box have experienced  any changes between runs.  This would preserve the position counters and memories.

You can now obtain this behavior by using the knobbyreset configuration variable in the scanbox_config.m file.  Setting the variable to one will force automatic reset when starting a new Scanbox session (the default behavior up to now); a value of zero will disable the automatic reset.

The feature is now in beta testing so users should make sure everything works as expected before running new experiments with this feature turned on.  Try storing and retrieving memories across sessions, zeroing, and so on.  If you see inconsistent behavior across sessions let me know.

You can use this feature only with the wired version of knobby.  Knobby tablet does not yet support this feature.

 

Knobby improvements

We have added a couple of new features to Knobby based on user feedback that some may find useful. These features are presented in different screen pages. You can switch between the three available pages by touching one of the 3 gray disks on the bottom left of the screen.

knobby_v3

The first screen is the familiar position control screen. Here, changes in the position of the dials are interpreted as commands to change the positions of the axes by a certain distance. Use this window to navigate small distances (millimeters) around your sample.

When you need to move long distances (centimeters) between experiments, you can now use the velocity control mode in the second screen (instead of trying to move fast by spinning the knobs quickly). In velocity control mode you can move each of the axes while touching the + or – signs on the screen. The movement will continue at a fixed speed until you stop touching the screen. Velocity control is similar to what is achieved with the 3D mouse.

Warning: The microscope moves very fast in this mode, so make sure you know which direction you are moving and verify that there are no obstacles that will impede the movement. In this mode the knobs are disabled.

The third screen is the z-stack control, which allows knobby to automatically step and cover a given depth, in a given number of steps, while stepping a given number of microscope frames. This allows for an efficient collection of z-stack imagery without starting/stopping the microscope.

For Knobby to have access to the microscope frame timing you need to connect the left SMA connector (the one closer to the screen) to the CAM0 trigger output of Scanbox. The parameter values can be changed by moving the X (range), Y (steps), Z (frames) and A (arm/disarm) knobs.  The variable range represents the total travel length you want the z-stack to cover (values can be positive or negative).  The variable steps represents the total number of slices in the z-stack.  For example, if range = 100um and steps = 11, then the spacing between slices is 10um. Finally, the variable frames represents how many frames the microscope will acquire per slice.

After the parameters are set and z-stack armed, switch back to position mode before imaging. To have the best possible resolution set the position step size to S-Fine. If the objective is rotated away from vertical you can choose normal or rotated mode to decide how to move.  In rotated mode the steps will be along the axis of the objective. Now start imaging. You will notice that Knobby will automatically as selected by the parameter values.  During scanning Knobby will display changes in Z (or X and Z in rotated mode), stop once the range has been covered, and disarm automatically. You can use this feature to acquire z-stacks if you have a need to cover a range larger than what you can achieve with the optotune alone.

Here is an example of a z-stack acquired with knobby with 81 planes at 5 um separation:

To use the latest features just update the software and the knobby firmware.

Play with these options and familiarize yourself with their use before using them in an actual experiment. Let us know if you have any questions.

Updating the trinamic firmware

Some updates to Scanbox/Knobby require the update of the firmware in the Trinamic TMCM-6110 card inside the motor controller.  To update the firmware do the following:

  1. Run the program yeti/drivers/TMCL.exe
  2. Select Setup->Options from the menu.
  3. In the connection tab, select the COM port that corresponds to the card (it is typically labeled “Stepper”), and Click Ok.
  4. Select File->Open from the menu.
  5. Navigate to yeti/scanknob/ and select scanknob.tmc.  You will see the window below:tmcl
  6. Finally, click on the Download button shown by the red arrow.  The program will compile and download the code to the card.
  7. Close the program.  You are done.

After updating the motor box you are ready to start Scanbox again.  Make sure you also keep Knobby up to date by updating it with the firmware in each release.

Knobby updates

The last release of Scanbox provides a mechanism to update the firmware in Knobby and provides a few fixes to the existing version.  We will be using this mechanism to deploy future improvements.

The present version fixes a bug that incorrectly moved the objective to its original position when the X, Y, or Z axes where moved right after a Zero with vertical alignment was performed.  It also provides a way to cancel a Zero/Store/Recall function if they were triggered by mistake.  To cancel you simply have to touch the same button once again.

The new version also adjusts the hit areas on the touchscreen for the Lock/Unlock button and the XYZ menu selection for the Zero command, which were slightly off causing some unnecessary frustration.

To update Knobby’s firmware proceed as follows.

After downloading the latest Scanbox versions use pathtool in Matlab to ensure all the sub-directories within the distribution are added to the path.  Then within Matlab, type “knobby_update”.  If everything look Ok you will see something like the output below.  Your Knobby will reboot and you can then start Scanbox and start using it.


>> knobby_update
---------------------------------------
Knobby Firmware Update (dlr - 5/6/2016)
---------------------------------------
Reset Arduino Due...
Programming....
Atmel SMART device 0x285e0a60 found
Device : ATSAM3X8
Chip ID : 285e0a60
Version : v1.1 Dec 15 2010 19:25:04
Address : 524288
Pages : 2048
Page Size : 256 bytes
Total Size : 512KB
Planes : 2
Lock Regions : 32
Locked : none
Security : false
Boot Flash : false
Erase flash
done in 0.030 seconds

Write 54480 bytes to flash (213 pages)

[ ] 0% (0/213 pages)
[== ] 9% (21/213 pages)
[===== ] 19% (42/213 pages)
[======== ] 29% (63/213 pages)
[=========== ] 39% (84/213 pages)
[============== ] 49% (105/213 pages)
[================= ] 59% (126/213 pages)
[==================== ] 69% (147/213 pages)
[======================= ] 78% (168/213 pages)
[========================== ] 88% (189/213 pages)
[============================= ] 98% (210/213 pages)
[==============================] 100% (213/213 pages)
done in 11.410 seconds

Verify 54480 bytes of flash

[ ] 0% (0/213 pages)
[== ] 9% (21/213 pages)
[===== ] 19% (42/213 pages)
[======== ] 29% (63/213 pages)
[=========== ] 39% (84/213 pages)
[============== ] 49% (105/213 pages)
[================= ] 59% (126/213 pages)
[==================== ] 69% (147/213 pages)
[======================= ] 78% (168/213 pages)
[========================== ] 88% (189/213 pages)
[============================= ] 98% (210/213 pages)
[==============================] 100% (213/213 pages)
Verify successful
done in 10.177 seconds
Set boot flash true
CPU reset.
>>

 

Installing knobby

Many of you will be receiving Knobby in the mail soon.

Installing it is easy.  Just follow these steps:

  1. Connect knobby to a USB port
  2. Open the Device Manager and check which COM port # knobby was assigned to (it is the one displaying an Arduino Due board).
  3. Open Matlab, edit scanbox_config.m and set the tri_knob variable to the corresponding COM port.  Save.
  4. Start Scanbox.

knobby2

As Scanbox starts up you will see a welcome message on the screen and Knobby will be initialized.  Test that all axes work properly. Finally, uninstall the 3Dconnexion software and reboot your machine.  You are done!

Let me know if you have questions…

Meet Knobby

Knobby is finally here!

Knobby provides an alternative to the 3D mouse interface for controlling the position of the microscope.

Knobby offers simultaneous control of all axes of the microscope by independent knobs (X, Y, Z and objective angle, A) and is very responsive to the user movements producing nice, smooth motion.

The position control interface appears now on a touch-screen that replaces the panel within Scanbox (which will be grayed out if you use Knobby instead of the 3D mouse).

As the layout and functionality of the touch-screen is identical to that of the Scanbox panel, users should find it very easy to make the transition.

knobbyscreen

The position of the microscope is displayed in real-time on Knobby’s screen as the knobs are turned (compared to updates at the end of each movement with the 3D mouse), so now one can easily adjust the position with sub micrometer precision in a smooth fashion.

A lock/unlock feature prevents accidentally moving the microscope by touching the knobs.

Knobby is uses a USB port to allow for communication with Scanbox and firmware upgrades.

Knobby also makes Scanbox faster by offloading position control to an external device, instead of having to handle it within the Scanbox main loop.

As mentioned earlier, Scanbox will continue to support the 3D mouse interface.

If interested in Knobby, please contact Josh.

Leaked pictures show knobby is almost ready

Leaked pictures surfaced on-line this past Friday indicating that the much anticipated release of Knobby is expected very soon.
knobby.001

One Scanbox user that preferred not to give his name welcomed the news: “Finally, as someone trained in patch clamp, I never liked the 3D mouse.  Turning heavy knobs that move smoothly… yes, that feels different!”

The new device features a beautiful 2.8″ capacitive touchscreen for user interaction and independent and simultaneous control of all four axes of the microscope.

The same features previously available in the 3D mouse are implemented in Knobby as well: position memory, zeroing of axes and vertical alignment of the objective, different movement movement modes (coarse/fine/super-fine).  These features are all available via the direct interaction with the unit’s touchscreen.

One advantage of Knobby is that it allows simultaneous movement along all axes and is extremely responsive to the knobs’ movements while still keeping a nice, smooth motion.

The 3D mouse interface will still be available.  A configuration variable will allow the users to select between input from the 3D mouse or Knobby.

Scanbox users that prefer the type of interaction Knobby offers rather than working with the 3D mouse should let us know (send an email to Josh) so we know so we can estimate the number of units we need.