05-18-2009 12:04 PM
Hi
I'm logging AI channels from two PCI-4472 boards, while measuring rpm from a 5000 pulse/rev encoder using a PCI-6602. Currently I am using 2 DAQ Assistants, one for the DAQ boards and one for the counter/timer set to measure frequency (but I have also tried using the example VIs for frequency measurement as suggested in posts elsewhere). Software is LabVIEW 8.6 / NI-DAQ 8.9.
The problem I'm having is matching up the real-time axes from the 2 datasets. For the AI it is easy to control the number of samples and sample rate, but all I seem to be able to set is number of samples for the frequency measurement, and this returns a different length of data depending on the rotational speed (frequency). I'd like to be able to acquire a fixed time (say 5s of frequency data) so it could be matched up with the AI from the DAQ boards. If I try to acquire continuously there are of course buffer under-runs while one or the other DAQ assistant is waiting for the other to acquire all samples before another loop iteration.
Many thanks for any suggestions.
Aaron
05-21-2009 07:53 AM
Dear AAron,
Is it possible that you can post your code here.
Best regards,
05-21-2009 11:33 AM
Hi
Many thanks for the reply.
The code is very simple, 2 DAQ assistants: 1 logging 12 AI channels from 2xPCI4472, and 1 logging a single PCI6602 input fed with a 5000 pulse/rev speed encoder.
Here is my current version, I've been playing with quite a few options so it is a bit messy, if it is you want I can strip it down to the basics if it would be easier?
By default it logs 5s of DAQ data at 10kHz, and 50,000 samples of counter/timer (which equates to 20 revolutions at variable sample rate depending on shaft speed - I'd like to control sample rate and time like I can with the DAQs).
Appreciate the help, I'm new so I apologise if this seems a silly question...
Aaron
07-31-2009 01:30 PM
Hi,
first I want to say, I hope that everyone can read my english, because I don´t write often english 🙂
I´m trying to do something similar. I want to synchronize an AI with a CI (frequence measurement from an incremental encoder. I want to sample my AI with about 20 kHz and read about 2000 Samples with my DAQmx read VI. My problem is, that I want to have for every sample from my AI a sample of the frequency measurement. It dosn´t matter if it´s the same value that I read before. For example
AI Frquency
1V 100Hz
2V 100Hz
3V 100Hz
4V 150Hz
5V 150Hz
6V 210Hz
5V 210Hz
4V 210Hz
... ...
so I have to read a frequency value at the same time when I sample an ai value. but i cannot set up an sample clock for frequency measurement. how can I sample the same amount of ai and ci?
if something isn´t clear I can write more information.
thankyou
johannes