(1) The card receives a digital start trigger on "/dev/pfi1".
(2) a pulse train starts with with a frequency of "rate", this is going to be used as the clock for the AItask.Timing. Do I need to connect "/dev1/ctr0" to "/dev1/ctr0Out"?
No, the counter's output is always directed to the "/dev1/ctr0out" terminal. You don't have to do anything special.
(3) AItask is going to aquire continuous data at a rate "rate". As long as there is signal on the clock channel.
Right. And there will only be a signal on the clock channel for count points after receiving each trigger. Note that in this case, the rate you set on aiTask is just a hint to the driver.
The rate set on coTask actually controls when data are acquired.
(4) This is where it gets iffy,
(a) starttrigger.retriggerable = true, creates a pulse when a trigger is received. What does this do and where does the pulse go?
Setting the start trigger to be retriggerable basically says that the task should automatically re-arm and start waiting for another trigger immediately each time it finishes generating its pulses. Ideally, you would just set this property on aiTask, but that is not supported directly. The hardware can only do it on counter tasks. Each time a trigger is received, coTask will generate count pulses which cause count samples to be acquired by aiTask.
(b) When the nth trigger is received, the COtask task starts the pulse train, and AItask starts to aquire data?
When a trigger is received, the counter generates its pulses. When it is done with its pulses, it immediately begins waiting for another trigger. aiTask is always
sitting around waiting for a pulse on the counter output to tell it to get a data point. It knows nothing about triggers in this case.
Tony H.
Measurement Studio