Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Loops of Analog Output without dropping voltage inbetween loops

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,

Download All
0 Kudos
Message 1 of 7
(2,542 Views)

 

I added the code here

Capture.JPG

0 Kudos
Message 2 of 7
(2,508 Views)

I will have a look and let you know

 

0 Kudos
Message 3 of 7
(2,507 Views)

Hi Raz21,

It's not FGPA, I'm just using a cDAQ9184 chassis (ethernet connection) with a c-series (NI-9264) output module

0 Kudos
Message 4 of 7
(2,497 Views)

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. 

0 Kudos
Message 5 of 7
(2,493 Views)

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 ?

0 Kudos
Message 6 of 7
(2,469 Views)

Hello,

 

Yes, I realized that just after I sent you the code. I have reorganized the code and tested it. This should be fine.  Capture.JPG

0 Kudos
Message 7 of 7
(2,461 Views)