Installing updates is not very difficult. Here is a step-by-step guide.
- Download the latest Scanbox distribution from GitHub (download ZIP file — don’t clone).
- Uncompress the zip file in Documents/MATLAB/<new scanbox directory>. Keep your old distribution intact, in case something does not work and you want to restore the old version.
- Start Matlab
- There are two options for setting up the configuration file for the new version.
- The first one involves users keeping their configuration file in ~/Documents/MATLAB. This location will shadow the file distributed with Scanbox, which is in ~/Documents/MATLAB/Scanbox/core. New releases of Scanbox may include new configuration variables. You only need to copy those new lines. If you don’t copy the lines Scanbox will typically choose a default value for them.
- The second option involves copying the settings of the old configuration file to the new one. Type “edit scanbox_config” in the Matlab window to edit the scanbox_config.m from the old version. Use pathtool in Matlab to add all the subdirectories in the new distribution to the path. Type “edit scanbox_config” to edit the new configuration file. You should now have both the old and new config files on the Matlab editor. Copy the required settings form the old file to the new one.
Please ensure that the amplifier types are specified in the configuration file and that the offset of the amplifiers are set correctly by following the instructions here.
- Copy the sbxcal.mat (spatial calibration) and otcal.mat (optotune calibration) from the old distribution to the new one. These files are usually placed in ~/Documents/MATLAB/Scanbox/core, but can be copied to ~/Documents/MATLAB if you want them not to be overwritten when updating to a new release. Note the bidirectional alignment is part of the configuration file.
- To update the firmware in Scanbox do the following:
- Open the Cypress Bootloader Host (seearch for Bootloader if you can’t find it)
- For the file entry in the Bootloader Host, select the file <newdir>/drivers/DarioBox.cyacd
- In the Matlab command window type “sb_boot”.
- In the ports panel of the Bootloader host you will see a USB Human Interface Device listed immediately. Select the device and click the Download button at the top left of the Bootloader Host Window (it is the one with an arrow pointing down). Note: you ave 20 seconds to upload the new firmware (from the time you issued the Matlab commands), otherwise Scanbox will continue booting normally. The Log panel in the Bootloader host will show if the programming of the box was successful. You can now quit the Bootloader host.
- The new firmware version should now show up on the Scanbox LCD display.
- Verify that the “firmware” variable in the configuration file equals the firmware version shown in the LCD screen.
- Update Knobby. To do so, simply go to the Matlab window and type “knobby_update”. Wait for Knobby to update.
- Update the firmware in the motor box. To do so follow the instructions here
- Close Matlab.
- Run the vc_redist.x64.exe file in the scanbox/core/ directory (if Windows says it is already installed just skip it).
- Make sure you have the latest nVidia drivers and download/install any updates from here.
- Open a command window and type “conda install pyserial”. This will update the python serial library and any dependent components. Reply [yes] when asked to proceed with the update.
- Restart Matlab and launch Scanbox. Check all is working properly by imaging some test slides.
If something goes wrong it will likely happen during startup and you will get a corresponding error message (in the form of red text in the Matlab window). Let me know and I will help remotely via TeamViewer.