Hello!
I'm looking for a recommendation on how to speed up a counter pulse generation.
Currently I am generating a clock tick using a counter, and routing this counter through the PXI back plane and into several multifunction DAQ cards to acquire one sample of data (multi channel from all the DAQ cards) for each loop iteration.
There are several reasons I do this:
- I need 1 sample (multi channel) of data from multiple DAQ cards per software loop, identical to a control loop.
- I have to time the loop based on a software IRQ, specifically a reflective memory ScramNET card. I cannot use pulse trains or external hardware clocks. I have to use the software IRQ as the synchronizing clock, thus I need to trigger the pulse for every IRQ received in software.
- I use a HW Timed Single Point Read for each data point, with the card channels in parallel. Software Timed On Demand is a slower process, and won't multi-thread and thus parallelize like HW timed will.
- I run the multifunction DAQ cards in parallel for synchronization and maximum speed.
- They are X series cards, but the X series DAQmx Task synchronization doesn't work across multiple DAQ cards for single point I/O. Thus I need to create and route the pulse through the chassis.
- I create a DAQmx counter pulse with a very small time duration. Since the pulse has to occur immediately after the software IRQ, this seems like the only way. I've debated starting a pulse train and tweaking the frequency to realign every so often, but that sounds a little convoluted.
The only way (currently) I can fire this counter pulse is by Starting and Stopping the task each iteration. Even the shipping examples do it this way. Using Execution Trace Toolkit, it's clear that the Counter Start Task takes 168 uSec, and the Counter Stop Task takes 100 uSec. The total of 268 uSec is a lot of time, and limits the ultimate loop rate I can run. My Single Point Read (only) takes 226 uSec (and runs in parallel multi-thread which is great). So the pulse generation consumes a lot of time relative to my desired loop rate.
I've been doing it this way for some time, but I would like to speed up the pulse generation somehow. Starting/stopping the counter task with each iteration seems inefficient. But alas I'm no expert on counters. If needed I can attach any VIs.
Thanks for any help!
Patrick