LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

While loop or buffer while in simulation loop

Solved!
Go to solution

Okay I created a switch that automatically switched the case structure to true every 0.1 sec, and am currently testing the FFT structure to see if it produces the proper real and imaginary values for the Nyquist plot. 

 

Once that is confirmed I plan on moving to graphing it like you recommend. 

0 Kudos
Message 11 of 14
(819 Views)

I could never get the memory and case structure set up to work properly over 0.1 ms. I played around with the collector for a while too with no luck. 

 

I updated my code to use the get waveform function. It worked perfectly with the input signal wired up, however if I try to use the output wave from the buck I get 

Error - 1801 occurred at start value too large in Get Waveform Subset VI 

LabVIEW:  (Hex 0xFFFFF8F7) Duration input is not an integer multiple of dt. Value was coerced to nearest integer multiple of dt.

 

fft_working.png

0 Kudos
Message 12 of 14
(801 Views)
Solution
Accepted by topic author chopp

The problem here is presumably that you don't have enough waveform. Your Control loop only outputs the last value through that tunnel (it's just like a normal While/For loop in that respect) and you can't set it to autoindexing or concatenating (at least I can't).

 

If you want to do something, it needs to be inside the Loop.

 

Here's my modified example with the graph added for you. You need to check the condition sent to the case structure - mine might not be accurate or might trigger too often.


GCentral
Message 13 of 14
(792 Views)

Just changed the logic to run when the remainder is = 0 and the loop is working! 🙂 

 

The Nyquist is incorrect however that is not the fault of the loop, rather something is wrong with the FFT function inside the loop but that should be easy to work out. 

 

Thanks again!! 

Message 14 of 14
(783 Views)