12-13-2008 09:57 AM
Hi I am planning on using the camera's trigger input to start capturing images but Im not sure what steps that I need to do in my c# application when a trigger has initiated.
- If the trigger is coming from the PLC, do I also need to send a trigger signal to the PC and keep the trigger signal active until the PC is done acquiring the image?
- Do I still need to use snap or grab functions in imaqdx to get the image?
- If the camera is directly connected to the NIC does external triggering still have great advantages? The camera in only less than 5 meters away from the PC.
Thanks,
Cliff
Solved! Go to Solution.
12-15-2008 05:08 PM
Hi riscoh,
I think your best bet might be to take a look at some of our examples. By default they will be located at the following location on your hard drive. \Documents and Settings\All Users\Documents\National Instruments\NI-IMAQdx\Examples
As for you specific questions:
1. If you are using a GigE camera you will not need to send a trigger to the computer. You will have to set the camera to the proper trigger mode. This can be done in Measurement and Automation Explorer (MAX) or programmatically. What mode you use will depend on the particular camera.
2. Yes. Take a look at some of the triggering examples to see how to set this up. .
3. External triggering will allow you to sync your image acquisition to an external event. So if you need to take your image at the same time as some other external event then yes it will matter.
12-15-2008 08:51 PM
Adam,
First of all thanks for your time...
I have looked at all the examples but couldnt find anything which deals with external triggering
All examples just basically involves opening a camera and use snap, grab, getimage functions ... etc but no code example on external triggering.
To follow up on my 1st question...
- How will my application know when an external trigger has occured?
Would you be able to give me simple example or refer me to a document on how to do this...
Thanks
12-16-2008 11:35 AM
Hi riscoh,
When you are working with a GigE camera you are not triggering anything on the computer its self, only the camera. When it is configured to trigger it will sit and wait for a trigger. When it received the signal it will take an acquisition and send the information to the computer. When you set up your grab on the computer it is looked for images and brings them into the computer when they become available. The example I was pointing you to was going to show you how to configure the camera programmatically for a trigger. It looks like it may only be available in Visual C. As far as documents are concerned the following Developer Zone article briefly discusses triggering with a GigE camera. Acquiring from a GigE Vision Cameras with Vision Acquisition Software- Part II
12-16-2008 12:07 PM
Adam,
If found the Visual C example last night just after I sent a reply, and Ive been trying to figure out how it was done. I think Ive figured out the example.
So here are the steps that I should do... Correct me if Im wrong...
1. Configure the camera for external trigger through MAX or programatically...2. Open the camera in my application
3. Create a loop that constantly grab/snap an image from the camera
4. If image is available display the image in viewer and send signal to PLC if its good or bad..
Thanks...
12-17-2008 09:46 AM
Hi riscoh,
It sounds like you have a pretty good idea of what you need to do. One thing to clear up is that you will want to use grab. Snap if only if you are planning on taking one image. It is far to slow to use if you need multiple images.
12-17-2008 10:01 AM
Adam,
Thanks for the help, appreciate it...
I could finally work on the image analysis now...
Riscoh