
34
iPORT CL-GigE External Frame Grabber User Guide
Timer0
is configured with the following settings to generate a trigger pulse. These values may need to be
adjusted depending on the selected camera model and system requirements.
The signal routing block in the PLC is configured using the Boolean expressions below.
GpioIn0
is signal
A
and
GpioIn1
is signal
B
. Note that "!" in the Boolean expressions represents
not
or inverted.
Processing Quadrature Encoder Signals
This section provides an example of how you can using the CL-GigE’s PLC to process signals from a
quadrature encoder.
Example:
Connect
GpioIn0
and
GpioIn1
to quadrature encoder outputs
A
and
B
, respectively.
In this example, images are captured only when the conveyor belt or web is moving in the forward
direction. When the conveyor belt or web moves in the forward direction, signal
A
leads signal
B
by 90°.
When the conveyor belt moves in the reverse direction, signal
A
lags signal
B
by 90°. The PLC provides
a trigger signal on the Camera Link control line
Pb0CC
0 only when signal
A
leads signal
B
by 90°.
Table 17: PLC Timer Equations
Equation
Description
TimerTriggerSource = TriggerInput
Sets the triggering source for the Timer to be its external trigger
input.
TimerTriggerActivation = FallingEdge
Sets the Timer to trigger on the external source’s falling edge.
TimerGranularityFactor = Granularity30ns
Sets the interval of the Timer’s internal clock tick. For this example,
we recommend that the selected factor be at least 8x smaller than
the period of the highest frequency expected from the quadrature
encoder.
TimerDelayRaw = 1
Sets the delay time before the pulse can start. This is the low period
of the pulse after the trigger. This value represents the number of
Timer internal clock ticks.
TimerDurationRaw = 6
Sets the duration or high time of the pulse. This value represents the
number of internal clock ticks.
Table 18: Signal Routing Block Equations
Equation
Description
Timer0Trig = GpioIn0 & !GpioIn1
Generates the trigger signal for
Timer0
from signals
A
and
B
.
Pb0CC0 = !(Timer0Out & GpioIn0)
Masks the trigger for the camera when the conveyor belt or web
moves in the reverse direction.