Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I generate pulse trains on the PCIe-1427 without waiting for frames to be acquired?

Hello,

 

My goal is to synchronize the start of image acquisition of my DALSA 1M60 camera with other devices.  To this end, I would like to control the exposure of my DALSA 1M60 camera using the PCIe-1427 (IMAQ).  Right now I have the PCIe-1427 set up to accept an RTSI signal from PCIe-6321 (DAQ).  However, my understanding is that if the camera is running on internal frame sync, then the time at which the IMAQ board "triggers" does not actually tell me much about when exactly the frame was acquired.  Therefore it would be better if the IMAQ controlled the frame exposure.  However, when trying to set this up, I could start an exposure and control its duration well, however, after triggering each frame, the IMAQ seems to wait until this frame has been received before sending out another trigger.  Due to this, I cannot achieve continuous image acquisition.  Is it possible for the IMAQ (PCIe-6321) to generate a fixed pulse train with set on and off periods without waiting for the frames to be acquired?  How can I achieve triggered image acquisition and reasonable frame rates/exposure times.  I would like to collect at 30 Hz with a 32 msec exposure time.

 

I would appreciate any help!

 

  --Yevgeniy

0 Kudos
Message 1 of 22
(4,682 Views)

Let me also clarify that I am using MATLAB with image acquisition toolbox and data acquisition toolbox.  The pulse configuration that I am doing is through the camera file generator.

 

Thanks,

  Y

0 Kudos
Message 2 of 22
(4,672 Views)

Hello ysirotin,

 

It sounds as if your main concern is exposure time.  After taking a look at the DALSA 1M60 it appears as though you can configure the exposure time yourself by changing the camera mode.  Based on your discussion, I believe you are currently in mode 7.  If you would like to control the exposure time I would change your mode to 2 which makes it programmable.  After you change this mode, I believe your acquisition will be continuous.

 

Lynn

National Instruments
Senior Systems Engineer
0 Kudos
Message 3 of 22
(4,669 Views)

Hi Lynn,

 

Thanks for the info, however, I would like to have my acquisition start on an RTSI trigger from my DAQ board.  I need to know that the first exposure starts exactly at the time of the trigger.  This is why I do not want the camera to be continuously running (e.g. mode 2).  What should I do to make this work?

 

  --Y

0 Kudos
Message 4 of 22
(4,664 Views)

Hey,

 

How are you triggering IMAQ and have you utilized the IMAQ Configure Trigger3 VI? Here you can set the trigger to start acquisition of the image as opposed to a buffered list or line scan.

 

Lynn

National Instruments
Senior Systems Engineer
0 Kudos
Message 5 of 22
(4,636 Views)

One more thing... you should be able to set the exposure time using IMAQ Serial commands.

National Instruments
Senior Systems Engineer
0 Kudos
Message 6 of 22
(4,635 Views)

Hey Lynn,

 

I'm unfortunately not working with your API directly, but through MATLAB's image processing toolbox.  I have set up to triggering acquisition via an RTSI connection between my DAQ and my IMAQ boards.  I can use serial commands to put the camera into triggered vs. free running modes, but to be in triggered mode, I have to configure an input on a CC line (CC1).  I currently cannot do this through MATLAB so I have been trying to do it through the camera file.

 

Can you tell me a little more about the triggering settings that you are talking about or point me to some documentation that carefully explains it?  Seems to me that all that needs to happen is that the IMAQ board should generate a pulse sequence on the CC1 line that has some pre-configured format and would drive the camera integration.  This pulse sequence should start only when an RTSI trigger is received.  This is what I had been trying to configure using the Camera File utility that you provide, but could not get it to work properly.

 

What am I doing wrong?

0 Kudos
Message 7 of 22
(4,633 Views)

Hi Yevgeniy,

 

Any triggering you perform is configured as part of the camera session itself; you won't be able to define all of that in the camera file. I'd suggest looking at the IMAQ Configure Trigger3 VI in the NI-IMAQ VI Reference Help to see how this would be configured in LabVIEW. I don't have access to those MATLAB toolkits here, so I really can't tell you how you would perform this in those software environments. Perhaps consulting the help or support for those environments may be helpful in figuring out how to configure such a trigger.

Andy H.
National Instruments
0 Kudos
Message 8 of 22
(4,610 Views)

Thank you Andy, but I was not attempting to configure triggering in the camera file.  I was attempting to configure a pulse in the camera file.  I can configure triggering fine through MATLAB, however, my question is specifically whether I can create a pulse train to drive my camera.  I have so far looked at pulse creation tools in the NI Camera File Generator and found that indeed I could generate pulses, however, I saw that I could only generate the NEXT pulse after a frame was acquired.  Is this indeed a limitation here?

 

My other approach is to use NI_IMAQ library calls like imgPulseCreate to create a custom pulse sequence, but I am having trouble locating detailed documentation for these functions and how they behave relative to start and stop of image acquisition, start and stop of specific imaging session instances.  E.g. when and on what pin should I be able to observe the configured pulse?

 

I am also working with Matworks to see if they have solutions.

0 Kudos
Message 9 of 22
(4,607 Views)

Hi Yevgeniy,

 

If I understand your requirements correctly, you are looking for the frame grabber wait until you send a trigger from the 6321 and then immediately acquire multiple images.  There are two ways that you might be able to make this work.

 

First, some cameras will have a parameter, sometimes called "sequence mode" or "number of images", which you can set via serial to tell the camera to expose a given number of images from a single trigger.  Unfortunately, I do not have a copy of the the 1M60 manual and the Dalsa website requires a password to get it, so I don't know if this camera supports such an option.

 

Another option is to have the DAQ card control the exposure by, instead of sending a single acquisition pulse, instead send a pulse train.

 

I hope these suggestions help.

 

Jeff

0 Kudos
Message 10 of 22
(4,593 Views)