03-21-2012 06:02 PM
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.
Solved! Go to Solution.
04-11-2012 08:00 PM
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.
04-11-2012 10:21 PM
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
04-12-2012 02:28 PM
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.
04-12-2012 02:46 PM
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