BakingTray
Search…
Starting BakingTray
Starting BakingTray for the first time
You should by now have run through the detailed hardware checks before proceeding with the instructions on this page.

Making default settings files

At the command line run BakingTray. You will see something like this at the command prompt:
1
Starting construction of BT object
2
Can not find system settings file: making default file at C:\MATLAB\BakingTray\SETTINGS\systemSettings.yml
3
BT is reading default component settings
4
5
**** Can not find a component settings file in C:\MATLAB\BakingTray\SETTINGS\
6
**** Copying an empty file to this location but you will need to edit it ****
7
8
** Laser not defined in component settings file
9
** Cutter not defined in component settings file
10
** Scanner not defined in component settings file
11
** No motion axes defined
12
13
14
BakingTray starting...
15
Connecting to hardware components:
16
17
** Laser not defined in component settings file
18
** Cutter not defined in component settings file
19
** Scanner not defined in component settings file
20
** No motion axes defined
21
BT.attachMotionAxes failed to build one or more axes. Not starting BT.
22
Cleaning up BT object
23
BakingTray failed to create an instance of BT. Quitting.
Copied!
BakingTray failed to start but created default settings in a SETTINGS sub-directory within the BakingTray directory. You will now edit these settings files for you hardware. Before proceeding, familiarise yourself with the information on the settings files.

Editing the settings file

  • The component settings file describes the hardware BakingTray will use.
  • Navigate to the SETTINGS sub-directory and open the componentSettings.m file in an editor. For now set the maximum and minimum stage positions to reasonably large values: we'll deal with them in detail later.
  • Edit the file and re-run BakingTray. There are instructions in the file describing how it should be edited based on the information you gathered when verifying the hardware.

Editing the system settings file

  • The system settings file describes the system as a whole.
  • As before, information on editing the file is described here.

The default recipe

  • Also in the settings directory is a file called default_recipe.yml. The recipe files define the properties of an acquisition. When you start BakingTray, default_recipe.yml is read. You may edit this file so BakingTray starts with different defaults. You may create multiple such files and manually load one after BakingTray starts. e.g. different recipes for different organ types.

Finalising hardware settings

At this point you should be able to start BakingTray without errors and, if necessary, have at least roughly tweaked the X/Y stage PID loops. The most important task right now is to ensure that the stages can not produce an motion that would cause a hardware crash:
Be careful with the following steps. Go slowly so as not to damage your hardware.
  • Place the vibratome and blade holder with blade in the correct position with respect to the objective. e.g. So the blade centered on the objective and the blade tip is about 30 mm from the axis of the objective.
  • Assemble the stages and place an empty water bath on top.
  • You can leave the objetive off for now in order to avoid damageing it.
  • Set the X/Y stages to 0 (their mid-points) and move the XYZ stage so that the middle of the sample is under where the objective would be.
  • Bolt the stage into place.
  • Raise the water bath until the waterbath lip is level with the widest part of the blade holder. Move the Y stage and determine the maximum and minimum positions you can go without the blade holder hitting the lip of the water bath.
  • Perform the same check for the X stage. Motions of the X stage could cause the bath to hit the vibratome or the objective. You may, therefore, want the objective in place when making this measurement.
  • Carefully raise the Z stage and determine the point at which the blade comes within about 0.5 mm of the sample platform. This is is the maximum Z position.
  • Edit the config file. Restart BakingTray. Ensure the positions are honoured. You might need to restart MATLAB for the new values to be honoured.
With PI stages it's possible to define soft limits for the motions in PI Mikromove. For extra safety, set the limits in MikroMove then also set the limits in the BakingTray settings file. It's best to set slightly narrower limits in the BakingTray settings file so you will not get an out of bounds error from the stages.
Altering blade tile (pitch) will require updating the max Z axis position.

Calibrations