EasyManua.ls Logo

Alkeria NECTA Series - Signal-Driven Exposure Time; Encoder Synchronization

Default Icon
140 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6. Trigger 75
6.7.2 Signal-driven exposure time
The following example shows how to acquire a line every time a rising edge on input port 1 is detected.
The exposure will end when a falling edge is detected on the same port. Line start trigger ready signal is
routed to output port 3, while ExposureEndTriggerReady signal is routed to output port 4.
External Input
LineStartTriggerReady
Exposure
ExposureEndTriggerReady
Figure 6.4: Signal-driven exposure timings
As shown in Figure 6.4, the LineStartTriggerReady signal has to go high before the rising edge of
the signal on port 1. Similarly, the ExposureEndTriggerReady signal has to go high before the falling
edge of the signal on port 1. If these constraints are not respected, the triggers will not be accepted.
Example Code 6.4 | Signal-driven exposure time
// Set debounce time to 1 us
UnitInfo units = device.PIOPorts[1].DebounceUnitInfo;
device.PIOPorts[1].DebounceTime = (ushort)(1e-6 / units.Factor);
// Configure LineStartTrigger on risingEdge event of Port 1
device.LineStartTrigger.Source = TriggerSource.External;
// Select input port 1
device.LineStartTrigger.ExternalInput = 1;
device.LineStartTrigger.DetectExternalInputEdge = true;
// Rising edge
device.LineStartTrigger.InvertExternalInput = false;
// Enable Line trigger
device.LineStartTrigger.Enabled = true;
// Configure ExposureEndTrigger on fallingEdge event of Port 1
device.ExposureEndTrigger.Source = TriggerSource.External;
// Select input port 1
device.ExposureEndTrigger.ExternalInput = 1;
device.ExposureEndTrigger.DetectExternalInputEdge = true;
// Falling edge
device.ExposureEndTrigger.InvertExternalInput = true;
// Enable exposure end trigger
device.ExposureEndTrigger.Enabled = true;
// Trigger ready routed on output 3
device.PIOPorts[3].Source = OutputSource.LineStartTriggerReady;
// Exposure End Trigger ready routed on output 4
device.PIOPorts[4].Source = OutputSource.ExposureEndTriggerReady;
6.7.3 Encoder synchronization
In the following example the camera acquires images of some items carried by a conveyor. The camera
receives an incoming trigger signal on port 0, whose falling edge enables the acquisition of 4 frames.
Each frame consists of 512 lines and must be acquired every 1000 steps of an encoder, whose signals

Table of Contents