DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

RMS WIDTH in miliseconds

Solved!
Go to solution

Hello, 

 

I have a question that I can't resolved. I used the function Call ChnRMS(XW, Y, E, RMSWidth) and the Users if they want, can change de width of RMS as a percentage. But now, They want to specify the width in milliseconds and I need a script for change de milliseconds as a percentage. What can I do it?

 

Thank you. 

 

Sara

0 Kudos
Message 1 of 7
(4,683 Views)

Hi Sara,

 

Was the data you are analyzing acquired with a contant acquisition rate, such that each data point is separated from its neighbors by the same delta_time number of fractional seconds?  If so, then you can calculated the width in data points from the sampling period and the desired width in fractional seconds.  If not, would an average sampling period calculation be accurate enough?

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

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

Hello Brad, 

 

The data are signal of sensors of vehicle comfort. I have a Chn_Time and signal of the sensor vehicle. I attached a picture. 

 

As you can see you can change the % os RMS width and the button Recalculate call function ChnRMS(...) like I explain in first post.

 

This function ChnRMS change it the AVG RMS channel (color red in the graph).

 

But the users that use my script want that the value is indicated in milliseconds and not in percentatge. 

 

I don't know about the way to do it.

img1.JPG

0 Kudos
Message 3 of 7
(4,668 Views)

BradI create the chn time to calculate the RMS with this function:

 

 

Ini_F = 0.015

End_F = 0.25

SampleRate_=2500


 

 

    Call ChnLinGen("Time_Front", 0, (Ini_F+End_F), (Ini_F+End_F)*SampleRate_+1) 
I use this channel time.
What is the way to sampling period? what is the way to recalculate Rms with milliseconds?
thnks

 

0 Kudos
Message 4 of 7
(4,643 Views)

.

0 Kudos
Message 5 of 7
(4,629 Views)
Solution
Accepted by topic author s.g.m.

Hi Sara,

 

You can convert the known time window in seconds to the required window in % with the following equation:

 

L1 = CNo("Time_Front")
Percent = (CMax(L1) - CMin(L1))*SampleRate_/100

It would also be possible to create a custom dialog that does this automatically and have your user pop up this dialog instead of the ANALYSIS RMS dialog, but there is no way to customize the appearance or behavior of a shipping ANALYSIS function.  We coudl hijack the ANALYSIS icon for the RMS calculation and have that call up your custom dialog, though.

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 6 of 7
(4,601 Views)

Thank you!!!

0 Kudos
Message 7 of 7
(4,591 Views)