02-20-2007 05:56 AM
02-20-2007 07:15 AM
02-20-2007 08:07 AM
>On demand is software-timed, and is dependant on your application and machine speed. Can you do a hardware-timed acquisition instead?
Not easily. I need to synchronise analogue samples with a variable-rate digital trigger - what I really need is hardware-triggered sampling, but the 6009 doesn't provide this. I assumed I could poll a digital input and sample on demand from the analogue input as soon as I saw an edge. Unfortunately, at the fastest rates I have to collect up to 1500 samples per second, I only get a fraction of this rate (about 70 on-demand samples per second maximum). I am using a dual-core 1.8GHz machine, so it is reasonably fast.
What I have ended-up doing is oversampling using hardware timing, and interpolating between analogue samples to get the closest match to the digital edge. It is quite crude and seems a bit flaky at times (I need a real-time display so I am also reading the buffer regularly, which is often empty and can sometimes overflow). If I can find a way of upping the on-demand sampling rate I would far rather do that.
Ben
02-21-2007
03:26 AM
- last edited on
06-09-2024
04:38 PM
by
Content Cleaner
Hi,
unfortunately I think you're using the best architecture with that hardware. Your descriptions implies you're triggering individual samples from your external source (so clocking) rather than "triggering" in the traditional sense of "event occurs so start acquiring from here on in".
Whilst the 6009 does support digital triggering, you're correct about the clocking and the only solution is to correlate the data in software.
It really is a simple device, and not designed to do the thing you want. Could you consider other hardware that can do external clocking such as the USB-6016 or the USB-6210 / USB-6211 (or any USB M-series)? https://www.ni.com/en-us/shop/model/usb-6210.html
As Chris said - on-demand is software timed so shutdown any processes you're not needing (virus checker, screensaver off, software firewalls off etc) so you can free up as much processor time as possible. Also, since it's USB, make sure there's no hubs in use, and you're not doing other USB things at the same time (like moving the mouse).
Thanks
Sacha Emery
National Instruments (UK)
02-21-2007 05:33 AM
Sacha,
Thank you for your helpful reply.
You're right - I should have said clocking, rather than triggering.
I'll stick with the correlation approach for this project as it is just a one-off, but in future I'll consider the USB-6010, it looks like it has much higher functionality for not much more expense.
Ben