LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI 6251 & PCI 6602

We want to do position correlated analogue Input. We are working with Labwindows/CVI. We have PCI-6251& PCI-6602.  Linear Encoder outputs A & B are connected to counter 0 of 6602. It gives us position. Now we want to generate a finite pulse train to trigger analogue input.  These pulse train have to be generated based on, let us say, based on A output of encoder. Our questions are:How to develop and sync tasks in CVI using NIDAQmx?We know through samples how to generate pulse train and do position measurement. But we have not been successful in intergrating the two tasks.Hence we have not also called triggered AI functions yet.I would appreciate a quick and detailed responce.I am new to CVI as well as NIDAQmx.
0 Kudos
Message 1 of 2
(1,686 Views)

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

0 Kudos
Message 2 of 2
(1,671 Views)