Hello, LA,
Glad to have some one to help me out. I am stuck again. :(. I figured out several things, that about multitask and generate pulse signal.
Can you help me make clear how should I use example
'Acq-Int Clk-Dig Start&Ref' ?
What I have already done are:
1. Generated 1000 Hz clock signal to Dev2/ctr1, and keep it running.
2. Then generated a start signal to Dev2/ctr0.
These goes to my sensor, and my sensor return trigger and video signal back.
I can see it works on the oscilloscope.
Then I use example of 'Acq-Int Clk-Dig Start&Ref', try to get the video signal using trigger as reference.
I use ctr1 as source of the Sample Clock, video signal goes to ai0, ctr0 as start trigger, and PFI2 as reference trigger. I connected the trigger returned from sentor to PFI2.
The code looks like:
Configure_AcqIntClkDigStartRef("Dev2/ai0","/Dev2/ctr1",0.0,5.0,1000,10000.0,"/Dev2/ctr0","/Dev2/PFI2",DAQmx_Val_Rising,DAQmx_Val_Rising,100,&taskHandle3,NULL)
Then it gives the Error:
DAQmx Error: Source terminal to be routed could not be found on the device.
Make sure the terminal name is valid for the specified device. Refer to Measurement
& Automation Explorer for valid terminal names.
Property: DAQmx_SampClk_Src
Property: DAQmx_SampClk_ActiveEdge
Source Device: PCI-6036E: "Dev2"
Source Terminal: ctr1
Task Name: _unnamedTask<3>
Status Code: -200040
I do not know how to do now. Help me out please.
For better understanding what I am trying to do, I attatched the link of the sensors.
http://usa.hamamatsu.com/assets/pdf/parts_S/S8377_S8378.pdf
http://usa.hamamatsu.com/assets/pdf/parts_G/G9211-256S_etc.pdf
Actually, I used two linear image sensors. They works very similar. The problem is that they need different clock frequency. And I try to get the signal almost at the same time. I am not sure how should I put them together. One solution I can think is to get video signal from one sensor first, then change clock frequency and get signal from the second sensor. If you have better way to do this, let me know please.
Thanks a lot
Fish