09-18-2019 09:37 PM
I've set up the trigger. However, the picture does not come out properly.
Is there another source coding method? (C++)
Image marked as vtk (500x1024)
09-18-2019
09:58 PM
- last edited on
11-20-2024
04:42 PM
by
Content Cleaner
Configuration has already been finished?
Real-Time System Integration (RTSI) and Configuration Explained
I guess timeout error broke out. How are you configuring terminal between PCIe-6321 and PCIe-1433?
Which is master device, what signal are you sharing?
For example as below.
PCIe-6321 (PFI1) --> start trigger --> PCIe-1433(TRIG)
In above case, 1433 should be waiting start trigger before 6321 sends the signal.
09-18-2019 10:09 PM
Four configurations have been completed.
DAQmxErrChk(DAQmxCreateTask("AOCh0", &m_BScanOutTask));
DAQmxErrChk(DAQmxCreateTask("AOCh1", &m_CScanOutTask));
DAQmxErrChk(DAQmxCreateTask("C0CH", &m_CAMTimmingTask));
DAQmxErrChk(DAQmxCreateTask("C1CH", &m_MasterTrigTask));
DAQmxErrChk(DAQmxCreateCOPulseChanFreq(m_MasterTrigTask, "Dev1/ctr0", "", DAQmx_Val_Hz, DAQmx_Val_Low, 0.0, CounterFrequency, 0.8));
DAQmxErrChk(DAQmxCfgImplicitTiming(m_MasterTrigTask, DAQmx_Val_ContSamps, XRange));
DAQmxErrChk(DAQmxSetStartTrigRetriggerable(m_MasterTrigTask, TRUE));
DAQmxErrChk(DAQmxCreateCOPulseChanFreq(m_CAMTimmingTask, "Dev1/ctr1", "", DAQmx_Val_Hz, DAQmx_Val_Low, 0.0, CounterFrequency, 0.2));
DAQmxErrChk(DAQmxCfgImplicitTiming(m_CAMTimmingTask, DAQmx_Val_FiniteSamps, XRange));
DAQmxErrChk(DAQmxSetStartTrigRetriggerable(m_CAMTimmingTask, TRUE));
DAQmxErrChk(DAQmxConnectTerms("/Dev1/Ctr1InternalOutput", "/Dev1/RTSI0", DAQmx_Val_DoNotInvertPolarity));
DAQmxErrChk(DAQmxCfgDigEdgeStartTrig(m_CAMTimmingTask, "/Dev1/Ctr0InternalOutput", DAQmx_Val_Rising));
DAQmxErrChk(DAQmxCreateAOVoltageChan(m_BScanOutTask, "Dev1/ao0", "", -10.0, 10.0, DAQmx_Val_Volts, NULL));
DAQmxErrChk(DAQmxWriteAnalogScalarF64(m_BScanOutTask, 1, 10.0, GarvoBMInitBuffer, NULL)); //x axis mirror initial position shift
DAQmxErrChk(DAQmxCreateAOVoltageChan(m_CScanOutTask, "Dev1/ao1", "", -10.0, 10.0, DAQmx_Val_Volts, NULL));
DAQmxErrChk(DAQmxWriteAnalogScalarF64(m_CScanOutTask, 1, 10.0, GarvoCMInitBuffer, NULL)); // y axis mirror initial position shift
DAQmxErrChk(DAQmxCfgSampClkTiming(m_BScanOutTask, "", CounterFrequency, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, XRange));
DAQmxErrChk(DAQmxSetStartTrigRetriggerable(m_BScanOutTask, TRUE));
DAQmxErrChk(DAQmxCfgDigEdgeStartTrig(m_BScanOutTask, "/Dev1/Ctr0InternalOutput", DAQmx_Val_Rising));
DAQmxErrChk(DAQmxWriteAnalogF64(m_BScanOutTask, XRange, 0, 10.0, DAQmx_Val_GroupByChannel, GarvoObuffer, NULL, NULL));
Trigger is configured like this.
09-18-2019 11:40 PM
It seems that there is no critical problem.
The device export counter signal by "DAQmxConnectTerms" function.
If your code is no problem, execution order might cause a problem.
Before starting counter task, has PCIe-1433 been waiting state?
09-18-2019 11:50 PM
How can I tell if the 1433 is on standby? I'm not sure because it's my first time.
The video came out, but I just decided that the trigger was wrong because it was not the desired video.
In addition, some changes were made to the Camera option in NI-MAX.
ex) The image is output as vtk after cuda cuffing.
09-19-2019 12:23 AM
09-19-2019 12:53 AM
Thank you for answer.
If the test does not trigger the DAQ program, NI-MAX generates a time out.
However, when I trigger on a DAQ program, no time out error occurs in NI-MAX, but the image does not appear and is displayed in black and white.
09-19-2019 01:19 AM
In addition, the camera settings are set to Internal as shown in the image below.
09-19-2019 01:38 AM
No timeout error implies that trigger detection on PCIe-1433 is success.
Let's move our sight to why camera doesn't return expected image.
When you configure the camera with no trigger, does it return expected image?
If so, this problem is caused by trigger configuration.
09-19-2019 01:58 AM
Thank you for answer.
Without the trigger, the desired image will not come out.
6321, 1433 Is there a command to sync two?