I would like to make an integrated programming code of hardware-triggering a camera with generating a pulse train.
If anyone could address this issue or make a comment on this then, I would appreciate a lot.
Attached below is the snippet for this work.
Below are the hardware and software specifications that I am using now for this work.
---------------------------------------------------------------------------------------------------------------------------
DAQ board: NI USB-6363 (BNC)
Camera: IDS camera (Model: U3-38J1XLE-M-GL_Rev_1_1)
Camera feature: 'ReadOutStart' only surpported as a 'TriggerSelector' parameter
Camera pin: An external trigger input is supported only. There is no any flash light output.
Programming language: Visual Studio 2017, MFC (Microsoft Foundation Class)
---------------------------------------------------------------------------------------------------------------------------
In detail, I have already checked that an externally-triggered camera MFC code alone could capture image quite well by using a sample code of 'VC_DigPulseTrain_Cont' at DAQmx C API. According to the pulse frequency that I adjusted in the 'VC_DigPulseTrain_Cont', the frame rate of a real time image was reflected well. However, Those codes are not yet integrated but separated at present.
In the snippet that I attached, I had tried to integrate the two codes together for making one MFC code. Therefore, I tried to use a synchronization object of 'CEvent' in order not to monopolize a CPU from a worker thread of 'AcquisitionWorker()' so that I expected to do a pulse generation seamlessly. However, the integrated code is not working. That is, any pulse train does not be shown on an oscilloscope and thus the camera can not capture an image any more.
In Labview, in my memory, the synchronization between a camera and a DAQmx trigger signal is carried out by correctly deploying all the configurations on 'Merge Errors.vi' right before a 'while' loop. So, I tried to imitate the advanced synchronization Labview examples between devices.
Kindest regards and many thanks in advance,
Headalma