Operator TrgPortLine

This operator generates the trigger (Exsync) for the Camera. It is also responsible for assembling the acquired lines to images.

It is possible to use an internal signal generator (GrabberControlled) or to trigger the signal generator from external signals, either by input signals from the trigger expansion board (TTL Trigger board or OPTO Trigger board), or by software. The signal generator can produce Exsync signals with a flexible delay, pulse width and polarity. Additionally, a flash signal which is available at the trigger expansion board is generated.

The operator occupies 4 digital outputs and one camera port for the CC signals. Hence, one VisualApplets resource of type CameraControl is used. If the resource index is set to 0, the digital outputs 0 to 2 and camera port A is used. If the resource index is set to 1, the digital outputs 4 to 6 and camera port B is used. Outputs 3 and 7 are not used by the operator. Note that no other operators can use these hardware resources. Set the resource index in the resource dialog.

Available for Hardware Platforms
microEnable IV VD1-CL/-PoCL
microEnable IV VD4-CL/-PoCL

I/O Properties

Property Value
Operator Type M
Input Link I, data input
Output Link O, data output

Supported Link Format

Link Parameter Input Link I Output Link O
Bit Width [1, 64] as I
Arithmetic {unsigned, signed} as I
Parallelism any as I
Kernel Columns 1 as I
Kernel Rows 1 as I
Img Protocol VALT_LINE1D VALT_IMAGE2D
Color Format any as I
Color Flavor any as I
Max. Img Width any as I
Max. Img Height 65536 as I

Parameters

YOffset
Type dynamic/static read/write parameter
Default 0
Range [0, 224]

This parameter defines the number of lines omitted at the beginning of a frame.

YLength
Type dynamic/static read/write parameter
Default 1024
Range [8, 224]

This parameter defines the number of lines of a frame.

MaxGatedHeight
Type dynamid read/write parameter
Default restricted
Range {restricted, unrestricted}

The parameter MaxGatedHeight allows you to limit the maximum image height when the image trigger mode (ImgTriggerMode) is set to ExternSw_Gate.

If if the image trigger mode (ImgTriggerMode) is set to ExternSw_Gate, and the parameter MaxGatedHeight is set to unrestricted, the image height is defined by the time the gate is open, i.e., by the pulse width of the external image trigger signal or the duration of the software trigger being value 1. Now, if the gate is open for a long time, the image height gets large. If parameter MaxGatedHeight is set to restricted, the image height is limited to YLength image lines even if the gate is still open. The operator will discard any further lines and wait for the next open gate to start a new frame.

In contrast, if the parameter is set to unrestricted, the image height is only defined by the gate.

[Warning] Violation of Link Property Possible

Using this parameter in unrestricted mode can cause a violation of the VisualApplets link protocol. The image height could exceed the maximum allowed image height defined in the output link of the TrgPortLine operator. Be careful when using the unrestricted mode. See 'Link Properties' for more information on link properties.

A successive SplitImage operator can divide large images into chunks (smaller images).

LineTriggerMode
Type dynamic/static read/write parameter
Default GrabberControlled
Range {GrabberControlled, Extern_Trigger, GrabberControlled_Gated_by_Img, Extern_Trigger_Gated_by_Img}

This parameter selects the operation mode for the internal Exsync signal generator. The source for the external trigger input can by selected via the parameters LineTrgInSourceA and LineTrgInSourceB (see below).

GrabberControlled: Exsync is generated periodically by the internal signal generator

Extern_Trigger: An external trigger signal is used to start the signal generator once

GrabberControlled_Gated_by_Img: Exsync is generated periodically by the internal signal generator during the acquisition of a frame

Extern_Trigger_Gated_by_Img: An external trigger signal is used to trigger the signal generator during the acquisition of a frame

ExsyncEnable
Type dynamic read/write parameter
Default OFF
Range {OFF, ON}

Enables or disables the Exsync output to the camera.

LineTrgInSourceA
Type dynamic/static read/write parameter
Default InSignal0
Range {InSignal0, InSignal1, InSignal2, InSignal3, InSignal4, InSignal5, InSignal6, InSignal7}

This parameter specifies the signal source which is used to trigger the Exsync signal generator. This is only relevant if the TriggerMode is set to Extern_Trigger.

LineTrgInSourceB
Type dynamic/static read/write parameter
Default InSignal0
Range {InSignal0, InSignal1, InSignal2, InSignal3, InSignal4, InSignal5, InSignal6, InSignal7}

This parameter specifies the signal source which is used to trigger the Exsync signal generator. This is only relevant if the TriggerMode is set to Extern_Trigger and EncoderABMode is set to Signal_AB_Filter.

EncoderABMode
Type dynamic/static read/write parameter
Default Signal_A_Only
Range {Signal_A_Only, Signal_AB_Filter, Signal_ABx2_Filter, Signal_ABx4_Filter}

This parameter specifies whether a single trigger input (A only) is used for the Exsync generation, or the signals A and B.

Signal A/B support enables to determine the revolving direction of the shaft encoder and to suppress and compensate backward movements:

Signal_A_Only: The trigger input selected by LineTrgInSourceA is used for Exsync generation.

Signal_AB_Filter: Exsync is generated for a forward rotation of the shaft encoder in single resolution, i.e., a trigger pulse for a rising edge of LineTrgInSourceA.

Signal_ABx2_Filter: Exsync is generated for a forward rotation of the shaft encoder in double resolution, i.e., a trigger pulse for a rising edge of LineTrgInSourceA and a falling edge of LineTrgInSourceA. Both edges of LineTrgInSourceA are used.

Signal_ABx4_Filter: Exsync is generated for a forward rotation of the shaft encoder in quad resolution, i.e., a trigger pulse for a rising and a falling edge of LineTrgInSourceA and a rising and a falling edge of LineTrgInSourceB.

Related Parameters when AB support enabled:

  • EncoderABLead (possibility to switch the definition of forward)

You can reset the shaft encoder by setting parameter EncoderABMode to value Signal_A_Only.

EncoderABLead
Type dynamic/static read/write parameter
Default Signal_AB
Range {Signal_AB, Signal_BA}

A foreward movement is defined by a rising edge of signal A before signal B if the parameter is set to Signal_AB, or vice versa:

Signal_AB: Forward is defined by A before B

Signal_BA: Forward is defined by B before A

LineTrgInPolarity
Type dynamic read/write parameter
Default LowActive
Range {LowActive, HighActive}

The parameter defines the polarity of the external input trigger signal LineTrgInSourceA and LineTrgInSourceB. When set to LowActive, the Exsync generator starts on a falling edge of the signal specified by the parameter ImgTrgInSource. Otherwise, the Exsync generation starts on a rising edge. This is only relevant if the TriggerMode is set to Extern_Trigger.

LineTrgDownscaler
Type dynamic/static read/write parameter
Default 1
Range [1, 256]

This parameter specifies the number of external input trigger signals, which are needed to generate the Exsync. This is only relevant if the TriggerMode is set to an external trigger mode.

LineTrgPhase
Type dynamic/static read/write parameter
Default 1
Range [1, 256]

This parameter specifies the number of external input trigger signals, which are needed to generate the first Exsync of a frame. This is only relevant if the TriggerMode is set to Extern_Trigger_Gated_by_Img.

ExsyncPeriod
Type dynamic/static read/write parameter
Default 100 μs
Range [1.024, 4000] μs

This parameter specifies the period of the Exsync signal. Therefore, it defines the line frequency when using the grabber controlled mode to trigger the connected camera.

ExsyncExposure
Type dynamic/static read/write parameter
Default 20 μs
Range [1.024, 2000] μs, must not exceed ExsyncPeriod

This parameter specifies the pulse width of the Exsync signal, which can be used by many cameras to specify the exposure time. Therefore, it is possible to adjust the exposure time via software, even while grabbing.

Exsync2Delay
Type dynamic/static read/write parameter
Default 0 μs
Range [0, 2000] μs, must not exceed ExsyncPeriod

This parameter specifies the delay of the generated Exsync signal, with respect to an external trigger input. Therefore, the Exsync2 signal is a delayed clone of the Exsync (polarity, period, etc. are the same as for Exsync).

ExsyncPolarity
Type dynamic/static read/write parameter
Default LowActive
Range {LowActive, HighActive}

The parameter adjusts the polarity of the Exsync signal genarator to the polarity accepted by the connected camera. Use LowActive, if the camera opens the shutter on a falling edge, otherwise use HighActive.

ImgTriggerMode
Type dynamic/static read/write parameter
Default FreeRun
Range {FreeRun, ExternSw_Trigger, ExternSw_Gate}

This parameter selects the operation mode for the internal Image Gate.

The image trigger input signal may be created by external (peripheral) devices (e.g., shaft encoder), or by software. The source for the external image trigger input you can select via the parameter ImgTrgInSource, see below).

The values of parameter ImgTriggerMode induce the following behaviour:

  • FreeRun:

    • All incoming lines transmitted by the camera are accepted.

    • The Image Gate is ignored.

    • Parameter YLength defines when the end of frame (EOF) is generated.

    • If parameter yOffset is greater than Zero, a number of yOffset lines between two sequential images is ommitted.

      Example: yOffset = 0, YLength = 2:

      Example: yOffset = 2, YLength = 2:

  • ExternSw_Trigger:

    • At the rising edge of an accepted image trigger input signal, a new frame is started and incoming lines are appended to an image up to YLength.

    • Parameter YLength defines when the end of frame (EOF) is generated.

    • A new rising edge of the image trigger is only accepted after YLength lines have been appended and EOF is generated. A new rising edge of the image trigger is ignored if it occurs before YLength lines have been appended to an image and EOF is generated.

      Example: YLength is set to value 2:

  • ExternSw_Gate:

    • In gated mode, it is important how long the image trigger input signal is active, since it functions as the Image Gate signal.

    • The exact behaviour of this mode can be defined by the parameter MaxGatedHeight. (With MaxGatedHeight you can define if the maximum image height of the images is restricted or unrestricted. For details, see description of parameter MaxGatedHeight.)

      Behaviour of mode ExternSW_Gate when parameter MaxGatedHeight is set to value "Unrestricted"

      • While the Image Gate signal is active, the incoming lines are appended to an image.

      • The Image Gate controls which image lines are valid:

        • While the Image Gate signal is active, the incoming lines are accepted. (See figure, e.g., lines n+8 and n+9.)

        • While the Image Gate signal is not active, the incoming lines are ignored. (See figure, e.g., line n+3.)

        • Each line which starts while the Image Gate signal is active is valid. (See figure: n+1, n+2, n+4, n+5, n+6, n+8 and n+9 are valid.)

          If the falling edge of the Image Gate occurs before all the data of the last line are acquired, the line is nevertheless valid and acquired completely. (See figure: n+2 and n+6)

        • There are always complete lines being transferred.

        • Each line which starts while the Image Gate is down is not valid. (See figure: Line n and n+7 are not valid, line n+4 is valid.)

        • End of line (EoL) and end of frame (EoF) are either generated directly before the start of a new line, or at the falling edge of the Image Gate.

          EoL directly before start of new line: If the falling edge of a line occurs within the open Image Gate and the Image Gate covers the start of the next line, the EoL is generated directly before the rising edge of the next line. (See figure: n+1, n+4, n+5 and n+8.)

          EoL together with EoF directly before start of new line: If the falling edge of the Image Gate occurs before the falling edge of a line, EoL and EoF are generated directly before the rising edge of the next line. (See figure: Image m and image m+1.)

          EoL together with EoF at falling edge of Image Gate: If the falling edge of a line occurs within the open Image Gate and the falling edge of the Image Gate occurs before the rising edge of the next line, EoL and EoF are generated directly after the falling edge of the Image Gate. (See figure: Image m+2.)

      Behaviour of Mode ExternSW_Gate when parameter MaxGatedHeight is set to value "Restricted"

      If parameter MaxGatedHeight is set to "restricted", the behaviour is the same as described above for MaxGatedHeight with value "unrestricted", with the following exceptions:

      • As long as the image gate is open, the lines are appended up to a maximal image height ofYLength. All following lines are ommitted until the next rising edge of the Image Gate signal.

      • If a falling edge of the Image Gate signal occurs before YLength lines are appended: The falling edge of the Image Gate signal defines the height of the image, even if the image has not the height of YLength. (See parameter MaxGatedHeight for more information about the image height.)

      • The example below (figure) shows the behaviour at MaxGatedHeight = restricted and YLength = 3.

ImgTrgInSource
Type dynamic/static read/write parameter
Default InSignal0
Range {InSignal0, InSignal1, InSignal2, InSignal3, InSignal4, InSignal5, InSignal6, InSignal7}

This parameter specifies the signal source which is used to trigger the image acquisition. This is only relevant if the ImgTriggerMode is set to ExternSw_Trigger or ExternSw_Gate.

ImgTrgInPolarity
Type dynamic read/write parameter
Default LowActive
Range {LowActive, HighActive}

The parameter defines the polarity of the external input trigger signal.

ImgTrgDelay
Type dynamic read/write parameter
Default 0
Range {0, 4095}

The parameter delays the image trigger signal by the given number of image lines.

FlashEnable
Type dynamic read/write parameter
Default OFF
Range {OFF, ON}

Enables or disables the flash output. The pulse width of the flash signal is equal to one line period.

FlashPolarity
Type dynamic/static read/write parameter
Default LowActive
Range {LowActive, HighActive}

The parameter defines the polarity for the generated Flash signal.

FlashDelay
Type dynamic/static read/write parameter
Default 0
Range {0, 4095}

This parameter specifies the number of lines to delay the generated Flash signal, with respect to an external trigger input. Therefore, it is possible to synchronize the flash to the external trigger input.

The pulse width of the flash signal is equal to one line period.

SoftwareTrgPulse
Type dynamic/static write parameter
Default
Range {1}

Setting this parameter to 1 will generate a software trigger. This is only relevant if the TriggerMode is set to an external trigger mode and ImgTrgInSource is set to SoftwareTrigger.

SoftwareTrgInput
Type dynamic/static write parameter
Default
Range {0, 1}

With this parameter a software gate can be produced for the image trigger mode ExternSw_Gate.

ImgTrgIsBusy
Type dynamic/static read parameter
Default 0
Range {0, 1}

The ImgTrgIsBusy parameter enables software readout of the busy state for the image trigger. If busy then this parameter is set to 1 to reflect an ongoing image capture. If set to 0 then the operator is not busy.

CC1output
Type dynamic/static write parameter
Default Exsync
Range {Exsync, ExsyncInvert, Hdsync, HdsyncInvert, Flash, FlashInvert, Gnd, Vcc}

This parameter specifies the signal available at the CC1 line of the CameraLink cable.

CC2output
Type dynamic/static write parameter
Default Exsync
Range {Exsync, ExsyncInvert, Hdsync, HdsyncInvert, Flash, FlashInvert, Gnd, Vcc}

This parameter specifies the signal available at the CC2 line of the CameraLink cable.

CC3output
Type dynamic/static write parameter
Default Exsync
Range {Exsync, ExsyncInvert, Hdsync, HdsyncInvert, Flash, FlashInvert, Gnd, Vcc}

This parameter specifies the signal available at the CC3 line of the CameraLink cable.

CC4output
Type dynamic/static write parameter
Default Exsync
Range {Exsync, ExsyncInvert, Hdsync, HdsyncInvert, Flash, FlashInvert, Gnd, Vcc}

This parameter specifies the signal available at the CC4 line of the CameraLink cable.

ImgTrgDebouncingMaxTime
Type static write parameter
Default 65.520 us
Range [0.016, 1000000] us

This parameter specifies the maximal time for ImgTrgDebouncingTime parameter. The smaller the maximal time the less FPGA resources are required to implement the debouncing timer.

ImgTrgDebouncingTime
Type dynamic/static write parameter
Default 0.112 us
Range [0.016, ImgTrgDebouncingMaxTime] us

This parameter specifies the debouncing time the input image trigger signal must keep the same value to be detected as such. Fast signal changes within the debounce time will be filtered out.

LineTrgDebouncingMaxTime
Type static write parameter
Default 65.520 us
Range [0.016, 1000000] us

This parameter specifies the maximal time for LineTrgDebouncingTime parameter. The smaller the maximal time the less FPGA resources are required to implement the debouncing timer.

LineTrgDebouncingTime
Type dynamic/static write parameter
Default 0.112 us
Range [0.016, ImgTrgDebouncingMaxTime] us

This parameter specifies the debouncing time the input line trigger signals must keep the same value to be detected as such. Fast signal changes within the debounce time will be filtered out.

Examples of Use

The use of operator TrgPortLine is shown in the following examples: