# Manual Mode

Click "" button to change to manual mode.

In manual mode, you can send commands to run calibration, feature finding or pose computing by clicking the corresponding buttons which are convenient to set up or test the program.

Manual mode control panel has three parts: SN input, display setting, and command buttons.

## SN Input

Input the current serial number of the part.

## Set Display

Disables or enables scroll bar, top bar or status bar of all image displays.

When there are more than two stations in one alignment system, the alignment master display will look very crowded with all those scroll bars, top bars and status bars on. In this case, we can disable these bars to make more spaces for images.

Before disable:

After disable:

## Command Buttons

### Button Categories

Command button panel provides the necessary buttons to trigger vision tasks including calibrations, feature finders, and pose computers. These buttons are first categorized in terms of alignment stations, then under each station, they are divided into two groups: calibration and alignment. Once calibration group is selected, only calibration buttons under current station will be shown. Or if alignment group is selected, only feature finding train time and run time buttons as well as alignment button will be shown.

Command buttons are all automatically generated based on the configuration wizard. Here is an example of a configuration and its all corresponding command buttons:

In this example, there are two alignment stations: Alignment0 and Alignment1. In Alignment0, the calibration group includes both HECalib0 and CrossCalib buttons, alignment group includes Features0's train time, run time buttons and alignment0 button. In Alignmen1, the calibration group only has one HECalib1 button since there is no other calibration in Alignment1 station, the alignment group has Feature1's train time, run time buttons and alignment1 button.

If it is assembly application, there will be only alignment, then all calibration buttons will be put together under calibration group, and all feature finding buttons and one alignment button will be put together under alignment group. Here is another example of it:

During test mode of this assembly program, button Alignment0 should be only triggered after both Features0 and Features1 have finished running.

### One Time Calibration Buttons

OneTimeCalib buttons are used to trigger One Time Calibration for every cameras. It is often used for one time calibration simulation when all images have already been acquired and placed into specified camera simulation folders. It also can be used to trigger one time calibration that acquires images from real camera and gets stage positions from stage. However, this way requires users to customize stage pose reading at each calibration point by implementing the manual controller's "GetStagePosition" callback function. For more information about how to customizing GetStagePosition callback function, please refer to How to get stage's current pose for manual buttons.

Similar with other hand-eye loop manual button, one time calibration loop button initiates and controls a hand-eye calibration loop until the loop is finished. Once the loop button is clicked, the manual controller will start a thread and send an "ACB" command to trigger a moving hand-eye calibration loop for that camera, and monitor the program's "ACB" result string. With received "ACB" result string, the button thread will send the next "AC" command to the program so that it triggers the first calibration point's image acquisition, after the first "AC" result string is received, it sends the second "AC" command, and so on; until all calibration points are covered. In the end, the thread runs the one time calibration calculation.

### Button Commands

Each button has one command attached, when the button is the clicked, the command will be sent to CommandHandler which later will call corresponding tasks. The command follows the same structure as defined in Command String Structure which has CommandKey, EncodedID and certain parameters such as current stage's x, y, theta.

During program test, to get current stage's x, y, theta before the command is sent out, command button panel will call GetStagePosition call back function first to get x, y, theta, then compile it into the command string and send it out to CommandHandler. For more information about command button panel call back function, please refer to How to get stage's current pose for manual buttons.

If GetStagePosition is not implemented, then the panel will use default value (0,0,0) for x, y, theta input. This works when x, y, theta does not matter for specific testing, such as: to test whether vision tools find features correctly or not.

Once a command is sent out, the system log will record the command string.

Or you can also use command button panel's CommandSentCallBack call back function to get the command string.

### Button Status

After a button is triggered and command is sent out, the button will be grayed out before the requested task finish running, such as:

Once the task finishes, the button will turn back to normal: