Capturing an Image

This tutorial will show you how to capture an image from a scanning electron microscope.

Install and Run the Pix2Net Server

In order for Pix2Net to control the SEM, the Pix2Net Server application must be running on your SEM’s support computer.

The Pix2Net server files are located in C:\Program Files\Pix2Net\server. Copy these files to a directory on the SEM’s support machine, and then double-click RunPix2NetServer.bat. The Pix2Net Server application should start up.

serverimage

The Pix2Net Server is now waiting for Pix2Net to connect to it on port 20038. You should also note the IP address of the SEM’s support computer. You can obtain the IP address by typing ipconfig in a dos prompt.

Connect to the Pix2Net Server

  1. Start Pix2Net and go to the Capture tab. Press the Setup Server button.

    setupserver

    The Setup Server dialog should appear:

    setupserverdialog

  2. Make sure the IP Address field matches the IP address of the machine the Pix2Net Server is running on.

  3. Click the Add Profile button to add a new profile. Enter the name of your SEM (e.g. FIB).

    If Pix2Net was able to connect to the server, then the Edit Profile window will appear, with a snapshot of the SEM support computer’s desktop:

    editprofile

Preparing the SEM

You need to begin by putting the SEM in a state where you can capture a test image. For example, you may want to turn the beam on. You can do this from the Edit Profile window if you switch to interactive mode by pressing the Interactive button.

interactivemode

In interactive mode, whenever you click somewhere on the image of the support computer, that mouse click will be sent to the support computer, and the screen will be refreshed. It is similar to a Remote Desktop session, except the screen will only be refreshed once after each mouse press.

Once you are ready to capture an image, you can start entering the necessary steps into Pix2Net.

Entering Steps

Your SEM is most likely different from ours, so you will need to come up with your own set of steps. However, for the purposes of the following example, assume that you can capture an image with your SEM by pressing a Resume button.

You must tell Pix2Net what the Resume button looks like, and where it is. You can accomplish this by adding a resource.

  1. Switch to the resource mode by pressing the Resource button.

    resourcemode

  2. Draw a box around the Resume button by clicking and dragging. The box does not have to be perfect.

    drawbox

  3. Enter a name, such as Resume Button, set the type to Fixed Image, and click Add.

By specifying Fixed Image, we are telling Pix2Net that it can assume that resume button will always be at exactly the same place on the screen. If it is not safe for Pix2Net to make that assumption, then we could have specified Floating Image. In that case, Pix2Net would scan the screen for the first set of pixels that match the image of the resume button.

Another resource we will add at this time is a region that represents the Preview area. This is the area of the SEM’s GUI that shows a preview of the area that will be captured.

  1. Click and drag to draw a bounding box around the area of the GUI that shows a preview of the image to be captured.

    previewregion

  2. Enter a name, such as Preview, set the type to Region, and click Add.

By specifying Region, we are telling Pix2Net that this resource is purely a bounding box and not an image.

Now, let’s start creating the protocol:

  1. Click on the Protocols tab and then click the Add button.

    protocolstab

  2. Choose a name for the protocol, such as Standard, and click Ok. In general, you will only need one protocol.

  3. You will now see a list of commands that can be defined. Select Capture Image.

    captureimagecmd

  4. Click the New Step button, choose Press Mouse Button, and click Ok.

  5. In the settings for Press Mouse Button, set the target area to the resource you defined for the resume button.

    pressmousebtn

  6. Click the New Step button, choose Delay, and choose some amount of time for Pix2Net to wait for the image to be captured.

  7. Click the New Step button, choose Read Image, and enter the directory the image will be saved to. Pix2Net will grab the latest .bmp file from this directory. The image will be deleted after reading by default, so that Pix2Net does not accidentally read the same image again in a future image capture.

  8. Select the Capture Preview command.

  9. Click the New Step button, choose Grab screenshot, and set the region to the resource you created for the preview area. Ignore the Remove horizontal line checkbox, because that is a very specialized feature.

  10. Click Ok to close the Edit Protocol window.

  11. Click Ok to close the Edit Profile window

  12. Click Ok to close the Setup Server window

Testing the Capture

  1. In the Capture tab, click the Control Microscope button.

    controlmicroscope

  2. Click the Capture Image button.

The image should be successfully captured. If you receive an error message, you may need to go back and edit the steps in the Edit Profile window.

Setting up Auto-Focus

Here are the steps for setting Pix2Net up to automatically adjust the focus during a run:

  1. In the Edit Profile screen, in Resource mode, draw a box around the button that turns on reduced area.

reducedarea

Give it a name such as “Turn on Reduced Area”, and add it as a Fixed Image resource.

  1. Switch to Interactive mode and click on the reduced area button. Once the SEM is in reduced area mode, switch back to Resource mode, draw a box around the button that turns reduced area mode off, give it a name such as “Turn off Reduced Area”, and add it as a Fixed Image resource.
  2. Click the Protocols tab, select the main protocol, and click the Edit Protocol button.
  3. Select the Auto-Focus command and add the following steps:
Step Fields Description
Press keys Key sequence: F5+Shift This step will turn the crosshair off.
Mouse press Left button, Target area: SafeArea. This step will go to the safe area (i.e. a place on the screen that can be safely clicked without doing anything).
Mouse press Left button, Target area: Turn on reduced area. This step will put the SEM into reduced area mode.
Mouse press Left button, Target area: SafeArea. This step will go to the safe area.
Wait for image to match Fixed image: Turn off reduced area, Time to wait: 5,000 ms. This step will wait up to 5 seconds for the SEM to enter reduced area mode.
Mouse press Left button, Target area: Unpause button. This step will put the SEM into live mode.
Mouse press Left button, Target area: SafeArea. This step will go to the safe area.
Wait for image to match Fixed image: Pause button, Time to wait: 5,000 ms. This step will wait up to 5 seconds for the SEM to enter live mode.
Adjust focus in reduced area Color of rectangle: Green, Full area: Preview. The Preview resource should be a bounding box around the place in the SEM’s GUI where the SEM image is drawn. During this step, Pix2Net will identify the reduced area bounding box by its color, which should match the color specified for Color of Rectangle. Pix2Net will move the reduced area box to a suitable location on the screen, and then it will perform the Increment Focus and Decrement Focus commands until the reduced image is a sharp as possible. In order for this to work, it is important that the SEM’s crosshair is hidden, the SEM is in reduced area mode, and the SEM is in live mode.
Mouse press Left button, Target area: Pause button. This step will pause the SEM.
Mouse press Left button, Target area: SafeArea. This step will go to the safe area.
Wait for image to match Fixed image: Unpause button, Time to wait: 5,000 ms . This step will wait up to 5 seconds for the SEM to pause.
Mouse press Left button, Target area: Turn off reduced area. This step will cause the SEM to leave reduced area mode.
Mouse press Left button, Target area: SafeArea. This step will go to the safe area.
Wait for image to match Fixed image: Turn on reduced area, time to wait: 5,000 ms. This step will wait up to 5 seconds for the SEM to leave reduced area mode.
Press keys F5+Shift. This step will turn the crosshair back on.

You can test this command by returning to the Capture tab, clicking Control Microscope, and then clicking the Auto-Focus button.