Basler

Before using a Basler camera, the software ‘Basler_pylon_6.1.0.19674’ must be installed for ‘Developer’. The ‘Basler_pylon_6.1.0.19674.exe’ must be executed as administrator. Before installation, check whether the maximum number of installable filter drivers has already been reached. The ‘pylon GigE Vision Driver’ must be activated on all LAN adapters with Basler camera. After installation, the PC must be restarted before a Basler camera can be used in Viper.NET.

General settings

../../../_images/basler_01_main.png
  1. General Settings: Image Source Editor

  2. Start/Stop/Reset

  • Start/Stop: These buttons are without function from Pylon 6 onwards. The ‘AcquisitionStart/Stop command’ is called by the image source with every image acquisition.

  • Reset: Reset all camera parameters to factory defaults. This function is currently not available in Viper.NET, because ‘Gige_Camera_restoreFactoryDefaults()’ is no longer available in Pylon 6. Instead, only the current parameters are read from the camera.

  1. Read Settings from Camera: Read all parameters from the camera and assign them to this image source or image acquisition parameter set.

  2. Save to EEPROM: Save current parameter set to the EEPROM of the camera. This function is currently not available in Viper.NET, because ‘Gige_Camera_writeEEPROM()’ is no longer available in Pylon 6.

  3. Export Nodes XML: Read all parameters from the connected camera and export them to an XML file.

  4. Camera list: Selection list of all Basler cameras. The list can be updated with the ‘… - button’ to update the list.

  5. User ID: Camera name, which is stored in the camera by clicking on the button ‘set’.

  6. Image acquisition:

  • Exposure: Exposure time in [ms].

  • Gain: Analog gain factor (brightness).

  • Acqu. LineRate: Frequency in [Hertz = 1/s] at which the lines of an image are captured when line trigger mode is disabled. This parameter is only available for line scan cameras.

  • Acqu. Timeout: Maximum image acquisition time in [ms].

  • FramesCount: For line scan cameras, the image can be split into multiple ‘Frames’. The camera is then operated in ‘MultiFrame-Mode’ and sends the image in several frames. The Viper.NET image source then copies these individual image buffers into a Cognex image buffer.

  1. SensorTemperature: Value of the camera’s temperature sensor in [°C]. (If the feature ‘TemperatureAbs’ is not available or the camera is not connected, the value 0.0 is displayed).

  2. Last Error: Read out and display the last error that occurred from the camera with ‘Get’ or clear it with ‘Clear’. If ‘AutoClearOverTr’ is activated, the ‘Camera over-triggered’ error is automatically cleared.

  3. Trigger Settings: Depending on the camera type (area or line), the following triggers must be set:

  • AcquisitionStart : Trigger to start a new image acquisition for a line scan camera.

  • FrameStart : Trigger to start a new image acquisition for an area scan camera, or a new frame of an image for a line scan camera.

  • LineStart : Trigger for recording a line with a line scan camera.

  1. Softtrigger: Trigger all activated ‘Softwaretrigger’ (AcquisitionStart, FrameStart, LineStart).

See also:

Gigabit Ethernet Settings

../../../_images/basler_02_gige.png
  1. Read only:

  • On : Parameters 3 and 4 are only read out and displayed, but not changed.

  • Off : Parameters 3 and 4 can be set and changed.

  1. EvaluateMaximalPacketSize: This function is currently unavailable in Viper.NET because ‘Gige_Camera_evaluateMaximalPacketSize()’ is no longer present in Pylon 6. Instead the current value of the parameter ‘GevSCPSPacketSize’ is displayed.

  2. Packetsize: Packet size in [byte] for the transmission of the UDP packets of the image data.

  3. InterPacketdelay: Waiting time in [Ticks : Converted time in [µs] is displayed next to the input field] between sending individual UDP data packets of the image data. This slows down the image data transmission and avoids possible data packet collisions or an “overrun” of the LAN adapter or the PC.

  4. Auto Packet Size: The camera automatically negotiates the maximum UDP packet size with the LAN adapter.

ROI settings

Here, an image section (ROI = Region Of Interest) can be set. This means that the entire camera chip is no longer read out and transmitted.

../../../_images/basler_03_roi.png
  1. OffsetX/Y, Widht/Height: Selected image area. Position of the upper left corner, width and height.

  2. Center X: The ‘OffsetX’ is set so that the image section is in the middle of the line. The previously set ‘OffsetX’ is also taken into account and can be set to ‘0’ beforehand. [Formula: OffsetX_new = (SensorWidth + OffsetX_alt - Width) / 2]

Inputs Outputs

../../../_images/basler_04_io.png
  1. Read Settings from Camera: Read all parameters including input/output settings from the camera and update the list of available inputs/outputs (2).

  2. IO List: List of available inputs and outputs of the camera. Double-click on an element to open the settings of the input or output (3).

  3. Input-Output Parameters:

  • Format: Type of electrical input/output.

    Format

    Description

    NoConnect

    Not connected

    OptoCoupled

    Optically decoupled

    OpenDrain

    Output switches the voltage through to the consumer

    TTL

    Transistor transistor logic input/output with 5 volts

    LVTTL

    Transistor transistor logic input/output with 3.3 volts

  • Source: Signal with which the output is switched on/off.

  • Debouncetime: Input debounce time in [µs].

  • Output Pulse Min Width: Minimum duration of a pulse at the output in [µs].

  • Inverter: Invert logic of the electrical signal.

  • Termination: Line termination.

Input signal encoder

For line scan cameras, path-controlled triggering of the individual lines can be performed via the camera’s encoder. The trigger source for ‘LineStart’ must be set to ‘ShaftEncoderModuleOut’.

../../../_images/basler_05_encoder.png
  1. Encoder Inputs: Inputs of the camera used for phases A and B of the encoder.

  2. Trigger Mode:

  • AnyDirection : The trigger signal is triggered in both directions, forward and backward.

  • ForwardOnly: As long as the down counter is greater than zero, the trigger signal is suppressed.

  1. Counter Mode:

  • FollowDirection: Counter is incremented on forward movement and decremented on backward movement.

  • IgnoreDirection: Counter is incremented on forward movement and on backward movement.

  1. Counter Max: Maximum values for the encoder counter [0..32767]. If this is exceeded, the counter starts again at ‘0’. With ‘get’ the current encoder counter value can be read out.

  2. Reset Counter: Reset encoder counter value to ‘0’.

  3. Autoreset Counter on acquisition: Reset the encoder counter and the down counter to ‘0’ before each start of an image acquisition.

Frequency converter

Via the frequency converter the camera can be triggered with a different frequency than the frequency of the input signal. The source of the frequency converter can be one of the inputs of the encoder (’Line1/2/3’).

../../../_images/basler_06_frequency_converter.png
  1. Source: Input or source for the frequency converter.

  2. Signal Alignment:

  • RisingEdge: Rising Edge

  • FallingEdge: Falling edge

  1. Signal Converter Parameters: The frequency converter has three modules which are applied one after the other (divider -> multiplier -> divider).

  • Pre-Divider: Factor by which the input frequency is reduced.

  • Multiplier: Factor by which the frequency is increased.

  • PostDivider: Factor by which the frequency is reduced.

Camera events

Camera events can be activated for analysis purposes. If an activated camera event occurs, the name of the event is written as ‘Warning’ in the ‘Gefasoft.MAK.Vision.GigEBaslerPylon’. log

../../../_images/basler_07_events.png
  1. Get: Read event settings from the camera and update the list (2).

  2. Event List: List of all Basler Pylon camera events.

  • Name: Name of the event.

  • Available: Indicates whether the event is available on the connected camera or not.

  • Desired: Indicates whether the user has tried to activate this event, regardless of whether it is available on the connected camera or not.

  • Enabled: Indicates whether this event is enabled.

  1. Apply: Activates all events that are selected via the list checkbox (2). This setting is not permanent and is not saved. The events are only activated temporarily for analysis purposes.

Diagnostics

On the ‘Diagnostics’ tab, the monitoring of over-triggered lines (trigger overrun) can be enabled for line-scan cameras. A trigger overrun occurs when a new ‘LineStart’ trigger arrives before the camera has finished acquiring the previous line. The affected line is then discarded (lost line), which can result in a compressed or distorted image.

Note

This function is only available for line-scan cameras that support the ‘LineTriggerIgnoredCounter’ camera chunk. If a connected camera does not support it, the group is disabled.

../../../_images/basler_08_diagnostics.png
  1. Enable LineTriggerIgnoredCounter chunk (count lost lines): Enables the ‘LineTriggerIgnoredCounter’ camera chunk, which counts the lines discarded due to over-triggering. For each image acquisition, the number of lines lost during this image (delta relative to the previous image) is determined.

  2. Job terminal name: Name of the ‘JobInputDataBlock’ terminal that receives the number of lines lost in the current image (delta). The value can be processed further in the job (e.g. good/bad evaluation). A value of ‘0’ means that no line was lost during this image. Default: ‘LineTriggerIgnoredCount’.

  3. On lost lines, report: Severity with which lost lines are written to the log.

  • Warning: Lost lines are logged as a warning.

  • Error: Lost lines are logged as an error.

Note

When the function is enabled (or when the camera is (re)connected), the camera’s trigger counters are reset by software, so that a correct delta (baseline = 0) can already be determined for the first image. Only if the camera does not support resetting the counter is no reference value (baseline) available for the first image. In that case the cumulative counter value is reported as a conservative worst case, so that an inspecting system reacts safely and does not rate a potentially faulty first image as good.

Configuration in the job

The value configured under Job terminal name is fed into the job via the JobInputDataBlock. For the counter value to be available in the image processing, an output terminal must be created in the CogToolBlock named JobInputDataBlock:

  • Name: Must exactly match the name configured under Job terminal name (default: LineTriggerIgnoredCount).

  • Type: System.Int32 (the value is written as an integer; if the terminal type does not match, the value is discarded and a warning is logged).

With every image acquisition, this terminal is set to the number of lines lost in the current image (delta) and can then be processed further within the toolgroup (e.g. comparison against a limit value for a good/bad evaluation).

Note

The terminal is optional. If no matching terminal exists in the JobInputDataBlock, the value is simply not delivered (no error). Stations that do not need the evaluation therefore do not have to create the terminal.