Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

DAQmx - Dynamic Averaging of Frequency - using PXIe-6356


  Can anyone provide a cross-reference matrix of functionality by card?


  In this case I am trying to use Dynamic Averaging on a counter input which is measuring frequency... to move the work out of the loop and onto hardware.  I am doing this work off-site using Virtual Channels...  and getting an error.  Previous settings were "One counter low frequency".


  Specifically I just need to confirmation that the PXIe-6356 can not support this feature...  or that some combination of my selections has made this a non-sane request.


  Generally I would like to find this information on my own...  hence looking for high level direction.


  Sorry if it is a silly question or in the wrong forum...  have not worked in this forum for over 5 years.




0 Kudos
Message 1 of 4

If you are reading my post...  and doing more than a counter or two...  you are probably also groaning as you realize that you can't easily bundle multiple counters into a single task (where there is a will there is a way...  but...  its not as easy as AI where you can just add "0:7" and get 8 channels).


This card apparently can.  Don't have one.


So I scratch my head wondering about the least ugly way to knock together 8 counter channels

* How to expose configuration settings to the end user (Not MAX...  that's a developer tool...  folks hate it)

 - I usually have a settings/configuration tab that saves off for different profiles


* How to initialize them in a clean way (easy enough in a for loop) 

* How to read in the primary loop (really prefer not to read in sequence...  but I am sure its fine...)

-  Every bone in my body tells me not to poll those readings in a for loop...  even if it is microseconds..

-  All the fat and tissue in my body says - "dont you dare spread those out as a big parallel mess"


Just seems sorta scrappy.

Oh well - for my application I am just averaging all the data anyway so it makes no difference if there is jitter around read time...  so long as I respect sample rates.


Good luck and let me know if you figure out a beautiful way to do it.
I will post how I did it later.  I am sure you can visualize it.



0 Kudos
Message 2 of 4

Hello methods,


It seems like this may not be achievable using the PXIe-6356.


As you can see on the link below (and as you mentioned) the NI 9361 card does indeed perform this that you want.

If you read the very last line, it says that you can find some examples for this method on the datasheet of this card.

0 Kudos
Message 3 of 4

We were able to meet our immediate goals using the cards we had on hand.


We instrumented our main loop with timers and measured how much time was actually being spent in each operation (hardware call, post processing, GUI write, etc).  It turned out that we did not need any advanced functionality (processing at the hardware level) to meet the 1khz loop rate targets we had.


We were sampling pretty slow signals over pretty short periods mind you...  but representative work

(i.e. Actual work in the field)


For the record...  the biggest time-hog in our loop was XY graph...  so I included a Boolean control on the front panel that allows the user to turn graphing on and off.  This control, along with displaying averaged loop time, allowed us to set everything up with tons of feedback, then walk away and log to file...  in a more deterministic way.




As for setting up multiple counter channels?

Init Tab

Array of Clusters

Cluster holds all of the settings you want, plus a few you dont care about for later use (initialized to crazy values)


Array of Clusters saves off to an INIT file - where you can save multiple versions.


At time of run Array of Clusters provides whatever is needed for specific counter setups.  More clumsy in 2010, polymorphic in ~2012...  ah...  finally...  a use for polymorphism.  P-)


I feel its best to make separate arrays for AI, AO, DI, DO, CI, CO.

At a minimum it would be (AI/AO,   DI/DO,    CI/CO)   or     (AI, DI, CI       AO, DO, CO)

Grouped in intelligent ways depending on the use case...


Each of those can be 8, 32, 64 channels...  initialized once then automatically

Every channel can be dynamically selected at runtime to perform differently


Hardware agnostic (you can add and remove hardware at will) so long as erros are handled.







0 Kudos
Message 4 of 4