03-26-2009 02:41 PM
03-27-2009 05:16 PM
Would you mind clarifying your circumstances for triggering the analog input? Is it something like, when your counter detects a change in the position of the linear encoder, then you want to generate a pulse train to be used to trigger the start of an analog acquisition? Are you planning on using this to trigger a finite acquisition of your analog input? or are you trying to use that pulse train to be a sample clock for the analog acquisition?Also, is there any reason you have to use the 6602? or can you just use the two counters on the PCI-6251? If you can contain everything to one board, you may not even need to physically route signals out of the 6602 to the 6251.
As far as integrating the two tasks together in CVI, are you familiar with coding in LabVIEW? this could give the explanation something good to relate to. Basically what you need to do is to create a DAQmx task for the analog input and a task for the counter. You'll want to use the DAQmx C API to set up an an analog acquire task, that has a digital trigger configured. You'll also want to set up a linear encoder counter task as well as another task that is a Counter Output Freq task. You can find all of these DAQmx functions in the NI-DAQmx C Reference Help which can be located at Start>>Programs>>National Instruments>>NI-DAQ>>NI DAQmx C Reference Help.
Here is a link to a Developer Zone article that addresses the issue of Using NI-DAQmx in CVI. And here is a Knowledgebase article that explains where to find all the shipping examples in CVI for DAQmx. I hope this helps.
Chris W