Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Using NI 1422 Control Lines

Card: NI 422
Camera: Rad-Icon Shad-o-Box 4K
Camera Genrator 2.0
IMAQ 3.1.3
 
I would like to use a control line to trigger an image collection. I have used the Camera Generator to create a file and the camera works fine without using an external trigger. I need to have exposure times up to 10s but everytime I enter a value above 100ms on the pulse generation setup I receive "A Pattern Generation is invalid." Is there a way to enter longer periods in the pulse generator? Coud you change the internal clock frequency? The pixel clock is running at 12MHz so using it does not gain me the time I need.
 
I would like to hve the control line low and then pulse for every frame. When a Snap or a Grab is not active, the control line does not remain at the low level it is going into an indeterminate state. Is there a way to force the control line low programatically or with the Camera Generator when a command is not active?
0 Kudos
Message 1 of 2
(3,312 Views)
 
 

Hey wwg,

There are ways to do everything you asked but you will need to manually edit the camera file to do so.  You will need to upgrade to the newest version of Vision Acquisition Software since a few features we'll need are fairly recent.

Open up the camera file you've created in notepad.  Find the section labeled:

   Pattern {
      Action (PG) {
         Line (0) {
            Start (Low)
         }
         Clock (0x78)
      }
   }

The above portion of the camera file is almost certainly not the same as yours but rather demonstrates the section we'll need to modify.

1) There is a way to change the length of patterns generated by the 1422 and it can certainly match the 10s exposure you will need.  A pattern is defined by a number of clock cycles.  We support patterns of up to 2^32 clock cycles.  Here is an example of using control line 0 to generate a pattern for 20 clock cycles high and 10 clock cycles low.

         Line (0) {
            Start (High)
            20, 10
         }

Note: A pattern does not need to be symetrical.  If all you need is 20 cycles high and low afterwards then the pattern could just be:

         Line (0) {
            Start (High)
            20
         }

2) You can change the pattern generation clock frequency using the Clock() attribute.  There are three clocks you can choose from:

     50Mhz       - Clock(0x78)     
     100khz      - Clock(0x48)     
     pixel clock - Clock(0x18)

     Remember that your pattern is measured in clock cycles in the camera file so you will need to convert the length of time needed into cycles of the timebase you select.

3) There is a way to specify the control line level when snap and grab are inactive.  This is a new camera file attribute called the Idle state. Idle state (the inactive time after IMAQ Init but before and after you Snap or Grab) defaults to tristate which is why you are seeing an indeterminate state when snap and grab are inactive.  Here's how it will look in the camera file.          

         Line (0) {
            Idle (Low)
            Start (High)
            20
         }

Note: Ordering is slightly sensitive and I suggest putting your pattern cycles last in this section.

Please let me know if this solves your issue or you have any further questions.

Regards,

Ryan F.

Message Edited by RyanF on 09-29-2006 05:18 PM

0 Kudos
Message 2 of 2
(3,283 Views)