Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx: strange behavior or sampling issue

Solved!
Go to solution

Thanks guy!

 

You're giving me some great ideas...   I didn't want to modify the original code too much, but since the original code was not stable, rewriting with a slightly different approach makes sense.  I'll keep you posted!

0 Kudos
Message 11 of 15
(1,179 Views)

Thank you Kevin & Santhosh.

 

The solution was from:

 

"N Channel 1 Sample reads. You'd be much better off reading multiple samples per read"

 

The entire buffer is read using read multiple samples in every loop iteration.  D'oh!!  It makes so much more sense when you think of it in physical terms. 

0 Kudos
Message 12 of 15
(1,163 Views)

I'm going to jump into here Ray.  (Actually, I hadn't seen a post from you for a while and went looking)

 

Saw that snippet and triggered a few dang braincells.

 

I agree that reading all available samples is the correct approach but would add a few points.

 

For some unknown reason you stuck all your AI tasks in serial!  Without even building an error out array (hiding any errors in every iteration but i=N-1)  and I have no idea why you didn't enable loop parallelism!

 

Samples to read are going to be individually set by each Task so! You need to read Waveforms to build the array of 1D wfm from the for loop.  Or you've killed your ability to have independent sample rates.

 

Kill the timed structure or use the same clock source the hardware shares if you absolutely must use one. (Reasons like depends on ended late or remotely calling Stop Timed Loop by name justify a timed loop but change the clock source) I'm reminded of Ben Franklin's observation, "A man with one clock always knows what time it is.  A man with two is never sure!"  You are just begging for the PXIe Chassis clock to start running fast.  And, YES THAT HAPPENS! when;

  • you don't use slot blockers to direct the cooling air away from the open slots (those don't need to be cooled power consumption is 0.000Watts in empty slots) yes those silly plastic doodads ARE not toys.
  • Don't clean the fan filters
  • Block the chassis airflow by poor installation.

save yourself the headaches and fix those ASAP.


"Should be" isn't "Is" -Jay
Message 13 of 15
(1,133 Views)

Excellent advice - Thank You!

 

I inherited the project and my goal was to get it working.  I think the snippet is simply something I put together to illustrate what challenge I was having.  I have never seen the actual system, but I will pass along the advice on the slot fillers and making sure it is clean.  I suspect cleanliness is not an issue simply because of the location where they are used.

 

You noticed I do not spend as much time in the forums...  Yeah.... there's a reason for that....

0 Kudos
Message 14 of 15
(1,070 Views)

Clean is good but, really hammer them on the slot blockers!  It's a very painfully learned lesson that the clocks run fast hot!  And fully explains the observed effects. 


"Should be" isn't "Is" -Jay
0 Kudos
Message 15 of 15
(1,064 Views)