LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cycle Average and RMS VI Error (in a while loop)

I'm trying to use the cycle average and rms.vi to continuously get the average period (cycle time) of the data that I'm collecting in a while loop. However, I get this error message when I try to run the code: Error -20308 occurred at  "NI_MAPro.lvlib:Cycle Average and RMS, Analysis:  The waveform did not cross the mid reference level enough times to perform this measurement. Check the signal length, reference levels, and ref level units."

 

I realize this is because I don't have a complete cycle when this block is selected for the first time. But is there a way to delay this block so that it waits until I do have 1 cycle of data? Or is there a different way around this so that it doesn't error right as the code starts?

 

0 Kudos
Message 1 of 2
(2,265 Views)

Do not simply stop on error

Options:

Discard error on first run

Convert error to information string "Collecting data" or "Data Valid" or "Signal period out of range"

Do not call this if still accumulating data.

Increase DAQ interval, depends on signal frequency you expect.

0 Kudos
Message 2 of 2
(2,256 Views)