Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with external trigger on GigE camera

Hello.  I am having difficulty setting up my external trigger with my Proscillica GC660 GigE camera.  I am using Labview 2009 for 64 bit and the latest vision toolbox, and using Windows 7 64 bit OS.  Previously I was using a Prosillica EC650 IEEE firewire camera with the same trigger and everything worked fine, but the acquisition setting are different and I am unsure if I am using them correctly.  When I run my problem it appears that it is not using the external trigger, but rather the software trigger I set up in MAX.  First I am unsure if I am wiring the new trigger correctly?  I am trying to trigger when an external signal is "high".  Therefore, I wired the external signal to the "Sync Input 1 - isolated"  and the signal ground to the "Isolated Ground"  I am unsure if I am using this correct since with my old firewire camera it only had the single external trigger input.  I am unsure if I should be using the "isolated" or the "non-isolated" trigger?  This is what Prosilica GC660 manual says about each of them, and I am still confused?  "Sync Input 1 is isolated and should be used in noisy environments to prevent false triggering due to ground loop noise. Sync Input 2 is non-isolated and can be used when a faster trigger is required and when environmental noise is not a problem."  I don't believe I am in a noisy environment and the duration of the trigger is no shorter than 1ms (does this require a "faster trigger"?).  Here is link to the camera's manual: http://www.prosilica.com/products/manuals/700035A%20-%20GC660%20User%20Manual.pdfAssuming that I have all the physical connections right, I am also unsure if the IMAQ-dx attributes are correct?  I am attaching a .jpg screenshot of the trigger attributes listed in MAX, the old firewire initialization VI that still works when it is attached, and the new GigE ininilization that is not working.  I believe the "TriggerMode" (On), "TriggerActivation" (LevelHigh), and TriggerSource" (Line1) are correct, but I am unsure what to do with the "TriggerSelector" (FrameStart)?  It appears that it won't run unless " TriggerSelector" is set to FrameStart?  Before these steps I already ran " IMAQdx Open Camera" and after these steps I ran " IMAQdx Configure Acquisition", "Register For Frame done Event", and "IMAQdx Start Acquisition" the same as before when it worked with the firewire camera. Can anyone see any problem with the way I have my trigger parameters setup?  Thank you in advance for any assistance.  Kevin
0 Kudos
Message 1 of 21
(5,695 Views)

Hey Kbaker,

 

When you say that your camera seems to be using the software trigger set up in MAX what are you referring to? Are you able to acquire images but it appears that you are just doing a normal grab without any hardware triggering? Where is your trigger source coming from? What happens if you do a grab from MAX with and without the trigger? If you try to grab from your camera with the trigger signal not generating pulses, do you get a timeout error? In a similar sense, what happens if you speed up/slow down your trigger signal; does your frame rate increase/decrease accordingly? I'm not too positive with the nature of your trigger pulses, but what happens if you increase/decrease the pulse width?

 

Essentially, if you are acquiring images and are worried that you are doing SW timing instead of HW triggering, turn off your triggers and see if you are get a timeout. Could it also be possible that you are triggering faster than you can bring the images into your program, so you are triggering images, but every time you call the grab VI there is already another image available. So, even though you are doing triggered acquisition, it appears that you are just doing a normal grab acquisition.

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 2 of 21
(5,641 Views)

Thanks for the input Ben.  Yes when I say that it appears to be using the software trigger setup in MAX it appears that it appears that it is a normal acquisition without any hardware triggering.  I even physically unwired the trigger signal and it does everything the same.  If I had everything setup as you say it should give me a timeout error.  I don't believe I am triggering too fast.  The trigger is setup to accept a "LevelHigh" signal for about 20ms.  After it is completed I am trying to read off that image with the Get Image VI.  As I mentioned when I used my old firewire camera with essentially the same code (except the initiallization stuff) everything runs off the external trigger just fine.  Thanks again for your help.

 

Kevin 

0 Kudos
Message 3 of 21
(5,638 Views)

Kevin,

 

One thing to keep in mind is that "TriggerSelector" is a selector that affects the context of other features like "TriggerMode". You can imagine that the selector is like manipulating a tab selector in a GUI and the other features selected by it are in the panels below the tabs. Thus, you must usually switch the selector to the instance you wish to modify first, then change all the features selected by that selector. If you do that in the opposite order you might be changing properties of a different trigger than the one desired.

 

Eric 

0 Kudos
Message 4 of 21
(5,626 Views)

Thanks Eric.  If I understand what you are saying I should be carefull on the order I "call" these acquistion attributes?  For example, "TriggerSelector" should be called before "TriggerMode".  If my understanding is correct then how does this work in MAX?  It seems that I can change the attributes in any order there.  I guess what I am asking is how do I know which attribute I should change first before starting the acquistion.  Thanks again for your help.

 

Kevin

0 Kudos
Message 5 of 21
(5,619 Views)

Hey Kevin,

 

After taking a closer look at your manual, there is a line that mentions that your camera has several different 'Imageing Modes.' However, it does not explicitly tell you how to change between these modes. By your description of your situation, it seems that you may be still be in free-run mode. What options do you have for your 'acquisition mode' attribute? Have you intentionally put your camera into a triggered mode versus the (most likely) default free run mode?

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 6 of 21
(5,600 Views)

Thanks Ben.  It looks like that was my first problem!  It appears that for the "CameraAttributes::AcquisitionControl::AcquisitionMode" attribute there are 4 choices: Continuous
SingleFrame, MultiFrame, and Recorder.  It was at Continuous before, and now I have it at SingleFrame.  I guess I always thought that with the "TriggerMode" attribute "On" it was supposed to be a trigger acquistion.  Oh well it gives me a timeout error now, so I just need to figure out my next problems are. 

 

Kevin

0 Kudos
Message 7 of 21
(5,593 Views)

Hello again.  I am still having problems with the trigger.  I am now wondering if I am using the isolated input when I should be using the non-isolated input as the trigger signal.  Can anyone tell me what the differences are and suggest which one I should be using in my application?  What are the requirements for the isolated and non-isolated input signals (e.g. how fast can the trigger be, what are the voltage requirements, current requirements, etc.)?  Here is a link to the manual: http://www.prosilica.com/products/manuals/700035A%20-%20GC660%20User%20Manual.pdf.  Thanks again for helping me understand this.

 

Kevin   

0 Kudos
Message 8 of 21
(5,585 Views)

Hey Kevin,

 

What sort of issues are you running into? In terms of which input (isolated vs. non-isolated), it really is your call. The manual doesn't give a whole lot of information regarding what quantifies a fast trigger or noisy environment. However, it does point to an additional resource from Texas Instruments that might be worth looking into.  Whichever direction you choose, I would use the appropriate schematic in the manual for hooking everything up.

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 9 of 21
(5,566 Views)

Hello again.  I am using the non-isolated trigger now and everything seems to physically work fine, but I am little confused on how it is taking my images?  It seems that it takes a different amount of time to "read" out each image that depends on how long the pulse is "high"?  I think it has something to do with how I am setting up my acquisition or event in labview.  It also looks like it is using the 15ms exposure time when my trigger pulse is longer than 15ms.  This is what my exposure time is manually set using MAX.  However, when the trigger pulse is decreased from 15ms the image becomes darker and darker, so it appears that I am actually exposing when the trigger is high then.  

 

For my application I am useing a trigger pulse that should expose the image when the trigger is "high".  Then I read out that image using the "FrameDone" event after the VI runs that generates the pulse.  I put a millisecond timer before and after the "get image" VI.  When the pulse is set to 100 ms it reads out the image very quickly (less than 1ms), but when I put it to 20 ms it is 4 ms, and when 5 ms it is 18ms.  Can someone look at my 2 VIs and see what the problem is?  

 

 The Initialize camera VI is trying to set up the triggers, and the take image VI generates the "high" pulse and reads out the image.   The initialize VI is very messing, because I am very confused on what I am supposed to do.  I also found a link on Prosilica website that is supposed to describe how I should use the trigger initialization.  http://www.prosilica.com/support/gige/ge_controls.pdf  As it says in the initialization VI it seems to me that I need two triggers: 1 to start the acquision, 2 to start taking the image.  Any help help understanding this would be greatly appreciated.  

 

Kevin 

Download All
0 Kudos
Message 10 of 21
(5,452 Views)