Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Edge Counting and Timing Source for Timed-Loop On Demand Data Acquisition - Not Acquiring Data on specified Rising Edge

Solved!
Go to solution

Operating System: Windows XP

Hardware: PCI 6259

 

Terminals Used: PFI0 and PFI2

Counters Used: Ctr0 and Ctr1

 

Im currently developing a timed loop data acquision application where the timing source comes from my PFI2 (using channel A of an encoder).  Im basically trying to acquire data as a function of number of ticks of my encoder.  For the timing source, I am using counter 1 to capture the rising edge and have the time-loop acquire data.  At the same time, Im using counter 0 to count the number of rising edges so I know exactly at what tick the data was acquired.  PFI0 and PFI2 are connect to channel A of the encoder.

 

Issues:

Timed-loop is not acquiring data at every tick because when I view the data file (text) there are missing count values of my encoder.  Is it because there's a limitation on Windows OS?  I used an oscope to measure the frequency at the maximum rotation of channel A encoder and it is 6.757kHz.  Any solutions?

 

Also, is there anyway I can internally route the source channel A encoder to generating the timing source instead of using another counter?  I've attached my VI.      

0 Kudos
Message 1 of 5
(2,803 Views)

Hi,

You wouldn't like to use Timed Loops if you're in Windows. If you want to acquire every tick, you just need to specify the PFI line that you are acquiring from your encoder as your AI clock source in the DAQmx Timing VI.

I also noticed that you use a DAQ Assistant with 1 Sample on Demand. Try using the Shipping Examples instead for optimization. Go to Help » Find Examples » Hardware Input and Output » DAQmx » Analog Measurements » Voltage » Cont Acq&Graph Voltage-Int Clk.vi.

Regards,
Daniel REDS
RF Systems Engineer

Help us grow.
If a post solves your question, mark it as The Solution.
If a post helps, give Kudos to it.
0 Kudos
Message 2 of 5
(2,764 Views)

Thanks REDS!

 

I have a question. If I do use the method you proposed, does that mean that all the data that are acquired at the rising edges of my encoder will be stored into buffer and the while loop reads the buffer in a sequential manner?  I want to be able to get all the readings from all the rising edges (and I do have 8 analog inputs)..

 

Regards,

 

Nar Vang

0 Kudos
Message 3 of 5
(2,760 Views)
Solution
Accepted by topic author justdomechanicalengineering

Hi,

 

All of the samples that you acquire will be read by LabVIEW in a sequential manner. Figure 4-21 on the M Series Manual in page 80 (4-34) shows that you will acquire all of the samples you request from all of the channels you sample in sequentially.

Regards,
Daniel REDS
RF Systems Engineer

Help us grow.
If a post solves your question, mark it as The Solution.
If a post helps, give Kudos to it.
0 Kudos
Message 4 of 5
(2,747 Views)

Thanks REDS!  I'm new to LabView so I trying to figure out what's the best solution.  This has been really helpful.

 

Regards,

 

Nar Vang

0 Kudos
Message 5 of 5
(2,744 Views)