Acquisition Speed
AnsweredI am using a Chameleon3 CM3-U3-50S5M with software triggered acquisition.
I am trying to test how fast we can get the acqusition to overlap and seeing weird behavior.
Right now I am just testing how fast I can trigger the camera back to back. I am using the AcquisitionStatus() command with the selector set to FrameTriggerWait
The behavior that I expect to see is that if my exposure time is under the frame rate (35 FPS / 0.028 s) then the camera would not report the status as ready until the frame rate time. And if over the frame rate time, that the camera would report as ready immediately.
What I am seeing is that it is blocking until something is ready in the camera, in about 15 ms increments.
I tried setting AcquisitionMode to both SingleFrame and Continuous
Exposure time (ms) Time until FrameTriggerWait is good
5 45
10 45
15 45
20 60
25 60
30 60
35 75
40 75
45 75
50 90
-
Official comment
Could you please run QueryPerformanceCounter in a loop to check the granularity on your system?
-
HI Chris,
Could you please post the part of the code where you measure the time?Best regards,
Manuel0 -
if (loopCnt < z_numTriggers){waitCnt[loopCnt] = WaitForTriggerReadyAcqStatus(pCam);result = result | GrabNextImageByTrigger(nodeMap);QueryPerformanceCounter((LARGE_INTEGER*)&ctr2);timestamp[loopCnt] = ((double)(ctr2 - ctr1) / (double)freq);}//------------------------------------------------------------------------------------------#define PERF_COUNTER_START() \
__int64 ctr1 = 0, ctr2 = 0, freq = 0; \
QueryPerformanceCounter((LARGE_INTEGER *)&ctr1); \
QueryPerformanceFrequency((LARGE_INTEGER *)&freq);//------------------------------------------------------------------------------------------int WaitForTriggerReadyAcqStatus(CameraPtr pCam) {int counter = 0;PERF_COUNTER_START();while (!pCam->AcquisitionStatus()) {//cout << "Waiting" << endl;Sleep(1);counter++;}QueryPerformanceCounter((LARGE_INTEGER*)&ctr2);return (int)(((double)(ctr2 - ctr1) / (double)freq)*1000);}//------------------------------------------------------------------------------------------int GrabNextImageByTrigger(INodeMap& nodeMap){int result = 0;try {// Execute software triggerCCommandPtr ptrSoftwareTriggerCommand = nodeMap.GetNode("TriggerSoftware");if (!IsAvailable(ptrSoftwareTriggerCommand) || !IsWritable(ptrSoftwareTriggerCommand)) {cout << "Unable to execute trigger. Aborting..." << endl;return -1;}ptrSoftwareTriggerCommand->Execute();}catch (Spinnaker::Exception& e) {cout << "Error: " << e.what() << endl;result = -1;}return result;}0 -
You are correct that it is a side effect of something on my system.
0
Please sign in to leave a comment.
Comments
4 comments