HRTC - Hardware Real-Time Controller | How to use the HRTC

How to use the HRTC

To use the HRTC you have to set the trigger mode and the trigger source. With object orientated programming languages the corresponding camera would look like this (C++ syntax):

CameraSettings->triggerMode = ctmOnRisingEdge
CameraSettings->triggerSource = ctsRTCtrl

When working with wxPropView this are the properties to modify in order to activate the evaluation of the HRTC program:

HRTC_PropertySettings.png
Figure 1: wxPropView - Setting up the HRTC usage

See also:
TCameraTriggerMode and TCameraTriggerSource in

Using single camera

Achieve a defined image frequency

With the use of the HRTC, any feasible frequency with the accuracy of micro seconds(us) are possible. The program to achieve this roughly must look like this (with the trigger mode set to ctmOnRisingEdge):

0. WaitClocks( <frame time in us> - <trigger pulse width in us>) )
1. TriggerSet 1
2. WaitClocks( <trigger pulse width in us> )
3. TriggerReset
4. Jump 0

So to get e.g. exactly 10 images per second from the camera the program would somehow look like this(of course the expose time then must be smaller or equal then the frame time in normal shutter mode):

0. WaitClocks 99000
1. TriggerSet 1
2. WaitClocks 1000
3. TriggerReset
4. Jump 0

HRTC_example.png
Figure 2: wxPropView - Entering the sample "Achieve a defined image frequency"

Note:
Please note the max. frame rate of the corresponding sensor!
To see a code sample (in C++) how this can be implemented in an application see the description of the class mvIMPACT::acquire::RTCtrProgram (C++ developers)

Delay the external trigger signal

0. WaitDigin DigIn0->On
1. WaitClocks <delay time>
2. TriggerSet 0
3. WaitClocks <trigger pulse width>
4. TriggerReset
5. Jump 0

<trigger pulse width> should not less than 100µs.

HRTC_01.png
Figure 3: Delay the external trigger signal

As soon as digital input 0 changes from high to low (0), the HRTC waits the < delay time > (1) and starts the image expose. The expose time is used from the expose setting of the camera. Step (5) jumps back to the beginning to be able to wait for the next incoming signal.

Note:
WaitDigIn waits for a state.

Between TriggerSet and TriggerReset has to be a waiting period.

If you are waiting for an external edge in a HRTC sequence like

WaitDigIn[On,Ignore]
WaitDigIn[Off,Ignore]
the minimum pulse width which can be detected by HRTC has to be at least 5 µs.

Take two images after one external trigger

0. WaitDigin DigIn0->Off
1. TriggerSet 1
2. WaitClocks <trigger pulse width>
3. TriggerReset
4. WaitClocks <time between 2 acquisitions - 10µs> (= WC1)
5. TriggerSet 2
6. WaitClocks <trigger pulse width>
7. TriggerReset
8. Jump 0

<trigger pulse width> should not less than 100µs.

HRTC_02.png
Figure 4: Take two images after one external trigger

This program generates two internal trigger signals after the digital input 0 is going to low. The time between those internal trigger signals is defined by step (4). Each image is getting a different frame ID. The first one has the number 1, defined in the command (1) and the second image will have the number 2. The application can ask for the frame ID of each image, so well known which image is the first and the second one.

Take two images with different expose times after an external trigger

0.  WaitDigin DigIn0->Off
1.  ExposeSet
2.  WaitClocks <expose time image1 -10µs> (= WC1)
3.  TriggerSet 1
4.  WaitClocks <trigger pulse width>
5.  TriggerReset
6.  ExposeReset
7.  WaitClocks <time between 2 acquisitions - expose time image1 - 10µs> (= WC2)
8.  ExposeSet
9.  WaitClocks <expose time image2 - 10µs> (= WC3)
10. TriggerSet 2
11. WaitClocks <trigger pulse width>
12. TriggerReset
13. ExposeReset
14. Jump 0

<trigger pulse width> should not less than 100µs.

HRTC_03.png
Figure 5: Take two images with different expose times after an external trigger

Note:
Due to the internal loop to wait for a trigger signal, the WaitClocks call between "TriggerSet 1" and "TriggerReset" constitute 100 µs . For this reason, the trigger cannot be overlooked.

Before the ExposeReset, you have to call the TriggerReset otherwise the normal flow will continue and the image data will be lost!

The Sensor Expose time after the TriggerSet is 0 µs .

Using multiple cameras

Synchronize the cameras to expose at the same time

For this application, the HRTC isn't needed. This can be achieved by connecting the same external trigger signal to one of the digital inputs of each camera like it's shown in the following figure:

Sync_2_cameras.png
Figure 6: Electrical setup for sync. cameras

Each camera then has to be configured for external trigger somehow like in the image below:

HRTC_PropertySettingsForExternalTrigger.png
Figure 7: wxPropView - Setup for sync. cameras

This assumes that the image acquisition shall start with the rising edge of the trigger signal. Every camera must be configured like this. Each rising edge of the external trigger signal then will start the exposure of a new image at the same time on each camera. Every trigger signal that will occur during the exposure of an image will be silently discarded.

Delay the expose start of the following camera

If a defined delay should be necessary between the cameras, the HRTC can do the synchronization work.

In this case, one camera must be the master. The external trigger signal that will start the acquisition must be connected to one of the cameras digital inputs. One of the digital outputs then will be connected to the digital input of the next camera. So camera one uses it's digital output to trigger camera two. How to connect the cameras to one another can also be seen in the following image:

Delay_expose.png
Figure 8: Connection diagram for a defined delay from the exposure start of one camera relative to another

Assuming that the external trigger is connected to digital input 0 of camera one and digital output 0 is connected to digital input 0 of camera two. Each additional camera will then be connected to it predecessor like camera 2 is connected to camera 1. The HRTC of camera one then has to be programmed somehow like this:

0. WaitDigin DigIn0->On
1. TriggerSet 0
2. WaitClocks <trigger pulse width>
3. TriggerReset
4. WaitClocks <delay time>
5. SetDigout DigOut0->On
6. WaitClocks 100µs
7. SetDigout DigOut0->Off
8. Jump 0

<trigger pulse width> should not less than 100µs.

When the cameras are set up to start the exposure on the rising edge of the signal <delay time> of course is the desired delay time minus <trigger pulse width>.

If more then two cameras shall be connected like this, every camera except the last one must run a program like the one discussed above. The delay times of course can vary.

HRTC_04.png
Figure 9: Delay the expose start of the following camera

< prev. section: Introduction | top | next section: Building and linking applications using mvIMPACT Acquire >

MATRIX VISION
Generated on Fri Jun 5 14:20:37 2009