From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How to sync a linescan camera to both a line and a frame trigger using PCIe-1433?

I have a linescan camera (Basler) that I need to sync to the line and frame triggers from a rasterscan system.  I was given a PCIe-1433 frame grabber to achieve this.  Basically the line trigger should tell the PCIe-1433 that it's the end of the line, and the frame trigger tells it to start a new frame.  Is this doable?  An example would be most helpful.  Thanks.

0 Kudos
Message 1 of 10
(6,188 Views)

Hi aoslo,

If you have a line scan there is only a Line Enable signal for determining when a line of pixels is being received. I’ve linked a document that goes in to more depth on this issue. Some of the information is dated but it’s still helpful for understanding the basics.

http://www.ni.com/white-paper/3287/en/

Also, below I’ve provided a few additional resources for getting started.

http://digital.ni.com/public.nsf/allkb/B65925FF52A80B7E86257809005C5584?OpenDocument

http://www.ni.com/tutorial/13786/en/

http://www.ni.com/pdf/manuals/374001b.pdf

http://www.ni.com/pdf/manuals/374000a.pdf

I hope you find these resources helpful, and best of luck getting started!

- Kale W.

0 Kudos
Message 2 of 10
(6,135 Views)

Many thanks for the references.  But I'd like to think that  there is a way to tell the frame grabber that a particular line is the start, and a fixed number of lines after the start makes up one image.  Could this be done through software? .   An example would be greatly appreciated. 

0 Kudos
Message 3 of 10
(6,131 Views)

Hi aoslo,

I don’t believe there is an example that will perform the exact functionality required for your system, but there helpful trigger examples using the 1433 in the NI Example finder. It’s possible to limit search results to specific hardware (NI PCIe-1433) and under Vision Acquisition >> NI-IMAQ >> Signal Input and Output there are examples you may find helpful as you develop your application.

I’m not familiar with the rasterscan system mentioned, but it’s worth considering why the frame trigger is necessary. Since each line is essentially its own image consisting of one row of pixels how the images are consolidated to make a frame could be done post processing. Is the frame trigger required for causing the camera to change locations, or to change the location of what is being viewed? If not and the frame trigger is simply to indicate that one frame of many lines is complete you could use logic based on the number of lines in the frame to distinguish one frame from another (e.g., if a line is one image and a frame is 10 lines, then log 10 images to a folder as frame one, and the next 10 as frame 2, etc.).

I hope this helps!

- Kale W.

 

0 Kudos
Message 4 of 10
(6,105 Views)

Hello Kale,

Thanks for the response.  Our linescan camera is still, but the image lines come from a scanner that scans a 2D plane from top to bottom.  So yes, we need to change the location of each line on the display so we can see a 2D image rather than just 1 line.  The frame trigger indicates which line is the first line of the frame.  If PCIe-1433 can't handle this, is there any other frame grabber that can?

 

I have looked into the examples you referenced, and none of them worked for me. They can trigger the acquisition of each line, but the display has no idea which one is the start of the frame so all the lines just keep rolling on the screen. 

 

Any further insight is greatly appreciated.  Thanks.

0 Kudos
Message 5 of 10
(6,098 Views)

Hi aoslo,

If I understand correctly the goal is to stitch individual lines together into a frame like an area scan camera. This can be done by implementing logic in LabVIEW, via settings in MAX, or property nodes in LabVIEW.

In NI MAX you can configure the 1433 using the Acquisition Parameters tab to modify the Acquisition Window (MAX Help for NI-IMAQ >> Configuring Devices >> NI Vision Devices >> NI 1433). This can also be done in LabVIEW with property nodes (Property node for IMAQ class, Acquisition Parameters >> Acquisition Window >> Height and Width). An example that performs similar functionality, but more complex, is in NI Example Finder called LL VHA Ring.vi. Another good examples to look at include HL Trigger Each Line from Encoder.vi. Ultimately though it should just be configuring the height and width of the frame.

I hope this helps!

- Kale W.

 

0 Kudos
Message 6 of 10
(6,056 Views)

Hello Kale,

 

We did everything you mentioned.  We configured the size of the acquisition window (540 lines in our case), and set the camera on trigger mode so that each line is triggered by our line sync signal.  Our only problem is the display.  We can see all the 540 lines acquired, but they don't form a stable frame - they keep rolling off the screen.  We want to use the frame trigger to tell the 1433 that a frame is starting, and the next 540 lines are one frame.  With the acqusition window configured to be 540, I would think that the screen will display each frame correctly.

0 Kudos
Message 7 of 10
(6,027 Views)

Hi aoslo,

Could you elaborate on what you mean by rolling (screenshots, etc.)? Are you wanting a buffer between images? If not then the frame height (540 lines = 1 frame) should be set and there wouldn’t be a need for have a trigger saying the frame is started and the next 540 lines are one frame (that is unless 1 frame = 541 lines).

Figure 3 in the link below shows a good illustration of building a frame with a line scan camera. As it mentions the width should be based on the CCD in the camera but it’s possible to set the height.

http://www.ni.com/white-paper/2808/en/

I hope this helps!

- Kale W.

 

0 Kudos
Message 8 of 10
(6,001 Views)

Hi Kale,

 

I guess we just need to trigger the first frame.  Right now, the program starts at a random line (say at line 100) so we see lines 100-540 on the top of the frame and lines 1-99 at the bottom.  If we can trigger the program to start at line 1, we will be good.

 

0 Kudos
Message 9 of 10
(5,983 Views)

Seems like you figured it out but I think the LL Trigger Stop (Hardware-Synchronized) example vi has what you need.  Trigger the lines at the camera then run another trigger through the I/O extension board to stop the acquisition after collecting your X lines. 

0 Kudos
Message 10 of 10
(5,467 Views)