12-19-2007 07:09 PM
12-20-2007 05:39 PM
Hi Peter,
Welcome to the forums! As I understand it, you have two questions. The first is how to route the input of PFI0 to the Gate of your 6251 card’s Counter 1 so that you can perform a single pulse width measurement. The second is how to perform simultaneous analog input and pulse generation tasks. Is my understanding correct, I made some assumptions?
The Knowledge Base Document ID 3STFET46: Synchronizing Tasks in DAQmx Base - ANSI C addresses both of these questions. You will not be able to route a signal from PFI0 to the counter, but I might suggest using PFI4, which is the Coutner 1’s Gate input. With regards to your second questions, while you will not be able to share a sample clock between tasks to truly synchronize the tasks, the suggested work around is to start the tasks that you want to be synchronized with a trigger and to make the trigger for both tasks come from the same source.
I hope this explanation helps. Good Luck, Mallori M.