11-15-2020 08:56 PM - edited 11-15-2020 08:57 PM
Hi
I am a new labview user. I am trying to implement a controller in real time using labview. For that purpose, I started doing analouge input output exercise. As a part of learning process, I was trying to apply input on a system, get the data and feed it back through analouge channel. However, I noticed there is a signficant delay between input and output, It was about 1 ms. Then i thought of doing the simplest exercise. I generated an input signal read it through labview and feed it back again. So, basically its task for ADC and DAC only. But still, it has the same amount of delay. I was under impression that if i do hardwared time data read and write, it would reduce the delay. But still, no change. Can anyone please help me out regarding that? or there would always be this amount of delay.
For the ref i am attaching the .vi file.
Any kind of help would really be appreciated
Solved! Go to Solution.
11-16-2020 02:02 AM
This is a more generic DAQmx question, you might get faster and better answered when psoting thsi question in the DAQmx forum https://forums.ni.com/t5/Multifunction-DAQ/bd-p/250
But if I would to have to create a Real-time inout output with minimum delay I would program it in the FPGA. But even then I would expect some delay, because it take multple clock cycles to get an analog in and mutiple to write an analog out.
I don't know which FPGA or DAQmx could lead to the shortest delay. There might be DAQmx driver options that faster, but it would take someone with more DAQmx experience to answer that question.
11-16-2020 01:04 PM
Thanks Andre for you suggestions.
Don't you think 1 ms delay is too much? I was expecting delay would be in micro seconds or less a 1 ms second
11-16-2020 03:53 PM
DAQMx is more aimed at data acquisition - reading in data, processing, data storage, display. It is good for handling large and fast sample data, but it is an abstraction of the detail of what is running on the hardware to make it easy to programme.
You can do real-time feedback control in DAQmx - i.e. caclulate an control action from the measurement (from AI) and wite to AO - but the fact you are not working directly with the low level code on the hardware means there will be limitations.
LabVIEW RT (Real-time) is more appropriate as it works at the lower level - typically working on point-by-point functions for real-time control. However, if you use that in Scan Interface mode (the default) then the fastest sample time (and hence delay between AO and AI) it will give is 1msec. Remember this code still runs on an operating system even though real-time there is overhead in computations.
For faster you will need LabVIEW FPGA as this allows you to run code directly on an FPGA (silicon, no operating system), so this will allow you to get down to the fundamental speed of the ADC and DAC.
In addition to what flavour of LabVIEW you develop using, the timing also depends on your hardware:
Hope this helps.
11-23-2020 06:42 PM
thanks. I understood the reason.