02-11-2019 09:50 AM
Hi,
I have a program for a test rig where I need to output an array of data as analogue voltages, and I want to be able to do this multiple times without dropping the voltage momentarily between loops.
I am currently using a while' loop within a for loop, and using the 'Is task done' node to stop the while loop at the end of my array, so I can set how many times the for loop runs to output the array multiple times. Simplified example of my code attached.
However the way it is set up means I get a momentary loss of voltage output as it stops the write task and starts it in the next iteration of the for loop.
I have tried using continuous samples and outputting one longer array instead of multiple loops of a smaller array, however as the arrays I need to input can be very long, I have run into buffer size limitations. I also require the user to have some feedback about how far into a test they are, so at least with multiple loops of shorter arrays there is visibility of how many times the for loop has run.
Does anyone know of a way to output multiple loops of an analogue output while maintaining the last samples' voltage between the loops?
Thanks in advance,
02-12-2019 09:33 AM - edited 02-12-2019 09:53 AM
I added the code here
02-12-2019 09:35 AM - edited 02-12-2019 09:38 AM
I will have a look and let you know
02-12-2019 09:51 AM
Hi Raz21,
It's not FGPA, I'm just using a cDAQ9184 chassis (ethernet connection) with a c-series (NI-9264) output module
02-12-2019 09:55 AM
Hey,
Yeah, I realized that afterward. I had a different project opened and LabVIEW got confused saying that your code is in FPGA.
Ignore the FPGA part.
Let me know if the above solved the issue.
02-13-2019 03:39 AM - edited 02-13-2019 03:40 AM
Hi,
That didn't seem to solve the issue as I got the following error 'generation cannot be started because the output buffer is empty' (screenshot of error attached). Presumably I cannot have the start before the write if I am buffering an array of data to output ?
02-13-2019 04:57 AM
Hello,
Yes, I realized that just after I sent you the code. I have reorganized the code and tested it. This should be fine.