10-26-2010 02:18 AM
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
Solved! Go to Solution.
10-26-2010 08:00 AM
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
10-26-2010 08:26 AM
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.
10-27-2010 02:28 AM
BradI create the chn time to calculate the RMS with this function:
Ini_F = 0.015
End_F = 0.25
SampleRate_=2500
10-27-2010 06:01 AM
.
10-28-2010 02:03 PM
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
10-29-2010 01:51 AM
Thank you!!!