Trigger ready?
AnsweredIs there a signal that reports if the camera is done with the current frame acquisition and can be triggered again?
-
Official comment
Hi Chris,
Just following up on this. I see you made a new post for another issue, but for this issue do you have a method to poll for trigger ready so you know as soon as you can trigger again? In your example, you can not trigger after waiting for Exposure End event because the camera will not be ready to trigger at the end of exposure, it needs some time to read off the sensor. If overlap readout is enabled, you will be ready for the next trigger before the next frametime, so you can trigger slightly faster than waiting for the image to be received and then triggering.
Easiest solution would be if you do not need max framerate, then your process would be:
- Trigger the camera (Frame 1)
- Get Next Frame (Frame 1)
- Trigger the camera (Frame 2)
- Get Next Frame (Frame 2)
- etc
If you need to trigger as fast as possible, Manuel's solution above is the way to do this. You would set your line1 output to "strobe" on source FrameTriggerWait. This signal will tell you when the camera is ready to be triggered again. You can then poll this line1 status to see when you can software trigger.
- Trigger the camera (Frame 1)
- Wait for FrameTriggerWait by polling Line1 status
- Trigger the camera (Frame 2)
- Get Next Frame (Frame 1)
- Wait for FrameTriggerWait by polling Line1 status
- Trigger the camera (Frame 3)
- Get Next Frame (Frame 2)
- etc
I hope this helps let you know how you can poll until the camera is ready to trigger. We can work with your new timing issues in your other post, but if you can verify that this thread has what you need, it would be appreciated.
Thank you,
Demos -
Hello Chris,
What exactly are you trying to do in your application, are you trying to hardware trigger as quickly as possible?
If you are looking for a hardware indication of when the camera is ready to be triggered, you can set your strobe source to be "FrameTriggerWait". That will pulse once it is ready for a trigger.
On the software side, we can not poll this value. There would be different options using Exposure or Image events, or even logic blocks, but if you can let us know what you are trying to do, we can see how close we can get you to a software solution if needed.
Thank you,
Demos
0 -
Our program flow is to wait for the camera to report its ready to be triggered, trigger the camera, and then grab the frame from it.
I think it looks like I should be able to use the ImageEvents and the camera in continuous mode with a little reworking on our end.
I should be able to make the event handler store the returned image and signal a semaphore. My trigger the camera function wouldn't need to so anything, and the grabbing the frame would just retreive the image stored by the event.
0 -
You are correct, the Image Events can notify you one the image has completed transfer, and you can then software trigger the next image.
You could theoretically trigger the camera a little earlier than that as we support overlap triggering, but that is more difficult to get in software. If the timing of using ImageEvents works for you and you can trigger fast enough to meet your needs, I would recommend that solution.
We have some examples such as the ImageEvents and Trigger examples which can help provide some starting points if you need. You can find them in our installations src folder.
Demos
0 -
The overlap triggering is what we are looking for. Just free running the camera won't actually work because we need to sychronize the camera to motion.
To do overlap triggering I should be able to do the following, correct?
- Trigger the camera (Frame 1)
- Wait for Exposure End Event
- Trigger the camera (Frame 2)
- Get Next Frame (Frame 1)
- Wait for Exposure End Event (Frame 2)
- Trigger the camera (Frame 3)
- Get Next Frame (Frame 2)
- etc
0 -
HI Chris,
There is a way to poll the FrameTriggerWait status in software://To configure a line:
// Set Line 1 of GPIO to Output
CEnumerationPtr ptrLineSelector = nodeMap.GetNode("LineSelector");
ptrLineSelector->SetIntValue(ptrLineSelector->GetEntryByName("Line1")->GetNumericValue());
CEnumerationPtr ptrLineMode = nodeMap.GetNode("LineMode");
ptrLineMode->SetIntValue(ptrLineMode->GetEntryByName("Output")->GetNumericValue());// Set Line Source to FrameTriggerWait
CEnumerationPtr ptrLineSource = nodeMap.GetNode("LineSource");
ptrLineSource->SetIntValue(ptrLineSource->GetEntryByName("FrameTriggerWait")->GetNumericValue())// To poll the status until the camera is ready to be triggered:
// Read the LineStatus node of Line 1, if it is 1, the camera is ready to be triggered
CBooleanPtr ptrLineStatus = nodeMap.GetNode("LineStatus");
bool lineStatus = false;
do
lineStatus = ptrLineStatus->GetValue();
while (!lineStatus);0
Please sign in to leave a comment.
Comments
6 comments