12-06-2022 09:10 AM
HI, I am stuggling with it.
I want the "DAQmx AI and AO with non-regeneration" in real-time with no delays in the loop.
When I was using a hardware timed single point working PCI devices, there was no problem.
Now I am using USB-6363, and I should configure a buffered task to do all the stuffs in hardware-timing.
After searching and practicing, I've made a vi to update an output buffer with a function, while reading it with the buffered analog input task.
I've heard that the Producer-Consumer is appropriate for the job that I want to do. However, there is no any single example or tutorial or an Youtube lesson that deals with actual DAQmx tasks working on a real hardware.
Could you please give any recommendation to my vi and relevant idea? I guess some skilled users might have the program. Could you please open it here? Or should I pay for it to learn how to program?
Looking forward to your help
12-09-2022 07:44 AM
Unfortunately, you are using the Most Recent version of LabVIEW (LabVIEW 2022 Q3), and many (most?) experienced LabVIEW developers "delay in installing the Latest Version" as it throws their code "out of compliance" with their colleagues running earlier versions.
Please open your LabVIEW Project, and select "Save for Previous Version" in the File menu. I recommend you choose LabVIEW 2019 to allow most of the more experienced participants in this Forum to be able to open your code. Not that I'm such an expert, but I only recently (3-4 months) installed LabVIEW 2021, and have no plans to install LabVIEW 2022 in the near future ...
Bob Schor
12-11-2022 06:39 PM
Dear Bob Schor,
Thank you for the reply.
I attached the programs saved for LV2019.
The Queue control sample is downloaded from an article in this forum.
I wonder if an interrupt-like structure can be configured using the queue structure.
Please review these if you mind.
01-06-2023 05:00 PM
I looked the code over a little bit and have some comments and some further questions.
Comments on "MyProgram.vi":
Question:
Can you give more detail about *exactly* what you want when you say:
I want the "DAQmx AI and AO with non-regeneration" in real-time with no delays in the loop
With USB and hardware clocking, there *will* be inevitable delays between real life and your program. Most of it will relate to the required use of buffers for tasks with hardware clocking on USB devices. There will be a delay from the time a real-life signal changes until your program becomes aware of it via DAQmx Read. And there will also be a delay from the time your program writes new data via DAQmx Write until that data becomes a real-life signal.
So it's important to understand exactly what you mean by "real-time" and "no delays". It might be impossible with your device and approach. Or you might be really close already. I can't tell without a much more complete description of what you want to accomplish with your app, and the specifications for what you consider "real-time" and "no delays".
-Kevin P
(Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
01-18-2023 11:43 PM
Dear Kevin Price,
Thanks for your invaluable reply. I just changed the measurement system to PCIe cards to use hardware time single point sampling.
One conclusion is that usb devices are only applicable to loop rates less than 100 Hz with software timed operations.
Second, for example, to achieve higher loop rate with fully available HW R/W while software computing, the only option from NI devices is the PCIe-type boards that supports HW-timed sampling.