DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

rms calculation failed

I tried to calculate the rms (chnrms)of an AC voltage, but the calculation failed. Error Message: "Keine Berechnung: Werte nicht monoton steigend". How to fix the porblem?
0 Kudos
Message 1 of 9
(4,978 Views)
Hello Jürgen,

seems that the time- or reference channel you are using is not monotoneous, which is leading to the error.
If this is true you could create a new reference channel, for instance with the ChnLinGen function. Afterwards you can use the linear mapping (ChnMapLinCalc) to interpolate your original data to fit to the new reference channel (which now is monotoneous and can be used for the RMS calculation).
All calculations can be done manually in ANALYSIS or via script using the commands I mentioned.
Ingo Schumacher
Systems Engineering Manager CEERNational Instruments Germany
0 Kudos
Message 2 of 9
(4,965 Views)
Hi Ingo,

the time channel is monotoneous. The data file is very big (50MB) and a channel of this file is longer than 1000000 rows. I just talked to Bernhard Raabe (NI) to fix the problem and he called an ingineer in Aachen , but without success. I supported the file and error messages to Bernhard and it seems to be a problem of the rows (>1000000). So we stay tuned and wait of the solution...

Thank you, Jürgen
0 Kudos
Message 3 of 9
(4,956 Views)
Hallo Herr Struss,

welche DIAdem-Version setzen Sie ein? Wenn es DIAdem 9.1 ist, haben Sie das Service Pack 2 installiert?
Wenn nicht, würde ich Sie bitten, es von unserem Web (www.ni.com/support/diasupp) herunter zu laden, zu installieren und den Test zu wiederholen.

Mit freundlichen Grüßen

Walter Rick
0 Kudos
Message 4 of 9
(4,954 Views)
Hallo Herr Rick,

ich arbeite mit Diadem 9.1 SP2.

Jürgen Struß
0 Kudos
Message 5 of 9
(4,951 Views)
Hi together,
quoting Ingo's post :

@ingos wrote:
Hello Jürgen,

seems that the time- or reference channel you are using is not monotoneous, which is leading to the error.
If this is true you could create a new reference channel, for instance with the ChnLinGen function. Afterwards you can use the linear mapping (ChnMapLinCalc) to interpolate your original data to fit to the new reference channel (which now is monotoneous and can be used for the RMS calculation).
All calculations can be done manually in ANALYSIS or via script using the commands I mentioned.


Ingo, you said that one can use "ChnMapLinCalc" to create a monotoneous x channel by mapping the signal to a new x-range (which is equidistant and created by ChnLinGen function) But ChnMapLinCalc function requires the original data channel that contains the x-values of the signal as an input (XW). (ChnMapLinCalc(XW, Y, X1, E, MapLinNovInterp, MapLinExtType, MapLinBdryVal, MapLinFctType)) and this input channel should be equidistant too. but it is the channel which is non-montoneous and which we want to make monotoneous.
 
If i go deep into my problem:
probably  due to some errors occured while saving the channels , some of the channels have x-y pairs repeated ( the same points(values) saved more than once in the channel) it results in non-monotoneous channel. I have to get rid of those excess x-y pairs. I can do it with a 2 x for loop scanning through all channel values and finding out repeated values. but it takes long time going through the channel. Is there any other way to do it easier and quicker?
 
thanks in advance
 
Kaan
 
Kaan
 
 
 
0 Kudos
Message 6 of 9
(4,658 Views)

Hi Kaan,

Yes, there is a much more efficient way, using the FormulaCalculator.  Take a look at the attached example.

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 7 of 9
(4,641 Views)
hi Brad,
 
Thanks for the answer. That solutions seems to work only for channels, in which the repeating values are adjacent
but in my case, the repeating values are randomly distributed in the channel.
 
i am sending you an example(remove_repeats.zip) and my solution (repeating_points_check.vbs) which is slow
i wonder if there is another way to solve it.
 
thanks in adanvance
 
Kaan
Download All
0 Kudos
Message 8 of 9
(4,626 Views)

Hi kaan,

I have been assuming that the "repeated values" are the time or X-axis values, is that right?  If so, then all you need to do is first sort all the channels based on the X-axis values, then your repeated values will always be next to each other.  You need to do this anyway in order to achieve the "monotone rising" X-axis channel that it looks like you need further up this post.  Try the version below which has the ChnMultipleSort() addition:

CALCXChn = CNo("[2]/[1]")
CALCYChn = "'[2]/[2]' - '[2]/[4]'"
R1 = 1.0E-12 ' minimum difference that qualifies as a repeat
Call DataDelAll
Call DataFileLoad(AutoActPath & "Remove Repeats.TDM")
Call DataFileLoad(AutoActPath & "Remove Repeats.TDM")
GroupName(2) = GroupName(1) & " Repeats Removed"
GroupName(1) = GroupName(1) & " Original"
Call GroupDefaultSet(1)
Call ChnMultipleSort(CALCXChn, CALCYChn, 0, 1)
Call ChnDeltaCalc(CALCXChn, "Delta")
Call GroupDefaultSet(2)
L1 = CALCXChn
L2 = CNo("[1]/Delta")
ChnLength(L2) = ChnLength(L2) + 1
ChDX(ChnLength(L2), L2) = Null
Call FormulaCalc("Ch(L1):= Ch(L1) + NoValue*(abs(Ch(L2))<R1)")
'Call ChnDel(L2)
Call ChnNoVHandle(CALCXChn, CALCYChn, "Delete", "X", 1, 0)
Call View.LoadLayout(AutoActPath & "Remove Repeats.TDV")
Call WndShow("VIEW")

Regards,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 9 of 9
(4,594 Views)