Raster Scan Using Visual Studio® and C# Programming - Kinesis® BBD300 Series | Thorlabs Insights @thorlabs
Raster Scan Using Visual Studio® and C# Programming - Kinesis® BBD300 Series | Thorlabs Insights  @thorlabs
Uploaded November 2021 | Updated September 2026, 2 hours ago
A benefit of motorized XY stages is that they can be remotely controlled to execute a patterned scan, such as a raster scan, across a specified area. This tutorial for Thorlabs' Kinesis® software package provides step-by-step instructions for writing a program for a BBD300-series motor controller that moves the connected two-axis stage in a stepped, bidirectional raster scan pattern. The program is written using C#, the .NET framework, and the Visual Studio® development environment.

This tutorial builds on the foundation established by the previously released Video Insight, Visual Studio Project Setup and C# Programming - Kinesis BBD300 Series Controller ( youtu.be/eoN1IPD7XZc ). After providing a brief overview of different raster scan patterns and approaches, this demonstration quickly reviews some of the steps included in the Visual Studio Project Setup tutorial. This includes referencing libraries, configuring the project platform, and initializing the controller's chassis and two channels.

Three types of move methods are implemented. One is used to home a chosen stage axis, and another is used to move the stage to a specific position. The third implements a jog, which moves the stage along a particular axis by a specified step size. The raster scan is implemented by first moving the stage to an initial position, and then executing a series of jogs along the stage's X- and Y-axes. An example of debugging the code is shown, and the stepped, bidirectional raster scan is successfully executed.

The C# code demonstrated during this video can be downloaded from Thorlabs' official GitHub account: github.com/Thorlabs/Motion_Control_Examples/blob/main/C%23/Benchtop/BBD30X/BBD302_Raster_Scan/Program.cs

00:00 - Introduction
00:24 - Raster Scan Overview and Implementation Approaches
02:56 - Brief Discussion of Project Setup (Libraries, Imports)
03:50 - Build Devices
05:41 - Initialize Controller Chassis
07:12 - Initialize, Connect, and Enable Both Channels
10:10 - Encapsulate MoveTo and Home Methods
10:59 - Create Jog Method
11:38 - Complete all Three Move-Helper Methods
14:10 - Switch to Working on Main Body of Program
18:10 - Specify Scan Direction
19:44 - Code the Bidirectional Raster Scan Pattern
24:11 - First Test of Code and Subsequent Debug
25:05 - Successful Execution of Code

Components used in this demonstration include:
- Kinesis software package: thorlabs.com/navigation.cfm?guide_id=2191&YVI=17
- Thorlabs' software download page: thorlabs.com/software_pages/ViewSoftwarePage.cfm?Code=Motion_Control&viewtab=0&YVI=17
- BBD302 Two-Axis Brushless DC Motor Controller: thorlabs.com/newgrouppage9.cfm?objectgroup_id=5066&pn=BBD302&YVI=17
- MLS203-1 Fast XY Scanning Stage: thorlabs.com/newgrouppage9.cfm?objectgroup_id=5360&pn=MLS203-1&YVI=17
- MLS203P2: Slide/Petri Dish Holder for Inverted Microscopes: thorlabs.com/newgrouppage9.cfm?objectgroup_id=5360&pn=MLS203P2&YVI=17

For more photonics how-to videos, visit thorlabs.com/newgrouppage9.cfm?objectgroup_id=14062&YVI=17
Raster Scan Using Visual Studio® and C# Programming - Kinesis® BBD300 Series | Thorlabs InsightsBoston Streets Are Narrow! Mobile Lab VLOG Ep. 4FFS3 Software Configuration Menu for GPX Glass Processors and LFS Large Fiber SplicersStructured Light | Photonics in Everyday LifeWork Force Development in the Photonics IndustryElectronics Capabilities | Inside ThorlabsIntroducing the Prelude® Functional Imaging MicroscopePowering Up and Powering Down the GPX Glass ProcessorWhat Is Chromatic Dispersion? | Optics ExplainedOptical Fiber 101: Understanding Single Mode Fiber (Part 1 of 2)FFS3 Software Camera and Movement Bar FunctionsOptical Design and Engineering | Inside Thorlabs
Thorlabs |

Raster Scan Using Visual Studio® and C# Programming - Kinesis® BBD300 Series | Thorlabs Insights

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER