05-04-2009 05:16 PM
Any tips on this would greatly be appreciated.
05-04-2009 07:10 PM
4096 pulses per revolution at 300RPM gives you 1228800 pulses per second. You can not capture this on an analog input of a USB-6229 and 9 other analog inputs at the same time.
You are trying to do some quite complicated data acquisition.
To properly capture the data you require I think you will need to use the counter/timer inputs of your 6229.
Have a look as some of the examples that ship with LabVIEW.
Hardware Input and Output >> DAQmx >> Counter Measurements
To save the captured data to a file you will need to send the data to another thread so your data acquisition isn't slowed down by file I/O operations.
See producer / consumer architecture.
Save the data using the TDMS functions.
05-04-2009 10:10 PM
Thanks for the reply Troy. I will take a look into the examples. I have been playing around with the express vi's such as collector, which seem to be working pretty well.
Forgive me if I am wrong, but 300RPM *4096 = 1228800 pulses per minute, or 20480 pulses per second? So my DAQ would still be in the ballpark for reading the optical encoder? 300 also is the high end, it will most likely be around 265-280 RPMs.
05-04-2009 10:51 PM
Forgive me if I am wrong, but 300RPM *4096 = 1228800 pulses per minute, or 20480 pulses per second?
You are absolutely correct. Must be my mad cow disease playing up again. Maybe a dose of swine flu will fix it.
Using express vis are ok to do some basic things when you're first learning, but they will probably not suit your complex requirements.
It is still advisable to acquire data from an encoder using counter/timers though as far as I'm aware.
The problem is that you don't have 10 counter/timers on your USB-6229 device.
20KHz is almost right on your signal frequency. Sampling at that rate will likely give you aliasing problems.
You will need to double your sample rate to 40KHz at a minimum.
05-05-2009 06:02 AM
If I remeber correct is not a optical encoder output digital? I think it is much better to use digital Input then sampling those channels. I think it is posible to have syncronized analog/digital input in the M series daq board. Anyway I would recomend sampling your camshaft encoder with at least 200KHz sample rate. This will give you far better accuracy.
05-05-2009 07:54 AM
I'd recommend you look for the shipping example that shows you how to acquire using an external clock source. Use the encoder as teh clock source and for each pulse the DAQ takes one sample.
Ben