Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous Mode Internal Sample Clock Task - No Available Samples

Solved!
Go to solution

I have a PXIe-1084 chassis with a PXIe-6368, PXIe-6509, and a PXIe-4305.   The production system will ultimately have 2x PXIe-4305, so I also use a simulated PXIe-4305.

 

If I start a task on the 4305 (either real or simulated) using an internal sample clock with continuous acquisition mode, I can read it any number of times successively and it will produce as many samples as I ask for.   However, if I start and stop other tasks after starting that 4305 continuous task, and try to read from it, it always times out.   So I put in some debug output so show available samples before and after the read.   And, after the first read, there is always zero available samples regardless of timeout or inserted delays, etc.

 

Task flow:

 

  1. Start #1 4305 continuous (internal sample clock, 128 samples per channel)
  2. Read 8 samples, and display  (DEBUG: 128 samples available before read, 120 samples available after read)
  3. Start & Stop 6368, 6509, and second 4305 tasks (all finite mode, some on-demand, some using internal sample block) 
  4. Check #1 (4305) task, (DEBUG: 0 samples available) read always times out
  5. Repeat steps 3 and 4, always same results

 

I have tried using both real and simulated for the different 4305 tasks.   I'm pretty sure this is just some misunderstanding that I have but I haven't been able to figure out why that happens.  My guesses include:

 

  • using simulated and real boards somehow affects the ability to run simultaneous tasks
  • there is some sort of sample clock contention
  • it's just not supposed to work that way in the first place!

The idea is that we start a background continuous voltage input task that we check periodically between the execution of other tasks.   That checks different power supply levels and, if they are out of whack, we stop processing early otherwise we continue.   

 

Can anyone help point me at what I'm doing wrong?   Thanks!

0 Kudos
Message 1 of 3
(567 Views)
Solution
Accepted by topic author frankjc

I figured out what I was doing wrong!   It's actually pretty simple.   In continuous mode, you have to read faster than it fills the circular buffer.   If you don't (as I was not doing), the available samples goes to zero and all subsequent reads will timeout.

 

Sorry for my confusion over that but hopefully this post can help others in the future!

 

 

0 Kudos
Message 2 of 3
(527 Views)

Without a piece of code to review it is hard to find where the problem lies.

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 3 of 3
(521 Views)