コンテンツにスキップ

カメラvTool#

The Camera vTool provides convenient access to a camera device.

You can either let the vTool randomly allocate an available camera or define properties that a potential camera has to match in order to be selected.

カメラvTool

Assigning Specific Cameras to a Camera vTool#

The Camera vTool randomly allocates a free camera if you haven't defined any specific camera properties. In single-camera designs, this allows you to get up and running quickly. If you want to assign a specific camera to a Camera vTool in multi-camera designs, do the following:

  1. Select the Camera vTool in the Workbench.
  2. Open the Features - All pane.
  3. List available cameras by clicking vTool > Device Enumeration Control > Device List Update > Execute.
  4. Browse the available cameras using the Device Selector parameter.
    This allows you to review certain information about the individual cameras to help you pick the desired camera.
  5. When you have identified the desired camera, click Device Choose > Execute to assign that particular camera to the Camera vTool.
  6. To specify further device properties that the camera that you want to assign has to match, use the Device Property * parameters in the vTool > Device Enumeration Control group.

    情報

    More information on device information properties is available in the documentation of the CDeviceInfo class and the Pylon/Key namespace of the pylon C++ API. This gives you fine-grained control of the camera selection and ensures that the same recipe can be run on multiple computers with the correct cameras.

    Basler recommends using the DeviceClass and UserDefinedName properties if multiple cameras are attached to a system. You need to set the camera's DeviceUserID parameter first before you can select a camera by using the UserDefinedName property.

    Note that USB cameras need to be reset or power-cycled to be able to use a newly set DeviceUserID.

Configuring Cameras#

After assigning a camera to a Camera vTool, click the Lock Resources button (Lock Resources Icon) in the Workbench toolbar to establish an exclusive connection to the camera device assigned. You can now configure the camera in the Features - All pane.

Saving Camera Settings in a Recipe#

Camera settings aren’t saved automatically when saving a recipe because the camera devices assigned to a Camera vTool may not be connected at the time of saving the recipe or the settings of the camera device may have been changed by another program in the meantime.

Instead use the parameters in the Features - All pane under vTool > Configuration Set Persistence to save the settings of a camera device and accompanied settings after you have configured the parameters.

情報

For initial camera device configuration, Basler recommends using the classic pylon Viewer features.

To save camera settings in a recipe:

  1. In the Features - All pane, open the Configuration Set Persistence category and set the Configuration Set Selector parameter to Camera to select the parameter set of the camera device.
  2. Click Configuration Set Fetch to fetch the settings from the camera device and store it in the Configuration Set Staged parameter.
  3. Optional: You can inspect or manually modify the parameter settings by copying the text to a text editor and back into Configuration Set Staged.
    In the text editor, you will see that each line of text contains the name and the value of a parameter separated by a tab or = character. Lines starting with # are treated as comments. A configuration set must start with the following line:
    # {05D8C294-F295-4dfb-9D01-096BD04049F4}

    情報

    Alternatively, you can use user sets to store camera settings persistently.

  4. Click Configuration Set Commit to apply the parameters and store the parameters in the recipe settings. This ensures that parameters are set automatically each time the lock resources operation is executed.

    情報

    If a camera has already been allocated, the parameter settings are transferred immediately to the camera. If the transfer fails, the parameter settings will not be stored in Configuration Set Active. If no camera is allocated, the settings will be transferred to the camera when it is allocated. If this transfer fails, the recipe can't be started.

    Some camera parameters, e.g., those in the Camera Instance configuration set, can only be changed while the camera is closed. In this case, the parameters stored in Configuration Set Active are transferred to the camera when it is allocated before opening the camera.

  5. To clear parameter settings from the recipe, click Clear Data.

Outputs#

Image#

Returns the image grabbed by a camera. This output image can be used by any vTool accepting images as input.

  • Data type: Image
  • Image format: As configured on the camera

Typical Successors#

トップに戻る