04-30-2014 03:09 PM
Hi All,
I have PXIe-4300 SC Express cards and need to perform hardware-timed single point (HWTSP) aqcusition for a continuous closed loop control system. I come from the higher acqusition rate with buffers realm, so this area is somewhat new for me. I am wondering what type of rates I could expect, using the cards I have, from performing HWTSP acquisition. I tested the system with the example HWTSP from LabVIEW 2012 help and was only able to achieve 1000Hz for a finite time (< 10 mins) for a single channel. I was hoping to be able to perform this over multiple channels but can't even acquire for a half-second when 4+ channels are added. I am not sure if this is expected behavoir or if I am missing something because if these rates are expected rates, I may have to reconsider the application. I also wasn't sure if the card type I am using could be causing issues. Any help would be greatly appreciated. Thank you.
04-30-2014
03:57 PM
- last edited on
10-17-2024
09:53 AM
by
Content Cleaner
Hello MBoyd,
Without knowing more about your setup (What OS? What controller? What failures are you seeing when using the DAQmx shipping examples? Which specific example are you referencing?)
It's not clear if you're using an RT system or not, but if you're currently using a Windows controller then approximately 1 kHz is what I'd consider a "normal" operating upper limit for most loops that rely on some form of scheduling or triggering that interacts with the OS. Faster is certainly achievable, but that's something to keep in mind.
This thread has some additional information on using the DaqMX Wait For Next Sample Clock.vi on Windows that you might find useful:
Thread: DaqMX Wait For Next Sample Clock.vi Causing Slow Down
Best Regards,
05-01-2014 07:38 AM
I apologize for not being clearer the first time through. Currently my PXIe chassis is connected to an external Real-Time controller via fiber MXI cards (PCIe/PXIe-8375). The controller is a DELL T7600 that NI personally sanctioned as supportable NI Controllers. My current testbed code contains no other operations other than the single-point read from the DAQ card. Other than that single read, the while loop is currently empty.
What I am unsure of is that the white paper linked previously states that the system can run in Polling Mode vs Interrupt mode which will result in faster operation, but I am unsure how to actually make the change from itnerrupt mode to polling mode.
05-01-2014 09:24 AM
05-01-2014
11:35 AM
- last edited on
10-17-2024
09:57 AM
by
Content Cleaner
Hello MBoyd,
To check- have you attempted deploying the benchmarking code linked via the aforementioned whitepaper? The link is at the end of the PXIe-8108 benchmark section, just in case here it is linked again:
As for other references, these documents may also be helpful:
My impression is that this simultaneously-sampled card shouldn't see much of a hit when acquiring from all channels, and that well over 1 kHz should certainly be possible. It seems more likely that there is some sort of RT priority, transfer latency/read processing, or synchronization problem. Out of curiosity, how fast can you run a loop containing a simple software-timed read with a 1us wait timer (one of the SW Timed Input examples, but minimize the execution throttling/wait timer)? Obviously this isn't what your end goal is, but I'd still expect a rate of >1kHz.
A few other clarifying questions:
-What is your actual target loop rate?
-How many channels do you intend to acquire from, if possible?
-What do you mean when you say that polling mode didn't give you the required overhead to properly operate the circuit? As a note, polling in an otherwise uncontrolled loop will likely utilize whatever CPU cycles are available, however this is intended and accurately represents that the polling function is querying for an update as fast as possible until the event of interest has occurred. You should still be able to perform your processing and AO before beginning to poll, with the caveat that your maximum loop time still needs to be less than the single-point sample period.
-Have you attempted using a timed loop synchronized to the sample clock rather than the wait for sample clock function? This may be a viable option.
-Are you running this code interactively via the LabVIEW development environment (Click the VI's run button while targeting the RT Controller) or deploying it as a Real-Time executable? Interactive execution will almost certainly slow things down quite a bit.
-You indicated that a Read is the only function in your primary loop- are you using the Wait until next sample clock function or the Report Missed Samples property?
It would also be helpful if you could post the actual code you're using, if possible- there are often small things that are much, much easier to pick up on when you can see the code.
I'd also recommend getting in touch with NI tech support directly if you can- this type of question is the sort of thing they handle regularly and they likely have additional resources to answer questions such as expected rates for your hardware/software configuration. Be sure to mention that you are looking for advice on acquisition times for the PXIe-4300 and reference this thread if/when you call or email support.
Best Regards,
05-01-2014 02:30 PM
I actually found out what the issue is. Stupidly enough I didn't think about it until I took some time away from the code to do something else. The example code displays the data to the screen via a waveform chart. Being that I am running on a real-time machine, this was taking a lot of execution time cuasing the system to overrun on it's time. Once the code was removed to a consumer loop, the system easily met my time requirements.
Thanks for the help. I greatly appreciate it.
05-01-2014 02:51 PM
Aha!
Yes, that would definitely do it!
Thanks for posting your findings- I'm sure it'll help others in the future.
Regards,