Complex Hardware Triggering for the PCIe-1427

Updated Aug 17, 2018

Reported In

Hardware

  • PCIe-1427

Issue Details

I want to trigger my Camera Link camera off of both the rising and falling edges of a signal coming in from an external device like an optical chopper. How can I do this with my PCIe-1427 frame grabber without using software timing?
 

Solution

The PCIe-1427 is designed to trigger cameras from either rising or falling edges of external signals, but not both.
 
In order to trigger your camera on both edges, you can take advantage of two functions that your frame grabber can do at the hardware level to try to achieve the same goal- generate pulses based on external triggers, and route external triggers to the camera’s control line.
 
You can achieve this in two stages: first, setting up the pulse generation, then routing that pulse generation to the camera.

Stage 1:
  1. In NI MAX, find the PCI 1427 and select the attached camera. On the right hand panel, there should be 4 tabs at the bottom of the page. The 3rd tab, Camera Attributes, contains the settings we’ll need.
  2. Expand out the section called Frame Grabber Attributes. From there, go to the section called Pulse Generation. Set the settings as follows:
    1. Pulse Generator Selector > Pulse Generator 0 (choose which pulse generator hardware to use)
    2. Pulse Generator Mode > Rearmed Pulse (this is what makes it check for future rising edges on the Optical Chopper output)
    3. Pulse Generator Trigger Source > External 0 (or where you have the Optical Chopper’s output wired in)
    4. Pulse Generator Trigger Activation > Rising Edge (this is what starts your pulse generation)
    5. Pulse Generator Timer Source > Internal Clock (so it does not rely on anything software or OS-level)
    6. Pulse Generator Duration > How long you want the signal to stay high. In our case, Optical Chopper Period/4
    7. Pulse Generator Delay > How long you want the signal to go low. Again, Optical Chopper Period/4
    8. Pulse Generator Enable > Checked
  3. Click Save, and your system will watch for a TTL rising edge on External 0 (or whatever line you chose) and then output a set of pulses on an internal line.

Stage 2:

  1. Minimize the Pulse Generation section, and expand Digital I/O Controls instead. We’re going to set up this group of settings twice, once to route the internal pulses to an external I/O pin, and once to route that external I/O pin to the camera’s control line.
  2. Set the following options:
    1. Line Selector > External 1 (which pin are we writing to?)
    2. Line Mode > Output
    3. Line Source > Pulse Generator 0 (where are we getting the signal we’re writing?)
  3. Now, save the settings, and then set the following options:
    1. Line Selector > CC1 (write to the camera control line so it can read the trigger)
    2. Line Mode > Output
    3. Line Source > External 1 (this is the Line Selector from the last step)
  4. Save your settings again, and then you should be all set to have your camera trigger from the falling edges of its CC line.

 

Additional Information

If hardware timing is not necessary for your task, you may consider using software triggering. Software may allow you to trigger your hardware in complex ways more easily.