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:
- 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.
- Expand out the section called Frame Grabber Attributes. From there, go to the section called Pulse Generation. Set the settings as follows:
- Pulse Generator Selector > Pulse Generator 0 (choose which pulse generator hardware to use)
- Pulse Generator Mode > Rearmed Pulse (this is what makes it check for future rising edges on the Optical Chopper output)
- Pulse Generator Trigger Source > External 0 (or where you have the Optical Chopper’s output wired in)
- Pulse Generator Trigger Activation > Rising Edge (this is what starts your pulse generation)
- Pulse Generator Timer Source > Internal Clock (so it does not rely on anything software or OS-level)
- Pulse Generator Duration > How long you want the signal to stay high. In our case, Optical Chopper Period/4
- Pulse Generator Delay > How long you want the signal to go low. Again, Optical Chopper Period/4
- Pulse Generator Enable > Checked
- 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:
- 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.
- Set the following options:
- Line Selector > External 1 (which pin are we writing to?)
- Line Mode > Output
- Line Source > Pulse Generator 0 (where are we getting the signal we’re writing?)
- Now, save the settings, and then set the following options:
- Line Selector > CC1 (write to the camera control line so it can read the trigger)
- Line Mode > Output
- Line Source > External 1 (this is the Line Selector from the last step)
- Save your settings again, and then you should be all set to have your camera trigger from the falling edges of its CC line.